sequenceserver 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sequenceserver might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/sequenceserver/api_errors.rb +24 -2
- data/lib/sequenceserver/blast/job.rb +41 -7
- data/lib/sequenceserver/blast/report.rb +36 -30
- data/lib/sequenceserver/config.rb +49 -27
- data/lib/sequenceserver/job.rb +13 -3
- data/lib/sequenceserver/job_remover.rb +25 -29
- data/lib/sequenceserver/refinements.rb +15 -0
- data/lib/sequenceserver/routes.rb +69 -7
- data/lib/sequenceserver/sequence.rb +8 -7
- data/lib/sequenceserver/sys.rb +2 -2
- data/lib/sequenceserver/version.rb +1 -1
- data/lib/sequenceserver/zip_file_generator.rb +56 -0
- data/lib/sequenceserver.rb +1 -0
- data/public/config.js +149 -143
- data/public/css/sequenceserver.css +44 -3
- data/public/css/sequenceserver.min.css +3 -3
- data/public/js/alignment_exporter.js +16 -8
- data/public/js/circos.js +370 -234
- data/public/js/cloud_share_modal.js +216 -0
- data/public/js/databases.js +144 -0
- data/public/js/databases_tree.js +42 -113
- data/public/js/dnd.js +164 -0
- data/public/js/error_modal.js +4 -11
- data/public/js/exporter.js +7 -3
- data/public/js/form.js +260 -0
- data/public/js/grapher.js +113 -106
- data/public/js/hit.js +80 -67
- data/public/js/hits_overview.js +2 -2
- data/public/js/hsp.js +343 -288
- data/public/js/jquery_world.js +4 -4
- data/public/js/mailto.js +36 -0
- data/public/js/options.js +84 -0
- data/public/js/query.js +319 -59
- data/public/js/report.js +315 -269
- data/public/js/report_root.js +75 -0
- data/public/js/search.js +28 -1011
- data/public/js/search_button.js +195 -0
- data/public/js/sequence.js +2409 -2411
- data/public/js/sequence_modal.js +152 -159
- data/public/js/share_url.js +23 -0
- data/public/js/sidebar.js +262 -83
- data/public/js/tests/database.spec.js +60 -0
- data/public/js/tests/mock_data/databases.json +91 -0
- data/public/js/tests/mock_data/long_response.json +269 -0
- data/public/js/tests/mock_data/short_response.json +2240 -0
- data/public/js/tests/report.spec.js +99 -0
- data/public/js/tests/search_button.spec.js +14 -0
- data/public/js/tests/search_query.spec.js +41 -0
- data/public/packages/circosJS@1.7.0.js +1640 -0
- data/public/packages/jquery-ui@1.11.4.js +16624 -0
- data/public/sequenceserver-report.min.js +2425 -19
- data/public/sequenceserver-search.min.js +2337 -15
- data/public/vendor/github/jspm/nodelibs-assert@0.1.0/index.js +2 -0
- data/public/vendor/github/jspm/{nodelibs-buffer@0.1.0 → nodelibs-assert@0.1.0}/package.json +1 -1
- data/public/vendor/github/jspm/nodelibs-assert@0.1.0.js +1 -0
- data/public/vendor/github/jspm/nodelibs-buffer@0.1.1/package.json +6 -0
- data/public/vendor/github/jspm/nodelibs-buffer@0.1.1.js +1 -0
- data/public/vendor/github/jspm/{nodelibs-process@0.1.1 → nodelibs-process@0.1.2}/package.json +2 -2
- data/public/vendor/github/jspm/nodelibs-process@0.1.2.js +1 -0
- data/public/vendor/github/jspm/nodelibs-vm@0.1.0/index.js +2 -0
- data/public/vendor/github/jspm/nodelibs-vm@0.1.0/package.json +6 -0
- data/public/vendor/github/jspm/nodelibs-vm@0.1.0.js +1 -0
- data/public/vendor/npm/assert@1.5.0/CHANGELOG.md +8 -0
- data/public/vendor/npm/assert@1.5.0/README.md +105 -0
- data/public/vendor/npm/assert@1.5.0/assert.js +327 -0
- data/public/vendor/npm/assert@1.5.0/package.json +32 -0
- data/public/vendor/npm/assert@1.5.0/test.js +288 -0
- data/public/vendor/npm/assert@1.5.0.js +1 -0
- data/public/vendor/npm/{base64-js@0.0.8/LICENSE.MIT → base64-js@1.5.1/LICENSE} +1 -1
- data/public/vendor/npm/{base64-js@0.0.8 → base64-js@1.5.1}/README.md +10 -7
- data/public/vendor/npm/base64-js@1.5.1/base64js.min.js +3 -0
- data/public/vendor/npm/base64-js@1.5.1/index.d.ts +3 -0
- data/public/vendor/npm/base64-js@1.5.1/index.js +151 -0
- data/public/vendor/npm/base64-js@1.5.1/package.json +47 -0
- data/public/vendor/npm/base64-js@1.5.1.js +1 -0
- data/public/vendor/npm/buffer@5.7.1/AUTHORS.md +70 -0
- data/public/vendor/npm/{buffer@3.4.3 → buffer@5.7.1}/README.md +111 -41
- data/public/vendor/npm/buffer@5.7.1/index.d.ts +186 -0
- data/public/vendor/npm/buffer@5.7.1/index.js +1817 -0
- data/public/vendor/npm/buffer@5.7.1/package.json +96 -0
- data/public/vendor/npm/buffer@5.7.1.js +1 -0
- data/public/vendor/npm/core-util-is@1.0.3/LICENSE +19 -0
- data/public/vendor/npm/core-util-is@1.0.3/lib/util.js +64 -0
- data/public/vendor/npm/{core-util-is@1.0.1 → core-util-is@1.0.3}/package.json +13 -1
- data/public/vendor/npm/core-util-is@1.0.3.js +1 -0
- data/public/vendor/npm/events@1.0.2/tests/add-listeners.js +2 -2
- data/public/vendor/npm/events@1.0.2/tests/check-listener-leaks.js +3 -3
- data/public/vendor/npm/events@1.0.2/tests/common.js +1 -1
- data/public/vendor/npm/events@1.0.2/tests/index.js +13 -13
- data/public/vendor/npm/events@1.0.2/tests/listeners-side-effects.js +2 -2
- data/public/vendor/npm/events@1.0.2/tests/listeners.js +2 -2
- data/public/vendor/npm/events@1.0.2/tests/max-listeners.js +2 -2
- data/public/vendor/npm/events@1.0.2/tests/modify-in-emit.js +2 -2
- data/public/vendor/npm/events@1.0.2/tests/num-args.js +2 -2
- data/public/vendor/npm/events@1.0.2/tests/once.js +2 -2
- data/public/vendor/npm/events@1.0.2/tests/remove-all-listeners.js +3 -3
- data/public/vendor/npm/events@1.0.2/tests/remove-listeners.js +3 -3
- data/public/vendor/npm/events@1.0.2/tests/set-max-listeners-side-effects.js +2 -2
- data/public/vendor/npm/events@1.0.2/tests/subclass.js +3 -3
- data/public/vendor/npm/events@1.0.2.js +1 -1
- data/public/vendor/npm/ieee754@1.2.1/LICENSE +11 -0
- data/public/vendor/npm/{ieee754@1.1.6 → ieee754@1.2.1}/README.md +12 -8
- data/public/vendor/npm/ieee754@1.2.1/index.d.ts +10 -0
- data/public/vendor/npm/{ieee754@1.1.6 → ieee754@1.2.1}/index.js +6 -6
- data/public/vendor/npm/ieee754@1.2.1/package.json +52 -0
- data/public/vendor/npm/ieee754@1.2.1.js +1 -0
- data/public/vendor/npm/{is-array@1.0.1 → indexof@0.0.1}/Makefile +3 -3
- data/public/vendor/npm/indexof@0.0.1/Readme.md +15 -0
- data/public/vendor/npm/indexof@0.0.1/component.json +10 -0
- data/public/vendor/npm/indexof@0.0.1/index.js +11 -0
- data/public/vendor/npm/indexof@0.0.1/package.json +12 -0
- data/public/vendor/npm/indexof@0.0.1.js +1 -0
- data/public/vendor/npm/inherits@2.0.1/inherits.js +1 -1
- data/public/vendor/npm/inherits@2.0.1.js +1 -1
- data/public/vendor/npm/isarray@0.0.1.js +1 -1
- data/public/vendor/npm/js-tokens@4.0.0/index.js +23 -0
- data/public/vendor/npm/js-tokens@4.0.0/package.json +30 -0
- data/public/vendor/npm/js-tokens@4.0.0.js +1 -0
- data/public/vendor/npm/loose-envify@1.4.0/LICENSE +21 -0
- data/public/vendor/npm/loose-envify@1.4.0/README.md +45 -0
- data/public/vendor/npm/loose-envify@1.4.0/cli.js +12 -0
- data/public/vendor/npm/loose-envify@1.4.0/custom.js +3 -0
- data/public/vendor/npm/loose-envify@1.4.0/index.js +5 -0
- data/public/vendor/npm/loose-envify@1.4.0/loose-envify.js +33 -0
- data/public/vendor/npm/loose-envify@1.4.0/package.json +36 -0
- data/public/vendor/npm/loose-envify@1.4.0/replace.js +52 -0
- data/public/vendor/npm/loose-envify@1.4.0.js +1 -0
- data/public/vendor/npm/object-assign@4.1.1/index.js +90 -0
- data/public/vendor/npm/object-assign@4.1.1/package.json +42 -0
- data/public/vendor/npm/object-assign@4.1.1.js +1 -0
- data/public/vendor/npm/path-browserify@0.0.0/index.js +1 -1
- data/public/vendor/npm/path-browserify@0.0.0.js +1 -1
- data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/README.md +4 -1
- data/public/vendor/npm/process@0.11.10/browser.js +184 -0
- data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/package.json +10 -1
- data/public/vendor/npm/process@0.11.10/test.js +185 -0
- data/public/vendor/npm/process@0.11.10.js +1 -0
- data/public/vendor/npm/react-dom@18.0.0/LICENSE +21 -0
- data/public/vendor/npm/react-dom@18.0.0/README.md +50 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.browser.development.js +4771 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.browser.production.min.js +85 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.node.development.js +4813 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server-legacy.node.production.min.js +1705 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.browser.development.js +4746 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.browser.production.min.js +90 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.node.development.js +4714 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-server.node.production.min.js +1746 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-test-utils.development.js +1017 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom-test-utils.production.min.js +617 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.development.js +20092 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.production.min.js +322 -0
- data/public/vendor/npm/react-dom@18.0.0/cjs/react-dom.profiling.min.js +364 -0
- data/public/vendor/npm/react-dom@18.0.0/client.js +27 -0
- data/public/vendor/npm/react-dom@18.0.0/index.js +23 -0
- data/public/vendor/npm/react-dom@18.0.0/package.json +62 -0
- data/public/vendor/npm/react-dom@18.0.0/profiling.js +23 -0
- data/public/vendor/npm/react-dom@18.0.0/server.browser.js +19 -0
- data/public/vendor/npm/react-dom@18.0.0/server.js +3 -0
- data/public/vendor/npm/react-dom@18.0.0/server.node.js +19 -0
- data/public/vendor/npm/react-dom@18.0.0/test-utils.js +9 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server-legacy.browser.development.js +4770 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server-legacy.browser.production.min.js +72 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server.browser.development.js +4745 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-server.browser.production.min.js +74 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-test-utils.development.js +1013 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom-test-utils.production.min.js +625 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.development.js +20106 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.production.min.js +269 -0
- data/public/vendor/npm/react-dom@18.0.0/umd/react-dom.profiling.min.js +285 -0
- data/public/vendor/npm/react-dom@18.0.0.js +1 -0
- data/public/vendor/npm/react@18.0.0/LICENSE +21 -0
- data/public/vendor/npm/react@18.0.0/README.md +13 -0
- data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.development.js +837 -0
- data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.production.min.js +10 -0
- data/public/vendor/npm/react@18.0.0/cjs/react-jsx-dev-runtime.profiling.min.js +10 -0
- data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.development.js +849 -0
- data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.production.min.js +38 -0
- data/public/vendor/npm/react@18.0.0/cjs/react-jsx-runtime.profiling.min.js +38 -0
- data/public/vendor/npm/react@18.0.0/cjs/react.development.js +1746 -0
- data/public/vendor/npm/react@18.0.0/cjs/react.production.min.js +26 -0
- data/public/vendor/npm/react@18.0.0/cjs/react.shared-subset.development.js +10 -0
- data/public/vendor/npm/react@18.0.0/cjs/react.shared-subset.production.min.js +12 -0
- data/public/vendor/npm/react@18.0.0/index.js +9 -0
- data/public/vendor/npm/react@18.0.0/jsx-dev-runtime.js +9 -0
- data/public/vendor/npm/react@18.0.0/jsx-runtime.js +9 -0
- data/public/vendor/npm/react@18.0.0/package.json +47 -0
- data/public/vendor/npm/react@18.0.0/react.shared-subset.js +9 -0
- data/public/vendor/npm/react@18.0.0/umd/react.development.js +2186 -0
- data/public/vendor/npm/react@18.0.0/umd/react.production.min.js +33 -0
- data/public/vendor/npm/react@18.0.0/umd/react.profiling.min.js +33 -0
- data/public/vendor/npm/react@18.0.0.js +1 -0
- data/public/vendor/npm/readable-stream@1.1.14/LICENSE +18 -0
- data/public/vendor/npm/readable-stream@1.1.14/duplex.js +2 -0
- data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_duplex.js +5 -5
- data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_passthrough.js +3 -3
- data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_readable.js +10 -10
- data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_transform.js +4 -4
- data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/lib/_stream_writable.js +6 -6
- data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/package.json +1 -1
- data/public/vendor/npm/readable-stream@1.1.14/passthrough.js +2 -0
- data/public/vendor/npm/readable-stream@1.1.14/readable.js +13 -0
- data/public/vendor/npm/readable-stream@1.1.14/transform.js +2 -0
- data/public/vendor/npm/readable-stream@1.1.14/writable.js +2 -0
- data/public/vendor/npm/readable-stream@1.1.14.js +1 -0
- data/public/vendor/npm/scheduler@0.21.0/LICENSE +21 -0
- data/public/vendor/npm/scheduler@0.21.0/README.md +9 -0
- data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_mock.development.js +530 -0
- data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_mock.production.min.js +20 -0
- data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_post_task.development.js +153 -0
- data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler-unstable_post_task.production.min.js +14 -0
- data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler.development.js +444 -0
- data/public/vendor/npm/scheduler@0.21.0/cjs/scheduler.production.min.js +19 -0
- data/public/vendor/npm/scheduler@0.21.0/index.js +9 -0
- data/public/vendor/npm/scheduler@0.21.0/package.json +36 -0
- data/public/vendor/npm/scheduler@0.21.0/umd/scheduler-unstable_mock.development.js +701 -0
- data/public/vendor/npm/scheduler@0.21.0/umd/scheduler-unstable_mock.production.min.js +21 -0
- data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.development.js +154 -0
- data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.production.min.js +148 -0
- data/public/vendor/npm/scheduler@0.21.0/umd/scheduler.profiling.min.js +148 -0
- data/public/vendor/npm/scheduler@0.21.0/unstable_mock.js +9 -0
- data/public/vendor/npm/scheduler@0.21.0/unstable_post_task.js +9 -0
- data/public/vendor/npm/scheduler@0.21.0.js +1 -0
- data/public/vendor/npm/stream-browserify@1.0.0/index.js +7 -7
- data/public/vendor/npm/stream-browserify@1.0.0/test/buf.js +5 -5
- data/public/vendor/npm/stream-browserify@1.0.0.js +1 -1
- data/public/vendor/npm/string_decoder@0.10.31/index.js +2 -2
- data/public/vendor/npm/string_decoder@0.10.31.js +1 -1
- data/public/vendor/npm/util@0.10.3/support/isBuffer.js +1 -1
- data/public/vendor/npm/util@0.10.3/test/browser/inspect.js +2 -2
- data/public/vendor/npm/util@0.10.3/test/browser/is.js +3 -3
- data/public/vendor/npm/util@0.10.3/test/node/debug.js +4 -4
- data/public/vendor/npm/util@0.10.3/test/node/format.js +2 -2
- data/public/vendor/npm/util@0.10.3/test/node/inspect.js +3 -3
- data/public/vendor/npm/util@0.10.3/test/node/log.js +3 -3
- data/public/vendor/npm/util@0.10.3/test/node/util.js +3 -3
- data/public/vendor/npm/util@0.10.3/util.js +3 -3
- data/public/vendor/npm/util@0.10.3.js +1 -1
- data/public/vendor/npm/vm-browserify@0.0.4/LICENSE +18 -0
- data/public/vendor/npm/vm-browserify@0.0.4/example/run/bundle.js +376 -0
- data/public/vendor/npm/vm-browserify@0.0.4/example/run/entry.js +6 -0
- data/public/vendor/npm/vm-browserify@0.0.4/example/run/index.html +9 -0
- data/public/vendor/npm/vm-browserify@0.0.4/example/run/server.js +6 -0
- data/public/vendor/npm/vm-browserify@0.0.4/index.js +139 -0
- data/public/vendor/npm/vm-browserify@0.0.4/package.json +46 -0
- data/public/vendor/npm/vm-browserify@0.0.4/readme.markdown +67 -0
- data/public/vendor/npm/vm-browserify@0.0.4/test/vm.js +34 -0
- data/public/vendor/npm/vm-browserify@0.0.4.js +1 -0
- data/public/vendor/npm/webshim@1.15.8/Gruntfile.js +4 -4
- data/public/vendor/npm/webshim@1.15.8/build/combobuild.js +2 -2
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/color-picker.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/10.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/11.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/17.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/5.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/6.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/combos/9.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/es6.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/excanvas.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/form-number-date-ui.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/moxie/js/moxie-html4.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/moxie/js/moxie-swf.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/dev/shims/sizzle.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/js-webshim/minified/shims/es6.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/color-picker.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/combos/10.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/combos/11.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/combos/17.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/combos/5.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/combos/6.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/combos/9.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/es6.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/excanvas.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/form-number-date-ui.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/moxie/js/moxie-html4.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/moxie/js/moxie-swf.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/src/shims/sizzle.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/tests/dist/jquery.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/tests/jquery/unit/core.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/tests/jquery/unit/event.js +1388 -711
- data/public/vendor/npm/webshim@1.15.8/tests/qunit/qunit.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/tests/test-ext/jquery-1-custom.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/tests/test-ext/jquery-2-custom.js +1 -1
- data/public/vendor/npm/webshim@1.15.8/tests/test-ext/punycode.js +1 -1
- data/public/vendor/system-polyfills.js +865 -1
- data/views/blastn_options.erb +291 -0
- data/views/blastp_options.erb +288 -0
- data/views/blastx_options.erb +318 -0
- data/views/error.erb +12 -0
- data/views/layout.erb +2 -30
- data/views/report.erb +0 -8
- data/views/search.erb +16 -9
- data/views/tblastn_options.erb +266 -0
- data/views/tblastx_options.erb +291 -0
- metadata +318 -439
- data/public/vendor/github/jspm/nodelibs-buffer@0.1.0.js +0 -1
- data/public/vendor/github/jspm/nodelibs-module@0.1.0/index.js +0 -1
- data/public/vendor/github/jspm/nodelibs-module@0.1.0.js +0 -1
- data/public/vendor/github/jspm/nodelibs-process@0.1.1.js +0 -1
- data/public/vendor/npm/amdefine@1.0.0/LICENSE +0 -58
- data/public/vendor/npm/amdefine@1.0.0/README.md +0 -171
- data/public/vendor/npm/amdefine@1.0.0/amdefine.js +0 -200
- data/public/vendor/npm/amdefine@1.0.0/intercept.js +0 -24
- data/public/vendor/npm/amdefine@1.0.0/package.json +0 -16
- data/public/vendor/npm/amdefine@1.0.0.js +0 -1
- data/public/vendor/npm/base62@0.1.1/LICENSE +0 -20
- data/public/vendor/npm/base62@0.1.1/Readme.md +0 -30
- data/public/vendor/npm/base62@0.1.1/base62.js +0 -28
- data/public/vendor/npm/base62@0.1.1/package.json +0 -21
- data/public/vendor/npm/base62@0.1.1/test/test.js +0 -13
- data/public/vendor/npm/base62@0.1.1.js +0 -1
- data/public/vendor/npm/base64-js@0.0.8/lib/b64.js +0 -125
- data/public/vendor/npm/base64-js@0.0.8/package.json +0 -34
- data/public/vendor/npm/base64-js@0.0.8/test/convert.js +0 -39
- data/public/vendor/npm/base64-js@0.0.8/test/url-safe.js +0 -15
- data/public/vendor/npm/base64-js@0.0.8.js +0 -1
- data/public/vendor/npm/buffer@3.4.3/index.js +0 -1533
- data/public/vendor/npm/buffer@3.4.3/package.json +0 -67
- data/public/vendor/npm/buffer@3.4.3/test/_polyfill.js +0 -152
- data/public/vendor/npm/buffer@3.4.3/test/base64.js +0 -33
- data/public/vendor/npm/buffer@3.4.3/test/basic.js +0 -58
- data/public/vendor/npm/buffer@3.4.3/test/compare.js +0 -53
- data/public/vendor/npm/buffer@3.4.3/test/constructor.js +0 -132
- data/public/vendor/npm/buffer@3.4.3/test/deprecated.js +0 -21
- data/public/vendor/npm/buffer@3.4.3/test/from-string.js +0 -105
- data/public/vendor/npm/buffer@3.4.3/test/methods.js +0 -109
- data/public/vendor/npm/buffer@3.4.3/test/node/README.txt +0 -1
- data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-ascii.js +0 -20
- data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-bytelength.js +0 -38
- data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-concat.js +0 -26
- data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-indexof.js +0 -78
- data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer-inspect.js +0 -31
- data/public/vendor/npm/buffer@3.4.3/test/node/test-buffer.js +0 -804
- data/public/vendor/npm/buffer@3.4.3/test/node-es6/README.txt +0 -1
- data/public/vendor/npm/buffer@3.4.3/test/node-es6/test-buffer-arraybuffer.js +0 -37
- data/public/vendor/npm/buffer@3.4.3/test/node-es6/test-buffer-iterator.js +0 -32
- data/public/vendor/npm/buffer@3.4.3/test/slice.js +0 -33
- data/public/vendor/npm/buffer@3.4.3/test/static.js +0 -32
- data/public/vendor/npm/buffer@3.4.3/test/to-string.js +0 -106
- data/public/vendor/npm/buffer@3.4.3/test/write.js +0 -90
- data/public/vendor/npm/buffer@3.4.3.js +0 -1
- data/public/vendor/npm/core-util-is@1.0.1/float.patch +0 -604
- data/public/vendor/npm/core-util-is@1.0.1/lib/util.js +0 -66
- data/public/vendor/npm/core-util-is@1.0.1/util.js +0 -66
- data/public/vendor/npm/core-util-is@1.0.1.js +0 -1
- data/public/vendor/npm/envify@3.4.0/README.md +0 -145
- data/public/vendor/npm/envify@3.4.0/bin/envify +0 -17
- data/public/vendor/npm/envify@3.4.0/custom.js +0 -33
- data/public/vendor/npm/envify@3.4.0/index.js +0 -4
- data/public/vendor/npm/envify@3.4.0/package.json +0 -35
- data/public/vendor/npm/envify@3.4.0/visitors.js +0 -33
- data/public/vendor/npm/envify@3.4.0.js +0 -1
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/bin/esparse.js +0 -90
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/bin/esvalidate.js +0 -145
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/esprima.js +0 -6191
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/package.json +0 -72
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/compat.js +0 -167
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/reflect.js +0 -421
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/run.js +0 -34
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/runner.js +0 -418
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb/test/test.js +0 -34730
- data/public/vendor/npm/esprima-fb@13001.1001.0-dev-harmony-fb.js +0 -1
- data/public/vendor/npm/ieee754@1.1.6/LICENSE +0 -56
- data/public/vendor/npm/ieee754@1.1.6/package.json +0 -34
- data/public/vendor/npm/ieee754@1.1.6/test/basic.js +0 -20
- data/public/vendor/npm/ieee754@1.1.6.js +0 -1
- data/public/vendor/npm/is-array@1.0.1/History.md +0 -11
- data/public/vendor/npm/is-array@1.0.1/Readme.md +0 -27
- data/public/vendor/npm/is-array@1.0.1/component.json +0 -13
- data/public/vendor/npm/is-array@1.0.1/index.js +0 -33
- data/public/vendor/npm/is-array@1.0.1/package.json +0 -10
- data/public/vendor/npm/is-array@1.0.1/test/test.html +0 -46
- data/public/vendor/npm/is-array@1.0.1.js +0 -1
- data/public/vendor/npm/jstransform@10.1.0/LICENSE +0 -201
- data/public/vendor/npm/jstransform@10.1.0/README.md +0 -98
- data/public/vendor/npm/jstransform@10.1.0/jestEnvironment.js +0 -3
- data/public/vendor/npm/jstransform@10.1.0/jestPreprocessor.js +0 -8
- data/public/vendor/npm/jstransform@10.1.0/package.json +0 -52
- data/public/vendor/npm/jstransform@10.1.0/polyfill/Object.es6.js +0 -54
- data/public/vendor/npm/jstransform@10.1.0/src/__tests__/jstransform-test.js +0 -246
- data/public/vendor/npm/jstransform@10.1.0/src/__tests__/jstransform-utils-test.js +0 -31
- data/public/vendor/npm/jstransform@10.1.0/src/docblock.js +0 -86
- data/public/vendor/npm/jstransform@10.1.0/src/jstransform.js +0 -180
- data/public/vendor/npm/jstransform@10.1.0/src/utils.js +0 -386
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-arrow-function-visitors-test.js +0 -57
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-call-spread-visitors-test.js +0 -46
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-class-visitors-test.js +0 -463
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-destructuring-visitors-test.js +0 -144
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-es7-object-integration-test.js +0 -40
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-object-concise-method-visitors-test.js +0 -47
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-object-short-notation-visitors-test.js +0 -33
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-rest-param-visitors-test.js +0 -119
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es6-template-visitors-test.js +0 -138
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es7-rest-property-helpers-test.js +0 -47
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/es7-spread-property-visitors-test.js +0 -90
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/gen/generate-type-syntax-test.js +0 -40
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/gen/type-syntax-test.rec.js +0 -846
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/reserved-words-test.js +0 -40
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-alias-syntax-test.js +0 -34
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-class-syntax-test.js +0 -105
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-function-syntax-test.js +0 -126
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-interface-syntax-test.js +0 -29
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-object-method-syntax-test.js +0 -65
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-pattern-syntax-test.js +0 -45
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-syntax-test.js +0 -46
- data/public/vendor/npm/jstransform@10.1.0/visitors/__tests__/type-variable-declaration-syntax-test.js +0 -102
- data/public/vendor/npm/jstransform@10.1.0/visitors/es6-arrow-function-visitors.js +0 -66
- data/public/vendor/npm/jstransform@10.1.0/visitors/es6-call-spread-visitors.js +0 -72
- data/public/vendor/npm/jstransform@10.1.0/visitors/es6-class-visitors.js +0 -316
- data/public/vendor/npm/jstransform@10.1.0/visitors/es6-destructuring-visitors.js +0 -135
- data/public/vendor/npm/jstransform@10.1.0/visitors/es6-object-concise-method-visitors.js +0 -28
- data/public/vendor/npm/jstransform@10.1.0/visitors/es6-object-short-notation-visitors.js +0 -12
- data/public/vendor/npm/jstransform@10.1.0/visitors/es6-rest-param-visitors.js +0 -45
- data/public/vendor/npm/jstransform@10.1.0/visitors/es6-template-visitors.js +0 -90
- data/public/vendor/npm/jstransform@10.1.0/visitors/es7-rest-property-helpers.js +0 -80
- data/public/vendor/npm/jstransform@10.1.0/visitors/es7-spread-property-visitors.js +0 -56
- data/public/vendor/npm/jstransform@10.1.0/visitors/reserved-words-helper.js +0 -74
- data/public/vendor/npm/jstransform@10.1.0/visitors/reserved-words-visitors.js +0 -30
- data/public/vendor/npm/jstransform@10.1.0/visitors/type-syntax.js +0 -118
- data/public/vendor/npm/jstransform@10.1.0.js +0 -1
- data/public/vendor/npm/process@0.10.1/browser.js +0 -58
- data/public/vendor/npm/process@0.10.1.js +0 -1
- data/public/vendor/npm/qs@2.4.1/test/stringify.js +0 -162
- data/public/vendor/npm/react@0.13.3/README.md +0 -20
- data/public/vendor/npm/react@0.13.3/addons.js +0 -2
- data/public/vendor/npm/react@0.13.3/dist/JSXTransformer.js +0 -11346
- data/public/vendor/npm/react@0.13.3/dist/react-with-addons.js +0 -10483
- data/public/vendor/npm/react@0.13.3/dist/react-with-addons.min.js +0 -7297
- data/public/vendor/npm/react@0.13.3/dist/react.js +0 -9468
- data/public/vendor/npm/react@0.13.3/dist/react.min.js +0 -6764
- data/public/vendor/npm/react@0.13.3/lib/AutoFocusMixin.js +0 -9
- data/public/vendor/npm/react@0.13.3/lib/BeforeInputEventPlugin.js +0 -197
- data/public/vendor/npm/react@0.13.3/lib/CSSCore.js +0 -39
- data/public/vendor/npm/react@0.13.3/lib/CSSProperty.js +0 -123
- data/public/vendor/npm/react@0.13.3/lib/CSSPropertyOperations.js +0 -103
- data/public/vendor/npm/react@0.13.3/lib/CallbackQueue.js +0 -43
- data/public/vendor/npm/react@0.13.3/lib/ChangeEventPlugin.js +0 -174
- data/public/vendor/npm/react@0.13.3/lib/ClientReactRootIndex.js +0 -23
- data/public/vendor/npm/react@0.13.3/lib/DOMChildrenOperations.js +0 -57
- data/public/vendor/npm/react@0.13.3/lib/DOMProperty.js +0 -96
- data/public/vendor/npm/react@0.13.3/lib/DOMPropertyOperations.js +0 -99
- data/public/vendor/npm/react@0.13.3/lib/Danger.js +0 -67
- data/public/vendor/npm/react@0.13.3/lib/DefaultEventPluginOrder.js +0 -5
- data/public/vendor/npm/react@0.13.3/lib/EnterLeaveEventPlugin.js +0 -69
- data/public/vendor/npm/react@0.13.3/lib/EventConstants.js +0 -55
- data/public/vendor/npm/react@0.13.3/lib/EventListener.js +0 -34
- data/public/vendor/npm/react@0.13.3/lib/EventPluginHub.js +0 -103
- data/public/vendor/npm/react@0.13.3/lib/EventPluginRegistry.js +0 -115
- data/public/vendor/npm/react@0.13.3/lib/EventPluginUtils.js +0 -121
- data/public/vendor/npm/react@0.13.3/lib/EventPropagators.js +0 -62
- data/public/vendor/npm/react@0.13.3/lib/ExecutionEnvironment.js +0 -42
- data/public/vendor/npm/react@0.13.3/lib/FallbackCompositionState.js +0 -45
- data/public/vendor/npm/react@0.13.3/lib/HTMLDOMPropertyConfig.js +0 -155
- data/public/vendor/npm/react@0.13.3/lib/LinkedStateMixin.js +0 -8
- data/public/vendor/npm/react@0.13.3/lib/LinkedValueUtils.js +0 -74
- data/public/vendor/npm/react@0.13.3/lib/LocalEventTrapMixin.js +0 -26
- data/public/vendor/npm/react@0.13.3/lib/MobileSafariClickEventPlugin.js +0 -17
- data/public/vendor/npm/react@0.13.3/lib/Object.assign.js +0 -47
- data/public/vendor/npm/react@0.13.3/lib/PooledClass.js +0 -75
- data/public/vendor/npm/react@0.13.3/lib/React.js +0 -93
- data/public/vendor/npm/react@0.13.3/lib/ReactBrowserComponentMixin.js +0 -7
- data/public/vendor/npm/react@0.13.3/lib/ReactBrowserEventEmitter.js +0 -136
- data/public/vendor/npm/react@0.13.3/lib/ReactCSSTransitionGroup.js +0 -34
- data/public/vendor/npm/react@0.13.3/lib/ReactCSSTransitionGroupChild.js +0 -92
- data/public/vendor/npm/react@0.13.3/lib/ReactChildReconciler.js +0 -57
- data/public/vendor/npm/react@0.13.3/lib/ReactChildren.js +0 -67
- data/public/vendor/npm/react@0.13.3/lib/ReactClass.js +0 -338
- data/public/vendor/npm/react@0.13.3/lib/ReactComponent.js +0 -50
- data/public/vendor/npm/react@0.13.3/lib/ReactComponentBrowserEnvironment.js +0 -14
- data/public/vendor/npm/react@0.13.3/lib/ReactComponentEnvironment.js +0 -19
- data/public/vendor/npm/react@0.13.3/lib/ReactComponentWithPureRenderMixin.js +0 -7
- data/public/vendor/npm/react@0.13.3/lib/ReactCompositeComponent.js +0 -374
- data/public/vendor/npm/react@0.13.3/lib/ReactContext.js +0 -27
- data/public/vendor/npm/react@0.13.3/lib/ReactCurrentOwner.js +0 -32
- data/public/vendor/npm/react@0.13.3/lib/ReactDOM.js +0 -146
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMButton.js +0 -35
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMComponent.js +0 -267
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMForm.js +0 -21
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMIDOperations.js +0 -63
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMIframe.js +0 -20
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMImg.js +0 -21
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMInput.js +0 -94
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMOption.js +0 -23
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMSelect.js +0 -112
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMSelection.js +0 -103
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMTextComponent.js +0 -38
- data/public/vendor/npm/react@0.13.3/lib/ReactDOMTextarea.js +0 -70
- data/public/vendor/npm/react@0.13.3/lib/ReactDefaultBatchingStrategy.js +0 -37
- data/public/vendor/npm/react@0.13.3/lib/ReactDefaultInjection.js +0 -93
- data/public/vendor/npm/react@0.13.3/lib/ReactDefaultPerf.js +0 -183
- data/public/vendor/npm/react@0.13.3/lib/ReactDefaultPerfAnalysis.js +0 -145
- data/public/vendor/npm/react@0.13.3/lib/ReactElement.js +0 -151
- data/public/vendor/npm/react@0.13.3/lib/ReactElementValidator.js +0 -218
- data/public/vendor/npm/react@0.13.3/lib/ReactEmptyComponent.js +0 -47
- data/public/vendor/npm/react@0.13.3/lib/ReactErrorUtils.js +0 -30
- data/public/vendor/npm/react@0.13.3/lib/ReactEventEmitterMixin.js +0 -12
- data/public/vendor/npm/react@0.13.3/lib/ReactEventListener.js +0 -93
- data/public/vendor/npm/react@0.13.3/lib/ReactFragment.js +0 -110
- data/public/vendor/npm/react@0.13.3/lib/ReactInjection.js +0 -27
- data/public/vendor/npm/react@0.13.3/lib/ReactInputSelection.js +0 -75
- data/public/vendor/npm/react@0.13.3/lib/ReactInstanceHandles.js +0 -113
- data/public/vendor/npm/react@0.13.3/lib/ReactInstanceMap.js +0 -47
- data/public/vendor/npm/react@0.13.3/lib/ReactLifeCycle.js +0 -9
- data/public/vendor/npm/react@0.13.3/lib/ReactLink.js +0 -16
- data/public/vendor/npm/react@0.13.3/lib/ReactMarkupChecksum.js +0 -17
- data/public/vendor/npm/react@0.13.3/lib/ReactMount.js +0 -347
- data/public/vendor/npm/react@0.13.3/lib/ReactMultiChild.js +0 -190
- data/public/vendor/npm/react@0.13.3/lib/ReactMultiChildUpdateTypes.js +0 -10
- data/public/vendor/npm/react@0.13.3/lib/ReactNativeComponent.js +0 -53
- data/public/vendor/npm/react@0.13.3/lib/ReactOwner.js +0 -21
- data/public/vendor/npm/react@0.13.3/lib/ReactPerf.js +0 -42
- data/public/vendor/npm/react@0.13.3/lib/ReactPropTransferer.js +0 -40
- data/public/vendor/npm/react@0.13.3/lib/ReactPropTypeLocationNames.js +0 -13
- data/public/vendor/npm/react@0.13.3/lib/ReactPropTypeLocations.js +0 -9
- data/public/vendor/npm/react@0.13.3/lib/ReactPropTypes.js +0 -225
- data/public/vendor/npm/react@0.13.3/lib/ReactPutListenerQueue.js +0 -31
- data/public/vendor/npm/react@0.13.3/lib/ReactReconcileTransaction.js +0 -66
- data/public/vendor/npm/react@0.13.3/lib/ReactReconciler.js +0 -44
- data/public/vendor/npm/react@0.13.3/lib/ReactRef.js +0 -36
- data/public/vendor/npm/react@0.13.3/lib/ReactRootIndex.js +0 -29
- data/public/vendor/npm/react@0.13.3/lib/ReactServerRendering.js +0 -44
- data/public/vendor/npm/react@0.13.3/lib/ReactServerRenderingTransaction.js +0 -47
- data/public/vendor/npm/react@0.13.3/lib/ReactStateSetters.js +0 -104
- data/public/vendor/npm/react@0.13.3/lib/ReactTestUtils.js +0 -249
- data/public/vendor/npm/react@0.13.3/lib/ReactTransitionChildMapping.js +0 -53
- data/public/vendor/npm/react@0.13.3/lib/ReactTransitionEvents.js +0 -68
- data/public/vendor/npm/react@0.13.3/lib/ReactTransitionGroup.js +0 -140
- data/public/vendor/npm/react@0.13.3/lib/ReactUpdateQueue.js +0 -107
- data/public/vendor/npm/react@0.13.3/lib/ReactUpdates.js +0 -139
- data/public/vendor/npm/react@0.13.3/lib/ReactWithAddons.js +0 -30
- data/public/vendor/npm/react@0.13.3/lib/SVGDOMPropertyConfig.js +0 -76
- data/public/vendor/npm/react@0.13.3/lib/SelectEventPlugin.js +0 -91
- data/public/vendor/npm/react@0.13.3/lib/ServerReactRootIndex.js +0 -29
- data/public/vendor/npm/react@0.13.3/lib/SimpleEventPlugin.js +0 -287
- data/public/vendor/npm/react@0.13.3/lib/SyntheticClipboardEvent.js +0 -11
- data/public/vendor/npm/react@0.13.3/lib/SyntheticCompositionEvent.js +0 -9
- data/public/vendor/npm/react@0.13.3/lib/SyntheticDragEvent.js +0 -9
- data/public/vendor/npm/react@0.13.3/lib/SyntheticEvent.js +0 -90
- data/public/vendor/npm/react@0.13.3/lib/SyntheticFocusEvent.js +0 -9
- data/public/vendor/npm/react@0.13.3/lib/SyntheticInputEvent.js +0 -9
- data/public/vendor/npm/react@0.13.3/lib/SyntheticKeyboardEvent.js +0 -43
- data/public/vendor/npm/react@0.13.3/lib/SyntheticMouseEvent.js +0 -38
- data/public/vendor/npm/react@0.13.3/lib/SyntheticTouchEvent.js +0 -19
- data/public/vendor/npm/react@0.13.3/lib/SyntheticUIEvent.js +0 -29
- data/public/vendor/npm/react@0.13.3/lib/SyntheticWheelEvent.js +0 -18
- data/public/vendor/npm/react@0.13.3/lib/Transaction.js +0 -90
- data/public/vendor/npm/react@0.13.3/lib/ViewportMetrics.js +0 -27
- data/public/vendor/npm/react@0.13.3/lib/accumulateInto.js +0 -26
- data/public/vendor/npm/react@0.13.3/lib/adler32.js +0 -32
- data/public/vendor/npm/react@0.13.3/lib/camelize.js +0 -30
- data/public/vendor/npm/react@0.13.3/lib/camelizeStyleName.js +0 -8
- data/public/vendor/npm/react@0.13.3/lib/cloneWithProps.js +0 -20
- data/public/vendor/npm/react@0.13.3/lib/containsNode.js +0 -20
- data/public/vendor/npm/react@0.13.3/lib/createArrayFromMixed.js +0 -15
- data/public/vendor/npm/react@0.13.3/lib/createFullPageComponent.js +0 -22
- data/public/vendor/npm/react@0.13.3/lib/createNodesFromMarkup.js +0 -39
- data/public/vendor/npm/react@0.13.3/lib/cx.js +0 -20
- data/public/vendor/npm/react@0.13.3/lib/dangerousStyleValue.js +0 -19
- data/public/vendor/npm/react@0.13.3/lib/emptyFunction.js +0 -32
- data/public/vendor/npm/react@0.13.3/lib/emptyObject.js +0 -9
- data/public/vendor/npm/react@0.13.3/lib/escapeTextContentForBrowser.js +0 -38
- data/public/vendor/npm/react@0.13.3/lib/findDOMNode.js +0 -31
- data/public/vendor/npm/react@0.13.3/lib/flattenChildren.js +0 -25
- data/public/vendor/npm/react@0.13.3/lib/focusNode.js +0 -27
- data/public/vendor/npm/react@0.13.3/lib/forEachAccumulated.js +0 -29
- data/public/vendor/npm/react@0.13.3/lib/getActiveElement.js +0 -27
- data/public/vendor/npm/react@0.13.3/lib/getEventCharCode.js +0 -50
- data/public/vendor/npm/react@0.13.3/lib/getEventKey.js +0 -72
- data/public/vendor/npm/react@0.13.3/lib/getEventModifierState.js +0 -45
- data/public/vendor/npm/react@0.13.3/lib/getEventTarget.js +0 -29
- data/public/vendor/npm/react@0.13.3/lib/getIteratorFn.js +0 -42
- data/public/vendor/npm/react@0.13.3/lib/getMarkupWrap.js +0 -73
- data/public/vendor/npm/react@0.13.3/lib/getNodeForCharacterOffset.js +0 -73
- data/public/vendor/npm/react@0.13.3/lib/getReactRootElementInContainer.js +0 -33
- data/public/vendor/npm/react@0.13.3/lib/getTextContentAccessor.js +0 -11
- data/public/vendor/npm/react@0.13.3/lib/getUnboundedScrollPosition.js +0 -38
- data/public/vendor/npm/react@0.13.3/lib/hyphenate.js +0 -31
- data/public/vendor/npm/react@0.13.3/lib/hyphenateStyleName.js +0 -8
- data/public/vendor/npm/react@0.13.3/lib/instantiateReactComponent.js +0 -55
- data/public/vendor/npm/react@0.13.3/lib/invariant.js +0 -26
- data/public/vendor/npm/react@0.13.3/lib/isEventSupported.js +0 -24
- data/public/vendor/npm/react@0.13.3/lib/isNode.js +0 -25
- data/public/vendor/npm/react@0.13.3/lib/isTextInputElement.js +0 -41
- data/public/vendor/npm/react@0.13.3/lib/isTextNode.js +0 -6
- data/public/vendor/npm/react@0.13.3/lib/joinClasses.js +0 -39
- data/public/vendor/npm/react@0.13.3/lib/keyMirror.js +0 -18
- data/public/vendor/npm/react@0.13.3/lib/keyOf.js +0 -34
- data/public/vendor/npm/react@0.13.3/lib/mapObject.js +0 -51
- data/public/vendor/npm/react@0.13.3/lib/memoizeStringOnly.js +0 -31
- data/public/vendor/npm/react@0.13.3/lib/onlyChild.js +0 -11
- data/public/vendor/npm/react@0.13.3/lib/performance.js +0 -8
- data/public/vendor/npm/react@0.13.3/lib/performanceNow.js +0 -7
- data/public/vendor/npm/react@0.13.3/lib/quoteAttributeValueForBrowser.js +0 -7
- data/public/vendor/npm/react@0.13.3/lib/setInnerHTML.js +0 -40
- data/public/vendor/npm/react@0.13.3/lib/setTextContent.js +0 -16
- data/public/vendor/npm/react@0.13.3/lib/shallowEqual.js +0 -42
- data/public/vendor/npm/react@0.13.3/lib/shouldUpdateReactComponent.js +0 -51
- data/public/vendor/npm/react@0.13.3/lib/toArray.js +0 -21
- data/public/vendor/npm/react@0.13.3/lib/traverseAllChildren.js +0 -104
- data/public/vendor/npm/react@0.13.3/lib/update.js +0 -78
- data/public/vendor/npm/react@0.13.3/lib/warning.js +0 -34
- data/public/vendor/npm/react@0.13.3/package.json +0 -34
- data/public/vendor/npm/react@0.13.3/react.js +0 -2
- data/public/vendor/npm/react@0.13.3.js +0 -1
- data/public/vendor/npm/readable-stream@1.1.13/duplex.js +0 -2
- data/public/vendor/npm/readable-stream@1.1.13/passthrough.js +0 -2
- data/public/vendor/npm/readable-stream@1.1.13/readable.js +0 -8
- data/public/vendor/npm/readable-stream@1.1.13/transform.js +0 -2
- data/public/vendor/npm/readable-stream@1.1.13/writable.js +0 -2
- data/public/vendor/npm/readable-stream@1.1.13.js +0 -1
- data/public/vendor/npm/source-map@0.1.31/CHANGELOG.md +0 -112
- data/public/vendor/npm/source-map@0.1.31/LICENSE +0 -28
- data/public/vendor/npm/source-map@0.1.31/Makefile.dryice.js +0 -89
- data/public/vendor/npm/source-map@0.1.31/README.md +0 -434
- data/public/vendor/npm/source-map@0.1.31/build/assert-shim.js +0 -58
- data/public/vendor/npm/source-map@0.1.31/build/mini-require.js +0 -154
- data/public/vendor/npm/source-map@0.1.31/build/prefix-source-map.jsm +0 -20
- data/public/vendor/npm/source-map@0.1.31/build/prefix-utils.jsm +0 -18
- data/public/vendor/npm/source-map@0.1.31/build/suffix-browser.js +0 -8
- data/public/vendor/npm/source-map@0.1.31/build/suffix-source-map.jsm +0 -6
- data/public/vendor/npm/source-map@0.1.31/build/suffix-utils.jsm +0 -21
- data/public/vendor/npm/source-map@0.1.31/build/test-prefix.js +0 -10
- data/public/vendor/npm/source-map@0.1.31/build/test-suffix.js +0 -5
- data/public/vendor/npm/source-map@0.1.31/lib/source-map/array-set.js +0 -49
- data/public/vendor/npm/source-map@0.1.31/lib/source-map/base64-vlq.js +0 -56
- data/public/vendor/npm/source-map@0.1.31/lib/source-map/base64.js +0 -44
- data/public/vendor/npm/source-map@0.1.31/lib/source-map/binary-search.js +0 -83
- data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-map-consumer.js +0 -238
- data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-map-generator.js +0 -231
- data/public/vendor/npm/source-map@0.1.31/lib/source-map/source-node.js +0 -234
- data/public/vendor/npm/source-map@0.1.31/lib/source-map/util.js +0 -207
- data/public/vendor/npm/source-map@0.1.31/lib/source-map.js +0 -4
- data/public/vendor/npm/source-map@0.1.31/package.json +0 -52
- data/public/vendor/npm/source-map@0.1.31/test/run-tests.js +0 -50
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-api.js +0 -19
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-array-set.js +0 -84
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-base64-vlq.js +0 -17
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-base64.js +0 -26
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-binary-search.js +0 -37
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-dog-fooding.js +0 -76
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-map-consumer.js +0 -426
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-map-generator.js +0 -480
- data/public/vendor/npm/source-map@0.1.31/test/source-map/test-source-node.js +0 -307
- data/public/vendor/npm/source-map@0.1.31/test/source-map/util.js +0 -84
- data/public/vendor/npm/source-map@0.1.31.js +0 -1
- data/public/vendor/npm/through@2.3.8/LICENSE.APACHE2 +0 -15
- data/public/vendor/npm/through@2.3.8/LICENSE.MIT +0 -24
- data/public/vendor/npm/through@2.3.8/index.js +0 -93
- data/public/vendor/npm/through@2.3.8/package.json +0 -36
- data/public/vendor/npm/through@2.3.8/readme.markdown +0 -64
- data/public/vendor/npm/through@2.3.8/test/async.js +0 -26
- data/public/vendor/npm/through@2.3.8/test/auto-destroy.js +0 -26
- data/public/vendor/npm/through@2.3.8/test/buffering.js +0 -57
- data/public/vendor/npm/through@2.3.8/test/end.js +0 -37
- data/public/vendor/npm/through@2.3.8/test/index.js +0 -98
- data/public/vendor/npm/through@2.3.8/test.js +0 -2
- data/public/vendor/npm/through@2.3.8.js +0 -1
- data/views/_options.erb +0 -156
- /data/public/vendor/github/jspm/{nodelibs-buffer@0.1.0 → nodelibs-buffer@0.1.1}/index.js +0 -0
- /data/public/vendor/github/jspm/{nodelibs-process@0.1.1 → nodelibs-process@0.1.2}/index.js +0 -0
- /data/public/vendor/npm/{readable-stream@1.1.13 → assert@1.5.0}/LICENSE +0 -0
- /data/public/vendor/npm/{buffer@3.4.3 → buffer@5.7.1}/LICENSE +0 -0
- /data/public/vendor/npm/{core-util-is@1.0.1 → core-util-is@1.0.3}/README.md +0 -0
- /data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/LICENSE +0 -0
- /data/public/vendor/npm/{process@0.10.1 → process@0.11.10}/index.js +0 -0
- /data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/README.md +0 -0
- /data/public/vendor/npm/{readable-stream@1.1.13 → readable-stream@1.1.14}/float.patch +0 -0
@@ -0,0 +1,4770 @@
|
|
1
|
+
/* */
|
2
|
+
"format cjs";
|
3
|
+
(function(process) {
|
4
|
+
(function(global, factory) {
|
5
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) : typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) : (global = global || self, factory(global.ReactDOMServer = {}, global.React));
|
6
|
+
}(this, (function(exports, React) {
|
7
|
+
'use strict';
|
8
|
+
var ReactVersion = '18.0.0-fc46dba67-20220329';
|
9
|
+
var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
10
|
+
function warn(format) {
|
11
|
+
{
|
12
|
+
{
|
13
|
+
for (var _len = arguments.length,
|
14
|
+
args = new Array(_len > 1 ? _len - 1 : 0),
|
15
|
+
_key = 1; _key < _len; _key++) {
|
16
|
+
args[_key - 1] = arguments[_key];
|
17
|
+
}
|
18
|
+
printWarning('warn', format, args);
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
function error(format) {
|
23
|
+
{
|
24
|
+
{
|
25
|
+
for (var _len2 = arguments.length,
|
26
|
+
args = new Array(_len2 > 1 ? _len2 - 1 : 0),
|
27
|
+
_key2 = 1; _key2 < _len2; _key2++) {
|
28
|
+
args[_key2 - 1] = arguments[_key2];
|
29
|
+
}
|
30
|
+
printWarning('error', format, args);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
function printWarning(level, format, args) {
|
35
|
+
{
|
36
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
37
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
38
|
+
if (stack !== '') {
|
39
|
+
format += '%s';
|
40
|
+
args = args.concat([stack]);
|
41
|
+
}
|
42
|
+
var argsWithFormat = args.map(function(item) {
|
43
|
+
return String(item);
|
44
|
+
});
|
45
|
+
argsWithFormat.unshift('Warning: ' + format);
|
46
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
function scheduleWork(callback) {
|
50
|
+
callback();
|
51
|
+
}
|
52
|
+
function beginWriting(destination) {}
|
53
|
+
var prevWasCommentSegmenter = false;
|
54
|
+
function writeChunk(destination, chunk) {
|
55
|
+
writeChunkAndReturn(destination, chunk);
|
56
|
+
}
|
57
|
+
function writeChunkAndReturn(destination, chunk) {
|
58
|
+
if (prevWasCommentSegmenter) {
|
59
|
+
prevWasCommentSegmenter = false;
|
60
|
+
if (chunk[0] !== '<') {
|
61
|
+
destination.push('<!-- -->');
|
62
|
+
}
|
63
|
+
}
|
64
|
+
if (chunk === '<!-- -->') {
|
65
|
+
prevWasCommentSegmenter = true;
|
66
|
+
return true;
|
67
|
+
}
|
68
|
+
return destination.push(chunk);
|
69
|
+
}
|
70
|
+
function completeWriting(destination) {}
|
71
|
+
function close(destination) {
|
72
|
+
destination.push(null);
|
73
|
+
}
|
74
|
+
function stringToChunk(content) {
|
75
|
+
return content;
|
76
|
+
}
|
77
|
+
function stringToPrecomputedChunk(content) {
|
78
|
+
return content;
|
79
|
+
}
|
80
|
+
function closeWithError(destination, error) {
|
81
|
+
destination.destroy(error);
|
82
|
+
}
|
83
|
+
function typeName(value) {
|
84
|
+
{
|
85
|
+
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
86
|
+
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
87
|
+
return type;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
function willCoercionThrow(value) {
|
91
|
+
{
|
92
|
+
try {
|
93
|
+
testStringCoercion(value);
|
94
|
+
return false;
|
95
|
+
} catch (e) {
|
96
|
+
return true;
|
97
|
+
}
|
98
|
+
}
|
99
|
+
}
|
100
|
+
function testStringCoercion(value) {
|
101
|
+
return '' + value;
|
102
|
+
}
|
103
|
+
function checkAttributeStringCoercion(value, attributeName) {
|
104
|
+
{
|
105
|
+
if (willCoercionThrow(value)) {
|
106
|
+
error('The provided `%s` attribute is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', attributeName, typeName(value));
|
107
|
+
return testStringCoercion(value);
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
111
|
+
function checkCSSPropertyStringCoercion(value, propName) {
|
112
|
+
{
|
113
|
+
if (willCoercionThrow(value)) {
|
114
|
+
error('The provided `%s` CSS property is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', propName, typeName(value));
|
115
|
+
return testStringCoercion(value);
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
function checkHtmlStringCoercion(value) {
|
120
|
+
{
|
121
|
+
if (willCoercionThrow(value)) {
|
122
|
+
error('The provided HTML markup uses a value of unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
123
|
+
return testStringCoercion(value);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
}
|
127
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
128
|
+
var RESERVED = 0;
|
129
|
+
var STRING = 1;
|
130
|
+
var BOOLEANISH_STRING = 2;
|
131
|
+
var BOOLEAN = 3;
|
132
|
+
var OVERLOADED_BOOLEAN = 4;
|
133
|
+
var NUMERIC = 5;
|
134
|
+
var POSITIVE_NUMERIC = 6;
|
135
|
+
var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
|
136
|
+
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
|
137
|
+
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
|
138
|
+
var illegalAttributeNameCache = {};
|
139
|
+
var validatedAttributeNameCache = {};
|
140
|
+
function isAttributeNameSafe(attributeName) {
|
141
|
+
if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
|
142
|
+
return true;
|
143
|
+
}
|
144
|
+
if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
|
145
|
+
return false;
|
146
|
+
}
|
147
|
+
if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
|
148
|
+
validatedAttributeNameCache[attributeName] = true;
|
149
|
+
return true;
|
150
|
+
}
|
151
|
+
illegalAttributeNameCache[attributeName] = true;
|
152
|
+
{
|
153
|
+
error('Invalid attribute name: `%s`', attributeName);
|
154
|
+
}
|
155
|
+
return false;
|
156
|
+
}
|
157
|
+
function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
|
158
|
+
if (propertyInfo !== null && propertyInfo.type === RESERVED) {
|
159
|
+
return false;
|
160
|
+
}
|
161
|
+
switch (typeof value) {
|
162
|
+
case 'function':
|
163
|
+
case 'symbol':
|
164
|
+
return true;
|
165
|
+
case 'boolean':
|
166
|
+
{
|
167
|
+
if (isCustomComponentTag) {
|
168
|
+
return false;
|
169
|
+
}
|
170
|
+
if (propertyInfo !== null) {
|
171
|
+
return !propertyInfo.acceptsBooleans;
|
172
|
+
} else {
|
173
|
+
var prefix = name.toLowerCase().slice(0, 5);
|
174
|
+
return prefix !== 'data-' && prefix !== 'aria-';
|
175
|
+
}
|
176
|
+
}
|
177
|
+
default:
|
178
|
+
return false;
|
179
|
+
}
|
180
|
+
}
|
181
|
+
function getPropertyInfo(name) {
|
182
|
+
return properties.hasOwnProperty(name) ? properties[name] : null;
|
183
|
+
}
|
184
|
+
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
|
185
|
+
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
|
186
|
+
this.attributeName = attributeName;
|
187
|
+
this.attributeNamespace = attributeNamespace;
|
188
|
+
this.mustUseProperty = mustUseProperty;
|
189
|
+
this.propertyName = name;
|
190
|
+
this.type = type;
|
191
|
+
this.sanitizeURL = sanitizeURL;
|
192
|
+
this.removeEmptyString = removeEmptyString;
|
193
|
+
}
|
194
|
+
var properties = {};
|
195
|
+
var reservedProps = ['children', 'dangerouslySetInnerHTML', 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
|
196
|
+
reservedProps.forEach(function(name) {
|
197
|
+
properties[name] = new PropertyInfoRecord(name, RESERVED, false, name, null, false, false);
|
198
|
+
});
|
199
|
+
[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function(_ref) {
|
200
|
+
var name = _ref[0],
|
201
|
+
attributeName = _ref[1];
|
202
|
+
properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false);
|
203
|
+
});
|
204
|
+
['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function(name) {
|
205
|
+
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name.toLowerCase(), null, false, false);
|
206
|
+
});
|
207
|
+
['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function(name) {
|
208
|
+
properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, name, null, false, false);
|
209
|
+
});
|
210
|
+
['allowFullScreen', 'async', 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', 'itemScope'].forEach(function(name) {
|
211
|
+
properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, name.toLowerCase(), null, false, false);
|
212
|
+
});
|
213
|
+
['checked', 'multiple', 'muted', 'selected'].forEach(function(name) {
|
214
|
+
properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, name, null, false, false);
|
215
|
+
});
|
216
|
+
['capture', 'download'].forEach(function(name) {
|
217
|
+
properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, name, null, false, false);
|
218
|
+
});
|
219
|
+
['cols', 'rows', 'size', 'span'].forEach(function(name) {
|
220
|
+
properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, name, null, false, false);
|
221
|
+
});
|
222
|
+
['rowSpan', 'start'].forEach(function(name) {
|
223
|
+
properties[name] = new PropertyInfoRecord(name, NUMERIC, false, name.toLowerCase(), null, false, false);
|
224
|
+
});
|
225
|
+
var CAMELIZE = /[\-\:]([a-z])/g;
|
226
|
+
var capitalize = function(token) {
|
227
|
+
return token[1].toUpperCase();
|
228
|
+
};
|
229
|
+
['accent-height', 'alignment-baseline', 'arabic-form', 'baseline-shift', 'cap-height', 'clip-path', 'clip-rule', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'dominant-baseline', 'enable-background', 'fill-opacity', 'fill-rule', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'glyph-name', 'glyph-orientation-horizontal', 'glyph-orientation-vertical', 'horiz-adv-x', 'horiz-origin-x', 'image-rendering', 'letter-spacing', 'lighting-color', 'marker-end', 'marker-mid', 'marker-start', 'overline-position', 'overline-thickness', 'paint-order', 'panose-1', 'pointer-events', 'rendering-intent', 'shape-rendering', 'stop-color', 'stop-opacity', 'strikethrough-position', 'strikethrough-thickness', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke-width', 'text-anchor', 'text-decoration', 'text-rendering', 'underline-position', 'underline-thickness', 'unicode-bidi', 'unicode-range', 'units-per-em', 'v-alphabetic', 'v-hanging', 'v-ideographic', 'v-mathematical', 'vector-effect', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'word-spacing', 'writing-mode', 'xmlns:xlink', 'x-height'].forEach(function(attributeName) {
|
230
|
+
var name = attributeName.replace(CAMELIZE, capitalize);
|
231
|
+
properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, null, false, false);
|
232
|
+
});
|
233
|
+
['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type'].forEach(function(attributeName) {
|
234
|
+
var name = attributeName.replace(CAMELIZE, capitalize);
|
235
|
+
properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, 'http://www.w3.org/1999/xlink', false, false);
|
236
|
+
});
|
237
|
+
['xml:base', 'xml:lang', 'xml:space'].forEach(function(attributeName) {
|
238
|
+
var name = attributeName.replace(CAMELIZE, capitalize);
|
239
|
+
properties[name] = new PropertyInfoRecord(name, STRING, false, attributeName, 'http://www.w3.org/XML/1998/namespace', false, false);
|
240
|
+
});
|
241
|
+
['tabIndex', 'crossOrigin'].forEach(function(attributeName) {
|
242
|
+
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, false, false);
|
243
|
+
});
|
244
|
+
var xlinkHref = 'xlinkHref';
|
245
|
+
properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, 'xlink:href', 'http://www.w3.org/1999/xlink', true, false);
|
246
|
+
['src', 'href', 'action', 'formAction'].forEach(function(attributeName) {
|
247
|
+
properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, attributeName.toLowerCase(), null, true, true);
|
248
|
+
});
|
249
|
+
var isUnitlessNumber = {
|
250
|
+
animationIterationCount: true,
|
251
|
+
aspectRatio: true,
|
252
|
+
borderImageOutset: true,
|
253
|
+
borderImageSlice: true,
|
254
|
+
borderImageWidth: true,
|
255
|
+
boxFlex: true,
|
256
|
+
boxFlexGroup: true,
|
257
|
+
boxOrdinalGroup: true,
|
258
|
+
columnCount: true,
|
259
|
+
columns: true,
|
260
|
+
flex: true,
|
261
|
+
flexGrow: true,
|
262
|
+
flexPositive: true,
|
263
|
+
flexShrink: true,
|
264
|
+
flexNegative: true,
|
265
|
+
flexOrder: true,
|
266
|
+
gridArea: true,
|
267
|
+
gridRow: true,
|
268
|
+
gridRowEnd: true,
|
269
|
+
gridRowSpan: true,
|
270
|
+
gridRowStart: true,
|
271
|
+
gridColumn: true,
|
272
|
+
gridColumnEnd: true,
|
273
|
+
gridColumnSpan: true,
|
274
|
+
gridColumnStart: true,
|
275
|
+
fontWeight: true,
|
276
|
+
lineClamp: true,
|
277
|
+
lineHeight: true,
|
278
|
+
opacity: true,
|
279
|
+
order: true,
|
280
|
+
orphans: true,
|
281
|
+
tabSize: true,
|
282
|
+
widows: true,
|
283
|
+
zIndex: true,
|
284
|
+
zoom: true,
|
285
|
+
fillOpacity: true,
|
286
|
+
floodOpacity: true,
|
287
|
+
stopOpacity: true,
|
288
|
+
strokeDasharray: true,
|
289
|
+
strokeDashoffset: true,
|
290
|
+
strokeMiterlimit: true,
|
291
|
+
strokeOpacity: true,
|
292
|
+
strokeWidth: true
|
293
|
+
};
|
294
|
+
function prefixKey(prefix, key) {
|
295
|
+
return prefix + key.charAt(0).toUpperCase() + key.substring(1);
|
296
|
+
}
|
297
|
+
var prefixes = ['Webkit', 'ms', 'Moz', 'O'];
|
298
|
+
Object.keys(isUnitlessNumber).forEach(function(prop) {
|
299
|
+
prefixes.forEach(function(prefix) {
|
300
|
+
isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
|
301
|
+
});
|
302
|
+
});
|
303
|
+
var hasReadOnlyValue = {
|
304
|
+
button: true,
|
305
|
+
checkbox: true,
|
306
|
+
image: true,
|
307
|
+
hidden: true,
|
308
|
+
radio: true,
|
309
|
+
reset: true,
|
310
|
+
submit: true
|
311
|
+
};
|
312
|
+
function checkControlledValueProps(tagName, props) {
|
313
|
+
{
|
314
|
+
if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
|
315
|
+
error('You provided a `value` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultValue`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
316
|
+
}
|
317
|
+
if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
|
318
|
+
error('You provided a `checked` prop to a form field without an ' + '`onChange` handler. This will render a read-only field. If ' + 'the field should be mutable use `defaultChecked`. Otherwise, ' + 'set either `onChange` or `readOnly`.');
|
319
|
+
}
|
320
|
+
}
|
321
|
+
}
|
322
|
+
function isCustomComponent(tagName, props) {
|
323
|
+
if (tagName.indexOf('-') === -1) {
|
324
|
+
return typeof props.is === 'string';
|
325
|
+
}
|
326
|
+
switch (tagName) {
|
327
|
+
case 'annotation-xml':
|
328
|
+
case 'color-profile':
|
329
|
+
case 'font-face':
|
330
|
+
case 'font-face-src':
|
331
|
+
case 'font-face-uri':
|
332
|
+
case 'font-face-format':
|
333
|
+
case 'font-face-name':
|
334
|
+
case 'missing-glyph':
|
335
|
+
return false;
|
336
|
+
default:
|
337
|
+
return true;
|
338
|
+
}
|
339
|
+
}
|
340
|
+
var ariaProperties = {
|
341
|
+
'aria-current': 0,
|
342
|
+
'aria-description': 0,
|
343
|
+
'aria-details': 0,
|
344
|
+
'aria-disabled': 0,
|
345
|
+
'aria-hidden': 0,
|
346
|
+
'aria-invalid': 0,
|
347
|
+
'aria-keyshortcuts': 0,
|
348
|
+
'aria-label': 0,
|
349
|
+
'aria-roledescription': 0,
|
350
|
+
'aria-autocomplete': 0,
|
351
|
+
'aria-checked': 0,
|
352
|
+
'aria-expanded': 0,
|
353
|
+
'aria-haspopup': 0,
|
354
|
+
'aria-level': 0,
|
355
|
+
'aria-modal': 0,
|
356
|
+
'aria-multiline': 0,
|
357
|
+
'aria-multiselectable': 0,
|
358
|
+
'aria-orientation': 0,
|
359
|
+
'aria-placeholder': 0,
|
360
|
+
'aria-pressed': 0,
|
361
|
+
'aria-readonly': 0,
|
362
|
+
'aria-required': 0,
|
363
|
+
'aria-selected': 0,
|
364
|
+
'aria-sort': 0,
|
365
|
+
'aria-valuemax': 0,
|
366
|
+
'aria-valuemin': 0,
|
367
|
+
'aria-valuenow': 0,
|
368
|
+
'aria-valuetext': 0,
|
369
|
+
'aria-atomic': 0,
|
370
|
+
'aria-busy': 0,
|
371
|
+
'aria-live': 0,
|
372
|
+
'aria-relevant': 0,
|
373
|
+
'aria-dropeffect': 0,
|
374
|
+
'aria-grabbed': 0,
|
375
|
+
'aria-activedescendant': 0,
|
376
|
+
'aria-colcount': 0,
|
377
|
+
'aria-colindex': 0,
|
378
|
+
'aria-colspan': 0,
|
379
|
+
'aria-controls': 0,
|
380
|
+
'aria-describedby': 0,
|
381
|
+
'aria-errormessage': 0,
|
382
|
+
'aria-flowto': 0,
|
383
|
+
'aria-labelledby': 0,
|
384
|
+
'aria-owns': 0,
|
385
|
+
'aria-posinset': 0,
|
386
|
+
'aria-rowcount': 0,
|
387
|
+
'aria-rowindex': 0,
|
388
|
+
'aria-rowspan': 0,
|
389
|
+
'aria-setsize': 0
|
390
|
+
};
|
391
|
+
var warnedProperties = {};
|
392
|
+
var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
|
393
|
+
var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
|
394
|
+
function validateProperty(tagName, name) {
|
395
|
+
{
|
396
|
+
if (hasOwnProperty.call(warnedProperties, name) && warnedProperties[name]) {
|
397
|
+
return true;
|
398
|
+
}
|
399
|
+
if (rARIACamel.test(name)) {
|
400
|
+
var ariaName = 'aria-' + name.slice(4).toLowerCase();
|
401
|
+
var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null;
|
402
|
+
if (correctName == null) {
|
403
|
+
error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
|
404
|
+
warnedProperties[name] = true;
|
405
|
+
return true;
|
406
|
+
}
|
407
|
+
if (name !== correctName) {
|
408
|
+
error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
|
409
|
+
warnedProperties[name] = true;
|
410
|
+
return true;
|
411
|
+
}
|
412
|
+
}
|
413
|
+
if (rARIA.test(name)) {
|
414
|
+
var lowerCasedName = name.toLowerCase();
|
415
|
+
var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null;
|
416
|
+
if (standardName == null) {
|
417
|
+
warnedProperties[name] = true;
|
418
|
+
return false;
|
419
|
+
}
|
420
|
+
if (name !== standardName) {
|
421
|
+
error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
|
422
|
+
warnedProperties[name] = true;
|
423
|
+
return true;
|
424
|
+
}
|
425
|
+
}
|
426
|
+
}
|
427
|
+
return true;
|
428
|
+
}
|
429
|
+
function warnInvalidARIAProps(type, props) {
|
430
|
+
{
|
431
|
+
var invalidProps = [];
|
432
|
+
for (var key in props) {
|
433
|
+
var isValid = validateProperty(type, key);
|
434
|
+
if (!isValid) {
|
435
|
+
invalidProps.push(key);
|
436
|
+
}
|
437
|
+
}
|
438
|
+
var unknownPropString = invalidProps.map(function(prop) {
|
439
|
+
return '`' + prop + '`';
|
440
|
+
}).join(', ');
|
441
|
+
if (invalidProps.length === 1) {
|
442
|
+
error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
|
443
|
+
} else if (invalidProps.length > 1) {
|
444
|
+
error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
|
445
|
+
}
|
446
|
+
}
|
447
|
+
}
|
448
|
+
function validateProperties(type, props) {
|
449
|
+
if (isCustomComponent(type, props)) {
|
450
|
+
return;
|
451
|
+
}
|
452
|
+
warnInvalidARIAProps(type, props);
|
453
|
+
}
|
454
|
+
var didWarnValueNull = false;
|
455
|
+
function validateProperties$1(type, props) {
|
456
|
+
{
|
457
|
+
if (type !== 'input' && type !== 'textarea' && type !== 'select') {
|
458
|
+
return;
|
459
|
+
}
|
460
|
+
if (props != null && props.value === null && !didWarnValueNull) {
|
461
|
+
didWarnValueNull = true;
|
462
|
+
if (type === 'select' && props.multiple) {
|
463
|
+
error('`value` prop on `%s` should not be null. ' + 'Consider using an empty array when `multiple` is set to `true` ' + 'to clear the component or `undefined` for uncontrolled components.', type);
|
464
|
+
} else {
|
465
|
+
error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
|
466
|
+
}
|
467
|
+
}
|
468
|
+
}
|
469
|
+
}
|
470
|
+
var possibleStandardNames = {
|
471
|
+
accept: 'accept',
|
472
|
+
acceptcharset: 'acceptCharset',
|
473
|
+
'accept-charset': 'acceptCharset',
|
474
|
+
accesskey: 'accessKey',
|
475
|
+
action: 'action',
|
476
|
+
allowfullscreen: 'allowFullScreen',
|
477
|
+
alt: 'alt',
|
478
|
+
as: 'as',
|
479
|
+
async: 'async',
|
480
|
+
autocapitalize: 'autoCapitalize',
|
481
|
+
autocomplete: 'autoComplete',
|
482
|
+
autocorrect: 'autoCorrect',
|
483
|
+
autofocus: 'autoFocus',
|
484
|
+
autoplay: 'autoPlay',
|
485
|
+
autosave: 'autoSave',
|
486
|
+
capture: 'capture',
|
487
|
+
cellpadding: 'cellPadding',
|
488
|
+
cellspacing: 'cellSpacing',
|
489
|
+
challenge: 'challenge',
|
490
|
+
charset: 'charSet',
|
491
|
+
checked: 'checked',
|
492
|
+
children: 'children',
|
493
|
+
cite: 'cite',
|
494
|
+
class: 'className',
|
495
|
+
classid: 'classID',
|
496
|
+
classname: 'className',
|
497
|
+
cols: 'cols',
|
498
|
+
colspan: 'colSpan',
|
499
|
+
content: 'content',
|
500
|
+
contenteditable: 'contentEditable',
|
501
|
+
contextmenu: 'contextMenu',
|
502
|
+
controls: 'controls',
|
503
|
+
controlslist: 'controlsList',
|
504
|
+
coords: 'coords',
|
505
|
+
crossorigin: 'crossOrigin',
|
506
|
+
dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
|
507
|
+
data: 'data',
|
508
|
+
datetime: 'dateTime',
|
509
|
+
default: 'default',
|
510
|
+
defaultchecked: 'defaultChecked',
|
511
|
+
defaultvalue: 'defaultValue',
|
512
|
+
defer: 'defer',
|
513
|
+
dir: 'dir',
|
514
|
+
disabled: 'disabled',
|
515
|
+
disablepictureinpicture: 'disablePictureInPicture',
|
516
|
+
disableremoteplayback: 'disableRemotePlayback',
|
517
|
+
download: 'download',
|
518
|
+
draggable: 'draggable',
|
519
|
+
enctype: 'encType',
|
520
|
+
enterkeyhint: 'enterKeyHint',
|
521
|
+
for: 'htmlFor',
|
522
|
+
form: 'form',
|
523
|
+
formmethod: 'formMethod',
|
524
|
+
formaction: 'formAction',
|
525
|
+
formenctype: 'formEncType',
|
526
|
+
formnovalidate: 'formNoValidate',
|
527
|
+
formtarget: 'formTarget',
|
528
|
+
frameborder: 'frameBorder',
|
529
|
+
headers: 'headers',
|
530
|
+
height: 'height',
|
531
|
+
hidden: 'hidden',
|
532
|
+
high: 'high',
|
533
|
+
href: 'href',
|
534
|
+
hreflang: 'hrefLang',
|
535
|
+
htmlfor: 'htmlFor',
|
536
|
+
httpequiv: 'httpEquiv',
|
537
|
+
'http-equiv': 'httpEquiv',
|
538
|
+
icon: 'icon',
|
539
|
+
id: 'id',
|
540
|
+
imagesizes: 'imageSizes',
|
541
|
+
imagesrcset: 'imageSrcSet',
|
542
|
+
innerhtml: 'innerHTML',
|
543
|
+
inputmode: 'inputMode',
|
544
|
+
integrity: 'integrity',
|
545
|
+
is: 'is',
|
546
|
+
itemid: 'itemID',
|
547
|
+
itemprop: 'itemProp',
|
548
|
+
itemref: 'itemRef',
|
549
|
+
itemscope: 'itemScope',
|
550
|
+
itemtype: 'itemType',
|
551
|
+
keyparams: 'keyParams',
|
552
|
+
keytype: 'keyType',
|
553
|
+
kind: 'kind',
|
554
|
+
label: 'label',
|
555
|
+
lang: 'lang',
|
556
|
+
list: 'list',
|
557
|
+
loop: 'loop',
|
558
|
+
low: 'low',
|
559
|
+
manifest: 'manifest',
|
560
|
+
marginwidth: 'marginWidth',
|
561
|
+
marginheight: 'marginHeight',
|
562
|
+
max: 'max',
|
563
|
+
maxlength: 'maxLength',
|
564
|
+
media: 'media',
|
565
|
+
mediagroup: 'mediaGroup',
|
566
|
+
method: 'method',
|
567
|
+
min: 'min',
|
568
|
+
minlength: 'minLength',
|
569
|
+
multiple: 'multiple',
|
570
|
+
muted: 'muted',
|
571
|
+
name: 'name',
|
572
|
+
nomodule: 'noModule',
|
573
|
+
nonce: 'nonce',
|
574
|
+
novalidate: 'noValidate',
|
575
|
+
open: 'open',
|
576
|
+
optimum: 'optimum',
|
577
|
+
pattern: 'pattern',
|
578
|
+
placeholder: 'placeholder',
|
579
|
+
playsinline: 'playsInline',
|
580
|
+
poster: 'poster',
|
581
|
+
preload: 'preload',
|
582
|
+
profile: 'profile',
|
583
|
+
radiogroup: 'radioGroup',
|
584
|
+
readonly: 'readOnly',
|
585
|
+
referrerpolicy: 'referrerPolicy',
|
586
|
+
rel: 'rel',
|
587
|
+
required: 'required',
|
588
|
+
reversed: 'reversed',
|
589
|
+
role: 'role',
|
590
|
+
rows: 'rows',
|
591
|
+
rowspan: 'rowSpan',
|
592
|
+
sandbox: 'sandbox',
|
593
|
+
scope: 'scope',
|
594
|
+
scoped: 'scoped',
|
595
|
+
scrolling: 'scrolling',
|
596
|
+
seamless: 'seamless',
|
597
|
+
selected: 'selected',
|
598
|
+
shape: 'shape',
|
599
|
+
size: 'size',
|
600
|
+
sizes: 'sizes',
|
601
|
+
span: 'span',
|
602
|
+
spellcheck: 'spellCheck',
|
603
|
+
src: 'src',
|
604
|
+
srcdoc: 'srcDoc',
|
605
|
+
srclang: 'srcLang',
|
606
|
+
srcset: 'srcSet',
|
607
|
+
start: 'start',
|
608
|
+
step: 'step',
|
609
|
+
style: 'style',
|
610
|
+
summary: 'summary',
|
611
|
+
tabindex: 'tabIndex',
|
612
|
+
target: 'target',
|
613
|
+
title: 'title',
|
614
|
+
type: 'type',
|
615
|
+
usemap: 'useMap',
|
616
|
+
value: 'value',
|
617
|
+
width: 'width',
|
618
|
+
wmode: 'wmode',
|
619
|
+
wrap: 'wrap',
|
620
|
+
about: 'about',
|
621
|
+
accentheight: 'accentHeight',
|
622
|
+
'accent-height': 'accentHeight',
|
623
|
+
accumulate: 'accumulate',
|
624
|
+
additive: 'additive',
|
625
|
+
alignmentbaseline: 'alignmentBaseline',
|
626
|
+
'alignment-baseline': 'alignmentBaseline',
|
627
|
+
allowreorder: 'allowReorder',
|
628
|
+
alphabetic: 'alphabetic',
|
629
|
+
amplitude: 'amplitude',
|
630
|
+
arabicform: 'arabicForm',
|
631
|
+
'arabic-form': 'arabicForm',
|
632
|
+
ascent: 'ascent',
|
633
|
+
attributename: 'attributeName',
|
634
|
+
attributetype: 'attributeType',
|
635
|
+
autoreverse: 'autoReverse',
|
636
|
+
azimuth: 'azimuth',
|
637
|
+
basefrequency: 'baseFrequency',
|
638
|
+
baselineshift: 'baselineShift',
|
639
|
+
'baseline-shift': 'baselineShift',
|
640
|
+
baseprofile: 'baseProfile',
|
641
|
+
bbox: 'bbox',
|
642
|
+
begin: 'begin',
|
643
|
+
bias: 'bias',
|
644
|
+
by: 'by',
|
645
|
+
calcmode: 'calcMode',
|
646
|
+
capheight: 'capHeight',
|
647
|
+
'cap-height': 'capHeight',
|
648
|
+
clip: 'clip',
|
649
|
+
clippath: 'clipPath',
|
650
|
+
'clip-path': 'clipPath',
|
651
|
+
clippathunits: 'clipPathUnits',
|
652
|
+
cliprule: 'clipRule',
|
653
|
+
'clip-rule': 'clipRule',
|
654
|
+
color: 'color',
|
655
|
+
colorinterpolation: 'colorInterpolation',
|
656
|
+
'color-interpolation': 'colorInterpolation',
|
657
|
+
colorinterpolationfilters: 'colorInterpolationFilters',
|
658
|
+
'color-interpolation-filters': 'colorInterpolationFilters',
|
659
|
+
colorprofile: 'colorProfile',
|
660
|
+
'color-profile': 'colorProfile',
|
661
|
+
colorrendering: 'colorRendering',
|
662
|
+
'color-rendering': 'colorRendering',
|
663
|
+
contentscripttype: 'contentScriptType',
|
664
|
+
contentstyletype: 'contentStyleType',
|
665
|
+
cursor: 'cursor',
|
666
|
+
cx: 'cx',
|
667
|
+
cy: 'cy',
|
668
|
+
d: 'd',
|
669
|
+
datatype: 'datatype',
|
670
|
+
decelerate: 'decelerate',
|
671
|
+
descent: 'descent',
|
672
|
+
diffuseconstant: 'diffuseConstant',
|
673
|
+
direction: 'direction',
|
674
|
+
display: 'display',
|
675
|
+
divisor: 'divisor',
|
676
|
+
dominantbaseline: 'dominantBaseline',
|
677
|
+
'dominant-baseline': 'dominantBaseline',
|
678
|
+
dur: 'dur',
|
679
|
+
dx: 'dx',
|
680
|
+
dy: 'dy',
|
681
|
+
edgemode: 'edgeMode',
|
682
|
+
elevation: 'elevation',
|
683
|
+
enablebackground: 'enableBackground',
|
684
|
+
'enable-background': 'enableBackground',
|
685
|
+
end: 'end',
|
686
|
+
exponent: 'exponent',
|
687
|
+
externalresourcesrequired: 'externalResourcesRequired',
|
688
|
+
fill: 'fill',
|
689
|
+
fillopacity: 'fillOpacity',
|
690
|
+
'fill-opacity': 'fillOpacity',
|
691
|
+
fillrule: 'fillRule',
|
692
|
+
'fill-rule': 'fillRule',
|
693
|
+
filter: 'filter',
|
694
|
+
filterres: 'filterRes',
|
695
|
+
filterunits: 'filterUnits',
|
696
|
+
floodopacity: 'floodOpacity',
|
697
|
+
'flood-opacity': 'floodOpacity',
|
698
|
+
floodcolor: 'floodColor',
|
699
|
+
'flood-color': 'floodColor',
|
700
|
+
focusable: 'focusable',
|
701
|
+
fontfamily: 'fontFamily',
|
702
|
+
'font-family': 'fontFamily',
|
703
|
+
fontsize: 'fontSize',
|
704
|
+
'font-size': 'fontSize',
|
705
|
+
fontsizeadjust: 'fontSizeAdjust',
|
706
|
+
'font-size-adjust': 'fontSizeAdjust',
|
707
|
+
fontstretch: 'fontStretch',
|
708
|
+
'font-stretch': 'fontStretch',
|
709
|
+
fontstyle: 'fontStyle',
|
710
|
+
'font-style': 'fontStyle',
|
711
|
+
fontvariant: 'fontVariant',
|
712
|
+
'font-variant': 'fontVariant',
|
713
|
+
fontweight: 'fontWeight',
|
714
|
+
'font-weight': 'fontWeight',
|
715
|
+
format: 'format',
|
716
|
+
from: 'from',
|
717
|
+
fx: 'fx',
|
718
|
+
fy: 'fy',
|
719
|
+
g1: 'g1',
|
720
|
+
g2: 'g2',
|
721
|
+
glyphname: 'glyphName',
|
722
|
+
'glyph-name': 'glyphName',
|
723
|
+
glyphorientationhorizontal: 'glyphOrientationHorizontal',
|
724
|
+
'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
|
725
|
+
glyphorientationvertical: 'glyphOrientationVertical',
|
726
|
+
'glyph-orientation-vertical': 'glyphOrientationVertical',
|
727
|
+
glyphref: 'glyphRef',
|
728
|
+
gradienttransform: 'gradientTransform',
|
729
|
+
gradientunits: 'gradientUnits',
|
730
|
+
hanging: 'hanging',
|
731
|
+
horizadvx: 'horizAdvX',
|
732
|
+
'horiz-adv-x': 'horizAdvX',
|
733
|
+
horizoriginx: 'horizOriginX',
|
734
|
+
'horiz-origin-x': 'horizOriginX',
|
735
|
+
ideographic: 'ideographic',
|
736
|
+
imagerendering: 'imageRendering',
|
737
|
+
'image-rendering': 'imageRendering',
|
738
|
+
in2: 'in2',
|
739
|
+
in: 'in',
|
740
|
+
inlist: 'inlist',
|
741
|
+
intercept: 'intercept',
|
742
|
+
k1: 'k1',
|
743
|
+
k2: 'k2',
|
744
|
+
k3: 'k3',
|
745
|
+
k4: 'k4',
|
746
|
+
k: 'k',
|
747
|
+
kernelmatrix: 'kernelMatrix',
|
748
|
+
kernelunitlength: 'kernelUnitLength',
|
749
|
+
kerning: 'kerning',
|
750
|
+
keypoints: 'keyPoints',
|
751
|
+
keysplines: 'keySplines',
|
752
|
+
keytimes: 'keyTimes',
|
753
|
+
lengthadjust: 'lengthAdjust',
|
754
|
+
letterspacing: 'letterSpacing',
|
755
|
+
'letter-spacing': 'letterSpacing',
|
756
|
+
lightingcolor: 'lightingColor',
|
757
|
+
'lighting-color': 'lightingColor',
|
758
|
+
limitingconeangle: 'limitingConeAngle',
|
759
|
+
local: 'local',
|
760
|
+
markerend: 'markerEnd',
|
761
|
+
'marker-end': 'markerEnd',
|
762
|
+
markerheight: 'markerHeight',
|
763
|
+
markermid: 'markerMid',
|
764
|
+
'marker-mid': 'markerMid',
|
765
|
+
markerstart: 'markerStart',
|
766
|
+
'marker-start': 'markerStart',
|
767
|
+
markerunits: 'markerUnits',
|
768
|
+
markerwidth: 'markerWidth',
|
769
|
+
mask: 'mask',
|
770
|
+
maskcontentunits: 'maskContentUnits',
|
771
|
+
maskunits: 'maskUnits',
|
772
|
+
mathematical: 'mathematical',
|
773
|
+
mode: 'mode',
|
774
|
+
numoctaves: 'numOctaves',
|
775
|
+
offset: 'offset',
|
776
|
+
opacity: 'opacity',
|
777
|
+
operator: 'operator',
|
778
|
+
order: 'order',
|
779
|
+
orient: 'orient',
|
780
|
+
orientation: 'orientation',
|
781
|
+
origin: 'origin',
|
782
|
+
overflow: 'overflow',
|
783
|
+
overlineposition: 'overlinePosition',
|
784
|
+
'overline-position': 'overlinePosition',
|
785
|
+
overlinethickness: 'overlineThickness',
|
786
|
+
'overline-thickness': 'overlineThickness',
|
787
|
+
paintorder: 'paintOrder',
|
788
|
+
'paint-order': 'paintOrder',
|
789
|
+
panose1: 'panose1',
|
790
|
+
'panose-1': 'panose1',
|
791
|
+
pathlength: 'pathLength',
|
792
|
+
patterncontentunits: 'patternContentUnits',
|
793
|
+
patterntransform: 'patternTransform',
|
794
|
+
patternunits: 'patternUnits',
|
795
|
+
pointerevents: 'pointerEvents',
|
796
|
+
'pointer-events': 'pointerEvents',
|
797
|
+
points: 'points',
|
798
|
+
pointsatx: 'pointsAtX',
|
799
|
+
pointsaty: 'pointsAtY',
|
800
|
+
pointsatz: 'pointsAtZ',
|
801
|
+
prefix: 'prefix',
|
802
|
+
preservealpha: 'preserveAlpha',
|
803
|
+
preserveaspectratio: 'preserveAspectRatio',
|
804
|
+
primitiveunits: 'primitiveUnits',
|
805
|
+
property: 'property',
|
806
|
+
r: 'r',
|
807
|
+
radius: 'radius',
|
808
|
+
refx: 'refX',
|
809
|
+
refy: 'refY',
|
810
|
+
renderingintent: 'renderingIntent',
|
811
|
+
'rendering-intent': 'renderingIntent',
|
812
|
+
repeatcount: 'repeatCount',
|
813
|
+
repeatdur: 'repeatDur',
|
814
|
+
requiredextensions: 'requiredExtensions',
|
815
|
+
requiredfeatures: 'requiredFeatures',
|
816
|
+
resource: 'resource',
|
817
|
+
restart: 'restart',
|
818
|
+
result: 'result',
|
819
|
+
results: 'results',
|
820
|
+
rotate: 'rotate',
|
821
|
+
rx: 'rx',
|
822
|
+
ry: 'ry',
|
823
|
+
scale: 'scale',
|
824
|
+
security: 'security',
|
825
|
+
seed: 'seed',
|
826
|
+
shaperendering: 'shapeRendering',
|
827
|
+
'shape-rendering': 'shapeRendering',
|
828
|
+
slope: 'slope',
|
829
|
+
spacing: 'spacing',
|
830
|
+
specularconstant: 'specularConstant',
|
831
|
+
specularexponent: 'specularExponent',
|
832
|
+
speed: 'speed',
|
833
|
+
spreadmethod: 'spreadMethod',
|
834
|
+
startoffset: 'startOffset',
|
835
|
+
stddeviation: 'stdDeviation',
|
836
|
+
stemh: 'stemh',
|
837
|
+
stemv: 'stemv',
|
838
|
+
stitchtiles: 'stitchTiles',
|
839
|
+
stopcolor: 'stopColor',
|
840
|
+
'stop-color': 'stopColor',
|
841
|
+
stopopacity: 'stopOpacity',
|
842
|
+
'stop-opacity': 'stopOpacity',
|
843
|
+
strikethroughposition: 'strikethroughPosition',
|
844
|
+
'strikethrough-position': 'strikethroughPosition',
|
845
|
+
strikethroughthickness: 'strikethroughThickness',
|
846
|
+
'strikethrough-thickness': 'strikethroughThickness',
|
847
|
+
string: 'string',
|
848
|
+
stroke: 'stroke',
|
849
|
+
strokedasharray: 'strokeDasharray',
|
850
|
+
'stroke-dasharray': 'strokeDasharray',
|
851
|
+
strokedashoffset: 'strokeDashoffset',
|
852
|
+
'stroke-dashoffset': 'strokeDashoffset',
|
853
|
+
strokelinecap: 'strokeLinecap',
|
854
|
+
'stroke-linecap': 'strokeLinecap',
|
855
|
+
strokelinejoin: 'strokeLinejoin',
|
856
|
+
'stroke-linejoin': 'strokeLinejoin',
|
857
|
+
strokemiterlimit: 'strokeMiterlimit',
|
858
|
+
'stroke-miterlimit': 'strokeMiterlimit',
|
859
|
+
strokewidth: 'strokeWidth',
|
860
|
+
'stroke-width': 'strokeWidth',
|
861
|
+
strokeopacity: 'strokeOpacity',
|
862
|
+
'stroke-opacity': 'strokeOpacity',
|
863
|
+
suppresscontenteditablewarning: 'suppressContentEditableWarning',
|
864
|
+
suppresshydrationwarning: 'suppressHydrationWarning',
|
865
|
+
surfacescale: 'surfaceScale',
|
866
|
+
systemlanguage: 'systemLanguage',
|
867
|
+
tablevalues: 'tableValues',
|
868
|
+
targetx: 'targetX',
|
869
|
+
targety: 'targetY',
|
870
|
+
textanchor: 'textAnchor',
|
871
|
+
'text-anchor': 'textAnchor',
|
872
|
+
textdecoration: 'textDecoration',
|
873
|
+
'text-decoration': 'textDecoration',
|
874
|
+
textlength: 'textLength',
|
875
|
+
textrendering: 'textRendering',
|
876
|
+
'text-rendering': 'textRendering',
|
877
|
+
to: 'to',
|
878
|
+
transform: 'transform',
|
879
|
+
typeof: 'typeof',
|
880
|
+
u1: 'u1',
|
881
|
+
u2: 'u2',
|
882
|
+
underlineposition: 'underlinePosition',
|
883
|
+
'underline-position': 'underlinePosition',
|
884
|
+
underlinethickness: 'underlineThickness',
|
885
|
+
'underline-thickness': 'underlineThickness',
|
886
|
+
unicode: 'unicode',
|
887
|
+
unicodebidi: 'unicodeBidi',
|
888
|
+
'unicode-bidi': 'unicodeBidi',
|
889
|
+
unicoderange: 'unicodeRange',
|
890
|
+
'unicode-range': 'unicodeRange',
|
891
|
+
unitsperem: 'unitsPerEm',
|
892
|
+
'units-per-em': 'unitsPerEm',
|
893
|
+
unselectable: 'unselectable',
|
894
|
+
valphabetic: 'vAlphabetic',
|
895
|
+
'v-alphabetic': 'vAlphabetic',
|
896
|
+
values: 'values',
|
897
|
+
vectoreffect: 'vectorEffect',
|
898
|
+
'vector-effect': 'vectorEffect',
|
899
|
+
version: 'version',
|
900
|
+
vertadvy: 'vertAdvY',
|
901
|
+
'vert-adv-y': 'vertAdvY',
|
902
|
+
vertoriginx: 'vertOriginX',
|
903
|
+
'vert-origin-x': 'vertOriginX',
|
904
|
+
vertoriginy: 'vertOriginY',
|
905
|
+
'vert-origin-y': 'vertOriginY',
|
906
|
+
vhanging: 'vHanging',
|
907
|
+
'v-hanging': 'vHanging',
|
908
|
+
videographic: 'vIdeographic',
|
909
|
+
'v-ideographic': 'vIdeographic',
|
910
|
+
viewbox: 'viewBox',
|
911
|
+
viewtarget: 'viewTarget',
|
912
|
+
visibility: 'visibility',
|
913
|
+
vmathematical: 'vMathematical',
|
914
|
+
'v-mathematical': 'vMathematical',
|
915
|
+
vocab: 'vocab',
|
916
|
+
widths: 'widths',
|
917
|
+
wordspacing: 'wordSpacing',
|
918
|
+
'word-spacing': 'wordSpacing',
|
919
|
+
writingmode: 'writingMode',
|
920
|
+
'writing-mode': 'writingMode',
|
921
|
+
x1: 'x1',
|
922
|
+
x2: 'x2',
|
923
|
+
x: 'x',
|
924
|
+
xchannelselector: 'xChannelSelector',
|
925
|
+
xheight: 'xHeight',
|
926
|
+
'x-height': 'xHeight',
|
927
|
+
xlinkactuate: 'xlinkActuate',
|
928
|
+
'xlink:actuate': 'xlinkActuate',
|
929
|
+
xlinkarcrole: 'xlinkArcrole',
|
930
|
+
'xlink:arcrole': 'xlinkArcrole',
|
931
|
+
xlinkhref: 'xlinkHref',
|
932
|
+
'xlink:href': 'xlinkHref',
|
933
|
+
xlinkrole: 'xlinkRole',
|
934
|
+
'xlink:role': 'xlinkRole',
|
935
|
+
xlinkshow: 'xlinkShow',
|
936
|
+
'xlink:show': 'xlinkShow',
|
937
|
+
xlinktitle: 'xlinkTitle',
|
938
|
+
'xlink:title': 'xlinkTitle',
|
939
|
+
xlinktype: 'xlinkType',
|
940
|
+
'xlink:type': 'xlinkType',
|
941
|
+
xmlbase: 'xmlBase',
|
942
|
+
'xml:base': 'xmlBase',
|
943
|
+
xmllang: 'xmlLang',
|
944
|
+
'xml:lang': 'xmlLang',
|
945
|
+
xmlns: 'xmlns',
|
946
|
+
'xml:space': 'xmlSpace',
|
947
|
+
xmlnsxlink: 'xmlnsXlink',
|
948
|
+
'xmlns:xlink': 'xmlnsXlink',
|
949
|
+
xmlspace: 'xmlSpace',
|
950
|
+
y1: 'y1',
|
951
|
+
y2: 'y2',
|
952
|
+
y: 'y',
|
953
|
+
ychannelselector: 'yChannelSelector',
|
954
|
+
z: 'z',
|
955
|
+
zoomandpan: 'zoomAndPan'
|
956
|
+
};
|
957
|
+
var validateProperty$1 = function() {};
|
958
|
+
{
|
959
|
+
var warnedProperties$1 = {};
|
960
|
+
var EVENT_NAME_REGEX = /^on./;
|
961
|
+
var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
|
962
|
+
var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
|
963
|
+
var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
|
964
|
+
validateProperty$1 = function(tagName, name, value, eventRegistry) {
|
965
|
+
if (hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
|
966
|
+
return true;
|
967
|
+
}
|
968
|
+
var lowerCasedName = name.toLowerCase();
|
969
|
+
if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
|
970
|
+
error('React uses onFocus and onBlur instead of onFocusIn and onFocusOut. ' + 'All React events are normalized to bubble, so onFocusIn and onFocusOut ' + 'are not needed/supported by React.');
|
971
|
+
warnedProperties$1[name] = true;
|
972
|
+
return true;
|
973
|
+
}
|
974
|
+
if (eventRegistry != null) {
|
975
|
+
var registrationNameDependencies = eventRegistry.registrationNameDependencies,
|
976
|
+
possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
|
977
|
+
if (registrationNameDependencies.hasOwnProperty(name)) {
|
978
|
+
return true;
|
979
|
+
}
|
980
|
+
var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
|
981
|
+
if (registrationName != null) {
|
982
|
+
error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
|
983
|
+
warnedProperties$1[name] = true;
|
984
|
+
return true;
|
985
|
+
}
|
986
|
+
if (EVENT_NAME_REGEX.test(name)) {
|
987
|
+
error('Unknown event handler property `%s`. It will be ignored.', name);
|
988
|
+
warnedProperties$1[name] = true;
|
989
|
+
return true;
|
990
|
+
}
|
991
|
+
} else if (EVENT_NAME_REGEX.test(name)) {
|
992
|
+
if (INVALID_EVENT_NAME_REGEX.test(name)) {
|
993
|
+
error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
|
994
|
+
}
|
995
|
+
warnedProperties$1[name] = true;
|
996
|
+
return true;
|
997
|
+
}
|
998
|
+
if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
|
999
|
+
return true;
|
1000
|
+
}
|
1001
|
+
if (lowerCasedName === 'innerhtml') {
|
1002
|
+
error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
|
1003
|
+
warnedProperties$1[name] = true;
|
1004
|
+
return true;
|
1005
|
+
}
|
1006
|
+
if (lowerCasedName === 'aria') {
|
1007
|
+
error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
|
1008
|
+
warnedProperties$1[name] = true;
|
1009
|
+
return true;
|
1010
|
+
}
|
1011
|
+
if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
|
1012
|
+
error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
|
1013
|
+
warnedProperties$1[name] = true;
|
1014
|
+
return true;
|
1015
|
+
}
|
1016
|
+
if (typeof value === 'number' && isNaN(value)) {
|
1017
|
+
error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
|
1018
|
+
warnedProperties$1[name] = true;
|
1019
|
+
return true;
|
1020
|
+
}
|
1021
|
+
var propertyInfo = getPropertyInfo(name);
|
1022
|
+
var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED;
|
1023
|
+
if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
|
1024
|
+
var standardName = possibleStandardNames[lowerCasedName];
|
1025
|
+
if (standardName !== name) {
|
1026
|
+
error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
|
1027
|
+
warnedProperties$1[name] = true;
|
1028
|
+
return true;
|
1029
|
+
}
|
1030
|
+
} else if (!isReserved && name !== lowerCasedName) {
|
1031
|
+
error('React does not recognize the `%s` prop on a DOM element. If you ' + 'intentionally want it to appear in the DOM as a custom ' + 'attribute, spell it as lowercase `%s` instead. ' + 'If you accidentally passed it from a parent component, remove ' + 'it from the DOM element.', name, lowerCasedName);
|
1032
|
+
warnedProperties$1[name] = true;
|
1033
|
+
return true;
|
1034
|
+
}
|
1035
|
+
if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
|
1036
|
+
if (value) {
|
1037
|
+
error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.', value, name, name, value, name);
|
1038
|
+
} else {
|
1039
|
+
error('Received `%s` for a non-boolean attribute `%s`.\n\n' + 'If you want to write it to the DOM, pass a string instead: ' + '%s="%s" or %s={value.toString()}.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
|
1040
|
+
}
|
1041
|
+
warnedProperties$1[name] = true;
|
1042
|
+
return true;
|
1043
|
+
}
|
1044
|
+
if (isReserved) {
|
1045
|
+
return true;
|
1046
|
+
}
|
1047
|
+
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
|
1048
|
+
warnedProperties$1[name] = true;
|
1049
|
+
return false;
|
1050
|
+
}
|
1051
|
+
if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
|
1052
|
+
error('Received the string `%s` for the boolean attribute `%s`. ' + '%s ' + 'Did you mean %s={%s}?', value, name, value === 'false' ? 'The browser will interpret it as a truthy value.' : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
|
1053
|
+
warnedProperties$1[name] = true;
|
1054
|
+
return true;
|
1055
|
+
}
|
1056
|
+
return true;
|
1057
|
+
};
|
1058
|
+
}
|
1059
|
+
var warnUnknownProperties = function(type, props, eventRegistry) {
|
1060
|
+
{
|
1061
|
+
var unknownProps = [];
|
1062
|
+
for (var key in props) {
|
1063
|
+
var isValid = validateProperty$1(type, key, props[key], eventRegistry);
|
1064
|
+
if (!isValid) {
|
1065
|
+
unknownProps.push(key);
|
1066
|
+
}
|
1067
|
+
}
|
1068
|
+
var unknownPropString = unknownProps.map(function(prop) {
|
1069
|
+
return '`' + prop + '`';
|
1070
|
+
}).join(', ');
|
1071
|
+
if (unknownProps.length === 1) {
|
1072
|
+
error('Invalid value for prop %s on <%s> tag. Either remove it from the element, ' + 'or pass a string or number value to keep it in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
|
1073
|
+
} else if (unknownProps.length > 1) {
|
1074
|
+
error('Invalid values for props %s on <%s> tag. Either remove them from the element, ' + 'or pass a string or number value to keep them in the DOM. ' + 'For details, see https://reactjs.org/link/attribute-behavior ', unknownPropString, type);
|
1075
|
+
}
|
1076
|
+
}
|
1077
|
+
};
|
1078
|
+
function validateProperties$2(type, props, eventRegistry) {
|
1079
|
+
if (isCustomComponent(type, props)) {
|
1080
|
+
return;
|
1081
|
+
}
|
1082
|
+
warnUnknownProperties(type, props, eventRegistry);
|
1083
|
+
}
|
1084
|
+
var warnValidStyle = function() {};
|
1085
|
+
{
|
1086
|
+
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
|
1087
|
+
var msPattern = /^-ms-/;
|
1088
|
+
var hyphenPattern = /-(.)/g;
|
1089
|
+
var badStyleValueWithSemicolonPattern = /;\s*$/;
|
1090
|
+
var warnedStyleNames = {};
|
1091
|
+
var warnedStyleValues = {};
|
1092
|
+
var warnedForNaNValue = false;
|
1093
|
+
var warnedForInfinityValue = false;
|
1094
|
+
var camelize = function(string) {
|
1095
|
+
return string.replace(hyphenPattern, function(_, character) {
|
1096
|
+
return character.toUpperCase();
|
1097
|
+
});
|
1098
|
+
};
|
1099
|
+
var warnHyphenatedStyleName = function(name) {
|
1100
|
+
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
1101
|
+
return;
|
1102
|
+
}
|
1103
|
+
warnedStyleNames[name] = true;
|
1104
|
+
error('Unsupported style property %s. Did you mean %s?', name, camelize(name.replace(msPattern, 'ms-')));
|
1105
|
+
};
|
1106
|
+
var warnBadVendoredStyleName = function(name) {
|
1107
|
+
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
|
1108
|
+
return;
|
1109
|
+
}
|
1110
|
+
warnedStyleNames[name] = true;
|
1111
|
+
error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
|
1112
|
+
};
|
1113
|
+
var warnStyleValueWithSemicolon = function(name, value) {
|
1114
|
+
if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
|
1115
|
+
return;
|
1116
|
+
}
|
1117
|
+
warnedStyleValues[value] = true;
|
1118
|
+
error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
|
1119
|
+
};
|
1120
|
+
var warnStyleValueIsNaN = function(name, value) {
|
1121
|
+
if (warnedForNaNValue) {
|
1122
|
+
return;
|
1123
|
+
}
|
1124
|
+
warnedForNaNValue = true;
|
1125
|
+
error('`NaN` is an invalid value for the `%s` css style property.', name);
|
1126
|
+
};
|
1127
|
+
var warnStyleValueIsInfinity = function(name, value) {
|
1128
|
+
if (warnedForInfinityValue) {
|
1129
|
+
return;
|
1130
|
+
}
|
1131
|
+
warnedForInfinityValue = true;
|
1132
|
+
error('`Infinity` is an invalid value for the `%s` css style property.', name);
|
1133
|
+
};
|
1134
|
+
warnValidStyle = function(name, value) {
|
1135
|
+
if (name.indexOf('-') > -1) {
|
1136
|
+
warnHyphenatedStyleName(name);
|
1137
|
+
} else if (badVendoredStyleNamePattern.test(name)) {
|
1138
|
+
warnBadVendoredStyleName(name);
|
1139
|
+
} else if (badStyleValueWithSemicolonPattern.test(value)) {
|
1140
|
+
warnStyleValueWithSemicolon(name, value);
|
1141
|
+
}
|
1142
|
+
if (typeof value === 'number') {
|
1143
|
+
if (isNaN(value)) {
|
1144
|
+
warnStyleValueIsNaN(name, value);
|
1145
|
+
} else if (!isFinite(value)) {
|
1146
|
+
warnStyleValueIsInfinity(name, value);
|
1147
|
+
}
|
1148
|
+
}
|
1149
|
+
};
|
1150
|
+
}
|
1151
|
+
var warnValidStyle$1 = warnValidStyle;
|
1152
|
+
var matchHtmlRegExp = /["'&<>]/;
|
1153
|
+
function escapeHtml(string) {
|
1154
|
+
{
|
1155
|
+
checkHtmlStringCoercion(string);
|
1156
|
+
}
|
1157
|
+
var str = '' + string;
|
1158
|
+
var match = matchHtmlRegExp.exec(str);
|
1159
|
+
if (!match) {
|
1160
|
+
return str;
|
1161
|
+
}
|
1162
|
+
var escape;
|
1163
|
+
var html = '';
|
1164
|
+
var index;
|
1165
|
+
var lastIndex = 0;
|
1166
|
+
for (index = match.index; index < str.length; index++) {
|
1167
|
+
switch (str.charCodeAt(index)) {
|
1168
|
+
case 34:
|
1169
|
+
escape = '"';
|
1170
|
+
break;
|
1171
|
+
case 38:
|
1172
|
+
escape = '&';
|
1173
|
+
break;
|
1174
|
+
case 39:
|
1175
|
+
escape = ''';
|
1176
|
+
break;
|
1177
|
+
case 60:
|
1178
|
+
escape = '<';
|
1179
|
+
break;
|
1180
|
+
case 62:
|
1181
|
+
escape = '>';
|
1182
|
+
break;
|
1183
|
+
default:
|
1184
|
+
continue;
|
1185
|
+
}
|
1186
|
+
if (lastIndex !== index) {
|
1187
|
+
html += str.substring(lastIndex, index);
|
1188
|
+
}
|
1189
|
+
lastIndex = index + 1;
|
1190
|
+
html += escape;
|
1191
|
+
}
|
1192
|
+
return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
|
1193
|
+
}
|
1194
|
+
function escapeTextForBrowser(text) {
|
1195
|
+
if (typeof text === 'boolean' || typeof text === 'number') {
|
1196
|
+
return '' + text;
|
1197
|
+
}
|
1198
|
+
return escapeHtml(text);
|
1199
|
+
}
|
1200
|
+
var uppercasePattern = /([A-Z])/g;
|
1201
|
+
var msPattern$1 = /^ms-/;
|
1202
|
+
function hyphenateStyleName(name) {
|
1203
|
+
return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern$1, '-ms-');
|
1204
|
+
}
|
1205
|
+
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
|
1206
|
+
var didWarn = false;
|
1207
|
+
function sanitizeURL(url) {
|
1208
|
+
{
|
1209
|
+
if (!didWarn && isJavaScriptProtocol.test(url)) {
|
1210
|
+
didWarn = true;
|
1211
|
+
error('A future version of React will block javascript: URLs as a security precaution. ' + 'Use event handlers instead if you can. If you need to generate unsafe HTML try ' + 'using dangerouslySetInnerHTML instead. React was passed %s.', JSON.stringify(url));
|
1212
|
+
}
|
1213
|
+
}
|
1214
|
+
}
|
1215
|
+
var isArrayImpl = Array.isArray;
|
1216
|
+
function isArray(a) {
|
1217
|
+
return isArrayImpl(a);
|
1218
|
+
}
|
1219
|
+
var startInlineScript = stringToPrecomputedChunk('<script>');
|
1220
|
+
var endInlineScript = stringToPrecomputedChunk('</script>');
|
1221
|
+
var startScriptSrc = stringToPrecomputedChunk('<script src="');
|
1222
|
+
var startModuleSrc = stringToPrecomputedChunk('<script type="module" src="');
|
1223
|
+
var endAsyncScript = stringToPrecomputedChunk('" async=""></script>');
|
1224
|
+
function createResponseState(identifierPrefix, nonce, bootstrapScriptContent, bootstrapScripts, bootstrapModules) {
|
1225
|
+
var idPrefix = identifierPrefix === undefined ? '' : identifierPrefix;
|
1226
|
+
var inlineScriptWithNonce = nonce === undefined ? startInlineScript : stringToPrecomputedChunk('<script nonce="' + escapeTextForBrowser(nonce) + '">');
|
1227
|
+
var bootstrapChunks = [];
|
1228
|
+
if (bootstrapScriptContent !== undefined) {
|
1229
|
+
bootstrapChunks.push(inlineScriptWithNonce, stringToChunk(escapeTextForBrowser(bootstrapScriptContent)), endInlineScript);
|
1230
|
+
}
|
1231
|
+
if (bootstrapScripts !== undefined) {
|
1232
|
+
for (var i = 0; i < bootstrapScripts.length; i++) {
|
1233
|
+
bootstrapChunks.push(startScriptSrc, stringToChunk(escapeTextForBrowser(bootstrapScripts[i])), endAsyncScript);
|
1234
|
+
}
|
1235
|
+
}
|
1236
|
+
if (bootstrapModules !== undefined) {
|
1237
|
+
for (var _i = 0; _i < bootstrapModules.length; _i++) {
|
1238
|
+
bootstrapChunks.push(startModuleSrc, stringToChunk(escapeTextForBrowser(bootstrapModules[_i])), endAsyncScript);
|
1239
|
+
}
|
1240
|
+
}
|
1241
|
+
return {
|
1242
|
+
bootstrapChunks: bootstrapChunks,
|
1243
|
+
startInlineScript: inlineScriptWithNonce,
|
1244
|
+
placeholderPrefix: stringToPrecomputedChunk(idPrefix + 'P:'),
|
1245
|
+
segmentPrefix: stringToPrecomputedChunk(idPrefix + 'S:'),
|
1246
|
+
boundaryPrefix: idPrefix + 'B:',
|
1247
|
+
idPrefix: idPrefix,
|
1248
|
+
nextSuspenseID: 0,
|
1249
|
+
sentCompleteSegmentFunction: false,
|
1250
|
+
sentCompleteBoundaryFunction: false,
|
1251
|
+
sentClientRenderFunction: false
|
1252
|
+
};
|
1253
|
+
}
|
1254
|
+
var ROOT_HTML_MODE = 0;
|
1255
|
+
var HTML_MODE = 1;
|
1256
|
+
var SVG_MODE = 2;
|
1257
|
+
var MATHML_MODE = 3;
|
1258
|
+
var HTML_TABLE_MODE = 4;
|
1259
|
+
var HTML_TABLE_BODY_MODE = 5;
|
1260
|
+
var HTML_TABLE_ROW_MODE = 6;
|
1261
|
+
var HTML_COLGROUP_MODE = 7;
|
1262
|
+
function createFormatContext(insertionMode, selectedValue) {
|
1263
|
+
return {
|
1264
|
+
insertionMode: insertionMode,
|
1265
|
+
selectedValue: selectedValue
|
1266
|
+
};
|
1267
|
+
}
|
1268
|
+
function getChildFormatContext(parentContext, type, props) {
|
1269
|
+
switch (type) {
|
1270
|
+
case 'select':
|
1271
|
+
return createFormatContext(HTML_MODE, props.value != null ? props.value : props.defaultValue);
|
1272
|
+
case 'svg':
|
1273
|
+
return createFormatContext(SVG_MODE, null);
|
1274
|
+
case 'math':
|
1275
|
+
return createFormatContext(MATHML_MODE, null);
|
1276
|
+
case 'foreignObject':
|
1277
|
+
return createFormatContext(HTML_MODE, null);
|
1278
|
+
case 'table':
|
1279
|
+
return createFormatContext(HTML_TABLE_MODE, null);
|
1280
|
+
case 'thead':
|
1281
|
+
case 'tbody':
|
1282
|
+
case 'tfoot':
|
1283
|
+
return createFormatContext(HTML_TABLE_BODY_MODE, null);
|
1284
|
+
case 'colgroup':
|
1285
|
+
return createFormatContext(HTML_COLGROUP_MODE, null);
|
1286
|
+
case 'tr':
|
1287
|
+
return createFormatContext(HTML_TABLE_ROW_MODE, null);
|
1288
|
+
}
|
1289
|
+
if (parentContext.insertionMode >= HTML_TABLE_MODE) {
|
1290
|
+
return createFormatContext(HTML_MODE, null);
|
1291
|
+
}
|
1292
|
+
if (parentContext.insertionMode === ROOT_HTML_MODE) {
|
1293
|
+
return createFormatContext(HTML_MODE, null);
|
1294
|
+
}
|
1295
|
+
return parentContext;
|
1296
|
+
}
|
1297
|
+
var UNINITIALIZED_SUSPENSE_BOUNDARY_ID = null;
|
1298
|
+
function assignSuspenseBoundaryID(responseState) {
|
1299
|
+
var generatedID = responseState.nextSuspenseID++;
|
1300
|
+
return stringToPrecomputedChunk(responseState.boundaryPrefix + generatedID.toString(16));
|
1301
|
+
}
|
1302
|
+
function makeId(responseState, treeId, localId) {
|
1303
|
+
var idPrefix = responseState.idPrefix;
|
1304
|
+
var id = ':' + idPrefix + 'R' + treeId;
|
1305
|
+
if (localId > 0) {
|
1306
|
+
id += 'H' + localId.toString(32);
|
1307
|
+
}
|
1308
|
+
return id + ':';
|
1309
|
+
}
|
1310
|
+
function encodeHTMLTextNode(text) {
|
1311
|
+
return escapeTextForBrowser(text);
|
1312
|
+
}
|
1313
|
+
var textSeparator = stringToPrecomputedChunk('<!-- -->');
|
1314
|
+
function pushTextInstance(target, text, responseState) {
|
1315
|
+
if (text === '') {
|
1316
|
+
return;
|
1317
|
+
}
|
1318
|
+
target.push(stringToChunk(encodeHTMLTextNode(text)), textSeparator);
|
1319
|
+
}
|
1320
|
+
var styleNameCache = new Map();
|
1321
|
+
function processStyleName(styleName) {
|
1322
|
+
var chunk = styleNameCache.get(styleName);
|
1323
|
+
if (chunk !== undefined) {
|
1324
|
+
return chunk;
|
1325
|
+
}
|
1326
|
+
var result = stringToPrecomputedChunk(escapeTextForBrowser(hyphenateStyleName(styleName)));
|
1327
|
+
styleNameCache.set(styleName, result);
|
1328
|
+
return result;
|
1329
|
+
}
|
1330
|
+
var styleAttributeStart = stringToPrecomputedChunk(' style="');
|
1331
|
+
var styleAssign = stringToPrecomputedChunk(':');
|
1332
|
+
var styleSeparator = stringToPrecomputedChunk(';');
|
1333
|
+
function pushStyle(target, responseState, style) {
|
1334
|
+
if (typeof style !== 'object') {
|
1335
|
+
throw new Error('The `style` prop expects a mapping from style properties to values, ' + "not a string. For example, style={{marginRight: spacing + 'em'}} when " + 'using JSX.');
|
1336
|
+
}
|
1337
|
+
var isFirst = true;
|
1338
|
+
for (var styleName in style) {
|
1339
|
+
if (!hasOwnProperty.call(style, styleName)) {
|
1340
|
+
continue;
|
1341
|
+
}
|
1342
|
+
var styleValue = style[styleName];
|
1343
|
+
if (styleValue == null || typeof styleValue === 'boolean' || styleValue === '') {
|
1344
|
+
continue;
|
1345
|
+
}
|
1346
|
+
var nameChunk = void 0;
|
1347
|
+
var valueChunk = void 0;
|
1348
|
+
var isCustomProperty = styleName.indexOf('--') === 0;
|
1349
|
+
if (isCustomProperty) {
|
1350
|
+
nameChunk = stringToChunk(escapeTextForBrowser(styleName));
|
1351
|
+
{
|
1352
|
+
checkCSSPropertyStringCoercion(styleValue, styleName);
|
1353
|
+
}
|
1354
|
+
valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));
|
1355
|
+
} else {
|
1356
|
+
{
|
1357
|
+
warnValidStyle$1(styleName, styleValue);
|
1358
|
+
}
|
1359
|
+
nameChunk = processStyleName(styleName);
|
1360
|
+
if (typeof styleValue === 'number') {
|
1361
|
+
if (styleValue !== 0 && !hasOwnProperty.call(isUnitlessNumber, styleName)) {
|
1362
|
+
valueChunk = stringToChunk(styleValue + 'px');
|
1363
|
+
} else {
|
1364
|
+
valueChunk = stringToChunk('' + styleValue);
|
1365
|
+
}
|
1366
|
+
} else {
|
1367
|
+
{
|
1368
|
+
checkCSSPropertyStringCoercion(styleValue, styleName);
|
1369
|
+
}
|
1370
|
+
valueChunk = stringToChunk(escapeTextForBrowser(('' + styleValue).trim()));
|
1371
|
+
}
|
1372
|
+
}
|
1373
|
+
if (isFirst) {
|
1374
|
+
isFirst = false;
|
1375
|
+
target.push(styleAttributeStart, nameChunk, styleAssign, valueChunk);
|
1376
|
+
} else {
|
1377
|
+
target.push(styleSeparator, nameChunk, styleAssign, valueChunk);
|
1378
|
+
}
|
1379
|
+
}
|
1380
|
+
if (!isFirst) {
|
1381
|
+
target.push(attributeEnd);
|
1382
|
+
}
|
1383
|
+
}
|
1384
|
+
var attributeSeparator = stringToPrecomputedChunk(' ');
|
1385
|
+
var attributeAssign = stringToPrecomputedChunk('="');
|
1386
|
+
var attributeEnd = stringToPrecomputedChunk('"');
|
1387
|
+
var attributeEmptyString = stringToPrecomputedChunk('=""');
|
1388
|
+
function pushAttribute(target, responseState, name, value) {
|
1389
|
+
switch (name) {
|
1390
|
+
case 'style':
|
1391
|
+
{
|
1392
|
+
pushStyle(target, responseState, value);
|
1393
|
+
return;
|
1394
|
+
}
|
1395
|
+
case 'defaultValue':
|
1396
|
+
case 'defaultChecked':
|
1397
|
+
case 'innerHTML':
|
1398
|
+
case 'suppressContentEditableWarning':
|
1399
|
+
case 'suppressHydrationWarning':
|
1400
|
+
return;
|
1401
|
+
}
|
1402
|
+
if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
|
1403
|
+
return;
|
1404
|
+
}
|
1405
|
+
var propertyInfo = getPropertyInfo(name);
|
1406
|
+
if (propertyInfo !== null) {
|
1407
|
+
switch (typeof value) {
|
1408
|
+
case 'function':
|
1409
|
+
case 'symbol':
|
1410
|
+
return;
|
1411
|
+
case 'boolean':
|
1412
|
+
{
|
1413
|
+
if (!propertyInfo.acceptsBooleans) {
|
1414
|
+
return;
|
1415
|
+
}
|
1416
|
+
}
|
1417
|
+
}
|
1418
|
+
var attributeName = propertyInfo.attributeName;
|
1419
|
+
var attributeNameChunk = stringToChunk(attributeName);
|
1420
|
+
switch (propertyInfo.type) {
|
1421
|
+
case BOOLEAN:
|
1422
|
+
if (value) {
|
1423
|
+
target.push(attributeSeparator, attributeNameChunk, attributeEmptyString);
|
1424
|
+
}
|
1425
|
+
return;
|
1426
|
+
case OVERLOADED_BOOLEAN:
|
1427
|
+
if (value === true) {
|
1428
|
+
target.push(attributeSeparator, attributeNameChunk, attributeEmptyString);
|
1429
|
+
} else if (value === false)
|
1430
|
+
;
|
1431
|
+
else {
|
1432
|
+
target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);
|
1433
|
+
}
|
1434
|
+
return;
|
1435
|
+
case NUMERIC:
|
1436
|
+
if (!isNaN(value)) {
|
1437
|
+
target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);
|
1438
|
+
}
|
1439
|
+
break;
|
1440
|
+
case POSITIVE_NUMERIC:
|
1441
|
+
if (!isNaN(value) && value >= 1) {
|
1442
|
+
target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);
|
1443
|
+
}
|
1444
|
+
break;
|
1445
|
+
default:
|
1446
|
+
if (propertyInfo.sanitizeURL) {
|
1447
|
+
{
|
1448
|
+
checkAttributeStringCoercion(value, attributeName);
|
1449
|
+
}
|
1450
|
+
value = '' + value;
|
1451
|
+
sanitizeURL(value);
|
1452
|
+
}
|
1453
|
+
target.push(attributeSeparator, attributeNameChunk, attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);
|
1454
|
+
}
|
1455
|
+
} else if (isAttributeNameSafe(name)) {
|
1456
|
+
switch (typeof value) {
|
1457
|
+
case 'function':
|
1458
|
+
case 'symbol':
|
1459
|
+
return;
|
1460
|
+
case 'boolean':
|
1461
|
+
{
|
1462
|
+
var prefix = name.toLowerCase().slice(0, 5);
|
1463
|
+
if (prefix !== 'data-' && prefix !== 'aria-') {
|
1464
|
+
return;
|
1465
|
+
}
|
1466
|
+
}
|
1467
|
+
}
|
1468
|
+
target.push(attributeSeparator, stringToChunk(name), attributeAssign, stringToChunk(escapeTextForBrowser(value)), attributeEnd);
|
1469
|
+
}
|
1470
|
+
}
|
1471
|
+
var endOfStartTag = stringToPrecomputedChunk('>');
|
1472
|
+
var endOfStartTagSelfClosing = stringToPrecomputedChunk('/>');
|
1473
|
+
function pushInnerHTML(target, innerHTML, children) {
|
1474
|
+
if (innerHTML != null) {
|
1475
|
+
if (children != null) {
|
1476
|
+
throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');
|
1477
|
+
}
|
1478
|
+
if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {
|
1479
|
+
throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');
|
1480
|
+
}
|
1481
|
+
var html = innerHTML.__html;
|
1482
|
+
if (html !== null && html !== undefined) {
|
1483
|
+
{
|
1484
|
+
checkHtmlStringCoercion(html);
|
1485
|
+
}
|
1486
|
+
target.push(stringToChunk('' + html));
|
1487
|
+
}
|
1488
|
+
}
|
1489
|
+
}
|
1490
|
+
var didWarnDefaultInputValue = false;
|
1491
|
+
var didWarnDefaultChecked = false;
|
1492
|
+
var didWarnDefaultSelectValue = false;
|
1493
|
+
var didWarnDefaultTextareaValue = false;
|
1494
|
+
var didWarnInvalidOptionChildren = false;
|
1495
|
+
var didWarnInvalidOptionInnerHTML = false;
|
1496
|
+
var didWarnSelectedSetOnOption = false;
|
1497
|
+
function checkSelectProp(props, propName) {
|
1498
|
+
{
|
1499
|
+
var value = props[propName];
|
1500
|
+
if (value != null) {
|
1501
|
+
var array = isArray(value);
|
1502
|
+
if (props.multiple && !array) {
|
1503
|
+
error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
|
1504
|
+
} else if (!props.multiple && array) {
|
1505
|
+
error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
|
1506
|
+
}
|
1507
|
+
}
|
1508
|
+
}
|
1509
|
+
}
|
1510
|
+
function pushStartSelect(target, props, responseState) {
|
1511
|
+
{
|
1512
|
+
checkControlledValueProps('select', props);
|
1513
|
+
checkSelectProp(props, 'value');
|
1514
|
+
checkSelectProp(props, 'defaultValue');
|
1515
|
+
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
|
1516
|
+
error('Select elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled select ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
|
1517
|
+
didWarnDefaultSelectValue = true;
|
1518
|
+
}
|
1519
|
+
}
|
1520
|
+
target.push(startChunkForTag('select'));
|
1521
|
+
var children = null;
|
1522
|
+
var innerHTML = null;
|
1523
|
+
for (var propKey in props) {
|
1524
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1525
|
+
var propValue = props[propKey];
|
1526
|
+
if (propValue == null) {
|
1527
|
+
continue;
|
1528
|
+
}
|
1529
|
+
switch (propKey) {
|
1530
|
+
case 'children':
|
1531
|
+
children = propValue;
|
1532
|
+
break;
|
1533
|
+
case 'dangerouslySetInnerHTML':
|
1534
|
+
innerHTML = propValue;
|
1535
|
+
break;
|
1536
|
+
case 'defaultValue':
|
1537
|
+
case 'value':
|
1538
|
+
break;
|
1539
|
+
default:
|
1540
|
+
pushAttribute(target, responseState, propKey, propValue);
|
1541
|
+
break;
|
1542
|
+
}
|
1543
|
+
}
|
1544
|
+
}
|
1545
|
+
target.push(endOfStartTag);
|
1546
|
+
pushInnerHTML(target, innerHTML, children);
|
1547
|
+
return children;
|
1548
|
+
}
|
1549
|
+
function flattenOptionChildren(children) {
|
1550
|
+
var content = '';
|
1551
|
+
React.Children.forEach(children, function(child) {
|
1552
|
+
if (child == null) {
|
1553
|
+
return;
|
1554
|
+
}
|
1555
|
+
content += child;
|
1556
|
+
{
|
1557
|
+
if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
|
1558
|
+
didWarnInvalidOptionChildren = true;
|
1559
|
+
error('Cannot infer the option value of complex children. ' + 'Pass a `value` prop or use a plain string as children to <option>.');
|
1560
|
+
}
|
1561
|
+
}
|
1562
|
+
});
|
1563
|
+
return content;
|
1564
|
+
}
|
1565
|
+
var selectedMarkerAttribute = stringToPrecomputedChunk(' selected=""');
|
1566
|
+
function pushStartOption(target, props, responseState, formatContext) {
|
1567
|
+
var selectedValue = formatContext.selectedValue;
|
1568
|
+
target.push(startChunkForTag('option'));
|
1569
|
+
var children = null;
|
1570
|
+
var value = null;
|
1571
|
+
var selected = null;
|
1572
|
+
var innerHTML = null;
|
1573
|
+
for (var propKey in props) {
|
1574
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1575
|
+
var propValue = props[propKey];
|
1576
|
+
if (propValue == null) {
|
1577
|
+
continue;
|
1578
|
+
}
|
1579
|
+
switch (propKey) {
|
1580
|
+
case 'children':
|
1581
|
+
children = propValue;
|
1582
|
+
break;
|
1583
|
+
case 'selected':
|
1584
|
+
selected = propValue;
|
1585
|
+
{
|
1586
|
+
if (!didWarnSelectedSetOnOption) {
|
1587
|
+
error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
|
1588
|
+
didWarnSelectedSetOnOption = true;
|
1589
|
+
}
|
1590
|
+
}
|
1591
|
+
break;
|
1592
|
+
case 'dangerouslySetInnerHTML':
|
1593
|
+
innerHTML = propValue;
|
1594
|
+
break;
|
1595
|
+
case 'value':
|
1596
|
+
value = propValue;
|
1597
|
+
default:
|
1598
|
+
pushAttribute(target, responseState, propKey, propValue);
|
1599
|
+
break;
|
1600
|
+
}
|
1601
|
+
}
|
1602
|
+
}
|
1603
|
+
if (selectedValue != null) {
|
1604
|
+
var stringValue;
|
1605
|
+
if (value !== null) {
|
1606
|
+
{
|
1607
|
+
checkAttributeStringCoercion(value, 'value');
|
1608
|
+
}
|
1609
|
+
stringValue = '' + value;
|
1610
|
+
} else {
|
1611
|
+
{
|
1612
|
+
if (innerHTML !== null) {
|
1613
|
+
if (!didWarnInvalidOptionInnerHTML) {
|
1614
|
+
didWarnInvalidOptionInnerHTML = true;
|
1615
|
+
error('Pass a `value` prop if you set dangerouslyInnerHTML so React knows ' + 'which value should be selected.');
|
1616
|
+
}
|
1617
|
+
}
|
1618
|
+
}
|
1619
|
+
stringValue = flattenOptionChildren(children);
|
1620
|
+
}
|
1621
|
+
if (isArray(selectedValue)) {
|
1622
|
+
for (var i = 0; i < selectedValue.length; i++) {
|
1623
|
+
{
|
1624
|
+
checkAttributeStringCoercion(selectedValue[i], 'value');
|
1625
|
+
}
|
1626
|
+
var v = '' + selectedValue[i];
|
1627
|
+
if (v === stringValue) {
|
1628
|
+
target.push(selectedMarkerAttribute);
|
1629
|
+
break;
|
1630
|
+
}
|
1631
|
+
}
|
1632
|
+
} else {
|
1633
|
+
{
|
1634
|
+
checkAttributeStringCoercion(selectedValue, 'select.value');
|
1635
|
+
}
|
1636
|
+
if ('' + selectedValue === stringValue) {
|
1637
|
+
target.push(selectedMarkerAttribute);
|
1638
|
+
}
|
1639
|
+
}
|
1640
|
+
} else if (selected) {
|
1641
|
+
target.push(selectedMarkerAttribute);
|
1642
|
+
}
|
1643
|
+
target.push(endOfStartTag);
|
1644
|
+
pushInnerHTML(target, innerHTML, children);
|
1645
|
+
return children;
|
1646
|
+
}
|
1647
|
+
function pushInput(target, props, responseState) {
|
1648
|
+
{
|
1649
|
+
checkControlledValueProps('input', props);
|
1650
|
+
if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
|
1651
|
+
error('%s contains an input of type %s with both checked and defaultChecked props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the checked prop, or the defaultChecked prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
|
1652
|
+
didWarnDefaultChecked = true;
|
1653
|
+
}
|
1654
|
+
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
|
1655
|
+
error('%s contains an input of type %s with both value and defaultValue props. ' + 'Input elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled input ' + 'element and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components', 'A component', props.type);
|
1656
|
+
didWarnDefaultInputValue = true;
|
1657
|
+
}
|
1658
|
+
}
|
1659
|
+
target.push(startChunkForTag('input'));
|
1660
|
+
var value = null;
|
1661
|
+
var defaultValue = null;
|
1662
|
+
var checked = null;
|
1663
|
+
var defaultChecked = null;
|
1664
|
+
for (var propKey in props) {
|
1665
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1666
|
+
var propValue = props[propKey];
|
1667
|
+
if (propValue == null) {
|
1668
|
+
continue;
|
1669
|
+
}
|
1670
|
+
switch (propKey) {
|
1671
|
+
case 'children':
|
1672
|
+
case 'dangerouslySetInnerHTML':
|
1673
|
+
throw new Error('input' + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.');
|
1674
|
+
case 'defaultChecked':
|
1675
|
+
defaultChecked = propValue;
|
1676
|
+
break;
|
1677
|
+
case 'defaultValue':
|
1678
|
+
defaultValue = propValue;
|
1679
|
+
break;
|
1680
|
+
case 'checked':
|
1681
|
+
checked = propValue;
|
1682
|
+
break;
|
1683
|
+
case 'value':
|
1684
|
+
value = propValue;
|
1685
|
+
break;
|
1686
|
+
default:
|
1687
|
+
pushAttribute(target, responseState, propKey, propValue);
|
1688
|
+
break;
|
1689
|
+
}
|
1690
|
+
}
|
1691
|
+
}
|
1692
|
+
if (checked !== null) {
|
1693
|
+
pushAttribute(target, responseState, 'checked', checked);
|
1694
|
+
} else if (defaultChecked !== null) {
|
1695
|
+
pushAttribute(target, responseState, 'checked', defaultChecked);
|
1696
|
+
}
|
1697
|
+
if (value !== null) {
|
1698
|
+
pushAttribute(target, responseState, 'value', value);
|
1699
|
+
} else if (defaultValue !== null) {
|
1700
|
+
pushAttribute(target, responseState, 'value', defaultValue);
|
1701
|
+
}
|
1702
|
+
target.push(endOfStartTagSelfClosing);
|
1703
|
+
return null;
|
1704
|
+
}
|
1705
|
+
function pushStartTextArea(target, props, responseState) {
|
1706
|
+
{
|
1707
|
+
checkControlledValueProps('textarea', props);
|
1708
|
+
if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
|
1709
|
+
error('Textarea elements must be either controlled or uncontrolled ' + '(specify either the value prop, or the defaultValue prop, but not ' + 'both). Decide between using a controlled or uncontrolled textarea ' + 'and remove one of these props. More info: ' + 'https://reactjs.org/link/controlled-components');
|
1710
|
+
didWarnDefaultTextareaValue = true;
|
1711
|
+
}
|
1712
|
+
}
|
1713
|
+
target.push(startChunkForTag('textarea'));
|
1714
|
+
var value = null;
|
1715
|
+
var defaultValue = null;
|
1716
|
+
var children = null;
|
1717
|
+
for (var propKey in props) {
|
1718
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1719
|
+
var propValue = props[propKey];
|
1720
|
+
if (propValue == null) {
|
1721
|
+
continue;
|
1722
|
+
}
|
1723
|
+
switch (propKey) {
|
1724
|
+
case 'children':
|
1725
|
+
children = propValue;
|
1726
|
+
break;
|
1727
|
+
case 'value':
|
1728
|
+
value = propValue;
|
1729
|
+
break;
|
1730
|
+
case 'defaultValue':
|
1731
|
+
defaultValue = propValue;
|
1732
|
+
break;
|
1733
|
+
case 'dangerouslySetInnerHTML':
|
1734
|
+
throw new Error('`dangerouslySetInnerHTML` does not make sense on <textarea>.');
|
1735
|
+
default:
|
1736
|
+
pushAttribute(target, responseState, propKey, propValue);
|
1737
|
+
break;
|
1738
|
+
}
|
1739
|
+
}
|
1740
|
+
}
|
1741
|
+
if (value === null && defaultValue !== null) {
|
1742
|
+
value = defaultValue;
|
1743
|
+
}
|
1744
|
+
target.push(endOfStartTag);
|
1745
|
+
if (children != null) {
|
1746
|
+
{
|
1747
|
+
error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
|
1748
|
+
}
|
1749
|
+
if (value != null) {
|
1750
|
+
throw new Error('If you supply `defaultValue` on a <textarea>, do not pass children.');
|
1751
|
+
}
|
1752
|
+
if (isArray(children)) {
|
1753
|
+
if (children.length > 1) {
|
1754
|
+
throw new Error('<textarea> can only have at most one child.');
|
1755
|
+
}
|
1756
|
+
{
|
1757
|
+
checkHtmlStringCoercion(children[0]);
|
1758
|
+
}
|
1759
|
+
value = '' + children[0];
|
1760
|
+
}
|
1761
|
+
{
|
1762
|
+
checkHtmlStringCoercion(children);
|
1763
|
+
}
|
1764
|
+
value = '' + children;
|
1765
|
+
}
|
1766
|
+
if (typeof value === 'string' && value[0] === '\n') {
|
1767
|
+
target.push(leadingNewline);
|
1768
|
+
}
|
1769
|
+
if (value !== null) {
|
1770
|
+
{
|
1771
|
+
checkAttributeStringCoercion(value, 'value');
|
1772
|
+
}
|
1773
|
+
target.push(stringToChunk(encodeHTMLTextNode('' + value)));
|
1774
|
+
}
|
1775
|
+
return null;
|
1776
|
+
}
|
1777
|
+
function pushSelfClosing(target, props, tag, responseState) {
|
1778
|
+
target.push(startChunkForTag(tag));
|
1779
|
+
for (var propKey in props) {
|
1780
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1781
|
+
var propValue = props[propKey];
|
1782
|
+
if (propValue == null) {
|
1783
|
+
continue;
|
1784
|
+
}
|
1785
|
+
switch (propKey) {
|
1786
|
+
case 'children':
|
1787
|
+
case 'dangerouslySetInnerHTML':
|
1788
|
+
throw new Error(tag + " is a self-closing tag and must neither have `children` nor " + 'use `dangerouslySetInnerHTML`.');
|
1789
|
+
default:
|
1790
|
+
pushAttribute(target, responseState, propKey, propValue);
|
1791
|
+
break;
|
1792
|
+
}
|
1793
|
+
}
|
1794
|
+
}
|
1795
|
+
target.push(endOfStartTagSelfClosing);
|
1796
|
+
return null;
|
1797
|
+
}
|
1798
|
+
function pushStartMenuItem(target, props, responseState) {
|
1799
|
+
target.push(startChunkForTag('menuitem'));
|
1800
|
+
for (var propKey in props) {
|
1801
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1802
|
+
var propValue = props[propKey];
|
1803
|
+
if (propValue == null) {
|
1804
|
+
continue;
|
1805
|
+
}
|
1806
|
+
switch (propKey) {
|
1807
|
+
case 'children':
|
1808
|
+
case 'dangerouslySetInnerHTML':
|
1809
|
+
throw new Error('menuitems cannot have `children` nor `dangerouslySetInnerHTML`.');
|
1810
|
+
default:
|
1811
|
+
pushAttribute(target, responseState, propKey, propValue);
|
1812
|
+
break;
|
1813
|
+
}
|
1814
|
+
}
|
1815
|
+
}
|
1816
|
+
target.push(endOfStartTag);
|
1817
|
+
return null;
|
1818
|
+
}
|
1819
|
+
function pushStartGenericElement(target, props, tag, responseState) {
|
1820
|
+
target.push(startChunkForTag(tag));
|
1821
|
+
var children = null;
|
1822
|
+
var innerHTML = null;
|
1823
|
+
for (var propKey in props) {
|
1824
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1825
|
+
var propValue = props[propKey];
|
1826
|
+
if (propValue == null) {
|
1827
|
+
continue;
|
1828
|
+
}
|
1829
|
+
switch (propKey) {
|
1830
|
+
case 'children':
|
1831
|
+
children = propValue;
|
1832
|
+
break;
|
1833
|
+
case 'dangerouslySetInnerHTML':
|
1834
|
+
innerHTML = propValue;
|
1835
|
+
break;
|
1836
|
+
default:
|
1837
|
+
pushAttribute(target, responseState, propKey, propValue);
|
1838
|
+
break;
|
1839
|
+
}
|
1840
|
+
}
|
1841
|
+
}
|
1842
|
+
target.push(endOfStartTag);
|
1843
|
+
pushInnerHTML(target, innerHTML, children);
|
1844
|
+
if (typeof children === 'string') {
|
1845
|
+
target.push(stringToChunk(encodeHTMLTextNode(children)));
|
1846
|
+
return null;
|
1847
|
+
}
|
1848
|
+
return children;
|
1849
|
+
}
|
1850
|
+
function pushStartCustomElement(target, props, tag, responseState) {
|
1851
|
+
target.push(startChunkForTag(tag));
|
1852
|
+
var children = null;
|
1853
|
+
var innerHTML = null;
|
1854
|
+
for (var propKey in props) {
|
1855
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1856
|
+
var propValue = props[propKey];
|
1857
|
+
if (propValue == null) {
|
1858
|
+
continue;
|
1859
|
+
}
|
1860
|
+
switch (propKey) {
|
1861
|
+
case 'children':
|
1862
|
+
children = propValue;
|
1863
|
+
break;
|
1864
|
+
case 'dangerouslySetInnerHTML':
|
1865
|
+
innerHTML = propValue;
|
1866
|
+
break;
|
1867
|
+
case 'style':
|
1868
|
+
pushStyle(target, responseState, propValue);
|
1869
|
+
break;
|
1870
|
+
case 'suppressContentEditableWarning':
|
1871
|
+
case 'suppressHydrationWarning':
|
1872
|
+
break;
|
1873
|
+
default:
|
1874
|
+
if (isAttributeNameSafe(propKey) && typeof propValue !== 'function' && typeof propValue !== 'symbol') {
|
1875
|
+
target.push(attributeSeparator, stringToChunk(propKey), attributeAssign, stringToChunk(escapeTextForBrowser(propValue)), attributeEnd);
|
1876
|
+
}
|
1877
|
+
break;
|
1878
|
+
}
|
1879
|
+
}
|
1880
|
+
}
|
1881
|
+
target.push(endOfStartTag);
|
1882
|
+
pushInnerHTML(target, innerHTML, children);
|
1883
|
+
return children;
|
1884
|
+
}
|
1885
|
+
var leadingNewline = stringToPrecomputedChunk('\n');
|
1886
|
+
function pushStartPreformattedElement(target, props, tag, responseState) {
|
1887
|
+
target.push(startChunkForTag(tag));
|
1888
|
+
var children = null;
|
1889
|
+
var innerHTML = null;
|
1890
|
+
for (var propKey in props) {
|
1891
|
+
if (hasOwnProperty.call(props, propKey)) {
|
1892
|
+
var propValue = props[propKey];
|
1893
|
+
if (propValue == null) {
|
1894
|
+
continue;
|
1895
|
+
}
|
1896
|
+
switch (propKey) {
|
1897
|
+
case 'children':
|
1898
|
+
children = propValue;
|
1899
|
+
break;
|
1900
|
+
case 'dangerouslySetInnerHTML':
|
1901
|
+
innerHTML = propValue;
|
1902
|
+
break;
|
1903
|
+
default:
|
1904
|
+
pushAttribute(target, responseState, propKey, propValue);
|
1905
|
+
break;
|
1906
|
+
}
|
1907
|
+
}
|
1908
|
+
}
|
1909
|
+
target.push(endOfStartTag);
|
1910
|
+
if (innerHTML != null) {
|
1911
|
+
if (children != null) {
|
1912
|
+
throw new Error('Can only set one of `children` or `props.dangerouslySetInnerHTML`.');
|
1913
|
+
}
|
1914
|
+
if (typeof innerHTML !== 'object' || !('__html' in innerHTML)) {
|
1915
|
+
throw new Error('`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. ' + 'Please visit https://reactjs.org/link/dangerously-set-inner-html ' + 'for more information.');
|
1916
|
+
}
|
1917
|
+
var html = innerHTML.__html;
|
1918
|
+
if (html !== null && html !== undefined) {
|
1919
|
+
if (typeof html === 'string' && html.length > 0 && html[0] === '\n') {
|
1920
|
+
target.push(leadingNewline, stringToChunk(html));
|
1921
|
+
} else {
|
1922
|
+
{
|
1923
|
+
checkHtmlStringCoercion(html);
|
1924
|
+
}
|
1925
|
+
target.push(stringToChunk('' + html));
|
1926
|
+
}
|
1927
|
+
}
|
1928
|
+
}
|
1929
|
+
if (typeof children === 'string' && children[0] === '\n') {
|
1930
|
+
target.push(leadingNewline);
|
1931
|
+
}
|
1932
|
+
return children;
|
1933
|
+
}
|
1934
|
+
var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/;
|
1935
|
+
var validatedTagCache = new Map();
|
1936
|
+
function startChunkForTag(tag) {
|
1937
|
+
var tagStartChunk = validatedTagCache.get(tag);
|
1938
|
+
if (tagStartChunk === undefined) {
|
1939
|
+
if (!VALID_TAG_REGEX.test(tag)) {
|
1940
|
+
throw new Error("Invalid tag: " + tag);
|
1941
|
+
}
|
1942
|
+
tagStartChunk = stringToPrecomputedChunk('<' + tag);
|
1943
|
+
validatedTagCache.set(tag, tagStartChunk);
|
1944
|
+
}
|
1945
|
+
return tagStartChunk;
|
1946
|
+
}
|
1947
|
+
var DOCTYPE = stringToPrecomputedChunk('<!DOCTYPE html>');
|
1948
|
+
function pushStartInstance(target, type, props, responseState, formatContext) {
|
1949
|
+
{
|
1950
|
+
validateProperties(type, props);
|
1951
|
+
validateProperties$1(type, props);
|
1952
|
+
validateProperties$2(type, props, null);
|
1953
|
+
if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
|
1954
|
+
error('A component is `contentEditable` and contains `children` managed by ' + 'React. It is now your responsibility to guarantee that none of ' + 'those nodes are unexpectedly modified or duplicated. This is ' + 'probably not intentional.');
|
1955
|
+
}
|
1956
|
+
if (formatContext.insertionMode !== SVG_MODE && formatContext.insertionMode !== MATHML_MODE) {
|
1957
|
+
if (type.indexOf('-') === -1 && typeof props.is !== 'string' && type.toLowerCase() !== type) {
|
1958
|
+
error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
|
1959
|
+
}
|
1960
|
+
}
|
1961
|
+
}
|
1962
|
+
switch (type) {
|
1963
|
+
case 'select':
|
1964
|
+
return pushStartSelect(target, props, responseState);
|
1965
|
+
case 'option':
|
1966
|
+
return pushStartOption(target, props, responseState, formatContext);
|
1967
|
+
case 'textarea':
|
1968
|
+
return pushStartTextArea(target, props, responseState);
|
1969
|
+
case 'input':
|
1970
|
+
return pushInput(target, props, responseState);
|
1971
|
+
case 'menuitem':
|
1972
|
+
return pushStartMenuItem(target, props, responseState);
|
1973
|
+
case 'listing':
|
1974
|
+
case 'pre':
|
1975
|
+
{
|
1976
|
+
return pushStartPreformattedElement(target, props, type, responseState);
|
1977
|
+
}
|
1978
|
+
case 'area':
|
1979
|
+
case 'base':
|
1980
|
+
case 'br':
|
1981
|
+
case 'col':
|
1982
|
+
case 'embed':
|
1983
|
+
case 'hr':
|
1984
|
+
case 'img':
|
1985
|
+
case 'keygen':
|
1986
|
+
case 'link':
|
1987
|
+
case 'meta':
|
1988
|
+
case 'param':
|
1989
|
+
case 'source':
|
1990
|
+
case 'track':
|
1991
|
+
case 'wbr':
|
1992
|
+
{
|
1993
|
+
return pushSelfClosing(target, props, type, responseState);
|
1994
|
+
}
|
1995
|
+
case 'annotation-xml':
|
1996
|
+
case 'color-profile':
|
1997
|
+
case 'font-face':
|
1998
|
+
case 'font-face-src':
|
1999
|
+
case 'font-face-uri':
|
2000
|
+
case 'font-face-format':
|
2001
|
+
case 'font-face-name':
|
2002
|
+
case 'missing-glyph':
|
2003
|
+
{
|
2004
|
+
return pushStartGenericElement(target, props, type, responseState);
|
2005
|
+
}
|
2006
|
+
case 'html':
|
2007
|
+
{
|
2008
|
+
if (formatContext.insertionMode === ROOT_HTML_MODE) {
|
2009
|
+
target.push(DOCTYPE);
|
2010
|
+
}
|
2011
|
+
return pushStartGenericElement(target, props, type, responseState);
|
2012
|
+
}
|
2013
|
+
default:
|
2014
|
+
{
|
2015
|
+
if (type.indexOf('-') === -1 && typeof props.is !== 'string') {
|
2016
|
+
return pushStartGenericElement(target, props, type, responseState);
|
2017
|
+
} else {
|
2018
|
+
return pushStartCustomElement(target, props, type, responseState);
|
2019
|
+
}
|
2020
|
+
}
|
2021
|
+
}
|
2022
|
+
}
|
2023
|
+
var endTag1 = stringToPrecomputedChunk('</');
|
2024
|
+
var endTag2 = stringToPrecomputedChunk('>');
|
2025
|
+
function pushEndInstance(target, type, props) {
|
2026
|
+
switch (type) {
|
2027
|
+
case 'area':
|
2028
|
+
case 'base':
|
2029
|
+
case 'br':
|
2030
|
+
case 'col':
|
2031
|
+
case 'embed':
|
2032
|
+
case 'hr':
|
2033
|
+
case 'img':
|
2034
|
+
case 'input':
|
2035
|
+
case 'keygen':
|
2036
|
+
case 'link':
|
2037
|
+
case 'meta':
|
2038
|
+
case 'param':
|
2039
|
+
case 'source':
|
2040
|
+
case 'track':
|
2041
|
+
case 'wbr':
|
2042
|
+
{
|
2043
|
+
break;
|
2044
|
+
}
|
2045
|
+
default:
|
2046
|
+
{
|
2047
|
+
target.push(endTag1, stringToChunk(type), endTag2);
|
2048
|
+
}
|
2049
|
+
}
|
2050
|
+
}
|
2051
|
+
function writeCompletedRoot(destination, responseState) {
|
2052
|
+
var bootstrapChunks = responseState.bootstrapChunks;
|
2053
|
+
var i = 0;
|
2054
|
+
for (; i < bootstrapChunks.length - 1; i++) {
|
2055
|
+
writeChunk(destination, bootstrapChunks[i]);
|
2056
|
+
}
|
2057
|
+
if (i < bootstrapChunks.length) {
|
2058
|
+
return writeChunkAndReturn(destination, bootstrapChunks[i]);
|
2059
|
+
}
|
2060
|
+
return true;
|
2061
|
+
}
|
2062
|
+
var placeholder1 = stringToPrecomputedChunk('<template id="');
|
2063
|
+
var placeholder2 = stringToPrecomputedChunk('"></template>');
|
2064
|
+
function writePlaceholder(destination, responseState, id) {
|
2065
|
+
writeChunk(destination, placeholder1);
|
2066
|
+
writeChunk(destination, responseState.placeholderPrefix);
|
2067
|
+
var formattedID = stringToChunk(id.toString(16));
|
2068
|
+
writeChunk(destination, formattedID);
|
2069
|
+
return writeChunkAndReturn(destination, placeholder2);
|
2070
|
+
}
|
2071
|
+
var startCompletedSuspenseBoundary = stringToPrecomputedChunk('<!--$-->');
|
2072
|
+
var startPendingSuspenseBoundary1 = stringToPrecomputedChunk('<!--$?--><template id="');
|
2073
|
+
var startPendingSuspenseBoundary2 = stringToPrecomputedChunk('"></template>');
|
2074
|
+
var startClientRenderedSuspenseBoundary = stringToPrecomputedChunk('<!--$!-->');
|
2075
|
+
var endSuspenseBoundary = stringToPrecomputedChunk('<!--/$-->');
|
2076
|
+
function writeStartCompletedSuspenseBoundary(destination, responseState) {
|
2077
|
+
return writeChunkAndReturn(destination, startCompletedSuspenseBoundary);
|
2078
|
+
}
|
2079
|
+
function writeStartPendingSuspenseBoundary(destination, responseState, id) {
|
2080
|
+
writeChunk(destination, startPendingSuspenseBoundary1);
|
2081
|
+
if (id === null) {
|
2082
|
+
throw new Error('An ID must have been assigned before we can complete the boundary.');
|
2083
|
+
}
|
2084
|
+
writeChunk(destination, id);
|
2085
|
+
return writeChunkAndReturn(destination, startPendingSuspenseBoundary2);
|
2086
|
+
}
|
2087
|
+
function writeStartClientRenderedSuspenseBoundary(destination, responseState) {
|
2088
|
+
return writeChunkAndReturn(destination, startClientRenderedSuspenseBoundary);
|
2089
|
+
}
|
2090
|
+
function writeEndCompletedSuspenseBoundary(destination, responseState) {
|
2091
|
+
return writeChunkAndReturn(destination, endSuspenseBoundary);
|
2092
|
+
}
|
2093
|
+
function writeEndPendingSuspenseBoundary(destination, responseState) {
|
2094
|
+
return writeChunkAndReturn(destination, endSuspenseBoundary);
|
2095
|
+
}
|
2096
|
+
function writeEndClientRenderedSuspenseBoundary(destination, responseState) {
|
2097
|
+
return writeChunkAndReturn(destination, endSuspenseBoundary);
|
2098
|
+
}
|
2099
|
+
var startSegmentHTML = stringToPrecomputedChunk('<div hidden id="');
|
2100
|
+
var startSegmentHTML2 = stringToPrecomputedChunk('">');
|
2101
|
+
var endSegmentHTML = stringToPrecomputedChunk('</div>');
|
2102
|
+
var startSegmentSVG = stringToPrecomputedChunk('<svg aria-hidden="true" style="display:none" id="');
|
2103
|
+
var startSegmentSVG2 = stringToPrecomputedChunk('">');
|
2104
|
+
var endSegmentSVG = stringToPrecomputedChunk('</svg>');
|
2105
|
+
var startSegmentMathML = stringToPrecomputedChunk('<math aria-hidden="true" style="display:none" id="');
|
2106
|
+
var startSegmentMathML2 = stringToPrecomputedChunk('">');
|
2107
|
+
var endSegmentMathML = stringToPrecomputedChunk('</math>');
|
2108
|
+
var startSegmentTable = stringToPrecomputedChunk('<table hidden id="');
|
2109
|
+
var startSegmentTable2 = stringToPrecomputedChunk('">');
|
2110
|
+
var endSegmentTable = stringToPrecomputedChunk('</table>');
|
2111
|
+
var startSegmentTableBody = stringToPrecomputedChunk('<table hidden><tbody id="');
|
2112
|
+
var startSegmentTableBody2 = stringToPrecomputedChunk('">');
|
2113
|
+
var endSegmentTableBody = stringToPrecomputedChunk('</tbody></table>');
|
2114
|
+
var startSegmentTableRow = stringToPrecomputedChunk('<table hidden><tr id="');
|
2115
|
+
var startSegmentTableRow2 = stringToPrecomputedChunk('">');
|
2116
|
+
var endSegmentTableRow = stringToPrecomputedChunk('</tr></table>');
|
2117
|
+
var startSegmentColGroup = stringToPrecomputedChunk('<table hidden><colgroup id="');
|
2118
|
+
var startSegmentColGroup2 = stringToPrecomputedChunk('">');
|
2119
|
+
var endSegmentColGroup = stringToPrecomputedChunk('</colgroup></table>');
|
2120
|
+
function writeStartSegment(destination, responseState, formatContext, id) {
|
2121
|
+
switch (formatContext.insertionMode) {
|
2122
|
+
case ROOT_HTML_MODE:
|
2123
|
+
case HTML_MODE:
|
2124
|
+
{
|
2125
|
+
writeChunk(destination, startSegmentHTML);
|
2126
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2127
|
+
writeChunk(destination, stringToChunk(id.toString(16)));
|
2128
|
+
return writeChunkAndReturn(destination, startSegmentHTML2);
|
2129
|
+
}
|
2130
|
+
case SVG_MODE:
|
2131
|
+
{
|
2132
|
+
writeChunk(destination, startSegmentSVG);
|
2133
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2134
|
+
writeChunk(destination, stringToChunk(id.toString(16)));
|
2135
|
+
return writeChunkAndReturn(destination, startSegmentSVG2);
|
2136
|
+
}
|
2137
|
+
case MATHML_MODE:
|
2138
|
+
{
|
2139
|
+
writeChunk(destination, startSegmentMathML);
|
2140
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2141
|
+
writeChunk(destination, stringToChunk(id.toString(16)));
|
2142
|
+
return writeChunkAndReturn(destination, startSegmentMathML2);
|
2143
|
+
}
|
2144
|
+
case HTML_TABLE_MODE:
|
2145
|
+
{
|
2146
|
+
writeChunk(destination, startSegmentTable);
|
2147
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2148
|
+
writeChunk(destination, stringToChunk(id.toString(16)));
|
2149
|
+
return writeChunkAndReturn(destination, startSegmentTable2);
|
2150
|
+
}
|
2151
|
+
case HTML_TABLE_BODY_MODE:
|
2152
|
+
{
|
2153
|
+
writeChunk(destination, startSegmentTableBody);
|
2154
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2155
|
+
writeChunk(destination, stringToChunk(id.toString(16)));
|
2156
|
+
return writeChunkAndReturn(destination, startSegmentTableBody2);
|
2157
|
+
}
|
2158
|
+
case HTML_TABLE_ROW_MODE:
|
2159
|
+
{
|
2160
|
+
writeChunk(destination, startSegmentTableRow);
|
2161
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2162
|
+
writeChunk(destination, stringToChunk(id.toString(16)));
|
2163
|
+
return writeChunkAndReturn(destination, startSegmentTableRow2);
|
2164
|
+
}
|
2165
|
+
case HTML_COLGROUP_MODE:
|
2166
|
+
{
|
2167
|
+
writeChunk(destination, startSegmentColGroup);
|
2168
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2169
|
+
writeChunk(destination, stringToChunk(id.toString(16)));
|
2170
|
+
return writeChunkAndReturn(destination, startSegmentColGroup2);
|
2171
|
+
}
|
2172
|
+
default:
|
2173
|
+
{
|
2174
|
+
throw new Error('Unknown insertion mode. This is a bug in React.');
|
2175
|
+
}
|
2176
|
+
}
|
2177
|
+
}
|
2178
|
+
function writeEndSegment(destination, formatContext) {
|
2179
|
+
switch (formatContext.insertionMode) {
|
2180
|
+
case ROOT_HTML_MODE:
|
2181
|
+
case HTML_MODE:
|
2182
|
+
{
|
2183
|
+
return writeChunkAndReturn(destination, endSegmentHTML);
|
2184
|
+
}
|
2185
|
+
case SVG_MODE:
|
2186
|
+
{
|
2187
|
+
return writeChunkAndReturn(destination, endSegmentSVG);
|
2188
|
+
}
|
2189
|
+
case MATHML_MODE:
|
2190
|
+
{
|
2191
|
+
return writeChunkAndReturn(destination, endSegmentMathML);
|
2192
|
+
}
|
2193
|
+
case HTML_TABLE_MODE:
|
2194
|
+
{
|
2195
|
+
return writeChunkAndReturn(destination, endSegmentTable);
|
2196
|
+
}
|
2197
|
+
case HTML_TABLE_BODY_MODE:
|
2198
|
+
{
|
2199
|
+
return writeChunkAndReturn(destination, endSegmentTableBody);
|
2200
|
+
}
|
2201
|
+
case HTML_TABLE_ROW_MODE:
|
2202
|
+
{
|
2203
|
+
return writeChunkAndReturn(destination, endSegmentTableRow);
|
2204
|
+
}
|
2205
|
+
case HTML_COLGROUP_MODE:
|
2206
|
+
{
|
2207
|
+
return writeChunkAndReturn(destination, endSegmentColGroup);
|
2208
|
+
}
|
2209
|
+
default:
|
2210
|
+
{
|
2211
|
+
throw new Error('Unknown insertion mode. This is a bug in React.');
|
2212
|
+
}
|
2213
|
+
}
|
2214
|
+
}
|
2215
|
+
var completeSegmentFunction = 'function $RS(a,b){a=document.getElementById(a);b=document.getElementById(b);for(a.parentNode.removeChild(a);a.firstChild;)b.parentNode.insertBefore(a.firstChild,b);b.parentNode.removeChild(b)}';
|
2216
|
+
var completeBoundaryFunction = 'function $RC(a,b){a=document.getElementById(a);b=document.getElementById(b);b.parentNode.removeChild(b);if(a){a=a.previousSibling;var f=a.parentNode,c=a.nextSibling,e=0;do{if(c&&8===c.nodeType){var d=c.data;if("/$"===d)if(0===e)break;else e--;else"$"!==d&&"$?"!==d&&"$!"!==d||e++}d=c.nextSibling;f.removeChild(c);c=d}while(c);for(;b.firstChild;)f.insertBefore(b.firstChild,c);a.data="$";a._reactRetry&&a._reactRetry()}}';
|
2217
|
+
var clientRenderFunction = 'function $RX(a){if(a=document.getElementById(a))a=a.previousSibling,a.data="$!",a._reactRetry&&a._reactRetry()}';
|
2218
|
+
var completeSegmentScript1Full = stringToPrecomputedChunk(completeSegmentFunction + ';$RS("');
|
2219
|
+
var completeSegmentScript1Partial = stringToPrecomputedChunk('$RS("');
|
2220
|
+
var completeSegmentScript2 = stringToPrecomputedChunk('","');
|
2221
|
+
var completeSegmentScript3 = stringToPrecomputedChunk('")</script>');
|
2222
|
+
function writeCompletedSegmentInstruction(destination, responseState, contentSegmentID) {
|
2223
|
+
writeChunk(destination, responseState.startInlineScript);
|
2224
|
+
if (!responseState.sentCompleteSegmentFunction) {
|
2225
|
+
responseState.sentCompleteSegmentFunction = true;
|
2226
|
+
writeChunk(destination, completeSegmentScript1Full);
|
2227
|
+
} else {
|
2228
|
+
writeChunk(destination, completeSegmentScript1Partial);
|
2229
|
+
}
|
2230
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2231
|
+
var formattedID = stringToChunk(contentSegmentID.toString(16));
|
2232
|
+
writeChunk(destination, formattedID);
|
2233
|
+
writeChunk(destination, completeSegmentScript2);
|
2234
|
+
writeChunk(destination, responseState.placeholderPrefix);
|
2235
|
+
writeChunk(destination, formattedID);
|
2236
|
+
return writeChunkAndReturn(destination, completeSegmentScript3);
|
2237
|
+
}
|
2238
|
+
var completeBoundaryScript1Full = stringToPrecomputedChunk(completeBoundaryFunction + ';$RC("');
|
2239
|
+
var completeBoundaryScript1Partial = stringToPrecomputedChunk('$RC("');
|
2240
|
+
var completeBoundaryScript2 = stringToPrecomputedChunk('","');
|
2241
|
+
var completeBoundaryScript3 = stringToPrecomputedChunk('")</script>');
|
2242
|
+
function writeCompletedBoundaryInstruction(destination, responseState, boundaryID, contentSegmentID) {
|
2243
|
+
writeChunk(destination, responseState.startInlineScript);
|
2244
|
+
if (!responseState.sentCompleteBoundaryFunction) {
|
2245
|
+
responseState.sentCompleteBoundaryFunction = true;
|
2246
|
+
writeChunk(destination, completeBoundaryScript1Full);
|
2247
|
+
} else {
|
2248
|
+
writeChunk(destination, completeBoundaryScript1Partial);
|
2249
|
+
}
|
2250
|
+
if (boundaryID === null) {
|
2251
|
+
throw new Error('An ID must have been assigned before we can complete the boundary.');
|
2252
|
+
}
|
2253
|
+
var formattedContentID = stringToChunk(contentSegmentID.toString(16));
|
2254
|
+
writeChunk(destination, boundaryID);
|
2255
|
+
writeChunk(destination, completeBoundaryScript2);
|
2256
|
+
writeChunk(destination, responseState.segmentPrefix);
|
2257
|
+
writeChunk(destination, formattedContentID);
|
2258
|
+
return writeChunkAndReturn(destination, completeBoundaryScript3);
|
2259
|
+
}
|
2260
|
+
var clientRenderScript1Full = stringToPrecomputedChunk(clientRenderFunction + ';$RX("');
|
2261
|
+
var clientRenderScript1Partial = stringToPrecomputedChunk('$RX("');
|
2262
|
+
var clientRenderScript2 = stringToPrecomputedChunk('")</script>');
|
2263
|
+
function writeClientRenderBoundaryInstruction(destination, responseState, boundaryID) {
|
2264
|
+
writeChunk(destination, responseState.startInlineScript);
|
2265
|
+
if (!responseState.sentClientRenderFunction) {
|
2266
|
+
responseState.sentClientRenderFunction = true;
|
2267
|
+
writeChunk(destination, clientRenderScript1Full);
|
2268
|
+
} else {
|
2269
|
+
writeChunk(destination, clientRenderScript1Partial);
|
2270
|
+
}
|
2271
|
+
if (boundaryID === null) {
|
2272
|
+
throw new Error('An ID must have been assigned before we can complete the boundary.');
|
2273
|
+
}
|
2274
|
+
writeChunk(destination, boundaryID);
|
2275
|
+
return writeChunkAndReturn(destination, clientRenderScript2);
|
2276
|
+
}
|
2277
|
+
function createResponseState$1(generateStaticMarkup, identifierPrefix) {
|
2278
|
+
var responseState = createResponseState(identifierPrefix, undefined);
|
2279
|
+
return {
|
2280
|
+
bootstrapChunks: responseState.bootstrapChunks,
|
2281
|
+
startInlineScript: responseState.startInlineScript,
|
2282
|
+
placeholderPrefix: responseState.placeholderPrefix,
|
2283
|
+
segmentPrefix: responseState.segmentPrefix,
|
2284
|
+
boundaryPrefix: responseState.boundaryPrefix,
|
2285
|
+
idPrefix: responseState.idPrefix,
|
2286
|
+
nextSuspenseID: responseState.nextSuspenseID,
|
2287
|
+
sentCompleteSegmentFunction: responseState.sentCompleteSegmentFunction,
|
2288
|
+
sentCompleteBoundaryFunction: responseState.sentCompleteBoundaryFunction,
|
2289
|
+
sentClientRenderFunction: responseState.sentClientRenderFunction,
|
2290
|
+
generateStaticMarkup: generateStaticMarkup
|
2291
|
+
};
|
2292
|
+
}
|
2293
|
+
function createRootFormatContext() {
|
2294
|
+
return {
|
2295
|
+
insertionMode: HTML_MODE,
|
2296
|
+
selectedValue: null
|
2297
|
+
};
|
2298
|
+
}
|
2299
|
+
function pushTextInstance$1(target, text, responseState) {
|
2300
|
+
if (responseState.generateStaticMarkup) {
|
2301
|
+
target.push(stringToChunk(escapeTextForBrowser(text)));
|
2302
|
+
} else {
|
2303
|
+
pushTextInstance(target, text);
|
2304
|
+
}
|
2305
|
+
}
|
2306
|
+
function writeStartCompletedSuspenseBoundary$1(destination, responseState) {
|
2307
|
+
if (responseState.generateStaticMarkup) {
|
2308
|
+
return true;
|
2309
|
+
}
|
2310
|
+
return writeStartCompletedSuspenseBoundary(destination);
|
2311
|
+
}
|
2312
|
+
function writeStartClientRenderedSuspenseBoundary$1(destination, responseState) {
|
2313
|
+
if (responseState.generateStaticMarkup) {
|
2314
|
+
return true;
|
2315
|
+
}
|
2316
|
+
return writeStartClientRenderedSuspenseBoundary(destination);
|
2317
|
+
}
|
2318
|
+
function writeEndCompletedSuspenseBoundary$1(destination, responseState) {
|
2319
|
+
if (responseState.generateStaticMarkup) {
|
2320
|
+
return true;
|
2321
|
+
}
|
2322
|
+
return writeEndCompletedSuspenseBoundary(destination);
|
2323
|
+
}
|
2324
|
+
function writeEndClientRenderedSuspenseBoundary$1(destination, responseState) {
|
2325
|
+
if (responseState.generateStaticMarkup) {
|
2326
|
+
return true;
|
2327
|
+
}
|
2328
|
+
return writeEndClientRenderedSuspenseBoundary(destination);
|
2329
|
+
}
|
2330
|
+
var assign = Object.assign;
|
2331
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
2332
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
2333
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
2334
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
2335
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
2336
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
2337
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
2338
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
2339
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
2340
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
2341
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
2342
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
2343
|
+
var REACT_SCOPE_TYPE = Symbol.for('react.scope');
|
2344
|
+
var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for('react.debug_trace_mode');
|
2345
|
+
var REACT_LEGACY_HIDDEN_TYPE = Symbol.for('react.legacy_hidden');
|
2346
|
+
var REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED = Symbol.for('react.default_value');
|
2347
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
2348
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
2349
|
+
function getIteratorFn(maybeIterable) {
|
2350
|
+
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
2351
|
+
return null;
|
2352
|
+
}
|
2353
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
2354
|
+
if (typeof maybeIterator === 'function') {
|
2355
|
+
return maybeIterator;
|
2356
|
+
}
|
2357
|
+
return null;
|
2358
|
+
}
|
2359
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
2360
|
+
var displayName = outerType.displayName;
|
2361
|
+
if (displayName) {
|
2362
|
+
return displayName;
|
2363
|
+
}
|
2364
|
+
var functionName = innerType.displayName || innerType.name || '';
|
2365
|
+
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
2366
|
+
}
|
2367
|
+
function getContextName(type) {
|
2368
|
+
return type.displayName || 'Context';
|
2369
|
+
}
|
2370
|
+
function getComponentNameFromType(type) {
|
2371
|
+
if (type == null) {
|
2372
|
+
return null;
|
2373
|
+
}
|
2374
|
+
{
|
2375
|
+
if (typeof type.tag === 'number') {
|
2376
|
+
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
2377
|
+
}
|
2378
|
+
}
|
2379
|
+
if (typeof type === 'function') {
|
2380
|
+
return type.displayName || type.name || null;
|
2381
|
+
}
|
2382
|
+
if (typeof type === 'string') {
|
2383
|
+
return type;
|
2384
|
+
}
|
2385
|
+
switch (type) {
|
2386
|
+
case REACT_FRAGMENT_TYPE:
|
2387
|
+
return 'Fragment';
|
2388
|
+
case REACT_PORTAL_TYPE:
|
2389
|
+
return 'Portal';
|
2390
|
+
case REACT_PROFILER_TYPE:
|
2391
|
+
return 'Profiler';
|
2392
|
+
case REACT_STRICT_MODE_TYPE:
|
2393
|
+
return 'StrictMode';
|
2394
|
+
case REACT_SUSPENSE_TYPE:
|
2395
|
+
return 'Suspense';
|
2396
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
2397
|
+
return 'SuspenseList';
|
2398
|
+
}
|
2399
|
+
if (typeof type === 'object') {
|
2400
|
+
switch (type.$$typeof) {
|
2401
|
+
case REACT_CONTEXT_TYPE:
|
2402
|
+
var context = type;
|
2403
|
+
return getContextName(context) + '.Consumer';
|
2404
|
+
case REACT_PROVIDER_TYPE:
|
2405
|
+
var provider = type;
|
2406
|
+
return getContextName(provider._context) + '.Provider';
|
2407
|
+
case REACT_FORWARD_REF_TYPE:
|
2408
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
2409
|
+
case REACT_MEMO_TYPE:
|
2410
|
+
var outerName = type.displayName || null;
|
2411
|
+
if (outerName !== null) {
|
2412
|
+
return outerName;
|
2413
|
+
}
|
2414
|
+
return getComponentNameFromType(type.type) || 'Memo';
|
2415
|
+
case REACT_LAZY_TYPE:
|
2416
|
+
{
|
2417
|
+
var lazyComponent = type;
|
2418
|
+
var payload = lazyComponent._payload;
|
2419
|
+
var init = lazyComponent._init;
|
2420
|
+
try {
|
2421
|
+
return getComponentNameFromType(init(payload));
|
2422
|
+
} catch (x) {
|
2423
|
+
return null;
|
2424
|
+
}
|
2425
|
+
}
|
2426
|
+
}
|
2427
|
+
}
|
2428
|
+
return null;
|
2429
|
+
}
|
2430
|
+
var disabledDepth = 0;
|
2431
|
+
var prevLog;
|
2432
|
+
var prevInfo;
|
2433
|
+
var prevWarn;
|
2434
|
+
var prevError;
|
2435
|
+
var prevGroup;
|
2436
|
+
var prevGroupCollapsed;
|
2437
|
+
var prevGroupEnd;
|
2438
|
+
function disabledLog() {}
|
2439
|
+
disabledLog.__reactDisabledLog = true;
|
2440
|
+
function disableLogs() {
|
2441
|
+
{
|
2442
|
+
if (disabledDepth === 0) {
|
2443
|
+
prevLog = console.log;
|
2444
|
+
prevInfo = console.info;
|
2445
|
+
prevWarn = console.warn;
|
2446
|
+
prevError = console.error;
|
2447
|
+
prevGroup = console.group;
|
2448
|
+
prevGroupCollapsed = console.groupCollapsed;
|
2449
|
+
prevGroupEnd = console.groupEnd;
|
2450
|
+
var props = {
|
2451
|
+
configurable: true,
|
2452
|
+
enumerable: true,
|
2453
|
+
value: disabledLog,
|
2454
|
+
writable: true
|
2455
|
+
};
|
2456
|
+
Object.defineProperties(console, {
|
2457
|
+
info: props,
|
2458
|
+
log: props,
|
2459
|
+
warn: props,
|
2460
|
+
error: props,
|
2461
|
+
group: props,
|
2462
|
+
groupCollapsed: props,
|
2463
|
+
groupEnd: props
|
2464
|
+
});
|
2465
|
+
}
|
2466
|
+
disabledDepth++;
|
2467
|
+
}
|
2468
|
+
}
|
2469
|
+
function reenableLogs() {
|
2470
|
+
{
|
2471
|
+
disabledDepth--;
|
2472
|
+
if (disabledDepth === 0) {
|
2473
|
+
var props = {
|
2474
|
+
configurable: true,
|
2475
|
+
enumerable: true,
|
2476
|
+
writable: true
|
2477
|
+
};
|
2478
|
+
Object.defineProperties(console, {
|
2479
|
+
log: assign({}, props, {value: prevLog}),
|
2480
|
+
info: assign({}, props, {value: prevInfo}),
|
2481
|
+
warn: assign({}, props, {value: prevWarn}),
|
2482
|
+
error: assign({}, props, {value: prevError}),
|
2483
|
+
group: assign({}, props, {value: prevGroup}),
|
2484
|
+
groupCollapsed: assign({}, props, {value: prevGroupCollapsed}),
|
2485
|
+
groupEnd: assign({}, props, {value: prevGroupEnd})
|
2486
|
+
});
|
2487
|
+
}
|
2488
|
+
if (disabledDepth < 0) {
|
2489
|
+
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
2490
|
+
}
|
2491
|
+
}
|
2492
|
+
}
|
2493
|
+
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
|
2494
|
+
var prefix;
|
2495
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
2496
|
+
{
|
2497
|
+
if (prefix === undefined) {
|
2498
|
+
try {
|
2499
|
+
throw Error();
|
2500
|
+
} catch (x) {
|
2501
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
2502
|
+
prefix = match && match[1] || '';
|
2503
|
+
}
|
2504
|
+
}
|
2505
|
+
return '\n' + prefix + name;
|
2506
|
+
}
|
2507
|
+
}
|
2508
|
+
var reentry = false;
|
2509
|
+
var componentFrameCache;
|
2510
|
+
{
|
2511
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
2512
|
+
componentFrameCache = new PossiblyWeakMap();
|
2513
|
+
}
|
2514
|
+
function describeNativeComponentFrame(fn, construct) {
|
2515
|
+
if (!fn || reentry) {
|
2516
|
+
return '';
|
2517
|
+
}
|
2518
|
+
{
|
2519
|
+
var frame = componentFrameCache.get(fn);
|
2520
|
+
if (frame !== undefined) {
|
2521
|
+
return frame;
|
2522
|
+
}
|
2523
|
+
}
|
2524
|
+
var control;
|
2525
|
+
reentry = true;
|
2526
|
+
var previousPrepareStackTrace = Error.prepareStackTrace;
|
2527
|
+
Error.prepareStackTrace = undefined;
|
2528
|
+
var previousDispatcher;
|
2529
|
+
{
|
2530
|
+
previousDispatcher = ReactCurrentDispatcher.current;
|
2531
|
+
ReactCurrentDispatcher.current = null;
|
2532
|
+
disableLogs();
|
2533
|
+
}
|
2534
|
+
try {
|
2535
|
+
if (construct) {
|
2536
|
+
var Fake = function() {
|
2537
|
+
throw Error();
|
2538
|
+
};
|
2539
|
+
Object.defineProperty(Fake.prototype, 'props', {set: function() {
|
2540
|
+
throw Error();
|
2541
|
+
}});
|
2542
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
2543
|
+
try {
|
2544
|
+
Reflect.construct(Fake, []);
|
2545
|
+
} catch (x) {
|
2546
|
+
control = x;
|
2547
|
+
}
|
2548
|
+
Reflect.construct(fn, [], Fake);
|
2549
|
+
} else {
|
2550
|
+
try {
|
2551
|
+
Fake.call();
|
2552
|
+
} catch (x) {
|
2553
|
+
control = x;
|
2554
|
+
}
|
2555
|
+
fn.call(Fake.prototype);
|
2556
|
+
}
|
2557
|
+
} else {
|
2558
|
+
try {
|
2559
|
+
throw Error();
|
2560
|
+
} catch (x) {
|
2561
|
+
control = x;
|
2562
|
+
}
|
2563
|
+
fn();
|
2564
|
+
}
|
2565
|
+
} catch (sample) {
|
2566
|
+
if (sample && control && typeof sample.stack === 'string') {
|
2567
|
+
var sampleLines = sample.stack.split('\n');
|
2568
|
+
var controlLines = control.stack.split('\n');
|
2569
|
+
var s = sampleLines.length - 1;
|
2570
|
+
var c = controlLines.length - 1;
|
2571
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
2572
|
+
c--;
|
2573
|
+
}
|
2574
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
2575
|
+
if (sampleLines[s] !== controlLines[c]) {
|
2576
|
+
if (s !== 1 || c !== 1) {
|
2577
|
+
do {
|
2578
|
+
s--;
|
2579
|
+
c--;
|
2580
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
2581
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
|
2582
|
+
if (fn.displayName && _frame.includes('<anonymous>')) {
|
2583
|
+
_frame = _frame.replace('<anonymous>', fn.displayName);
|
2584
|
+
}
|
2585
|
+
{
|
2586
|
+
if (typeof fn === 'function') {
|
2587
|
+
componentFrameCache.set(fn, _frame);
|
2588
|
+
}
|
2589
|
+
}
|
2590
|
+
return _frame;
|
2591
|
+
}
|
2592
|
+
} while (s >= 1 && c >= 0);
|
2593
|
+
}
|
2594
|
+
break;
|
2595
|
+
}
|
2596
|
+
}
|
2597
|
+
}
|
2598
|
+
} finally {
|
2599
|
+
reentry = false;
|
2600
|
+
{
|
2601
|
+
ReactCurrentDispatcher.current = previousDispatcher;
|
2602
|
+
reenableLogs();
|
2603
|
+
}
|
2604
|
+
Error.prepareStackTrace = previousPrepareStackTrace;
|
2605
|
+
}
|
2606
|
+
var name = fn ? fn.displayName || fn.name : '';
|
2607
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
2608
|
+
{
|
2609
|
+
if (typeof fn === 'function') {
|
2610
|
+
componentFrameCache.set(fn, syntheticFrame);
|
2611
|
+
}
|
2612
|
+
}
|
2613
|
+
return syntheticFrame;
|
2614
|
+
}
|
2615
|
+
function describeClassComponentFrame(ctor, source, ownerFn) {
|
2616
|
+
{
|
2617
|
+
return describeNativeComponentFrame(ctor, true);
|
2618
|
+
}
|
2619
|
+
}
|
2620
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
2621
|
+
{
|
2622
|
+
return describeNativeComponentFrame(fn, false);
|
2623
|
+
}
|
2624
|
+
}
|
2625
|
+
function shouldConstruct(Component) {
|
2626
|
+
var prototype = Component.prototype;
|
2627
|
+
return !!(prototype && prototype.isReactComponent);
|
2628
|
+
}
|
2629
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
2630
|
+
if (type == null) {
|
2631
|
+
return '';
|
2632
|
+
}
|
2633
|
+
if (typeof type === 'function') {
|
2634
|
+
{
|
2635
|
+
return describeNativeComponentFrame(type, shouldConstruct(type));
|
2636
|
+
}
|
2637
|
+
}
|
2638
|
+
if (typeof type === 'string') {
|
2639
|
+
return describeBuiltInComponentFrame(type);
|
2640
|
+
}
|
2641
|
+
switch (type) {
|
2642
|
+
case REACT_SUSPENSE_TYPE:
|
2643
|
+
return describeBuiltInComponentFrame('Suspense');
|
2644
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
2645
|
+
return describeBuiltInComponentFrame('SuspenseList');
|
2646
|
+
}
|
2647
|
+
if (typeof type === 'object') {
|
2648
|
+
switch (type.$$typeof) {
|
2649
|
+
case REACT_FORWARD_REF_TYPE:
|
2650
|
+
return describeFunctionComponentFrame(type.render);
|
2651
|
+
case REACT_MEMO_TYPE:
|
2652
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
2653
|
+
case REACT_LAZY_TYPE:
|
2654
|
+
{
|
2655
|
+
var lazyComponent = type;
|
2656
|
+
var payload = lazyComponent._payload;
|
2657
|
+
var init = lazyComponent._init;
|
2658
|
+
try {
|
2659
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
2660
|
+
} catch (x) {}
|
2661
|
+
}
|
2662
|
+
}
|
2663
|
+
}
|
2664
|
+
return '';
|
2665
|
+
}
|
2666
|
+
var loggedTypeFailures = {};
|
2667
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
2668
|
+
function setCurrentlyValidatingElement(element) {
|
2669
|
+
{
|
2670
|
+
if (element) {
|
2671
|
+
var owner = element._owner;
|
2672
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
2673
|
+
ReactDebugCurrentFrame.setExtraStackFrame(stack);
|
2674
|
+
} else {
|
2675
|
+
ReactDebugCurrentFrame.setExtraStackFrame(null);
|
2676
|
+
}
|
2677
|
+
}
|
2678
|
+
}
|
2679
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
2680
|
+
{
|
2681
|
+
var has = Function.call.bind(hasOwnProperty);
|
2682
|
+
for (var typeSpecName in typeSpecs) {
|
2683
|
+
if (has(typeSpecs, typeSpecName)) {
|
2684
|
+
var error$1 = void 0;
|
2685
|
+
try {
|
2686
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
2687
|
+
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
2688
|
+
err.name = 'Invariant Violation';
|
2689
|
+
throw err;
|
2690
|
+
}
|
2691
|
+
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
2692
|
+
} catch (ex) {
|
2693
|
+
error$1 = ex;
|
2694
|
+
}
|
2695
|
+
if (error$1 && !(error$1 instanceof Error)) {
|
2696
|
+
setCurrentlyValidatingElement(element);
|
2697
|
+
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$1);
|
2698
|
+
setCurrentlyValidatingElement(null);
|
2699
|
+
}
|
2700
|
+
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
2701
|
+
loggedTypeFailures[error$1.message] = true;
|
2702
|
+
setCurrentlyValidatingElement(element);
|
2703
|
+
error('Failed %s type: %s', location, error$1.message);
|
2704
|
+
setCurrentlyValidatingElement(null);
|
2705
|
+
}
|
2706
|
+
}
|
2707
|
+
}
|
2708
|
+
}
|
2709
|
+
}
|
2710
|
+
var warnedAboutMissingGetChildContext;
|
2711
|
+
{
|
2712
|
+
warnedAboutMissingGetChildContext = {};
|
2713
|
+
}
|
2714
|
+
var emptyContextObject = {};
|
2715
|
+
{
|
2716
|
+
Object.freeze(emptyContextObject);
|
2717
|
+
}
|
2718
|
+
function getMaskedContext(type, unmaskedContext) {
|
2719
|
+
{
|
2720
|
+
var contextTypes = type.contextTypes;
|
2721
|
+
if (!contextTypes) {
|
2722
|
+
return emptyContextObject;
|
2723
|
+
}
|
2724
|
+
var context = {};
|
2725
|
+
for (var key in contextTypes) {
|
2726
|
+
context[key] = unmaskedContext[key];
|
2727
|
+
}
|
2728
|
+
{
|
2729
|
+
var name = getComponentNameFromType(type) || 'Unknown';
|
2730
|
+
checkPropTypes(contextTypes, context, 'context', name);
|
2731
|
+
}
|
2732
|
+
return context;
|
2733
|
+
}
|
2734
|
+
}
|
2735
|
+
function processChildContext(instance, type, parentContext, childContextTypes) {
|
2736
|
+
{
|
2737
|
+
if (typeof instance.getChildContext !== 'function') {
|
2738
|
+
{
|
2739
|
+
var componentName = getComponentNameFromType(type) || 'Unknown';
|
2740
|
+
if (!warnedAboutMissingGetChildContext[componentName]) {
|
2741
|
+
warnedAboutMissingGetChildContext[componentName] = true;
|
2742
|
+
error('%s.childContextTypes is specified but there is no getChildContext() method ' + 'on the instance. You can either define getChildContext() on %s or remove ' + 'childContextTypes from it.', componentName, componentName);
|
2743
|
+
}
|
2744
|
+
}
|
2745
|
+
return parentContext;
|
2746
|
+
}
|
2747
|
+
var childContext = instance.getChildContext();
|
2748
|
+
for (var contextKey in childContext) {
|
2749
|
+
if (!(contextKey in childContextTypes)) {
|
2750
|
+
throw new Error((getComponentNameFromType(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes.");
|
2751
|
+
}
|
2752
|
+
}
|
2753
|
+
{
|
2754
|
+
var name = getComponentNameFromType(type) || 'Unknown';
|
2755
|
+
checkPropTypes(childContextTypes, childContext, 'child context', name);
|
2756
|
+
}
|
2757
|
+
return assign({}, parentContext, childContext);
|
2758
|
+
}
|
2759
|
+
}
|
2760
|
+
var rendererSigil;
|
2761
|
+
{
|
2762
|
+
rendererSigil = {};
|
2763
|
+
}
|
2764
|
+
var rootContextSnapshot = null;
|
2765
|
+
var currentActiveSnapshot = null;
|
2766
|
+
function popNode(prev) {
|
2767
|
+
{
|
2768
|
+
prev.context._currentValue2 = prev.parentValue;
|
2769
|
+
}
|
2770
|
+
}
|
2771
|
+
function pushNode(next) {
|
2772
|
+
{
|
2773
|
+
next.context._currentValue2 = next.value;
|
2774
|
+
}
|
2775
|
+
}
|
2776
|
+
function popToNearestCommonAncestor(prev, next) {
|
2777
|
+
if (prev === next)
|
2778
|
+
;
|
2779
|
+
else {
|
2780
|
+
popNode(prev);
|
2781
|
+
var parentPrev = prev.parent;
|
2782
|
+
var parentNext = next.parent;
|
2783
|
+
if (parentPrev === null) {
|
2784
|
+
if (parentNext !== null) {
|
2785
|
+
throw new Error('The stacks must reach the root at the same time. This is a bug in React.');
|
2786
|
+
}
|
2787
|
+
} else {
|
2788
|
+
if (parentNext === null) {
|
2789
|
+
throw new Error('The stacks must reach the root at the same time. This is a bug in React.');
|
2790
|
+
}
|
2791
|
+
popToNearestCommonAncestor(parentPrev, parentNext);
|
2792
|
+
}
|
2793
|
+
pushNode(next);
|
2794
|
+
}
|
2795
|
+
}
|
2796
|
+
function popAllPrevious(prev) {
|
2797
|
+
popNode(prev);
|
2798
|
+
var parentPrev = prev.parent;
|
2799
|
+
if (parentPrev !== null) {
|
2800
|
+
popAllPrevious(parentPrev);
|
2801
|
+
}
|
2802
|
+
}
|
2803
|
+
function pushAllNext(next) {
|
2804
|
+
var parentNext = next.parent;
|
2805
|
+
if (parentNext !== null) {
|
2806
|
+
pushAllNext(parentNext);
|
2807
|
+
}
|
2808
|
+
pushNode(next);
|
2809
|
+
}
|
2810
|
+
function popPreviousToCommonLevel(prev, next) {
|
2811
|
+
popNode(prev);
|
2812
|
+
var parentPrev = prev.parent;
|
2813
|
+
if (parentPrev === null) {
|
2814
|
+
throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');
|
2815
|
+
}
|
2816
|
+
if (parentPrev.depth === next.depth) {
|
2817
|
+
popToNearestCommonAncestor(parentPrev, next);
|
2818
|
+
} else {
|
2819
|
+
popPreviousToCommonLevel(parentPrev, next);
|
2820
|
+
}
|
2821
|
+
}
|
2822
|
+
function popNextToCommonLevel(prev, next) {
|
2823
|
+
var parentNext = next.parent;
|
2824
|
+
if (parentNext === null) {
|
2825
|
+
throw new Error('The depth must equal at least at zero before reaching the root. This is a bug in React.');
|
2826
|
+
}
|
2827
|
+
if (prev.depth === parentNext.depth) {
|
2828
|
+
popToNearestCommonAncestor(prev, parentNext);
|
2829
|
+
} else {
|
2830
|
+
popNextToCommonLevel(prev, parentNext);
|
2831
|
+
}
|
2832
|
+
pushNode(next);
|
2833
|
+
}
|
2834
|
+
function switchContext(newSnapshot) {
|
2835
|
+
var prev = currentActiveSnapshot;
|
2836
|
+
var next = newSnapshot;
|
2837
|
+
if (prev !== next) {
|
2838
|
+
if (prev === null) {
|
2839
|
+
pushAllNext(next);
|
2840
|
+
} else if (next === null) {
|
2841
|
+
popAllPrevious(prev);
|
2842
|
+
} else if (prev.depth === next.depth) {
|
2843
|
+
popToNearestCommonAncestor(prev, next);
|
2844
|
+
} else if (prev.depth > next.depth) {
|
2845
|
+
popPreviousToCommonLevel(prev, next);
|
2846
|
+
} else {
|
2847
|
+
popNextToCommonLevel(prev, next);
|
2848
|
+
}
|
2849
|
+
currentActiveSnapshot = next;
|
2850
|
+
}
|
2851
|
+
}
|
2852
|
+
function pushProvider(context, nextValue) {
|
2853
|
+
var prevValue;
|
2854
|
+
{
|
2855
|
+
prevValue = context._currentValue2;
|
2856
|
+
context._currentValue2 = nextValue;
|
2857
|
+
{
|
2858
|
+
if (context._currentRenderer2 !== undefined && context._currentRenderer2 !== null && context._currentRenderer2 !== rendererSigil) {
|
2859
|
+
error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
|
2860
|
+
}
|
2861
|
+
context._currentRenderer2 = rendererSigil;
|
2862
|
+
}
|
2863
|
+
}
|
2864
|
+
var prevNode = currentActiveSnapshot;
|
2865
|
+
var newNode = {
|
2866
|
+
parent: prevNode,
|
2867
|
+
depth: prevNode === null ? 0 : prevNode.depth + 1,
|
2868
|
+
context: context,
|
2869
|
+
parentValue: prevValue,
|
2870
|
+
value: nextValue
|
2871
|
+
};
|
2872
|
+
currentActiveSnapshot = newNode;
|
2873
|
+
return newNode;
|
2874
|
+
}
|
2875
|
+
function popProvider(context) {
|
2876
|
+
var prevSnapshot = currentActiveSnapshot;
|
2877
|
+
if (prevSnapshot === null) {
|
2878
|
+
throw new Error('Tried to pop a Context at the root of the app. This is a bug in React.');
|
2879
|
+
}
|
2880
|
+
{
|
2881
|
+
if (prevSnapshot.context !== context) {
|
2882
|
+
error('The parent context is not the expected context. This is probably a bug in React.');
|
2883
|
+
}
|
2884
|
+
}
|
2885
|
+
{
|
2886
|
+
var _value = prevSnapshot.parentValue;
|
2887
|
+
if (_value === REACT_SERVER_CONTEXT_DEFAULT_VALUE_NOT_LOADED) {
|
2888
|
+
prevSnapshot.context._currentValue2 = prevSnapshot.context._defaultValue;
|
2889
|
+
} else {
|
2890
|
+
prevSnapshot.context._currentValue2 = _value;
|
2891
|
+
}
|
2892
|
+
{
|
2893
|
+
if (context._currentRenderer2 !== undefined && context._currentRenderer2 !== null && context._currentRenderer2 !== rendererSigil) {
|
2894
|
+
error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
|
2895
|
+
}
|
2896
|
+
context._currentRenderer2 = rendererSigil;
|
2897
|
+
}
|
2898
|
+
}
|
2899
|
+
return currentActiveSnapshot = prevSnapshot.parent;
|
2900
|
+
}
|
2901
|
+
function getActiveContext() {
|
2902
|
+
return currentActiveSnapshot;
|
2903
|
+
}
|
2904
|
+
function readContext(context) {
|
2905
|
+
var value = context._currentValue2;
|
2906
|
+
return value;
|
2907
|
+
}
|
2908
|
+
function get(key) {
|
2909
|
+
return key._reactInternals;
|
2910
|
+
}
|
2911
|
+
function set(key, value) {
|
2912
|
+
key._reactInternals = value;
|
2913
|
+
}
|
2914
|
+
var didWarnAboutNoopUpdateForComponent = {};
|
2915
|
+
var didWarnAboutDeprecatedWillMount = {};
|
2916
|
+
var didWarnAboutUninitializedState;
|
2917
|
+
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
|
2918
|
+
var didWarnAboutLegacyLifecyclesAndDerivedState;
|
2919
|
+
var didWarnAboutUndefinedDerivedState;
|
2920
|
+
var warnOnUndefinedDerivedState;
|
2921
|
+
var warnOnInvalidCallback;
|
2922
|
+
var didWarnAboutDirectlyAssigningPropsToState;
|
2923
|
+
var didWarnAboutContextTypeAndContextTypes;
|
2924
|
+
var didWarnAboutInvalidateContextType;
|
2925
|
+
{
|
2926
|
+
didWarnAboutUninitializedState = new Set();
|
2927
|
+
didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
|
2928
|
+
didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
|
2929
|
+
didWarnAboutDirectlyAssigningPropsToState = new Set();
|
2930
|
+
didWarnAboutUndefinedDerivedState = new Set();
|
2931
|
+
didWarnAboutContextTypeAndContextTypes = new Set();
|
2932
|
+
didWarnAboutInvalidateContextType = new Set();
|
2933
|
+
var didWarnOnInvalidCallback = new Set();
|
2934
|
+
warnOnInvalidCallback = function(callback, callerName) {
|
2935
|
+
if (callback === null || typeof callback === 'function') {
|
2936
|
+
return;
|
2937
|
+
}
|
2938
|
+
var key = callerName + '_' + callback;
|
2939
|
+
if (!didWarnOnInvalidCallback.has(key)) {
|
2940
|
+
didWarnOnInvalidCallback.add(key);
|
2941
|
+
error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
|
2942
|
+
}
|
2943
|
+
};
|
2944
|
+
warnOnUndefinedDerivedState = function(type, partialState) {
|
2945
|
+
if (partialState === undefined) {
|
2946
|
+
var componentName = getComponentNameFromType(type) || 'Component';
|
2947
|
+
if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
|
2948
|
+
didWarnAboutUndefinedDerivedState.add(componentName);
|
2949
|
+
error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
|
2950
|
+
}
|
2951
|
+
}
|
2952
|
+
};
|
2953
|
+
}
|
2954
|
+
function warnNoop(publicInstance, callerName) {
|
2955
|
+
{
|
2956
|
+
var _constructor = publicInstance.constructor;
|
2957
|
+
var componentName = _constructor && getComponentNameFromType(_constructor) || 'ReactClass';
|
2958
|
+
var warningKey = componentName + '.' + callerName;
|
2959
|
+
if (didWarnAboutNoopUpdateForComponent[warningKey]) {
|
2960
|
+
return;
|
2961
|
+
}
|
2962
|
+
error('%s(...): Can only update a mounting component. ' + 'This usually means you called %s() outside componentWillMount() on the server. ' + 'This is a no-op.\n\nPlease check the code for the %s component.', callerName, callerName, componentName);
|
2963
|
+
didWarnAboutNoopUpdateForComponent[warningKey] = true;
|
2964
|
+
}
|
2965
|
+
}
|
2966
|
+
var classComponentUpdater = {
|
2967
|
+
isMounted: function(inst) {
|
2968
|
+
return false;
|
2969
|
+
},
|
2970
|
+
enqueueSetState: function(inst, payload, callback) {
|
2971
|
+
var internals = get(inst);
|
2972
|
+
if (internals.queue === null) {
|
2973
|
+
warnNoop(inst, 'setState');
|
2974
|
+
} else {
|
2975
|
+
internals.queue.push(payload);
|
2976
|
+
{
|
2977
|
+
if (callback !== undefined && callback !== null) {
|
2978
|
+
warnOnInvalidCallback(callback, 'setState');
|
2979
|
+
}
|
2980
|
+
}
|
2981
|
+
}
|
2982
|
+
},
|
2983
|
+
enqueueReplaceState: function(inst, payload, callback) {
|
2984
|
+
var internals = get(inst);
|
2985
|
+
internals.replace = true;
|
2986
|
+
internals.queue = [payload];
|
2987
|
+
{
|
2988
|
+
if (callback !== undefined && callback !== null) {
|
2989
|
+
warnOnInvalidCallback(callback, 'setState');
|
2990
|
+
}
|
2991
|
+
}
|
2992
|
+
},
|
2993
|
+
enqueueForceUpdate: function(inst, callback) {
|
2994
|
+
var internals = get(inst);
|
2995
|
+
if (internals.queue === null) {
|
2996
|
+
warnNoop(inst, 'forceUpdate');
|
2997
|
+
} else {
|
2998
|
+
{
|
2999
|
+
if (callback !== undefined && callback !== null) {
|
3000
|
+
warnOnInvalidCallback(callback, 'setState');
|
3001
|
+
}
|
3002
|
+
}
|
3003
|
+
}
|
3004
|
+
}
|
3005
|
+
};
|
3006
|
+
function applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, prevState, nextProps) {
|
3007
|
+
var partialState = getDerivedStateFromProps(nextProps, prevState);
|
3008
|
+
{
|
3009
|
+
warnOnUndefinedDerivedState(ctor, partialState);
|
3010
|
+
}
|
3011
|
+
var newState = partialState === null || partialState === undefined ? prevState : assign({}, prevState, partialState);
|
3012
|
+
return newState;
|
3013
|
+
}
|
3014
|
+
function constructClassInstance(ctor, props, maskedLegacyContext) {
|
3015
|
+
var context = emptyContextObject;
|
3016
|
+
var contextType = ctor.contextType;
|
3017
|
+
{
|
3018
|
+
if ('contextType' in ctor) {
|
3019
|
+
var isValid = contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined;
|
3020
|
+
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
|
3021
|
+
didWarnAboutInvalidateContextType.add(ctor);
|
3022
|
+
var addendum = '';
|
3023
|
+
if (contextType === undefined) {
|
3024
|
+
addendum = ' However, it is set to undefined. ' + 'This can be caused by a typo or by mixing up named and default imports. ' + 'This can also happen due to a circular dependency, so ' + 'try moving the createContext() call to a separate file.';
|
3025
|
+
} else if (typeof contextType !== 'object') {
|
3026
|
+
addendum = ' However, it is set to a ' + typeof contextType + '.';
|
3027
|
+
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
|
3028
|
+
addendum = ' Did you accidentally pass the Context.Provider instead?';
|
3029
|
+
} else if (contextType._context !== undefined) {
|
3030
|
+
addendum = ' Did you accidentally pass the Context.Consumer instead?';
|
3031
|
+
} else {
|
3032
|
+
addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
|
3033
|
+
}
|
3034
|
+
error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentNameFromType(ctor) || 'Component', addendum);
|
3035
|
+
}
|
3036
|
+
}
|
3037
|
+
}
|
3038
|
+
if (typeof contextType === 'object' && contextType !== null) {
|
3039
|
+
context = readContext(contextType);
|
3040
|
+
} else {
|
3041
|
+
context = maskedLegacyContext;
|
3042
|
+
}
|
3043
|
+
var instance = new ctor(props, context);
|
3044
|
+
{
|
3045
|
+
if (typeof ctor.getDerivedStateFromProps === 'function' && (instance.state === null || instance.state === undefined)) {
|
3046
|
+
var componentName = getComponentNameFromType(ctor) || 'Component';
|
3047
|
+
if (!didWarnAboutUninitializedState.has(componentName)) {
|
3048
|
+
didWarnAboutUninitializedState.add(componentName);
|
3049
|
+
error('`%s` uses `getDerivedStateFromProps` but its initial state is ' + '%s. This is not recommended. Instead, define the initial state by ' + 'assigning an object to `this.state` in the constructor of `%s`. ' + 'This ensures that `getDerivedStateFromProps` arguments have a consistent shape.', componentName, instance.state === null ? 'null' : 'undefined', componentName);
|
3050
|
+
}
|
3051
|
+
}
|
3052
|
+
if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
|
3053
|
+
var foundWillMountName = null;
|
3054
|
+
var foundWillReceivePropsName = null;
|
3055
|
+
var foundWillUpdateName = null;
|
3056
|
+
if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
|
3057
|
+
foundWillMountName = 'componentWillMount';
|
3058
|
+
} else if (typeof instance.UNSAFE_componentWillMount === 'function') {
|
3059
|
+
foundWillMountName = 'UNSAFE_componentWillMount';
|
3060
|
+
}
|
3061
|
+
if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
|
3062
|
+
foundWillReceivePropsName = 'componentWillReceiveProps';
|
3063
|
+
} else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
|
3064
|
+
foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
|
3065
|
+
}
|
3066
|
+
if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
|
3067
|
+
foundWillUpdateName = 'componentWillUpdate';
|
3068
|
+
} else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
|
3069
|
+
foundWillUpdateName = 'UNSAFE_componentWillUpdate';
|
3070
|
+
}
|
3071
|
+
if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
|
3072
|
+
var _componentName = getComponentNameFromType(ctor) || 'Component';
|
3073
|
+
var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
|
3074
|
+
if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
|
3075
|
+
didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
|
3076
|
+
error('Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n' + '%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\n' + 'The above lifecycles should be removed. Learn more about this warning here:\n' + 'https://reactjs.org/link/unsafe-component-lifecycles', _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : '', foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : '', foundWillUpdateName !== null ? "\n " + foundWillUpdateName : '');
|
3077
|
+
}
|
3078
|
+
}
|
3079
|
+
}
|
3080
|
+
}
|
3081
|
+
return instance;
|
3082
|
+
}
|
3083
|
+
function checkClassInstance(instance, ctor, newProps) {
|
3084
|
+
{
|
3085
|
+
var name = getComponentNameFromType(ctor) || 'Component';
|
3086
|
+
var renderPresent = instance.render;
|
3087
|
+
if (!renderPresent) {
|
3088
|
+
if (ctor.prototype && typeof ctor.prototype.render === 'function') {
|
3089
|
+
error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
|
3090
|
+
} else {
|
3091
|
+
error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
|
3092
|
+
}
|
3093
|
+
}
|
3094
|
+
if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
|
3095
|
+
error('getInitialState was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Did you mean to define a state property instead?', name);
|
3096
|
+
}
|
3097
|
+
if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
|
3098
|
+
error('getDefaultProps was defined on %s, a plain JavaScript class. ' + 'This is only supported for classes created using React.createClass. ' + 'Use a static property to define defaultProps instead.', name);
|
3099
|
+
}
|
3100
|
+
if (instance.propTypes) {
|
3101
|
+
error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
|
3102
|
+
}
|
3103
|
+
if (instance.contextType) {
|
3104
|
+
error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
|
3105
|
+
}
|
3106
|
+
{
|
3107
|
+
if (instance.contextTypes) {
|
3108
|
+
error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
|
3109
|
+
}
|
3110
|
+
if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
|
3111
|
+
didWarnAboutContextTypeAndContextTypes.add(ctor);
|
3112
|
+
error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
|
3113
|
+
}
|
3114
|
+
}
|
3115
|
+
if (typeof instance.componentShouldUpdate === 'function') {
|
3116
|
+
error('%s has a method called ' + 'componentShouldUpdate(). Did you mean shouldComponentUpdate()? ' + 'The name is phrased as a question because the function is ' + 'expected to return a value.', name);
|
3117
|
+
}
|
3118
|
+
if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
|
3119
|
+
error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentNameFromType(ctor) || 'A pure component');
|
3120
|
+
}
|
3121
|
+
if (typeof instance.componentDidUnmount === 'function') {
|
3122
|
+
error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
|
3123
|
+
}
|
3124
|
+
if (typeof instance.componentDidReceiveProps === 'function') {
|
3125
|
+
error('%s has a method called ' + 'componentDidReceiveProps(). But there is no such lifecycle method. ' + 'If you meant to update the state in response to changing props, ' + 'use componentWillReceiveProps(). If you meant to fetch data or ' + 'run side-effects or mutations after React has updated the UI, use componentDidUpdate().', name);
|
3126
|
+
}
|
3127
|
+
if (typeof instance.componentWillRecieveProps === 'function') {
|
3128
|
+
error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
|
3129
|
+
}
|
3130
|
+
if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
|
3131
|
+
error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
|
3132
|
+
}
|
3133
|
+
var hasMutatedProps = instance.props !== newProps;
|
3134
|
+
if (instance.props !== undefined && hasMutatedProps) {
|
3135
|
+
error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
|
3136
|
+
}
|
3137
|
+
if (instance.defaultProps) {
|
3138
|
+
error('Setting defaultProps as an instance property on %s is not supported and will be ignored.' + ' Instead, define defaultProps as a static property on %s.', name, name);
|
3139
|
+
}
|
3140
|
+
if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
|
3141
|
+
didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
|
3142
|
+
error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentNameFromType(ctor));
|
3143
|
+
}
|
3144
|
+
if (typeof instance.getDerivedStateFromProps === 'function') {
|
3145
|
+
error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
|
3146
|
+
}
|
3147
|
+
if (typeof instance.getDerivedStateFromError === 'function') {
|
3148
|
+
error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
|
3149
|
+
}
|
3150
|
+
if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
|
3151
|
+
error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
|
3152
|
+
}
|
3153
|
+
var _state = instance.state;
|
3154
|
+
if (_state && (typeof _state !== 'object' || isArray(_state))) {
|
3155
|
+
error('%s.state: must be set to an object or null', name);
|
3156
|
+
}
|
3157
|
+
if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
|
3158
|
+
error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
|
3159
|
+
}
|
3160
|
+
}
|
3161
|
+
}
|
3162
|
+
function callComponentWillMount(type, instance) {
|
3163
|
+
var oldState = instance.state;
|
3164
|
+
if (typeof instance.componentWillMount === 'function') {
|
3165
|
+
{
|
3166
|
+
if (instance.componentWillMount.__suppressDeprecationWarning !== true) {
|
3167
|
+
var componentName = getComponentNameFromType(type) || 'Unknown';
|
3168
|
+
if (!didWarnAboutDeprecatedWillMount[componentName]) {
|
3169
|
+
warn('componentWillMount has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code from componentWillMount to componentDidMount (preferred in most cases) ' + 'or the constructor.\n' + '\nPlease update the following components: %s', componentName);
|
3170
|
+
didWarnAboutDeprecatedWillMount[componentName] = true;
|
3171
|
+
}
|
3172
|
+
}
|
3173
|
+
}
|
3174
|
+
instance.componentWillMount();
|
3175
|
+
}
|
3176
|
+
if (typeof instance.UNSAFE_componentWillMount === 'function') {
|
3177
|
+
instance.UNSAFE_componentWillMount();
|
3178
|
+
}
|
3179
|
+
if (oldState !== instance.state) {
|
3180
|
+
{
|
3181
|
+
error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentNameFromType(type) || 'Component');
|
3182
|
+
}
|
3183
|
+
classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
|
3184
|
+
}
|
3185
|
+
}
|
3186
|
+
function processUpdateQueue(internalInstance, inst, props, maskedLegacyContext) {
|
3187
|
+
if (internalInstance.queue !== null && internalInstance.queue.length > 0) {
|
3188
|
+
var oldQueue = internalInstance.queue;
|
3189
|
+
var oldReplace = internalInstance.replace;
|
3190
|
+
internalInstance.queue = null;
|
3191
|
+
internalInstance.replace = false;
|
3192
|
+
if (oldReplace && oldQueue.length === 1) {
|
3193
|
+
inst.state = oldQueue[0];
|
3194
|
+
} else {
|
3195
|
+
var nextState = oldReplace ? oldQueue[0] : inst.state;
|
3196
|
+
var dontMutate = true;
|
3197
|
+
for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
|
3198
|
+
var partial = oldQueue[i];
|
3199
|
+
var partialState = typeof partial === 'function' ? partial.call(inst, nextState, props, maskedLegacyContext) : partial;
|
3200
|
+
if (partialState != null) {
|
3201
|
+
if (dontMutate) {
|
3202
|
+
dontMutate = false;
|
3203
|
+
nextState = assign({}, nextState, partialState);
|
3204
|
+
} else {
|
3205
|
+
assign(nextState, partialState);
|
3206
|
+
}
|
3207
|
+
}
|
3208
|
+
}
|
3209
|
+
inst.state = nextState;
|
3210
|
+
}
|
3211
|
+
} else {
|
3212
|
+
internalInstance.queue = null;
|
3213
|
+
}
|
3214
|
+
}
|
3215
|
+
function mountClassInstance(instance, ctor, newProps, maskedLegacyContext) {
|
3216
|
+
{
|
3217
|
+
checkClassInstance(instance, ctor, newProps);
|
3218
|
+
}
|
3219
|
+
var initialState = instance.state !== undefined ? instance.state : null;
|
3220
|
+
instance.updater = classComponentUpdater;
|
3221
|
+
instance.props = newProps;
|
3222
|
+
instance.state = initialState;
|
3223
|
+
var internalInstance = {
|
3224
|
+
queue: [],
|
3225
|
+
replace: false
|
3226
|
+
};
|
3227
|
+
set(instance, internalInstance);
|
3228
|
+
var contextType = ctor.contextType;
|
3229
|
+
if (typeof contextType === 'object' && contextType !== null) {
|
3230
|
+
instance.context = readContext(contextType);
|
3231
|
+
} else {
|
3232
|
+
instance.context = maskedLegacyContext;
|
3233
|
+
}
|
3234
|
+
{
|
3235
|
+
if (instance.state === newProps) {
|
3236
|
+
var componentName = getComponentNameFromType(ctor) || 'Component';
|
3237
|
+
if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
|
3238
|
+
didWarnAboutDirectlyAssigningPropsToState.add(componentName);
|
3239
|
+
error('%s: It is not recommended to assign props directly to state ' + "because updates to props won't be reflected in state. " + 'In most cases, it is better to use props directly.', componentName);
|
3240
|
+
}
|
3241
|
+
}
|
3242
|
+
}
|
3243
|
+
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
|
3244
|
+
if (typeof getDerivedStateFromProps === 'function') {
|
3245
|
+
instance.state = applyDerivedStateFromProps(instance, ctor, getDerivedStateFromProps, initialState, newProps);
|
3246
|
+
}
|
3247
|
+
if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
|
3248
|
+
callComponentWillMount(ctor, instance);
|
3249
|
+
processUpdateQueue(internalInstance, instance, newProps, maskedLegacyContext);
|
3250
|
+
}
|
3251
|
+
}
|
3252
|
+
var emptyTreeContext = {
|
3253
|
+
id: 1,
|
3254
|
+
overflow: ''
|
3255
|
+
};
|
3256
|
+
function getTreeId(context) {
|
3257
|
+
var overflow = context.overflow;
|
3258
|
+
var idWithLeadingBit = context.id;
|
3259
|
+
var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);
|
3260
|
+
return id.toString(32) + overflow;
|
3261
|
+
}
|
3262
|
+
function pushTreeContext(baseContext, totalChildren, index) {
|
3263
|
+
var baseIdWithLeadingBit = baseContext.id;
|
3264
|
+
var baseOverflow = baseContext.overflow;
|
3265
|
+
var baseLength = getBitLength(baseIdWithLeadingBit) - 1;
|
3266
|
+
var baseId = baseIdWithLeadingBit & ~(1 << baseLength);
|
3267
|
+
var slot = index + 1;
|
3268
|
+
var length = getBitLength(totalChildren) + baseLength;
|
3269
|
+
if (length > 30) {
|
3270
|
+
var numberOfOverflowBits = baseLength - baseLength % 5;
|
3271
|
+
var newOverflowBits = (1 << numberOfOverflowBits) - 1;
|
3272
|
+
var newOverflow = (baseId & newOverflowBits).toString(32);
|
3273
|
+
var restOfBaseId = baseId >> numberOfOverflowBits;
|
3274
|
+
var restOfBaseLength = baseLength - numberOfOverflowBits;
|
3275
|
+
var restOfLength = getBitLength(totalChildren) + restOfBaseLength;
|
3276
|
+
var restOfNewBits = slot << restOfBaseLength;
|
3277
|
+
var id = restOfNewBits | restOfBaseId;
|
3278
|
+
var overflow = newOverflow + baseOverflow;
|
3279
|
+
return {
|
3280
|
+
id: 1 << restOfLength | id,
|
3281
|
+
overflow: overflow
|
3282
|
+
};
|
3283
|
+
} else {
|
3284
|
+
var newBits = slot << baseLength;
|
3285
|
+
var _id = newBits | baseId;
|
3286
|
+
var _overflow = baseOverflow;
|
3287
|
+
return {
|
3288
|
+
id: 1 << length | _id,
|
3289
|
+
overflow: _overflow
|
3290
|
+
};
|
3291
|
+
}
|
3292
|
+
}
|
3293
|
+
function getBitLength(number) {
|
3294
|
+
return 32 - clz32(number);
|
3295
|
+
}
|
3296
|
+
function getLeadingBit(id) {
|
3297
|
+
return 1 << getBitLength(id) - 1;
|
3298
|
+
}
|
3299
|
+
var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback;
|
3300
|
+
var log = Math.log;
|
3301
|
+
var LN2 = Math.LN2;
|
3302
|
+
function clz32Fallback(x) {
|
3303
|
+
var asUint = x >>> 0;
|
3304
|
+
if (asUint === 0) {
|
3305
|
+
return 32;
|
3306
|
+
}
|
3307
|
+
return 31 - (log(asUint) / LN2 | 0) | 0;
|
3308
|
+
}
|
3309
|
+
function is(x, y) {
|
3310
|
+
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
3311
|
+
;
|
3312
|
+
}
|
3313
|
+
var objectIs = typeof Object.is === 'function' ? Object.is : is;
|
3314
|
+
var currentlyRenderingComponent = null;
|
3315
|
+
var currentlyRenderingTask = null;
|
3316
|
+
var firstWorkInProgressHook = null;
|
3317
|
+
var workInProgressHook = null;
|
3318
|
+
var isReRender = false;
|
3319
|
+
var didScheduleRenderPhaseUpdate = false;
|
3320
|
+
var localIdCounter = 0;
|
3321
|
+
var renderPhaseUpdates = null;
|
3322
|
+
var numberOfReRenders = 0;
|
3323
|
+
var RE_RENDER_LIMIT = 25;
|
3324
|
+
var isInHookUserCodeInDev = false;
|
3325
|
+
var currentHookNameInDev;
|
3326
|
+
function resolveCurrentlyRenderingComponent() {
|
3327
|
+
if (currentlyRenderingComponent === null) {
|
3328
|
+
throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
|
3329
|
+
}
|
3330
|
+
{
|
3331
|
+
if (isInHookUserCodeInDev) {
|
3332
|
+
error('Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. ' + 'You can only call Hooks at the top level of your React function. ' + 'For more information, see ' + 'https://reactjs.org/link/rules-of-hooks');
|
3333
|
+
}
|
3334
|
+
}
|
3335
|
+
return currentlyRenderingComponent;
|
3336
|
+
}
|
3337
|
+
function areHookInputsEqual(nextDeps, prevDeps) {
|
3338
|
+
if (prevDeps === null) {
|
3339
|
+
{
|
3340
|
+
error('%s received a final argument during this render, but not during ' + 'the previous render. Even though the final argument is optional, ' + 'its type cannot change between renders.', currentHookNameInDev);
|
3341
|
+
}
|
3342
|
+
return false;
|
3343
|
+
}
|
3344
|
+
{
|
3345
|
+
if (nextDeps.length !== prevDeps.length) {
|
3346
|
+
error('The final argument passed to %s changed size between renders. The ' + 'order and size of this array must remain constant.\n\n' + 'Previous: %s\n' + 'Incoming: %s', currentHookNameInDev, "[" + nextDeps.join(', ') + "]", "[" + prevDeps.join(', ') + "]");
|
3347
|
+
}
|
3348
|
+
}
|
3349
|
+
for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
|
3350
|
+
if (objectIs(nextDeps[i], prevDeps[i])) {
|
3351
|
+
continue;
|
3352
|
+
}
|
3353
|
+
return false;
|
3354
|
+
}
|
3355
|
+
return true;
|
3356
|
+
}
|
3357
|
+
function createHook() {
|
3358
|
+
if (numberOfReRenders > 0) {
|
3359
|
+
throw new Error('Rendered more hooks than during the previous render');
|
3360
|
+
}
|
3361
|
+
return {
|
3362
|
+
memoizedState: null,
|
3363
|
+
queue: null,
|
3364
|
+
next: null
|
3365
|
+
};
|
3366
|
+
}
|
3367
|
+
function createWorkInProgressHook() {
|
3368
|
+
if (workInProgressHook === null) {
|
3369
|
+
if (firstWorkInProgressHook === null) {
|
3370
|
+
isReRender = false;
|
3371
|
+
firstWorkInProgressHook = workInProgressHook = createHook();
|
3372
|
+
} else {
|
3373
|
+
isReRender = true;
|
3374
|
+
workInProgressHook = firstWorkInProgressHook;
|
3375
|
+
}
|
3376
|
+
} else {
|
3377
|
+
if (workInProgressHook.next === null) {
|
3378
|
+
isReRender = false;
|
3379
|
+
workInProgressHook = workInProgressHook.next = createHook();
|
3380
|
+
} else {
|
3381
|
+
isReRender = true;
|
3382
|
+
workInProgressHook = workInProgressHook.next;
|
3383
|
+
}
|
3384
|
+
}
|
3385
|
+
return workInProgressHook;
|
3386
|
+
}
|
3387
|
+
function prepareToUseHooks(task, componentIdentity) {
|
3388
|
+
currentlyRenderingComponent = componentIdentity;
|
3389
|
+
currentlyRenderingTask = task;
|
3390
|
+
{
|
3391
|
+
isInHookUserCodeInDev = false;
|
3392
|
+
}
|
3393
|
+
localIdCounter = 0;
|
3394
|
+
}
|
3395
|
+
function finishHooks(Component, props, children, refOrContext) {
|
3396
|
+
while (didScheduleRenderPhaseUpdate) {
|
3397
|
+
didScheduleRenderPhaseUpdate = false;
|
3398
|
+
localIdCounter = 0;
|
3399
|
+
numberOfReRenders += 1;
|
3400
|
+
workInProgressHook = null;
|
3401
|
+
children = Component(props, refOrContext);
|
3402
|
+
}
|
3403
|
+
resetHooksState();
|
3404
|
+
return children;
|
3405
|
+
}
|
3406
|
+
function checkDidRenderIdHook() {
|
3407
|
+
var didRenderIdHook = localIdCounter !== 0;
|
3408
|
+
return didRenderIdHook;
|
3409
|
+
}
|
3410
|
+
function resetHooksState() {
|
3411
|
+
{
|
3412
|
+
isInHookUserCodeInDev = false;
|
3413
|
+
}
|
3414
|
+
currentlyRenderingComponent = null;
|
3415
|
+
currentlyRenderingTask = null;
|
3416
|
+
didScheduleRenderPhaseUpdate = false;
|
3417
|
+
firstWorkInProgressHook = null;
|
3418
|
+
numberOfReRenders = 0;
|
3419
|
+
renderPhaseUpdates = null;
|
3420
|
+
workInProgressHook = null;
|
3421
|
+
}
|
3422
|
+
function readContext$1(context) {
|
3423
|
+
{
|
3424
|
+
if (isInHookUserCodeInDev) {
|
3425
|
+
error('Context can only be read while React is rendering. ' + 'In classes, you can read it in the render method or getDerivedStateFromProps. ' + 'In function components, you can read it directly in the function body, but not ' + 'inside Hooks like useReducer() or useMemo().');
|
3426
|
+
}
|
3427
|
+
}
|
3428
|
+
return readContext(context);
|
3429
|
+
}
|
3430
|
+
function useContext(context) {
|
3431
|
+
{
|
3432
|
+
currentHookNameInDev = 'useContext';
|
3433
|
+
}
|
3434
|
+
resolveCurrentlyRenderingComponent();
|
3435
|
+
return readContext(context);
|
3436
|
+
}
|
3437
|
+
function basicStateReducer(state, action) {
|
3438
|
+
return typeof action === 'function' ? action(state) : action;
|
3439
|
+
}
|
3440
|
+
function useState(initialState) {
|
3441
|
+
{
|
3442
|
+
currentHookNameInDev = 'useState';
|
3443
|
+
}
|
3444
|
+
return useReducer(basicStateReducer, initialState);
|
3445
|
+
}
|
3446
|
+
function useReducer(reducer, initialArg, init) {
|
3447
|
+
{
|
3448
|
+
if (reducer !== basicStateReducer) {
|
3449
|
+
currentHookNameInDev = 'useReducer';
|
3450
|
+
}
|
3451
|
+
}
|
3452
|
+
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
|
3453
|
+
workInProgressHook = createWorkInProgressHook();
|
3454
|
+
if (isReRender) {
|
3455
|
+
var queue = workInProgressHook.queue;
|
3456
|
+
var dispatch = queue.dispatch;
|
3457
|
+
if (renderPhaseUpdates !== null) {
|
3458
|
+
var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
|
3459
|
+
if (firstRenderPhaseUpdate !== undefined) {
|
3460
|
+
renderPhaseUpdates.delete(queue);
|
3461
|
+
var newState = workInProgressHook.memoizedState;
|
3462
|
+
var update = firstRenderPhaseUpdate;
|
3463
|
+
do {
|
3464
|
+
var action = update.action;
|
3465
|
+
{
|
3466
|
+
isInHookUserCodeInDev = true;
|
3467
|
+
}
|
3468
|
+
newState = reducer(newState, action);
|
3469
|
+
{
|
3470
|
+
isInHookUserCodeInDev = false;
|
3471
|
+
}
|
3472
|
+
update = update.next;
|
3473
|
+
} while (update !== null);
|
3474
|
+
workInProgressHook.memoizedState = newState;
|
3475
|
+
return [newState, dispatch];
|
3476
|
+
}
|
3477
|
+
}
|
3478
|
+
return [workInProgressHook.memoizedState, dispatch];
|
3479
|
+
} else {
|
3480
|
+
{
|
3481
|
+
isInHookUserCodeInDev = true;
|
3482
|
+
}
|
3483
|
+
var initialState;
|
3484
|
+
if (reducer === basicStateReducer) {
|
3485
|
+
initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
|
3486
|
+
} else {
|
3487
|
+
initialState = init !== undefined ? init(initialArg) : initialArg;
|
3488
|
+
}
|
3489
|
+
{
|
3490
|
+
isInHookUserCodeInDev = false;
|
3491
|
+
}
|
3492
|
+
workInProgressHook.memoizedState = initialState;
|
3493
|
+
var _queue = workInProgressHook.queue = {
|
3494
|
+
last: null,
|
3495
|
+
dispatch: null
|
3496
|
+
};
|
3497
|
+
var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);
|
3498
|
+
return [workInProgressHook.memoizedState, _dispatch];
|
3499
|
+
}
|
3500
|
+
}
|
3501
|
+
function useMemo(nextCreate, deps) {
|
3502
|
+
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
|
3503
|
+
workInProgressHook = createWorkInProgressHook();
|
3504
|
+
var nextDeps = deps === undefined ? null : deps;
|
3505
|
+
if (workInProgressHook !== null) {
|
3506
|
+
var prevState = workInProgressHook.memoizedState;
|
3507
|
+
if (prevState !== null) {
|
3508
|
+
if (nextDeps !== null) {
|
3509
|
+
var prevDeps = prevState[1];
|
3510
|
+
if (areHookInputsEqual(nextDeps, prevDeps)) {
|
3511
|
+
return prevState[0];
|
3512
|
+
}
|
3513
|
+
}
|
3514
|
+
}
|
3515
|
+
}
|
3516
|
+
{
|
3517
|
+
isInHookUserCodeInDev = true;
|
3518
|
+
}
|
3519
|
+
var nextValue = nextCreate();
|
3520
|
+
{
|
3521
|
+
isInHookUserCodeInDev = false;
|
3522
|
+
}
|
3523
|
+
workInProgressHook.memoizedState = [nextValue, nextDeps];
|
3524
|
+
return nextValue;
|
3525
|
+
}
|
3526
|
+
function useRef(initialValue) {
|
3527
|
+
currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
|
3528
|
+
workInProgressHook = createWorkInProgressHook();
|
3529
|
+
var previousRef = workInProgressHook.memoizedState;
|
3530
|
+
if (previousRef === null) {
|
3531
|
+
var ref = {current: initialValue};
|
3532
|
+
{
|
3533
|
+
Object.seal(ref);
|
3534
|
+
}
|
3535
|
+
workInProgressHook.memoizedState = ref;
|
3536
|
+
return ref;
|
3537
|
+
} else {
|
3538
|
+
return previousRef;
|
3539
|
+
}
|
3540
|
+
}
|
3541
|
+
function useLayoutEffect(create, inputs) {
|
3542
|
+
{
|
3543
|
+
currentHookNameInDev = 'useLayoutEffect';
|
3544
|
+
error('useLayoutEffect does nothing on the server, because its effect cannot ' + "be encoded into the server renderer's output format. This will lead " + 'to a mismatch between the initial, non-hydrated UI and the intended ' + 'UI. To avoid this, useLayoutEffect should only be used in ' + 'components that render exclusively on the client. ' + 'See https://reactjs.org/link/uselayouteffect-ssr for common fixes.');
|
3545
|
+
}
|
3546
|
+
}
|
3547
|
+
function dispatchAction(componentIdentity, queue, action) {
|
3548
|
+
if (numberOfReRenders >= RE_RENDER_LIMIT) {
|
3549
|
+
throw new Error('Too many re-renders. React limits the number of renders to prevent ' + 'an infinite loop.');
|
3550
|
+
}
|
3551
|
+
if (componentIdentity === currentlyRenderingComponent) {
|
3552
|
+
didScheduleRenderPhaseUpdate = true;
|
3553
|
+
var update = {
|
3554
|
+
action: action,
|
3555
|
+
next: null
|
3556
|
+
};
|
3557
|
+
if (renderPhaseUpdates === null) {
|
3558
|
+
renderPhaseUpdates = new Map();
|
3559
|
+
}
|
3560
|
+
var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
|
3561
|
+
if (firstRenderPhaseUpdate === undefined) {
|
3562
|
+
renderPhaseUpdates.set(queue, update);
|
3563
|
+
} else {
|
3564
|
+
var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
|
3565
|
+
while (lastRenderPhaseUpdate.next !== null) {
|
3566
|
+
lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
|
3567
|
+
}
|
3568
|
+
lastRenderPhaseUpdate.next = update;
|
3569
|
+
}
|
3570
|
+
}
|
3571
|
+
}
|
3572
|
+
function useCallback(callback, deps) {
|
3573
|
+
return useMemo(function() {
|
3574
|
+
return callback;
|
3575
|
+
}, deps);
|
3576
|
+
}
|
3577
|
+
function useMutableSource(source, getSnapshot, subscribe) {
|
3578
|
+
resolveCurrentlyRenderingComponent();
|
3579
|
+
return getSnapshot(source._source);
|
3580
|
+
}
|
3581
|
+
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
3582
|
+
if (getServerSnapshot === undefined) {
|
3583
|
+
throw new Error('Missing getServerSnapshot, which is required for ' + 'server-rendered content. Will revert to client rendering.');
|
3584
|
+
}
|
3585
|
+
return getServerSnapshot();
|
3586
|
+
}
|
3587
|
+
function useDeferredValue(value) {
|
3588
|
+
resolveCurrentlyRenderingComponent();
|
3589
|
+
return value;
|
3590
|
+
}
|
3591
|
+
function unsupportedStartTransition() {
|
3592
|
+
throw new Error('startTransition cannot be called during server rendering.');
|
3593
|
+
}
|
3594
|
+
function useTransition() {
|
3595
|
+
resolveCurrentlyRenderingComponent();
|
3596
|
+
return [false, unsupportedStartTransition];
|
3597
|
+
}
|
3598
|
+
function useId() {
|
3599
|
+
var task = currentlyRenderingTask;
|
3600
|
+
var treeId = getTreeId(task.treeContext);
|
3601
|
+
var responseState = currentResponseState;
|
3602
|
+
if (responseState === null) {
|
3603
|
+
throw new Error('Invalid hook call. Hooks can only be called inside of the body of a function component.');
|
3604
|
+
}
|
3605
|
+
var localId = localIdCounter++;
|
3606
|
+
return makeId(responseState, treeId, localId);
|
3607
|
+
}
|
3608
|
+
function noop() {}
|
3609
|
+
var Dispatcher = {
|
3610
|
+
readContext: readContext$1,
|
3611
|
+
useContext: useContext,
|
3612
|
+
useMemo: useMemo,
|
3613
|
+
useReducer: useReducer,
|
3614
|
+
useRef: useRef,
|
3615
|
+
useState: useState,
|
3616
|
+
useInsertionEffect: noop,
|
3617
|
+
useLayoutEffect: useLayoutEffect,
|
3618
|
+
useCallback: useCallback,
|
3619
|
+
useImperativeHandle: noop,
|
3620
|
+
useEffect: noop,
|
3621
|
+
useDebugValue: noop,
|
3622
|
+
useDeferredValue: useDeferredValue,
|
3623
|
+
useTransition: useTransition,
|
3624
|
+
useId: useId,
|
3625
|
+
useMutableSource: useMutableSource,
|
3626
|
+
useSyncExternalStore: useSyncExternalStore
|
3627
|
+
};
|
3628
|
+
var currentResponseState = null;
|
3629
|
+
function setCurrentResponseState(responseState) {
|
3630
|
+
currentResponseState = responseState;
|
3631
|
+
}
|
3632
|
+
function getStackByComponentStackNode(componentStack) {
|
3633
|
+
try {
|
3634
|
+
var info = '';
|
3635
|
+
var node = componentStack;
|
3636
|
+
do {
|
3637
|
+
switch (node.tag) {
|
3638
|
+
case 0:
|
3639
|
+
info += describeBuiltInComponentFrame(node.type, null, null);
|
3640
|
+
break;
|
3641
|
+
case 1:
|
3642
|
+
info += describeFunctionComponentFrame(node.type, null, null);
|
3643
|
+
break;
|
3644
|
+
case 2:
|
3645
|
+
info += describeClassComponentFrame(node.type, null, null);
|
3646
|
+
break;
|
3647
|
+
}
|
3648
|
+
node = node.parent;
|
3649
|
+
} while (node);
|
3650
|
+
return info;
|
3651
|
+
} catch (x) {
|
3652
|
+
return '\nError generating stack: ' + x.message + '\n' + x.stack;
|
3653
|
+
}
|
3654
|
+
}
|
3655
|
+
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
|
3656
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
3657
|
+
var PENDING = 0;
|
3658
|
+
var COMPLETED = 1;
|
3659
|
+
var FLUSHED = 2;
|
3660
|
+
var ABORTED = 3;
|
3661
|
+
var ERRORED = 4;
|
3662
|
+
var OPEN = 0;
|
3663
|
+
var CLOSING = 1;
|
3664
|
+
var CLOSED = 2;
|
3665
|
+
var DEFAULT_PROGRESSIVE_CHUNK_SIZE = 12800;
|
3666
|
+
function defaultErrorHandler(error) {
|
3667
|
+
console['error'](error);
|
3668
|
+
}
|
3669
|
+
function noop$1() {}
|
3670
|
+
function createRequest(children, responseState, rootFormatContext, progressiveChunkSize, onError, onAllReady, onShellReady, onShellError, onFatalError) {
|
3671
|
+
var pingedTasks = [];
|
3672
|
+
var abortSet = new Set();
|
3673
|
+
var request = {
|
3674
|
+
destination: null,
|
3675
|
+
responseState: responseState,
|
3676
|
+
progressiveChunkSize: progressiveChunkSize === undefined ? DEFAULT_PROGRESSIVE_CHUNK_SIZE : progressiveChunkSize,
|
3677
|
+
status: OPEN,
|
3678
|
+
fatalError: null,
|
3679
|
+
nextSegmentId: 0,
|
3680
|
+
allPendingTasks: 0,
|
3681
|
+
pendingRootTasks: 0,
|
3682
|
+
completedRootSegment: null,
|
3683
|
+
abortableTasks: abortSet,
|
3684
|
+
pingedTasks: pingedTasks,
|
3685
|
+
clientRenderedBoundaries: [],
|
3686
|
+
completedBoundaries: [],
|
3687
|
+
partialBoundaries: [],
|
3688
|
+
onError: onError === undefined ? defaultErrorHandler : onError,
|
3689
|
+
onAllReady: onAllReady === undefined ? noop$1 : onAllReady,
|
3690
|
+
onShellReady: onShellReady === undefined ? noop$1 : onShellReady,
|
3691
|
+
onShellError: onShellError === undefined ? noop$1 : onShellError,
|
3692
|
+
onFatalError: onFatalError === undefined ? noop$1 : onFatalError
|
3693
|
+
};
|
3694
|
+
var rootSegment = createPendingSegment(request, 0, null, rootFormatContext);
|
3695
|
+
rootSegment.parentFlushed = true;
|
3696
|
+
var rootTask = createTask(request, children, null, rootSegment, abortSet, emptyContextObject, rootContextSnapshot, emptyTreeContext);
|
3697
|
+
pingedTasks.push(rootTask);
|
3698
|
+
return request;
|
3699
|
+
}
|
3700
|
+
function pingTask(request, task) {
|
3701
|
+
var pingedTasks = request.pingedTasks;
|
3702
|
+
pingedTasks.push(task);
|
3703
|
+
if (pingedTasks.length === 1) {
|
3704
|
+
scheduleWork(function() {
|
3705
|
+
return performWork(request);
|
3706
|
+
});
|
3707
|
+
}
|
3708
|
+
}
|
3709
|
+
function createSuspenseBoundary(request, fallbackAbortableTasks) {
|
3710
|
+
return {
|
3711
|
+
id: UNINITIALIZED_SUSPENSE_BOUNDARY_ID,
|
3712
|
+
rootSegmentID: -1,
|
3713
|
+
parentFlushed: false,
|
3714
|
+
pendingTasks: 0,
|
3715
|
+
forceClientRender: false,
|
3716
|
+
completedSegments: [],
|
3717
|
+
byteSize: 0,
|
3718
|
+
fallbackAbortableTasks: fallbackAbortableTasks
|
3719
|
+
};
|
3720
|
+
}
|
3721
|
+
function createTask(request, node, blockedBoundary, blockedSegment, abortSet, legacyContext, context, treeContext) {
|
3722
|
+
request.allPendingTasks++;
|
3723
|
+
if (blockedBoundary === null) {
|
3724
|
+
request.pendingRootTasks++;
|
3725
|
+
} else {
|
3726
|
+
blockedBoundary.pendingTasks++;
|
3727
|
+
}
|
3728
|
+
var task = {
|
3729
|
+
node: node,
|
3730
|
+
ping: function() {
|
3731
|
+
return pingTask(request, task);
|
3732
|
+
},
|
3733
|
+
blockedBoundary: blockedBoundary,
|
3734
|
+
blockedSegment: blockedSegment,
|
3735
|
+
abortSet: abortSet,
|
3736
|
+
legacyContext: legacyContext,
|
3737
|
+
context: context,
|
3738
|
+
treeContext: treeContext
|
3739
|
+
};
|
3740
|
+
{
|
3741
|
+
task.componentStack = null;
|
3742
|
+
}
|
3743
|
+
abortSet.add(task);
|
3744
|
+
return task;
|
3745
|
+
}
|
3746
|
+
function createPendingSegment(request, index, boundary, formatContext) {
|
3747
|
+
return {
|
3748
|
+
status: PENDING,
|
3749
|
+
id: -1,
|
3750
|
+
index: index,
|
3751
|
+
parentFlushed: false,
|
3752
|
+
chunks: [],
|
3753
|
+
children: [],
|
3754
|
+
formatContext: formatContext,
|
3755
|
+
boundary: boundary
|
3756
|
+
};
|
3757
|
+
}
|
3758
|
+
var currentTaskInDEV = null;
|
3759
|
+
function getCurrentStackInDEV() {
|
3760
|
+
{
|
3761
|
+
if (currentTaskInDEV === null || currentTaskInDEV.componentStack === null) {
|
3762
|
+
return '';
|
3763
|
+
}
|
3764
|
+
return getStackByComponentStackNode(currentTaskInDEV.componentStack);
|
3765
|
+
}
|
3766
|
+
}
|
3767
|
+
function pushBuiltInComponentStackInDEV(task, type) {
|
3768
|
+
{
|
3769
|
+
task.componentStack = {
|
3770
|
+
tag: 0,
|
3771
|
+
parent: task.componentStack,
|
3772
|
+
type: type
|
3773
|
+
};
|
3774
|
+
}
|
3775
|
+
}
|
3776
|
+
function pushFunctionComponentStackInDEV(task, type) {
|
3777
|
+
{
|
3778
|
+
task.componentStack = {
|
3779
|
+
tag: 1,
|
3780
|
+
parent: task.componentStack,
|
3781
|
+
type: type
|
3782
|
+
};
|
3783
|
+
}
|
3784
|
+
}
|
3785
|
+
function pushClassComponentStackInDEV(task, type) {
|
3786
|
+
{
|
3787
|
+
task.componentStack = {
|
3788
|
+
tag: 2,
|
3789
|
+
parent: task.componentStack,
|
3790
|
+
type: type
|
3791
|
+
};
|
3792
|
+
}
|
3793
|
+
}
|
3794
|
+
function popComponentStackInDEV(task) {
|
3795
|
+
{
|
3796
|
+
if (task.componentStack === null) {
|
3797
|
+
error('Unexpectedly popped too many stack frames. This is a bug in React.');
|
3798
|
+
} else {
|
3799
|
+
task.componentStack = task.componentStack.parent;
|
3800
|
+
}
|
3801
|
+
}
|
3802
|
+
}
|
3803
|
+
function logRecoverableError(request, error) {
|
3804
|
+
var onError = request.onError;
|
3805
|
+
onError(error);
|
3806
|
+
}
|
3807
|
+
function fatalError(request, error) {
|
3808
|
+
var onShellError = request.onShellError;
|
3809
|
+
onShellError(error);
|
3810
|
+
var onFatalError = request.onFatalError;
|
3811
|
+
onFatalError(error);
|
3812
|
+
if (request.destination !== null) {
|
3813
|
+
request.status = CLOSED;
|
3814
|
+
closeWithError(request.destination, error);
|
3815
|
+
} else {
|
3816
|
+
request.status = CLOSING;
|
3817
|
+
request.fatalError = error;
|
3818
|
+
}
|
3819
|
+
}
|
3820
|
+
function renderSuspenseBoundary(request, task, props) {
|
3821
|
+
pushBuiltInComponentStackInDEV(task, 'Suspense');
|
3822
|
+
var parentBoundary = task.blockedBoundary;
|
3823
|
+
var parentSegment = task.blockedSegment;
|
3824
|
+
var fallback = props.fallback;
|
3825
|
+
var content = props.children;
|
3826
|
+
var fallbackAbortSet = new Set();
|
3827
|
+
var newBoundary = createSuspenseBoundary(request, fallbackAbortSet);
|
3828
|
+
var insertionIndex = parentSegment.chunks.length;
|
3829
|
+
var boundarySegment = createPendingSegment(request, insertionIndex, newBoundary, parentSegment.formatContext);
|
3830
|
+
parentSegment.children.push(boundarySegment);
|
3831
|
+
var contentRootSegment = createPendingSegment(request, 0, null, parentSegment.formatContext);
|
3832
|
+
contentRootSegment.parentFlushed = true;
|
3833
|
+
task.blockedBoundary = newBoundary;
|
3834
|
+
task.blockedSegment = contentRootSegment;
|
3835
|
+
try {
|
3836
|
+
renderNode(request, task, content);
|
3837
|
+
contentRootSegment.status = COMPLETED;
|
3838
|
+
queueCompletedSegment(newBoundary, contentRootSegment);
|
3839
|
+
if (newBoundary.pendingTasks === 0) {
|
3840
|
+
popComponentStackInDEV(task);
|
3841
|
+
return;
|
3842
|
+
}
|
3843
|
+
} catch (error) {
|
3844
|
+
contentRootSegment.status = ERRORED;
|
3845
|
+
logRecoverableError(request, error);
|
3846
|
+
newBoundary.forceClientRender = true;
|
3847
|
+
} finally {
|
3848
|
+
task.blockedBoundary = parentBoundary;
|
3849
|
+
task.blockedSegment = parentSegment;
|
3850
|
+
}
|
3851
|
+
var suspendedFallbackTask = createTask(request, fallback, parentBoundary, boundarySegment, fallbackAbortSet, task.legacyContext, task.context, task.treeContext);
|
3852
|
+
{
|
3853
|
+
suspendedFallbackTask.componentStack = task.componentStack;
|
3854
|
+
}
|
3855
|
+
request.pingedTasks.push(suspendedFallbackTask);
|
3856
|
+
popComponentStackInDEV(task);
|
3857
|
+
}
|
3858
|
+
function renderHostElement(request, task, type, props) {
|
3859
|
+
pushBuiltInComponentStackInDEV(task, type);
|
3860
|
+
var segment = task.blockedSegment;
|
3861
|
+
var children = pushStartInstance(segment.chunks, type, props, request.responseState, segment.formatContext);
|
3862
|
+
var prevContext = segment.formatContext;
|
3863
|
+
segment.formatContext = getChildFormatContext(prevContext, type, props);
|
3864
|
+
renderNode(request, task, children);
|
3865
|
+
segment.formatContext = prevContext;
|
3866
|
+
pushEndInstance(segment.chunks, type);
|
3867
|
+
popComponentStackInDEV(task);
|
3868
|
+
}
|
3869
|
+
function shouldConstruct$1(Component) {
|
3870
|
+
return Component.prototype && Component.prototype.isReactComponent;
|
3871
|
+
}
|
3872
|
+
function renderWithHooks(request, task, Component, props, secondArg) {
|
3873
|
+
var componentIdentity = {};
|
3874
|
+
prepareToUseHooks(task, componentIdentity);
|
3875
|
+
var result = Component(props, secondArg);
|
3876
|
+
return finishHooks(Component, props, result, secondArg);
|
3877
|
+
}
|
3878
|
+
function finishClassComponent(request, task, instance, Component, props) {
|
3879
|
+
var nextChildren = instance.render();
|
3880
|
+
{
|
3881
|
+
if (instance.props !== props) {
|
3882
|
+
if (!didWarnAboutReassigningProps) {
|
3883
|
+
error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentNameFromType(Component) || 'a component');
|
3884
|
+
}
|
3885
|
+
didWarnAboutReassigningProps = true;
|
3886
|
+
}
|
3887
|
+
}
|
3888
|
+
{
|
3889
|
+
var childContextTypes = Component.childContextTypes;
|
3890
|
+
if (childContextTypes !== null && childContextTypes !== undefined) {
|
3891
|
+
var previousContext = task.legacyContext;
|
3892
|
+
var mergedContext = processChildContext(instance, Component, previousContext, childContextTypes);
|
3893
|
+
task.legacyContext = mergedContext;
|
3894
|
+
renderNodeDestructive(request, task, nextChildren);
|
3895
|
+
task.legacyContext = previousContext;
|
3896
|
+
return;
|
3897
|
+
}
|
3898
|
+
}
|
3899
|
+
renderNodeDestructive(request, task, nextChildren);
|
3900
|
+
}
|
3901
|
+
function renderClassComponent(request, task, Component, props) {
|
3902
|
+
pushClassComponentStackInDEV(task, Component);
|
3903
|
+
var maskedContext = getMaskedContext(Component, task.legacyContext);
|
3904
|
+
var instance = constructClassInstance(Component, props, maskedContext);
|
3905
|
+
mountClassInstance(instance, Component, props, maskedContext);
|
3906
|
+
finishClassComponent(request, task, instance, Component, props);
|
3907
|
+
popComponentStackInDEV(task);
|
3908
|
+
}
|
3909
|
+
var didWarnAboutBadClass = {};
|
3910
|
+
var didWarnAboutModulePatternComponent = {};
|
3911
|
+
var didWarnAboutContextTypeOnFunctionComponent = {};
|
3912
|
+
var didWarnAboutGetDerivedStateOnFunctionComponent = {};
|
3913
|
+
var didWarnAboutReassigningProps = false;
|
3914
|
+
var didWarnAboutGenerators = false;
|
3915
|
+
var didWarnAboutMaps = false;
|
3916
|
+
var hasWarnedAboutUsingContextAsConsumer = false;
|
3917
|
+
function renderIndeterminateComponent(request, task, Component, props) {
|
3918
|
+
var legacyContext;
|
3919
|
+
{
|
3920
|
+
legacyContext = getMaskedContext(Component, task.legacyContext);
|
3921
|
+
}
|
3922
|
+
pushFunctionComponentStackInDEV(task, Component);
|
3923
|
+
{
|
3924
|
+
if (Component.prototype && typeof Component.prototype.render === 'function') {
|
3925
|
+
var componentName = getComponentNameFromType(Component) || 'Unknown';
|
3926
|
+
if (!didWarnAboutBadClass[componentName]) {
|
3927
|
+
error("The <%s /> component appears to have a render method, but doesn't extend React.Component. " + 'This is likely to cause errors. Change %s to extend React.Component instead.', componentName, componentName);
|
3928
|
+
didWarnAboutBadClass[componentName] = true;
|
3929
|
+
}
|
3930
|
+
}
|
3931
|
+
}
|
3932
|
+
var value = renderWithHooks(request, task, Component, props, legacyContext);
|
3933
|
+
var hasId = checkDidRenderIdHook();
|
3934
|
+
{
|
3935
|
+
if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
|
3936
|
+
var _componentName = getComponentNameFromType(Component) || 'Unknown';
|
3937
|
+
if (!didWarnAboutModulePatternComponent[_componentName]) {
|
3938
|
+
error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName, _componentName, _componentName);
|
3939
|
+
didWarnAboutModulePatternComponent[_componentName] = true;
|
3940
|
+
}
|
3941
|
+
}
|
3942
|
+
}
|
3943
|
+
if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
|
3944
|
+
{
|
3945
|
+
var _componentName2 = getComponentNameFromType(Component) || 'Unknown';
|
3946
|
+
if (!didWarnAboutModulePatternComponent[_componentName2]) {
|
3947
|
+
error('The <%s /> component appears to be a function component that returns a class instance. ' + 'Change %s to a class that extends React.Component instead. ' + "If you can't use a class try assigning the prototype on the function as a workaround. " + "`%s.prototype = React.Component.prototype`. Don't use an arrow function since it " + 'cannot be called with `new` by React.', _componentName2, _componentName2, _componentName2);
|
3948
|
+
didWarnAboutModulePatternComponent[_componentName2] = true;
|
3949
|
+
}
|
3950
|
+
}
|
3951
|
+
mountClassInstance(value, Component, props, legacyContext);
|
3952
|
+
finishClassComponent(request, task, value, Component, props);
|
3953
|
+
} else {
|
3954
|
+
{
|
3955
|
+
validateFunctionComponentInDev(Component);
|
3956
|
+
}
|
3957
|
+
if (hasId) {
|
3958
|
+
var prevTreeContext = task.treeContext;
|
3959
|
+
var totalChildren = 1;
|
3960
|
+
var index = 0;
|
3961
|
+
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);
|
3962
|
+
try {
|
3963
|
+
renderNodeDestructive(request, task, value);
|
3964
|
+
} finally {
|
3965
|
+
task.treeContext = prevTreeContext;
|
3966
|
+
}
|
3967
|
+
} else {
|
3968
|
+
renderNodeDestructive(request, task, value);
|
3969
|
+
}
|
3970
|
+
}
|
3971
|
+
popComponentStackInDEV(task);
|
3972
|
+
}
|
3973
|
+
function validateFunctionComponentInDev(Component) {
|
3974
|
+
{
|
3975
|
+
if (Component) {
|
3976
|
+
if (Component.childContextTypes) {
|
3977
|
+
error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
|
3978
|
+
}
|
3979
|
+
}
|
3980
|
+
if (typeof Component.getDerivedStateFromProps === 'function') {
|
3981
|
+
var _componentName3 = getComponentNameFromType(Component) || 'Unknown';
|
3982
|
+
if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
|
3983
|
+
error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);
|
3984
|
+
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
|
3985
|
+
}
|
3986
|
+
}
|
3987
|
+
if (typeof Component.contextType === 'object' && Component.contextType !== null) {
|
3988
|
+
var _componentName4 = getComponentNameFromType(Component) || 'Unknown';
|
3989
|
+
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
|
3990
|
+
error('%s: Function components do not support contextType.', _componentName4);
|
3991
|
+
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
|
3992
|
+
}
|
3993
|
+
}
|
3994
|
+
}
|
3995
|
+
}
|
3996
|
+
function resolveDefaultProps(Component, baseProps) {
|
3997
|
+
if (Component && Component.defaultProps) {
|
3998
|
+
var props = assign({}, baseProps);
|
3999
|
+
var defaultProps = Component.defaultProps;
|
4000
|
+
for (var propName in defaultProps) {
|
4001
|
+
if (props[propName] === undefined) {
|
4002
|
+
props[propName] = defaultProps[propName];
|
4003
|
+
}
|
4004
|
+
}
|
4005
|
+
return props;
|
4006
|
+
}
|
4007
|
+
return baseProps;
|
4008
|
+
}
|
4009
|
+
function renderForwardRef(request, task, type, props, ref) {
|
4010
|
+
pushFunctionComponentStackInDEV(task, type.render);
|
4011
|
+
var children = renderWithHooks(request, task, type.render, props, ref);
|
4012
|
+
var hasId = checkDidRenderIdHook();
|
4013
|
+
if (hasId) {
|
4014
|
+
var prevTreeContext = task.treeContext;
|
4015
|
+
var totalChildren = 1;
|
4016
|
+
var index = 0;
|
4017
|
+
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, index);
|
4018
|
+
try {
|
4019
|
+
renderNodeDestructive(request, task, children);
|
4020
|
+
} finally {
|
4021
|
+
task.treeContext = prevTreeContext;
|
4022
|
+
}
|
4023
|
+
} else {
|
4024
|
+
renderNodeDestructive(request, task, children);
|
4025
|
+
}
|
4026
|
+
popComponentStackInDEV(task);
|
4027
|
+
}
|
4028
|
+
function renderMemo(request, task, type, props, ref) {
|
4029
|
+
var innerType = type.type;
|
4030
|
+
var resolvedProps = resolveDefaultProps(innerType, props);
|
4031
|
+
renderElement(request, task, innerType, resolvedProps, ref);
|
4032
|
+
}
|
4033
|
+
function renderContextConsumer(request, task, context, props) {
|
4034
|
+
{
|
4035
|
+
if (context._context === undefined) {
|
4036
|
+
if (context !== context.Consumer) {
|
4037
|
+
if (!hasWarnedAboutUsingContextAsConsumer) {
|
4038
|
+
hasWarnedAboutUsingContextAsConsumer = true;
|
4039
|
+
error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
|
4040
|
+
}
|
4041
|
+
}
|
4042
|
+
} else {
|
4043
|
+
context = context._context;
|
4044
|
+
}
|
4045
|
+
}
|
4046
|
+
var render = props.children;
|
4047
|
+
{
|
4048
|
+
if (typeof render !== 'function') {
|
4049
|
+
error('A context consumer was rendered with multiple children, or a child ' + "that isn't a function. A context consumer expects a single child " + 'that is a function. If you did pass a function, make sure there ' + 'is no trailing or leading whitespace around it.');
|
4050
|
+
}
|
4051
|
+
}
|
4052
|
+
var newValue = readContext(context);
|
4053
|
+
var newChildren = render(newValue);
|
4054
|
+
renderNodeDestructive(request, task, newChildren);
|
4055
|
+
}
|
4056
|
+
function renderContextProvider(request, task, type, props) {
|
4057
|
+
var context = type._context;
|
4058
|
+
var value = props.value;
|
4059
|
+
var children = props.children;
|
4060
|
+
var prevSnapshot;
|
4061
|
+
{
|
4062
|
+
prevSnapshot = task.context;
|
4063
|
+
}
|
4064
|
+
task.context = pushProvider(context, value);
|
4065
|
+
renderNodeDestructive(request, task, children);
|
4066
|
+
task.context = popProvider(context);
|
4067
|
+
{
|
4068
|
+
if (prevSnapshot !== task.context) {
|
4069
|
+
error('Popping the context provider did not return back to the original snapshot. This is a bug in React.');
|
4070
|
+
}
|
4071
|
+
}
|
4072
|
+
}
|
4073
|
+
function renderLazyComponent(request, task, lazyComponent, props, ref) {
|
4074
|
+
pushBuiltInComponentStackInDEV(task, 'Lazy');
|
4075
|
+
var payload = lazyComponent._payload;
|
4076
|
+
var init = lazyComponent._init;
|
4077
|
+
var Component = init(payload);
|
4078
|
+
var resolvedProps = resolveDefaultProps(Component, props);
|
4079
|
+
renderElement(request, task, Component, resolvedProps, ref);
|
4080
|
+
popComponentStackInDEV(task);
|
4081
|
+
}
|
4082
|
+
function renderElement(request, task, type, props, ref) {
|
4083
|
+
if (typeof type === 'function') {
|
4084
|
+
if (shouldConstruct$1(type)) {
|
4085
|
+
renderClassComponent(request, task, type, props);
|
4086
|
+
return;
|
4087
|
+
} else {
|
4088
|
+
renderIndeterminateComponent(request, task, type, props);
|
4089
|
+
return;
|
4090
|
+
}
|
4091
|
+
}
|
4092
|
+
if (typeof type === 'string') {
|
4093
|
+
renderHostElement(request, task, type, props);
|
4094
|
+
return;
|
4095
|
+
}
|
4096
|
+
switch (type) {
|
4097
|
+
case REACT_LEGACY_HIDDEN_TYPE:
|
4098
|
+
case REACT_DEBUG_TRACING_MODE_TYPE:
|
4099
|
+
case REACT_STRICT_MODE_TYPE:
|
4100
|
+
case REACT_PROFILER_TYPE:
|
4101
|
+
case REACT_FRAGMENT_TYPE:
|
4102
|
+
{
|
4103
|
+
renderNodeDestructive(request, task, props.children);
|
4104
|
+
return;
|
4105
|
+
}
|
4106
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
4107
|
+
{
|
4108
|
+
pushBuiltInComponentStackInDEV(task, 'SuspenseList');
|
4109
|
+
renderNodeDestructive(request, task, props.children);
|
4110
|
+
popComponentStackInDEV(task);
|
4111
|
+
return;
|
4112
|
+
}
|
4113
|
+
case REACT_SCOPE_TYPE:
|
4114
|
+
{
|
4115
|
+
throw new Error('ReactDOMServer does not yet support scope components.');
|
4116
|
+
}
|
4117
|
+
case REACT_SUSPENSE_TYPE:
|
4118
|
+
{
|
4119
|
+
{
|
4120
|
+
renderSuspenseBoundary(request, task, props);
|
4121
|
+
}
|
4122
|
+
return;
|
4123
|
+
}
|
4124
|
+
}
|
4125
|
+
if (typeof type === 'object' && type !== null) {
|
4126
|
+
switch (type.$$typeof) {
|
4127
|
+
case REACT_FORWARD_REF_TYPE:
|
4128
|
+
{
|
4129
|
+
renderForwardRef(request, task, type, props, ref);
|
4130
|
+
return;
|
4131
|
+
}
|
4132
|
+
case REACT_MEMO_TYPE:
|
4133
|
+
{
|
4134
|
+
renderMemo(request, task, type, props, ref);
|
4135
|
+
return;
|
4136
|
+
}
|
4137
|
+
case REACT_PROVIDER_TYPE:
|
4138
|
+
{
|
4139
|
+
renderContextProvider(request, task, type, props);
|
4140
|
+
return;
|
4141
|
+
}
|
4142
|
+
case REACT_CONTEXT_TYPE:
|
4143
|
+
{
|
4144
|
+
renderContextConsumer(request, task, type, props);
|
4145
|
+
return;
|
4146
|
+
}
|
4147
|
+
case REACT_LAZY_TYPE:
|
4148
|
+
{
|
4149
|
+
renderLazyComponent(request, task, type, props);
|
4150
|
+
return;
|
4151
|
+
}
|
4152
|
+
}
|
4153
|
+
}
|
4154
|
+
var info = '';
|
4155
|
+
{
|
4156
|
+
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
4157
|
+
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
|
4158
|
+
}
|
4159
|
+
}
|
4160
|
+
throw new Error('Element type is invalid: expected a string (for built-in ' + 'components) or a class/function (for composite components) ' + ("but got: " + (type == null ? type : typeof type) + "." + info));
|
4161
|
+
}
|
4162
|
+
function validateIterable(iterable, iteratorFn) {
|
4163
|
+
{
|
4164
|
+
if (typeof Symbol === 'function' && iterable[Symbol.toStringTag] === 'Generator') {
|
4165
|
+
if (!didWarnAboutGenerators) {
|
4166
|
+
error('Using Generators as children is unsupported and will likely yield ' + 'unexpected results because enumerating a generator mutates it. ' + 'You may convert it to an array with `Array.from()` or the ' + '`[...spread]` operator before rendering. Keep in mind ' + 'you might need to polyfill these features for older browsers.');
|
4167
|
+
}
|
4168
|
+
didWarnAboutGenerators = true;
|
4169
|
+
}
|
4170
|
+
if (iterable.entries === iteratorFn) {
|
4171
|
+
if (!didWarnAboutMaps) {
|
4172
|
+
error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
|
4173
|
+
}
|
4174
|
+
didWarnAboutMaps = true;
|
4175
|
+
}
|
4176
|
+
}
|
4177
|
+
}
|
4178
|
+
function renderNodeDestructive(request, task, node) {
|
4179
|
+
task.node = node;
|
4180
|
+
if (typeof node === 'object' && node !== null) {
|
4181
|
+
switch (node.$$typeof) {
|
4182
|
+
case REACT_ELEMENT_TYPE:
|
4183
|
+
{
|
4184
|
+
var element = node;
|
4185
|
+
var type = element.type;
|
4186
|
+
var props = element.props;
|
4187
|
+
var ref = element.ref;
|
4188
|
+
renderElement(request, task, type, props, ref);
|
4189
|
+
return;
|
4190
|
+
}
|
4191
|
+
case REACT_PORTAL_TYPE:
|
4192
|
+
throw new Error('Portals are not currently supported by the server renderer. ' + 'Render them conditionally so that they only appear on the client render.');
|
4193
|
+
case REACT_LAZY_TYPE:
|
4194
|
+
{
|
4195
|
+
{
|
4196
|
+
var lazyNode = node;
|
4197
|
+
var payload = lazyNode._payload;
|
4198
|
+
var init = lazyNode._init;
|
4199
|
+
var resolvedNode = init(payload);
|
4200
|
+
renderNodeDestructive(request, task, resolvedNode);
|
4201
|
+
return;
|
4202
|
+
}
|
4203
|
+
}
|
4204
|
+
}
|
4205
|
+
if (isArray(node)) {
|
4206
|
+
renderChildrenArray(request, task, node);
|
4207
|
+
return;
|
4208
|
+
}
|
4209
|
+
var iteratorFn = getIteratorFn(node);
|
4210
|
+
if (iteratorFn) {
|
4211
|
+
{
|
4212
|
+
validateIterable(node, iteratorFn);
|
4213
|
+
}
|
4214
|
+
var iterator = iteratorFn.call(node);
|
4215
|
+
if (iterator) {
|
4216
|
+
var step = iterator.next();
|
4217
|
+
if (!step.done) {
|
4218
|
+
var children = [];
|
4219
|
+
do {
|
4220
|
+
children.push(step.value);
|
4221
|
+
step = iterator.next();
|
4222
|
+
} while (!step.done);
|
4223
|
+
renderChildrenArray(request, task, children);
|
4224
|
+
return;
|
4225
|
+
}
|
4226
|
+
return;
|
4227
|
+
}
|
4228
|
+
}
|
4229
|
+
var childString = Object.prototype.toString.call(node);
|
4230
|
+
throw new Error("Objects are not valid as a React child (found: " + (childString === '[object Object]' ? 'object with keys {' + Object.keys(node).join(', ') + '}' : childString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
|
4231
|
+
}
|
4232
|
+
if (typeof node === 'string') {
|
4233
|
+
pushTextInstance$1(task.blockedSegment.chunks, node, request.responseState);
|
4234
|
+
return;
|
4235
|
+
}
|
4236
|
+
if (typeof node === 'number') {
|
4237
|
+
pushTextInstance$1(task.blockedSegment.chunks, '' + node, request.responseState);
|
4238
|
+
return;
|
4239
|
+
}
|
4240
|
+
{
|
4241
|
+
if (typeof node === 'function') {
|
4242
|
+
error('Functions are not valid as a React child. This may happen if ' + 'you return a Component instead of <Component /> from render. ' + 'Or maybe you meant to call this function rather than return it.');
|
4243
|
+
}
|
4244
|
+
}
|
4245
|
+
}
|
4246
|
+
function renderChildrenArray(request, task, children) {
|
4247
|
+
var totalChildren = children.length;
|
4248
|
+
for (var i = 0; i < totalChildren; i++) {
|
4249
|
+
var prevTreeContext = task.treeContext;
|
4250
|
+
task.treeContext = pushTreeContext(prevTreeContext, totalChildren, i);
|
4251
|
+
try {
|
4252
|
+
renderNode(request, task, children[i]);
|
4253
|
+
} finally {
|
4254
|
+
task.treeContext = prevTreeContext;
|
4255
|
+
}
|
4256
|
+
}
|
4257
|
+
}
|
4258
|
+
function spawnNewSuspendedTask(request, task, x) {
|
4259
|
+
var segment = task.blockedSegment;
|
4260
|
+
var insertionIndex = segment.chunks.length;
|
4261
|
+
var newSegment = createPendingSegment(request, insertionIndex, null, segment.formatContext);
|
4262
|
+
segment.children.push(newSegment);
|
4263
|
+
var newTask = createTask(request, task.node, task.blockedBoundary, newSegment, task.abortSet, task.legacyContext, task.context, task.treeContext);
|
4264
|
+
{
|
4265
|
+
if (task.componentStack !== null) {
|
4266
|
+
newTask.componentStack = task.componentStack.parent;
|
4267
|
+
}
|
4268
|
+
}
|
4269
|
+
var ping = newTask.ping;
|
4270
|
+
x.then(ping, ping);
|
4271
|
+
}
|
4272
|
+
function renderNode(request, task, node) {
|
4273
|
+
var previousFormatContext = task.blockedSegment.formatContext;
|
4274
|
+
var previousLegacyContext = task.legacyContext;
|
4275
|
+
var previousContext = task.context;
|
4276
|
+
var previousComponentStack = null;
|
4277
|
+
{
|
4278
|
+
previousComponentStack = task.componentStack;
|
4279
|
+
}
|
4280
|
+
try {
|
4281
|
+
return renderNodeDestructive(request, task, node);
|
4282
|
+
} catch (x) {
|
4283
|
+
resetHooksState();
|
4284
|
+
if (typeof x === 'object' && x !== null && typeof x.then === 'function') {
|
4285
|
+
spawnNewSuspendedTask(request, task, x);
|
4286
|
+
task.blockedSegment.formatContext = previousFormatContext;
|
4287
|
+
task.legacyContext = previousLegacyContext;
|
4288
|
+
task.context = previousContext;
|
4289
|
+
switchContext(previousContext);
|
4290
|
+
{
|
4291
|
+
task.componentStack = previousComponentStack;
|
4292
|
+
}
|
4293
|
+
return;
|
4294
|
+
} else {
|
4295
|
+
task.blockedSegment.formatContext = previousFormatContext;
|
4296
|
+
task.legacyContext = previousLegacyContext;
|
4297
|
+
task.context = previousContext;
|
4298
|
+
switchContext(previousContext);
|
4299
|
+
{
|
4300
|
+
task.componentStack = previousComponentStack;
|
4301
|
+
}
|
4302
|
+
throw x;
|
4303
|
+
}
|
4304
|
+
}
|
4305
|
+
}
|
4306
|
+
function erroredTask(request, boundary, segment, error) {
|
4307
|
+
logRecoverableError(request, error);
|
4308
|
+
if (boundary === null) {
|
4309
|
+
fatalError(request, error);
|
4310
|
+
} else {
|
4311
|
+
boundary.pendingTasks--;
|
4312
|
+
if (!boundary.forceClientRender) {
|
4313
|
+
boundary.forceClientRender = true;
|
4314
|
+
if (boundary.parentFlushed) {
|
4315
|
+
request.clientRenderedBoundaries.push(boundary);
|
4316
|
+
}
|
4317
|
+
}
|
4318
|
+
}
|
4319
|
+
request.allPendingTasks--;
|
4320
|
+
if (request.allPendingTasks === 0) {
|
4321
|
+
var onAllReady = request.onAllReady;
|
4322
|
+
onAllReady();
|
4323
|
+
}
|
4324
|
+
}
|
4325
|
+
function abortTaskSoft(task) {
|
4326
|
+
var request = this;
|
4327
|
+
var boundary = task.blockedBoundary;
|
4328
|
+
var segment = task.blockedSegment;
|
4329
|
+
segment.status = ABORTED;
|
4330
|
+
finishedTask(request, boundary, segment);
|
4331
|
+
}
|
4332
|
+
function abortTask(task) {
|
4333
|
+
var request = this;
|
4334
|
+
var boundary = task.blockedBoundary;
|
4335
|
+
var segment = task.blockedSegment;
|
4336
|
+
segment.status = ABORTED;
|
4337
|
+
if (boundary === null) {
|
4338
|
+
request.allPendingTasks--;
|
4339
|
+
if (request.status !== CLOSED) {
|
4340
|
+
request.status = CLOSED;
|
4341
|
+
if (request.destination !== null) {
|
4342
|
+
close(request.destination);
|
4343
|
+
}
|
4344
|
+
}
|
4345
|
+
} else {
|
4346
|
+
boundary.pendingTasks--;
|
4347
|
+
if (!boundary.forceClientRender) {
|
4348
|
+
boundary.forceClientRender = true;
|
4349
|
+
if (boundary.parentFlushed) {
|
4350
|
+
request.clientRenderedBoundaries.push(boundary);
|
4351
|
+
}
|
4352
|
+
}
|
4353
|
+
boundary.fallbackAbortableTasks.forEach(abortTask, request);
|
4354
|
+
boundary.fallbackAbortableTasks.clear();
|
4355
|
+
request.allPendingTasks--;
|
4356
|
+
if (request.allPendingTasks === 0) {
|
4357
|
+
var onAllReady = request.onAllReady;
|
4358
|
+
onAllReady();
|
4359
|
+
}
|
4360
|
+
}
|
4361
|
+
}
|
4362
|
+
function queueCompletedSegment(boundary, segment) {
|
4363
|
+
if (segment.chunks.length === 0 && segment.children.length === 1 && segment.children[0].boundary === null) {
|
4364
|
+
var childSegment = segment.children[0];
|
4365
|
+
childSegment.id = segment.id;
|
4366
|
+
childSegment.parentFlushed = true;
|
4367
|
+
if (childSegment.status === COMPLETED) {
|
4368
|
+
queueCompletedSegment(boundary, childSegment);
|
4369
|
+
}
|
4370
|
+
} else {
|
4371
|
+
var completedSegments = boundary.completedSegments;
|
4372
|
+
completedSegments.push(segment);
|
4373
|
+
}
|
4374
|
+
}
|
4375
|
+
function finishedTask(request, boundary, segment) {
|
4376
|
+
if (boundary === null) {
|
4377
|
+
if (segment.parentFlushed) {
|
4378
|
+
if (request.completedRootSegment !== null) {
|
4379
|
+
throw new Error('There can only be one root segment. This is a bug in React.');
|
4380
|
+
}
|
4381
|
+
request.completedRootSegment = segment;
|
4382
|
+
}
|
4383
|
+
request.pendingRootTasks--;
|
4384
|
+
if (request.pendingRootTasks === 0) {
|
4385
|
+
request.onShellError = noop$1;
|
4386
|
+
var onShellReady = request.onShellReady;
|
4387
|
+
onShellReady();
|
4388
|
+
}
|
4389
|
+
} else {
|
4390
|
+
boundary.pendingTasks--;
|
4391
|
+
if (boundary.forceClientRender)
|
4392
|
+
;
|
4393
|
+
else if (boundary.pendingTasks === 0) {
|
4394
|
+
if (segment.parentFlushed) {
|
4395
|
+
if (segment.status === COMPLETED) {
|
4396
|
+
queueCompletedSegment(boundary, segment);
|
4397
|
+
}
|
4398
|
+
}
|
4399
|
+
if (boundary.parentFlushed) {
|
4400
|
+
request.completedBoundaries.push(boundary);
|
4401
|
+
}
|
4402
|
+
boundary.fallbackAbortableTasks.forEach(abortTaskSoft, request);
|
4403
|
+
boundary.fallbackAbortableTasks.clear();
|
4404
|
+
} else {
|
4405
|
+
if (segment.parentFlushed) {
|
4406
|
+
if (segment.status === COMPLETED) {
|
4407
|
+
queueCompletedSegment(boundary, segment);
|
4408
|
+
var completedSegments = boundary.completedSegments;
|
4409
|
+
if (completedSegments.length === 1) {
|
4410
|
+
if (boundary.parentFlushed) {
|
4411
|
+
request.partialBoundaries.push(boundary);
|
4412
|
+
}
|
4413
|
+
}
|
4414
|
+
}
|
4415
|
+
}
|
4416
|
+
}
|
4417
|
+
}
|
4418
|
+
request.allPendingTasks--;
|
4419
|
+
if (request.allPendingTasks === 0) {
|
4420
|
+
var onAllReady = request.onAllReady;
|
4421
|
+
onAllReady();
|
4422
|
+
}
|
4423
|
+
}
|
4424
|
+
function retryTask(request, task) {
|
4425
|
+
var segment = task.blockedSegment;
|
4426
|
+
if (segment.status !== PENDING) {
|
4427
|
+
return;
|
4428
|
+
}
|
4429
|
+
switchContext(task.context);
|
4430
|
+
var prevTaskInDEV = null;
|
4431
|
+
{
|
4432
|
+
prevTaskInDEV = currentTaskInDEV;
|
4433
|
+
currentTaskInDEV = task;
|
4434
|
+
}
|
4435
|
+
try {
|
4436
|
+
renderNodeDestructive(request, task, task.node);
|
4437
|
+
task.abortSet.delete(task);
|
4438
|
+
segment.status = COMPLETED;
|
4439
|
+
finishedTask(request, task.blockedBoundary, segment);
|
4440
|
+
} catch (x) {
|
4441
|
+
resetHooksState();
|
4442
|
+
if (typeof x === 'object' && x !== null && typeof x.then === 'function') {
|
4443
|
+
var ping = task.ping;
|
4444
|
+
x.then(ping, ping);
|
4445
|
+
} else {
|
4446
|
+
task.abortSet.delete(task);
|
4447
|
+
segment.status = ERRORED;
|
4448
|
+
erroredTask(request, task.blockedBoundary, segment, x);
|
4449
|
+
}
|
4450
|
+
} finally {
|
4451
|
+
{
|
4452
|
+
currentTaskInDEV = prevTaskInDEV;
|
4453
|
+
}
|
4454
|
+
}
|
4455
|
+
}
|
4456
|
+
function performWork(request) {
|
4457
|
+
if (request.status === CLOSED) {
|
4458
|
+
return;
|
4459
|
+
}
|
4460
|
+
var prevContext = getActiveContext();
|
4461
|
+
var prevDispatcher = ReactCurrentDispatcher$1.current;
|
4462
|
+
ReactCurrentDispatcher$1.current = Dispatcher;
|
4463
|
+
var prevGetCurrentStackImpl;
|
4464
|
+
{
|
4465
|
+
prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
|
4466
|
+
ReactDebugCurrentFrame$1.getCurrentStack = getCurrentStackInDEV;
|
4467
|
+
}
|
4468
|
+
var prevResponseState = currentResponseState;
|
4469
|
+
setCurrentResponseState(request.responseState);
|
4470
|
+
try {
|
4471
|
+
var pingedTasks = request.pingedTasks;
|
4472
|
+
var i;
|
4473
|
+
for (i = 0; i < pingedTasks.length; i++) {
|
4474
|
+
var task = pingedTasks[i];
|
4475
|
+
retryTask(request, task);
|
4476
|
+
}
|
4477
|
+
pingedTasks.splice(0, i);
|
4478
|
+
if (request.destination !== null) {
|
4479
|
+
flushCompletedQueues(request, request.destination);
|
4480
|
+
}
|
4481
|
+
} catch (error) {
|
4482
|
+
logRecoverableError(request, error);
|
4483
|
+
fatalError(request, error);
|
4484
|
+
} finally {
|
4485
|
+
setCurrentResponseState(prevResponseState);
|
4486
|
+
ReactCurrentDispatcher$1.current = prevDispatcher;
|
4487
|
+
{
|
4488
|
+
ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
|
4489
|
+
}
|
4490
|
+
if (prevDispatcher === Dispatcher) {
|
4491
|
+
switchContext(prevContext);
|
4492
|
+
}
|
4493
|
+
}
|
4494
|
+
}
|
4495
|
+
function flushSubtree(request, destination, segment) {
|
4496
|
+
segment.parentFlushed = true;
|
4497
|
+
switch (segment.status) {
|
4498
|
+
case PENDING:
|
4499
|
+
{
|
4500
|
+
var segmentID = segment.id = request.nextSegmentId++;
|
4501
|
+
return writePlaceholder(destination, request.responseState, segmentID);
|
4502
|
+
}
|
4503
|
+
case COMPLETED:
|
4504
|
+
{
|
4505
|
+
segment.status = FLUSHED;
|
4506
|
+
var r = true;
|
4507
|
+
var chunks = segment.chunks;
|
4508
|
+
var chunkIdx = 0;
|
4509
|
+
var children = segment.children;
|
4510
|
+
for (var childIdx = 0; childIdx < children.length; childIdx++) {
|
4511
|
+
var nextChild = children[childIdx];
|
4512
|
+
for (; chunkIdx < nextChild.index; chunkIdx++) {
|
4513
|
+
writeChunk(destination, chunks[chunkIdx]);
|
4514
|
+
}
|
4515
|
+
r = flushSegment(request, destination, nextChild);
|
4516
|
+
}
|
4517
|
+
for (; chunkIdx < chunks.length - 1; chunkIdx++) {
|
4518
|
+
writeChunk(destination, chunks[chunkIdx]);
|
4519
|
+
}
|
4520
|
+
if (chunkIdx < chunks.length) {
|
4521
|
+
r = writeChunkAndReturn(destination, chunks[chunkIdx]);
|
4522
|
+
}
|
4523
|
+
return r;
|
4524
|
+
}
|
4525
|
+
default:
|
4526
|
+
{
|
4527
|
+
throw new Error('Aborted, errored or already flushed boundaries should not be flushed again. This is a bug in React.');
|
4528
|
+
}
|
4529
|
+
}
|
4530
|
+
}
|
4531
|
+
function flushSegment(request, destination, segment) {
|
4532
|
+
var boundary = segment.boundary;
|
4533
|
+
if (boundary === null) {
|
4534
|
+
return flushSubtree(request, destination, segment);
|
4535
|
+
}
|
4536
|
+
boundary.parentFlushed = true;
|
4537
|
+
if (boundary.forceClientRender) {
|
4538
|
+
writeStartClientRenderedSuspenseBoundary$1(destination, request.responseState);
|
4539
|
+
flushSubtree(request, destination, segment);
|
4540
|
+
return writeEndClientRenderedSuspenseBoundary$1(destination, request.responseState);
|
4541
|
+
} else if (boundary.pendingTasks > 0) {
|
4542
|
+
boundary.rootSegmentID = request.nextSegmentId++;
|
4543
|
+
if (boundary.completedSegments.length > 0) {
|
4544
|
+
request.partialBoundaries.push(boundary);
|
4545
|
+
}
|
4546
|
+
var id = boundary.id = assignSuspenseBoundaryID(request.responseState);
|
4547
|
+
writeStartPendingSuspenseBoundary(destination, request.responseState, id);
|
4548
|
+
flushSubtree(request, destination, segment);
|
4549
|
+
return writeEndPendingSuspenseBoundary(destination, request.responseState);
|
4550
|
+
} else if (boundary.byteSize > request.progressiveChunkSize) {
|
4551
|
+
boundary.rootSegmentID = request.nextSegmentId++;
|
4552
|
+
request.completedBoundaries.push(boundary);
|
4553
|
+
writeStartPendingSuspenseBoundary(destination, request.responseState, boundary.id);
|
4554
|
+
flushSubtree(request, destination, segment);
|
4555
|
+
return writeEndPendingSuspenseBoundary(destination, request.responseState);
|
4556
|
+
} else {
|
4557
|
+
writeStartCompletedSuspenseBoundary$1(destination, request.responseState);
|
4558
|
+
var completedSegments = boundary.completedSegments;
|
4559
|
+
if (completedSegments.length !== 1) {
|
4560
|
+
throw new Error('A previously unvisited boundary must have exactly one root segment. This is a bug in React.');
|
4561
|
+
}
|
4562
|
+
var contentSegment = completedSegments[0];
|
4563
|
+
flushSegment(request, destination, contentSegment);
|
4564
|
+
return writeEndCompletedSuspenseBoundary$1(destination, request.responseState);
|
4565
|
+
}
|
4566
|
+
}
|
4567
|
+
function flushClientRenderedBoundary(request, destination, boundary) {
|
4568
|
+
return writeClientRenderBoundaryInstruction(destination, request.responseState, boundary.id);
|
4569
|
+
}
|
4570
|
+
function flushSegmentContainer(request, destination, segment) {
|
4571
|
+
writeStartSegment(destination, request.responseState, segment.formatContext, segment.id);
|
4572
|
+
flushSegment(request, destination, segment);
|
4573
|
+
return writeEndSegment(destination, segment.formatContext);
|
4574
|
+
}
|
4575
|
+
function flushCompletedBoundary(request, destination, boundary) {
|
4576
|
+
var completedSegments = boundary.completedSegments;
|
4577
|
+
var i = 0;
|
4578
|
+
for (; i < completedSegments.length; i++) {
|
4579
|
+
var segment = completedSegments[i];
|
4580
|
+
flushPartiallyCompletedSegment(request, destination, boundary, segment);
|
4581
|
+
}
|
4582
|
+
completedSegments.length = 0;
|
4583
|
+
return writeCompletedBoundaryInstruction(destination, request.responseState, boundary.id, boundary.rootSegmentID);
|
4584
|
+
}
|
4585
|
+
function flushPartialBoundary(request, destination, boundary) {
|
4586
|
+
var completedSegments = boundary.completedSegments;
|
4587
|
+
var i = 0;
|
4588
|
+
for (; i < completedSegments.length; i++) {
|
4589
|
+
var segment = completedSegments[i];
|
4590
|
+
if (!flushPartiallyCompletedSegment(request, destination, boundary, segment)) {
|
4591
|
+
i++;
|
4592
|
+
completedSegments.splice(0, i);
|
4593
|
+
return false;
|
4594
|
+
}
|
4595
|
+
}
|
4596
|
+
completedSegments.splice(0, i);
|
4597
|
+
return true;
|
4598
|
+
}
|
4599
|
+
function flushPartiallyCompletedSegment(request, destination, boundary, segment) {
|
4600
|
+
if (segment.status === FLUSHED) {
|
4601
|
+
return true;
|
4602
|
+
}
|
4603
|
+
var segmentID = segment.id;
|
4604
|
+
if (segmentID === -1) {
|
4605
|
+
var rootSegmentID = segment.id = boundary.rootSegmentID;
|
4606
|
+
if (rootSegmentID === -1) {
|
4607
|
+
throw new Error('A root segment ID must have been assigned by now. This is a bug in React.');
|
4608
|
+
}
|
4609
|
+
return flushSegmentContainer(request, destination, segment);
|
4610
|
+
} else {
|
4611
|
+
flushSegmentContainer(request, destination, segment);
|
4612
|
+
return writeCompletedSegmentInstruction(destination, request.responseState, segmentID);
|
4613
|
+
}
|
4614
|
+
}
|
4615
|
+
function flushCompletedQueues(request, destination) {
|
4616
|
+
try {
|
4617
|
+
var completedRootSegment = request.completedRootSegment;
|
4618
|
+
if (completedRootSegment !== null && request.pendingRootTasks === 0) {
|
4619
|
+
flushSegment(request, destination, completedRootSegment);
|
4620
|
+
request.completedRootSegment = null;
|
4621
|
+
writeCompletedRoot(destination, request.responseState);
|
4622
|
+
}
|
4623
|
+
var clientRenderedBoundaries = request.clientRenderedBoundaries;
|
4624
|
+
var i;
|
4625
|
+
for (i = 0; i < clientRenderedBoundaries.length; i++) {
|
4626
|
+
var boundary = clientRenderedBoundaries[i];
|
4627
|
+
if (!flushClientRenderedBoundary(request, destination, boundary)) {
|
4628
|
+
request.destination = null;
|
4629
|
+
i++;
|
4630
|
+
clientRenderedBoundaries.splice(0, i);
|
4631
|
+
return;
|
4632
|
+
}
|
4633
|
+
}
|
4634
|
+
clientRenderedBoundaries.splice(0, i);
|
4635
|
+
var completedBoundaries = request.completedBoundaries;
|
4636
|
+
for (i = 0; i < completedBoundaries.length; i++) {
|
4637
|
+
var _boundary = completedBoundaries[i];
|
4638
|
+
if (!flushCompletedBoundary(request, destination, _boundary)) {
|
4639
|
+
request.destination = null;
|
4640
|
+
i++;
|
4641
|
+
completedBoundaries.splice(0, i);
|
4642
|
+
return;
|
4643
|
+
}
|
4644
|
+
}
|
4645
|
+
completedBoundaries.splice(0, i);
|
4646
|
+
completeWriting(destination);
|
4647
|
+
beginWriting(destination);
|
4648
|
+
var partialBoundaries = request.partialBoundaries;
|
4649
|
+
for (i = 0; i < partialBoundaries.length; i++) {
|
4650
|
+
var _boundary2 = partialBoundaries[i];
|
4651
|
+
if (!flushPartialBoundary(request, destination, _boundary2)) {
|
4652
|
+
request.destination = null;
|
4653
|
+
i++;
|
4654
|
+
partialBoundaries.splice(0, i);
|
4655
|
+
return;
|
4656
|
+
}
|
4657
|
+
}
|
4658
|
+
partialBoundaries.splice(0, i);
|
4659
|
+
var largeBoundaries = request.completedBoundaries;
|
4660
|
+
for (i = 0; i < largeBoundaries.length; i++) {
|
4661
|
+
var _boundary3 = largeBoundaries[i];
|
4662
|
+
if (!flushCompletedBoundary(request, destination, _boundary3)) {
|
4663
|
+
request.destination = null;
|
4664
|
+
i++;
|
4665
|
+
largeBoundaries.splice(0, i);
|
4666
|
+
return;
|
4667
|
+
}
|
4668
|
+
}
|
4669
|
+
largeBoundaries.splice(0, i);
|
4670
|
+
} finally {
|
4671
|
+
if (request.allPendingTasks === 0 && request.pingedTasks.length === 0 && request.clientRenderedBoundaries.length === 0 && request.completedBoundaries.length === 0) {
|
4672
|
+
{
|
4673
|
+
if (request.abortableTasks.size !== 0) {
|
4674
|
+
error('There was still abortable task at the root when we closed. This is a bug in React.');
|
4675
|
+
}
|
4676
|
+
}
|
4677
|
+
close(destination);
|
4678
|
+
}
|
4679
|
+
}
|
4680
|
+
}
|
4681
|
+
function startWork(request) {
|
4682
|
+
scheduleWork(function() {
|
4683
|
+
return performWork(request);
|
4684
|
+
});
|
4685
|
+
}
|
4686
|
+
function startFlowing(request, destination) {
|
4687
|
+
if (request.status === CLOSING) {
|
4688
|
+
request.status = CLOSED;
|
4689
|
+
closeWithError(destination, request.fatalError);
|
4690
|
+
return;
|
4691
|
+
}
|
4692
|
+
if (request.status === CLOSED) {
|
4693
|
+
return;
|
4694
|
+
}
|
4695
|
+
if (request.destination !== null) {
|
4696
|
+
return;
|
4697
|
+
}
|
4698
|
+
request.destination = destination;
|
4699
|
+
try {
|
4700
|
+
flushCompletedQueues(request, destination);
|
4701
|
+
} catch (error) {
|
4702
|
+
logRecoverableError(request, error);
|
4703
|
+
fatalError(request, error);
|
4704
|
+
}
|
4705
|
+
}
|
4706
|
+
function abort(request) {
|
4707
|
+
try {
|
4708
|
+
var abortableTasks = request.abortableTasks;
|
4709
|
+
abortableTasks.forEach(abortTask, request);
|
4710
|
+
abortableTasks.clear();
|
4711
|
+
if (request.destination !== null) {
|
4712
|
+
flushCompletedQueues(request, request.destination);
|
4713
|
+
}
|
4714
|
+
} catch (error) {
|
4715
|
+
logRecoverableError(request, error);
|
4716
|
+
fatalError(request, error);
|
4717
|
+
}
|
4718
|
+
}
|
4719
|
+
function onError() {}
|
4720
|
+
function renderToStringImpl(children, options, generateStaticMarkup) {
|
4721
|
+
var didFatal = false;
|
4722
|
+
var fatalError = null;
|
4723
|
+
var result = '';
|
4724
|
+
var destination = {
|
4725
|
+
push: function(chunk) {
|
4726
|
+
if (chunk !== null) {
|
4727
|
+
result += chunk;
|
4728
|
+
}
|
4729
|
+
return true;
|
4730
|
+
},
|
4731
|
+
destroy: function(error) {
|
4732
|
+
didFatal = true;
|
4733
|
+
fatalError = error;
|
4734
|
+
}
|
4735
|
+
};
|
4736
|
+
var readyToStream = false;
|
4737
|
+
function onShellReady() {
|
4738
|
+
readyToStream = true;
|
4739
|
+
}
|
4740
|
+
var request = createRequest(children, createResponseState$1(generateStaticMarkup, options ? options.identifierPrefix : undefined), createRootFormatContext(), Infinity, onError, undefined, onShellReady, undefined, undefined);
|
4741
|
+
startWork(request);
|
4742
|
+
abort(request);
|
4743
|
+
startFlowing(request, destination);
|
4744
|
+
if (didFatal) {
|
4745
|
+
throw fatalError;
|
4746
|
+
}
|
4747
|
+
if (!readyToStream) {
|
4748
|
+
throw new Error('A component suspended while responding to synchronous input. This ' + 'will cause the UI to be replaced with a loading indicator. To fix, ' + 'updates that suspend should be wrapped with startTransition.');
|
4749
|
+
}
|
4750
|
+
return result;
|
4751
|
+
}
|
4752
|
+
function renderToString(children, options) {
|
4753
|
+
return renderToStringImpl(children, options, false);
|
4754
|
+
}
|
4755
|
+
function renderToStaticMarkup(children, options) {
|
4756
|
+
return renderToStringImpl(children, options, true);
|
4757
|
+
}
|
4758
|
+
function renderToNodeStream() {
|
4759
|
+
throw new Error('ReactDOMServer.renderToNodeStream(): The streaming API is not available ' + 'in the browser. Use ReactDOMServer.renderToString() instead.');
|
4760
|
+
}
|
4761
|
+
function renderToStaticNodeStream() {
|
4762
|
+
throw new Error('ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available ' + 'in the browser. Use ReactDOMServer.renderToStaticMarkup() instead.');
|
4763
|
+
}
|
4764
|
+
exports.renderToNodeStream = renderToNodeStream;
|
4765
|
+
exports.renderToStaticMarkup = renderToStaticMarkup;
|
4766
|
+
exports.renderToStaticNodeStream = renderToStaticNodeStream;
|
4767
|
+
exports.renderToString = renderToString;
|
4768
|
+
exports.version = ReactVersion;
|
4769
|
+
})));
|
4770
|
+
})(require('process'));
|