aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules')
l---------node_modules/.bin/loose-envify1
-rw-r--r--node_modules/.package-lock.json16123
-rw-r--r--node_modules/js-tokens/CHANGELOG.md151
-rw-r--r--node_modules/js-tokens/LICENSE21
-rw-r--r--node_modules/js-tokens/README.md240
-rw-r--r--node_modules/js-tokens/index.js23
-rw-r--r--node_modules/js-tokens/package.json30
-rw-r--r--node_modules/loose-envify/LICENSE21
-rw-r--r--node_modules/loose-envify/README.md45
-rwxr-xr-xnode_modules/loose-envify/cli.js16
-rw-r--r--node_modules/loose-envify/custom.js4
-rw-r--r--node_modules/loose-envify/index.js3
-rw-r--r--node_modules/loose-envify/loose-envify.js36
-rw-r--r--node_modules/loose-envify/package.json36
-rw-r--r--node_modules/loose-envify/replace.js65
-rw-r--r--node_modules/object-assign/index.js90
-rw-r--r--node_modules/object-assign/license21
-rw-r--r--node_modules/object-assign/package.json42
-rw-r--r--node_modules/object-assign/readme.md61
-rw-r--r--node_modules/prop-types/LICENSE21
-rw-r--r--node_modules/prop-types/README.md302
-rw-r--r--node_modules/prop-types/checkPropTypes.js103
-rw-r--r--node_modules/prop-types/factory.js19
-rw-r--r--node_modules/prop-types/factoryWithThrowingShims.js65
-rw-r--r--node_modules/prop-types/factoryWithTypeCheckers.js610
-rw-r--r--node_modules/prop-types/index.js19
-rw-r--r--node_modules/prop-types/lib/ReactPropTypesSecret.js12
-rw-r--r--node_modules/prop-types/lib/has.js1
-rw-r--r--node_modules/prop-types/package.json60
-rw-r--r--node_modules/prop-types/prop-types.js1315
-rw-r--r--node_modules/prop-types/prop-types.min.js1
-rw-r--r--node_modules/react-dom/LICENSE21
-rw-r--r--node_modules/react-dom/README.md54
-rw-r--r--node_modules/react-dom/build-info.json8
-rw-r--r--node_modules/react-dom/cjs/react-dom-server.browser.development.js4342
-rw-r--r--node_modules/react-dom/cjs/react-dom-server.browser.production.min.js51
-rw-r--r--node_modules/react-dom/cjs/react-dom-server.node.development.js4383
-rw-r--r--node_modules/react-dom/cjs/react-dom-server.node.production.min.js52
-rw-r--r--node_modules/react-dom/cjs/react-dom-test-utils.development.js2118
-rw-r--r--node_modules/react-dom/cjs/react-dom-test-utils.production.min.js43
-rw-r--r--node_modules/react-dom/cjs/react-dom.development.js26262
-rw-r--r--node_modules/react-dom/cjs/react-dom.production.min.js297
-rw-r--r--node_modules/react-dom/cjs/react-dom.profiling.min.js310
-rw-r--r--node_modules/react-dom/index.js38
-rw-r--r--node_modules/react-dom/package.json49
-rw-r--r--node_modules/react-dom/profiling.js38
-rw-r--r--node_modules/react-dom/server.browser.js7
-rw-r--r--node_modules/react-dom/server.js3
-rw-r--r--node_modules/react-dom/server.node.js7
-rw-r--r--node_modules/react-dom/test-utils.js7
-rw-r--r--node_modules/react-dom/umd/react-dom-server.browser.development.js4341
-rw-r--r--node_modules/react-dom/umd/react-dom-server.browser.production.min.js46
-rw-r--r--node_modules/react-dom/umd/react-dom-test-utils.development.js2136
-rw-r--r--node_modules/react-dom/umd/react-dom-test-utils.production.min.js35
-rw-r--r--node_modules/react-dom/umd/react-dom.development.js26292
-rw-r--r--node_modules/react-dom/umd/react-dom.production.min.js245
-rw-r--r--node_modules/react-dom/umd/react-dom.profiling.min.js252
-rw-r--r--node_modules/react-is/LICENSE21
-rw-r--r--node_modules/react-is/README.md104
-rw-r--r--node_modules/react-is/build-info.json8
-rw-r--r--node_modules/react-is/cjs/react-is.development.js226
-rw-r--r--node_modules/react-is/cjs/react-is.production.min.js14
-rw-r--r--node_modules/react-is/index.js7
-rw-r--r--node_modules/react-is/package.json27
-rw-r--r--node_modules/react-is/umd/react-is.development.js225
-rw-r--r--node_modules/react-is/umd/react-is.production.min.js14
-rw-r--r--node_modules/react/LICENSE21
-rw-r--r--node_modules/react/README.md13
-rw-r--r--node_modules/react/build-info.json8
-rw-r--r--node_modules/react/cjs/react-jsx-dev-runtime.development.js1203
-rw-r--r--node_modules/react/cjs/react-jsx-dev-runtime.production.min.js9
-rw-r--r--node_modules/react/cjs/react-jsx-runtime.development.js1221
-rw-r--r--node_modules/react/cjs/react-jsx-runtime.production.min.js10
-rw-r--r--node_modules/react/cjs/react.development.js2333
-rw-r--r--node_modules/react/cjs/react.production.min.js23
-rw-r--r--node_modules/react/index.js7
-rw-r--r--node_modules/react/jsx-dev-runtime.js7
-rw-r--r--node_modules/react/jsx-runtime.js7
-rw-r--r--node_modules/react/package.json39
-rw-r--r--node_modules/react/umd/react.development.js3357
-rw-r--r--node_modules/react/umd/react.production.min.js31
-rw-r--r--node_modules/react/umd/react.profiling.min.js36
-rw-r--r--node_modules/scheduler/LICENSE21
-rw-r--r--node_modules/scheduler/README.md9
-rw-r--r--node_modules/scheduler/build-info.json8
-rw-r--r--node_modules/scheduler/cjs/scheduler-tracing.development.js347
-rw-r--r--node_modules/scheduler/cjs/scheduler-tracing.production.min.js9
-rw-r--r--node_modules/scheduler/cjs/scheduler-tracing.profiling.min.js16
-rw-r--r--node_modules/scheduler/cjs/scheduler-unstable_mock.development.js665
-rw-r--r--node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js19
-rw-r--r--node_modules/scheduler/cjs/scheduler.development.js646
-rw-r--r--node_modules/scheduler/cjs/scheduler.production.min.js20
-rw-r--r--node_modules/scheduler/index.js7
-rw-r--r--node_modules/scheduler/package.json40
-rw-r--r--node_modules/scheduler/tracing-profiling.js7
-rw-r--r--node_modules/scheduler/tracing.js7
-rw-r--r--node_modules/scheduler/umd/scheduler-tracing.development.js80
-rw-r--r--node_modules/scheduler/umd/scheduler-tracing.production.min.js80
-rw-r--r--node_modules/scheduler/umd/scheduler-tracing.profiling.min.js80
-rw-r--r--node_modules/scheduler/umd/scheduler-unstable_mock.development.js664
-rw-r--r--node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js18
-rw-r--r--node_modules/scheduler/umd/scheduler.development.js152
-rw-r--r--node_modules/scheduler/umd/scheduler.production.min.js146
-rw-r--r--node_modules/scheduler/umd/scheduler.profiling.min.js146
-rw-r--r--node_modules/scheduler/unstable_mock.js7
-rw-r--r--node_modules/xterm/LICENSE21
-rw-r--r--node_modules/xterm/README.md222
-rw-r--r--node_modules/xterm/css/xterm.css180
-rw-r--r--node_modules/xterm/lib/xterm.js2
-rw-r--r--node_modules/xterm/lib/xterm.js.map1
-rw-r--r--node_modules/xterm/package.json90
-rw-r--r--node_modules/xterm/src/browser/AccessibilityManager.ts301
-rw-r--r--node_modules/xterm/src/browser/Clipboard.ts99
-rw-r--r--node_modules/xterm/src/browser/Color.ts236
-rw-r--r--node_modules/xterm/src/browser/ColorContrastCache.ts38
-rw-r--r--node_modules/xterm/src/browser/ColorManager.ts258
-rw-r--r--node_modules/xterm/src/browser/Dom.ts10
-rw-r--r--node_modules/xterm/src/browser/Lifecycle.ts30
-rw-r--r--node_modules/xterm/src/browser/Linkifier.ts356
-rw-r--r--node_modules/xterm/src/browser/Linkifier2.ts392
-rw-r--r--node_modules/xterm/src/browser/LocalizableStrings.ts10
-rw-r--r--node_modules/xterm/src/browser/MouseZoneManager.ts236
-rw-r--r--node_modules/xterm/src/browser/RenderDebouncer.ts63
-rw-r--r--node_modules/xterm/src/browser/ScreenDprMonitor.ts69
-rw-r--r--node_modules/xterm/src/browser/Terminal.ts1408
-rw-r--r--node_modules/xterm/src/browser/TimeBasedDebouncer.ts86
-rw-r--r--node_modules/xterm/src/browser/Types.d.ts316
-rw-r--r--node_modules/xterm/src/browser/Viewport.ts294
-rw-r--r--node_modules/xterm/src/browser/input/CompositionHelper.ts237
-rw-r--r--node_modules/xterm/src/browser/input/Mouse.ts58
-rw-r--r--node_modules/xterm/src/browser/input/MoveToCell.ts249
-rw-r--r--node_modules/xterm/src/browser/public/Terminal.ts297
-rw-r--r--node_modules/xterm/src/browser/renderer/BaseRenderLayer.ts513
-rw-r--r--node_modules/xterm/src/browser/renderer/CursorRenderLayer.ts377
-rw-r--r--node_modules/xterm/src/browser/renderer/CustomGlyphs.ts563
-rw-r--r--node_modules/xterm/src/browser/renderer/GridCache.ts33
-rw-r--r--node_modules/xterm/src/browser/renderer/LinkRenderLayer.ts83
-rw-r--r--node_modules/xterm/src/browser/renderer/Renderer.ts216
-rw-r--r--node_modules/xterm/src/browser/renderer/RendererUtils.ts11
-rw-r--r--node_modules/xterm/src/browser/renderer/SelectionRenderLayer.ts128
-rw-r--r--node_modules/xterm/src/browser/renderer/TextRenderLayer.ts330
-rw-r--r--node_modules/xterm/src/browser/renderer/Types.d.ts109
-rw-r--r--node_modules/xterm/src/browser/renderer/atlas/BaseCharAtlas.ts58
-rw-r--r--node_modules/xterm/src/browser/renderer/atlas/CharAtlasCache.ts95
-rw-r--r--node_modules/xterm/src/browser/renderer/atlas/CharAtlasUtils.ts54
-rw-r--r--node_modules/xterm/src/browser/renderer/atlas/Constants.ts15
-rw-r--r--node_modules/xterm/src/browser/renderer/atlas/DynamicCharAtlas.ts404
-rw-r--r--node_modules/xterm/src/browser/renderer/atlas/LRUMap.ts136
-rw-r--r--node_modules/xterm/src/browser/renderer/atlas/Types.d.ts29
-rw-r--r--node_modules/xterm/src/browser/renderer/dom/DomRenderer.ts400
-rw-r--r--node_modules/xterm/src/browser/renderer/dom/DomRendererRowFactory.ts259
-rw-r--r--node_modules/xterm/src/browser/selection/SelectionModel.ts139
-rw-r--r--node_modules/xterm/src/browser/selection/Types.d.ts15
-rw-r--r--node_modules/xterm/src/browser/services/CharSizeService.ts87
-rw-r--r--node_modules/xterm/src/browser/services/CharacterJoinerService.ts339
-rw-r--r--node_modules/xterm/src/browser/services/CoreBrowserService.ts20
-rw-r--r--node_modules/xterm/src/browser/services/MouseService.ts35
-rw-r--r--node_modules/xterm/src/browser/services/RenderService.ts223
-rw-r--r--node_modules/xterm/src/browser/services/SelectionService.ts1009
-rw-r--r--node_modules/xterm/src/browser/services/Services.ts125
-rw-r--r--node_modules/xterm/src/browser/services/SoundService.ts63
-rw-r--r--node_modules/xterm/src/common/CircularList.ts239
-rw-r--r--node_modules/xterm/src/common/Clone.ts23
-rw-r--r--node_modules/xterm/src/common/CoreTerminal.ts297
-rw-r--r--node_modules/xterm/src/common/EventEmitter.ts69
-rw-r--r--node_modules/xterm/src/common/InputHandler.ts3230
-rw-r--r--node_modules/xterm/src/common/Lifecycle.ts68
-rw-r--r--node_modules/xterm/src/common/Platform.ts31
-rw-r--r--node_modules/xterm/src/common/TypedArrayUtils.ts50
-rw-r--r--node_modules/xterm/src/common/Types.d.ts483
-rw-r--r--node_modules/xterm/src/common/WindowsMode.ts27
-rw-r--r--node_modules/xterm/src/common/buffer/AttributeData.ts148
-rw-r--r--node_modules/xterm/src/common/buffer/Buffer.ts702
-rw-r--r--node_modules/xterm/src/common/buffer/BufferLine.ts441
-rw-r--r--node_modules/xterm/src/common/buffer/BufferRange.ts13
-rw-r--r--node_modules/xterm/src/common/buffer/BufferReflow.ts220
-rw-r--r--node_modules/xterm/src/common/buffer/BufferSet.ts131
-rw-r--r--node_modules/xterm/src/common/buffer/CellData.ts94
-rw-r--r--node_modules/xterm/src/common/buffer/Constants.ts139
-rw-r--r--node_modules/xterm/src/common/buffer/Marker.ts37
-rw-r--r--node_modules/xterm/src/common/buffer/Types.d.ts63
-rw-r--r--node_modules/xterm/src/common/data/Charsets.ts256
-rw-r--r--node_modules/xterm/src/common/data/EscapeSequences.ts150
-rw-r--r--node_modules/xterm/src/common/input/Keyboard.ts375
-rw-r--r--node_modules/xterm/src/common/input/TextDecoder.ts346
-rw-r--r--node_modules/xterm/src/common/input/UnicodeV6.ts133
-rw-r--r--node_modules/xterm/src/common/input/WriteBuffer.ts224
-rw-r--r--node_modules/xterm/src/common/input/XParseColor.ts80
-rw-r--r--node_modules/xterm/src/common/parser/Constants.ts58
-rw-r--r--node_modules/xterm/src/common/parser/DcsParser.ts192
-rw-r--r--node_modules/xterm/src/common/parser/EscapeSequenceParser.ts796
-rw-r--r--node_modules/xterm/src/common/parser/OscParser.ts238
-rw-r--r--node_modules/xterm/src/common/parser/Params.ts229
-rw-r--r--node_modules/xterm/src/common/parser/Types.d.ts274
-rw-r--r--node_modules/xterm/src/common/public/AddonManager.ts56
-rw-r--r--node_modules/xterm/src/common/public/BufferApiView.ts35
-rw-r--r--node_modules/xterm/src/common/public/BufferLineApiView.ts29
-rw-r--r--node_modules/xterm/src/common/public/BufferNamespaceApi.ts33
-rw-r--r--node_modules/xterm/src/common/public/ParserApi.ts37
-rw-r--r--node_modules/xterm/src/common/public/UnicodeApi.ts27
-rw-r--r--node_modules/xterm/src/common/services/BufferService.ts185
-rw-r--r--node_modules/xterm/src/common/services/CharsetService.ts34
-rw-r--r--node_modules/xterm/src/common/services/CoreMouseService.ts309
-rw-r--r--node_modules/xterm/src/common/services/CoreService.ts92
-rw-r--r--node_modules/xterm/src/common/services/DirtyRowService.ts53
-rw-r--r--node_modules/xterm/src/common/services/InstantiationService.ts83
-rw-r--r--node_modules/xterm/src/common/services/LogService.ts88
-rw-r--r--node_modules/xterm/src/common/services/OptionsService.ts177
-rw-r--r--node_modules/xterm/src/common/services/ServiceRegistry.ts49
-rw-r--r--node_modules/xterm/src/common/services/Services.ts300
-rw-r--r--node_modules/xterm/src/common/services/UnicodeService.ts82
-rw-r--r--node_modules/xterm/src/headless/Terminal.ts170
-rw-r--r--node_modules/xterm/src/headless/Types.d.ts31
-rw-r--r--node_modules/xterm/src/headless/public/Terminal.ts216
-rw-r--r--node_modules/xterm/typings/xterm.d.ts1811
215 files changed, 0 insertions, 128339 deletions
diff --git a/node_modules/.bin/loose-envify b/node_modules/.bin/loose-envify
deleted file mode 120000
index ed9009c..0000000
--- a/node_modules/.bin/loose-envify
+++ /dev/null
@@ -1 +0,0 @@
-../loose-envify/cli.js \ No newline at end of file
diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json
deleted file mode 100644
index 76d4e29..0000000
--- a/node_modules/.package-lock.json
+++ /dev/null
@@ -1,16123 +0,0 @@
-{
- "name": "temp-term",
- "version": "0.1.0",
- "lockfileVersion": 2,
- "requires": true,
- "packages": {
- "node_modules/@ampproject/remapping": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz",
- "integrity": "sha512-hoyByceqwKirw7w3Z7gnIIZC3Wx3J484Y3L/cMpXFbr7d9ZQj2mODrirNzcJa+SM3UlpWXYvKV4RlRpFXlWgXg==",
- "dependencies": {
- "@jridgewell/trace-mapping": "^0.3.0"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@babel/code-frame": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.7.tgz",
- "integrity": "sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==",
- "dependencies": {
- "@babel/highlight": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/compat-data": {
- "version": "7.17.7",
- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.17.7.tgz",
- "integrity": "sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/core": {
- "version": "7.17.8",
- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.17.8.tgz",
- "integrity": "sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==",
- "dependencies": {
- "@ampproject/remapping": "^2.1.0",
- "@babel/code-frame": "^7.16.7",
- "@babel/generator": "^7.17.7",
- "@babel/helper-compilation-targets": "^7.17.7",
- "@babel/helper-module-transforms": "^7.17.7",
- "@babel/helpers": "^7.17.8",
- "@babel/parser": "^7.17.8",
- "@babel/template": "^7.16.7",
- "@babel/traverse": "^7.17.3",
- "@babel/types": "^7.17.0",
- "convert-source-map": "^1.7.0",
- "debug": "^4.1.0",
- "gensync": "^1.0.0-beta.2",
- "json5": "^2.1.2",
- "semver": "^6.3.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/babel"
- }
- },
- "node_modules/@babel/core/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/@babel/eslint-parser": {
- "version": "7.17.0",
- "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.17.0.tgz",
- "integrity": "sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==",
- "dependencies": {
- "eslint-scope": "^5.1.1",
- "eslint-visitor-keys": "^2.1.0",
- "semver": "^6.3.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || >=14.0.0"
- },
- "peerDependencies": {
- "@babel/core": ">=7.11.0",
- "eslint": "^7.5.0 || ^8.0.0"
- }
- },
- "node_modules/@babel/eslint-parser/node_modules/eslint-scope": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
- "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^4.1.1"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
- "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/@babel/eslint-parser/node_modules/estraverse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
- "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/@babel/eslint-parser/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/@babel/generator": {
- "version": "7.17.7",
- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.17.7.tgz",
- "integrity": "sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w==",
- "dependencies": {
- "@babel/types": "^7.17.0",
- "jsesc": "^2.5.1",
- "source-map": "^0.5.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-annotate-as-pure": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz",
- "integrity": "sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw==",
- "dependencies": {
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz",
- "integrity": "sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA==",
- "dependencies": {
- "@babel/helper-explode-assignable-expression": "^7.16.7",
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-compilation-targets": {
- "version": "7.17.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.17.7.tgz",
- "integrity": "sha512-UFzlz2jjd8kroj0hmCFV5zr+tQPi1dpC2cRsDV/3IEW8bJfCPrPpmcSN6ZS8RqIq4LXcmpipCQFPddyFA5Yc7w==",
- "dependencies": {
- "@babel/compat-data": "^7.17.7",
- "@babel/helper-validator-option": "^7.16.7",
- "browserslist": "^4.17.5",
- "semver": "^6.3.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/@babel/helper-create-class-features-plugin": {
- "version": "7.17.6",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.17.6.tgz",
- "integrity": "sha512-SogLLSxXm2OkBbSsHZMM4tUi8fUzjs63AT/d0YQIzr6GSd8Hxsbk2KYDX0k0DweAzGMj/YWeiCsorIdtdcW8Eg==",
- "dependencies": {
- "@babel/helper-annotate-as-pure": "^7.16.7",
- "@babel/helper-environment-visitor": "^7.16.7",
- "@babel/helper-function-name": "^7.16.7",
- "@babel/helper-member-expression-to-functions": "^7.16.7",
- "@babel/helper-optimise-call-expression": "^7.16.7",
- "@babel/helper-replace-supers": "^7.16.7",
- "@babel/helper-split-export-declaration": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/@babel/helper-create-regexp-features-plugin": {
- "version": "7.17.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.17.0.tgz",
- "integrity": "sha512-awO2So99wG6KnlE+TPs6rn83gCz5WlEePJDTnLEqbchMVrBeAujURVphRdigsk094VhvZehFoNOihSlcBjwsXA==",
- "dependencies": {
- "@babel/helper-annotate-as-pure": "^7.16.7",
- "regexpu-core": "^5.0.1"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/@babel/helper-define-polyfill-provider": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz",
- "integrity": "sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA==",
- "dependencies": {
- "@babel/helper-compilation-targets": "^7.13.0",
- "@babel/helper-module-imports": "^7.12.13",
- "@babel/helper-plugin-utils": "^7.13.0",
- "@babel/traverse": "^7.13.0",
- "debug": "^4.1.1",
- "lodash.debounce": "^4.0.8",
- "resolve": "^1.14.2",
- "semver": "^6.1.2"
- },
- "peerDependencies": {
- "@babel/core": "^7.4.0-0"
- }
- },
- "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/@babel/helper-environment-visitor": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz",
- "integrity": "sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag==",
- "dependencies": {
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-explode-assignable-expression": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz",
- "integrity": "sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ==",
- "dependencies": {
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-function-name": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz",
- "integrity": "sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA==",
- "dependencies": {
- "@babel/helper-get-function-arity": "^7.16.7",
- "@babel/template": "^7.16.7",
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-get-function-arity": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz",
- "integrity": "sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw==",
- "dependencies": {
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-hoist-variables": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz",
- "integrity": "sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg==",
- "dependencies": {
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-member-expression-to-functions": {
- "version": "7.17.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.17.7.tgz",
- "integrity": "sha512-thxXgnQ8qQ11W2wVUObIqDL4p148VMxkt5T/qpN5k2fboRyzFGFmKsTGViquyM5QHKUy48OZoca8kw4ajaDPyw==",
- "dependencies": {
- "@babel/types": "^7.17.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-module-imports": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz",
- "integrity": "sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg==",
- "dependencies": {
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-module-transforms": {
- "version": "7.17.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz",
- "integrity": "sha512-VmZD99F3gNTYB7fJRDTi+u6l/zxY0BE6OIxPSU7a50s6ZUQkHwSDmV92FfM+oCG0pZRVojGYhkR8I0OGeCVREw==",
- "dependencies": {
- "@babel/helper-environment-visitor": "^7.16.7",
- "@babel/helper-module-imports": "^7.16.7",
- "@babel/helper-simple-access": "^7.17.7",
- "@babel/helper-split-export-declaration": "^7.16.7",
- "@babel/helper-validator-identifier": "^7.16.7",
- "@babel/template": "^7.16.7",
- "@babel/traverse": "^7.17.3",
- "@babel/types": "^7.17.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-optimise-call-expression": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz",
- "integrity": "sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w==",
- "dependencies": {
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-plugin-utils": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz",
- "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-remap-async-to-generator": {
- "version": "7.16.8",
- "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz",
- "integrity": "sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw==",
- "dependencies": {
- "@babel/helper-annotate-as-pure": "^7.16.7",
- "@babel/helper-wrap-function": "^7.16.8",
- "@babel/types": "^7.16.8"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-replace-supers": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz",
- "integrity": "sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw==",
- "dependencies": {
- "@babel/helper-environment-visitor": "^7.16.7",
- "@babel/helper-member-expression-to-functions": "^7.16.7",
- "@babel/helper-optimise-call-expression": "^7.16.7",
- "@babel/traverse": "^7.16.7",
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-simple-access": {
- "version": "7.17.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.17.7.tgz",
- "integrity": "sha512-txyMCGroZ96i+Pxr3Je3lzEJjqwaRC9buMUgtomcrLe5Nd0+fk1h0LLA+ixUF5OW7AhHuQ7Es1WcQJZmZsz2XA==",
- "dependencies": {
- "@babel/types": "^7.17.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-skip-transparent-expression-wrappers": {
- "version": "7.16.0",
- "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz",
- "integrity": "sha512-+il1gTy0oHwUsBQZyJvukbB4vPMdcYBrFHa0Uc4AizLxbq6BOYC51Rv4tWocX9BLBDLZ4kc6qUFpQ6HRgL+3zw==",
- "dependencies": {
- "@babel/types": "^7.16.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-split-export-declaration": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz",
- "integrity": "sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw==",
- "dependencies": {
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-validator-identifier": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz",
- "integrity": "sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-validator-option": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz",
- "integrity": "sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ==",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helper-wrap-function": {
- "version": "7.16.8",
- "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz",
- "integrity": "sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw==",
- "dependencies": {
- "@babel/helper-function-name": "^7.16.7",
- "@babel/template": "^7.16.7",
- "@babel/traverse": "^7.16.8",
- "@babel/types": "^7.16.8"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/helpers": {
- "version": "7.17.8",
- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.17.8.tgz",
- "integrity": "sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==",
- "dependencies": {
- "@babel/template": "^7.16.7",
- "@babel/traverse": "^7.17.3",
- "@babel/types": "^7.17.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/highlight": {
- "version": "7.16.10",
- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.10.tgz",
- "integrity": "sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw==",
- "dependencies": {
- "@babel/helper-validator-identifier": "^7.16.7",
- "chalk": "^2.0.0",
- "js-tokens": "^4.0.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/parser": {
- "version": "7.17.8",
- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.17.8.tgz",
- "integrity": "sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==",
- "bin": {
- "parser": "bin/babel-parser.js"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz",
- "integrity": "sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz",
- "integrity": "sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0",
- "@babel/plugin-proposal-optional-chaining": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.13.0"
- }
- },
- "node_modules/@babel/plugin-proposal-async-generator-functions": {
- "version": "7.16.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz",
- "integrity": "sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-remap-async-to-generator": "^7.16.8",
- "@babel/plugin-syntax-async-generators": "^7.8.4"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-class-properties": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz",
- "integrity": "sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww==",
- "dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-class-static-block": {
- "version": "7.17.6",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.17.6.tgz",
- "integrity": "sha512-X/tididvL2zbs7jZCeeRJ8167U/+Ac135AM6jCAx6gYXDUviZV5Ku9UDvWS2NCuWlFjIRXklYhwo6HhAC7ETnA==",
- "dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.17.6",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-class-static-block": "^7.14.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.12.0"
- }
- },
- "node_modules/@babel/plugin-proposal-decorators": {
- "version": "7.17.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-decorators/-/plugin-proposal-decorators-7.17.8.tgz",
- "integrity": "sha512-U69odN4Umyyx1xO1rTII0IDkAEC+RNlcKXtqOblfpzqy1C+aOplb76BQNq0+XdpVkOaPlpEDwd++joY8FNFJKA==",
- "dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.17.6",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-replace-supers": "^7.16.7",
- "@babel/plugin-syntax-decorators": "^7.17.0",
- "charcodes": "^0.2.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-dynamic-import": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz",
- "integrity": "sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-dynamic-import": "^7.8.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-export-namespace-from": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz",
- "integrity": "sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-export-namespace-from": "^7.8.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-json-strings": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz",
- "integrity": "sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-json-strings": "^7.8.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-logical-assignment-operators": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz",
- "integrity": "sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz",
- "integrity": "sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-numeric-separator": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz",
- "integrity": "sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-numeric-separator": "^7.10.4"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-object-rest-spread": {
- "version": "7.17.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.17.3.tgz",
- "integrity": "sha512-yuL5iQA/TbZn+RGAfxQXfi7CNLmKi1f8zInn4IgobuCWcAb7i+zj4TYzQ9l8cEzVyJ89PDGuqxK1xZpUDISesw==",
- "dependencies": {
- "@babel/compat-data": "^7.17.0",
- "@babel/helper-compilation-targets": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
- "@babel/plugin-transform-parameters": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-optional-catch-binding": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz",
- "integrity": "sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-optional-catch-binding": "^7.8.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-optional-chaining": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz",
- "integrity": "sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0",
- "@babel/plugin-syntax-optional-chaining": "^7.8.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-private-methods": {
- "version": "7.16.11",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.11.tgz",
- "integrity": "sha512-F/2uAkPlXDr8+BHpZvo19w3hLFKge+k75XUprE6jaqKxjGkSYcK+4c+bup5PdW/7W/Rpjwql7FTVEDW+fRAQsw==",
- "dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.16.10",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-private-property-in-object": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz",
- "integrity": "sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ==",
- "dependencies": {
- "@babel/helper-annotate-as-pure": "^7.16.7",
- "@babel/helper-create-class-features-plugin": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-private-property-in-object": "^7.14.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-proposal-unicode-property-regex": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz",
- "integrity": "sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg==",
- "dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=4"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-async-generators": {
- "version": "7.8.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz",
- "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-bigint": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz",
- "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-class-properties": {
- "version": "7.12.13",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz",
- "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.12.13"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-class-static-block": {
- "version": "7.14.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz",
- "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.14.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-decorators": {
- "version": "7.17.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-decorators/-/plugin-syntax-decorators-7.17.0.tgz",
- "integrity": "sha512-qWe85yCXsvDEluNP0OyeQjH63DlhAR3W7K9BxxU1MvbDb48tgBG+Ao6IJJ6smPDrrVzSQZrbF6donpkFBMcs3A==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-dynamic-import": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz",
- "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-export-namespace-from": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz",
- "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.3"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-flow": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.16.7.tgz",
- "integrity": "sha512-UDo3YGQO0jH6ytzVwgSLv9i/CzMcUjbKenL67dTrAZPPv6GFAtDhe6jqnvmoKzC/7htNTohhos+onPtDMqJwaQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-import-meta": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz",
- "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.4"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-json-strings": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz",
- "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-jsx": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.16.7.tgz",
- "integrity": "sha512-Esxmk7YjA8QysKeT3VhTXvF6y77f/a91SIs4pWb4H2eWGQkCKFgQaG6hdoEVZtGsrAcb2K5BW66XsOErD4WU3Q==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-logical-assignment-operators": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz",
- "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.4"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz",
- "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-numeric-separator": {
- "version": "7.10.4",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz",
- "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.10.4"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-object-rest-spread": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz",
- "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-optional-catch-binding": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz",
- "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-optional-chaining": {
- "version": "7.8.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz",
- "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.8.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-private-property-in-object": {
- "version": "7.14.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz",
- "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.14.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-top-level-await": {
- "version": "7.14.5",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz",
- "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.14.5"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-syntax-typescript": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.7.tgz",
- "integrity": "sha512-YhUIJHHGkqPgEcMYkPCKTyGUdoGKWtopIycQyjJH8OjvRgOYsXsaKehLVPScKJWAULPxMa4N1vCe6szREFlZ7A==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-arrow-functions": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz",
- "integrity": "sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-async-to-generator": {
- "version": "7.16.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz",
- "integrity": "sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg==",
- "dependencies": {
- "@babel/helper-module-imports": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-remap-async-to-generator": "^7.16.8"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-block-scoped-functions": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz",
- "integrity": "sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-block-scoping": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz",
- "integrity": "sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-classes": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz",
- "integrity": "sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ==",
- "dependencies": {
- "@babel/helper-annotate-as-pure": "^7.16.7",
- "@babel/helper-environment-visitor": "^7.16.7",
- "@babel/helper-function-name": "^7.16.7",
- "@babel/helper-optimise-call-expression": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-replace-supers": "^7.16.7",
- "@babel/helper-split-export-declaration": "^7.16.7",
- "globals": "^11.1.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-computed-properties": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz",
- "integrity": "sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-destructuring": {
- "version": "7.17.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.17.7.tgz",
- "integrity": "sha512-XVh0r5yq9sLR4vZ6eVZe8FKfIcSgaTBxVBRSYokRj2qksf6QerYnTxz9/GTuKTH/n/HwLP7t6gtlybHetJ/6hQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-dotall-regex": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz",
- "integrity": "sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ==",
- "dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-duplicate-keys": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz",
- "integrity": "sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-exponentiation-operator": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz",
- "integrity": "sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA==",
- "dependencies": {
- "@babel/helper-builder-binary-assignment-operator-visitor": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-flow-strip-types": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.16.7.tgz",
- "integrity": "sha512-mzmCq3cNsDpZZu9FADYYyfZJIOrSONmHcop2XEKPdBNMa4PDC4eEvcOvzZaCNcjKu72v0XQlA5y1g58aLRXdYg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-flow": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-for-of": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz",
- "integrity": "sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-function-name": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz",
- "integrity": "sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA==",
- "dependencies": {
- "@babel/helper-compilation-targets": "^7.16.7",
- "@babel/helper-function-name": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-literals": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz",
- "integrity": "sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-member-expression-literals": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz",
- "integrity": "sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-modules-amd": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz",
- "integrity": "sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g==",
- "dependencies": {
- "@babel/helper-module-transforms": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "babel-plugin-dynamic-import-node": "^2.3.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-modules-commonjs": {
- "version": "7.17.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.17.7.tgz",
- "integrity": "sha512-ITPmR2V7MqioMJyrxUo2onHNC3e+MvfFiFIR0RP21d3PtlVb6sfzoxNKiphSZUOM9hEIdzCcZe83ieX3yoqjUA==",
- "dependencies": {
- "@babel/helper-module-transforms": "^7.17.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-simple-access": "^7.17.7",
- "babel-plugin-dynamic-import-node": "^2.3.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-modules-systemjs": {
- "version": "7.17.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.17.8.tgz",
- "integrity": "sha512-39reIkMTUVagzgA5x88zDYXPCMT6lcaRKs1+S9K6NKBPErbgO/w/kP8GlNQTC87b412ZTlmNgr3k2JrWgHH+Bw==",
- "dependencies": {
- "@babel/helper-hoist-variables": "^7.16.7",
- "@babel/helper-module-transforms": "^7.17.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-validator-identifier": "^7.16.7",
- "babel-plugin-dynamic-import-node": "^2.3.3"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-modules-umd": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz",
- "integrity": "sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ==",
- "dependencies": {
- "@babel/helper-module-transforms": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
- "version": "7.16.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz",
- "integrity": "sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw==",
- "dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/@babel/plugin-transform-new-target": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz",
- "integrity": "sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-object-super": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz",
- "integrity": "sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-replace-supers": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-parameters": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz",
- "integrity": "sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-property-literals": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz",
- "integrity": "sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-react-constant-elements": {
- "version": "7.17.6",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.17.6.tgz",
- "integrity": "sha512-OBv9VkyyKtsHZiHLoSfCn+h6yU7YKX8nrs32xUmOa1SRSk+t03FosB6fBZ0Yz4BpD1WV7l73Nsad+2Tz7APpqw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-react-display-name": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.16.7.tgz",
- "integrity": "sha512-qgIg8BcZgd0G/Cz916D5+9kqX0c7nPZyXaP8R2tLNN5tkyIZdG5fEwBrxwplzSnjC1jvQmyMNVwUCZPcbGY7Pg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-react-jsx": {
- "version": "7.17.3",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.17.3.tgz",
- "integrity": "sha512-9tjBm4O07f7mzKSIlEmPdiE6ub7kfIe6Cd+w+oQebpATfTQMAgW+YOuWxogbKVTulA+MEO7byMeIUtQ1z+z+ZQ==",
- "dependencies": {
- "@babel/helper-annotate-as-pure": "^7.16.7",
- "@babel/helper-module-imports": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-jsx": "^7.16.7",
- "@babel/types": "^7.17.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-react-jsx-development": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.16.7.tgz",
- "integrity": "sha512-RMvQWvpla+xy6MlBpPlrKZCMRs2AGiHOGHY3xRwl0pEeim348dDyxeH4xBsMPbIMhujeq7ihE702eM2Ew0Wo+A==",
- "dependencies": {
- "@babel/plugin-transform-react-jsx": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-react-pure-annotations": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.16.7.tgz",
- "integrity": "sha512-hs71ToC97k3QWxswh2ElzMFABXHvGiJ01IB1TbYQDGeWRKWz/MPUTh5jGExdHvosYKpnJW5Pm3S4+TA3FyX+GA==",
- "dependencies": {
- "@babel/helper-annotate-as-pure": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-regenerator": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz",
- "integrity": "sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q==",
- "dependencies": {
- "regenerator-transform": "^0.14.2"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-reserved-words": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz",
- "integrity": "sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-runtime": {
- "version": "7.17.0",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.17.0.tgz",
- "integrity": "sha512-fr7zPWnKXNc1xoHfrIU9mN/4XKX4VLZ45Q+oMhfsYIaHvg7mHgmhfOy/ckRWqDK7XF3QDigRpkh5DKq6+clE8A==",
- "dependencies": {
- "@babel/helper-module-imports": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "babel-plugin-polyfill-corejs2": "^0.3.0",
- "babel-plugin-polyfill-corejs3": "^0.5.0",
- "babel-plugin-polyfill-regenerator": "^0.3.0",
- "semver": "^6.3.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-runtime/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/@babel/plugin-transform-shorthand-properties": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz",
- "integrity": "sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-spread": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz",
- "integrity": "sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-skip-transparent-expression-wrappers": "^7.16.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-sticky-regex": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz",
- "integrity": "sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-template-literals": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz",
- "integrity": "sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-typeof-symbol": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz",
- "integrity": "sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-typescript": {
- "version": "7.16.8",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.8.tgz",
- "integrity": "sha512-bHdQ9k7YpBDO2d0NVfkj51DpQcvwIzIusJ7mEUaMlbZq3Kt/U47j24inXZHQ5MDiYpCs+oZiwnXyKedE8+q7AQ==",
- "dependencies": {
- "@babel/helper-create-class-features-plugin": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/plugin-syntax-typescript": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-unicode-escapes": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz",
- "integrity": "sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/plugin-transform-unicode-regex": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz",
- "integrity": "sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q==",
- "dependencies": {
- "@babel/helper-create-regexp-features-plugin": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/preset-env": {
- "version": "7.16.11",
- "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.16.11.tgz",
- "integrity": "sha512-qcmWG8R7ZW6WBRPZK//y+E3Cli151B20W1Rv7ln27vuPaXU/8TKms6jFdiJtF7UDTxcrb7mZd88tAeK9LjdT8g==",
- "dependencies": {
- "@babel/compat-data": "^7.16.8",
- "@babel/helper-compilation-targets": "^7.16.7",
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-validator-option": "^7.16.7",
- "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.16.7",
- "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.16.7",
- "@babel/plugin-proposal-async-generator-functions": "^7.16.8",
- "@babel/plugin-proposal-class-properties": "^7.16.7",
- "@babel/plugin-proposal-class-static-block": "^7.16.7",
- "@babel/plugin-proposal-dynamic-import": "^7.16.7",
- "@babel/plugin-proposal-export-namespace-from": "^7.16.7",
- "@babel/plugin-proposal-json-strings": "^7.16.7",
- "@babel/plugin-proposal-logical-assignment-operators": "^7.16.7",
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
- "@babel/plugin-proposal-numeric-separator": "^7.16.7",
- "@babel/plugin-proposal-object-rest-spread": "^7.16.7",
- "@babel/plugin-proposal-optional-catch-binding": "^7.16.7",
- "@babel/plugin-proposal-optional-chaining": "^7.16.7",
- "@babel/plugin-proposal-private-methods": "^7.16.11",
- "@babel/plugin-proposal-private-property-in-object": "^7.16.7",
- "@babel/plugin-proposal-unicode-property-regex": "^7.16.7",
- "@babel/plugin-syntax-async-generators": "^7.8.4",
- "@babel/plugin-syntax-class-properties": "^7.12.13",
- "@babel/plugin-syntax-class-static-block": "^7.14.5",
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
- "@babel/plugin-syntax-export-namespace-from": "^7.8.3",
- "@babel/plugin-syntax-json-strings": "^7.8.3",
- "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4",
- "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
- "@babel/plugin-syntax-numeric-separator": "^7.10.4",
- "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
- "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
- "@babel/plugin-syntax-optional-chaining": "^7.8.3",
- "@babel/plugin-syntax-private-property-in-object": "^7.14.5",
- "@babel/plugin-syntax-top-level-await": "^7.14.5",
- "@babel/plugin-transform-arrow-functions": "^7.16.7",
- "@babel/plugin-transform-async-to-generator": "^7.16.8",
- "@babel/plugin-transform-block-scoped-functions": "^7.16.7",
- "@babel/plugin-transform-block-scoping": "^7.16.7",
- "@babel/plugin-transform-classes": "^7.16.7",
- "@babel/plugin-transform-computed-properties": "^7.16.7",
- "@babel/plugin-transform-destructuring": "^7.16.7",
- "@babel/plugin-transform-dotall-regex": "^7.16.7",
- "@babel/plugin-transform-duplicate-keys": "^7.16.7",
- "@babel/plugin-transform-exponentiation-operator": "^7.16.7",
- "@babel/plugin-transform-for-of": "^7.16.7",
- "@babel/plugin-transform-function-name": "^7.16.7",
- "@babel/plugin-transform-literals": "^7.16.7",
- "@babel/plugin-transform-member-expression-literals": "^7.16.7",
- "@babel/plugin-transform-modules-amd": "^7.16.7",
- "@babel/plugin-transform-modules-commonjs": "^7.16.8",
- "@babel/plugin-transform-modules-systemjs": "^7.16.7",
- "@babel/plugin-transform-modules-umd": "^7.16.7",
- "@babel/plugin-transform-named-capturing-groups-regex": "^7.16.8",
- "@babel/plugin-transform-new-target": "^7.16.7",
- "@babel/plugin-transform-object-super": "^7.16.7",
- "@babel/plugin-transform-parameters": "^7.16.7",
- "@babel/plugin-transform-property-literals": "^7.16.7",
- "@babel/plugin-transform-regenerator": "^7.16.7",
- "@babel/plugin-transform-reserved-words": "^7.16.7",
- "@babel/plugin-transform-shorthand-properties": "^7.16.7",
- "@babel/plugin-transform-spread": "^7.16.7",
- "@babel/plugin-transform-sticky-regex": "^7.16.7",
- "@babel/plugin-transform-template-literals": "^7.16.7",
- "@babel/plugin-transform-typeof-symbol": "^7.16.7",
- "@babel/plugin-transform-unicode-escapes": "^7.16.7",
- "@babel/plugin-transform-unicode-regex": "^7.16.7",
- "@babel/preset-modules": "^0.1.5",
- "@babel/types": "^7.16.8",
- "babel-plugin-polyfill-corejs2": "^0.3.0",
- "babel-plugin-polyfill-corejs3": "^0.5.0",
- "babel-plugin-polyfill-regenerator": "^0.3.0",
- "core-js-compat": "^3.20.2",
- "semver": "^6.3.0"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/preset-env/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/@babel/preset-modules": {
- "version": "0.1.5",
- "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz",
- "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@babel/plugin-proposal-unicode-property-regex": "^7.4.4",
- "@babel/plugin-transform-dotall-regex": "^7.4.4",
- "@babel/types": "^7.4.4",
- "esutils": "^2.0.2"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/preset-react": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.16.7.tgz",
- "integrity": "sha512-fWpyI8UM/HE6DfPBzD8LnhQ/OcH8AgTaqcqP2nGOXEUV+VKBR5JRN9hCk9ai+zQQ57vtm9oWeXguBCPNUjytgA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-validator-option": "^7.16.7",
- "@babel/plugin-transform-react-display-name": "^7.16.7",
- "@babel/plugin-transform-react-jsx": "^7.16.7",
- "@babel/plugin-transform-react-jsx-development": "^7.16.7",
- "@babel/plugin-transform-react-pure-annotations": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/preset-typescript": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.16.7.tgz",
- "integrity": "sha512-WbVEmgXdIyvzB77AQjGBEyYPZx+8tTsO50XtfozQrkW8QB2rLJpH2lgx0TRw5EJrBxOZQ+wCcyPVQvS8tjEHpQ==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.16.7",
- "@babel/helper-validator-option": "^7.16.7",
- "@babel/plugin-transform-typescript": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/@babel/runtime": {
- "version": "7.17.8",
- "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.8.tgz",
- "integrity": "sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA==",
- "dependencies": {
- "regenerator-runtime": "^0.13.4"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/runtime-corejs3": {
- "version": "7.17.8",
- "resolved": "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.17.8.tgz",
- "integrity": "sha512-ZbYSUvoSF6dXZmMl/CYTMOvzIFnbGfv4W3SEHYgMvNsFTeLaF2gkGAF4K2ddmtSK4Emej+0aYcnSC6N5dPCXUQ==",
- "dependencies": {
- "core-js-pure": "^3.20.2",
- "regenerator-runtime": "^0.13.4"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/template": {
- "version": "7.16.7",
- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.16.7.tgz",
- "integrity": "sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w==",
- "dependencies": {
- "@babel/code-frame": "^7.16.7",
- "@babel/parser": "^7.16.7",
- "@babel/types": "^7.16.7"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/traverse": {
- "version": "7.17.3",
- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.17.3.tgz",
- "integrity": "sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw==",
- "dependencies": {
- "@babel/code-frame": "^7.16.7",
- "@babel/generator": "^7.17.3",
- "@babel/helper-environment-visitor": "^7.16.7",
- "@babel/helper-function-name": "^7.16.7",
- "@babel/helper-hoist-variables": "^7.16.7",
- "@babel/helper-split-export-declaration": "^7.16.7",
- "@babel/parser": "^7.17.3",
- "@babel/types": "^7.17.0",
- "debug": "^4.1.0",
- "globals": "^11.1.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@babel/types": {
- "version": "7.17.0",
- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.17.0.tgz",
- "integrity": "sha512-TmKSNO4D5rzhL5bjWFcVHHLETzfQ/AmbKpKPOSjlP0WoHZ6L911fgoOKY4Alp/emzG4cHJdyN49zpgkbXFEHHw==",
- "dependencies": {
- "@babel/helper-validator-identifier": "^7.16.7",
- "to-fast-properties": "^2.0.0"
- },
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/@bcoe/v8-coverage": {
- "version": "0.2.3",
- "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
- "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw=="
- },
- "node_modules/@csstools/normalize.css": {
- "version": "12.0.0",
- "resolved": "https://registry.npmjs.org/@csstools/normalize.css/-/normalize.css-12.0.0.tgz",
- "integrity": "sha512-M0qqxAcwCsIVfpFQSlGN5XjXWu8l5JDZN+fPt1LeW5SZexQTgnaEvgXAY+CeygRw0EeppWHi12JxESWiWrB0Sg=="
- },
- "node_modules/@csstools/postcss-color-function": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/@csstools/postcss-color-function/-/postcss-color-function-1.0.3.tgz",
- "integrity": "sha512-J26I69pT2B3MYiLY/uzCGKVJyMYVg9TCpXkWsRlt+Yfq+nELUEm72QXIMYXs4xA9cJA4Oqs2EylrfokKl3mJEQ==",
- "dependencies": {
- "@csstools/postcss-progressive-custom-properties": "^1.1.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/@csstools/postcss-font-format-keywords": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@csstools/postcss-font-format-keywords/-/postcss-font-format-keywords-1.0.0.tgz",
- "integrity": "sha512-oO0cZt8do8FdVBX8INftvIA4lUrKUSCcWUf9IwH9IPWOgKT22oAZFXeHLoDK7nhB2SmkNycp5brxfNMRLIhd6Q==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.3"
- }
- },
- "node_modules/@csstools/postcss-hwb-function": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@csstools/postcss-hwb-function/-/postcss-hwb-function-1.0.0.tgz",
- "integrity": "sha512-VSTd7hGjmde4rTj1rR30sokY3ONJph1reCBTUXqeW1fKwETPy1x4t/XIeaaqbMbC5Xg4SM/lyXZ2S8NELT2TaA==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.3"
- }
- },
- "node_modules/@csstools/postcss-ic-unit": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@csstools/postcss-ic-unit/-/postcss-ic-unit-1.0.0.tgz",
- "integrity": "sha512-i4yps1mBp2ijrx7E96RXrQXQQHm6F4ym1TOD0D69/sjDjZvQ22tqiEvaNw7pFZTUO5b9vWRHzbHzP9+UKuw+bA==",
- "dependencies": {
- "@csstools/postcss-progressive-custom-properties": "^1.1.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.3"
- }
- },
- "node_modules/@csstools/postcss-is-pseudo-class": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@csstools/postcss-is-pseudo-class/-/postcss-is-pseudo-class-2.0.1.tgz",
- "integrity": "sha512-Og5RrTzwFhrKoA79c3MLkfrIBYmwuf/X83s+JQtz/Dkk/MpsaKtqHV1OOzYkogQ+tj3oYp5Mq39XotBXNqVc3Q==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/@csstools/postcss-normalize-display-values": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/@csstools/postcss-normalize-display-values/-/postcss-normalize-display-values-1.0.0.tgz",
- "integrity": "sha512-bX+nx5V8XTJEmGtpWTO6kywdS725t71YSLlxWt78XoHUbELWgoCXeOFymRJmL3SU1TLlKSIi7v52EWqe60vJTQ==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.3"
- }
- },
- "node_modules/@csstools/postcss-oklab-function": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/@csstools/postcss-oklab-function/-/postcss-oklab-function-1.0.2.tgz",
- "integrity": "sha512-QwhWesEkMlp4narAwUi6pgc6kcooh8cC7zfxa9LSQNYXqzcdNUtNBzbGc5nuyAVreb7uf5Ox4qH1vYT3GA1wOg==",
- "dependencies": {
- "@csstools/postcss-progressive-custom-properties": "^1.1.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/@csstools/postcss-progressive-custom-properties": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/@csstools/postcss-progressive-custom-properties/-/postcss-progressive-custom-properties-1.3.0.tgz",
- "integrity": "sha512-ASA9W1aIy5ygskZYuWams4BzafD12ULvSypmaLJT2jvQ8G0M3I8PRQhC0h7mG0Z3LI05+agZjqSR9+K9yaQQjA==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.3"
- }
- },
- "node_modules/@eslint/eslintrc": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.1.tgz",
- "integrity": "sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==",
- "dependencies": {
- "ajv": "^6.12.4",
- "debug": "^4.3.2",
- "espree": "^9.3.1",
- "globals": "^13.9.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.2.1",
- "js-yaml": "^4.1.0",
- "minimatch": "^3.0.4",
- "strip-json-comments": "^3.1.1"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
- },
- "node_modules/@eslint/eslintrc/node_modules/globals": {
- "version": "13.13.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
- "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
- "dependencies": {
- "type-fest": "^0.20.2"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/@eslint/eslintrc/node_modules/type-fest": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@humanwhocodes/config-array": {
- "version": "0.9.5",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz",
- "integrity": "sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==",
- "dependencies": {
- "@humanwhocodes/object-schema": "^1.2.1",
- "debug": "^4.1.1",
- "minimatch": "^3.0.4"
- },
- "engines": {
- "node": ">=10.10.0"
- }
- },
- "node_modules/@humanwhocodes/object-schema": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz",
- "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA=="
- },
- "node_modules/@istanbuljs/load-nyc-config": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
- "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==",
- "dependencies": {
- "camelcase": "^5.3.1",
- "find-up": "^4.1.0",
- "get-package-type": "^0.1.0",
- "js-yaml": "^3.13.1",
- "resolve-from": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
- "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dependencies": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dependencies": {
- "p-locate": "^4.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
- "dependencies": {
- "p-try": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
- "dependencies": {
- "p-limit": "^2.2.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@istanbuljs/schema": {
- "version": "0.1.3",
- "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
- "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/console": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz",
- "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "jest-message-util": "^27.5.1",
- "jest-util": "^27.5.1",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/console/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/@jest/console/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/@jest/console/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/@jest/console/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/@jest/console/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/console/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/core": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz",
- "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==",
- "dependencies": {
- "@jest/console": "^27.5.1",
- "@jest/reporters": "^27.5.1",
- "@jest/test-result": "^27.5.1",
- "@jest/transform": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "ansi-escapes": "^4.2.1",
- "chalk": "^4.0.0",
- "emittery": "^0.8.1",
- "exit": "^0.1.2",
- "graceful-fs": "^4.2.9",
- "jest-changed-files": "^27.5.1",
- "jest-config": "^27.5.1",
- "jest-haste-map": "^27.5.1",
- "jest-message-util": "^27.5.1",
- "jest-regex-util": "^27.5.1",
- "jest-resolve": "^27.5.1",
- "jest-resolve-dependencies": "^27.5.1",
- "jest-runner": "^27.5.1",
- "jest-runtime": "^27.5.1",
- "jest-snapshot": "^27.5.1",
- "jest-util": "^27.5.1",
- "jest-validate": "^27.5.1",
- "jest-watcher": "^27.5.1",
- "micromatch": "^4.0.4",
- "rimraf": "^3.0.0",
- "slash": "^3.0.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- },
- "peerDependencies": {
- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
- },
- "peerDependenciesMeta": {
- "node-notifier": {
- "optional": true
- }
- }
- },
- "node_modules/@jest/core/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/@jest/core/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/@jest/core/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/@jest/core/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/@jest/core/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/core/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/environment": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.5.1.tgz",
- "integrity": "sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA==",
- "dependencies": {
- "@jest/fake-timers": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "jest-mock": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/fake-timers": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.5.1.tgz",
- "integrity": "sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "@sinonjs/fake-timers": "^8.0.1",
- "@types/node": "*",
- "jest-message-util": "^27.5.1",
- "jest-mock": "^27.5.1",
- "jest-util": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/globals": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.5.1.tgz",
- "integrity": "sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q==",
- "dependencies": {
- "@jest/environment": "^27.5.1",
- "@jest/types": "^27.5.1",
- "expect": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/reporters": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.5.1.tgz",
- "integrity": "sha512-cPXh9hWIlVJMQkVk84aIvXuBB4uQQmFqZiacloFuGiP3ah1sbCxCosidXFDfqG8+6fO1oR2dTJTlsOy4VFmUfw==",
- "dependencies": {
- "@bcoe/v8-coverage": "^0.2.3",
- "@jest/console": "^27.5.1",
- "@jest/test-result": "^27.5.1",
- "@jest/transform": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "collect-v8-coverage": "^1.0.0",
- "exit": "^0.1.2",
- "glob": "^7.1.2",
- "graceful-fs": "^4.2.9",
- "istanbul-lib-coverage": "^3.0.0",
- "istanbul-lib-instrument": "^5.1.0",
- "istanbul-lib-report": "^3.0.0",
- "istanbul-lib-source-maps": "^4.0.0",
- "istanbul-reports": "^3.1.3",
- "jest-haste-map": "^27.5.1",
- "jest-resolve": "^27.5.1",
- "jest-util": "^27.5.1",
- "jest-worker": "^27.5.1",
- "slash": "^3.0.0",
- "source-map": "^0.6.0",
- "string-length": "^4.0.1",
- "terminal-link": "^2.0.0",
- "v8-to-istanbul": "^8.1.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- },
- "peerDependencies": {
- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
- },
- "peerDependenciesMeta": {
- "node-notifier": {
- "optional": true
- }
- }
- },
- "node_modules/@jest/reporters/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/@jest/reporters/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/@jest/reporters/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/@jest/reporters/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/@jest/reporters/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/reporters/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/@jest/reporters/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/source-map": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.5.1.tgz",
- "integrity": "sha512-y9NIHUYF3PJRlHk98NdC/N1gl88BL08aQQgu4k4ZopQkCw9t9cV8mtl3TV8b/YCB8XaVTFrmUTAJvjsntDireg==",
- "dependencies": {
- "callsites": "^3.0.0",
- "graceful-fs": "^4.2.9",
- "source-map": "^0.6.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/source-map/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/@jest/test-result": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.5.1.tgz",
- "integrity": "sha512-EW35l2RYFUcUQxFJz5Cv5MTOxlJIQs4I7gxzi2zVU7PJhOwfYq1MdC5nhSmYjX1gmMmLPvB3sIaC+BkcHRBfag==",
- "dependencies": {
- "@jest/console": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/istanbul-lib-coverage": "^2.0.0",
- "collect-v8-coverage": "^1.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/test-sequencer": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.5.1.tgz",
- "integrity": "sha512-LCheJF7WB2+9JuCS7VB/EmGIdQuhtqjRNI9A43idHv3E4KltCTsPsLxvdaubFHSYwY/fNjMWjl6vNRhDiN7vpQ==",
- "dependencies": {
- "@jest/test-result": "^27.5.1",
- "graceful-fs": "^4.2.9",
- "jest-haste-map": "^27.5.1",
- "jest-runtime": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/transform": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.5.1.tgz",
- "integrity": "sha512-ipON6WtYgl/1329g5AIJVbUuEh0wZVbdpGwC99Jw4LwuoBNS95MVphU6zOeD9pDkon+LLbFL7lOQRapbB8SCHw==",
- "dependencies": {
- "@babel/core": "^7.1.0",
- "@jest/types": "^27.5.1",
- "babel-plugin-istanbul": "^6.1.1",
- "chalk": "^4.0.0",
- "convert-source-map": "^1.4.0",
- "fast-json-stable-stringify": "^2.0.0",
- "graceful-fs": "^4.2.9",
- "jest-haste-map": "^27.5.1",
- "jest-regex-util": "^27.5.1",
- "jest-util": "^27.5.1",
- "micromatch": "^4.0.4",
- "pirates": "^4.0.4",
- "slash": "^3.0.0",
- "source-map": "^0.6.1",
- "write-file-atomic": "^3.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/transform/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/@jest/transform/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/@jest/transform/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/@jest/transform/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/@jest/transform/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/transform/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/@jest/transform/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/types": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.5.1.tgz",
- "integrity": "sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw==",
- "dependencies": {
- "@types/istanbul-lib-coverage": "^2.0.0",
- "@types/istanbul-reports": "^3.0.0",
- "@types/node": "*",
- "@types/yargs": "^16.0.0",
- "chalk": "^4.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/@jest/types/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/@jest/types/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/@jest/types/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/@jest/types/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/@jest/types/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jest/types/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@jridgewell/resolve-uri": {
- "version": "3.0.5",
- "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz",
- "integrity": "sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==",
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/@jridgewell/sourcemap-codec": {
- "version": "1.4.11",
- "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz",
- "integrity": "sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg=="
- },
- "node_modules/@jridgewell/trace-mapping": {
- "version": "0.3.4",
- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz",
- "integrity": "sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ==",
- "dependencies": {
- "@jridgewell/resolve-uri": "^3.0.3",
- "@jridgewell/sourcemap-codec": "^1.4.10"
- }
- },
- "node_modules/@nodelib/fs.scandir": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
- "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
- "dependencies": {
- "@nodelib/fs.stat": "2.0.5",
- "run-parallel": "^1.1.9"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.stat": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
- "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@nodelib/fs.walk": {
- "version": "1.2.8",
- "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
- "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
- "dependencies": {
- "@nodelib/fs.scandir": "2.1.5",
- "fastq": "^1.6.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@pmmmwh/react-refresh-webpack-plugin": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.4.tgz",
- "integrity": "sha512-zZbZeHQDnoTlt2AF+diQT0wsSXpvWiaIOZwBRdltNFhG1+I3ozyaw7U/nBiUwyJ0D+zwdXp0E3bWOl38Ag2BMw==",
- "dependencies": {
- "ansi-html-community": "^0.0.8",
- "common-path-prefix": "^3.0.0",
- "core-js-pure": "^3.8.1",
- "error-stack-parser": "^2.0.6",
- "find-up": "^5.0.0",
- "html-entities": "^2.1.0",
- "loader-utils": "^2.0.0",
- "schema-utils": "^3.0.0",
- "source-map": "^0.7.3"
- },
- "engines": {
- "node": ">= 10.13"
- },
- "peerDependencies": {
- "@types/webpack": "4.x || 5.x",
- "react-refresh": ">=0.10.0 <1.0.0",
- "sockjs-client": "^1.4.0",
- "type-fest": ">=0.17.0 <3.0.0",
- "webpack": ">=4.43.0 <6.0.0",
- "webpack-dev-server": "3.x || 4.x",
- "webpack-hot-middleware": "2.x",
- "webpack-plugin-serve": "0.x || 1.x"
- },
- "peerDependenciesMeta": {
- "@types/webpack": {
- "optional": true
- },
- "sockjs-client": {
- "optional": true
- },
- "type-fest": {
- "optional": true
- },
- "webpack-dev-server": {
- "optional": true
- },
- "webpack-hot-middleware": {
- "optional": true
- },
- "webpack-plugin-serve": {
- "optional": true
- }
- }
- },
- "node_modules/@pmmmwh/react-refresh-webpack-plugin/node_modules/source-map": {
- "version": "0.7.3",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
- "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/@rollup/plugin-babel": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz",
- "integrity": "sha512-WFfdLWU/xVWKeRQnKmIAQULUI7Il0gZnBIH/ZFO069wYIfPu+8zrfp/KMW0atmELoRDq8FbiP3VCss9MhCut7Q==",
- "dependencies": {
- "@babel/helper-module-imports": "^7.10.4",
- "@rollup/pluginutils": "^3.1.0"
- },
- "engines": {
- "node": ">= 10.0.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0",
- "@types/babel__core": "^7.1.9",
- "rollup": "^1.20.0||^2.0.0"
- },
- "peerDependenciesMeta": {
- "@types/babel__core": {
- "optional": true
- }
- }
- },
- "node_modules/@rollup/plugin-node-resolve": {
- "version": "11.2.1",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz",
- "integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==",
- "dependencies": {
- "@rollup/pluginutils": "^3.1.0",
- "@types/resolve": "1.17.1",
- "builtin-modules": "^3.1.0",
- "deepmerge": "^4.2.2",
- "is-module": "^1.0.0",
- "resolve": "^1.19.0"
- },
- "engines": {
- "node": ">= 10.0.0"
- },
- "peerDependencies": {
- "rollup": "^1.20.0||^2.0.0"
- }
- },
- "node_modules/@rollup/plugin-replace": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.4.2.tgz",
- "integrity": "sha512-IGcu+cydlUMZ5En85jxHH4qj2hta/11BHq95iHEyb2sbgiN0eCdzvUcHw5gt9pBL5lTi4JDYJ1acCoMGpTvEZg==",
- "dependencies": {
- "@rollup/pluginutils": "^3.1.0",
- "magic-string": "^0.25.7"
- },
- "peerDependencies": {
- "rollup": "^1.20.0 || ^2.0.0"
- }
- },
- "node_modules/@rollup/pluginutils": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz",
- "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==",
- "dependencies": {
- "@types/estree": "0.0.39",
- "estree-walker": "^1.0.1",
- "picomatch": "^2.2.2"
- },
- "engines": {
- "node": ">= 8.0.0"
- },
- "peerDependencies": {
- "rollup": "^1.20.0||^2.0.0"
- }
- },
- "node_modules/@rollup/pluginutils/node_modules/@types/estree": {
- "version": "0.0.39",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz",
- "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw=="
- },
- "node_modules/@rushstack/eslint-patch": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/@rushstack/eslint-patch/-/eslint-patch-1.1.1.tgz",
- "integrity": "sha512-BUyKJGdDWqvWC5GEhyOiUrGNi9iJUr4CU0O2WxJL6QJhHeeA/NVBalH+FeK0r/x/W0rPymXt5s78TDS7d6lCwg=="
- },
- "node_modules/@sinonjs/commons": {
- "version": "1.8.3",
- "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz",
- "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==",
- "dependencies": {
- "type-detect": "4.0.8"
- }
- },
- "node_modules/@sinonjs/fake-timers": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz",
- "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==",
- "dependencies": {
- "@sinonjs/commons": "^1.7.0"
- }
- },
- "node_modules/@surma/rollup-plugin-off-main-thread": {
- "version": "2.2.3",
- "resolved": "https://registry.npmjs.org/@surma/rollup-plugin-off-main-thread/-/rollup-plugin-off-main-thread-2.2.3.tgz",
- "integrity": "sha512-lR8q/9W7hZpMWweNiAKU7NQerBnzQQLvi8qnTDU/fxItPhtZVMbPV3lbCwjhIlNBe9Bbr5V+KHshvWmVSG9cxQ==",
- "dependencies": {
- "ejs": "^3.1.6",
- "json5": "^2.2.0",
- "magic-string": "^0.25.0",
- "string.prototype.matchall": "^4.0.6"
- }
- },
- "node_modules/@svgr/babel-plugin-add-jsx-attribute": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-5.4.0.tgz",
- "integrity": "sha512-ZFf2gs/8/6B8PnSofI0inYXr2SDNTDScPXhN7k5EqD4aZ3gi6u+rbmZHVB8IM3wDyx8ntKACZbtXSm7oZGRqVg==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/babel-plugin-remove-jsx-attribute": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-5.4.0.tgz",
- "integrity": "sha512-yaS4o2PgUtwLFGTKbsiAy6D0o3ugcUhWK0Z45umJ66EPWunAz9fuFw2gJuje6wqQvQWOTJvIahUwndOXb7QCPg==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/babel-plugin-remove-jsx-empty-expression": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-5.0.1.tgz",
- "integrity": "sha512-LA72+88A11ND/yFIMzyuLRSMJ+tRKeYKeQ+mR3DcAZ5I4h5CPWN9AHyUzJbWSYp/u2u0xhmgOe0+E41+GjEueA==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/babel-plugin-replace-jsx-attribute-value": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-5.0.1.tgz",
- "integrity": "sha512-PoiE6ZD2Eiy5mK+fjHqwGOS+IXX0wq/YDtNyIgOrc6ejFnxN4b13pRpiIPbtPwHEc+NT2KCjteAcq33/F1Y9KQ==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/babel-plugin-svg-dynamic-title": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-5.4.0.tgz",
- "integrity": "sha512-zSOZH8PdZOpuG1ZVx/cLVePB2ibo3WPpqo7gFIjLV9a0QsuQAzJiwwqmuEdTaW2pegyBE17Uu15mOgOcgabQZg==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/babel-plugin-svg-em-dimensions": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-5.4.0.tgz",
- "integrity": "sha512-cPzDbDA5oT/sPXDCUYoVXEmm3VIoAWAPT6mSPTJNbQaBNUuEKVKyGH93oDY4e42PYHRW67N5alJx/eEol20abw==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/babel-plugin-transform-react-native-svg": {
- "version": "5.4.0",
- "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-5.4.0.tgz",
- "integrity": "sha512-3eYP/SaopZ41GHwXma7Rmxcv9uRslRDTY1estspeB1w1ueZWd/tPlMfEOoccYpEMZU3jD4OU7YitnXcF5hLW2Q==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/babel-plugin-transform-svg-component": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-5.5.0.tgz",
- "integrity": "sha512-q4jSH1UUvbrsOtlo/tKcgSeiCHRSBdXoIoqX1pgcKK/aU3JD27wmMKwGtpB8qRYUYoyXvfGxUVKchLuR5pB3rQ==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/babel-preset": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/@svgr/babel-preset/-/babel-preset-5.5.0.tgz",
- "integrity": "sha512-4FiXBjvQ+z2j7yASeGPEi8VD/5rrGQk4Xrq3EdJmoZgz/tpqChpo5hgXDvmEauwtvOc52q8ghhZK4Oy7qph4ig==",
- "dependencies": {
- "@svgr/babel-plugin-add-jsx-attribute": "^5.4.0",
- "@svgr/babel-plugin-remove-jsx-attribute": "^5.4.0",
- "@svgr/babel-plugin-remove-jsx-empty-expression": "^5.0.1",
- "@svgr/babel-plugin-replace-jsx-attribute-value": "^5.0.1",
- "@svgr/babel-plugin-svg-dynamic-title": "^5.4.0",
- "@svgr/babel-plugin-svg-em-dimensions": "^5.4.0",
- "@svgr/babel-plugin-transform-react-native-svg": "^5.4.0",
- "@svgr/babel-plugin-transform-svg-component": "^5.5.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/core": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/@svgr/core/-/core-5.5.0.tgz",
- "integrity": "sha512-q52VOcsJPvV3jO1wkPtzTuKlvX7Y3xIcWRpCMtBF3MrteZJtBfQw/+u0B1BHy5ColpQc1/YVTrPEtSYIMNZlrQ==",
- "dependencies": {
- "@svgr/plugin-jsx": "^5.5.0",
- "camelcase": "^6.2.0",
- "cosmiconfig": "^7.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/hast-util-to-babel-ast": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-5.5.0.tgz",
- "integrity": "sha512-cAaR/CAiZRB8GP32N+1jocovUtvlj0+e65TB50/6Lcime+EA49m/8l+P2ko+XPJ4dw3xaPS3jOL4F2X4KWxoeQ==",
- "dependencies": {
- "@babel/types": "^7.12.6"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/plugin-jsx": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/@svgr/plugin-jsx/-/plugin-jsx-5.5.0.tgz",
- "integrity": "sha512-V/wVh33j12hGh05IDg8GpIUXbjAPnTdPTKuP4VNLggnwaHMPNQNae2pRnyTAILWCQdz5GyMqtO488g7CKM8CBA==",
- "dependencies": {
- "@babel/core": "^7.12.3",
- "@svgr/babel-preset": "^5.5.0",
- "@svgr/hast-util-to-babel-ast": "^5.5.0",
- "svg-parser": "^2.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/plugin-svgo": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/@svgr/plugin-svgo/-/plugin-svgo-5.5.0.tgz",
- "integrity": "sha512-r5swKk46GuQl4RrVejVwpeeJaydoxkdwkM1mBKOgJLBUJPGaLci6ylg/IjhrRsREKDkr4kbMWdgOtbXEh0fyLQ==",
- "dependencies": {
- "cosmiconfig": "^7.0.0",
- "deepmerge": "^4.2.2",
- "svgo": "^1.2.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@svgr/webpack": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/@svgr/webpack/-/webpack-5.5.0.tgz",
- "integrity": "sha512-DOBOK255wfQxguUta2INKkzPj6AIS6iafZYiYmHn6W3pHlycSRRlvWKCfLDG10fXfLWqE3DJHgRUOyJYmARa7g==",
- "dependencies": {
- "@babel/core": "^7.12.3",
- "@babel/plugin-transform-react-constant-elements": "^7.12.1",
- "@babel/preset-env": "^7.12.1",
- "@babel/preset-react": "^7.12.5",
- "@svgr/core": "^5.5.0",
- "@svgr/plugin-jsx": "^5.5.0",
- "@svgr/plugin-svgo": "^5.5.0",
- "loader-utils": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/gregberge"
- }
- },
- "node_modules/@testing-library/dom": {
- "version": "8.11.3",
- "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-8.11.3.tgz",
- "integrity": "sha512-9LId28I+lx70wUiZjLvi1DB/WT2zGOxUh46glrSNMaWVx849kKAluezVzZrXJfTKKoQTmEOutLes/bHg4Bj3aA==",
- "dependencies": {
- "@babel/code-frame": "^7.10.4",
- "@babel/runtime": "^7.12.5",
- "@types/aria-query": "^4.2.0",
- "aria-query": "^5.0.0",
- "chalk": "^4.1.0",
- "dom-accessibility-api": "^0.5.9",
- "lz-string": "^1.4.4",
- "pretty-format": "^27.0.2"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/@testing-library/dom/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/@testing-library/dom/node_modules/aria-query": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz",
- "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==",
- "engines": {
- "node": ">=6.0"
- }
- },
- "node_modules/@testing-library/dom/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/@testing-library/dom/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/@testing-library/dom/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/@testing-library/dom/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@testing-library/dom/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@testing-library/jest-dom": {
- "version": "5.16.2",
- "resolved": "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-5.16.2.tgz",
- "integrity": "sha512-6ewxs1MXWwsBFZXIk4nKKskWANelkdUehchEOokHsN8X7c2eKXGw+77aRV63UU8f/DTSVUPLaGxdrj4lN7D/ug==",
- "dependencies": {
- "@babel/runtime": "^7.9.2",
- "@types/testing-library__jest-dom": "^5.9.1",
- "aria-query": "^5.0.0",
- "chalk": "^3.0.0",
- "css": "^3.0.0",
- "css.escape": "^1.5.1",
- "dom-accessibility-api": "^0.5.6",
- "lodash": "^4.17.15",
- "redent": "^3.0.0"
- },
- "engines": {
- "node": ">=8",
- "npm": ">=6",
- "yarn": ">=1"
- }
- },
- "node_modules/@testing-library/jest-dom/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/@testing-library/jest-dom/node_modules/aria-query": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.0.0.tgz",
- "integrity": "sha512-V+SM7AbUwJ+EBnB8+DXs0hPZHO0W6pqBcc0dW90OwtVG02PswOu/teuARoLQjdDOH+t9pJgGnW5/Qmouf3gPJg==",
- "engines": {
- "node": ">=6.0"
- }
- },
- "node_modules/@testing-library/jest-dom/node_modules/chalk": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
- "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@testing-library/jest-dom/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/@testing-library/jest-dom/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/@testing-library/jest-dom/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@testing-library/jest-dom/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/@testing-library/react": {
- "version": "12.1.4",
- "resolved": "https://registry.npmjs.org/@testing-library/react/-/react-12.1.4.tgz",
- "integrity": "sha512-jiPKOm7vyUw311Hn/HlNQ9P8/lHNtArAx0PisXyFixDDvfl8DbD6EUdbshK5eqauvBSvzZd19itqQ9j3nferJA==",
- "dependencies": {
- "@babel/runtime": "^7.12.5",
- "@testing-library/dom": "^8.0.0",
- "@types/react-dom": "*"
- },
- "engines": {
- "node": ">=12"
- },
- "peerDependencies": {
- "react": "*",
- "react-dom": "*"
- }
- },
- "node_modules/@testing-library/user-event": {
- "version": "13.5.0",
- "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-13.5.0.tgz",
- "integrity": "sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==",
- "dependencies": {
- "@babel/runtime": "^7.12.5"
- },
- "engines": {
- "node": ">=10",
- "npm": ">=6"
- },
- "peerDependencies": {
- "@testing-library/dom": ">=7.21.4"
- }
- },
- "node_modules/@tootallnate/once": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
- "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/@trysound/sax": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz",
- "integrity": "sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==",
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/@types/aria-query": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/@types/aria-query/-/aria-query-4.2.2.tgz",
- "integrity": "sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig=="
- },
- "node_modules/@types/babel__core": {
- "version": "7.1.18",
- "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.18.tgz",
- "integrity": "sha512-S7unDjm/C7z2A2R9NzfKCK1I+BAALDtxEmsJBwlB3EzNfb929ykjL++1CK9LO++EIp2fQrC8O+BwjKvz6UeDyQ==",
- "dependencies": {
- "@babel/parser": "^7.1.0",
- "@babel/types": "^7.0.0",
- "@types/babel__generator": "*",
- "@types/babel__template": "*",
- "@types/babel__traverse": "*"
- }
- },
- "node_modules/@types/babel__generator": {
- "version": "7.6.4",
- "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.4.tgz",
- "integrity": "sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==",
- "dependencies": {
- "@babel/types": "^7.0.0"
- }
- },
- "node_modules/@types/babel__template": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz",
- "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==",
- "dependencies": {
- "@babel/parser": "^7.1.0",
- "@babel/types": "^7.0.0"
- }
- },
- "node_modules/@types/babel__traverse": {
- "version": "7.14.2",
- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz",
- "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==",
- "dependencies": {
- "@babel/types": "^7.3.0"
- }
- },
- "node_modules/@types/body-parser": {
- "version": "1.19.2",
- "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz",
- "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==",
- "dependencies": {
- "@types/connect": "*",
- "@types/node": "*"
- }
- },
- "node_modules/@types/bonjour": {
- "version": "3.5.10",
- "resolved": "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz",
- "integrity": "sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/connect": {
- "version": "3.4.35",
- "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz",
- "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/connect-history-api-fallback": {
- "version": "1.3.5",
- "resolved": "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz",
- "integrity": "sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw==",
- "dependencies": {
- "@types/express-serve-static-core": "*",
- "@types/node": "*"
- }
- },
- "node_modules/@types/eslint": {
- "version": "7.29.0",
- "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz",
- "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==",
- "dependencies": {
- "@types/estree": "*",
- "@types/json-schema": "*"
- }
- },
- "node_modules/@types/eslint-scope": {
- "version": "3.7.3",
- "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.3.tgz",
- "integrity": "sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==",
- "dependencies": {
- "@types/eslint": "*",
- "@types/estree": "*"
- }
- },
- "node_modules/@types/estree": {
- "version": "0.0.51",
- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz",
- "integrity": "sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ=="
- },
- "node_modules/@types/express": {
- "version": "4.17.13",
- "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz",
- "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==",
- "dependencies": {
- "@types/body-parser": "*",
- "@types/express-serve-static-core": "^4.17.18",
- "@types/qs": "*",
- "@types/serve-static": "*"
- }
- },
- "node_modules/@types/express-serve-static-core": {
- "version": "4.17.28",
- "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz",
- "integrity": "sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig==",
- "dependencies": {
- "@types/node": "*",
- "@types/qs": "*",
- "@types/range-parser": "*"
- }
- },
- "node_modules/@types/graceful-fs": {
- "version": "4.1.5",
- "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz",
- "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/html-minifier-terser": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz",
- "integrity": "sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg=="
- },
- "node_modules/@types/http-proxy": {
- "version": "1.17.8",
- "resolved": "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.8.tgz",
- "integrity": "sha512-5kPLG5BKpWYkw/LVOGWpiq3nEVqxiN32rTgI53Sk12/xHFQ2rG3ehI9IO+O3W2QoKeyB92dJkoka8SUm6BX1pA==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/istanbul-lib-coverage": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",
- "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g=="
- },
- "node_modules/@types/istanbul-lib-report": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
- "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==",
- "dependencies": {
- "@types/istanbul-lib-coverage": "*"
- }
- },
- "node_modules/@types/istanbul-reports": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz",
- "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==",
- "dependencies": {
- "@types/istanbul-lib-report": "*"
- }
- },
- "node_modules/@types/jest": {
- "version": "27.4.1",
- "resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz",
- "integrity": "sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==",
- "dependencies": {
- "jest-matcher-utils": "^27.0.0",
- "pretty-format": "^27.0.0"
- }
- },
- "node_modules/@types/json-schema": {
- "version": "7.0.10",
- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.10.tgz",
- "integrity": "sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A=="
- },
- "node_modules/@types/json5": {
- "version": "0.0.29",
- "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
- "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4="
- },
- "node_modules/@types/mime": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz",
- "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw=="
- },
- "node_modules/@types/node": {
- "version": "17.0.21",
- "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz",
- "integrity": "sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ=="
- },
- "node_modules/@types/parse-json": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz",
- "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="
- },
- "node_modules/@types/prettier": {
- "version": "2.4.4",
- "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.4.4.tgz",
- "integrity": "sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA=="
- },
- "node_modules/@types/prop-types": {
- "version": "15.7.4",
- "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz",
- "integrity": "sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ=="
- },
- "node_modules/@types/q": {
- "version": "1.5.5",
- "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.5.tgz",
- "integrity": "sha512-L28j2FcJfSZOnL1WBjDYp2vUHCeIFlyYI/53EwD/rKUBQ7MtUUfbQWiyKJGpcnv4/WgrhWsFKrcPstcAt/J0tQ=="
- },
- "node_modules/@types/qs": {
- "version": "6.9.7",
- "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
- "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw=="
- },
- "node_modules/@types/range-parser": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz",
- "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
- },
- "node_modules/@types/react": {
- "version": "17.0.41",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.41.tgz",
- "integrity": "sha512-chYZ9ogWUodyC7VUTRBfblysKLjnohhFY9bGLwvnUFFy48+vB9DikmB3lW0qTFmBcKSzmdglcvkHK71IioOlDA==",
- "dependencies": {
- "@types/prop-types": "*",
- "@types/scheduler": "*",
- "csstype": "^3.0.2"
- }
- },
- "node_modules/@types/react-dom": {
- "version": "17.0.14",
- "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-17.0.14.tgz",
- "integrity": "sha512-H03xwEP1oXmSfl3iobtmQ/2dHF5aBHr8aUMwyGZya6OW45G+xtdzmq6HkncefiBt5JU8DVyaWl/nWZbjZCnzAQ==",
- "dependencies": {
- "@types/react": "*"
- }
- },
- "node_modules/@types/resolve": {
- "version": "1.17.1",
- "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz",
- "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/retry": {
- "version": "0.12.1",
- "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz",
- "integrity": "sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g=="
- },
- "node_modules/@types/scheduler": {
- "version": "0.16.2",
- "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz",
- "integrity": "sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew=="
- },
- "node_modules/@types/serve-index": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz",
- "integrity": "sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg==",
- "dependencies": {
- "@types/express": "*"
- }
- },
- "node_modules/@types/serve-static": {
- "version": "1.13.10",
- "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz",
- "integrity": "sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ==",
- "dependencies": {
- "@types/mime": "^1",
- "@types/node": "*"
- }
- },
- "node_modules/@types/sockjs": {
- "version": "0.3.33",
- "resolved": "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz",
- "integrity": "sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/stack-utils": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",
- "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw=="
- },
- "node_modules/@types/testing-library__jest-dom": {
- "version": "5.14.3",
- "resolved": "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.14.3.tgz",
- "integrity": "sha512-oKZe+Mf4ioWlMuzVBaXQ9WDnEm1+umLx0InILg+yvZVBBDmzV5KfZyLrCvadtWcx8+916jLmHafcmqqffl+iIw==",
- "dependencies": {
- "@types/jest": "*"
- }
- },
- "node_modules/@types/trusted-types": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz",
- "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg=="
- },
- "node_modules/@types/ws": {
- "version": "8.5.3",
- "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz",
- "integrity": "sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==",
- "dependencies": {
- "@types/node": "*"
- }
- },
- "node_modules/@types/yargs": {
- "version": "16.0.4",
- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz",
- "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==",
- "dependencies": {
- "@types/yargs-parser": "*"
- }
- },
- "node_modules/@types/yargs-parser": {
- "version": "21.0.0",
- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz",
- "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA=="
- },
- "node_modules/@typescript-eslint/eslint-plugin": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.15.0.tgz",
- "integrity": "sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==",
- "dependencies": {
- "@typescript-eslint/scope-manager": "5.15.0",
- "@typescript-eslint/type-utils": "5.15.0",
- "@typescript-eslint/utils": "5.15.0",
- "debug": "^4.3.2",
- "functional-red-black-tree": "^1.0.1",
- "ignore": "^5.1.8",
- "regexpp": "^3.2.0",
- "semver": "^7.3.5",
- "tsutils": "^3.21.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "@typescript-eslint/parser": "^5.0.0",
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/@typescript-eslint/experimental-utils": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-5.15.0.tgz",
- "integrity": "sha512-AJOOaBrVqKYWaYDBtgMi9XVDB3YHXlffto/3A4VQ39VVaNqosSOp/nW09G4N/ej8WlzHQB2jTnSfP5wWsXSQJA==",
- "dependencies": {
- "@typescript-eslint/utils": "5.15.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
- }
- },
- "node_modules/@typescript-eslint/parser": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.15.0.tgz",
- "integrity": "sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ==",
- "dependencies": {
- "@typescript-eslint/scope-manager": "5.15.0",
- "@typescript-eslint/types": "5.15.0",
- "@typescript-eslint/typescript-estree": "5.15.0",
- "debug": "^4.3.2"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/@typescript-eslint/scope-manager": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.15.0.tgz",
- "integrity": "sha512-EFiZcSKrHh4kWk0pZaa+YNJosvKE50EnmN4IfgjkA3bTHElPtYcd2U37QQkNTqwMCS7LXeDeZzEqnsOH8chjSg==",
- "dependencies": {
- "@typescript-eslint/types": "5.15.0",
- "@typescript-eslint/visitor-keys": "5.15.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/@typescript-eslint/type-utils": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.15.0.tgz",
- "integrity": "sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==",
- "dependencies": {
- "@typescript-eslint/utils": "5.15.0",
- "debug": "^4.3.2",
- "tsutils": "^3.21.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "*"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/@typescript-eslint/types": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.15.0.tgz",
- "integrity": "sha512-yEiTN4MDy23vvsIksrShjNwQl2vl6kJeG9YkVJXjXZnkJElzVK8nfPsWKYxcsGWG8GhurYXP4/KGj3aZAxbeOA==",
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/@typescript-eslint/typescript-estree": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.15.0.tgz",
- "integrity": "sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA==",
- "dependencies": {
- "@typescript-eslint/types": "5.15.0",
- "@typescript-eslint/visitor-keys": "5.15.0",
- "debug": "^4.3.2",
- "globby": "^11.0.4",
- "is-glob": "^4.0.3",
- "semver": "^7.3.5",
- "tsutils": "^3.21.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/@typescript-eslint/utils": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.15.0.tgz",
- "integrity": "sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==",
- "dependencies": {
- "@types/json-schema": "^7.0.9",
- "@typescript-eslint/scope-manager": "5.15.0",
- "@typescript-eslint/types": "5.15.0",
- "@typescript-eslint/typescript-estree": "5.15.0",
- "eslint-scope": "^5.1.1",
- "eslint-utils": "^3.0.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- },
- "peerDependencies": {
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
- }
- },
- "node_modules/@typescript-eslint/utils/node_modules/eslint-scope": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
- "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^4.1.1"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/@typescript-eslint/utils/node_modules/estraverse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
- "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/@typescript-eslint/visitor-keys": {
- "version": "5.15.0",
- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.15.0.tgz",
- "integrity": "sha512-+vX5FKtgvyHbmIJdxMJ2jKm9z2BIlXJiuewI8dsDYMp5LzPUcuTT78Ya5iwvQg3VqSVdmxyM8Anj1Jeq7733ZQ==",
- "dependencies": {
- "@typescript-eslint/types": "5.15.0",
- "eslint-visitor-keys": "^3.0.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/typescript-eslint"
- }
- },
- "node_modules/@webassemblyjs/ast": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz",
- "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==",
- "dependencies": {
- "@webassemblyjs/helper-numbers": "1.11.1",
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1"
- }
- },
- "node_modules/@webassemblyjs/floating-point-hex-parser": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz",
- "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ=="
- },
- "node_modules/@webassemblyjs/helper-api-error": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz",
- "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg=="
- },
- "node_modules/@webassemblyjs/helper-buffer": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz",
- "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA=="
- },
- "node_modules/@webassemblyjs/helper-numbers": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz",
- "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==",
- "dependencies": {
- "@webassemblyjs/floating-point-hex-parser": "1.11.1",
- "@webassemblyjs/helper-api-error": "1.11.1",
- "@xtuc/long": "4.2.2"
- }
- },
- "node_modules/@webassemblyjs/helper-wasm-bytecode": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz",
- "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q=="
- },
- "node_modules/@webassemblyjs/helper-wasm-section": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz",
- "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==",
- "dependencies": {
- "@webassemblyjs/ast": "1.11.1",
- "@webassemblyjs/helper-buffer": "1.11.1",
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
- "@webassemblyjs/wasm-gen": "1.11.1"
- }
- },
- "node_modules/@webassemblyjs/ieee754": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz",
- "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==",
- "dependencies": {
- "@xtuc/ieee754": "^1.2.0"
- }
- },
- "node_modules/@webassemblyjs/leb128": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz",
- "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==",
- "dependencies": {
- "@xtuc/long": "4.2.2"
- }
- },
- "node_modules/@webassemblyjs/utf8": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz",
- "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ=="
- },
- "node_modules/@webassemblyjs/wasm-edit": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz",
- "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==",
- "dependencies": {
- "@webassemblyjs/ast": "1.11.1",
- "@webassemblyjs/helper-buffer": "1.11.1",
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
- "@webassemblyjs/helper-wasm-section": "1.11.1",
- "@webassemblyjs/wasm-gen": "1.11.1",
- "@webassemblyjs/wasm-opt": "1.11.1",
- "@webassemblyjs/wasm-parser": "1.11.1",
- "@webassemblyjs/wast-printer": "1.11.1"
- }
- },
- "node_modules/@webassemblyjs/wasm-gen": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz",
- "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==",
- "dependencies": {
- "@webassemblyjs/ast": "1.11.1",
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
- "@webassemblyjs/ieee754": "1.11.1",
- "@webassemblyjs/leb128": "1.11.1",
- "@webassemblyjs/utf8": "1.11.1"
- }
- },
- "node_modules/@webassemblyjs/wasm-opt": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz",
- "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==",
- "dependencies": {
- "@webassemblyjs/ast": "1.11.1",
- "@webassemblyjs/helper-buffer": "1.11.1",
- "@webassemblyjs/wasm-gen": "1.11.1",
- "@webassemblyjs/wasm-parser": "1.11.1"
- }
- },
- "node_modules/@webassemblyjs/wasm-parser": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz",
- "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==",
- "dependencies": {
- "@webassemblyjs/ast": "1.11.1",
- "@webassemblyjs/helper-api-error": "1.11.1",
- "@webassemblyjs/helper-wasm-bytecode": "1.11.1",
- "@webassemblyjs/ieee754": "1.11.1",
- "@webassemblyjs/leb128": "1.11.1",
- "@webassemblyjs/utf8": "1.11.1"
- }
- },
- "node_modules/@webassemblyjs/wast-printer": {
- "version": "1.11.1",
- "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz",
- "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==",
- "dependencies": {
- "@webassemblyjs/ast": "1.11.1",
- "@xtuc/long": "4.2.2"
- }
- },
- "node_modules/@xtuc/ieee754": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz",
- "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA=="
- },
- "node_modules/@xtuc/long": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz",
- "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
- },
- "node_modules/abab": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz",
- "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q=="
- },
- "node_modules/accepts": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
- "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
- "dependencies": {
- "mime-types": "~2.1.34",
- "negotiator": "0.6.3"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/acorn": {
- "version": "8.7.0",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
- "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
- "bin": {
- "acorn": "bin/acorn"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/acorn-globals": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz",
- "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==",
- "dependencies": {
- "acorn": "^7.1.1",
- "acorn-walk": "^7.1.1"
- }
- },
- "node_modules/acorn-globals/node_modules/acorn": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
- "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
- "bin": {
- "acorn": "bin/acorn"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/acorn-import-assertions": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz",
- "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==",
- "peerDependencies": {
- "acorn": "^8"
- }
- },
- "node_modules/acorn-jsx": {
- "version": "5.3.2",
- "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
- "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
- "peerDependencies": {
- "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
- }
- },
- "node_modules/acorn-node": {
- "version": "1.8.2",
- "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz",
- "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==",
- "dependencies": {
- "acorn": "^7.0.0",
- "acorn-walk": "^7.0.0",
- "xtend": "^4.0.2"
- }
- },
- "node_modules/acorn-node/node_modules/acorn": {
- "version": "7.4.1",
- "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
- "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
- "bin": {
- "acorn": "bin/acorn"
- },
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/acorn-walk": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz",
- "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==",
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/address": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/address/-/address-1.1.2.tgz",
- "integrity": "sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA==",
- "engines": {
- "node": ">= 0.12.0"
- }
- },
- "node_modules/adjust-sourcemap-loader": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz",
- "integrity": "sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A==",
- "dependencies": {
- "loader-utils": "^2.0.0",
- "regex-parser": "^2.2.11"
- },
- "engines": {
- "node": ">=8.9"
- }
- },
- "node_modules/agent-base": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
- "dependencies": {
- "debug": "4"
- },
- "engines": {
- "node": ">= 6.0.0"
- }
- },
- "node_modules/aggregate-error": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
- "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==",
- "dependencies": {
- "clean-stack": "^2.0.0",
- "indent-string": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ajv": {
- "version": "6.12.6",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
- "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "fast-json-stable-stringify": "^2.0.0",
- "json-schema-traverse": "^0.4.1",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/ajv-formats": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
- "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
- "dependencies": {
- "ajv": "^8.0.0"
- },
- "peerDependencies": {
- "ajv": "^8.0.0"
- },
- "peerDependenciesMeta": {
- "ajv": {
- "optional": true
- }
- }
- },
- "node_modules/ajv-formats/node_modules/ajv": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
- "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/ajv-formats/node_modules/json-schema-traverse": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
- "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
- },
- "node_modules/ajv-keywords": {
- "version": "3.5.2",
- "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz",
- "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==",
- "peerDependencies": {
- "ajv": "^6.9.1"
- }
- },
- "node_modules/ansi-escapes": {
- "version": "4.3.2",
- "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
- "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
- "dependencies": {
- "type-fest": "^0.21.3"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/ansi-html-community": {
- "version": "0.0.8",
- "resolved": "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz",
- "integrity": "sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw==",
- "engines": [
- "node >= 0.8.0"
- ],
- "bin": {
- "ansi-html": "bin/ansi-html"
- }
- },
- "node_modules/ansi-regex": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
- "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/ansi-styles": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
- "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
- "dependencies": {
- "color-convert": "^1.9.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/anymatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz",
- "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==",
- "dependencies": {
- "normalize-path": "^3.0.0",
- "picomatch": "^2.0.4"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/arg": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/arg/-/arg-5.0.1.tgz",
- "integrity": "sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA=="
- },
- "node_modules/argparse": {
- "version": "1.0.10",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
- "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
- "dependencies": {
- "sprintf-js": "~1.0.2"
- }
- },
- "node_modules/aria-query": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-4.2.2.tgz",
- "integrity": "sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==",
- "dependencies": {
- "@babel/runtime": "^7.10.2",
- "@babel/runtime-corejs3": "^7.10.2"
- },
- "engines": {
- "node": ">=6.0"
- }
- },
- "node_modules/array-flatten": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz",
- "integrity": "sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ=="
- },
- "node_modules/array-includes": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.4.tgz",
- "integrity": "sha512-ZTNSQkmWumEbiHO2GF4GmWxYVTiQyJy2XOTa15sdQSrvKn7l+180egQMqlrMOUMCyLMD7pmyQe4mMDUT6Behrw==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.1",
- "get-intrinsic": "^1.1.1",
- "is-string": "^1.0.7"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/array-union": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
- "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/array.prototype.flat": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz",
- "integrity": "sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/array.prototype.flatmap": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.5.tgz",
- "integrity": "sha512-08u6rVyi1Lj7oqWbS9nUxliETrtIROT4XGTA4D/LWGten6E3ocm7cy9SIrmNHOL5XVbVuckUp3X6Xyg8/zpvHA==",
- "dependencies": {
- "call-bind": "^1.0.0",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/asap": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
- "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
- },
- "node_modules/ast-types-flow": {
- "version": "0.0.7",
- "resolved": "https://registry.npmjs.org/ast-types-flow/-/ast-types-flow-0.0.7.tgz",
- "integrity": "sha1-9wtzXGvKGlycItmCw+Oef+ujva0="
- },
- "node_modules/async": {
- "version": "2.6.3",
- "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
- "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
- "dependencies": {
- "lodash": "^4.17.14"
- }
- },
- "node_modules/asynckit": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
- "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
- },
- "node_modules/at-least-node": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz",
- "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
- "engines": {
- "node": ">= 4.0.0"
- }
- },
- "node_modules/atob": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
- "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
- "bin": {
- "atob": "bin/atob.js"
- },
- "engines": {
- "node": ">= 4.5.0"
- }
- },
- "node_modules/autoprefixer": {
- "version": "10.4.4",
- "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.4.tgz",
- "integrity": "sha512-Tm8JxsB286VweiZ5F0anmbyGiNI3v3wGv3mz9W+cxEDYB/6jbnj6GM9H9mK3wIL8ftgl+C07Lcwb8PG5PCCPzA==",
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/autoprefixer"
- }
- ],
- "dependencies": {
- "browserslist": "^4.20.2",
- "caniuse-lite": "^1.0.30001317",
- "fraction.js": "^4.2.0",
- "normalize-range": "^0.1.2",
- "picocolors": "^1.0.0",
- "postcss-value-parser": "^4.2.0"
- },
- "bin": {
- "autoprefixer": "bin/autoprefixer"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/axe-core": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.4.1.tgz",
- "integrity": "sha512-gd1kmb21kwNuWr6BQz8fv6GNECPBnUasepcoLbekws23NVBLODdsClRZ+bQ8+9Uomf3Sm3+Vwn0oYG9NvwnJCw==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/axobject-query": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-2.2.0.tgz",
- "integrity": "sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA=="
- },
- "node_modules/babel-jest": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz",
- "integrity": "sha512-cdQ5dXjGRd0IBRATiQ4mZGlGlRE8kJpjPOixdNRdT+m3UcNqmYWN6rK6nvtXYfY3D76cb8s/O1Ss8ea24PIwcg==",
- "dependencies": {
- "@jest/transform": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/babel__core": "^7.1.14",
- "babel-plugin-istanbul": "^6.1.1",
- "babel-preset-jest": "^27.5.1",
- "chalk": "^4.0.0",
- "graceful-fs": "^4.2.9",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.8.0"
- }
- },
- "node_modules/babel-jest/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/babel-jest/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/babel-jest/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/babel-jest/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/babel-jest/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/babel-jest/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/babel-loader": {
- "version": "8.2.3",
- "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.3.tgz",
- "integrity": "sha512-n4Zeta8NC3QAsuyiizu0GkmRcQ6clkV9WFUnUf1iXP//IeSKbWjofW3UHyZVwlOB4y039YQKefawyTn64Zwbuw==",
- "dependencies": {
- "find-cache-dir": "^3.3.1",
- "loader-utils": "^1.4.0",
- "make-dir": "^3.1.0",
- "schema-utils": "^2.6.5"
- },
- "engines": {
- "node": ">= 8.9"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0",
- "webpack": ">=2"
- }
- },
- "node_modules/babel-loader/node_modules/json5": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
- "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
- "dependencies": {
- "minimist": "^1.2.0"
- },
- "bin": {
- "json5": "lib/cli.js"
- }
- },
- "node_modules/babel-loader/node_modules/loader-utils": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz",
- "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==",
- "dependencies": {
- "big.js": "^5.2.2",
- "emojis-list": "^3.0.0",
- "json5": "^1.0.1"
- },
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/babel-loader/node_modules/schema-utils": {
- "version": "2.7.1",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",
- "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==",
- "dependencies": {
- "@types/json-schema": "^7.0.5",
- "ajv": "^6.12.4",
- "ajv-keywords": "^3.5.2"
- },
- "engines": {
- "node": ">= 8.9.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- }
- },
- "node_modules/babel-plugin-dynamic-import-node": {
- "version": "2.3.3",
- "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz",
- "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==",
- "dependencies": {
- "object.assign": "^4.1.0"
- }
- },
- "node_modules/babel-plugin-istanbul": {
- "version": "6.1.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz",
- "integrity": "sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA==",
- "dependencies": {
- "@babel/helper-plugin-utils": "^7.0.0",
- "@istanbuljs/load-nyc-config": "^1.0.0",
- "@istanbuljs/schema": "^0.1.2",
- "istanbul-lib-instrument": "^5.0.4",
- "test-exclude": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/babel-plugin-jest-hoist": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.5.1.tgz",
- "integrity": "sha512-50wCwD5EMNW4aRpOwtqzyZHIewTYNxLA4nhB+09d8BIssfNfzBRhkBIHiaPv1Si226TQSvp8gxAJm2iY2qs2hQ==",
- "dependencies": {
- "@babel/template": "^7.3.3",
- "@babel/types": "^7.3.3",
- "@types/babel__core": "^7.0.0",
- "@types/babel__traverse": "^7.0.6"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/babel-plugin-macros": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz",
- "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==",
- "dependencies": {
- "@babel/runtime": "^7.12.5",
- "cosmiconfig": "^7.0.0",
- "resolve": "^1.19.0"
- },
- "engines": {
- "node": ">=10",
- "npm": ">=6"
- }
- },
- "node_modules/babel-plugin-named-asset-import": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/babel-plugin-named-asset-import/-/babel-plugin-named-asset-import-0.3.8.tgz",
- "integrity": "sha512-WXiAc++qo7XcJ1ZnTYGtLxmBCVbddAml3CEXgWaBzNzLNoxtQ8AiGEFDMOhot9XjTCQbvP5E77Fj9Gk924f00Q==",
- "peerDependencies": {
- "@babel/core": "^7.1.0"
- }
- },
- "node_modules/babel-plugin-polyfill-corejs2": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz",
- "integrity": "sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w==",
- "dependencies": {
- "@babel/compat-data": "^7.13.11",
- "@babel/helper-define-polyfill-provider": "^0.3.1",
- "semver": "^6.1.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/babel-plugin-polyfill-corejs3": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz",
- "integrity": "sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ==",
- "dependencies": {
- "@babel/helper-define-polyfill-provider": "^0.3.1",
- "core-js-compat": "^3.21.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/babel-plugin-polyfill-regenerator": {
- "version": "0.3.1",
- "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz",
- "integrity": "sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A==",
- "dependencies": {
- "@babel/helper-define-polyfill-provider": "^0.3.1"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0-0"
- }
- },
- "node_modules/babel-plugin-transform-react-remove-prop-types": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.24.tgz",
- "integrity": "sha512-eqj0hVcJUR57/Ug2zE1Yswsw4LhuqqHhD+8v120T1cl3kjg76QwtyBrdIk4WVwK+lAhBJVYCd/v+4nc4y+8JsA=="
- },
- "node_modules/babel-preset-current-node-syntax": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz",
- "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==",
- "dependencies": {
- "@babel/plugin-syntax-async-generators": "^7.8.4",
- "@babel/plugin-syntax-bigint": "^7.8.3",
- "@babel/plugin-syntax-class-properties": "^7.8.3",
- "@babel/plugin-syntax-import-meta": "^7.8.3",
- "@babel/plugin-syntax-json-strings": "^7.8.3",
- "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3",
- "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3",
- "@babel/plugin-syntax-numeric-separator": "^7.8.3",
- "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
- "@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
- "@babel/plugin-syntax-optional-chaining": "^7.8.3",
- "@babel/plugin-syntax-top-level-await": "^7.8.3"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/babel-preset-jest": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.5.1.tgz",
- "integrity": "sha512-Nptf2FzlPCWYuJg41HBqXVT8ym6bXOevuCTbhxlUpjwtysGaIWFvDEjp4y+G7fl13FgOdjs7P/DmErqH7da0Ag==",
- "dependencies": {
- "babel-plugin-jest-hoist": "^27.5.1",
- "babel-preset-current-node-syntax": "^1.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- }
- },
- "node_modules/babel-preset-react-app": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/babel-preset-react-app/-/babel-preset-react-app-10.0.1.tgz",
- "integrity": "sha512-b0D9IZ1WhhCWkrTXyFuIIgqGzSkRIH5D5AmB0bXbzYAB1OBAwHcUeyWW2LorutLWF5btNo/N7r/cIdmvvKJlYg==",
- "dependencies": {
- "@babel/core": "^7.16.0",
- "@babel/plugin-proposal-class-properties": "^7.16.0",
- "@babel/plugin-proposal-decorators": "^7.16.4",
- "@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.0",
- "@babel/plugin-proposal-numeric-separator": "^7.16.0",
- "@babel/plugin-proposal-optional-chaining": "^7.16.0",
- "@babel/plugin-proposal-private-methods": "^7.16.0",
- "@babel/plugin-transform-flow-strip-types": "^7.16.0",
- "@babel/plugin-transform-react-display-name": "^7.16.0",
- "@babel/plugin-transform-runtime": "^7.16.4",
- "@babel/preset-env": "^7.16.4",
- "@babel/preset-react": "^7.16.0",
- "@babel/preset-typescript": "^7.16.0",
- "@babel/runtime": "^7.16.3",
- "babel-plugin-macros": "^3.1.0",
- "babel-plugin-transform-react-remove-prop-types": "^0.4.24"
- }
- },
- "node_modules/balanced-match": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
- "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
- },
- "node_modules/batch": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz",
- "integrity": "sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY="
- },
- "node_modules/bfj": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/bfj/-/bfj-7.0.2.tgz",
- "integrity": "sha512-+e/UqUzwmzJamNF50tBV6tZPTORow7gQ96iFow+8b562OdMpEK0BcJEq2OSPEDmAbSMBQ7PKZ87ubFkgxpYWgw==",
- "dependencies": {
- "bluebird": "^3.5.5",
- "check-types": "^11.1.1",
- "hoopy": "^0.1.4",
- "tryer": "^1.0.1"
- },
- "engines": {
- "node": ">= 8.0.0"
- }
- },
- "node_modules/big.js": {
- "version": "5.2.2",
- "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz",
- "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==",
- "engines": {
- "node": "*"
- }
- },
- "node_modules/binary-extensions": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
- "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/bluebird": {
- "version": "3.7.2",
- "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
- "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
- },
- "node_modules/body-parser": {
- "version": "1.19.2",
- "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz",
- "integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==",
- "dependencies": {
- "bytes": "3.1.2",
- "content-type": "~1.0.4",
- "debug": "2.6.9",
- "depd": "~1.1.2",
- "http-errors": "1.8.1",
- "iconv-lite": "0.4.24",
- "on-finished": "~2.3.0",
- "qs": "6.9.7",
- "raw-body": "2.4.3",
- "type-is": "~1.6.18"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/body-parser/node_modules/bytes": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
- "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/body-parser/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/body-parser/node_modules/iconv-lite": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/body-parser/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "node_modules/bonjour": {
- "version": "3.5.0",
- "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz",
- "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=",
- "dependencies": {
- "array-flatten": "^2.1.0",
- "deep-equal": "^1.0.1",
- "dns-equal": "^1.0.0",
- "dns-txt": "^2.0.2",
- "multicast-dns": "^6.0.1",
- "multicast-dns-service-types": "^1.1.0"
- }
- },
- "node_modules/boolbase": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
- "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24="
- },
- "node_modules/brace-expansion": {
- "version": "1.1.11",
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
- "dependencies": {
- "balanced-match": "^1.0.0",
- "concat-map": "0.0.1"
- }
- },
- "node_modules/braces": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
- "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
- "dependencies": {
- "fill-range": "^7.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/browser-process-hrtime": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz",
- "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow=="
- },
- "node_modules/browserslist": {
- "version": "4.20.2",
- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.20.2.tgz",
- "integrity": "sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==",
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/browserslist"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/browserslist"
- }
- ],
- "dependencies": {
- "caniuse-lite": "^1.0.30001317",
- "electron-to-chromium": "^1.4.84",
- "escalade": "^3.1.1",
- "node-releases": "^2.0.2",
- "picocolors": "^1.0.0"
- },
- "bin": {
- "browserslist": "cli.js"
- },
- "engines": {
- "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
- }
- },
- "node_modules/bser": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz",
- "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==",
- "dependencies": {
- "node-int64": "^0.4.0"
- }
- },
- "node_modules/buffer-from": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
- "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
- },
- "node_modules/buffer-indexof": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.1.tgz",
- "integrity": "sha512-4/rOEg86jivtPTeOUUT61jJO1Ya1TrR/OkqCSZDyq84WJh3LuuiphBYJN+fm5xufIk4XAFcEwte/8WzC8If/1g=="
- },
- "node_modules/builtin-modules": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz",
- "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==",
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/bytes": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz",
- "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/call-bind": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
- "dependencies": {
- "function-bind": "^1.1.1",
- "get-intrinsic": "^1.0.2"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/callsites": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
- "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/camel-case": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
- "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
- "dependencies": {
- "pascal-case": "^3.1.2",
- "tslib": "^2.0.3"
- }
- },
- "node_modules/camelcase": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz",
- "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/camelcase-css": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz",
- "integrity": "sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/caniuse-api": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz",
- "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==",
- "dependencies": {
- "browserslist": "^4.0.0",
- "caniuse-lite": "^1.0.0",
- "lodash.memoize": "^4.1.2",
- "lodash.uniq": "^4.5.0"
- }
- },
- "node_modules/caniuse-lite": {
- "version": "1.0.30001319",
- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz",
- "integrity": "sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw==",
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/browserslist"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
- }
- ]
- },
- "node_modules/case-sensitive-paths-webpack-plugin": {
- "version": "2.4.0",
- "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.4.0.tgz",
- "integrity": "sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/chalk": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
- "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
- "dependencies": {
- "ansi-styles": "^3.2.1",
- "escape-string-regexp": "^1.0.5",
- "supports-color": "^5.3.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/char-regex": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz",
- "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/charcodes": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/charcodes/-/charcodes-0.2.0.tgz",
- "integrity": "sha512-Y4kiDb+AM4Ecy58YkuZrrSRJBDQdQ2L+NyS1vHHFtNtUjgutcZfx3yp1dAONI/oPaPmyGfCLx5CxL+zauIMyKQ==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/check-types": {
- "version": "11.1.2",
- "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.1.2.tgz",
- "integrity": "sha512-tzWzvgePgLORb9/3a0YenggReLKAIb2owL03H2Xdoe5pKcUyWRSEQ8xfCar8t2SIAuEDwtmx2da1YB52YuHQMQ=="
- },
- "node_modules/chokidar": {
- "version": "3.5.3",
- "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
- "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
- "funding": [
- {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- ],
- "dependencies": {
- "anymatch": "~3.1.2",
- "braces": "~3.0.2",
- "glob-parent": "~5.1.2",
- "is-binary-path": "~2.1.0",
- "is-glob": "~4.0.1",
- "normalize-path": "~3.0.0",
- "readdirp": "~3.6.0"
- },
- "engines": {
- "node": ">= 8.10.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/chokidar/node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/chrome-trace-event": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",
- "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==",
- "engines": {
- "node": ">=6.0"
- }
- },
- "node_modules/ci-info": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.3.0.tgz",
- "integrity": "sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw=="
- },
- "node_modules/cjs-module-lexer": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz",
- "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA=="
- },
- "node_modules/clean-css": {
- "version": "5.2.4",
- "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.2.4.tgz",
- "integrity": "sha512-nKseG8wCzEuji/4yrgM/5cthL9oTDc5UOQyFMvW/Q53oP6gLH690o1NbuTh6Y18nujr7BxlsFuS7gXLnLzKJGg==",
- "dependencies": {
- "source-map": "~0.6.0"
- },
- "engines": {
- "node": ">= 10.0"
- }
- },
- "node_modules/clean-css/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/clean-stack": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz",
- "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/cliui": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz",
- "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==",
- "dependencies": {
- "string-width": "^4.2.0",
- "strip-ansi": "^6.0.0",
- "wrap-ansi": "^7.0.0"
- }
- },
- "node_modules/co": {
- "version": "4.6.0",
- "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz",
- "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=",
- "engines": {
- "iojs": ">= 1.0.0",
- "node": ">= 0.12.0"
- }
- },
- "node_modules/coa": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz",
- "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==",
- "dependencies": {
- "@types/q": "^1.5.1",
- "chalk": "^2.4.1",
- "q": "^1.1.2"
- },
- "engines": {
- "node": ">= 4.0"
- }
- },
- "node_modules/collect-v8-coverage": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz",
- "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg=="
- },
- "node_modules/color-convert": {
- "version": "1.9.3",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
- "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
- "dependencies": {
- "color-name": "1.1.3"
- }
- },
- "node_modules/color-name": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
- "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
- },
- "node_modules/colord": {
- "version": "2.9.2",
- "resolved": "https://registry.npmjs.org/colord/-/colord-2.9.2.tgz",
- "integrity": "sha512-Uqbg+J445nc1TKn4FoDPS6ZZqAvEDnwrH42yo8B40JSOgSLxMZ/gt3h4nmCtPLQeXhjJJkqBx7SCY35WnIixaQ=="
- },
- "node_modules/colorette": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz",
- "integrity": "sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g=="
- },
- "node_modules/combined-stream": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
- "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
- "dependencies": {
- "delayed-stream": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/commander": {
- "version": "8.3.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
- "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
- "engines": {
- "node": ">= 12"
- }
- },
- "node_modules/common-path-prefix": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz",
- "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w=="
- },
- "node_modules/common-tags": {
- "version": "1.8.2",
- "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz",
- "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==",
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/commondir": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
- "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs="
- },
- "node_modules/compressible": {
- "version": "2.0.18",
- "resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
- "integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
- "dependencies": {
- "mime-db": ">= 1.43.0 < 2"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/compression": {
- "version": "1.7.4",
- "resolved": "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz",
- "integrity": "sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ==",
- "dependencies": {
- "accepts": "~1.3.5",
- "bytes": "3.0.0",
- "compressible": "~2.0.16",
- "debug": "2.6.9",
- "on-headers": "~1.0.2",
- "safe-buffer": "5.1.2",
- "vary": "~1.1.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/compression/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/compression/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "node_modules/concat-map": {
- "version": "0.0.1",
- "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
- "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
- },
- "node_modules/confusing-browser-globals": {
- "version": "1.0.11",
- "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz",
- "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA=="
- },
- "node_modules/connect-history-api-fallback": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz",
- "integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==",
- "engines": {
- "node": ">=0.8"
- }
- },
- "node_modules/content-disposition": {
- "version": "0.5.4",
- "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
- "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
- "dependencies": {
- "safe-buffer": "5.2.1"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/content-disposition/node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/content-type": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
- "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/convert-source-map": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz",
- "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==",
- "dependencies": {
- "safe-buffer": "~5.1.1"
- }
- },
- "node_modules/cookie": {
- "version": "0.4.2",
- "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
- "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/cookie-signature": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
- "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
- },
- "node_modules/core-js": {
- "version": "3.21.1",
- "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.21.1.tgz",
- "integrity": "sha512-FRq5b/VMrWlrmCzwRrpDYNxyHP9BcAZC+xHJaqTgIE5091ZV1NTmyh0sGOg5XqpnHvR0svdy0sv1gWA1zmhxig==",
- "hasInstallScript": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
- },
- "node_modules/core-js-compat": {
- "version": "3.21.1",
- "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.21.1.tgz",
- "integrity": "sha512-gbgX5AUvMb8gwxC7FLVWYT7Kkgu/y7+h/h1X43yJkNqhlK2fuYyQimqvKGNZFAY6CKii/GFKJ2cp/1/42TN36g==",
- "dependencies": {
- "browserslist": "^4.19.1",
- "semver": "7.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
- },
- "node_modules/core-js-compat/node_modules/semver": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
- "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/core-js-pure": {
- "version": "3.21.1",
- "resolved": "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.21.1.tgz",
- "integrity": "sha512-12VZfFIu+wyVbBebyHmRTuEE/tZrB4tJToWcwAMcsp3h4+sHR+fMJWbKpYiCRWlhFBq+KNyO8rIV9rTkeVmznQ==",
- "hasInstallScript": true,
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/core-js"
- }
- },
- "node_modules/core-util-is": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
- "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
- },
- "node_modules/cosmiconfig": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz",
- "integrity": "sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ==",
- "dependencies": {
- "@types/parse-json": "^4.0.0",
- "import-fresh": "^3.2.1",
- "parse-json": "^5.0.0",
- "path-type": "^4.0.0",
- "yaml": "^1.10.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/cross-spawn": {
- "version": "7.0.3",
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
- "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
- "dependencies": {
- "path-key": "^3.1.0",
- "shebang-command": "^2.0.0",
- "which": "^2.0.1"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/crypto-random-string": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz",
- "integrity": "sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/css": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz",
- "integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==",
- "dependencies": {
- "inherits": "^2.0.4",
- "source-map": "^0.6.1",
- "source-map-resolve": "^0.6.0"
- }
- },
- "node_modules/css-blank-pseudo": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/css-blank-pseudo/-/css-blank-pseudo-3.0.3.tgz",
- "integrity": "sha512-VS90XWtsHGqoM0t4KpH053c4ehxZ2E6HtGI7x68YFV0pTo/QmkV/YFA+NnlvK8guxZVNWGQhVNJGC39Q8XF4OQ==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9"
- },
- "bin": {
- "css-blank-pseudo": "dist/cli.cjs"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/css-declaration-sorter": {
- "version": "6.1.4",
- "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.4.tgz",
- "integrity": "sha512-lpfkqS0fctcmZotJGhnxkIyJWvBXgpyi2wsFd4J8VB7wzyrT6Ch/3Q+FMNJpjK4gu1+GN5khOnpU2ZVKrLbhCw==",
- "dependencies": {
- "timsort": "^0.3.0"
- },
- "engines": {
- "node": ">= 10"
- },
- "peerDependencies": {
- "postcss": "^8.0.9"
- }
- },
- "node_modules/css-has-pseudo": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/css-has-pseudo/-/css-has-pseudo-3.0.4.tgz",
- "integrity": "sha512-Vse0xpR1K9MNlp2j5w1pgWIJtm1a8qS0JwS9goFYcImjlHEmywP9VUF05aGBXzGpDJF86QXk4L0ypBmwPhGArw==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9"
- },
- "bin": {
- "css-has-pseudo": "dist/cli.cjs"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/css-loader": {
- "version": "6.7.1",
- "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.1.tgz",
- "integrity": "sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw==",
- "dependencies": {
- "icss-utils": "^5.1.0",
- "postcss": "^8.4.7",
- "postcss-modules-extract-imports": "^3.0.0",
- "postcss-modules-local-by-default": "^4.0.0",
- "postcss-modules-scope": "^3.0.0",
- "postcss-modules-values": "^4.0.0",
- "postcss-value-parser": "^4.2.0",
- "semver": "^7.3.5"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^5.0.0"
- }
- },
- "node_modules/css-minimizer-webpack-plugin": {
- "version": "3.4.1",
- "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz",
- "integrity": "sha512-1u6D71zeIfgngN2XNRJefc/hY7Ybsxd74Jm4qngIXyUEk7fss3VUzuHxLAq/R8NAba4QU9OUSaMZlbpRc7bM4Q==",
- "dependencies": {
- "cssnano": "^5.0.6",
- "jest-worker": "^27.0.2",
- "postcss": "^8.3.5",
- "schema-utils": "^4.0.0",
- "serialize-javascript": "^6.0.0",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^5.0.0"
- },
- "peerDependenciesMeta": {
- "@parcel/css": {
- "optional": true
- },
- "clean-css": {
- "optional": true
- },
- "csso": {
- "optional": true
- },
- "esbuild": {
- "optional": true
- }
- }
- },
- "node_modules/css-minimizer-webpack-plugin/node_modules/ajv": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
- "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/css-minimizer-webpack-plugin/node_modules/ajv-keywords": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
- "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.3"
- },
- "peerDependencies": {
- "ajv": "^8.8.2"
- }
- },
- "node_modules/css-minimizer-webpack-plugin/node_modules/json-schema-traverse": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
- "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
- },
- "node_modules/css-minimizer-webpack-plugin/node_modules/schema-utils": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
- "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
- "dependencies": {
- "@types/json-schema": "^7.0.9",
- "ajv": "^8.8.0",
- "ajv-formats": "^2.1.1",
- "ajv-keywords": "^5.0.0"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- }
- },
- "node_modules/css-minimizer-webpack-plugin/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/css-prefers-color-scheme": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-6.0.3.tgz",
- "integrity": "sha512-4BqMbZksRkJQx2zAjrokiGMd07RqOa2IxIrrN10lyBe9xhn9DEvjUK79J6jkeiv9D9hQFXKb6g1jwU62jziJZA==",
- "bin": {
- "css-prefers-color-scheme": "dist/cli.cjs"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/css-select": {
- "version": "4.2.1",
- "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.2.1.tgz",
- "integrity": "sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ==",
- "dependencies": {
- "boolbase": "^1.0.0",
- "css-what": "^5.1.0",
- "domhandler": "^4.3.0",
- "domutils": "^2.8.0",
- "nth-check": "^2.0.1"
- },
- "funding": {
- "url": "https://github.com/sponsors/fb55"
- }
- },
- "node_modules/css-select-base-adapter": {
- "version": "0.1.1",
- "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz",
- "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w=="
- },
- "node_modules/css-tree": {
- "version": "1.0.0-alpha.37",
- "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz",
- "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==",
- "dependencies": {
- "mdn-data": "2.0.4",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/css-tree/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/css-what": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz",
- "integrity": "sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw==",
- "engines": {
- "node": ">= 6"
- },
- "funding": {
- "url": "https://github.com/sponsors/fb55"
- }
- },
- "node_modules/css.escape": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
- "integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s="
- },
- "node_modules/css/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/cssdb": {
- "version": "6.5.0",
- "resolved": "https://registry.npmjs.org/cssdb/-/cssdb-6.5.0.tgz",
- "integrity": "sha512-Rh7AAopF2ckPXe/VBcoUS9JrCZNSyc60+KpgE6X25vpVxA32TmiqvExjkfhwP4wGSb6Xe8Z/JIyGqwgx/zZYFA=="
- },
- "node_modules/cssesc": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
- "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
- "bin": {
- "cssesc": "bin/cssesc"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/cssnano": {
- "version": "5.1.4",
- "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.1.4.tgz",
- "integrity": "sha512-hbfhVZreEPyzl+NbvRsjNo54JOX80b+j6nqG2biLVLaZHJEiqGyMh4xDGHtwhUKd5p59mj2GlDqlUBwJUuIu5A==",
- "dependencies": {
- "cssnano-preset-default": "^*",
- "lilconfig": "^2.0.3",
- "yaml": "^1.10.2"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/cssnano"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/cssnano-preset-default": {
- "version": "5.2.4",
- "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.4.tgz",
- "integrity": "sha512-w1Gg8xsebln6/axZ6qDFQHuglrGfbIHOIx0g4y9+etRlRab8CGpSpe6UMsrgJe4zhCaJ0LwLmc+PhdLRTwnhIA==",
- "dependencies": {
- "css-declaration-sorter": "^6.0.3",
- "cssnano-utils": "^*",
- "postcss-calc": "^8.2.3",
- "postcss-colormin": "^*",
- "postcss-convert-values": "^*",
- "postcss-discard-comments": "^*",
- "postcss-discard-duplicates": "^*",
- "postcss-discard-empty": "^*",
- "postcss-discard-overridden": "^*",
- "postcss-merge-longhand": "^*",
- "postcss-merge-rules": "^*",
- "postcss-minify-font-values": "^*",
- "postcss-minify-gradients": "^*",
- "postcss-minify-params": "^*",
- "postcss-minify-selectors": "^*",
- "postcss-normalize-charset": "^*",
- "postcss-normalize-display-values": "^*",
- "postcss-normalize-positions": "^*",
- "postcss-normalize-repeat-style": "^*",
- "postcss-normalize-string": "^*",
- "postcss-normalize-timing-functions": "^*",
- "postcss-normalize-unicode": "^*",
- "postcss-normalize-url": "^*",
- "postcss-normalize-whitespace": "^*",
- "postcss-ordered-values": "^*",
- "postcss-reduce-initial": "^*",
- "postcss-reduce-transforms": "^*",
- "postcss-svgo": "^*",
- "postcss-unique-selectors": "^*"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/cssnano-utils": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz",
- "integrity": "sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==",
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/csso": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz",
- "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==",
- "dependencies": {
- "css-tree": "^1.1.2"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/csso/node_modules/css-tree": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
- "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
- "dependencies": {
- "mdn-data": "2.0.14",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/csso/node_modules/mdn-data": {
- "version": "2.0.14",
- "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
- "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="
- },
- "node_modules/csso/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/cssom": {
- "version": "0.4.4",
- "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz",
- "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw=="
- },
- "node_modules/cssstyle": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz",
- "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==",
- "dependencies": {
- "cssom": "~0.3.6"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/cssstyle/node_modules/cssom": {
- "version": "0.3.8",
- "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz",
- "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg=="
- },
- "node_modules/csstype": {
- "version": "3.0.11",
- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.11.tgz",
- "integrity": "sha512-sa6P2wJ+CAbgyy4KFssIb/JNMLxFvKF1pCYCSXS8ZMuqZnMsrxqI2E5sPyoTpxoPU/gVZMzr2zjOfg8GIZOMsw=="
- },
- "node_modules/damerau-levenshtein": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz",
- "integrity": "sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA=="
- },
- "node_modules/data-urls": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz",
- "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==",
- "dependencies": {
- "abab": "^2.0.3",
- "whatwg-mimetype": "^2.3.0",
- "whatwg-url": "^8.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/debug": {
- "version": "4.3.4",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
- "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
- "dependencies": {
- "ms": "2.1.2"
- },
- "engines": {
- "node": ">=6.0"
- },
- "peerDependenciesMeta": {
- "supports-color": {
- "optional": true
- }
- }
- },
- "node_modules/decimal.js": {
- "version": "10.3.1",
- "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz",
- "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ=="
- },
- "node_modules/decode-uri-component": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
- "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/dedent": {
- "version": "0.7.0",
- "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz",
- "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw="
- },
- "node_modules/deep-equal": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz",
- "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==",
- "dependencies": {
- "is-arguments": "^1.0.4",
- "is-date-object": "^1.0.1",
- "is-regex": "^1.0.4",
- "object-is": "^1.0.1",
- "object-keys": "^1.1.1",
- "regexp.prototype.flags": "^1.2.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/deep-is": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
- "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ=="
- },
- "node_modules/deepmerge": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz",
- "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/default-gateway": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz",
- "integrity": "sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg==",
- "dependencies": {
- "execa": "^5.0.0"
- },
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/define-lazy-prop": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz",
- "integrity": "sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/define-properties": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
- "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
- "dependencies": {
- "object-keys": "^1.0.12"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/defined": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz",
- "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM="
- },
- "node_modules/del": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/del/-/del-6.0.0.tgz",
- "integrity": "sha512-1shh9DQ23L16oXSZKB2JxpL7iMy2E0S9d517ptA1P8iw0alkPtQcrKH7ru31rYtKwF499HkTu+DRzq3TCKDFRQ==",
- "dependencies": {
- "globby": "^11.0.1",
- "graceful-fs": "^4.2.4",
- "is-glob": "^4.0.1",
- "is-path-cwd": "^2.2.0",
- "is-path-inside": "^3.0.2",
- "p-map": "^4.0.0",
- "rimraf": "^3.0.2",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/delayed-stream": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
- "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
- "engines": {
- "node": ">=0.4.0"
- }
- },
- "node_modules/depd": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
- "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/destroy": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
- "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
- },
- "node_modules/detect-newline": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz",
- "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/detect-node": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",
- "integrity": "sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g=="
- },
- "node_modules/detect-port-alt": {
- "version": "1.1.6",
- "resolved": "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz",
- "integrity": "sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q==",
- "dependencies": {
- "address": "^1.0.1",
- "debug": "^2.6.0"
- },
- "bin": {
- "detect": "bin/detect-port",
- "detect-port": "bin/detect-port"
- },
- "engines": {
- "node": ">= 4.2.1"
- }
- },
- "node_modules/detect-port-alt/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/detect-port-alt/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "node_modules/detective": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz",
- "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==",
- "dependencies": {
- "acorn-node": "^1.6.1",
- "defined": "^1.0.0",
- "minimist": "^1.1.1"
- },
- "bin": {
- "detective": "bin/detective.js"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/didyoumean": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/didyoumean/-/didyoumean-1.2.2.tgz",
- "integrity": "sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw=="
- },
- "node_modules/diff-sequences": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.5.1.tgz",
- "integrity": "sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==",
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/dir-glob": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz",
- "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==",
- "dependencies": {
- "path-type": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/dlv": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/dlv/-/dlv-1.1.3.tgz",
- "integrity": "sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA=="
- },
- "node_modules/dns-equal": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz",
- "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0="
- },
- "node_modules/dns-packet": {
- "version": "1.3.4",
- "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz",
- "integrity": "sha512-BQ6F4vycLXBvdrJZ6S3gZewt6rcrks9KBgM9vrhW+knGRqc8uEdT7fuCwloc7nny5xNoMJ17HGH0R/6fpo8ECA==",
- "dependencies": {
- "ip": "^1.1.0",
- "safe-buffer": "^5.0.1"
- }
- },
- "node_modules/dns-txt": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz",
- "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=",
- "dependencies": {
- "buffer-indexof": "^1.0.0"
- }
- },
- "node_modules/doctrine": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
- "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
- "dependencies": {
- "esutils": "^2.0.2"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/dom-accessibility-api": {
- "version": "0.5.13",
- "resolved": "https://registry.npmjs.org/dom-accessibility-api/-/dom-accessibility-api-0.5.13.tgz",
- "integrity": "sha512-R305kwb5CcMDIpSHUnLyIAp7SrSPBx6F0VfQFB3M75xVMHhXJJIdePYgbPPh1o57vCHNu5QztokWUPsLjWzFqw=="
- },
- "node_modules/dom-converter": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz",
- "integrity": "sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA==",
- "dependencies": {
- "utila": "~0.4"
- }
- },
- "node_modules/dom-serializer": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz",
- "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==",
- "dependencies": {
- "domelementtype": "^2.0.1",
- "domhandler": "^4.2.0",
- "entities": "^2.0.0"
- },
- "funding": {
- "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1"
- }
- },
- "node_modules/domelementtype": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz",
- "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/fb55"
- }
- ]
- },
- "node_modules/domexception": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz",
- "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==",
- "dependencies": {
- "webidl-conversions": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/domexception/node_modules/webidl-conversions": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz",
- "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/domhandler": {
- "version": "4.3.1",
- "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz",
- "integrity": "sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ==",
- "dependencies": {
- "domelementtype": "^2.2.0"
- },
- "engines": {
- "node": ">= 4"
- },
- "funding": {
- "url": "https://github.com/fb55/domhandler?sponsor=1"
- }
- },
- "node_modules/domutils": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz",
- "integrity": "sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A==",
- "dependencies": {
- "dom-serializer": "^1.0.1",
- "domelementtype": "^2.2.0",
- "domhandler": "^4.2.0"
- },
- "funding": {
- "url": "https://github.com/fb55/domutils?sponsor=1"
- }
- },
- "node_modules/dot-case": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
- "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
- "dependencies": {
- "no-case": "^3.0.4",
- "tslib": "^2.0.3"
- }
- },
- "node_modules/dotenv": {
- "version": "10.0.0",
- "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-10.0.0.tgz",
- "integrity": "sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/dotenv-expand": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz",
- "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA=="
- },
- "node_modules/duplexer": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
- "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg=="
- },
- "node_modules/ee-first": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
- "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
- },
- "node_modules/ejs": {
- "version": "3.1.6",
- "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.6.tgz",
- "integrity": "sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==",
- "dependencies": {
- "jake": "^10.6.1"
- },
- "bin": {
- "ejs": "bin/cli.js"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/electron-to-chromium": {
- "version": "1.4.88",
- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.88.tgz",
- "integrity": "sha512-oA7mzccefkvTNi9u7DXmT0LqvhnOiN2BhSrKerta7HeUC1cLoIwtbf2wL+Ah2ozh5KQd3/1njrGrwDBXx6d14Q=="
- },
- "node_modules/emittery": {
- "version": "0.8.1",
- "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz",
- "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/emittery?sponsor=1"
- }
- },
- "node_modules/emoji-regex": {
- "version": "9.2.2",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
- "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
- },
- "node_modules/emojis-list": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz",
- "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/encodeurl": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
- "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/enhanced-resolve": {
- "version": "5.9.2",
- "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz",
- "integrity": "sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==",
- "dependencies": {
- "graceful-fs": "^4.2.4",
- "tapable": "^2.2.0"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/entities": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz",
- "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==",
- "funding": {
- "url": "https://github.com/fb55/entities?sponsor=1"
- }
- },
- "node_modules/error-ex": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
- "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
- "dependencies": {
- "is-arrayish": "^0.2.1"
- }
- },
- "node_modules/error-stack-parser": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.7.tgz",
- "integrity": "sha512-chLOW0ZGRf4s8raLrDxa5sdkvPec5YdvwbFnqJme4rk0rFajP8mPtrDL1+I+CwrQDCjswDA5sREX7jYQDQs9vA==",
- "dependencies": {
- "stackframe": "^1.1.1"
- }
- },
- "node_modules/es-abstract": {
- "version": "1.19.1",
- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz",
- "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "es-to-primitive": "^1.2.1",
- "function-bind": "^1.1.1",
- "get-intrinsic": "^1.1.1",
- "get-symbol-description": "^1.0.0",
- "has": "^1.0.3",
- "has-symbols": "^1.0.2",
- "internal-slot": "^1.0.3",
- "is-callable": "^1.2.4",
- "is-negative-zero": "^2.0.1",
- "is-regex": "^1.1.4",
- "is-shared-array-buffer": "^1.0.1",
- "is-string": "^1.0.7",
- "is-weakref": "^1.0.1",
- "object-inspect": "^1.11.0",
- "object-keys": "^1.1.1",
- "object.assign": "^4.1.2",
- "string.prototype.trimend": "^1.0.4",
- "string.prototype.trimstart": "^1.0.4",
- "unbox-primitive": "^1.0.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/es-module-lexer": {
- "version": "0.9.3",
- "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz",
- "integrity": "sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ=="
- },
- "node_modules/es-to-primitive": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
- "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
- "dependencies": {
- "is-callable": "^1.1.4",
- "is-date-object": "^1.0.1",
- "is-symbol": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/escalade": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
- "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/escape-html": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
- "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
- },
- "node_modules/escape-string-regexp": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
- "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/escodegen": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz",
- "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==",
- "dependencies": {
- "esprima": "^4.0.1",
- "estraverse": "^5.2.0",
- "esutils": "^2.0.2",
- "optionator": "^0.8.1"
- },
- "bin": {
- "escodegen": "bin/escodegen.js",
- "esgenerate": "bin/esgenerate.js"
- },
- "engines": {
- "node": ">=6.0"
- },
- "optionalDependencies": {
- "source-map": "~0.6.1"
- }
- },
- "node_modules/escodegen/node_modules/levn": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
- "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
- "dependencies": {
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/escodegen/node_modules/optionator": {
- "version": "0.8.3",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
- "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
- "dependencies": {
- "deep-is": "~0.1.3",
- "fast-levenshtein": "~2.0.6",
- "levn": "~0.3.0",
- "prelude-ls": "~1.1.2",
- "type-check": "~0.3.2",
- "word-wrap": "~1.2.3"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/escodegen/node_modules/prelude-ls": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
- "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/escodegen/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "optional": true,
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/escodegen/node_modules/type-check": {
- "version": "0.3.2",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
- "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
- "dependencies": {
- "prelude-ls": "~1.1.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/eslint": {
- "version": "8.11.0",
- "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.11.0.tgz",
- "integrity": "sha512-/KRpd9mIRg2raGxHRGwW9ZywYNAClZrHjdueHcrVDuO3a6bj83eoTirCCk0M0yPwOjWYKHwRVRid+xK4F/GHgA==",
- "dependencies": {
- "@eslint/eslintrc": "^1.2.1",
- "@humanwhocodes/config-array": "^0.9.2",
- "ajv": "^6.10.0",
- "chalk": "^4.0.0",
- "cross-spawn": "^7.0.2",
- "debug": "^4.3.2",
- "doctrine": "^3.0.0",
- "escape-string-regexp": "^4.0.0",
- "eslint-scope": "^7.1.1",
- "eslint-utils": "^3.0.0",
- "eslint-visitor-keys": "^3.3.0",
- "espree": "^9.3.1",
- "esquery": "^1.4.0",
- "esutils": "^2.0.2",
- "fast-deep-equal": "^3.1.3",
- "file-entry-cache": "^6.0.1",
- "functional-red-black-tree": "^1.0.1",
- "glob-parent": "^6.0.1",
- "globals": "^13.6.0",
- "ignore": "^5.2.0",
- "import-fresh": "^3.0.0",
- "imurmurhash": "^0.1.4",
- "is-glob": "^4.0.0",
- "js-yaml": "^4.1.0",
- "json-stable-stringify-without-jsonify": "^1.0.1",
- "levn": "^0.4.1",
- "lodash.merge": "^4.6.2",
- "minimatch": "^3.0.4",
- "natural-compare": "^1.4.0",
- "optionator": "^0.9.1",
- "regexpp": "^3.2.0",
- "strip-ansi": "^6.0.1",
- "strip-json-comments": "^3.1.0",
- "text-table": "^0.2.0",
- "v8-compile-cache": "^2.0.3"
- },
- "bin": {
- "eslint": "bin/eslint.js"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "funding": {
- "url": "https://opencollective.com/eslint"
- }
- },
- "node_modules/eslint-config-react-app": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/eslint-config-react-app/-/eslint-config-react-app-7.0.0.tgz",
- "integrity": "sha512-xyymoxtIt1EOsSaGag+/jmcywRuieQoA2JbPCjnw9HukFj9/97aGPoZVFioaotzk1K5Qt9sHO5EutZbkrAXS0g==",
- "dependencies": {
- "@babel/core": "^7.16.0",
- "@babel/eslint-parser": "^7.16.3",
- "@rushstack/eslint-patch": "^1.1.0",
- "@typescript-eslint/eslint-plugin": "^5.5.0",
- "@typescript-eslint/parser": "^5.5.0",
- "babel-preset-react-app": "^10.0.1",
- "confusing-browser-globals": "^1.0.11",
- "eslint-plugin-flowtype": "^8.0.3",
- "eslint-plugin-import": "^2.25.3",
- "eslint-plugin-jest": "^25.3.0",
- "eslint-plugin-jsx-a11y": "^6.5.1",
- "eslint-plugin-react": "^7.27.1",
- "eslint-plugin-react-hooks": "^4.3.0",
- "eslint-plugin-testing-library": "^5.0.1"
- },
- "engines": {
- "node": ">=14.0.0"
- },
- "peerDependencies": {
- "eslint": "^8.0.0"
- }
- },
- "node_modules/eslint-import-resolver-node": {
- "version": "0.3.6",
- "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz",
- "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==",
- "dependencies": {
- "debug": "^3.2.7",
- "resolve": "^1.20.0"
- }
- },
- "node_modules/eslint-import-resolver-node/node_modules/debug": {
- "version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
- "dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/eslint-module-utils": {
- "version": "2.7.3",
- "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz",
- "integrity": "sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ==",
- "dependencies": {
- "debug": "^3.2.7",
- "find-up": "^2.1.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/eslint-module-utils/node_modules/debug": {
- "version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
- "dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/eslint-module-utils/node_modules/find-up": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
- "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
- "dependencies": {
- "locate-path": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/eslint-module-utils/node_modules/locate-path": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
- "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
- "dependencies": {
- "p-locate": "^2.0.0",
- "path-exists": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/eslint-module-utils/node_modules/p-limit": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
- "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
- "dependencies": {
- "p-try": "^1.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/eslint-module-utils/node_modules/p-locate": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
- "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
- "dependencies": {
- "p-limit": "^1.1.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/eslint-module-utils/node_modules/p-try": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
- "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/eslint-module-utils/node_modules/path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/eslint-plugin-flowtype": {
- "version": "8.0.3",
- "resolved": "https://registry.npmjs.org/eslint-plugin-flowtype/-/eslint-plugin-flowtype-8.0.3.tgz",
- "integrity": "sha512-dX8l6qUL6O+fYPtpNRideCFSpmWOUVx5QcaGLVqe/vlDiBSe4vYljDWDETwnyFzpl7By/WVIu6rcrniCgH9BqQ==",
- "dependencies": {
- "lodash": "^4.17.21",
- "string-natural-compare": "^3.0.1"
- },
- "engines": {
- "node": ">=12.0.0"
- },
- "peerDependencies": {
- "@babel/plugin-syntax-flow": "^7.14.5",
- "@babel/plugin-transform-react-jsx": "^7.14.9",
- "eslint": "^8.1.0"
- }
- },
- "node_modules/eslint-plugin-import": {
- "version": "2.25.4",
- "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz",
- "integrity": "sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA==",
- "dependencies": {
- "array-includes": "^3.1.4",
- "array.prototype.flat": "^1.2.5",
- "debug": "^2.6.9",
- "doctrine": "^2.1.0",
- "eslint-import-resolver-node": "^0.3.6",
- "eslint-module-utils": "^2.7.2",
- "has": "^1.0.3",
- "is-core-module": "^2.8.0",
- "is-glob": "^4.0.3",
- "minimatch": "^3.0.4",
- "object.values": "^1.1.5",
- "resolve": "^1.20.0",
- "tsconfig-paths": "^3.12.0"
- },
- "engines": {
- "node": ">=4"
- },
- "peerDependencies": {
- "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"
- }
- },
- "node_modules/eslint-plugin-import/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/eslint-plugin-import/node_modules/doctrine": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
- "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
- "dependencies": {
- "esutils": "^2.0.2"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/eslint-plugin-import/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "node_modules/eslint-plugin-jest": {
- "version": "25.7.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-25.7.0.tgz",
- "integrity": "sha512-PWLUEXeeF7C9QGKqvdSbzLOiLTx+bno7/HC9eefePfEb257QFHg7ye3dh80AZVkaa/RQsBB1Q/ORQvg2X7F0NQ==",
- "dependencies": {
- "@typescript-eslint/experimental-utils": "^5.0.0"
- },
- "engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
- },
- "peerDependencies": {
- "@typescript-eslint/eslint-plugin": "^4.0.0 || ^5.0.0",
- "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
- },
- "peerDependenciesMeta": {
- "@typescript-eslint/eslint-plugin": {
- "optional": true
- },
- "jest": {
- "optional": true
- }
- }
- },
- "node_modules/eslint-plugin-jsx-a11y": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.5.1.tgz",
- "integrity": "sha512-sVCFKX9fllURnXT2JwLN5Qgo24Ug5NF6dxhkmxsMEUZhXRcGg+X3e1JbJ84YePQKBl5E0ZjAH5Q4rkdcGY99+g==",
- "dependencies": {
- "@babel/runtime": "^7.16.3",
- "aria-query": "^4.2.2",
- "array-includes": "^3.1.4",
- "ast-types-flow": "^0.0.7",
- "axe-core": "^4.3.5",
- "axobject-query": "^2.2.0",
- "damerau-levenshtein": "^1.0.7",
- "emoji-regex": "^9.2.2",
- "has": "^1.0.3",
- "jsx-ast-utils": "^3.2.1",
- "language-tags": "^1.0.5",
- "minimatch": "^3.0.4"
- },
- "engines": {
- "node": ">=4.0"
- },
- "peerDependencies": {
- "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8"
- }
- },
- "node_modules/eslint-plugin-react": {
- "version": "7.29.4",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.29.4.tgz",
- "integrity": "sha512-CVCXajliVh509PcZYRFyu/BoUEz452+jtQJq2b3Bae4v3xBUWPLCmtmBM+ZinG4MzwmxJgJ2M5rMqhqLVn7MtQ==",
- "dependencies": {
- "array-includes": "^3.1.4",
- "array.prototype.flatmap": "^1.2.5",
- "doctrine": "^2.1.0",
- "estraverse": "^5.3.0",
- "jsx-ast-utils": "^2.4.1 || ^3.0.0",
- "minimatch": "^3.1.2",
- "object.entries": "^1.1.5",
- "object.fromentries": "^2.0.5",
- "object.hasown": "^1.1.0",
- "object.values": "^1.1.5",
- "prop-types": "^15.8.1",
- "resolve": "^2.0.0-next.3",
- "semver": "^6.3.0",
- "string.prototype.matchall": "^4.0.6"
- },
- "engines": {
- "node": ">=4"
- },
- "peerDependencies": {
- "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8"
- }
- },
- "node_modules/eslint-plugin-react-hooks": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz",
- "integrity": "sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==",
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"
- }
- },
- "node_modules/eslint-plugin-react/node_modules/doctrine": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
- "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
- "dependencies": {
- "esutils": "^2.0.2"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/eslint-plugin-react/node_modules/resolve": {
- "version": "2.0.0-next.3",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-2.0.0-next.3.tgz",
- "integrity": "sha512-W8LucSynKUIDu9ylraa7ueVZ7hc0uAgJBxVsQSKOXOyle8a93qXhcz+XAXZ8bIq2d6i4Ehddn6Evt+0/UwKk6Q==",
- "dependencies": {
- "is-core-module": "^2.2.0",
- "path-parse": "^1.0.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/eslint-plugin-react/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/eslint-plugin-testing-library": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/eslint-plugin-testing-library/-/eslint-plugin-testing-library-5.1.0.tgz",
- "integrity": "sha512-YSNzasJUbyhOTe14ZPygeOBvcPvcaNkwHwrj4vdf+uirr2D32JTDaKi6CP5Os2aWtOcvt4uBSPXp9h5xGoqvWQ==",
- "dependencies": {
- "@typescript-eslint/utils": "^5.13.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0",
- "npm": ">=6"
- },
- "peerDependencies": {
- "eslint": "^7.5.0 || ^8.0.0"
- }
- },
- "node_modules/eslint-scope": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz",
- "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==",
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
- },
- "node_modules/eslint-utils": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
- "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
- "dependencies": {
- "eslint-visitor-keys": "^2.0.0"
- },
- "engines": {
- "node": "^10.0.0 || ^12.0.0 || >= 14.0.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- },
- "peerDependencies": {
- "eslint": ">=5"
- }
- },
- "node_modules/eslint-utils/node_modules/eslint-visitor-keys": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
- "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/eslint-visitor-keys": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
- "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
- },
- "node_modules/eslint-webpack-plugin": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-3.1.1.tgz",
- "integrity": "sha512-xSucskTN9tOkfW7so4EaiFIkulWLXwCB/15H917lR6pTv0Zot6/fetFucmENRb7J5whVSFKIvwnrnsa78SG2yg==",
- "dependencies": {
- "@types/eslint": "^7.28.2",
- "jest-worker": "^27.3.1",
- "micromatch": "^4.0.4",
- "normalize-path": "^3.0.0",
- "schema-utils": "^3.1.1"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "eslint": "^7.0.0 || ^8.0.0",
- "webpack": "^5.0.0"
- }
- },
- "node_modules/eslint/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/eslint/node_modules/argparse": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",
- "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q=="
- },
- "node_modules/eslint/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/eslint/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/eslint/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/eslint/node_modules/escape-string-regexp": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/globals": {
- "version": "13.13.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
- "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
- "dependencies": {
- "type-fest": "^0.20.2"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/eslint/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/js-yaml": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
- "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==",
- "dependencies": {
- "argparse": "^2.0.1"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/eslint/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/eslint/node_modules/type-fest": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
- "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/espree": {
- "version": "9.3.1",
- "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz",
- "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==",
- "dependencies": {
- "acorn": "^8.7.0",
- "acorn-jsx": "^5.3.1",
- "eslint-visitor-keys": "^3.3.0"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- }
- },
- "node_modules/esprima": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
- "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
- "bin": {
- "esparse": "bin/esparse.js",
- "esvalidate": "bin/esvalidate.js"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/esquery": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
- "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
- "dependencies": {
- "estraverse": "^5.1.0"
- },
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/esrecurse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
- "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
- "dependencies": {
- "estraverse": "^5.2.0"
- },
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/estraverse": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
- "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/estree-walker": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz",
- "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg=="
- },
- "node_modules/esutils": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
- "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/etag": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
- "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/eventemitter3": {
- "version": "4.0.7",
- "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
- "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw=="
- },
- "node_modules/events": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz",
- "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
- "engines": {
- "node": ">=0.8.x"
- }
- },
- "node_modules/execa": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz",
- "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==",
- "dependencies": {
- "cross-spawn": "^7.0.3",
- "get-stream": "^6.0.0",
- "human-signals": "^2.1.0",
- "is-stream": "^2.0.0",
- "merge-stream": "^2.0.0",
- "npm-run-path": "^4.0.1",
- "onetime": "^5.1.2",
- "signal-exit": "^3.0.3",
- "strip-final-newline": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sindresorhus/execa?sponsor=1"
- }
- },
- "node_modules/exit": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz",
- "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/expect": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz",
- "integrity": "sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "jest-get-type": "^27.5.1",
- "jest-matcher-utils": "^27.5.1",
- "jest-message-util": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/express": {
- "version": "4.17.3",
- "resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz",
- "integrity": "sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==",
- "dependencies": {
- "accepts": "~1.3.8",
- "array-flatten": "1.1.1",
- "body-parser": "1.19.2",
- "content-disposition": "0.5.4",
- "content-type": "~1.0.4",
- "cookie": "0.4.2",
- "cookie-signature": "1.0.6",
- "debug": "2.6.9",
- "depd": "~1.1.2",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "finalhandler": "~1.1.2",
- "fresh": "0.5.2",
- "merge-descriptors": "1.0.1",
- "methods": "~1.1.2",
- "on-finished": "~2.3.0",
- "parseurl": "~1.3.3",
- "path-to-regexp": "0.1.7",
- "proxy-addr": "~2.0.7",
- "qs": "6.9.7",
- "range-parser": "~1.2.1",
- "safe-buffer": "5.2.1",
- "send": "0.17.2",
- "serve-static": "1.14.2",
- "setprototypeof": "1.2.0",
- "statuses": "~1.5.0",
- "type-is": "~1.6.18",
- "utils-merge": "1.0.1",
- "vary": "~1.1.2"
- },
- "engines": {
- "node": ">= 0.10.0"
- }
- },
- "node_modules/express/node_modules/array-flatten": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
- "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
- },
- "node_modules/express/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/express/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "node_modules/express/node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/fast-deep-equal": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
- "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="
- },
- "node_modules/fast-glob": {
- "version": "3.2.11",
- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz",
- "integrity": "sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew==",
- "dependencies": {
- "@nodelib/fs.stat": "^2.0.2",
- "@nodelib/fs.walk": "^1.2.3",
- "glob-parent": "^5.1.2",
- "merge2": "^1.3.0",
- "micromatch": "^4.0.4"
- },
- "engines": {
- "node": ">=8.6.0"
- }
- },
- "node_modules/fast-glob/node_modules/glob-parent": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
- "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
- "dependencies": {
- "is-glob": "^4.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/fast-json-stable-stringify": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
- "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
- },
- "node_modules/fast-levenshtein": {
- "version": "2.0.6",
- "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
- "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc="
- },
- "node_modules/fastq": {
- "version": "1.13.0",
- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz",
- "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==",
- "dependencies": {
- "reusify": "^1.0.4"
- }
- },
- "node_modules/faye-websocket": {
- "version": "0.11.4",
- "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz",
- "integrity": "sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g==",
- "dependencies": {
- "websocket-driver": ">=0.5.1"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/fb-watchman": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz",
- "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==",
- "dependencies": {
- "bser": "2.1.1"
- }
- },
- "node_modules/file-entry-cache": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
- "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
- "dependencies": {
- "flat-cache": "^3.0.4"
- },
- "engines": {
- "node": "^10.12.0 || >=12.0.0"
- }
- },
- "node_modules/file-loader": {
- "version": "6.2.0",
- "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz",
- "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==",
- "dependencies": {
- "loader-utils": "^2.0.0",
- "schema-utils": "^3.0.0"
- },
- "engines": {
- "node": ">= 10.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^4.0.0 || ^5.0.0"
- }
- },
- "node_modules/filelist": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.2.tgz",
- "integrity": "sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==",
- "dependencies": {
- "minimatch": "^3.0.4"
- }
- },
- "node_modules/filesize": {
- "version": "8.0.7",
- "resolved": "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz",
- "integrity": "sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ==",
- "engines": {
- "node": ">= 0.4.0"
- }
- },
- "node_modules/fill-range": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
- "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
- "dependencies": {
- "to-regex-range": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/finalhandler": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
- "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
- "dependencies": {
- "debug": "2.6.9",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "on-finished": "~2.3.0",
- "parseurl": "~1.3.3",
- "statuses": "~1.5.0",
- "unpipe": "~1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/finalhandler/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/finalhandler/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "node_modules/find-cache-dir": {
- "version": "3.3.2",
- "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
- "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
- "dependencies": {
- "commondir": "^1.0.1",
- "make-dir": "^3.0.2",
- "pkg-dir": "^4.1.0"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/avajs/find-cache-dir?sponsor=1"
- }
- },
- "node_modules/find-up": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
- "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
- "dependencies": {
- "locate-path": "^6.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/flat-cache": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
- "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
- "dependencies": {
- "flatted": "^3.1.0",
- "rimraf": "^3.0.2"
- },
- "engines": {
- "node": "^10.12.0 || >=12.0.0"
- }
- },
- "node_modules/flatted": {
- "version": "3.2.5",
- "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz",
- "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg=="
- },
- "node_modules/follow-redirects": {
- "version": "1.14.9",
- "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz",
- "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==",
- "funding": [
- {
- "type": "individual",
- "url": "https://github.com/sponsors/RubenVerborgh"
- }
- ],
- "engines": {
- "node": ">=4.0"
- },
- "peerDependenciesMeta": {
- "debug": {
- "optional": true
- }
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin": {
- "version": "6.5.0",
- "resolved": "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.0.tgz",
- "integrity": "sha512-cS178Y+xxtIjEUorcHddKS7yCMlrDPV31mt47blKKRfMd70Kxu5xruAFE2o9sDY6wVC5deuob/u/alD04YYHnw==",
- "dependencies": {
- "@babel/code-frame": "^7.8.3",
- "@types/json-schema": "^7.0.5",
- "chalk": "^4.1.0",
- "chokidar": "^3.4.2",
- "cosmiconfig": "^6.0.0",
- "deepmerge": "^4.2.2",
- "fs-extra": "^9.0.0",
- "glob": "^7.1.6",
- "memfs": "^3.1.2",
- "minimatch": "^3.0.4",
- "schema-utils": "2.7.0",
- "semver": "^7.3.2",
- "tapable": "^1.0.0"
- },
- "engines": {
- "node": ">=10",
- "yarn": ">=1.0.0"
- },
- "peerDependencies": {
- "eslint": ">= 6",
- "typescript": ">= 2.7",
- "vue-template-compiler": "*",
- "webpack": ">= 4"
- },
- "peerDependenciesMeta": {
- "eslint": {
- "optional": true
- },
- "vue-template-compiler": {
- "optional": true
- }
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/cosmiconfig": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz",
- "integrity": "sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg==",
- "dependencies": {
- "@types/parse-json": "^4.0.0",
- "import-fresh": "^3.1.0",
- "parse-json": "^5.0.0",
- "path-type": "^4.0.0",
- "yaml": "^1.7.2"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/fs-extra": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
- "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
- "dependencies": {
- "at-least-node": "^1.0.0",
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/schema-utils": {
- "version": "2.7.0",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz",
- "integrity": "sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A==",
- "dependencies": {
- "@types/json-schema": "^7.0.4",
- "ajv": "^6.12.2",
- "ajv-keywords": "^3.4.1"
- },
- "engines": {
- "node": ">= 8.9.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/fork-ts-checker-webpack-plugin/node_modules/tapable": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz",
- "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/form-data": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz",
- "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==",
- "dependencies": {
- "asynckit": "^0.4.0",
- "combined-stream": "^1.0.8",
- "mime-types": "^2.1.12"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/forwarded": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
- "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fraction.js": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz",
- "integrity": "sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA==",
- "engines": {
- "node": "*"
- },
- "funding": {
- "type": "patreon",
- "url": "https://www.patreon.com/infusion"
- }
- },
- "node_modules/fresh": {
- "version": "0.5.2",
- "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
- "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/fs-extra": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.1.tgz",
- "integrity": "sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==",
- "dependencies": {
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/fs-monkey": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",
- "integrity": "sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q=="
- },
- "node_modules/fs.realpath": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
- "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
- },
- "node_modules/function-bind": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
- "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
- },
- "node_modules/functional-red-black-tree": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
- "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc="
- },
- "node_modules/gensync": {
- "version": "1.0.0-beta.2",
- "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",
- "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",
- "engines": {
- "node": ">=6.9.0"
- }
- },
- "node_modules/get-caller-file": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
- "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
- "engines": {
- "node": "6.* || 8.* || >= 10.*"
- }
- },
- "node_modules/get-intrinsic": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
- "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
- "dependencies": {
- "function-bind": "^1.1.1",
- "has": "^1.0.3",
- "has-symbols": "^1.0.1"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/get-own-enumerable-property-symbols": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz",
- "integrity": "sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g=="
- },
- "node_modules/get-package-type": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz",
- "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==",
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/get-stream": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz",
- "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/get-symbol-description": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
- "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "get-intrinsic": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/glob": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz",
- "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==",
- "dependencies": {
- "fs.realpath": "^1.0.0",
- "inflight": "^1.0.4",
- "inherits": "2",
- "minimatch": "^3.0.4",
- "once": "^1.3.0",
- "path-is-absolute": "^1.0.0"
- },
- "engines": {
- "node": "*"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/glob-parent": {
- "version": "6.0.2",
- "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
- "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
- "dependencies": {
- "is-glob": "^4.0.3"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/glob-to-regexp": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz",
- "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw=="
- },
- "node_modules/global-modules": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz",
- "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==",
- "dependencies": {
- "global-prefix": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/global-prefix": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz",
- "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==",
- "dependencies": {
- "ini": "^1.3.5",
- "kind-of": "^6.0.2",
- "which": "^1.3.1"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/global-prefix/node_modules/which": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
- "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "which": "bin/which"
- }
- },
- "node_modules/globals": {
- "version": "11.12.0",
- "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
- "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/globby": {
- "version": "11.1.0",
- "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz",
- "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==",
- "dependencies": {
- "array-union": "^2.1.0",
- "dir-glob": "^3.0.1",
- "fast-glob": "^3.2.9",
- "ignore": "^5.2.0",
- "merge2": "^1.4.1",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/graceful-fs": {
- "version": "4.2.9",
- "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz",
- "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ=="
- },
- "node_modules/gzip-size": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz",
- "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==",
- "dependencies": {
- "duplexer": "^0.1.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/handle-thing": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz",
- "integrity": "sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg=="
- },
- "node_modules/harmony-reflect": {
- "version": "1.6.2",
- "resolved": "https://registry.npmjs.org/harmony-reflect/-/harmony-reflect-1.6.2.tgz",
- "integrity": "sha512-HIp/n38R9kQjDEziXyDTuW3vvoxxyxjxFzXLrBr18uB47GnSt+G9D29fqrpM5ZkspMcPICud3XsBJQ4Y2URg8g=="
- },
- "node_modules/has": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
- "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
- "dependencies": {
- "function-bind": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4.0"
- }
- },
- "node_modules/has-bigints": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
- "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-flag": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
- "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/has-symbols": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
- "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/has-tostringtag": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
- "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
- "dependencies": {
- "has-symbols": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/he": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
- "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
- "bin": {
- "he": "bin/he"
- }
- },
- "node_modules/hoopy": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/hoopy/-/hoopy-0.1.4.tgz",
- "integrity": "sha512-HRcs+2mr52W0K+x8RzcLzuPPmVIKMSv97RGHy0Ea9y/mpcaK+xTrjICA04KAHi4GRzxliNqNJEFYWHghy3rSfQ==",
- "engines": {
- "node": ">= 6.0.0"
- }
- },
- "node_modules/hpack.js": {
- "version": "2.1.6",
- "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz",
- "integrity": "sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI=",
- "dependencies": {
- "inherits": "^2.0.1",
- "obuf": "^1.0.0",
- "readable-stream": "^2.0.1",
- "wbuf": "^1.1.0"
- }
- },
- "node_modules/hpack.js/node_modules/readable-stream": {
- "version": "2.3.7",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
- "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
- "dependencies": {
- "core-util-is": "~1.0.0",
- "inherits": "~2.0.3",
- "isarray": "~1.0.0",
- "process-nextick-args": "~2.0.0",
- "safe-buffer": "~5.1.1",
- "string_decoder": "~1.1.1",
- "util-deprecate": "~1.0.1"
- }
- },
- "node_modules/hpack.js/node_modules/string_decoder": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
- "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
- "dependencies": {
- "safe-buffer": "~5.1.0"
- }
- },
- "node_modules/html-encoding-sniffer": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz",
- "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==",
- "dependencies": {
- "whatwg-encoding": "^1.0.5"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/html-entities": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz",
- "integrity": "sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ=="
- },
- "node_modules/html-escaper": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
- "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg=="
- },
- "node_modules/html-minifier-terser": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz",
- "integrity": "sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw==",
- "dependencies": {
- "camel-case": "^4.1.2",
- "clean-css": "^5.2.2",
- "commander": "^8.3.0",
- "he": "^1.2.0",
- "param-case": "^3.0.4",
- "relateurl": "^0.2.7",
- "terser": "^5.10.0"
- },
- "bin": {
- "html-minifier-terser": "cli.js"
- },
- "engines": {
- "node": ">=12"
- }
- },
- "node_modules/html-webpack-plugin": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz",
- "integrity": "sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw==",
- "dependencies": {
- "@types/html-minifier-terser": "^6.0.0",
- "html-minifier-terser": "^6.0.2",
- "lodash": "^4.17.21",
- "pretty-error": "^4.0.0",
- "tapable": "^2.0.0"
- },
- "engines": {
- "node": ">=10.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/html-webpack-plugin"
- },
- "peerDependencies": {
- "webpack": "^5.20.0"
- }
- },
- "node_modules/htmlparser2": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz",
- "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==",
- "funding": [
- "https://github.com/fb55/htmlparser2?sponsor=1",
- {
- "type": "github",
- "url": "https://github.com/sponsors/fb55"
- }
- ],
- "dependencies": {
- "domelementtype": "^2.0.1",
- "domhandler": "^4.0.0",
- "domutils": "^2.5.2",
- "entities": "^2.0.0"
- }
- },
- "node_modules/http-deceiver": {
- "version": "1.2.7",
- "resolved": "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz",
- "integrity": "sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc="
- },
- "node_modules/http-errors": {
- "version": "1.8.1",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
- "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
- "dependencies": {
- "depd": "~1.1.2",
- "inherits": "2.0.4",
- "setprototypeof": "1.2.0",
- "statuses": ">= 1.5.0 < 2",
- "toidentifier": "1.0.1"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/http-parser-js": {
- "version": "0.5.6",
- "resolved": "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.6.tgz",
- "integrity": "sha512-vDlkRPDJn93swjcjqMSaGSPABbIarsr1TLAui/gLDXzV5VsJNdXNzMYDyNBLQkjWQCJ1uizu8T2oDMhmGt0PRA=="
- },
- "node_modules/http-proxy": {
- "version": "1.18.1",
- "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
- "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
- "dependencies": {
- "eventemitter3": "^4.0.0",
- "follow-redirects": "^1.0.0",
- "requires-port": "^1.0.0"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/http-proxy-agent": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz",
- "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==",
- "dependencies": {
- "@tootallnate/once": "1",
- "agent-base": "6",
- "debug": "4"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/http-proxy-middleware": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.4.tgz",
- "integrity": "sha512-m/4FxX17SUvz4lJ5WPXOHDUuCwIqXLfLHs1s0uZ3oYjhoXlx9csYxaOa0ElDEJ+h8Q4iJ1s+lTMbiCa4EXIJqg==",
- "dependencies": {
- "@types/http-proxy": "^1.17.8",
- "http-proxy": "^1.18.1",
- "is-glob": "^4.0.1",
- "is-plain-obj": "^3.0.0",
- "micromatch": "^4.0.2"
- },
- "engines": {
- "node": ">=12.0.0"
- },
- "peerDependencies": {
- "@types/express": "^4.17.13"
- },
- "peerDependenciesMeta": {
- "@types/express": {
- "optional": true
- }
- }
- },
- "node_modules/https-proxy-agent": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",
- "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",
- "dependencies": {
- "agent-base": "6",
- "debug": "4"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/human-signals": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
- "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
- "engines": {
- "node": ">=10.17.0"
- }
- },
- "node_modules/iconv-lite": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3.0.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/icss-utils": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
- "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
- "engines": {
- "node": "^10 || ^12 || >= 14"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/idb": {
- "version": "6.1.5",
- "resolved": "https://registry.npmjs.org/idb/-/idb-6.1.5.tgz",
- "integrity": "sha512-IJtugpKkiVXQn5Y+LteyBCNk1N8xpGV3wWZk9EVtZWH8DYkjBn0bX1XnGP9RkyZF0sAcywa6unHqSWKe7q4LGw=="
- },
- "node_modules/identity-obj-proxy": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz",
- "integrity": "sha1-lNK9qWCERT7zb7xarsN+D3nx/BQ=",
- "dependencies": {
- "harmony-reflect": "^1.4.6"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/ignore": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
- "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/immer": {
- "version": "9.0.12",
- "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz",
- "integrity": "sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA==",
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/immer"
- }
- },
- "node_modules/import-fresh": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
- "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
- "dependencies": {
- "parent-module": "^1.0.0",
- "resolve-from": "^4.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/import-fresh/node_modules/resolve-from": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
- "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/import-local": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz",
- "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==",
- "dependencies": {
- "pkg-dir": "^4.2.0",
- "resolve-cwd": "^3.0.0"
- },
- "bin": {
- "import-local-fixture": "fixtures/cli.js"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/imurmurhash": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
- "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
- "engines": {
- "node": ">=0.8.19"
- }
- },
- "node_modules/indent-string": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz",
- "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/inflight": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
- "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
- "dependencies": {
- "once": "^1.3.0",
- "wrappy": "1"
- }
- },
- "node_modules/inherits": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
- "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
- },
- "node_modules/ini": {
- "version": "1.3.8",
- "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
- "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
- },
- "node_modules/internal-slot": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz",
- "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==",
- "dependencies": {
- "get-intrinsic": "^1.1.0",
- "has": "^1.0.3",
- "side-channel": "^1.0.4"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/ip": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz",
- "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo="
- },
- "node_modules/ipaddr.js": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz",
- "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==",
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/is-arguments": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz",
- "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "has-tostringtag": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-arrayish": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
- "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
- },
- "node_modules/is-bigint": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
- "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
- "dependencies": {
- "has-bigints": "^1.0.1"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-binary-path": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
- "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
- "dependencies": {
- "binary-extensions": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-boolean-object": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
- "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "has-tostringtag": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-callable": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz",
- "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-core-module": {
- "version": "2.8.1",
- "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz",
- "integrity": "sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA==",
- "dependencies": {
- "has": "^1.0.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-date-object": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
- "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
- "dependencies": {
- "has-tostringtag": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-docker": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz",
- "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==",
- "bin": {
- "is-docker": "cli.js"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-extglob": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
- "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-fullwidth-code-point": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
- "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-generator-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz",
- "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/is-glob": {
- "version": "4.0.3",
- "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
- "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
- "dependencies": {
- "is-extglob": "^2.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-module": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
- "integrity": "sha1-Mlj7afeMFNW4FdZkM2tM/7ZEFZE="
- },
- "node_modules/is-negative-zero": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",
- "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-number": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
- "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
- "engines": {
- "node": ">=0.12.0"
- }
- },
- "node_modules/is-number-object": {
- "version": "1.0.6",
- "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz",
- "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==",
- "dependencies": {
- "has-tostringtag": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-obj": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
- "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-path-cwd": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz",
- "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/is-path-inside": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
- "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/is-plain-obj": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz",
- "integrity": "sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-potential-custom-element-name": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
- "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ=="
- },
- "node_modules/is-regex": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
- "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "has-tostringtag": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-regexp": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz",
- "integrity": "sha1-/S2INUXEa6xaYz57mgnof6LLUGk=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/is-root": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz",
- "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/is-shared-array-buffer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz",
- "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-stream": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
- "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/is-string": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
- "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
- "dependencies": {
- "has-tostringtag": "^1.0.0"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-symbol": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
- "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
- "dependencies": {
- "has-symbols": "^1.0.2"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-typedarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
- "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo="
- },
- "node_modules/is-weakref": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
- "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
- "dependencies": {
- "call-bind": "^1.0.2"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/is-wsl": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz",
- "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==",
- "dependencies": {
- "is-docker": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/isarray": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
- "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
- },
- "node_modules/isexe": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
- "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
- },
- "node_modules/istanbul-lib-coverage": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz",
- "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/istanbul-lib-instrument": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.1.0.tgz",
- "integrity": "sha512-czwUz525rkOFDJxfKK6mYfIs9zBKILyrZQxjz3ABhjQXhbhFsSbo1HW/BFcsDnfJYJWA6thRR5/TUY2qs5W99Q==",
- "dependencies": {
- "@babel/core": "^7.12.3",
- "@babel/parser": "^7.14.7",
- "@istanbuljs/schema": "^0.1.2",
- "istanbul-lib-coverage": "^3.2.0",
- "semver": "^6.3.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/istanbul-lib-instrument/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/istanbul-lib-report": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz",
- "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==",
- "dependencies": {
- "istanbul-lib-coverage": "^3.0.0",
- "make-dir": "^3.0.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/istanbul-lib-report/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/istanbul-lib-report/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/istanbul-lib-source-maps": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz",
- "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==",
- "dependencies": {
- "debug": "^4.1.1",
- "istanbul-lib-coverage": "^3.0.0",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/istanbul-lib-source-maps/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/istanbul-reports": {
- "version": "3.1.4",
- "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.4.tgz",
- "integrity": "sha512-r1/DshN4KSE7xWEknZLLLLDn5CJybV3nw01VTkp6D5jzLuELlcbudfj/eSQFvrKsJuTVCGnePO7ho82Nw9zzfw==",
- "dependencies": {
- "html-escaper": "^2.0.0",
- "istanbul-lib-report": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jake": {
- "version": "10.8.4",
- "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.4.tgz",
- "integrity": "sha512-MtWeTkl1qGsWUtbl/Jsca/8xSoK3x0UmS82sNbjqxxG/de/M/3b1DntdjHgPMC50enlTNwXOCRqPXLLt5cCfZA==",
- "dependencies": {
- "async": "0.9.x",
- "chalk": "^4.0.2",
- "filelist": "^1.0.1",
- "minimatch": "^3.0.4"
- },
- "bin": {
- "jake": "bin/cli.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/jake/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jake/node_modules/async": {
- "version": "0.9.2",
- "resolved": "https://registry.npmjs.org/async/-/async-0.9.2.tgz",
- "integrity": "sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0="
- },
- "node_modules/jake/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jake/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jake/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jake/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jake/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz",
- "integrity": "sha512-Yn0mADZB89zTtjkPJEXwrac3LHudkQMR+Paqa8uxJHCBr9agxztUifWCyiYrjhMPBoUVBjyny0I7XH6ozDr7QQ==",
- "dependencies": {
- "@jest/core": "^27.5.1",
- "import-local": "^3.0.2",
- "jest-cli": "^27.5.1"
- },
- "bin": {
- "jest": "bin/jest.js"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- },
- "peerDependencies": {
- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
- },
- "peerDependenciesMeta": {
- "node-notifier": {
- "optional": true
- }
- }
- },
- "node_modules/jest-changed-files": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.5.1.tgz",
- "integrity": "sha512-buBLMiByfWGCoMsLLzGUUSpAmIAGnbR2KJoMN10ziLhOLvP4e0SlypHnAel8iqQXTrcbmfEY9sSqae5sgUsTvw==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "execa": "^5.0.0",
- "throat": "^6.0.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-circus": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.5.1.tgz",
- "integrity": "sha512-D95R7x5UtlMA5iBYsOHFFbMD/GVA4R/Kdq15f7xYWUfWHBto9NYRsOvnSauTgdF+ogCpJ4tyKOXhUifxS65gdw==",
- "dependencies": {
- "@jest/environment": "^27.5.1",
- "@jest/test-result": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "co": "^4.6.0",
- "dedent": "^0.7.0",
- "expect": "^27.5.1",
- "is-generator-fn": "^2.0.0",
- "jest-each": "^27.5.1",
- "jest-matcher-utils": "^27.5.1",
- "jest-message-util": "^27.5.1",
- "jest-runtime": "^27.5.1",
- "jest-snapshot": "^27.5.1",
- "jest-util": "^27.5.1",
- "pretty-format": "^27.5.1",
- "slash": "^3.0.0",
- "stack-utils": "^2.0.3",
- "throat": "^6.0.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-circus/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-circus/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-circus/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-circus/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-circus/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-circus/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-cli": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.5.1.tgz",
- "integrity": "sha512-Hc6HOOwYq4/74/c62dEE3r5elx8wjYqxY0r0G/nFrLDPMFRu6RA/u8qINOIkvhxG7mMQ5EJsOGfRpI8L6eFUVw==",
- "dependencies": {
- "@jest/core": "^27.5.1",
- "@jest/test-result": "^27.5.1",
- "@jest/types": "^27.5.1",
- "chalk": "^4.0.0",
- "exit": "^0.1.2",
- "graceful-fs": "^4.2.9",
- "import-local": "^3.0.2",
- "jest-config": "^27.5.1",
- "jest-util": "^27.5.1",
- "jest-validate": "^27.5.1",
- "prompts": "^2.0.1",
- "yargs": "^16.2.0"
- },
- "bin": {
- "jest": "bin/jest.js"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- },
- "peerDependencies": {
- "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
- },
- "peerDependenciesMeta": {
- "node-notifier": {
- "optional": true
- }
- }
- },
- "node_modules/jest-cli/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-cli/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-cli/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-cli/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-cli/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-cli/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-config": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.5.1.tgz",
- "integrity": "sha512-5sAsjm6tGdsVbW9ahcChPAFCk4IlkQUknH5AvKjuLTSlcO/wCZKyFdn7Rg0EkC+OGgWODEy2hDpWB1PgzH0JNA==",
- "dependencies": {
- "@babel/core": "^7.8.0",
- "@jest/test-sequencer": "^27.5.1",
- "@jest/types": "^27.5.1",
- "babel-jest": "^27.5.1",
- "chalk": "^4.0.0",
- "ci-info": "^3.2.0",
- "deepmerge": "^4.2.2",
- "glob": "^7.1.1",
- "graceful-fs": "^4.2.9",
- "jest-circus": "^27.5.1",
- "jest-environment-jsdom": "^27.5.1",
- "jest-environment-node": "^27.5.1",
- "jest-get-type": "^27.5.1",
- "jest-jasmine2": "^27.5.1",
- "jest-regex-util": "^27.5.1",
- "jest-resolve": "^27.5.1",
- "jest-runner": "^27.5.1",
- "jest-util": "^27.5.1",
- "jest-validate": "^27.5.1",
- "micromatch": "^4.0.4",
- "parse-json": "^5.2.0",
- "pretty-format": "^27.5.1",
- "slash": "^3.0.0",
- "strip-json-comments": "^3.1.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- },
- "peerDependencies": {
- "ts-node": ">=9.0.0"
- },
- "peerDependenciesMeta": {
- "ts-node": {
- "optional": true
- }
- }
- },
- "node_modules/jest-config/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-config/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-config/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-config/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-config/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-config/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-diff": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.5.1.tgz",
- "integrity": "sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw==",
- "dependencies": {
- "chalk": "^4.0.0",
- "diff-sequences": "^27.5.1",
- "jest-get-type": "^27.5.1",
- "pretty-format": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-diff/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-diff/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-diff/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-diff/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-diff/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-diff/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-docblock": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.5.1.tgz",
- "integrity": "sha512-rl7hlABeTsRYxKiUfpHrQrG4e2obOiTQWfMEH3PxPjOtdsfLQO4ReWSZaQ7DETm4xu07rl4q/h4zcKXyU0/OzQ==",
- "dependencies": {
- "detect-newline": "^3.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-each": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.5.1.tgz",
- "integrity": "sha512-1Ff6p+FbhT/bXQnEouYy00bkNSY7OUpfIcmdl8vZ31A1UUaurOLPA8a8BbJOF2RDUElwJhmeaV7LnagI+5UwNQ==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "chalk": "^4.0.0",
- "jest-get-type": "^27.5.1",
- "jest-util": "^27.5.1",
- "pretty-format": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-each/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-each/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-each/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-each/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-each/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-each/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-environment-jsdom": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.5.1.tgz",
- "integrity": "sha512-TFBvkTC1Hnnnrka/fUb56atfDtJ9VMZ94JkjTbggl1PEpwrYtUBKMezB3inLmWqQsXYLcMwNoDQwoBTAvFfsfw==",
- "dependencies": {
- "@jest/environment": "^27.5.1",
- "@jest/fake-timers": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "jest-mock": "^27.5.1",
- "jest-util": "^27.5.1",
- "jsdom": "^16.6.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-environment-node": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.5.1.tgz",
- "integrity": "sha512-Jt4ZUnxdOsTGwSRAfKEnE6BcwsSPNOijjwifq5sDFSA2kesnXTvNqKHYgM0hDq3549Uf/KzdXNYn4wMZJPlFLw==",
- "dependencies": {
- "@jest/environment": "^27.5.1",
- "@jest/fake-timers": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "jest-mock": "^27.5.1",
- "jest-util": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-get-type": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.5.1.tgz",
- "integrity": "sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw==",
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-haste-map": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.5.1.tgz",
- "integrity": "sha512-7GgkZ4Fw4NFbMSDSpZwXeBiIbx+t/46nJ2QitkOjvwPYyZmqttu2TDSimMHP1EkPOi4xUZAN1doE5Vd25H4Jng==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "@types/graceful-fs": "^4.1.2",
- "@types/node": "*",
- "anymatch": "^3.0.3",
- "fb-watchman": "^2.0.0",
- "graceful-fs": "^4.2.9",
- "jest-regex-util": "^27.5.1",
- "jest-serializer": "^27.5.1",
- "jest-util": "^27.5.1",
- "jest-worker": "^27.5.1",
- "micromatch": "^4.0.4",
- "walker": "^1.0.7"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- },
- "optionalDependencies": {
- "fsevents": "^2.3.2"
- }
- },
- "node_modules/jest-jasmine2": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.5.1.tgz",
- "integrity": "sha512-jtq7VVyG8SqAorDpApwiJJImd0V2wv1xzdheGHRGyuT7gZm6gG47QEskOlzsN1PG/6WNaCo5pmwMHDf3AkG2pQ==",
- "dependencies": {
- "@jest/environment": "^27.5.1",
- "@jest/source-map": "^27.5.1",
- "@jest/test-result": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "co": "^4.6.0",
- "expect": "^27.5.1",
- "is-generator-fn": "^2.0.0",
- "jest-each": "^27.5.1",
- "jest-matcher-utils": "^27.5.1",
- "jest-message-util": "^27.5.1",
- "jest-runtime": "^27.5.1",
- "jest-snapshot": "^27.5.1",
- "jest-util": "^27.5.1",
- "pretty-format": "^27.5.1",
- "throat": "^6.0.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-jasmine2/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-jasmine2/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-jasmine2/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-jasmine2/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-jasmine2/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-jasmine2/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-leak-detector": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.5.1.tgz",
- "integrity": "sha512-POXfWAMvfU6WMUXftV4HolnJfnPOGEu10fscNCA76KBpRRhcMN2c8d3iT2pxQS3HLbA+5X4sOUPzYO2NUyIlHQ==",
- "dependencies": {
- "jest-get-type": "^27.5.1",
- "pretty-format": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-matcher-utils": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz",
- "integrity": "sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw==",
- "dependencies": {
- "chalk": "^4.0.0",
- "jest-diff": "^27.5.1",
- "jest-get-type": "^27.5.1",
- "pretty-format": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-matcher-utils/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-matcher-utils/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-matcher-utils/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-matcher-utils/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-matcher-utils/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-matcher-utils/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-message-util": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.5.1.tgz",
- "integrity": "sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g==",
- "dependencies": {
- "@babel/code-frame": "^7.12.13",
- "@jest/types": "^27.5.1",
- "@types/stack-utils": "^2.0.0",
- "chalk": "^4.0.0",
- "graceful-fs": "^4.2.9",
- "micromatch": "^4.0.4",
- "pretty-format": "^27.5.1",
- "slash": "^3.0.0",
- "stack-utils": "^2.0.3"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-message-util/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-message-util/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-message-util/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-message-util/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-message-util/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-message-util/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-mock": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.5.1.tgz",
- "integrity": "sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "@types/node": "*"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-pnp-resolver": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz",
- "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==",
- "engines": {
- "node": ">=6"
- },
- "peerDependencies": {
- "jest-resolve": "*"
- },
- "peerDependenciesMeta": {
- "jest-resolve": {
- "optional": true
- }
- }
- },
- "node_modules/jest-regex-util": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.5.1.tgz",
- "integrity": "sha512-4bfKq2zie+x16okqDXjXn9ql2B0dScQu+vcwe4TvFVhkVyuWLqpZrZtXxLLWoXYgn0E87I6r6GRYHF7wFZBUvg==",
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-resolve": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.5.1.tgz",
- "integrity": "sha512-FFDy8/9E6CV83IMbDpcjOhumAQPDyETnU2KZ1O98DwTnz8AOBsW/Xv3GySr1mOZdItLR+zDZ7I/UdTFbgSOVCw==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "chalk": "^4.0.0",
- "graceful-fs": "^4.2.9",
- "jest-haste-map": "^27.5.1",
- "jest-pnp-resolver": "^1.2.2",
- "jest-util": "^27.5.1",
- "jest-validate": "^27.5.1",
- "resolve": "^1.20.0",
- "resolve.exports": "^1.1.0",
- "slash": "^3.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-resolve-dependencies": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.5.1.tgz",
- "integrity": "sha512-QQOOdY4PE39iawDn5rzbIePNigfe5B9Z91GDD1ae/xNDlu9kaat8QQ5EKnNmVWPV54hUdxCVwwj6YMgR2O7IOg==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "jest-regex-util": "^27.5.1",
- "jest-snapshot": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-resolve/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-resolve/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-resolve/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-resolve/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-resolve/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-resolve/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-runner": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.5.1.tgz",
- "integrity": "sha512-g4NPsM4mFCOwFKXO4p/H/kWGdJp9V8kURY2lX8Me2drgXqG7rrZAx5kv+5H7wtt/cdFIjhqYx1HrlqWHaOvDaQ==",
- "dependencies": {
- "@jest/console": "^27.5.1",
- "@jest/environment": "^27.5.1",
- "@jest/test-result": "^27.5.1",
- "@jest/transform": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "emittery": "^0.8.1",
- "graceful-fs": "^4.2.9",
- "jest-docblock": "^27.5.1",
- "jest-environment-jsdom": "^27.5.1",
- "jest-environment-node": "^27.5.1",
- "jest-haste-map": "^27.5.1",
- "jest-leak-detector": "^27.5.1",
- "jest-message-util": "^27.5.1",
- "jest-resolve": "^27.5.1",
- "jest-runtime": "^27.5.1",
- "jest-util": "^27.5.1",
- "jest-worker": "^27.5.1",
- "source-map-support": "^0.5.6",
- "throat": "^6.0.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-runner/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-runner/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-runner/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-runner/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-runner/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-runner/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-runtime": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.5.1.tgz",
- "integrity": "sha512-o7gxw3Gf+H2IGt8fv0RiyE1+r83FJBRruoA+FXrlHw6xEyBsU8ugA6IPfTdVyA0w8HClpbK+DGJxH59UrNMx8A==",
- "dependencies": {
- "@jest/environment": "^27.5.1",
- "@jest/fake-timers": "^27.5.1",
- "@jest/globals": "^27.5.1",
- "@jest/source-map": "^27.5.1",
- "@jest/test-result": "^27.5.1",
- "@jest/transform": "^27.5.1",
- "@jest/types": "^27.5.1",
- "chalk": "^4.0.0",
- "cjs-module-lexer": "^1.0.0",
- "collect-v8-coverage": "^1.0.0",
- "execa": "^5.0.0",
- "glob": "^7.1.3",
- "graceful-fs": "^4.2.9",
- "jest-haste-map": "^27.5.1",
- "jest-message-util": "^27.5.1",
- "jest-mock": "^27.5.1",
- "jest-regex-util": "^27.5.1",
- "jest-resolve": "^27.5.1",
- "jest-snapshot": "^27.5.1",
- "jest-util": "^27.5.1",
- "slash": "^3.0.0",
- "strip-bom": "^4.0.0"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-runtime/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-runtime/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-runtime/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-runtime/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-runtime/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-runtime/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-serializer": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.5.1.tgz",
- "integrity": "sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==",
- "dependencies": {
- "@types/node": "*",
- "graceful-fs": "^4.2.9"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-snapshot": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.5.1.tgz",
- "integrity": "sha512-yYykXI5a0I31xX67mgeLw1DZ0bJB+gpq5IpSuCAoyDi0+BhgU/RIrL+RTzDmkNTchvDFWKP8lp+w/42Z3us5sA==",
- "dependencies": {
- "@babel/core": "^7.7.2",
- "@babel/generator": "^7.7.2",
- "@babel/plugin-syntax-typescript": "^7.7.2",
- "@babel/traverse": "^7.7.2",
- "@babel/types": "^7.0.0",
- "@jest/transform": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/babel__traverse": "^7.0.4",
- "@types/prettier": "^2.1.5",
- "babel-preset-current-node-syntax": "^1.0.0",
- "chalk": "^4.0.0",
- "expect": "^27.5.1",
- "graceful-fs": "^4.2.9",
- "jest-diff": "^27.5.1",
- "jest-get-type": "^27.5.1",
- "jest-haste-map": "^27.5.1",
- "jest-matcher-utils": "^27.5.1",
- "jest-message-util": "^27.5.1",
- "jest-util": "^27.5.1",
- "natural-compare": "^1.4.0",
- "pretty-format": "^27.5.1",
- "semver": "^7.3.2"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-snapshot/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-snapshot/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-snapshot/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-snapshot/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-snapshot/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-snapshot/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-util": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.5.1.tgz",
- "integrity": "sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "chalk": "^4.0.0",
- "ci-info": "^3.2.0",
- "graceful-fs": "^4.2.9",
- "picomatch": "^2.2.3"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-util/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-util/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-util/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-util/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-util/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-util/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-validate": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.5.1.tgz",
- "integrity": "sha512-thkNli0LYTmOI1tDB3FI1S1RTp/Bqyd9pTarJwL87OIBFuqEb5Apv5EaApEudYg4g86e3CT6kM0RowkhtEnCBQ==",
- "dependencies": {
- "@jest/types": "^27.5.1",
- "camelcase": "^6.2.0",
- "chalk": "^4.0.0",
- "jest-get-type": "^27.5.1",
- "leven": "^3.1.0",
- "pretty-format": "^27.5.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-validate/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-validate/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-validate/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-validate/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-validate/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-validate/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-watch-typeahead": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/jest-watch-typeahead/-/jest-watch-typeahead-1.0.0.tgz",
- "integrity": "sha512-jxoszalAb394WElmiJTFBMzie/RDCF+W7Q29n5LzOPtcoQoHWfdUtHFkbhgf5NwWe8uMOxvKb/g7ea7CshfkTw==",
- "dependencies": {
- "ansi-escapes": "^4.3.1",
- "chalk": "^4.0.0",
- "jest-regex-util": "^27.0.0",
- "jest-watcher": "^27.0.0",
- "slash": "^4.0.0",
- "string-length": "^5.0.1",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
- },
- "peerDependencies": {
- "jest": "^27.0.0"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/char-regex": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-2.0.1.tgz",
- "integrity": "sha512-oSvEeo6ZUD7NepqAat3RqoucZ5SeqLJgOvVIwkafu6IP3V0pO38s/ypdVUmDDK6qIIHNlYHJAKX9E7R7HoKElw==",
- "engines": {
- "node": ">=12.20"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-watch-typeahead/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/slash": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",
- "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/string-length": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/string-length/-/string-length-5.0.1.tgz",
- "integrity": "sha512-9Ep08KAMUn0OadnVaBuRdE2l615CQ508kr0XMadjClfYpdCyvrbFp6Taebo8yyxokQ4viUd/xPPUA4FGgUa0ow==",
- "dependencies": {
- "char-regex": "^2.0.0",
- "strip-ansi": "^7.0.1"
- },
- "engines": {
- "node": ">=12.20"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/jest-watch-typeahead/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-watcher": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.5.1.tgz",
- "integrity": "sha512-z676SuD6Z8o8qbmEGhoEUFOM1+jfEiL3DXHK/xgEiG2EyNYfFG60jluWcupY6dATjfEsKQuibReS1djInQnoVw==",
- "dependencies": {
- "@jest/test-result": "^27.5.1",
- "@jest/types": "^27.5.1",
- "@types/node": "*",
- "ansi-escapes": "^4.2.1",
- "chalk": "^4.0.0",
- "jest-util": "^27.5.1",
- "string-length": "^4.0.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/jest-watcher/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/jest-watcher/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/jest-watcher/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/jest-watcher/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/jest-watcher/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-watcher/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-worker": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz",
- "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==",
- "dependencies": {
- "@types/node": "*",
- "merge-stream": "^2.0.0",
- "supports-color": "^8.0.0"
- },
- "engines": {
- "node": ">= 10.13.0"
- }
- },
- "node_modules/jest-worker/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/jest-worker/node_modules/supports-color": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
- "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/supports-color?sponsor=1"
- }
- },
- "node_modules/js-tokens": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
- "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
- },
- "node_modules/js-yaml": {
- "version": "3.14.1",
- "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz",
- "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
- "dependencies": {
- "argparse": "^1.0.7",
- "esprima": "^4.0.0"
- },
- "bin": {
- "js-yaml": "bin/js-yaml.js"
- }
- },
- "node_modules/jsdom": {
- "version": "16.7.0",
- "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz",
- "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==",
- "dependencies": {
- "abab": "^2.0.5",
- "acorn": "^8.2.4",
- "acorn-globals": "^6.0.0",
- "cssom": "^0.4.4",
- "cssstyle": "^2.3.0",
- "data-urls": "^2.0.0",
- "decimal.js": "^10.2.1",
- "domexception": "^2.0.1",
- "escodegen": "^2.0.0",
- "form-data": "^3.0.0",
- "html-encoding-sniffer": "^2.0.1",
- "http-proxy-agent": "^4.0.1",
- "https-proxy-agent": "^5.0.0",
- "is-potential-custom-element-name": "^1.0.1",
- "nwsapi": "^2.2.0",
- "parse5": "6.0.1",
- "saxes": "^5.0.1",
- "symbol-tree": "^3.2.4",
- "tough-cookie": "^4.0.0",
- "w3c-hr-time": "^1.0.2",
- "w3c-xmlserializer": "^2.0.0",
- "webidl-conversions": "^6.1.0",
- "whatwg-encoding": "^1.0.5",
- "whatwg-mimetype": "^2.3.0",
- "whatwg-url": "^8.5.0",
- "ws": "^7.4.6",
- "xml-name-validator": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "canvas": "^2.5.0"
- },
- "peerDependenciesMeta": {
- "canvas": {
- "optional": true
- }
- }
- },
- "node_modules/jsesc": {
- "version": "2.5.2",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
- "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
- "bin": {
- "jsesc": "bin/jsesc"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/json-parse-better-errors": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
- "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
- },
- "node_modules/json-parse-even-better-errors": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
- "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w=="
- },
- "node_modules/json-schema": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz",
- "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA=="
- },
- "node_modules/json-schema-traverse": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
- "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg=="
- },
- "node_modules/json-stable-stringify-without-jsonify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
- "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE="
- },
- "node_modules/json5": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz",
- "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==",
- "dependencies": {
- "minimist": "^1.2.5"
- },
- "bin": {
- "json5": "lib/cli.js"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/jsonfile": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
- "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
- "dependencies": {
- "universalify": "^2.0.0"
- },
- "optionalDependencies": {
- "graceful-fs": "^4.1.6"
- }
- },
- "node_modules/jsonpointer": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-5.0.0.tgz",
- "integrity": "sha512-PNYZIdMjVIvVgDSYKTT63Y+KZ6IZvGRNNWcxwD+GNnUz1MKPfv30J8ueCjdwcN0nDx2SlshgyB7Oy0epAzVRRg==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/jsx-ast-utils": {
- "version": "3.2.1",
- "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz",
- "integrity": "sha512-uP5vu8xfy2F9A6LGC22KO7e2/vGTS1MhP+18f++ZNlf0Ohaxbc9nIEwHAsejlJKyzfZzU5UIhe5ItYkitcZnZA==",
- "dependencies": {
- "array-includes": "^3.1.3",
- "object.assign": "^4.1.2"
- },
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/kind-of": {
- "version": "6.0.3",
- "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
- "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/kleur": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
- "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/klona": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz",
- "integrity": "sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/language-subtag-registry": {
- "version": "0.3.21",
- "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.21.tgz",
- "integrity": "sha512-L0IqwlIXjilBVVYKFT37X9Ih11Um5NEl9cbJIuU/SwP/zEEAbBPOnEeeuxVMf45ydWQRDQN3Nqc96OgbH1K+Pg=="
- },
- "node_modules/language-tags": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/language-tags/-/language-tags-1.0.5.tgz",
- "integrity": "sha1-0yHbxNowuovzAk4ED6XBRmH5GTo=",
- "dependencies": {
- "language-subtag-registry": "~0.3.2"
- }
- },
- "node_modules/leven": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz",
- "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/levn": {
- "version": "0.4.1",
- "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
- "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
- "dependencies": {
- "prelude-ls": "^1.2.1",
- "type-check": "~0.4.0"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/lilconfig": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz",
- "integrity": "sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/lines-and-columns": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
- "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="
- },
- "node_modules/loader-runner": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz",
- "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==",
- "engines": {
- "node": ">=6.11.5"
- }
- },
- "node_modules/loader-utils": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.2.tgz",
- "integrity": "sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==",
- "dependencies": {
- "big.js": "^5.2.2",
- "emojis-list": "^3.0.0",
- "json5": "^2.1.2"
- },
- "engines": {
- "node": ">=8.9.0"
- }
- },
- "node_modules/locate-path": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
- "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
- "dependencies": {
- "p-locate": "^5.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/lodash": {
- "version": "4.17.21",
- "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
- "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
- },
- "node_modules/lodash.debounce": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
- "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168="
- },
- "node_modules/lodash.memoize": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
- "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4="
- },
- "node_modules/lodash.merge": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
- "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="
- },
- "node_modules/lodash.sortby": {
- "version": "4.7.0",
- "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
- "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg="
- },
- "node_modules/lodash.uniq": {
- "version": "4.5.0",
- "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
- "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M="
- },
- "node_modules/loose-envify": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
- "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
- "dependencies": {
- "js-tokens": "^3.0.0 || ^4.0.0"
- },
- "bin": {
- "loose-envify": "cli.js"
- }
- },
- "node_modules/lower-case": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
- "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
- "dependencies": {
- "tslib": "^2.0.3"
- }
- },
- "node_modules/lru-cache": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
- "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
- "dependencies": {
- "yallist": "^4.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/lz-string": {
- "version": "1.4.4",
- "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz",
- "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=",
- "bin": {
- "lz-string": "bin/bin.js"
- }
- },
- "node_modules/magic-string": {
- "version": "0.25.9",
- "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
- "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
- "dependencies": {
- "sourcemap-codec": "^1.4.8"
- }
- },
- "node_modules/make-dir": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
- "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
- "dependencies": {
- "semver": "^6.0.0"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/make-dir/node_modules/semver": {
- "version": "6.3.0",
- "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
- "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
- "bin": {
- "semver": "bin/semver.js"
- }
- },
- "node_modules/makeerror": {
- "version": "1.0.12",
- "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
- "integrity": "sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==",
- "dependencies": {
- "tmpl": "1.0.5"
- }
- },
- "node_modules/mdn-data": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz",
- "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA=="
- },
- "node_modules/media-typer": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
- "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/memfs": {
- "version": "3.4.1",
- "resolved": "https://registry.npmjs.org/memfs/-/memfs-3.4.1.tgz",
- "integrity": "sha512-1c9VPVvW5P7I85c35zAdEr1TD5+F11IToIHIlrVIcflfnzPkJa0ZoYEoEdYDP8KgPFoSZ/opDrUsAoZWym3mtw==",
- "dependencies": {
- "fs-monkey": "1.0.3"
- },
- "engines": {
- "node": ">= 4.0.0"
- }
- },
- "node_modules/merge-descriptors": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
- "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
- },
- "node_modules/merge-stream": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
- "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="
- },
- "node_modules/merge2": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
- "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/methods": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
- "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/micromatch": {
- "version": "4.0.4",
- "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz",
- "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==",
- "dependencies": {
- "braces": "^3.0.1",
- "picomatch": "^2.2.3"
- },
- "engines": {
- "node": ">=8.6"
- }
- },
- "node_modules/mime": {
- "version": "1.6.0",
- "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
- "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
- "bin": {
- "mime": "cli.js"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/mime-db": {
- "version": "1.52.0",
- "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
- "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mime-types": {
- "version": "2.1.35",
- "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
- "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
- "dependencies": {
- "mime-db": "1.52.0"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/mimic-fn": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
- "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/min-indent": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz",
- "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/mini-css-extract-plugin": {
- "version": "2.6.0",
- "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.0.tgz",
- "integrity": "sha512-ndG8nxCEnAemsg4FSgS+yNyHKgkTB4nPKqCOgh65j3/30qqC5RaSQQXMm++Y6sb6E1zRSxPkztj9fqxhS1Eo6w==",
- "dependencies": {
- "schema-utils": "^4.0.0"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^5.0.0"
- }
- },
- "node_modules/mini-css-extract-plugin/node_modules/ajv": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
- "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/mini-css-extract-plugin/node_modules/ajv-keywords": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
- "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.3"
- },
- "peerDependencies": {
- "ajv": "^8.8.2"
- }
- },
- "node_modules/mini-css-extract-plugin/node_modules/json-schema-traverse": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
- "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
- },
- "node_modules/mini-css-extract-plugin/node_modules/schema-utils": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
- "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
- "dependencies": {
- "@types/json-schema": "^7.0.9",
- "ajv": "^8.8.0",
- "ajv-formats": "^2.1.1",
- "ajv-keywords": "^5.0.0"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- }
- },
- "node_modules/minimalistic-assert": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",
- "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A=="
- },
- "node_modules/minimatch": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/minimist": {
- "version": "1.2.5",
- "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
- "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
- },
- "node_modules/mkdirp": {
- "version": "0.5.5",
- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
- "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
- "dependencies": {
- "minimist": "^1.2.5"
- },
- "bin": {
- "mkdirp": "bin/cmd.js"
- }
- },
- "node_modules/ms": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
- "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
- },
- "node_modules/multicast-dns": {
- "version": "6.2.3",
- "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.2.3.tgz",
- "integrity": "sha512-ji6J5enbMyGRHIAkAOu3WdV8nggqviKCEKtXcOqfphZZtQrmHKycfynJ2V7eVPUA4NhJ6V7Wf4TmGbTwKE9B6g==",
- "dependencies": {
- "dns-packet": "^1.3.1",
- "thunky": "^1.0.2"
- },
- "bin": {
- "multicast-dns": "cli.js"
- }
- },
- "node_modules/multicast-dns-service-types": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz",
- "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE="
- },
- "node_modules/nanoid": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz",
- "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==",
- "bin": {
- "nanoid": "bin/nanoid.cjs"
- },
- "engines": {
- "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
- }
- },
- "node_modules/natural-compare": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
- "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc="
- },
- "node_modules/negotiator": {
- "version": "0.6.3",
- "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
- "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/neo-async": {
- "version": "2.6.2",
- "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
- "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw=="
- },
- "node_modules/no-case": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
- "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
- "dependencies": {
- "lower-case": "^2.0.2",
- "tslib": "^2.0.3"
- }
- },
- "node_modules/node-forge": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.0.tgz",
- "integrity": "sha512-08ARB91bUi6zNKzVmaj3QO7cr397uiDT2nJ63cHjyNtCTWIgvS47j3eT0WfzUwS9+6Z5YshRaoasFkXCKrIYbA==",
- "engines": {
- "node": ">= 6.13.0"
- }
- },
- "node_modules/node-int64": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
- "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs="
- },
- "node_modules/node-releases": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.2.tgz",
- "integrity": "sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg=="
- },
- "node_modules/normalize-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
- "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/normalize-range": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
- "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/normalize-url": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz",
- "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/npm-run-path": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz",
- "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==",
- "dependencies": {
- "path-key": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/nth-check": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz",
- "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==",
- "dependencies": {
- "boolbase": "^1.0.0"
- },
- "funding": {
- "url": "https://github.com/fb55/nth-check?sponsor=1"
- }
- },
- "node_modules/nwsapi": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz",
- "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ=="
- },
- "node_modules/object-assign": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
- "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/object-hash": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-2.2.0.tgz",
- "integrity": "sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw==",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/object-inspect": {
- "version": "1.12.0",
- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
- "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==",
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object-is": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz",
- "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object-keys": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
- "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/object.assign": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
- "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
- "dependencies": {
- "call-bind": "^1.0.0",
- "define-properties": "^1.1.3",
- "has-symbols": "^1.0.1",
- "object-keys": "^1.1.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object.entries": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.5.tgz",
- "integrity": "sha512-TyxmjUoZggd4OrrU1W66FMDG6CuqJxsFvymeyXI51+vQLN67zYfZseptRge703kKQdo4uccgAKebXFcRCzk4+g==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.1"
- },
- "engines": {
- "node": ">= 0.4"
- }
- },
- "node_modules/object.fromentries": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.5.tgz",
- "integrity": "sha512-CAyG5mWQRRiBU57Re4FKoTBjXfDoNwdFVH2Y1tS9PqCsfUTymAohOkEMSG3aRNKmv4lV3O7p1et7c187q6bynw==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object.getownpropertydescriptors": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz",
- "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.1"
- },
- "engines": {
- "node": ">= 0.8"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object.hasown": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.0.tgz",
- "integrity": "sha512-MhjYRfj3GBlhSkDHo6QmvgjRLXQ2zndabdf3nX0yTyZK9rPfxb6uRpAac8HXNLy1GpqWtZ81Qh4v3uOls2sRAg==",
- "dependencies": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.1"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/object.values": {
- "version": "1.1.5",
- "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.5.tgz",
- "integrity": "sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.1"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/obuf": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz",
- "integrity": "sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg=="
- },
- "node_modules/on-finished": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
- "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
- "dependencies": {
- "ee-first": "1.1.1"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/on-headers": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz",
- "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/once": {
- "version": "1.4.0",
- "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
- "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
- "dependencies": {
- "wrappy": "1"
- }
- },
- "node_modules/onetime": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz",
- "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==",
- "dependencies": {
- "mimic-fn": "^2.1.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/open": {
- "version": "8.4.0",
- "resolved": "https://registry.npmjs.org/open/-/open-8.4.0.tgz",
- "integrity": "sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==",
- "dependencies": {
- "define-lazy-prop": "^2.0.0",
- "is-docker": "^2.1.1",
- "is-wsl": "^2.2.0"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/optionator": {
- "version": "0.9.1",
- "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
- "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
- "dependencies": {
- "deep-is": "^0.1.3",
- "fast-levenshtein": "^2.0.6",
- "levn": "^0.4.1",
- "prelude-ls": "^1.2.1",
- "type-check": "^0.4.0",
- "word-wrap": "^1.2.3"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/p-limit": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
- "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
- "dependencies": {
- "yocto-queue": "^0.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-locate": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
- "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
- "dependencies": {
- "p-limit": "^3.0.2"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-map": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz",
- "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==",
- "dependencies": {
- "aggregate-error": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/p-retry": {
- "version": "4.6.1",
- "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.1.tgz",
- "integrity": "sha512-e2xXGNhZOZ0lfgR9kL34iGlU8N/KO0xZnQxVEwdeOvpqNDQfdnxIYizvWtK8RglUa3bGqI8g0R/BdfzLMxRkiA==",
- "dependencies": {
- "@types/retry": "^0.12.0",
- "retry": "^0.13.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/p-try": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
- "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/param-case": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
- "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
- "dependencies": {
- "dot-case": "^3.0.4",
- "tslib": "^2.0.3"
- }
- },
- "node_modules/parent-module": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
- "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
- "dependencies": {
- "callsites": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/parse-json": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
- "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
- "dependencies": {
- "@babel/code-frame": "^7.0.0",
- "error-ex": "^1.3.1",
- "json-parse-even-better-errors": "^2.3.0",
- "lines-and-columns": "^1.1.6"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/parse5": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz",
- "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw=="
- },
- "node_modules/parseurl": {
- "version": "1.3.3",
- "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
- "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/pascal-case": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
- "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
- "dependencies": {
- "no-case": "^3.0.4",
- "tslib": "^2.0.3"
- }
- },
- "node_modules/path-exists": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
- "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-is-absolute": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
- "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/path-key": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
- "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/path-parse": {
- "version": "1.0.7",
- "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
- "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
- },
- "node_modules/path-to-regexp": {
- "version": "0.1.7",
- "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
- "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
- },
- "node_modules/path-type": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
- "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/performance-now": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
- "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
- },
- "node_modules/picocolors": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
- "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
- },
- "node_modules/picomatch": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
- "engines": {
- "node": ">=8.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/jonschlinkert"
- }
- },
- "node_modules/pirates": {
- "version": "4.0.5",
- "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz",
- "integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/pkg-dir": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
- "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
- "dependencies": {
- "find-up": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pkg-dir/node_modules/find-up": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
- "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
- "dependencies": {
- "locate-path": "^5.0.0",
- "path-exists": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pkg-dir/node_modules/locate-path": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
- "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
- "dependencies": {
- "p-locate": "^4.1.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pkg-dir/node_modules/p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
- "dependencies": {
- "p-try": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pkg-dir/node_modules/p-locate": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
- "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
- "dependencies": {
- "p-limit": "^2.2.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pkg-up": {
- "version": "3.1.0",
- "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz",
- "integrity": "sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA==",
- "dependencies": {
- "find-up": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/pkg-up/node_modules/find-up": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
- "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
- "dependencies": {
- "locate-path": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/pkg-up/node_modules/locate-path": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
- "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
- "dependencies": {
- "p-locate": "^3.0.0",
- "path-exists": "^3.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/pkg-up/node_modules/p-limit": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
- "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
- "dependencies": {
- "p-try": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pkg-up/node_modules/p-locate": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
- "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
- "dependencies": {
- "p-limit": "^2.0.0"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/pkg-up/node_modules/path-exists": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
- "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/portfinder": {
- "version": "1.0.28",
- "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
- "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==",
- "dependencies": {
- "async": "^2.6.2",
- "debug": "^3.1.1",
- "mkdirp": "^0.5.5"
- },
- "engines": {
- "node": ">= 0.12.0"
- }
- },
- "node_modules/portfinder/node_modules/debug": {
- "version": "3.2.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
- "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
- "dependencies": {
- "ms": "^2.1.1"
- }
- },
- "node_modules/postcss": {
- "version": "8.4.12",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.12.tgz",
- "integrity": "sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==",
- "funding": [
- {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- {
- "type": "tidelift",
- "url": "https://tidelift.com/funding/github/npm/postcss"
- }
- ],
- "dependencies": {
- "nanoid": "^3.3.1",
- "picocolors": "^1.0.0",
- "source-map-js": "^1.0.2"
- },
- "engines": {
- "node": "^10 || ^12 || >=14"
- }
- },
- "node_modules/postcss-attribute-case-insensitive": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-5.0.0.tgz",
- "integrity": "sha512-b4g9eagFGq9T5SWX4+USfVyjIb3liPnjhHHRMP7FMB2kFVpYyfEscV0wP3eaXhKlcHKUut8lt5BGoeylWA/dBQ==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.2"
- },
- "peerDependencies": {
- "postcss": "^8.0.2"
- }
- },
- "node_modules/postcss-browser-comments": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-browser-comments/-/postcss-browser-comments-4.0.0.tgz",
- "integrity": "sha512-X9X9/WN3KIvY9+hNERUqX9gncsgBA25XaeR+jshHz2j8+sYyHktHw1JdKuMjeLpGktXidqDhA7b/qm1mrBDmgg==",
- "engines": {
- "node": ">=8"
- },
- "peerDependencies": {
- "browserslist": ">=4",
- "postcss": ">=8"
- }
- },
- "node_modules/postcss-calc": {
- "version": "8.2.4",
- "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz",
- "integrity": "sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9",
- "postcss-value-parser": "^4.2.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.2"
- }
- },
- "node_modules/postcss-clamp": {
- "version": "4.1.0",
- "resolved": "https://registry.npmjs.org/postcss-clamp/-/postcss-clamp-4.1.0.tgz",
- "integrity": "sha512-ry4b1Llo/9zz+PKC+030KUnPITTJAHeOwjfAyyB60eT0AorGLdzp52s31OsPRHRf8NchkgFoG2y6fCfn1IV1Ow==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": ">=7.6.0"
- },
- "peerDependencies": {
- "postcss": "^8.4.6"
- }
- },
- "node_modules/postcss-color-functional-notation": {
- "version": "4.2.2",
- "resolved": "https://registry.npmjs.org/postcss-color-functional-notation/-/postcss-color-functional-notation-4.2.2.tgz",
- "integrity": "sha512-DXVtwUhIk4f49KK5EGuEdgx4Gnyj6+t2jBSEmxvpIK9QI40tWrpS2Pua8Q7iIZWBrki2QOaeUdEaLPPa91K0RQ==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-color-hex-alpha": {
- "version": "8.0.3",
- "resolved": "https://registry.npmjs.org/postcss-color-hex-alpha/-/postcss-color-hex-alpha-8.0.3.tgz",
- "integrity": "sha512-fESawWJCrBV035DcbKRPAVmy21LpoyiXdPTuHUfWJ14ZRjY7Y7PA6P4g8z6LQGYhU1WAxkTxjIjurXzoe68Glw==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-color-rebeccapurple": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-7.0.2.tgz",
- "integrity": "sha512-SFc3MaocHaQ6k3oZaFwH8io6MdypkUtEy/eXzXEB1vEQlO3S3oDc/FSZA8AsS04Z25RirQhlDlHLh3dn7XewWw==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.3"
- }
- },
- "node_modules/postcss-colormin": {
- "version": "5.3.0",
- "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz",
- "integrity": "sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg==",
- "dependencies": {
- "browserslist": "^4.16.6",
- "caniuse-api": "^3.0.0",
- "colord": "^2.9.1",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-convert-values": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.0.tgz",
- "integrity": "sha512-GkyPbZEYJiWtQB0KZ0X6qusqFHUepguBCNFi9t5JJc7I2OTXG7C0twbTLvCfaKOLl3rSXmpAwV7W5txd91V84g==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-custom-media": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-8.0.0.tgz",
- "integrity": "sha512-FvO2GzMUaTN0t1fBULDeIvxr5IvbDXcIatt6pnJghc736nqNgsGao5NT+5+WVLAQiTt6Cb3YUms0jiPaXhL//g==",
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/postcss-custom-properties": {
- "version": "12.1.5",
- "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-12.1.5.tgz",
- "integrity": "sha512-FHbbB/hRo/7cxLGkc2NS7cDRIDN1oFqQnUKBiyh4b/gwk8DD8udvmRDpUhEK836kB8ggUCieHVOvZDnF9XhI3g==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-custom-selectors": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/postcss-custom-selectors/-/postcss-custom-selectors-6.0.0.tgz",
- "integrity": "sha512-/1iyBhz/W8jUepjGyu7V1OPcGbc636snN1yXEQCinb6Bwt7KxsiU7/bLQlp8GwAXzCh7cobBU5odNn/2zQWR8Q==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.4"
- },
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "postcss": "^8.1.2"
- }
- },
- "node_modules/postcss-dir-pseudo-class": {
- "version": "6.0.4",
- "resolved": "https://registry.npmjs.org/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-6.0.4.tgz",
- "integrity": "sha512-I8epwGy5ftdzNWEYok9VjW9whC4xnelAtbajGv4adql4FIF09rnrxnA9Y8xSHN47y7gqFIv10C5+ImsLeJpKBw==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-discard-comments": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.1.tgz",
- "integrity": "sha512-5JscyFmvkUxz/5/+TB3QTTT9Gi9jHkcn8dcmmuN68JQcv3aQg4y88yEHHhwFB52l/NkaJ43O0dbksGMAo49nfQ==",
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-discard-duplicates": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz",
- "integrity": "sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==",
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-discard-empty": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz",
- "integrity": "sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==",
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-discard-overridden": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz",
- "integrity": "sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==",
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-double-position-gradients": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/postcss-double-position-gradients/-/postcss-double-position-gradients-3.1.1.tgz",
- "integrity": "sha512-jM+CGkTs4FcG53sMPjrrGE0rIvLDdCrqMzgDC5fLI7JHDO7o6QG8C5TQBtExb13hdBdoH9C2QVbG4jo2y9lErQ==",
- "dependencies": {
- "@csstools/postcss-progressive-custom-properties": "^1.1.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-env-function": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/postcss-env-function/-/postcss-env-function-4.0.6.tgz",
- "integrity": "sha512-kpA6FsLra+NqcFnL81TnsU+Z7orGtDTxcOhl6pwXeEq1yFPpRMkCDpHhrz8CFQDr/Wfm0jLiNQ1OsGGPjlqPwA==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-flexbugs-fixes": {
- "version": "5.0.2",
- "resolved": "https://registry.npmjs.org/postcss-flexbugs-fixes/-/postcss-flexbugs-fixes-5.0.2.tgz",
- "integrity": "sha512-18f9voByak7bTktR2QgDveglpn9DTbBWPUzSOe9g0N4WR/2eSt6Vrcbf0hmspvMI6YWGywz6B9f7jzpFNJJgnQ==",
- "peerDependencies": {
- "postcss": "^8.1.4"
- }
- },
- "node_modules/postcss-focus-visible": {
- "version": "6.0.4",
- "resolved": "https://registry.npmjs.org/postcss-focus-visible/-/postcss-focus-visible-6.0.4.tgz",
- "integrity": "sha512-QcKuUU/dgNsstIK6HELFRT5Y3lbrMLEOwG+A4s5cA+fx3A3y/JTq3X9LaOj3OC3ALH0XqyrgQIgey/MIZ8Wczw==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-focus-within": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/postcss-focus-within/-/postcss-focus-within-5.0.4.tgz",
- "integrity": "sha512-vvjDN++C0mu8jz4af5d52CB184ogg/sSxAFS+oUJQq2SuCe7T5U2iIsVJtsCp2d6R4j0jr5+q3rPkBVZkXD9fQ==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-font-variant": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz",
- "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==",
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/postcss-gap-properties": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-3.0.3.tgz",
- "integrity": "sha512-rPPZRLPmEKgLk/KlXMqRaNkYTUpE7YC+bOIQFN5xcu1Vp11Y4faIXv6/Jpft6FMnl6YRxZqDZG0qQOW80stzxQ==",
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-image-set-function": {
- "version": "4.0.6",
- "resolved": "https://registry.npmjs.org/postcss-image-set-function/-/postcss-image-set-function-4.0.6.tgz",
- "integrity": "sha512-KfdC6vg53GC+vPd2+HYzsZ6obmPqOk6HY09kttU19+Gj1nC3S3XBVEXDHxkhxTohgZqzbUb94bKXvKDnYWBm/A==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-initial": {
- "version": "4.0.1",
- "resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-4.0.1.tgz",
- "integrity": "sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==",
- "peerDependencies": {
- "postcss": "^8.0.0"
- }
- },
- "node_modules/postcss-js": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-js/-/postcss-js-4.0.0.tgz",
- "integrity": "sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ==",
- "dependencies": {
- "camelcase-css": "^2.0.1"
- },
- "engines": {
- "node": "^12 || ^14 || >= 16"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- "peerDependencies": {
- "postcss": "^8.3.3"
- }
- },
- "node_modules/postcss-lab-function": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/postcss-lab-function/-/postcss-lab-function-4.1.2.tgz",
- "integrity": "sha512-isudf5ldhg4fk16M8viAwAbg6Gv14lVO35N3Z/49NhbwPQ2xbiEoHgrRgpgQojosF4vF7jY653ktB6dDrUOR8Q==",
- "dependencies": {
- "@csstools/postcss-progressive-custom-properties": "^1.1.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-load-config": {
- "version": "3.1.3",
- "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.3.tgz",
- "integrity": "sha512-5EYgaM9auHGtO//ljHH+v/aC/TQ5LHXtL7bQajNAUBKUVKiYE8rYpFms7+V26D9FncaGe2zwCoPQsFKb5zF/Hw==",
- "dependencies": {
- "lilconfig": "^2.0.4",
- "yaml": "^1.10.2"
- },
- "engines": {
- "node": ">= 10"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- "peerDependencies": {
- "ts-node": ">=9.0.0"
- },
- "peerDependenciesMeta": {
- "ts-node": {
- "optional": true
- }
- }
- },
- "node_modules/postcss-loader": {
- "version": "6.2.1",
- "resolved": "https://registry.npmjs.org/postcss-loader/-/postcss-loader-6.2.1.tgz",
- "integrity": "sha512-WbbYpmAaKcux/P66bZ40bpWsBucjx/TTgVVzRZ9yUO8yQfVBlameJ0ZGVaPfH64hNSBh63a+ICP5nqOpBA0w+Q==",
- "dependencies": {
- "cosmiconfig": "^7.0.0",
- "klona": "^2.0.5",
- "semver": "^7.3.5"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "postcss": "^7.0.0 || ^8.0.1",
- "webpack": "^5.0.0"
- }
- },
- "node_modules/postcss-logical": {
- "version": "5.0.4",
- "resolved": "https://registry.npmjs.org/postcss-logical/-/postcss-logical-5.0.4.tgz",
- "integrity": "sha512-RHXxplCeLh9VjinvMrZONq7im4wjWGlRJAqmAVLXyZaXwfDWP73/oq4NdIp+OZwhQUMj0zjqDfM5Fj7qby+B4g==",
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-media-minmax": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/postcss-media-minmax/-/postcss-media-minmax-5.0.0.tgz",
- "integrity": "sha512-yDUvFf9QdFZTuCUg0g0uNSHVlJ5X1lSzDZjPSFaiCWvjgsvu8vEVxtahPrLMinIDEEGnx6cBe6iqdx5YWz08wQ==",
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/postcss-merge-longhand": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.2.tgz",
- "integrity": "sha512-18/bp9DZnY1ai9RlahOfLBbmIUKfKFPASxRCiZ1vlpZqWPCn8qWPFlEozqmWL+kBtcEQmG8W9YqGCstDImvp/Q==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0",
- "stylehacks": "^*"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-merge-rules": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.0.tgz",
- "integrity": "sha512-NecukEJovQ0mG7h7xV8wbYAkXGTO3MPKnXvuiXzOKcxoOodfTTKYjeo8TMhAswlSkjcPIBlnKbSFcTuVSDaPyQ==",
- "dependencies": {
- "browserslist": "^4.16.6",
- "caniuse-api": "^3.0.0",
- "cssnano-utils": "^3.1.0",
- "postcss-selector-parser": "^6.0.5"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-minify-font-values": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz",
- "integrity": "sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-minify-gradients": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.0.tgz",
- "integrity": "sha512-J/TMLklkONn3LuL8wCwfwU8zKC1hpS6VcxFkNUNjmVt53uKqrrykR3ov11mdUYyqVMEx67slMce0tE14cE4DTg==",
- "dependencies": {
- "colord": "^2.9.1",
- "cssnano-utils": "^3.1.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-minify-params": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.1.tgz",
- "integrity": "sha512-WCpr+J9Uz8XzMpAfg3UL8z5rde6MifBbh5L8bn8S2F5hq/YDJJzASYCnCHvAB4Fqb94ys8v95ULQkW2EhCFvNg==",
- "dependencies": {
- "browserslist": "^4.16.6",
- "cssnano-utils": "^3.1.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-minify-selectors": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.0.tgz",
- "integrity": "sha512-vYxvHkW+iULstA+ctVNx0VoRAR4THQQRkG77o0oa4/mBS0OzGvvzLIvHDv/nNEM0crzN2WIyFU5X7wZhaUK3RA==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.5"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-modules-extract-imports": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz",
- "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==",
- "engines": {
- "node": "^10 || ^12 || >= 14"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/postcss-modules-local-by-default": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz",
- "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==",
- "dependencies": {
- "icss-utils": "^5.0.0",
- "postcss-selector-parser": "^6.0.2",
- "postcss-value-parser": "^4.1.0"
- },
- "engines": {
- "node": "^10 || ^12 || >= 14"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/postcss-modules-scope": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz",
- "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.4"
- },
- "engines": {
- "node": "^10 || ^12 || >= 14"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/postcss-modules-values": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz",
- "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==",
- "dependencies": {
- "icss-utils": "^5.0.0"
- },
- "engines": {
- "node": "^10 || ^12 || >= 14"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/postcss-nested": {
- "version": "5.0.6",
- "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz",
- "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.6"
- },
- "engines": {
- "node": ">=12.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- },
- "peerDependencies": {
- "postcss": "^8.2.14"
- }
- },
- "node_modules/postcss-nesting": {
- "version": "10.1.3",
- "resolved": "https://registry.npmjs.org/postcss-nesting/-/postcss-nesting-10.1.3.tgz",
- "integrity": "sha512-wUC+/YCik4wH3StsbC5fBG1s2Z3ZV74vjGqBFYtmYKlVxoio5TYGM06AiaKkQPPlkXWn72HKfS7Cw5PYxnoXSw==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-normalize": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/postcss-normalize/-/postcss-normalize-10.0.1.tgz",
- "integrity": "sha512-+5w18/rDev5mqERcG3W5GZNMJa1eoYYNGo8gB7tEwaos0ajk3ZXAI4mHGcNT47NE+ZnZD1pEpUOFLvltIwmeJA==",
- "dependencies": {
- "@csstools/normalize.css": "*",
- "postcss-browser-comments": "^4",
- "sanitize.css": "*"
- },
- "engines": {
- "node": ">= 12"
- },
- "peerDependencies": {
- "browserslist": ">= 4",
- "postcss": ">= 8"
- }
- },
- "node_modules/postcss-normalize-charset": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz",
- "integrity": "sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==",
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-normalize-display-values": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz",
- "integrity": "sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-normalize-positions": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.0.tgz",
- "integrity": "sha512-8gmItgA4H5xiUxgN/3TVvXRoJxkAWLW6f/KKhdsH03atg0cB8ilXnrB5PpSshwVu/dD2ZsRFQcR1OEmSBDAgcQ==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-normalize-repeat-style": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.0.tgz",
- "integrity": "sha512-IR3uBjc+7mcWGL6CtniKNQ4Rr5fTxwkaDHwMBDGGs1x9IVRkYIT/M4NelZWkAOBdV6v3Z9S46zqaKGlyzHSchw==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-normalize-string": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz",
- "integrity": "sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-normalize-timing-functions": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz",
- "integrity": "sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-normalize-unicode": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz",
- "integrity": "sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ==",
- "dependencies": {
- "browserslist": "^4.16.6",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-normalize-url": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz",
- "integrity": "sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==",
- "dependencies": {
- "normalize-url": "^6.0.1",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-normalize-whitespace": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz",
- "integrity": "sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-opacity-percentage": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/postcss-opacity-percentage/-/postcss-opacity-percentage-1.1.2.tgz",
- "integrity": "sha512-lyUfF7miG+yewZ8EAk9XUBIlrHyUE6fijnesuz+Mj5zrIHIEw6KcIZSOk/elVMqzLvREmXB83Zi/5QpNRYd47w==",
- "funding": [
- {
- "type": "kofi",
- "url": "https://ko-fi.com/mrcgrtz"
- },
- {
- "type": "liberapay",
- "url": "https://liberapay.com/mrcgrtz"
- }
- ],
- "engines": {
- "node": "^12 || ^14 || >=16"
- }
- },
- "node_modules/postcss-ordered-values": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.0.tgz",
- "integrity": "sha512-wU4Z4D4uOIH+BUKkYid36gGDJNQtkVJT7Twv8qH6UyfttbbJWyw4/xIPuVEkkCtQLAJ0EdsNSh8dlvqkXb49TA==",
- "dependencies": {
- "cssnano-utils": "^3.1.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-overflow-shorthand": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/postcss-overflow-shorthand/-/postcss-overflow-shorthand-3.0.3.tgz",
- "integrity": "sha512-CxZwoWup9KXzQeeIxtgOciQ00tDtnylYIlJBBODqkgS/PU2jISuWOL/mYLHmZb9ZhZiCaNKsCRiLp22dZUtNsg==",
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-page-break": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-3.0.4.tgz",
- "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==",
- "peerDependencies": {
- "postcss": "^8"
- }
- },
- "node_modules/postcss-place": {
- "version": "7.0.4",
- "resolved": "https://registry.npmjs.org/postcss-place/-/postcss-place-7.0.4.tgz",
- "integrity": "sha512-MrgKeiiu5OC/TETQO45kV3npRjOFxEHthsqGtkh3I1rPbZSbXGD/lZVi9j13cYh+NA8PIAPyk6sGjT9QbRyvSg==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-preset-env": {
- "version": "7.4.3",
- "resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-7.4.3.tgz",
- "integrity": "sha512-dlPA65g9KuGv7YsmGyCKtFkZKCPLkoVMUE3omOl6yM+qrynVHxFvf0tMuippIrXB/sB/MyhL1FgTIbrO+qMERg==",
- "dependencies": {
- "@csstools/postcss-color-function": "^1.0.3",
- "@csstools/postcss-font-format-keywords": "^1.0.0",
- "@csstools/postcss-hwb-function": "^1.0.0",
- "@csstools/postcss-ic-unit": "^1.0.0",
- "@csstools/postcss-is-pseudo-class": "^2.0.1",
- "@csstools/postcss-normalize-display-values": "^1.0.0",
- "@csstools/postcss-oklab-function": "^1.0.2",
- "@csstools/postcss-progressive-custom-properties": "^1.3.0",
- "autoprefixer": "^10.4.4",
- "browserslist": "^4.20.2",
- "css-blank-pseudo": "^3.0.3",
- "css-has-pseudo": "^3.0.4",
- "css-prefers-color-scheme": "^6.0.3",
- "cssdb": "^6.5.0",
- "postcss-attribute-case-insensitive": "^5.0.0",
- "postcss-clamp": "^4.1.0",
- "postcss-color-functional-notation": "^4.2.2",
- "postcss-color-hex-alpha": "^8.0.3",
- "postcss-color-rebeccapurple": "^7.0.2",
- "postcss-custom-media": "^8.0.0",
- "postcss-custom-properties": "^12.1.5",
- "postcss-custom-selectors": "^6.0.0",
- "postcss-dir-pseudo-class": "^6.0.4",
- "postcss-double-position-gradients": "^3.1.1",
- "postcss-env-function": "^4.0.6",
- "postcss-focus-visible": "^6.0.4",
- "postcss-focus-within": "^5.0.4",
- "postcss-font-variant": "^5.0.0",
- "postcss-gap-properties": "^3.0.3",
- "postcss-image-set-function": "^4.0.6",
- "postcss-initial": "^4.0.1",
- "postcss-lab-function": "^4.1.2",
- "postcss-logical": "^5.0.4",
- "postcss-media-minmax": "^5.0.0",
- "postcss-nesting": "^10.1.3",
- "postcss-opacity-percentage": "^1.1.2",
- "postcss-overflow-shorthand": "^3.0.3",
- "postcss-page-break": "^3.0.4",
- "postcss-place": "^7.0.4",
- "postcss-pseudo-class-any-link": "^7.1.1",
- "postcss-replace-overflow-wrap": "^4.0.0",
- "postcss-selector-not": "^5.0.0",
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-pseudo-class-any-link": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-7.1.1.tgz",
- "integrity": "sha512-JRoLFvPEX/1YTPxRxp1JO4WxBVXJYrSY7NHeak5LImwJ+VobFMwYDQHvfTXEpcn+7fYIeGkC29zYFhFWIZD8fg==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.9"
- },
- "engines": {
- "node": "^12 || ^14 || >=16"
- },
- "peerDependencies": {
- "postcss": "^8.4"
- }
- },
- "node_modules/postcss-reduce-initial": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz",
- "integrity": "sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw==",
- "dependencies": {
- "browserslist": "^4.16.6",
- "caniuse-api": "^3.0.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-reduce-transforms": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz",
- "integrity": "sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-replace-overflow-wrap": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz",
- "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==",
- "peerDependencies": {
- "postcss": "^8.0.3"
- }
- },
- "node_modules/postcss-selector-not": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-5.0.0.tgz",
- "integrity": "sha512-/2K3A4TCP9orP4TNS7u3tGdRFVKqz/E6pX3aGnriPG0jU78of8wsUcqE4QAhWEU0d+WnMSF93Ah3F//vUtK+iQ==",
- "dependencies": {
- "balanced-match": "^1.0.0"
- },
- "peerDependencies": {
- "postcss": "^8.1.0"
- }
- },
- "node_modules/postcss-selector-parser": {
- "version": "6.0.9",
- "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz",
- "integrity": "sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ==",
- "dependencies": {
- "cssesc": "^3.0.0",
- "util-deprecate": "^1.0.2"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/postcss-svgo": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz",
- "integrity": "sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==",
- "dependencies": {
- "postcss-value-parser": "^4.2.0",
- "svgo": "^2.7.0"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-svgo/node_modules/commander": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
- "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
- "engines": {
- "node": ">= 10"
- }
- },
- "node_modules/postcss-svgo/node_modules/css-tree": {
- "version": "1.1.3",
- "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz",
- "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==",
- "dependencies": {
- "mdn-data": "2.0.14",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/postcss-svgo/node_modules/mdn-data": {
- "version": "2.0.14",
- "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz",
- "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow=="
- },
- "node_modules/postcss-svgo/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/postcss-svgo/node_modules/svgo": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz",
- "integrity": "sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg==",
- "dependencies": {
- "@trysound/sax": "0.2.0",
- "commander": "^7.2.0",
- "css-select": "^4.1.3",
- "css-tree": "^1.1.3",
- "csso": "^4.2.0",
- "picocolors": "^1.0.0",
- "stable": "^0.1.8"
- },
- "bin": {
- "svgo": "bin/svgo"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/postcss-unique-selectors": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz",
- "integrity": "sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==",
- "dependencies": {
- "postcss-selector-parser": "^6.0.5"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/postcss-value-parser": {
- "version": "4.2.0",
- "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
- "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
- },
- "node_modules/prelude-ls": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
- "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/pretty-bytes": {
- "version": "5.6.0",
- "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz",
- "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==",
- "engines": {
- "node": ">=6"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/pretty-error": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz",
- "integrity": "sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw==",
- "dependencies": {
- "lodash": "^4.17.20",
- "renderkid": "^3.0.0"
- }
- },
- "node_modules/pretty-format": {
- "version": "27.5.1",
- "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz",
- "integrity": "sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ==",
- "dependencies": {
- "ansi-regex": "^5.0.1",
- "ansi-styles": "^5.0.0",
- "react-is": "^17.0.1"
- },
- "engines": {
- "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0"
- }
- },
- "node_modules/pretty-format/node_modules/ansi-styles": {
- "version": "5.2.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz",
- "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/process-nextick-args": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
- "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
- },
- "node_modules/promise": {
- "version": "8.1.0",
- "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz",
- "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==",
- "dependencies": {
- "asap": "~2.0.6"
- }
- },
- "node_modules/prompts": {
- "version": "2.4.2",
- "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz",
- "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==",
- "dependencies": {
- "kleur": "^3.0.3",
- "sisteransi": "^1.0.5"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/prop-types": {
- "version": "15.8.1",
- "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
- "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
- "dependencies": {
- "loose-envify": "^1.4.0",
- "object-assign": "^4.1.1",
- "react-is": "^16.13.1"
- }
- },
- "node_modules/prop-types/node_modules/react-is": {
- "version": "16.13.1",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
- "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ=="
- },
- "node_modules/proxy-addr": {
- "version": "2.0.7",
- "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
- "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
- "dependencies": {
- "forwarded": "0.2.0",
- "ipaddr.js": "1.9.1"
- },
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/proxy-addr/node_modules/ipaddr.js": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
- "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/psl": {
- "version": "1.8.0",
- "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
- "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ=="
- },
- "node_modules/punycode": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
- "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/q": {
- "version": "1.5.1",
- "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz",
- "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=",
- "engines": {
- "node": ">=0.6.0",
- "teleport": ">=0.2.0"
- }
- },
- "node_modules/qs": {
- "version": "6.9.7",
- "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz",
- "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw==",
- "engines": {
- "node": ">=0.6"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/queue-microtask": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
- "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/quick-lru": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz",
- "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/raf": {
- "version": "3.4.1",
- "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz",
- "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==",
- "dependencies": {
- "performance-now": "^2.1.0"
- }
- },
- "node_modules/randombytes": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
- "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
- "dependencies": {
- "safe-buffer": "^5.1.0"
- }
- },
- "node_modules/range-parser": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
- "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/raw-body": {
- "version": "2.4.3",
- "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz",
- "integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==",
- "dependencies": {
- "bytes": "3.1.2",
- "http-errors": "1.8.1",
- "iconv-lite": "0.4.24",
- "unpipe": "1.0.0"
- },
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/raw-body/node_modules/bytes": {
- "version": "3.1.2",
- "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
- "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/raw-body/node_modules/iconv-lite": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/react": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz",
- "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==",
- "dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/react-app-polyfill": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-3.0.0.tgz",
- "integrity": "sha512-sZ41cxiU5llIB003yxxQBYrARBqe0repqPTTYBTmMqTz9szeBbE37BehCE891NZsmdZqqP+xWKdT3eo3vOzN8w==",
- "dependencies": {
- "core-js": "^3.19.2",
- "object-assign": "^4.1.1",
- "promise": "^8.1.0",
- "raf": "^3.4.1",
- "regenerator-runtime": "^0.13.9",
- "whatwg-fetch": "^3.6.2"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/react-dev-utils": {
- "version": "12.0.0",
- "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.0.tgz",
- "integrity": "sha512-xBQkitdxozPxt1YZ9O1097EJiVpwHr9FoAuEVURCKV0Av8NBERovJauzP7bo1ThvuhZ4shsQ1AJiu4vQpoT1AQ==",
- "dependencies": {
- "@babel/code-frame": "^7.16.0",
- "address": "^1.1.2",
- "browserslist": "^4.18.1",
- "chalk": "^4.1.2",
- "cross-spawn": "^7.0.3",
- "detect-port-alt": "^1.1.6",
- "escape-string-regexp": "^4.0.0",
- "filesize": "^8.0.6",
- "find-up": "^5.0.0",
- "fork-ts-checker-webpack-plugin": "^6.5.0",
- "global-modules": "^2.0.0",
- "globby": "^11.0.4",
- "gzip-size": "^6.0.0",
- "immer": "^9.0.7",
- "is-root": "^2.1.0",
- "loader-utils": "^3.2.0",
- "open": "^8.4.0",
- "pkg-up": "^3.1.0",
- "prompts": "^2.4.2",
- "react-error-overlay": "^6.0.10",
- "recursive-readdir": "^2.2.2",
- "shell-quote": "^1.7.3",
- "strip-ansi": "^6.0.1",
- "text-table": "^0.2.0"
- },
- "engines": {
- "node": ">=14"
- }
- },
- "node_modules/react-dev-utils/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/react-dev-utils/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/react-dev-utils/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/react-dev-utils/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/react-dev-utils/node_modules/escape-string-regexp": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
- "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/react-dev-utils/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/react-dev-utils/node_modules/loader-utils": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz",
- "integrity": "sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ==",
- "engines": {
- "node": ">= 12.13.0"
- }
- },
- "node_modules/react-dev-utils/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/react-dom": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz",
- "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==",
- "dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "scheduler": "^0.20.2"
- },
- "peerDependencies": {
- "react": "17.0.2"
- }
- },
- "node_modules/react-error-overlay": {
- "version": "6.0.10",
- "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.10.tgz",
- "integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA=="
- },
- "node_modules/react-is": {
- "version": "17.0.2",
- "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz",
- "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w=="
- },
- "node_modules/react-refresh": {
- "version": "0.11.0",
- "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
- "integrity": "sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/react-scripts": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-5.0.0.tgz",
- "integrity": "sha512-3i0L2CyIlROz7mxETEdfif6Sfhh9Lfpzi10CtcGs1emDQStmZfWjJbAIMtRD0opVUjQuFWqHZyRZ9PPzKCFxWg==",
- "dependencies": {
- "@babel/core": "^7.16.0",
- "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
- "@svgr/webpack": "^5.5.0",
- "babel-jest": "^27.4.2",
- "babel-loader": "^8.2.3",
- "babel-plugin-named-asset-import": "^0.3.8",
- "babel-preset-react-app": "^10.0.1",
- "bfj": "^7.0.2",
- "browserslist": "^4.18.1",
- "camelcase": "^6.2.1",
- "case-sensitive-paths-webpack-plugin": "^2.4.0",
- "css-loader": "^6.5.1",
- "css-minimizer-webpack-plugin": "^3.2.0",
- "dotenv": "^10.0.0",
- "dotenv-expand": "^5.1.0",
- "eslint": "^8.3.0",
- "eslint-config-react-app": "^7.0.0",
- "eslint-webpack-plugin": "^3.1.1",
- "file-loader": "^6.2.0",
- "fs-extra": "^10.0.0",
- "html-webpack-plugin": "^5.5.0",
- "identity-obj-proxy": "^3.0.0",
- "jest": "^27.4.3",
- "jest-resolve": "^27.4.2",
- "jest-watch-typeahead": "^1.0.0",
- "mini-css-extract-plugin": "^2.4.5",
- "postcss": "^8.4.4",
- "postcss-flexbugs-fixes": "^5.0.2",
- "postcss-loader": "^6.2.1",
- "postcss-normalize": "^10.0.1",
- "postcss-preset-env": "^7.0.1",
- "prompts": "^2.4.2",
- "react-app-polyfill": "^3.0.0",
- "react-dev-utils": "^12.0.0",
- "react-refresh": "^0.11.0",
- "resolve": "^1.20.0",
- "resolve-url-loader": "^4.0.0",
- "sass-loader": "^12.3.0",
- "semver": "^7.3.5",
- "source-map-loader": "^3.0.0",
- "style-loader": "^3.3.1",
- "tailwindcss": "^3.0.2",
- "terser-webpack-plugin": "^5.2.5",
- "webpack": "^5.64.4",
- "webpack-dev-server": "^4.6.0",
- "webpack-manifest-plugin": "^4.0.2",
- "workbox-webpack-plugin": "^6.4.1"
- },
- "bin": {
- "react-scripts": "bin/react-scripts.js"
- },
- "engines": {
- "node": ">=14.0.0"
- },
- "optionalDependencies": {
- "fsevents": "^2.3.2"
- },
- "peerDependencies": {
- "react": ">= 16",
- "typescript": "^3.2.1 || ^4"
- },
- "peerDependenciesMeta": {
- "typescript": {
- "optional": true
- }
- }
- },
- "node_modules/readable-stream": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
- "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
- "dependencies": {
- "inherits": "^2.0.3",
- "string_decoder": "^1.1.1",
- "util-deprecate": "^1.0.1"
- },
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/readdirp": {
- "version": "3.6.0",
- "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
- "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
- "dependencies": {
- "picomatch": "^2.2.1"
- },
- "engines": {
- "node": ">=8.10.0"
- }
- },
- "node_modules/recursive-readdir": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz",
- "integrity": "sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg==",
- "dependencies": {
- "minimatch": "3.0.4"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/recursive-readdir/node_modules/minimatch": {
- "version": "3.0.4",
- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
- "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
- "dependencies": {
- "brace-expansion": "^1.1.7"
- },
- "engines": {
- "node": "*"
- }
- },
- "node_modules/redent": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz",
- "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==",
- "dependencies": {
- "indent-string": "^4.0.0",
- "strip-indent": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/regenerate": {
- "version": "1.4.2",
- "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
- "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A=="
- },
- "node_modules/regenerate-unicode-properties": {
- "version": "10.0.1",
- "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz",
- "integrity": "sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw==",
- "dependencies": {
- "regenerate": "^1.4.2"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/regenerator-runtime": {
- "version": "0.13.9",
- "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz",
- "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA=="
- },
- "node_modules/regenerator-transform": {
- "version": "0.14.5",
- "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz",
- "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==",
- "dependencies": {
- "@babel/runtime": "^7.8.4"
- }
- },
- "node_modules/regex-parser": {
- "version": "2.2.11",
- "resolved": "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz",
- "integrity": "sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q=="
- },
- "node_modules/regexp.prototype.flags": {
- "version": "1.4.1",
- "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz",
- "integrity": "sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3"
- },
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/regexpp": {
- "version": "3.2.0",
- "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
- "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/mysticatea"
- }
- },
- "node_modules/regexpu-core": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.0.1.tgz",
- "integrity": "sha512-CriEZlrKK9VJw/xQGJpQM5rY88BtuL8DM+AEwvcThHilbxiTAy8vq4iJnd2tqq8wLmjbGZzP7ZcKFjbGkmEFrw==",
- "dependencies": {
- "regenerate": "^1.4.2",
- "regenerate-unicode-properties": "^10.0.1",
- "regjsgen": "^0.6.0",
- "regjsparser": "^0.8.2",
- "unicode-match-property-ecmascript": "^2.0.0",
- "unicode-match-property-value-ecmascript": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/regjsgen": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz",
- "integrity": "sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA=="
- },
- "node_modules/regjsparser": {
- "version": "0.8.4",
- "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz",
- "integrity": "sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA==",
- "dependencies": {
- "jsesc": "~0.5.0"
- },
- "bin": {
- "regjsparser": "bin/parser"
- }
- },
- "node_modules/regjsparser/node_modules/jsesc": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz",
- "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=",
- "bin": {
- "jsesc": "bin/jsesc"
- }
- },
- "node_modules/relateurl": {
- "version": "0.2.7",
- "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
- "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
- "engines": {
- "node": ">= 0.10"
- }
- },
- "node_modules/renderkid": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz",
- "integrity": "sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg==",
- "dependencies": {
- "css-select": "^4.1.3",
- "dom-converter": "^0.2.0",
- "htmlparser2": "^6.1.0",
- "lodash": "^4.17.21",
- "strip-ansi": "^6.0.1"
- }
- },
- "node_modules/require-directory": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
- "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/require-from-string": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
- "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/requires-port": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
- "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8="
- },
- "node_modules/resolve": {
- "version": "1.22.0",
- "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.0.tgz",
- "integrity": "sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw==",
- "dependencies": {
- "is-core-module": "^2.8.1",
- "path-parse": "^1.0.7",
- "supports-preserve-symlinks-flag": "^1.0.0"
- },
- "bin": {
- "resolve": "bin/resolve"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/resolve-cwd": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
- "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
- "dependencies": {
- "resolve-from": "^5.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/resolve-from": {
- "version": "5.0.0",
- "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
- "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/resolve-url-loader": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-4.0.0.tgz",
- "integrity": "sha512-05VEMczVREcbtT7Bz+C+96eUO5HDNvdthIiMB34t7FcF8ehcu4wC0sSgPUubs3XW2Q3CNLJk/BJrCU9wVRymiA==",
- "dependencies": {
- "adjust-sourcemap-loader": "^4.0.0",
- "convert-source-map": "^1.7.0",
- "loader-utils": "^2.0.0",
- "postcss": "^7.0.35",
- "source-map": "0.6.1"
- },
- "engines": {
- "node": ">=8.9"
- },
- "peerDependencies": {
- "rework": "1.0.1",
- "rework-visit": "1.0.0"
- },
- "peerDependenciesMeta": {
- "rework": {
- "optional": true
- },
- "rework-visit": {
- "optional": true
- }
- }
- },
- "node_modules/resolve-url-loader/node_modules/picocolors": {
- "version": "0.2.1",
- "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
- "integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA=="
- },
- "node_modules/resolve-url-loader/node_modules/postcss": {
- "version": "7.0.39",
- "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.39.tgz",
- "integrity": "sha512-yioayjNbHn6z1/Bywyb2Y4s3yvDAeXGOyxqD+LnVOinq6Mdmd++SW2wUNVzavyyHxd6+DxzWGIuosg6P1Rj8uA==",
- "dependencies": {
- "picocolors": "^0.2.1",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=6.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/postcss/"
- }
- },
- "node_modules/resolve-url-loader/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/resolve.exports": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-1.1.0.tgz",
- "integrity": "sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/retry": {
- "version": "0.13.1",
- "resolved": "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz",
- "integrity": "sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==",
- "engines": {
- "node": ">= 4"
- }
- },
- "node_modules/reusify": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
- "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
- "engines": {
- "iojs": ">=1.0.0",
- "node": ">=0.10.0"
- }
- },
- "node_modules/rimraf": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
- "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
- "dependencies": {
- "glob": "^7.1.3"
- },
- "bin": {
- "rimraf": "bin.js"
- },
- "funding": {
- "url": "https://github.com/sponsors/isaacs"
- }
- },
- "node_modules/rollup": {
- "version": "2.70.1",
- "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.70.1.tgz",
- "integrity": "sha512-CRYsI5EuzLbXdxC6RnYhOuRdtz4bhejPMSWjsFLfVM/7w/85n2szZv6yExqUXsBdz5KT8eoubeyDUDjhLHEslA==",
- "bin": {
- "rollup": "dist/bin/rollup"
- },
- "engines": {
- "node": ">=10.0.0"
- },
- "optionalDependencies": {
- "fsevents": "~2.3.2"
- }
- },
- "node_modules/rollup-plugin-terser": {
- "version": "7.0.2",
- "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz",
- "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==",
- "dependencies": {
- "@babel/code-frame": "^7.10.4",
- "jest-worker": "^26.2.1",
- "serialize-javascript": "^4.0.0",
- "terser": "^5.0.0"
- },
- "peerDependencies": {
- "rollup": "^2.0.0"
- }
- },
- "node_modules/rollup-plugin-terser/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/rollup-plugin-terser/node_modules/jest-worker": {
- "version": "26.6.2",
- "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz",
- "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==",
- "dependencies": {
- "@types/node": "*",
- "merge-stream": "^2.0.0",
- "supports-color": "^7.0.0"
- },
- "engines": {
- "node": ">= 10.13.0"
- }
- },
- "node_modules/rollup-plugin-terser/node_modules/serialize-javascript": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz",
- "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==",
- "dependencies": {
- "randombytes": "^2.1.0"
- }
- },
- "node_modules/rollup-plugin-terser/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/run-parallel": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
- "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ],
- "dependencies": {
- "queue-microtask": "^1.2.2"
- }
- },
- "node_modules/safe-buffer": {
- "version": "5.1.2",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
- "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
- },
- "node_modules/safer-buffer": {
- "version": "2.1.2",
- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
- },
- "node_modules/sanitize.css": {
- "version": "13.0.0",
- "resolved": "https://registry.npmjs.org/sanitize.css/-/sanitize.css-13.0.0.tgz",
- "integrity": "sha512-ZRwKbh/eQ6w9vmTjkuG0Ioi3HBwPFce0O+v//ve+aOq1oeCy7jMV2qzzAlpsNuqpqCBjjriM1lbtZbF/Q8jVyA=="
- },
- "node_modules/sass-loader": {
- "version": "12.6.0",
- "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-12.6.0.tgz",
- "integrity": "sha512-oLTaH0YCtX4cfnJZxKSLAyglED0naiYfNG1iXfU5w1LNZ+ukoA5DtyDIN5zmKVZwYNJP4KRc5Y3hkWga+7tYfA==",
- "dependencies": {
- "klona": "^2.0.4",
- "neo-async": "^2.6.2"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "fibers": ">= 3.1.0",
- "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0",
- "sass": "^1.3.0",
- "sass-embedded": "*",
- "webpack": "^5.0.0"
- },
- "peerDependenciesMeta": {
- "fibers": {
- "optional": true
- },
- "node-sass": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "sass-embedded": {
- "optional": true
- }
- }
- },
- "node_modules/sax": {
- "version": "1.2.4",
- "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
- "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw=="
- },
- "node_modules/saxes": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz",
- "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==",
- "dependencies": {
- "xmlchars": "^2.2.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/scheduler": {
- "version": "0.20.2",
- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz",
- "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==",
- "dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
- }
- },
- "node_modules/schema-utils": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz",
- "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==",
- "dependencies": {
- "@types/json-schema": "^7.0.8",
- "ajv": "^6.12.5",
- "ajv-keywords": "^3.5.2"
- },
- "engines": {
- "node": ">= 10.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- }
- },
- "node_modules/select-hose": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz",
- "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo="
- },
- "node_modules/selfsigned": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.0.tgz",
- "integrity": "sha512-cUdFiCbKoa1mZ6osuJs2uDHrs0k0oprsKveFiiaBKCNq3SYyb5gs2HxhQyDNLCmL51ZZThqi4YNDpCK6GOP1iQ==",
- "dependencies": {
- "node-forge": "^1.2.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/semver": {
- "version": "7.3.5",
- "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
- "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
- "dependencies": {
- "lru-cache": "^6.0.0"
- },
- "bin": {
- "semver": "bin/semver.js"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/send": {
- "version": "0.17.2",
- "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz",
- "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==",
- "dependencies": {
- "debug": "2.6.9",
- "depd": "~1.1.2",
- "destroy": "~1.0.4",
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "etag": "~1.8.1",
- "fresh": "0.5.2",
- "http-errors": "1.8.1",
- "mime": "1.6.0",
- "ms": "2.1.3",
- "on-finished": "~2.3.0",
- "range-parser": "~1.2.1",
- "statuses": "~1.5.0"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/send/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/send/node_modules/debug/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "node_modules/send/node_modules/ms": {
- "version": "2.1.3",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
- "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
- },
- "node_modules/serialize-javascript": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz",
- "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==",
- "dependencies": {
- "randombytes": "^2.1.0"
- }
- },
- "node_modules/serve-index": {
- "version": "1.9.1",
- "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz",
- "integrity": "sha1-03aNabHn2C5c4FD/9bRTvqEqkjk=",
- "dependencies": {
- "accepts": "~1.3.4",
- "batch": "0.6.1",
- "debug": "2.6.9",
- "escape-html": "~1.0.3",
- "http-errors": "~1.6.2",
- "mime-types": "~2.1.17",
- "parseurl": "~1.3.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/serve-index/node_modules/debug": {
- "version": "2.6.9",
- "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
- "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
- "dependencies": {
- "ms": "2.0.0"
- }
- },
- "node_modules/serve-index/node_modules/http-errors": {
- "version": "1.6.3",
- "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
- "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
- "dependencies": {
- "depd": "~1.1.2",
- "inherits": "2.0.3",
- "setprototypeof": "1.1.0",
- "statuses": ">= 1.4.0 < 2"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/serve-index/node_modules/inherits": {
- "version": "2.0.3",
- "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
- "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
- },
- "node_modules/serve-index/node_modules/ms": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
- "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
- },
- "node_modules/serve-index/node_modules/setprototypeof": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz",
- "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ=="
- },
- "node_modules/serve-static": {
- "version": "1.14.2",
- "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz",
- "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==",
- "dependencies": {
- "encodeurl": "~1.0.2",
- "escape-html": "~1.0.3",
- "parseurl": "~1.3.3",
- "send": "0.17.2"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/setprototypeof": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
- "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
- },
- "node_modules/shebang-command": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
- "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
- "dependencies": {
- "shebang-regex": "^3.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shebang-regex": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
- "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/shell-quote": {
- "version": "1.7.3",
- "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz",
- "integrity": "sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw=="
- },
- "node_modules/side-channel": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
- "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
- "dependencies": {
- "call-bind": "^1.0.0",
- "get-intrinsic": "^1.0.2",
- "object-inspect": "^1.9.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/signal-exit": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
- "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
- },
- "node_modules/sisteransi": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz",
- "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg=="
- },
- "node_modules/slash": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz",
- "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/sockjs": {
- "version": "0.3.24",
- "resolved": "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz",
- "integrity": "sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ==",
- "dependencies": {
- "faye-websocket": "^0.11.3",
- "uuid": "^8.3.2",
- "websocket-driver": "^0.7.4"
- }
- },
- "node_modules/source-list-map": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz",
- "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw=="
- },
- "node_modules/source-map": {
- "version": "0.5.7",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
- "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/source-map-js": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
- "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/source-map-loader": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/source-map-loader/-/source-map-loader-3.0.1.tgz",
- "integrity": "sha512-Vp1UsfyPvgujKQzi4pyDiTOnE3E4H+yHvkVRN3c/9PJmQS4CQJExvcDvaX/D+RV+xQben9HJ56jMJS3CgUeWyA==",
- "dependencies": {
- "abab": "^2.0.5",
- "iconv-lite": "^0.6.3",
- "source-map-js": "^1.0.1"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^5.0.0"
- }
- },
- "node_modules/source-map-resolve": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz",
- "integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==",
- "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated",
- "dependencies": {
- "atob": "^2.1.2",
- "decode-uri-component": "^0.2.0"
- }
- },
- "node_modules/source-map-support": {
- "version": "0.5.21",
- "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
- "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
- "dependencies": {
- "buffer-from": "^1.0.0",
- "source-map": "^0.6.0"
- }
- },
- "node_modules/source-map-support/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/sourcemap-codec": {
- "version": "1.4.8",
- "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
- "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA=="
- },
- "node_modules/spdy": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz",
- "integrity": "sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA==",
- "dependencies": {
- "debug": "^4.1.0",
- "handle-thing": "^2.0.0",
- "http-deceiver": "^1.2.7",
- "select-hose": "^2.0.0",
- "spdy-transport": "^3.0.0"
- },
- "engines": {
- "node": ">=6.0.0"
- }
- },
- "node_modules/spdy-transport": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz",
- "integrity": "sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw==",
- "dependencies": {
- "debug": "^4.1.0",
- "detect-node": "^2.0.4",
- "hpack.js": "^2.1.6",
- "obuf": "^1.1.2",
- "readable-stream": "^3.0.6",
- "wbuf": "^1.7.3"
- }
- },
- "node_modules/sprintf-js": {
- "version": "1.0.3",
- "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
- "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
- },
- "node_modules/stable": {
- "version": "0.1.8",
- "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz",
- "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w=="
- },
- "node_modules/stack-utils": {
- "version": "2.0.5",
- "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz",
- "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==",
- "dependencies": {
- "escape-string-regexp": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/stack-utils/node_modules/escape-string-regexp": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
- "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/stackframe": {
- "version": "1.2.1",
- "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.2.1.tgz",
- "integrity": "sha512-h88QkzREN/hy8eRdyNhhsO7RSJ5oyTqxxmmn0dzBIMUclZsjpfmrsg81vp8mjjAs2vAZ72nyWxRUwSwmh0e4xg=="
- },
- "node_modules/statuses": {
- "version": "1.5.0",
- "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
- "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=",
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/string_decoder": {
- "version": "1.3.0",
- "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
- "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
- "dependencies": {
- "safe-buffer": "~5.2.0"
- }
- },
- "node_modules/string_decoder/node_modules/safe-buffer": {
- "version": "5.2.1",
- "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
- "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
- "funding": [
- {
- "type": "github",
- "url": "https://github.com/sponsors/feross"
- },
- {
- "type": "patreon",
- "url": "https://www.patreon.com/feross"
- },
- {
- "type": "consulting",
- "url": "https://feross.org/support"
- }
- ]
- },
- "node_modules/string-length": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz",
- "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==",
- "dependencies": {
- "char-regex": "^1.0.2",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/string-natural-compare": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/string-natural-compare/-/string-natural-compare-3.0.1.tgz",
- "integrity": "sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw=="
- },
- "node_modules/string-width": {
- "version": "4.2.3",
- "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
- "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
- "dependencies": {
- "emoji-regex": "^8.0.0",
- "is-fullwidth-code-point": "^3.0.0",
- "strip-ansi": "^6.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/string-width/node_modules/emoji-regex": {
- "version": "8.0.0",
- "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
- "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
- },
- "node_modules/string.prototype.matchall": {
- "version": "4.0.7",
- "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.7.tgz",
- "integrity": "sha512-f48okCX7JiwVi1NXCVWcFnZgADDC/n2vePlQ/KUCNqCikLLilQvwjMO8+BHVKvgzH0JB0J9LEPgxOGT02RoETg==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3",
- "es-abstract": "^1.19.1",
- "get-intrinsic": "^1.1.1",
- "has-symbols": "^1.0.3",
- "internal-slot": "^1.0.3",
- "regexp.prototype.flags": "^1.4.1",
- "side-channel": "^1.0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/string.prototype.trimend": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
- "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/string.prototype.trimstart": {
- "version": "1.0.4",
- "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
- "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
- "dependencies": {
- "call-bind": "^1.0.2",
- "define-properties": "^1.1.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/stringify-object": {
- "version": "3.3.0",
- "resolved": "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz",
- "integrity": "sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw==",
- "dependencies": {
- "get-own-enumerable-property-symbols": "^3.0.0",
- "is-obj": "^1.0.1",
- "is-regexp": "^1.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/strip-ansi": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
- "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
- "dependencies": {
- "ansi-regex": "^5.0.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-bom": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz",
- "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-comments": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/strip-comments/-/strip-comments-2.0.1.tgz",
- "integrity": "sha512-ZprKx+bBLXv067WTCALv8SSz5l2+XhpYCsVtSqlMnkAXMWDq+/ekVbl1ghqP9rUHTzv6sm/DwCOiYutU/yp1fw==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/strip-final-newline": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz",
- "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/strip-indent": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz",
- "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==",
- "dependencies": {
- "min-indent": "^1.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/strip-json-comments": {
- "version": "3.1.1",
- "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
- "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/style-loader": {
- "version": "3.3.1",
- "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz",
- "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==",
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^5.0.0"
- }
- },
- "node_modules/stylehacks": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz",
- "integrity": "sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q==",
- "dependencies": {
- "browserslist": "^4.16.6",
- "postcss-selector-parser": "^6.0.4"
- },
- "engines": {
- "node": "^10 || ^12 || >=14.0"
- },
- "peerDependencies": {
- "postcss": "^8.2.15"
- }
- },
- "node_modules/supports-color": {
- "version": "5.5.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
- "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
- "dependencies": {
- "has-flag": "^3.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/supports-hyperlinks": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz",
- "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==",
- "dependencies": {
- "has-flag": "^4.0.0",
- "supports-color": "^7.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/supports-hyperlinks/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/supports-hyperlinks/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/supports-preserve-symlinks-flag": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
- "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
- "engines": {
- "node": ">= 0.4"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/svg-parser": {
- "version": "2.0.4",
- "resolved": "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz",
- "integrity": "sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ=="
- },
- "node_modules/svgo": {
- "version": "1.3.2",
- "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz",
- "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==",
- "deprecated": "This SVGO version is no longer supported. Upgrade to v2.x.x.",
- "dependencies": {
- "chalk": "^2.4.1",
- "coa": "^2.0.2",
- "css-select": "^2.0.0",
- "css-select-base-adapter": "^0.1.1",
- "css-tree": "1.0.0-alpha.37",
- "csso": "^4.0.2",
- "js-yaml": "^3.13.1",
- "mkdirp": "~0.5.1",
- "object.values": "^1.1.0",
- "sax": "~1.2.4",
- "stable": "^0.1.8",
- "unquote": "~1.1.1",
- "util.promisify": "~1.0.0"
- },
- "bin": {
- "svgo": "bin/svgo"
- },
- "engines": {
- "node": ">=4.0.0"
- }
- },
- "node_modules/svgo/node_modules/css-select": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz",
- "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==",
- "dependencies": {
- "boolbase": "^1.0.0",
- "css-what": "^3.2.1",
- "domutils": "^1.7.0",
- "nth-check": "^1.0.2"
- }
- },
- "node_modules/svgo/node_modules/css-what": {
- "version": "3.4.2",
- "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz",
- "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==",
- "engines": {
- "node": ">= 6"
- },
- "funding": {
- "url": "https://github.com/sponsors/fb55"
- }
- },
- "node_modules/svgo/node_modules/dom-serializer": {
- "version": "0.2.2",
- "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
- "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
- "dependencies": {
- "domelementtype": "^2.0.1",
- "entities": "^2.0.0"
- }
- },
- "node_modules/svgo/node_modules/domutils": {
- "version": "1.7.0",
- "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz",
- "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==",
- "dependencies": {
- "dom-serializer": "0",
- "domelementtype": "1"
- }
- },
- "node_modules/svgo/node_modules/domutils/node_modules/domelementtype": {
- "version": "1.3.1",
- "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz",
- "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w=="
- },
- "node_modules/svgo/node_modules/nth-check": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz",
- "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==",
- "dependencies": {
- "boolbase": "~1.0.0"
- }
- },
- "node_modules/symbol-tree": {
- "version": "3.2.4",
- "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",
- "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw=="
- },
- "node_modules/tailwindcss": {
- "version": "3.0.23",
- "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-3.0.23.tgz",
- "integrity": "sha512-+OZOV9ubyQ6oI2BXEhzw4HrqvgcARY38xv3zKcjnWtMIZstEsXdI9xftd1iB7+RbOnj2HOEzkA0OyB5BaSxPQA==",
- "dependencies": {
- "arg": "^5.0.1",
- "chalk": "^4.1.2",
- "chokidar": "^3.5.3",
- "color-name": "^1.1.4",
- "cosmiconfig": "^7.0.1",
- "detective": "^5.2.0",
- "didyoumean": "^1.2.2",
- "dlv": "^1.1.3",
- "fast-glob": "^3.2.11",
- "glob-parent": "^6.0.2",
- "is-glob": "^4.0.3",
- "normalize-path": "^3.0.0",
- "object-hash": "^2.2.0",
- "postcss": "^8.4.6",
- "postcss-js": "^4.0.0",
- "postcss-load-config": "^3.1.0",
- "postcss-nested": "5.0.6",
- "postcss-selector-parser": "^6.0.9",
- "postcss-value-parser": "^4.2.0",
- "quick-lru": "^5.1.1",
- "resolve": "^1.22.0"
- },
- "bin": {
- "tailwind": "lib/cli.js",
- "tailwindcss": "lib/cli.js"
- },
- "engines": {
- "node": ">=12.13.0"
- },
- "peerDependencies": {
- "autoprefixer": "^10.0.2",
- "postcss": "^8.0.9"
- }
- },
- "node_modules/tailwindcss/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/tailwindcss/node_modules/chalk": {
- "version": "4.1.2",
- "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
- "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
- "dependencies": {
- "ansi-styles": "^4.1.0",
- "supports-color": "^7.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/chalk?sponsor=1"
- }
- },
- "node_modules/tailwindcss/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/tailwindcss/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/tailwindcss/node_modules/has-flag": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
- "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/tailwindcss/node_modules/supports-color": {
- "version": "7.2.0",
- "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
- "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
- "dependencies": {
- "has-flag": "^4.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/tapable": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz",
- "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==",
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/temp-dir": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/temp-dir/-/temp-dir-2.0.0.tgz",
- "integrity": "sha512-aoBAniQmmwtcKp/7BzsH8Cxzv8OL736p7v1ihGb5e9DJ9kTwGWHrQrVB5+lfVDzfGrdRzXch+ig7LHaY1JTOrg==",
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/tempy": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/tempy/-/tempy-0.6.0.tgz",
- "integrity": "sha512-G13vtMYPT/J8A4X2SjdtBTphZlrp1gKv6hZiOjw14RCWg6GbHuQBGtjlx75xLbYV/wEc0D7G5K4rxKP/cXk8Bw==",
- "dependencies": {
- "is-stream": "^2.0.0",
- "temp-dir": "^2.0.0",
- "type-fest": "^0.16.0",
- "unique-string": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/tempy/node_modules/type-fest": {
- "version": "0.16.0",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz",
- "integrity": "sha512-eaBzG6MxNzEn9kiwvtre90cXaNLkmadMWa1zQMs3XORCXNbsH/OewwbxC5ia9dCxIxnTAsSxXJaa/p5y8DlvJg==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/terminal-link": {
- "version": "2.1.1",
- "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz",
- "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==",
- "dependencies": {
- "ansi-escapes": "^4.2.1",
- "supports-hyperlinks": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/terser": {
- "version": "5.12.1",
- "resolved": "https://registry.npmjs.org/terser/-/terser-5.12.1.tgz",
- "integrity": "sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==",
- "dependencies": {
- "acorn": "^8.5.0",
- "commander": "^2.20.0",
- "source-map": "~0.7.2",
- "source-map-support": "~0.5.20"
- },
- "bin": {
- "terser": "bin/terser"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/terser-webpack-plugin": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz",
- "integrity": "sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==",
- "dependencies": {
- "jest-worker": "^27.4.5",
- "schema-utils": "^3.1.1",
- "serialize-javascript": "^6.0.0",
- "source-map": "^0.6.1",
- "terser": "^5.7.2"
- },
- "engines": {
- "node": ">= 10.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^5.1.0"
- },
- "peerDependenciesMeta": {
- "@swc/core": {
- "optional": true
- },
- "esbuild": {
- "optional": true
- },
- "uglify-js": {
- "optional": true
- }
- }
- },
- "node_modules/terser-webpack-plugin/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/terser/node_modules/commander": {
- "version": "2.20.3",
- "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
- "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
- },
- "node_modules/terser/node_modules/source-map": {
- "version": "0.7.3",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
- "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/test-exclude": {
- "version": "6.0.0",
- "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
- "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
- "dependencies": {
- "@istanbuljs/schema": "^0.1.2",
- "glob": "^7.1.4",
- "minimatch": "^3.0.4"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/text-table": {
- "version": "0.2.0",
- "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
- "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ="
- },
- "node_modules/throat": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz",
- "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w=="
- },
- "node_modules/thunky": {
- "version": "1.1.0",
- "resolved": "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz",
- "integrity": "sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA=="
- },
- "node_modules/timsort": {
- "version": "0.3.0",
- "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz",
- "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q="
- },
- "node_modules/tmpl": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz",
- "integrity": "sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw=="
- },
- "node_modules/to-fast-properties": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
- "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/to-regex-range": {
- "version": "5.0.1",
- "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
- "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
- "dependencies": {
- "is-number": "^7.0.0"
- },
- "engines": {
- "node": ">=8.0"
- }
- },
- "node_modules/toidentifier": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
- "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
- "engines": {
- "node": ">=0.6"
- }
- },
- "node_modules/tough-cookie": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz",
- "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==",
- "dependencies": {
- "psl": "^1.1.33",
- "punycode": "^2.1.1",
- "universalify": "^0.1.2"
- },
- "engines": {
- "node": ">=6"
- }
- },
- "node_modules/tough-cookie/node_modules/universalify": {
- "version": "0.1.2",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
- "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
- "engines": {
- "node": ">= 4.0.0"
- }
- },
- "node_modules/tr46": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz",
- "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==",
- "dependencies": {
- "punycode": "^2.1.1"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/tryer": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/tryer/-/tryer-1.0.1.tgz",
- "integrity": "sha512-c3zayb8/kWWpycWYg87P71E1S1ZL6b6IJxfb5fvsUgsf0S2MVGaDhDXXjDMpdCpfWXqptc+4mXwmiy1ypXqRAA=="
- },
- "node_modules/tsconfig-paths": {
- "version": "3.14.0",
- "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.0.tgz",
- "integrity": "sha512-cg/1jAZoL57R39+wiw4u/SCC6Ic9Q5NqjBOb+9xISedOYurfog9ZNmKJSxAnb2m/5Bq4lE9lhUcau33Ml8DM0g==",
- "dependencies": {
- "@types/json5": "^0.0.29",
- "json5": "^1.0.1",
- "minimist": "^1.2.0",
- "strip-bom": "^3.0.0"
- }
- },
- "node_modules/tsconfig-paths/node_modules/json5": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz",
- "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==",
- "dependencies": {
- "minimist": "^1.2.0"
- },
- "bin": {
- "json5": "lib/cli.js"
- }
- },
- "node_modules/tsconfig-paths/node_modules/strip-bom": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
- "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/tslib": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
- "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
- },
- "node_modules/tsutils": {
- "version": "3.21.0",
- "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz",
- "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==",
- "dependencies": {
- "tslib": "^1.8.1"
- },
- "engines": {
- "node": ">= 6"
- },
- "peerDependencies": {
- "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta"
- }
- },
- "node_modules/tsutils/node_modules/tslib": {
- "version": "1.14.1",
- "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
- "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
- },
- "node_modules/type-check": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
- "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
- "dependencies": {
- "prelude-ls": "^1.2.1"
- },
- "engines": {
- "node": ">= 0.8.0"
- }
- },
- "node_modules/type-detect": {
- "version": "4.0.8",
- "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
- "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/type-fest": {
- "version": "0.21.3",
- "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
- "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- },
- "node_modules/type-is": {
- "version": "1.6.18",
- "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
- "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
- "dependencies": {
- "media-typer": "0.3.0",
- "mime-types": "~2.1.24"
- },
- "engines": {
- "node": ">= 0.6"
- }
- },
- "node_modules/typedarray-to-buffer": {
- "version": "3.1.5",
- "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
- "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
- "dependencies": {
- "is-typedarray": "^1.0.0"
- }
- },
- "node_modules/typescript": {
- "version": "4.6.2",
- "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.6.2.tgz",
- "integrity": "sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==",
- "peer": true,
- "bin": {
- "tsc": "bin/tsc",
- "tsserver": "bin/tsserver"
- },
- "engines": {
- "node": ">=4.2.0"
- }
- },
- "node_modules/unbox-primitive": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
- "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
- "dependencies": {
- "function-bind": "^1.1.1",
- "has-bigints": "^1.0.1",
- "has-symbols": "^1.0.2",
- "which-boxed-primitive": "^1.0.2"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/unicode-canonical-property-names-ecmascript": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
- "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/unicode-match-property-ecmascript": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz",
- "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==",
- "dependencies": {
- "unicode-canonical-property-names-ecmascript": "^2.0.0",
- "unicode-property-aliases-ecmascript": "^2.0.0"
- },
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/unicode-match-property-value-ecmascript": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz",
- "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/unicode-property-aliases-ecmascript": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz",
- "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==",
- "engines": {
- "node": ">=4"
- }
- },
- "node_modules/unique-string": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz",
- "integrity": "sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg==",
- "dependencies": {
- "crypto-random-string": "^2.0.0"
- },
- "engines": {
- "node": ">=8"
- }
- },
- "node_modules/universalify": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
- "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
- "engines": {
- "node": ">= 10.0.0"
- }
- },
- "node_modules/unpipe": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
- "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/unquote": {
- "version": "1.1.1",
- "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz",
- "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ="
- },
- "node_modules/upath": {
- "version": "1.2.0",
- "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
- "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
- "engines": {
- "node": ">=4",
- "yarn": "*"
- }
- },
- "node_modules/uri-js": {
- "version": "4.4.1",
- "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
- "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
- "dependencies": {
- "punycode": "^2.1.0"
- }
- },
- "node_modules/util-deprecate": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
- "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
- },
- "node_modules/util.promisify": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz",
- "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==",
- "dependencies": {
- "define-properties": "^1.1.3",
- "es-abstract": "^1.17.2",
- "has-symbols": "^1.0.1",
- "object.getownpropertydescriptors": "^2.1.0"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/utila": {
- "version": "0.4.0",
- "resolved": "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz",
- "integrity": "sha1-ihagXURWV6Oupe7MWxKk+lN5dyw="
- },
- "node_modules/utils-merge": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
- "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=",
- "engines": {
- "node": ">= 0.4.0"
- }
- },
- "node_modules/uuid": {
- "version": "8.3.2",
- "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
- "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
- "bin": {
- "uuid": "dist/bin/uuid"
- }
- },
- "node_modules/v8-compile-cache": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
- "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA=="
- },
- "node_modules/v8-to-istanbul": {
- "version": "8.1.1",
- "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.1.1.tgz",
- "integrity": "sha512-FGtKtv3xIpR6BYhvgH8MI/y78oT7d8Au3ww4QIxymrCtZEh5b8gCw2siywE+puhEmuWKDtmfrvF5UlB298ut3w==",
- "dependencies": {
- "@types/istanbul-lib-coverage": "^2.0.1",
- "convert-source-map": "^1.6.0",
- "source-map": "^0.7.3"
- },
- "engines": {
- "node": ">=10.12.0"
- }
- },
- "node_modules/v8-to-istanbul/node_modules/source-map": {
- "version": "0.7.3",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
- "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/vary": {
- "version": "1.1.2",
- "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
- "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
- "engines": {
- "node": ">= 0.8"
- }
- },
- "node_modules/w3c-hr-time": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz",
- "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==",
- "dependencies": {
- "browser-process-hrtime": "^1.0.0"
- }
- },
- "node_modules/w3c-xmlserializer": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz",
- "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==",
- "dependencies": {
- "xml-name-validator": "^3.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/walker": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.8.tgz",
- "integrity": "sha512-ts/8E8l5b7kY0vlWLewOkDXMmPdLcVV4GmOQLyxuSswIJsweeFZtAsMF7k1Nszz+TYBQrlYRmzOnr398y1JemQ==",
- "dependencies": {
- "makeerror": "1.0.12"
- }
- },
- "node_modules/watchpack": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.3.1.tgz",
- "integrity": "sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==",
- "dependencies": {
- "glob-to-regexp": "^0.4.1",
- "graceful-fs": "^4.1.2"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/wbuf": {
- "version": "1.7.3",
- "resolved": "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz",
- "integrity": "sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA==",
- "dependencies": {
- "minimalistic-assert": "^1.0.0"
- }
- },
- "node_modules/web-vitals": {
- "version": "2.1.4",
- "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-2.1.4.tgz",
- "integrity": "sha512-sVWcwhU5mX6crfI5Vd2dC4qchyTqxV8URinzt25XqVh+bHEPGH4C3NPrNionCP7Obx59wrYEbNlw4Z8sjALzZg=="
- },
- "node_modules/webidl-conversions": {
- "version": "6.1.0",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz",
- "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==",
- "engines": {
- "node": ">=10.4"
- }
- },
- "node_modules/webpack": {
- "version": "5.70.0",
- "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.70.0.tgz",
- "integrity": "sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==",
- "dependencies": {
- "@types/eslint-scope": "^3.7.3",
- "@types/estree": "^0.0.51",
- "@webassemblyjs/ast": "1.11.1",
- "@webassemblyjs/wasm-edit": "1.11.1",
- "@webassemblyjs/wasm-parser": "1.11.1",
- "acorn": "^8.4.1",
- "acorn-import-assertions": "^1.7.6",
- "browserslist": "^4.14.5",
- "chrome-trace-event": "^1.0.2",
- "enhanced-resolve": "^5.9.2",
- "es-module-lexer": "^0.9.0",
- "eslint-scope": "5.1.1",
- "events": "^3.2.0",
- "glob-to-regexp": "^0.4.1",
- "graceful-fs": "^4.2.9",
- "json-parse-better-errors": "^1.0.2",
- "loader-runner": "^4.2.0",
- "mime-types": "^2.1.27",
- "neo-async": "^2.6.2",
- "schema-utils": "^3.1.0",
- "tapable": "^2.1.1",
- "terser-webpack-plugin": "^5.1.3",
- "watchpack": "^2.3.1",
- "webpack-sources": "^3.2.3"
- },
- "bin": {
- "webpack": "bin/webpack.js"
- },
- "engines": {
- "node": ">=10.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependenciesMeta": {
- "webpack-cli": {
- "optional": true
- }
- }
- },
- "node_modules/webpack-dev-middleware": {
- "version": "5.3.1",
- "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.1.tgz",
- "integrity": "sha512-81EujCKkyles2wphtdrnPg/QqegC/AtqNH//mQkBYSMqwFVCQrxM6ktB2O/SPlZy7LqeEfTbV3cZARGQz6umhg==",
- "dependencies": {
- "colorette": "^2.0.10",
- "memfs": "^3.4.1",
- "mime-types": "^2.1.31",
- "range-parser": "^1.2.1",
- "schema-utils": "^4.0.0"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "webpack": "^4.0.0 || ^5.0.0"
- }
- },
- "node_modules/webpack-dev-middleware/node_modules/ajv": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
- "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/webpack-dev-middleware/node_modules/ajv-keywords": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
- "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.3"
- },
- "peerDependencies": {
- "ajv": "^8.8.2"
- }
- },
- "node_modules/webpack-dev-middleware/node_modules/json-schema-traverse": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
- "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
- },
- "node_modules/webpack-dev-middleware/node_modules/schema-utils": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
- "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
- "dependencies": {
- "@types/json-schema": "^7.0.9",
- "ajv": "^8.8.0",
- "ajv-formats": "^2.1.1",
- "ajv-keywords": "^5.0.0"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- }
- },
- "node_modules/webpack-dev-server": {
- "version": "4.7.4",
- "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.7.4.tgz",
- "integrity": "sha512-nfdsb02Zi2qzkNmgtZjkrMOcXnYZ6FLKcQwpxT7MvmHKc+oTtDsBju8j+NMyAygZ9GW1jMEUpy3itHtqgEhe1A==",
- "dependencies": {
- "@types/bonjour": "^3.5.9",
- "@types/connect-history-api-fallback": "^1.3.5",
- "@types/express": "^4.17.13",
- "@types/serve-index": "^1.9.1",
- "@types/sockjs": "^0.3.33",
- "@types/ws": "^8.2.2",
- "ansi-html-community": "^0.0.8",
- "bonjour": "^3.5.0",
- "chokidar": "^3.5.3",
- "colorette": "^2.0.10",
- "compression": "^1.7.4",
- "connect-history-api-fallback": "^1.6.0",
- "default-gateway": "^6.0.3",
- "del": "^6.0.0",
- "express": "^4.17.1",
- "graceful-fs": "^4.2.6",
- "html-entities": "^2.3.2",
- "http-proxy-middleware": "^2.0.0",
- "ipaddr.js": "^2.0.1",
- "open": "^8.0.9",
- "p-retry": "^4.5.0",
- "portfinder": "^1.0.28",
- "schema-utils": "^4.0.0",
- "selfsigned": "^2.0.0",
- "serve-index": "^1.9.1",
- "sockjs": "^0.3.21",
- "spdy": "^4.0.2",
- "strip-ansi": "^7.0.0",
- "webpack-dev-middleware": "^5.3.1",
- "ws": "^8.4.2"
- },
- "bin": {
- "webpack-dev-server": "bin/webpack-dev-server.js"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "peerDependencies": {
- "webpack": "^4.37.0 || ^5.0.0"
- },
- "peerDependenciesMeta": {
- "webpack-cli": {
- "optional": true
- }
- }
- },
- "node_modules/webpack-dev-server/node_modules/ajv": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
- "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/webpack-dev-server/node_modules/ajv-keywords": {
- "version": "5.1.0",
- "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz",
- "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.3"
- },
- "peerDependencies": {
- "ajv": "^8.8.2"
- }
- },
- "node_modules/webpack-dev-server/node_modules/ansi-regex": {
- "version": "6.0.1",
- "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz",
- "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==",
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-regex?sponsor=1"
- }
- },
- "node_modules/webpack-dev-server/node_modules/json-schema-traverse": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
- "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
- },
- "node_modules/webpack-dev-server/node_modules/schema-utils": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz",
- "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==",
- "dependencies": {
- "@types/json-schema": "^7.0.9",
- "ajv": "^8.8.0",
- "ajv-formats": "^2.1.1",
- "ajv-keywords": "^5.0.0"
- },
- "engines": {
- "node": ">= 12.13.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- }
- },
- "node_modules/webpack-dev-server/node_modules/strip-ansi": {
- "version": "7.0.1",
- "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz",
- "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==",
- "dependencies": {
- "ansi-regex": "^6.0.1"
- },
- "engines": {
- "node": ">=12"
- },
- "funding": {
- "url": "https://github.com/chalk/strip-ansi?sponsor=1"
- }
- },
- "node_modules/webpack-dev-server/node_modules/ws": {
- "version": "8.5.0",
- "resolved": "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz",
- "integrity": "sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg==",
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "bufferutil": "^4.0.1",
- "utf-8-validate": "^5.0.2"
- },
- "peerDependenciesMeta": {
- "bufferutil": {
- "optional": true
- },
- "utf-8-validate": {
- "optional": true
- }
- }
- },
- "node_modules/webpack-manifest-plugin": {
- "version": "4.1.1",
- "resolved": "https://registry.npmjs.org/webpack-manifest-plugin/-/webpack-manifest-plugin-4.1.1.tgz",
- "integrity": "sha512-YXUAwxtfKIJIKkhg03MKuiFAD72PlrqCiwdwO4VEXdRO5V0ORCNwaOwAZawPZalCbmH9kBDmXnNeQOw+BIEiow==",
- "dependencies": {
- "tapable": "^2.0.0",
- "webpack-sources": "^2.2.0"
- },
- "engines": {
- "node": ">=12.22.0"
- },
- "peerDependencies": {
- "webpack": "^4.44.2 || ^5.47.0"
- }
- },
- "node_modules/webpack-manifest-plugin/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/webpack-manifest-plugin/node_modules/webpack-sources": {
- "version": "2.3.1",
- "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.1.tgz",
- "integrity": "sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==",
- "dependencies": {
- "source-list-map": "^2.0.1",
- "source-map": "^0.6.1"
- },
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/webpack-sources": {
- "version": "3.2.3",
- "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
- "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
- "engines": {
- "node": ">=10.13.0"
- }
- },
- "node_modules/webpack/node_modules/eslint-scope": {
- "version": "5.1.1",
- "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
- "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
- "dependencies": {
- "esrecurse": "^4.3.0",
- "estraverse": "^4.1.1"
- },
- "engines": {
- "node": ">=8.0.0"
- }
- },
- "node_modules/webpack/node_modules/estraverse": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
- "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
- "engines": {
- "node": ">=4.0"
- }
- },
- "node_modules/websocket-driver": {
- "version": "0.7.4",
- "resolved": "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz",
- "integrity": "sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg==",
- "dependencies": {
- "http-parser-js": ">=0.5.1",
- "safe-buffer": ">=5.1.0",
- "websocket-extensions": ">=0.1.1"
- },
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/websocket-extensions": {
- "version": "0.1.4",
- "resolved": "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz",
- "integrity": "sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==",
- "engines": {
- "node": ">=0.8.0"
- }
- },
- "node_modules/whatwg-encoding": {
- "version": "1.0.5",
- "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz",
- "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==",
- "dependencies": {
- "iconv-lite": "0.4.24"
- }
- },
- "node_modules/whatwg-encoding/node_modules/iconv-lite": {
- "version": "0.4.24",
- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
- "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
- "dependencies": {
- "safer-buffer": ">= 2.1.2 < 3"
- },
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/whatwg-fetch": {
- "version": "3.6.2",
- "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.2.tgz",
- "integrity": "sha512-bJlen0FcuU/0EMLrdbJ7zOnW6ITZLrZMIarMUVmdKtsGvZna8vxKYaexICWPfZ8qwf9fzNq+UEIZrnSaApt6RA=="
- },
- "node_modules/whatwg-mimetype": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
- "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g=="
- },
- "node_modules/whatwg-url": {
- "version": "8.7.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz",
- "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==",
- "dependencies": {
- "lodash": "^4.7.0",
- "tr46": "^2.1.0",
- "webidl-conversions": "^6.1.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/which": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
- "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
- "dependencies": {
- "isexe": "^2.0.0"
- },
- "bin": {
- "node-which": "bin/node-which"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/which-boxed-primitive": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
- "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
- "dependencies": {
- "is-bigint": "^1.0.1",
- "is-boolean-object": "^1.1.0",
- "is-number-object": "^1.0.4",
- "is-string": "^1.0.5",
- "is-symbol": "^1.0.3"
- },
- "funding": {
- "url": "https://github.com/sponsors/ljharb"
- }
- },
- "node_modules/word-wrap": {
- "version": "1.2.3",
- "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
- "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/workbox-background-sync": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-background-sync/-/workbox-background-sync-6.5.1.tgz",
- "integrity": "sha512-T5a35fagLXQvV8Dr4+bDU+XYsP90jJ3eBLjZMKuCNELMQZNj+VekCODz1QK44jgoBeQk+vp94pkZV6G+e41pgg==",
- "dependencies": {
- "idb": "^6.1.4",
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/workbox-broadcast-update": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-broadcast-update/-/workbox-broadcast-update-6.5.1.tgz",
- "integrity": "sha512-mb/oyblyEpDbw167cCTyHnC3RqCnCQHtFYuYZd+QTpuExxM60qZuBH1AuQCgvLtDcztBKdEYK2VFD9SZYgRbaQ==",
- "dependencies": {
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/workbox-build": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-build/-/workbox-build-6.5.1.tgz",
- "integrity": "sha512-coDUDzHvFZ1ADOl3wKCsCSyOBvkPKlPgcQDb6LMMShN1zgF31Mev/1HzN3+9T2cjjWAgFwZKkuRyExqc1v21Zw==",
- "dependencies": {
- "@apideck/better-ajv-errors": "^0.3.1",
- "@babel/core": "^7.11.1",
- "@babel/preset-env": "^7.11.0",
- "@babel/runtime": "^7.11.2",
- "@rollup/plugin-babel": "^5.2.0",
- "@rollup/plugin-node-resolve": "^11.2.1",
- "@rollup/plugin-replace": "^2.4.1",
- "@surma/rollup-plugin-off-main-thread": "^2.2.3",
- "ajv": "^8.6.0",
- "common-tags": "^1.8.0",
- "fast-json-stable-stringify": "^2.1.0",
- "fs-extra": "^9.0.1",
- "glob": "^7.1.6",
- "lodash": "^4.17.20",
- "pretty-bytes": "^5.3.0",
- "rollup": "^2.43.1",
- "rollup-plugin-terser": "^7.0.0",
- "source-map": "^0.8.0-beta.0",
- "stringify-object": "^3.3.0",
- "strip-comments": "^2.0.1",
- "tempy": "^0.6.0",
- "upath": "^1.2.0",
- "workbox-background-sync": "6.5.1",
- "workbox-broadcast-update": "6.5.1",
- "workbox-cacheable-response": "6.5.1",
- "workbox-core": "6.5.1",
- "workbox-expiration": "6.5.1",
- "workbox-google-analytics": "6.5.1",
- "workbox-navigation-preload": "6.5.1",
- "workbox-precaching": "6.5.1",
- "workbox-range-requests": "6.5.1",
- "workbox-recipes": "6.5.1",
- "workbox-routing": "6.5.1",
- "workbox-strategies": "6.5.1",
- "workbox-streams": "6.5.1",
- "workbox-sw": "6.5.1",
- "workbox-window": "6.5.1"
- },
- "engines": {
- "node": ">=10.0.0"
- }
- },
- "node_modules/workbox-build/node_modules/@apideck/better-ajv-errors": {
- "version": "0.3.3",
- "resolved": "https://registry.npmjs.org/@apideck/better-ajv-errors/-/better-ajv-errors-0.3.3.tgz",
- "integrity": "sha512-9o+HO2MbJhJHjDYZaDxJmSDckvDpiuItEsrIShV0DXeCshXWRHhqYyU/PKHMkuClOmFnZhRd6wzv4vpDu/dRKg==",
- "dependencies": {
- "json-schema": "^0.4.0",
- "jsonpointer": "^5.0.0",
- "leven": "^3.1.0"
- },
- "engines": {
- "node": ">=10"
- },
- "peerDependencies": {
- "ajv": ">=8"
- }
- },
- "node_modules/workbox-build/node_modules/ajv": {
- "version": "8.10.0",
- "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz",
- "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==",
- "dependencies": {
- "fast-deep-equal": "^3.1.1",
- "json-schema-traverse": "^1.0.0",
- "require-from-string": "^2.0.2",
- "uri-js": "^4.2.2"
- },
- "funding": {
- "type": "github",
- "url": "https://github.com/sponsors/epoberezkin"
- }
- },
- "node_modules/workbox-build/node_modules/fs-extra": {
- "version": "9.1.0",
- "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz",
- "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==",
- "dependencies": {
- "at-least-node": "^1.0.0",
- "graceful-fs": "^4.2.0",
- "jsonfile": "^6.0.1",
- "universalify": "^2.0.0"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/workbox-build/node_modules/json-schema-traverse": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
- "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug=="
- },
- "node_modules/workbox-build/node_modules/source-map": {
- "version": "0.8.0-beta.0",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz",
- "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==",
- "dependencies": {
- "whatwg-url": "^7.0.0"
- },
- "engines": {
- "node": ">= 8"
- }
- },
- "node_modules/workbox-build/node_modules/tr46": {
- "version": "1.0.1",
- "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz",
- "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
- "dependencies": {
- "punycode": "^2.1.0"
- }
- },
- "node_modules/workbox-build/node_modules/webidl-conversions": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
- "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg=="
- },
- "node_modules/workbox-build/node_modules/whatwg-url": {
- "version": "7.1.0",
- "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz",
- "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==",
- "dependencies": {
- "lodash.sortby": "^4.7.0",
- "tr46": "^1.0.1",
- "webidl-conversions": "^4.0.2"
- }
- },
- "node_modules/workbox-cacheable-response": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-cacheable-response/-/workbox-cacheable-response-6.5.1.tgz",
- "integrity": "sha512-3TdtH/luDiytmM+Cn72HCBLZXmbeRNJqZx2yaVOfUZhj0IVwZqQXhNarlGE9/k6U5Jelb+TtpH2mLVhnzfiSMg==",
- "dependencies": {
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/workbox-core": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.5.1.tgz",
- "integrity": "sha512-qObXZ39aFJ2N8X7IUbGrJHKWguliCuU1jOXM/I4MTT84u9BiKD2rHMkIzgeRP1Ixu9+cXU4/XHJq3Cy0Qqc5hw=="
- },
- "node_modules/workbox-expiration": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-expiration/-/workbox-expiration-6.5.1.tgz",
- "integrity": "sha512-iY/cTADAQATMmPkUBRmQdacqq0TJd2wMHimBQz+tRnPGHSMH+/BoLPABPnu7O7rT/g/s59CUYYRGxe3mEgoJCA==",
- "dependencies": {
- "idb": "^6.1.4",
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/workbox-google-analytics": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-google-analytics/-/workbox-google-analytics-6.5.1.tgz",
- "integrity": "sha512-qZU46/h4dbionYT6Yk6iBkUwpiEzAfnO1W7KkI+AMmY7G9/gA03dQQ7rpTw8F4vWrG7ahTUGWDFv6fERtaw1BQ==",
- "dependencies": {
- "workbox-background-sync": "6.5.1",
- "workbox-core": "6.5.1",
- "workbox-routing": "6.5.1",
- "workbox-strategies": "6.5.1"
- }
- },
- "node_modules/workbox-navigation-preload": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-navigation-preload/-/workbox-navigation-preload-6.5.1.tgz",
- "integrity": "sha512-aKrgAbn2IMgzTowTi/ZyKdQUcES2m++9aGtpxqsX7Gn9ovCY8zcssaMEAMMwrIeveij5HiWNBrmj6MWDHi+0rg==",
- "dependencies": {
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/workbox-precaching": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-precaching/-/workbox-precaching-6.5.1.tgz",
- "integrity": "sha512-EzlPBxvmjGfE56YZzsT/vpVkpLG1XJhoplgXa5RPyVWLUL1LbwEAxhkrENElSS/R9tgiTw80IFwysidfUqLihg==",
- "dependencies": {
- "workbox-core": "6.5.1",
- "workbox-routing": "6.5.1",
- "workbox-strategies": "6.5.1"
- }
- },
- "node_modules/workbox-range-requests": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-range-requests/-/workbox-range-requests-6.5.1.tgz",
- "integrity": "sha512-57Da/qRbd9v33YlHX0rlSUVFmE4THCjKqwkmfhY3tNLnSKN2L5YBS3qhWeDO0IrMNgUj+rGve2moKYXeUqQt4A==",
- "dependencies": {
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/workbox-recipes": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-recipes/-/workbox-recipes-6.5.1.tgz",
- "integrity": "sha512-DGsyKygHggcGPQpWafC/Nmbm1Ny3sB2vE9r//3UbeidXiQ+pLF14KEG1/0NNGRaY+lfOXOagq6d1H7SC8KA+rA==",
- "dependencies": {
- "workbox-cacheable-response": "6.5.1",
- "workbox-core": "6.5.1",
- "workbox-expiration": "6.5.1",
- "workbox-precaching": "6.5.1",
- "workbox-routing": "6.5.1",
- "workbox-strategies": "6.5.1"
- }
- },
- "node_modules/workbox-routing": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.5.1.tgz",
- "integrity": "sha512-yAAncdTwanvlR8KPjubyvFKeAok8ZcIws6UKxvIAg0I+wsf7UYi93DXNuZr6RBSQrByrN6HkCyjuhmk8P63+PA==",
- "dependencies": {
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/workbox-strategies": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.5.1.tgz",
- "integrity": "sha512-JNaTXPy8wXzKkr+6za7/eJX9opoZk7UgY261I2kPxl80XQD8lMjz0vo9EOcBwvD72v3ZhGJbW84ZaDwFEhFvWA==",
- "dependencies": {
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/workbox-streams": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-streams/-/workbox-streams-6.5.1.tgz",
- "integrity": "sha512-7jaTWm6HRGJ/ewECnhb+UgjTT50R42E0/uNCC4eTKQwnLO/NzNGjoXTdQgFjo4zteR+L/K6AtFAiYKH3ZJbAYw==",
- "dependencies": {
- "workbox-core": "6.5.1",
- "workbox-routing": "6.5.1"
- }
- },
- "node_modules/workbox-sw": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-sw/-/workbox-sw-6.5.1.tgz",
- "integrity": "sha512-hVrQa19yo9wzN1fQQ/h2JlkzFpkuH2qzYT2/rk7CLaWt6tLnTJVFCNHlGRRPhytZSf++LoIy7zThT714sowT/Q=="
- },
- "node_modules/workbox-webpack-plugin": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-webpack-plugin/-/workbox-webpack-plugin-6.5.1.tgz",
- "integrity": "sha512-SHtlQBpKruI16CAYhICDMkgjXE2fH5Yp+D+1UmBfRVhByZYzusVOykvnPm8ObJb9d/tXgn9yoppoxafFS7D4vQ==",
- "dependencies": {
- "fast-json-stable-stringify": "^2.1.0",
- "pretty-bytes": "^5.4.1",
- "upath": "^1.2.0",
- "webpack-sources": "^1.4.3",
- "workbox-build": "6.5.1"
- },
- "engines": {
- "node": ">=10.0.0"
- },
- "peerDependencies": {
- "webpack": "^4.4.0 || ^5.9.0"
- }
- },
- "node_modules/workbox-webpack-plugin/node_modules/source-map": {
- "version": "0.6.1",
- "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
- "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
- "engines": {
- "node": ">=0.10.0"
- }
- },
- "node_modules/workbox-webpack-plugin/node_modules/webpack-sources": {
- "version": "1.4.3",
- "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz",
- "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==",
- "dependencies": {
- "source-list-map": "^2.0.0",
- "source-map": "~0.6.1"
- }
- },
- "node_modules/workbox-window": {
- "version": "6.5.1",
- "resolved": "https://registry.npmjs.org/workbox-window/-/workbox-window-6.5.1.tgz",
- "integrity": "sha512-oRlun9u7b7YEjo2fIDBqJkU2hXtrEljXcOytRhfeQRbqXxjUOpFgXSGRSAkmDx1MlKUNOSbr+zfi8h5n7In3yA==",
- "dependencies": {
- "@types/trusted-types": "^2.0.2",
- "workbox-core": "6.5.1"
- }
- },
- "node_modules/wrap-ansi": {
- "version": "7.0.0",
- "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
- "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
- "dependencies": {
- "ansi-styles": "^4.0.0",
- "string-width": "^4.1.0",
- "strip-ansi": "^6.0.0"
- },
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
- }
- },
- "node_modules/wrap-ansi/node_modules/ansi-styles": {
- "version": "4.3.0",
- "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
- "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
- "dependencies": {
- "color-convert": "^2.0.1"
- },
- "engines": {
- "node": ">=8"
- },
- "funding": {
- "url": "https://github.com/chalk/ansi-styles?sponsor=1"
- }
- },
- "node_modules/wrap-ansi/node_modules/color-convert": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
- "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
- "dependencies": {
- "color-name": "~1.1.4"
- },
- "engines": {
- "node": ">=7.0.0"
- }
- },
- "node_modules/wrap-ansi/node_modules/color-name": {
- "version": "1.1.4",
- "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
- "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
- },
- "node_modules/wrappy": {
- "version": "1.0.2",
- "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
- "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
- },
- "node_modules/write-file-atomic": {
- "version": "3.0.3",
- "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz",
- "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==",
- "dependencies": {
- "imurmurhash": "^0.1.4",
- "is-typedarray": "^1.0.0",
- "signal-exit": "^3.0.2",
- "typedarray-to-buffer": "^3.1.5"
- }
- },
- "node_modules/ws": {
- "version": "7.5.7",
- "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.7.tgz",
- "integrity": "sha512-KMvVuFzpKBuiIXW3E4u3mySRO2/mCHSyZDJQM5NQ9Q9KHWHWh0NHgfbRMLLrceUK5qAL4ytALJbpRMjixFZh8A==",
- "engines": {
- "node": ">=8.3.0"
- },
- "peerDependencies": {
- "bufferutil": "^4.0.1",
- "utf-8-validate": "^5.0.2"
- },
- "peerDependenciesMeta": {
- "bufferutil": {
- "optional": true
- },
- "utf-8-validate": {
- "optional": true
- }
- }
- },
- "node_modules/xml-name-validator": {
- "version": "3.0.0",
- "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
- "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw=="
- },
- "node_modules/xmlchars": {
- "version": "2.2.0",
- "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz",
- "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw=="
- },
- "node_modules/xtend": {
- "version": "4.0.2",
- "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
- "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
- "engines": {
- "node": ">=0.4"
- }
- },
- "node_modules/xterm": {
- "version": "4.18.0",
- "resolved": "https://registry.npmjs.org/xterm/-/xterm-4.18.0.tgz",
- "integrity": "sha512-JQoc1S0dti6SQfI0bK1AZvGnAxH4MVw45ZPFSO6FHTInAiau3Ix77fSxNx3mX4eh9OL4AYa8+4C8f5UvnSfppQ=="
- },
- "node_modules/xterm-addon-attach": {
- "version": "0.6.0",
- "resolved": "https://registry.npmjs.org/xterm-addon-attach/-/xterm-addon-attach-0.6.0.tgz",
- "integrity": "sha512-Mo8r3HTjI/EZfczVCwRU6jh438B4WLXxdFO86OB7bx0jGhwh2GdF4ifx/rP+OB+Cb2vmLhhVIZ00/7x3YSP3dg==",
- "peerDependencies": {
- "xterm": "^4.0.0"
- }
- },
- "node_modules/xterm-addon-fit": {
- "version": "0.5.0",
- "resolved": "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.5.0.tgz",
- "integrity": "sha512-DsS9fqhXHacEmsPxBJZvfj2la30Iz9xk+UKjhQgnYNkrUIN5CYLbw7WEfz117c7+S86S/tpHPfvNxJsF5/G8wQ==",
- "peerDependencies": {
- "xterm": "^4.0.0"
- }
- },
- "node_modules/y18n": {
- "version": "5.0.8",
- "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
- "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/yallist": {
- "version": "4.0.0",
- "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
- "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
- },
- "node_modules/yaml": {
- "version": "1.10.2",
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
- "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==",
- "engines": {
- "node": ">= 6"
- }
- },
- "node_modules/yargs": {
- "version": "16.2.0",
- "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
- "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
- "dependencies": {
- "cliui": "^7.0.2",
- "escalade": "^3.1.1",
- "get-caller-file": "^2.0.5",
- "require-directory": "^2.1.1",
- "string-width": "^4.2.0",
- "y18n": "^5.0.5",
- "yargs-parser": "^20.2.2"
- },
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/yargs-parser": {
- "version": "20.2.9",
- "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
- "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
- "engines": {
- "node": ">=10"
- }
- },
- "node_modules/yocto-queue": {
- "version": "0.1.0",
- "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
- "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
- "engines": {
- "node": ">=10"
- },
- "funding": {
- "url": "https://github.com/sponsors/sindresorhus"
- }
- }
- }
-}
diff --git a/node_modules/js-tokens/CHANGELOG.md b/node_modules/js-tokens/CHANGELOG.md
deleted file mode 100644
index 755e6f6..0000000
--- a/node_modules/js-tokens/CHANGELOG.md
+++ /dev/null
@@ -1,151 +0,0 @@
-### Version 4.0.0 (2018-01-28) ###
-
-- Added: Support for ES2018. The only change needed was recognizing the `s`
- regex flag.
-- Changed: _All_ tokens returned by the `matchToToken` function now have a
- `closed` property. It is set to `undefined` for the tokens where “closed”
- doesn’t make sense. This means that all tokens objects have the same shape,
- which might improve performance.
-
-These are the breaking changes:
-
-- `'/a/s'.match(jsTokens)` no longer returns `['/', 'a', '/', 's']`, but
- `['/a/s']`. (There are of course other variations of this.)
-- Code that rely on some token objects not having the `closed` property could
- now behave differently.
-
-
-### Version 3.0.2 (2017-06-28) ###
-
-- No code changes. Just updates to the readme.
-
-
-### Version 3.0.1 (2017-01-30) ###
-
-- Fixed: ES2015 unicode escapes with more than 6 hex digits are now matched
- correctly.
-
-
-### Version 3.0.0 (2017-01-11) ###
-
-This release contains one breaking change, that should [improve performance in
-V8][v8-perf]:
-
-> So how can you, as a JavaScript developer, ensure that your RegExps are fast?
-> If you are not interested in hooking into RegExp internals, make sure that
-> neither the RegExp instance, nor its prototype is modified in order to get the
-> best performance:
->
-> ```js
-> var re = /./g;
-> re.exec(''); // Fast path.
-> re.new_property = 'slow';
-> ```
-
-This module used to export a single regex, with `.matchToToken` bolted
-on, just like in the above example. This release changes the exports of
-the module to avoid this issue.
-
-Before:
-
-```js
-import jsTokens from "js-tokens"
-// or:
-var jsTokens = require("js-tokens")
-var matchToToken = jsTokens.matchToToken
-```
-
-After:
-
-```js
-import jsTokens, {matchToToken} from "js-tokens"
-// or:
-var jsTokens = require("js-tokens").default
-var matchToToken = require("js-tokens").matchToToken
-```
-
-[v8-perf]: http://v8project.blogspot.se/2017/01/speeding-up-v8-regular-expressions.html
-
-
-### Version 2.0.0 (2016-06-19) ###
-
-- Added: Support for ES2016. In other words, support for the `**` exponentiation
- operator.
-
-These are the breaking changes:
-
-- `'**'.match(jsTokens)` no longer returns `['*', '*']`, but `['**']`.
-- `'**='.match(jsTokens)` no longer returns `['*', '*=']`, but `['**=']`.
-
-
-### Version 1.0.3 (2016-03-27) ###
-
-- Improved: Made the regex ever so slightly smaller.
-- Updated: The readme.
-
-
-### Version 1.0.2 (2015-10-18) ###
-
-- Improved: Limited npm package contents for a smaller download. Thanks to
- @zertosh!
-
-
-### Version 1.0.1 (2015-06-20) ###
-
-- Fixed: Declared an undeclared variable.
-
-
-### Version 1.0.0 (2015-02-26) ###
-
-- Changed: Merged the 'operator' and 'punctuation' types into 'punctuator'. That
- type is now equivalent to the Punctuator token in the ECMAScript
- specification. (Backwards-incompatible change.)
-- Fixed: A `-` followed by a number is now correctly matched as a punctuator
- followed by a number. It used to be matched as just a number, but there is no
- such thing as negative number literals. (Possibly backwards-incompatible
- change.)
-
-
-### Version 0.4.1 (2015-02-21) ###
-
-- Added: Support for the regex `u` flag.
-
-
-### Version 0.4.0 (2015-02-21) ###
-
-- Improved: `jsTokens.matchToToken` performance.
-- Added: Support for octal and binary number literals.
-- Added: Support for template strings.
-
-
-### Version 0.3.1 (2015-01-06) ###
-
-- Fixed: Support for unicode spaces. They used to be allowed in names (which is
- very confusing), and some unicode newlines were wrongly allowed in strings and
- regexes.
-
-
-### Version 0.3.0 (2014-12-19) ###
-
-- Changed: The `jsTokens.names` array has been replaced with the
- `jsTokens.matchToToken` function. The capturing groups of `jsTokens` are no
- longer part of the public API; instead use said function. See this [gist] for
- an example. (Backwards-incompatible change.)
-- Changed: The empty string is now considered an “invalid” token, instead an
- “empty” token (its own group). (Backwards-incompatible change.)
-- Removed: component support. (Backwards-incompatible change.)
-
-[gist]: https://gist.github.com/lydell/be49dbf80c382c473004
-
-
-### Version 0.2.0 (2014-06-19) ###
-
-- Changed: Match ES6 function arrows (`=>`) as an operator, instead of its own
- category (“functionArrow”), for simplicity. (Backwards-incompatible change.)
-- Added: ES6 splats (`...`) are now matched as an operator (instead of three
- punctuations). (Backwards-incompatible change.)
-
-
-### Version 0.1.0 (2014-03-08) ###
-
-- Initial release.
diff --git a/node_modules/js-tokens/LICENSE b/node_modules/js-tokens/LICENSE
deleted file mode 100644
index 54aef52..0000000
--- a/node_modules/js-tokens/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014, 2015, 2016, 2017, 2018 Simon Lydell
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/js-tokens/README.md b/node_modules/js-tokens/README.md
deleted file mode 100644
index 00cdf16..0000000
--- a/node_modules/js-tokens/README.md
+++ /dev/null
@@ -1,240 +0,0 @@
-Overview [![Build Status](https://travis-ci.org/lydell/js-tokens.svg?branch=master)](https://travis-ci.org/lydell/js-tokens)
-========
-
-A regex that tokenizes JavaScript.
-
-```js
-var jsTokens = require("js-tokens").default
-
-var jsString = "var foo=opts.foo;\n..."
-
-jsString.match(jsTokens)
-// ["var", " ", "foo", "=", "opts", ".", "foo", ";", "\n", ...]
-```
-
-
-Installation
-============
-
-`npm install js-tokens`
-
-```js
-import jsTokens from "js-tokens"
-// or:
-var jsTokens = require("js-tokens").default
-```
-
-
-Usage
-=====
-
-### `jsTokens` ###
-
-A regex with the `g` flag that matches JavaScript tokens.
-
-The regex _always_ matches, even invalid JavaScript and the empty string.
-
-The next match is always directly after the previous.
-
-### `var token = matchToToken(match)` ###
-
-```js
-import {matchToToken} from "js-tokens"
-// or:
-var matchToToken = require("js-tokens").matchToToken
-```
-
-Takes a `match` returned by `jsTokens.exec(string)`, and returns a `{type:
-String, value: String}` object. The following types are available:
-
-- string
-- comment
-- regex
-- number
-- name
-- punctuator
-- whitespace
-- invalid
-
-Multi-line comments and strings also have a `closed` property indicating if the
-token was closed or not (see below).
-
-Comments and strings both come in several flavors. To distinguish them, check if
-the token starts with `//`, `/*`, `'`, `"` or `` ` ``.
-
-Names are ECMAScript IdentifierNames, that is, including both identifiers and
-keywords. You may use [is-keyword-js] to tell them apart.
-
-Whitespace includes both line terminators and other whitespace.
-
-[is-keyword-js]: https://github.com/crissdev/is-keyword-js
-
-
-ECMAScript support
-==================
-
-The intention is to always support the latest ECMAScript version whose feature
-set has been finalized.
-
-If adding support for a newer version requires changes, a new version with a
-major verion bump will be released.
-
-Currently, ECMAScript 2018 is supported.
-
-
-Invalid code handling
-=====================
-
-Unterminated strings are still matched as strings. JavaScript strings cannot
-contain (unescaped) newlines, so unterminated strings simply end at the end of
-the line. Unterminated template strings can contain unescaped newlines, though,
-so they go on to the end of input.
-
-Unterminated multi-line comments are also still matched as comments. They
-simply go on to the end of the input.
-
-Unterminated regex literals are likely matched as division and whatever is
-inside the regex.
-
-Invalid ASCII characters have their own capturing group.
-
-Invalid non-ASCII characters are treated as names, to simplify the matching of
-names (except unicode spaces which are treated as whitespace). Note: See also
-the [ES2018](#es2018) section.
-
-Regex literals may contain invalid regex syntax. They are still matched as
-regex literals. They may also contain repeated regex flags, to keep the regex
-simple.
-
-Strings may contain invalid escape sequences.
-
-
-Limitations
-===========
-
-Tokenizing JavaScript using regexes—in fact, _one single regex_—won’t be
-perfect. But that’s not the point either.
-
-You may compare jsTokens with [esprima] by using `esprima-compare.js`.
-See `npm run esprima-compare`!
-
-[esprima]: http://esprima.org/
-
-### Template string interpolation ###
-
-Template strings are matched as single tokens, from the starting `` ` `` to the
-ending `` ` ``, including interpolations (whose tokens are not matched
-individually).
-
-Matching template string interpolations requires recursive balancing of `{` and
-`}`—something that JavaScript regexes cannot do. Only one level of nesting is
-supported.
-
-### Division and regex literals collision ###
-
-Consider this example:
-
-```js
-var g = 9.82
-var number = bar / 2/g
-
-var regex = / 2/g
-```
-
-A human can easily understand that in the `number` line we’re dealing with
-division, and in the `regex` line we’re dealing with a regex literal. How come?
-Because humans can look at the whole code to put the `/` characters in context.
-A JavaScript regex cannot. It only sees forwards. (Well, ES2018 regexes can also
-look backwards. See the [ES2018](#es2018) section).
-
-When the `jsTokens` regex scans throught the above, it will see the following
-at the end of both the `number` and `regex` rows:
-
-```js
-/ 2/g
-```
-
-It is then impossible to know if that is a regex literal, or part of an
-expression dealing with division.
-
-Here is a similar case:
-
-```js
-foo /= 2/g
-foo(/= 2/g)
-```
-
-The first line divides the `foo` variable with `2/g`. The second line calls the
-`foo` function with the regex literal `/= 2/g`. Again, since `jsTokens` only
-sees forwards, it cannot tell the two cases apart.
-
-There are some cases where we _can_ tell division and regex literals apart,
-though.
-
-First off, we have the simple cases where there’s only one slash in the line:
-
-```js
-var foo = 2/g
-foo /= 2
-```
-
-Regex literals cannot contain newlines, so the above cases are correctly
-identified as division. Things are only problematic when there are more than
-one non-comment slash in a single line.
-
-Secondly, not every character is a valid regex flag.
-
-```js
-var number = bar / 2/e
-```
-
-The above example is also correctly identified as division, because `e` is not a
-valid regex flag. I initially wanted to future-proof by allowing `[a-zA-Z]*`
-(any letter) as flags, but it is not worth it since it increases the amount of
-ambigous cases. So only the standard `g`, `m`, `i`, `y` and `u` flags are
-allowed. This means that the above example will be identified as division as
-long as you don’t rename the `e` variable to some permutation of `gmiyus` 1 to 6
-characters long.
-
-Lastly, we can look _forward_ for information.
-
-- If the token following what looks like a regex literal is not valid after a
- regex literal, but is valid in a division expression, then the regex literal
- is treated as division instead. For example, a flagless regex cannot be
- followed by a string, number or name, but all of those three can be the
- denominator of a division.
-- Generally, if what looks like a regex literal is followed by an operator, the
- regex literal is treated as division instead. This is because regexes are
- seldomly used with operators (such as `+`, `*`, `&&` and `==`), but division
- could likely be part of such an expression.
-
-Please consult the regex source and the test cases for precise information on
-when regex or division is matched (should you need to know). In short, you
-could sum it up as:
-
-If the end of a statement looks like a regex literal (even if it isn’t), it
-will be treated as one. Otherwise it should work as expected (if you write sane
-code).
-
-### ES2018 ###
-
-ES2018 added some nice regex improvements to the language.
-
-- [Unicode property escapes] should allow telling names and invalid non-ASCII
- characters apart without blowing up the regex size.
-- [Lookbehind assertions] should allow matching telling division and regex
- literals apart in more cases.
-- [Named capture groups] might simplify some things.
-
-These things would be nice to do, but are not critical. They probably have to
-wait until the oldest maintained Node.js LTS release supports those features.
-
-[Unicode property escapes]: http://2ality.com/2017/07/regexp-unicode-property-escapes.html
-[Lookbehind assertions]: http://2ality.com/2017/05/regexp-lookbehind-assertions.html
-[Named capture groups]: http://2ality.com/2017/05/regexp-named-capture-groups.html
-
-
-License
-=======
-
-[MIT](LICENSE).
diff --git a/node_modules/js-tokens/index.js b/node_modules/js-tokens/index.js
deleted file mode 100644
index b23a4a0..0000000
--- a/node_modules/js-tokens/index.js
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell
-// License: MIT. (See LICENSE.)
-
-Object.defineProperty(exports, "__esModule", {
- value: true
-})
-
-// This regex comes from regex.coffee, and is inserted here by generate-index.js
-// (run `npm run build`).
-exports.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyus]{1,6}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g
-
-exports.matchToToken = function(match) {
- var token = {type: "invalid", value: match[0], closed: undefined}
- if (match[ 1]) token.type = "string" , token.closed = !!(match[3] || match[4])
- else if (match[ 5]) token.type = "comment"
- else if (match[ 6]) token.type = "comment", token.closed = !!match[7]
- else if (match[ 8]) token.type = "regex"
- else if (match[ 9]) token.type = "number"
- else if (match[10]) token.type = "name"
- else if (match[11]) token.type = "punctuator"
- else if (match[12]) token.type = "whitespace"
- return token
-}
diff --git a/node_modules/js-tokens/package.json b/node_modules/js-tokens/package.json
deleted file mode 100644
index 66752fa..0000000
--- a/node_modules/js-tokens/package.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "name": "js-tokens",
- "version": "4.0.0",
- "author": "Simon Lydell",
- "license": "MIT",
- "description": "A regex that tokenizes JavaScript.",
- "keywords": [
- "JavaScript",
- "js",
- "token",
- "tokenize",
- "regex"
- ],
- "files": [
- "index.js"
- ],
- "repository": "lydell/js-tokens",
- "scripts": {
- "test": "mocha --ui tdd",
- "esprima-compare": "node esprima-compare ./index.js everything.js/es5.js",
- "build": "node generate-index.js",
- "dev": "npm run build && npm test"
- },
- "devDependencies": {
- "coffeescript": "2.1.1",
- "esprima": "4.0.0",
- "everything.js": "1.0.3",
- "mocha": "5.0.0"
- }
-}
diff --git a/node_modules/loose-envify/LICENSE b/node_modules/loose-envify/LICENSE
deleted file mode 100644
index fbafb48..0000000
--- a/node_modules/loose-envify/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2015 Andres Suarez <zertosh@gmail.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/loose-envify/README.md b/node_modules/loose-envify/README.md
deleted file mode 100644
index 7f4e07b..0000000
--- a/node_modules/loose-envify/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-# loose-envify
-
-[![Build Status](https://travis-ci.org/zertosh/loose-envify.svg?branch=master)](https://travis-ci.org/zertosh/loose-envify)
-
-Fast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.
-
-## Gotchas
-
-* Doesn't handle broken syntax.
-* Doesn't look inside embedded expressions in template strings.
- - **this won't work:**
- ```js
- console.log(`the current env is ${process.env.NODE_ENV}`);
- ```
-* Doesn't replace oddly-spaced or oddly-commented expressions.
- - **this won't work:**
- ```js
- console.log(process./*won't*/env./*work*/NODE_ENV);
- ```
-
-## Usage/Options
-
-loose-envify has the exact same interface as [envify](https://github.com/hughsk/envify), including the CLI.
-
-## Benchmark
-
-```
-envify:
-
- $ for i in {1..5}; do node bench/bench.js 'envify'; done
- 708ms
- 727ms
- 791ms
- 719ms
- 720ms
-
-loose-envify:
-
- $ for i in {1..5}; do node bench/bench.js '../'; done
- 51ms
- 52ms
- 52ms
- 52ms
- 52ms
-```
diff --git a/node_modules/loose-envify/cli.js b/node_modules/loose-envify/cli.js
deleted file mode 100755
index c0b63cb..0000000
--- a/node_modules/loose-envify/cli.js
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env node
-'use strict';
-
-var looseEnvify = require('./');
-var fs = require('fs');
-
-if (process.argv[2]) {
- fs.createReadStream(process.argv[2], {encoding: 'utf8'})
- .pipe(looseEnvify(process.argv[2]))
- .pipe(process.stdout);
-} else {
- process.stdin.resume()
- process.stdin
- .pipe(looseEnvify(__filename))
- .pipe(process.stdout);
-}
diff --git a/node_modules/loose-envify/custom.js b/node_modules/loose-envify/custom.js
deleted file mode 100644
index 6389bfa..0000000
--- a/node_modules/loose-envify/custom.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// envify compatibility
-'use strict';
-
-module.exports = require('./loose-envify');
diff --git a/node_modules/loose-envify/index.js b/node_modules/loose-envify/index.js
deleted file mode 100644
index 8cd8305..0000000
--- a/node_modules/loose-envify/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./loose-envify')(process.env);
diff --git a/node_modules/loose-envify/loose-envify.js b/node_modules/loose-envify/loose-envify.js
deleted file mode 100644
index b5a5be2..0000000
--- a/node_modules/loose-envify/loose-envify.js
+++ /dev/null
@@ -1,36 +0,0 @@
-'use strict';
-
-var stream = require('stream');
-var util = require('util');
-var replace = require('./replace');
-
-var jsonExtRe = /\.json$/;
-
-module.exports = function(rootEnv) {
- rootEnv = rootEnv || process.env;
- return function (file, trOpts) {
- if (jsonExtRe.test(file)) {
- return stream.PassThrough();
- }
- var envs = trOpts ? [rootEnv, trOpts] : [rootEnv];
- return new LooseEnvify(envs);
- };
-};
-
-function LooseEnvify(envs) {
- stream.Transform.call(this);
- this._data = '';
- this._envs = envs;
-}
-util.inherits(LooseEnvify, stream.Transform);
-
-LooseEnvify.prototype._transform = function(buf, enc, cb) {
- this._data += buf;
- cb();
-};
-
-LooseEnvify.prototype._flush = function(cb) {
- var replaced = replace(this._data, this._envs);
- this.push(replaced);
- cb();
-};
diff --git a/node_modules/loose-envify/package.json b/node_modules/loose-envify/package.json
deleted file mode 100644
index 5e3d0e2..0000000
--- a/node_modules/loose-envify/package.json
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "name": "loose-envify",
- "version": "1.4.0",
- "description": "Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST",
- "keywords": [
- "environment",
- "variables",
- "browserify",
- "browserify-transform",
- "transform",
- "source",
- "configuration"
- ],
- "homepage": "https://github.com/zertosh/loose-envify",
- "license": "MIT",
- "author": "Andres Suarez <zertosh@gmail.com>",
- "main": "index.js",
- "bin": {
- "loose-envify": "cli.js"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/zertosh/loose-envify.git"
- },
- "scripts": {
- "test": "tap test/*.js"
- },
- "dependencies": {
- "js-tokens": "^3.0.0 || ^4.0.0"
- },
- "devDependencies": {
- "browserify": "^13.1.1",
- "envify": "^3.4.0",
- "tap": "^8.0.0"
- }
-}
diff --git a/node_modules/loose-envify/replace.js b/node_modules/loose-envify/replace.js
deleted file mode 100644
index ec15e81..0000000
--- a/node_modules/loose-envify/replace.js
+++ /dev/null
@@ -1,65 +0,0 @@
-'use strict';
-
-var jsTokens = require('js-tokens').default;
-
-var processEnvRe = /\bprocess\.env\.[_$a-zA-Z][$\w]+\b/;
-var spaceOrCommentRe = /^(?:\s|\/[/*])/;
-
-function replace(src, envs) {
- if (!processEnvRe.test(src)) {
- return src;
- }
-
- var out = [];
- var purge = envs.some(function(env) {
- return env._ && env._.indexOf('purge') !== -1;
- });
-
- jsTokens.lastIndex = 0
- var parts = src.match(jsTokens);
-
- for (var i = 0; i < parts.length; i++) {
- if (parts[i ] === 'process' &&
- parts[i + 1] === '.' &&
- parts[i + 2] === 'env' &&
- parts[i + 3] === '.') {
- var prevCodeToken = getAdjacentCodeToken(-1, parts, i);
- var nextCodeToken = getAdjacentCodeToken(1, parts, i + 4);
- var replacement = getReplacementString(envs, parts[i + 4], purge);
- if (prevCodeToken !== '.' &&
- nextCodeToken !== '.' &&
- nextCodeToken !== '=' &&
- typeof replacement === 'string') {
- out.push(replacement);
- i += 4;
- continue;
- }
- }
- out.push(parts[i]);
- }
-
- return out.join('');
-}
-
-function getAdjacentCodeToken(dir, parts, i) {
- while (true) {
- var part = parts[i += dir];
- if (!spaceOrCommentRe.test(part)) {
- return part;
- }
- }
-}
-
-function getReplacementString(envs, name, purge) {
- for (var j = 0; j < envs.length; j++) {
- var env = envs[j];
- if (typeof env[name] !== 'undefined') {
- return JSON.stringify(env[name]);
- }
- }
- if (purge) {
- return 'undefined';
- }
-}
-
-module.exports = replace;
diff --git a/node_modules/object-assign/index.js b/node_modules/object-assign/index.js
deleted file mode 100644
index 0930cf8..0000000
--- a/node_modules/object-assign/index.js
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-'use strict';
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
-
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
-};
diff --git a/node_modules/object-assign/license b/node_modules/object-assign/license
deleted file mode 100644
index 654d0bf..0000000
--- a/node_modules/object-assign/license
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/object-assign/package.json b/node_modules/object-assign/package.json
deleted file mode 100644
index 503eb1e..0000000
--- a/node_modules/object-assign/package.json
+++ /dev/null
@@ -1,42 +0,0 @@
-{
- "name": "object-assign",
- "version": "4.1.1",
- "description": "ES2015 `Object.assign()` ponyfill",
- "license": "MIT",
- "repository": "sindresorhus/object-assign",
- "author": {
- "name": "Sindre Sorhus",
- "email": "sindresorhus@gmail.com",
- "url": "sindresorhus.com"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "scripts": {
- "test": "xo && ava",
- "bench": "matcha bench.js"
- },
- "files": [
- "index.js"
- ],
- "keywords": [
- "object",
- "assign",
- "extend",
- "properties",
- "es2015",
- "ecmascript",
- "harmony",
- "ponyfill",
- "prollyfill",
- "polyfill",
- "shim",
- "browser"
- ],
- "devDependencies": {
- "ava": "^0.16.0",
- "lodash": "^4.16.4",
- "matcha": "^0.7.0",
- "xo": "^0.16.0"
- }
-}
diff --git a/node_modules/object-assign/readme.md b/node_modules/object-assign/readme.md
deleted file mode 100644
index 1be09d3..0000000
--- a/node_modules/object-assign/readme.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# object-assign [![Build Status](https://travis-ci.org/sindresorhus/object-assign.svg?branch=master)](https://travis-ci.org/sindresorhus/object-assign)
-
-> ES2015 [`Object.assign()`](http://www.2ality.com/2014/01/object-assign.html) [ponyfill](https://ponyfill.com)
-
-
-## Use the built-in
-
-Node.js 4 and up, as well as every evergreen browser (Chrome, Edge, Firefox, Opera, Safari),
-support `Object.assign()` :tada:. If you target only those environments, then by all
-means, use `Object.assign()` instead of this package.
-
-
-## Install
-
-```
-$ npm install --save object-assign
-```
-
-
-## Usage
-
-```js
-const objectAssign = require('object-assign');
-
-objectAssign({foo: 0}, {bar: 1});
-//=> {foo: 0, bar: 1}
-
-// multiple sources
-objectAssign({foo: 0}, {bar: 1}, {baz: 2});
-//=> {foo: 0, bar: 1, baz: 2}
-
-// overwrites equal keys
-objectAssign({foo: 0}, {foo: 1}, {foo: 2});
-//=> {foo: 2}
-
-// ignores null and undefined sources
-objectAssign({foo: 0}, null, {bar: 1}, undefined);
-//=> {foo: 0, bar: 1}
-```
-
-
-## API
-
-### objectAssign(target, [source, ...])
-
-Assigns enumerable own properties of `source` objects to the `target` object and returns the `target` object. Additional `source` objects will overwrite previous ones.
-
-
-## Resources
-
-- [ES2015 spec - Object.assign](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.assign)
-
-
-## Related
-
-- [deep-assign](https://github.com/sindresorhus/deep-assign) - Recursive `Object.assign()`
-
-
-## License
-
-MIT © [Sindre Sorhus](https://sindresorhus.com)
diff --git a/node_modules/prop-types/LICENSE b/node_modules/prop-types/LICENSE
deleted file mode 100644
index 188fb2b..0000000
--- a/node_modules/prop-types/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2013-present, Facebook, Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/prop-types/README.md b/node_modules/prop-types/README.md
deleted file mode 100644
index e54d435..0000000
--- a/node_modules/prop-types/README.md
+++ /dev/null
@@ -1,302 +0,0 @@
-# prop-types [![Build Status](https://travis-ci.com/facebook/prop-types.svg?branch=main)](https://travis-ci.org/facebook/prop-types)
-
-Runtime type checking for React props and similar objects.
-
-You can use prop-types to document the intended types of properties passed to
-components. React (and potentially other libraries—see the `checkPropTypes()`
-reference below) will check props passed to your components against those
-definitions, and warn in development if they don’t match.
-
-## Installation
-
-```shell
-npm install --save prop-types
-```
-
-## Importing
-
-```js
-import PropTypes from 'prop-types'; // ES6
-var PropTypes = require('prop-types'); // ES5 with npm
-```
-
-### CDN
-
-If you prefer to exclude `prop-types` from your application and use it
-globally via `window.PropTypes`, the `prop-types` package provides
-single-file distributions, which are hosted on the following CDNs:
-
-* [**unpkg**](https://unpkg.com/prop-types/)
-```html
-<!-- development version -->
-<script src="https://unpkg.com/prop-types@15.6/prop-types.js"></script>
-
-<!-- production version -->
-<script src="https://unpkg.com/prop-types@15.6/prop-types.min.js"></script>
-```
-
-* [**cdnjs**](https://cdnjs.com/libraries/prop-types)
-```html
-<!-- development version -->
-<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.js"></script>
-
-<!-- production version -->
-<script src="https://cdnjs.cloudflare.com/ajax/libs/prop-types/15.6.0/prop-types.min.js"></script>
-```
-
-To load a specific version of `prop-types` replace `15.6.0` with the version number.
-
-## Usage
-
-PropTypes was originally exposed as part of the React core module, and is
-commonly used with React components.
-Here is an example of using PropTypes with a React component, which also
-documents the different validators provided:
-
-```js
-import React from 'react';
-import PropTypes from 'prop-types';
-
-class MyComponent extends React.Component {
- render() {
- // ... do things with the props
- }
-}
-
-MyComponent.propTypes = {
- // You can declare that a prop is a specific JS primitive. By default, these
- // are all optional.
- optionalArray: PropTypes.array,
- optionalBigInt: PropTypes.bigint,
- optionalBool: PropTypes.bool,
- optionalFunc: PropTypes.func,
- optionalNumber: PropTypes.number,
- optionalObject: PropTypes.object,
- optionalString: PropTypes.string,
- optionalSymbol: PropTypes.symbol,
-
- // Anything that can be rendered: numbers, strings, elements or an array
- // (or fragment) containing these types.
- // see https://reactjs.org/docs/rendering-elements.html for more info
- optionalNode: PropTypes.node,
-
- // A React element (ie. <MyComponent />).
- optionalElement: PropTypes.element,
-
- // A React element type (eg. MyComponent).
- // a function, string, or "element-like" object (eg. React.Fragment, Suspense, etc.)
- // see https://github.com/facebook/react/blob/HEAD/packages/shared/isValidElementType.js
- optionalElementType: PropTypes.elementType,
-
- // You can also declare that a prop is an instance of a class. This uses
- // JS's instanceof operator.
- optionalMessage: PropTypes.instanceOf(Message),
-
- // You can ensure that your prop is limited to specific values by treating
- // it as an enum.
- optionalEnum: PropTypes.oneOf(['News', 'Photos']),
-
- // An object that could be one of many types
- optionalUnion: PropTypes.oneOfType([
- PropTypes.string,
- PropTypes.number,
- PropTypes.instanceOf(Message)
- ]),
-
- // An array of a certain type
- optionalArrayOf: PropTypes.arrayOf(PropTypes.number),
-
- // An object with property values of a certain type
- optionalObjectOf: PropTypes.objectOf(PropTypes.number),
-
- // You can chain any of the above with `isRequired` to make sure a warning
- // is shown if the prop isn't provided.
-
- // An object taking on a particular shape
- optionalObjectWithShape: PropTypes.shape({
- optionalProperty: PropTypes.string,
- requiredProperty: PropTypes.number.isRequired
- }),
-
- // An object with warnings on extra properties
- optionalObjectWithStrictShape: PropTypes.exact({
- optionalProperty: PropTypes.string,
- requiredProperty: PropTypes.number.isRequired
- }),
-
- requiredFunc: PropTypes.func.isRequired,
-
- // A value of any data type
- requiredAny: PropTypes.any.isRequired,
-
- // You can also specify a custom validator. It should return an Error
- // object if the validation fails. Don't `console.warn` or throw, as this
- // won't work inside `oneOfType`.
- customProp: function(props, propName, componentName) {
- if (!/matchme/.test(props[propName])) {
- return new Error(
- 'Invalid prop `' + propName + '` supplied to' +
- ' `' + componentName + '`. Validation failed.'
- );
- }
- },
-
- // You can also supply a custom validator to `arrayOf` and `objectOf`.
- // It should return an Error object if the validation fails. The validator
- // will be called for each key in the array or object. The first two
- // arguments of the validator are the array or object itself, and the
- // current item's key.
- customArrayProp: PropTypes.arrayOf(function(propValue, key, componentName, location, propFullName) {
- if (!/matchme/.test(propValue[key])) {
- return new Error(
- 'Invalid prop `' + propFullName + '` supplied to' +
- ' `' + componentName + '`. Validation failed.'
- );
- }
- })
-};
-```
-
-Refer to the [React documentation](https://facebook.github.io/react/docs/typechecking-with-proptypes.html) for more information.
-
-## Migrating from React.PropTypes
-
-Check out [Migrating from React.PropTypes](https://facebook.github.io/react/blog/2017/04/07/react-v15.5.0.html#migrating-from-react.proptypes) for details on how to migrate to `prop-types` from `React.PropTypes`.
-
-Note that this blog posts **mentions a codemod script that performs the conversion automatically**.
-
-There are also important notes below.
-
-## How to Depend on This Package?
-
-For apps, we recommend putting it in `dependencies` with a caret range.
-For example:
-
-```js
- "dependencies": {
- "prop-types": "^15.5.7"
- }
-```
-
-For libraries, we *also* recommend leaving it in `dependencies`:
-
-```js
- "dependencies": {
- "prop-types": "^15.5.7"
- },
- "peerDependencies": {
- "react": "^15.5.0"
- }
-```
-
-**Note:** there are known issues in versions before 15.5.7 so we recommend using it as the minimal version.
-
-Make sure that the version range uses a caret (`^`) and thus is broad enough for npm to efficiently deduplicate packages.
-
-For UMD bundles of your components, make sure you **don’t** include `PropTypes` in the build. Usually this is done by marking it as an external (the specifics depend on your bundler), just like you do with React.
-
-## Compatibility
-
-### React 0.14
-
-This package is compatible with **React 0.14.9**. Compared to 0.14.8 (which was released in March of 2016), there are no other changes in 0.14.9, so it should be a painless upgrade.
-
-```shell
-# ATTENTION: Only run this if you still use React 0.14!
-npm install --save react@^0.14.9 react-dom@^0.14.9
-```
-
-### React 15+
-
-This package is compatible with **React 15.3.0** and higher.
-
-```
-npm install --save react@^15.3.0 react-dom@^15.3.0
-```
-
-### What happens on other React versions?
-
-It outputs warnings with the message below even though the developer doesn’t do anything wrong. Unfortunately there is no solution for this other than updating React to either 15.3.0 or higher, or 0.14.9 if you’re using React 0.14.
-
-## Difference from `React.PropTypes`: Don’t Call Validator Functions
-
-First of all, **which version of React are you using**? You might be seeing this message because a component library has updated to use `prop-types` package, but your version of React is incompatible with it. See the [above section](#compatibility) for more details.
-
-Are you using either React 0.14.9 or a version higher than React 15.3.0? Read on.
-
-When you migrate components to use the standalone `prop-types`, **all validator functions will start throwing an error if you call them directly**. This makes sure that nobody relies on them in production code, and it is safe to strip their implementations to optimize the bundle size.
-
-Code like this is still fine:
-
-```js
-MyComponent.propTypes = {
- myProp: PropTypes.bool
-};
-```
-
-However, code like this will not work with the `prop-types` package:
-
-```js
-// Will not work with `prop-types` package!
-var errorOrNull = PropTypes.bool(42, 'myProp', 'MyComponent', 'prop');
-```
-
-It will throw an error:
-
-```
-Calling PropTypes validators directly is not supported by the `prop-types` package.
-Use PropTypes.checkPropTypes() to call them.
-```
-
-(If you see **a warning** rather than an error with this message, please check the [above section about compatibility](#compatibility).)
-
-This is new behavior, and you will only encounter it when you migrate from `React.PropTypes` to the `prop-types` package. For the vast majority of components, this doesn’t matter, and if you didn’t see [this warning](https://facebook.github.io/react/warnings/dont-call-proptypes.html) in your components, your code is safe to migrate. This is not a breaking change in React because you are only opting into this change for a component by explicitly changing your imports to use `prop-types`. If you temporarily need the old behavior, you can keep using `React.PropTypes` until React 16.
-
-**If you absolutely need to trigger the validation manually**, call `PropTypes.checkPropTypes()`. Unlike the validators themselves, this function is safe to call in production, as it will be replaced by an empty function:
-
-```js
-// Works with standalone PropTypes
-PropTypes.checkPropTypes(MyComponent.propTypes, props, 'prop', 'MyComponent');
-```
-See below for more info.
-
-**If you DO want to use validation in production**, you can choose to use the **development version** by importing/requiring `prop-types/prop-types` instead of `prop-types`.
-
-**You might also see this error** if you’re calling a `PropTypes` validator from your own custom `PropTypes` validator. In this case, the fix is to make sure that you are passing *all* of the arguments to the inner function. There is a more in-depth explanation of how to fix it [on this page](https://facebook.github.io/react/warnings/dont-call-proptypes.html#fixing-the-false-positive-in-third-party-proptypes). Alternatively, you can temporarily keep using `React.PropTypes` until React 16, as it would still only warn in this case.
-
-If you use a bundler like Browserify or Webpack, don’t forget to [follow these instructions](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) to correctly bundle your application in development or production mode. Otherwise you’ll ship unnecessary code to your users.
-
-## PropTypes.checkPropTypes
-
-React will automatically check the propTypes you set on the component, but if
-you are using PropTypes without React then you may want to manually call
-`PropTypes.checkPropTypes`, like so:
-
-```js
-const myPropTypes = {
- name: PropTypes.string,
- age: PropTypes.number,
- // ... define your prop validations
-};
-
-const props = {
- name: 'hello', // is valid
- age: 'world', // not valid
-};
-
-// Let's say your component is called 'MyComponent'
-
-// Works with standalone PropTypes
-PropTypes.checkPropTypes(myPropTypes, props, 'prop', 'MyComponent');
-// This will warn as follows:
-// Warning: Failed prop type: Invalid prop `age` of type `string` supplied to
-// `MyComponent`, expected `number`.
-```
-
-## PropTypes.resetWarningCache()
-
-`PropTypes.checkPropTypes(...)` only `console.error`s a given message once. To reset the error warning cache in tests, call `PropTypes.resetWarningCache()`
-
-### License
-
-prop-types is [MIT licensed](./LICENSE).
diff --git a/node_modules/prop-types/checkPropTypes.js b/node_modules/prop-types/checkPropTypes.js
deleted file mode 100644
index 481f2cf..0000000
--- a/node_modules/prop-types/checkPropTypes.js
+++ /dev/null
@@ -1,103 +0,0 @@
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-var printWarning = function() {};
-
-if (process.env.NODE_ENV !== 'production') {
- var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
- var loggedTypeFailures = {};
- var has = require('./lib/has');
-
- printWarning = function(text) {
- var message = 'Warning: ' + text;
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) { /**/ }
- };
-}
-
-/**
- * Assert that the values match with the type specs.
- * Error messages are memorized and will only be shown once.
- *
- * @param {object} typeSpecs Map of name to a ReactPropType
- * @param {object} values Runtime values that need to be type-checked
- * @param {string} location e.g. "prop", "context", "child context"
- * @param {string} componentName Name of the component for error messages.
- * @param {?Function} getStack Returns the component stack.
- * @private
- */
-function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
- if (process.env.NODE_ENV !== 'production') {
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error;
- // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.'
- );
- err.name = 'Invariant Violation';
- throw err;
- }
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
- } catch (ex) {
- error = ex;
- }
- if (error && !(error instanceof Error)) {
- printWarning(
- (componentName || 'React class') + ': type specification of ' +
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
- 'You may have forgotten to pass an argument to the type checker ' +
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
- 'shape all require an argument).'
- );
- }
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error.message] = true;
-
- var stack = getStack ? getStack() : '';
-
- printWarning(
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
- );
- }
- }
- }
- }
-}
-
-/**
- * Resets warning cache when testing.
- *
- * @private
- */
-checkPropTypes.resetWarningCache = function() {
- if (process.env.NODE_ENV !== 'production') {
- loggedTypeFailures = {};
- }
-}
-
-module.exports = checkPropTypes;
diff --git a/node_modules/prop-types/factory.js b/node_modules/prop-types/factory.js
deleted file mode 100644
index abdf8e6..0000000
--- a/node_modules/prop-types/factory.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-// React 15.5 references this module, and assumes PropTypes are still callable in production.
-// Therefore we re-export development-only version with all the PropTypes checks here.
-// However if one is migrating to the `prop-types` npm library, they will go through the
-// `index.js` entry point, and it will branch depending on the environment.
-var factory = require('./factoryWithTypeCheckers');
-module.exports = function(isValidElement) {
- // It is still allowed in 15.5.
- var throwOnDirectAccess = false;
- return factory(isValidElement, throwOnDirectAccess);
-};
diff --git a/node_modules/prop-types/factoryWithThrowingShims.js b/node_modules/prop-types/factoryWithThrowingShims.js
deleted file mode 100644
index ac88267..0000000
--- a/node_modules/prop-types/factoryWithThrowingShims.js
+++ /dev/null
@@ -1,65 +0,0 @@
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
-
-function emptyFunction() {}
-function emptyFunctionWithReset() {}
-emptyFunctionWithReset.resetWarningCache = emptyFunction;
-
-module.exports = function() {
- function shim(props, propName, componentName, location, propFullName, secret) {
- if (secret === ReactPropTypesSecret) {
- // It is still safe when called from React.
- return;
- }
- var err = new Error(
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
- 'Use PropTypes.checkPropTypes() to call them. ' +
- 'Read more at http://fb.me/use-check-prop-types'
- );
- err.name = 'Invariant Violation';
- throw err;
- };
- shim.isRequired = shim;
- function getShim() {
- return shim;
- };
- // Important!
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
- var ReactPropTypes = {
- array: shim,
- bigint: shim,
- bool: shim,
- func: shim,
- number: shim,
- object: shim,
- string: shim,
- symbol: shim,
-
- any: shim,
- arrayOf: getShim,
- element: shim,
- elementType: shim,
- instanceOf: getShim,
- node: shim,
- objectOf: getShim,
- oneOf: getShim,
- oneOfType: getShim,
- shape: getShim,
- exact: getShim,
-
- checkPropTypes: emptyFunctionWithReset,
- resetWarningCache: emptyFunction
- };
-
- ReactPropTypes.PropTypes = ReactPropTypes;
-
- return ReactPropTypes;
-};
diff --git a/node_modules/prop-types/factoryWithTypeCheckers.js b/node_modules/prop-types/factoryWithTypeCheckers.js
deleted file mode 100644
index a88068e..0000000
--- a/node_modules/prop-types/factoryWithTypeCheckers.js
+++ /dev/null
@@ -1,610 +0,0 @@
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-var ReactIs = require('react-is');
-var assign = require('object-assign');
-
-var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
-var has = require('./lib/has');
-var checkPropTypes = require('./checkPropTypes');
-
-var printWarning = function() {};
-
-if (process.env.NODE_ENV !== 'production') {
- printWarning = function(text) {
- var message = 'Warning: ' + text;
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
-}
-
-function emptyFunctionThatReturnsNull() {
- return null;
-}
-
-module.exports = function(isValidElement, throwOnDirectAccess) {
- /* global Symbol */
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
-
- /**
- * Returns the iterator method function contained on the iterable object.
- *
- * Be sure to invoke the function with the iterable as context:
- *
- * var iteratorFn = getIteratorFn(myIterable);
- * if (iteratorFn) {
- * var iterator = iteratorFn.call(myIterable);
- * ...
- * }
- *
- * @param {?object} maybeIterable
- * @return {?function}
- */
- function getIteratorFn(maybeIterable) {
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
- if (typeof iteratorFn === 'function') {
- return iteratorFn;
- }
- }
-
- /**
- * Collection of methods that allow declaration and validation of props that are
- * supplied to React components. Example usage:
- *
- * var Props = require('ReactPropTypes');
- * var MyArticle = React.createClass({
- * propTypes: {
- * // An optional string prop named "description".
- * description: Props.string,
- *
- * // A required enum prop named "category".
- * category: Props.oneOf(['News','Photos']).isRequired,
- *
- * // A prop named "dialog" that requires an instance of Dialog.
- * dialog: Props.instanceOf(Dialog).isRequired
- * },
- * render: function() { ... }
- * });
- *
- * A more formal specification of how these methods are used:
- *
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
- * decl := ReactPropTypes.{type}(.isRequired)?
- *
- * Each and every declaration produces a function with the same signature. This
- * allows the creation of custom validation functions. For example:
- *
- * var MyLink = React.createClass({
- * propTypes: {
- * // An optional string or URI prop named "href".
- * href: function(props, propName, componentName) {
- * var propValue = props[propName];
- * if (propValue != null && typeof propValue !== 'string' &&
- * !(propValue instanceof URI)) {
- * return new Error(
- * 'Expected a string or an URI for ' + propName + ' in ' +
- * componentName
- * );
- * }
- * }
- * },
- * render: function() {...}
- * });
- *
- * @internal
- */
-
- var ANONYMOUS = '<<anonymous>>';
-
- // Important!
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
- var ReactPropTypes = {
- array: createPrimitiveTypeChecker('array'),
- bigint: createPrimitiveTypeChecker('bigint'),
- bool: createPrimitiveTypeChecker('boolean'),
- func: createPrimitiveTypeChecker('function'),
- number: createPrimitiveTypeChecker('number'),
- object: createPrimitiveTypeChecker('object'),
- string: createPrimitiveTypeChecker('string'),
- symbol: createPrimitiveTypeChecker('symbol'),
-
- any: createAnyTypeChecker(),
- arrayOf: createArrayOfTypeChecker,
- element: createElementTypeChecker(),
- elementType: createElementTypeTypeChecker(),
- instanceOf: createInstanceTypeChecker,
- node: createNodeChecker(),
- objectOf: createObjectOfTypeChecker,
- oneOf: createEnumTypeChecker,
- oneOfType: createUnionTypeChecker,
- shape: createShapeTypeChecker,
- exact: createStrictShapeTypeChecker,
- };
-
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- /*eslint-disable no-self-compare*/
- function is(x, y) {
- // SameValue algorithm
- if (x === y) {
- // Steps 1-5, 7-10
- // Steps 6.b-6.e: +0 != -0
- return x !== 0 || 1 / x === 1 / y;
- } else {
- // Step 6.a: NaN == NaN
- return x !== x && y !== y;
- }
- }
- /*eslint-enable no-self-compare*/
-
- /**
- * We use an Error-like object for backward compatibility as people may call
- * PropTypes directly and inspect their output. However, we don't use real
- * Errors anymore. We don't inspect their stack anyway, and creating them
- * is prohibitively expensive if they are created too often, such as what
- * happens in oneOfType() for any type before the one that matched.
- */
- function PropTypeError(message, data) {
- this.message = message;
- this.data = data && typeof data === 'object' ? data: {};
- this.stack = '';
- }
- // Make `instanceof Error` still work for returned errors.
- PropTypeError.prototype = Error.prototype;
-
- function createChainableTypeChecker(validate) {
- if (process.env.NODE_ENV !== 'production') {
- var manualPropTypeCallCache = {};
- var manualPropTypeWarningCount = 0;
- }
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
- componentName = componentName || ANONYMOUS;
- propFullName = propFullName || propName;
-
- if (secret !== ReactPropTypesSecret) {
- if (throwOnDirectAccess) {
- // New behavior only for users of `prop-types` package
- var err = new Error(
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
- 'Read more at http://fb.me/use-check-prop-types'
- );
- err.name = 'Invariant Violation';
- throw err;
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
- // Old behavior for people using React.PropTypes
- var cacheKey = componentName + ':' + propName;
- if (
- !manualPropTypeCallCache[cacheKey] &&
- // Avoid spamming the console because they are often not actionable except for lib authors
- manualPropTypeWarningCount < 3
- ) {
- printWarning(
- 'You are manually calling a React.PropTypes validation ' +
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
- 'and will throw in the standalone `prop-types` package. ' +
- 'You may be seeing this warning due to a third-party PropTypes ' +
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
- );
- manualPropTypeCallCache[cacheKey] = true;
- manualPropTypeWarningCount++;
- }
- }
- }
- if (props[propName] == null) {
- if (isRequired) {
- if (props[propName] === null) {
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
- }
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
- }
- return null;
- } else {
- return validate(props, propName, componentName, location, propFullName);
- }
- }
-
- var chainedCheckType = checkType.bind(null, false);
- chainedCheckType.isRequired = checkType.bind(null, true);
-
- return chainedCheckType;
- }
-
- function createPrimitiveTypeChecker(expectedType) {
- function validate(props, propName, componentName, location, propFullName, secret) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== expectedType) {
- // `propValue` being instance of, say, date/regexp, pass the 'object'
- // check, but we can offer a more precise error message here rather than
- // 'of type `object`'.
- var preciseType = getPreciseType(propValue);
-
- return new PropTypeError(
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
- {expectedType: expectedType}
- );
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createAnyTypeChecker() {
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
- }
-
- function createArrayOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
- }
- var propValue = props[propName];
- if (!Array.isArray(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
- }
- for (var i = 0; i < propValue.length; i++) {
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
- if (error instanceof Error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createElementTypeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- if (!isValidElement(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createElementTypeTypeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- if (!ReactIs.isValidElementType(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createInstanceTypeChecker(expectedClass) {
- function validate(props, propName, componentName, location, propFullName) {
- if (!(props[propName] instanceof expectedClass)) {
- var expectedClassName = expectedClass.name || ANONYMOUS;
- var actualClassName = getClassName(props[propName]);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createEnumTypeChecker(expectedValues) {
- if (!Array.isArray(expectedValues)) {
- if (process.env.NODE_ENV !== 'production') {
- if (arguments.length > 1) {
- printWarning(
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
- );
- } else {
- printWarning('Invalid argument supplied to oneOf, expected an array.');
- }
- }
- return emptyFunctionThatReturnsNull;
- }
-
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- for (var i = 0; i < expectedValues.length; i++) {
- if (is(propValue, expectedValues[i])) {
- return null;
- }
- }
-
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
- var type = getPreciseType(value);
- if (type === 'symbol') {
- return String(value);
- }
- return value;
- });
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
- }
- return createChainableTypeChecker(validate);
- }
-
- function createObjectOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
- }
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
- }
- for (var key in propValue) {
- if (has(propValue, key)) {
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error instanceof Error) {
- return error;
- }
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createUnionTypeChecker(arrayOfTypeCheckers) {
- if (!Array.isArray(arrayOfTypeCheckers)) {
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
- return emptyFunctionThatReturnsNull;
- }
-
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- if (typeof checker !== 'function') {
- printWarning(
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
- );
- return emptyFunctionThatReturnsNull;
- }
- }
-
- function validate(props, propName, componentName, location, propFullName) {
- var expectedTypes = [];
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
- if (checkerResult == null) {
- return null;
- }
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
- expectedTypes.push(checkerResult.data.expectedType);
- }
- }
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
- }
- return createChainableTypeChecker(validate);
- }
-
- function createNodeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- if (!isNode(props[propName])) {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function invalidValidatorError(componentName, location, propFullName, key, type) {
- return new PropTypeError(
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
- );
- }
-
- function createShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- for (var key in shapeTypes) {
- var checker = shapeTypes[key];
- if (typeof checker !== 'function') {
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createStrictShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- // We need to check all keys in case some are required but missing from props.
- var allKeys = assign({}, props[propName], shapeTypes);
- for (var key in allKeys) {
- var checker = shapeTypes[key];
- if (has(shapeTypes, key) && typeof checker !== 'function') {
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
- }
- if (!checker) {
- return new PropTypeError(
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
- );
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error) {
- return error;
- }
- }
- return null;
- }
-
- return createChainableTypeChecker(validate);
- }
-
- function isNode(propValue) {
- switch (typeof propValue) {
- case 'number':
- case 'string':
- case 'undefined':
- return true;
- case 'boolean':
- return !propValue;
- case 'object':
- if (Array.isArray(propValue)) {
- return propValue.every(isNode);
- }
- if (propValue === null || isValidElement(propValue)) {
- return true;
- }
-
- var iteratorFn = getIteratorFn(propValue);
- if (iteratorFn) {
- var iterator = iteratorFn.call(propValue);
- var step;
- if (iteratorFn !== propValue.entries) {
- while (!(step = iterator.next()).done) {
- if (!isNode(step.value)) {
- return false;
- }
- }
- } else {
- // Iterator will provide entry [k,v] tuples rather than values.
- while (!(step = iterator.next()).done) {
- var entry = step.value;
- if (entry) {
- if (!isNode(entry[1])) {
- return false;
- }
- }
- }
- }
- } else {
- return false;
- }
-
- return true;
- default:
- return false;
- }
- }
-
- function isSymbol(propType, propValue) {
- // Native Symbol.
- if (propType === 'symbol') {
- return true;
- }
-
- // falsy value can't be a Symbol
- if (!propValue) {
- return false;
- }
-
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
- if (propValue['@@toStringTag'] === 'Symbol') {
- return true;
- }
-
- // Fallback for non-spec compliant Symbols which are polyfilled.
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
- return true;
- }
-
- return false;
- }
-
- // Equivalent of `typeof` but with special handling for array and regexp.
- function getPropType(propValue) {
- var propType = typeof propValue;
- if (Array.isArray(propValue)) {
- return 'array';
- }
- if (propValue instanceof RegExp) {
- // Old webkits (at least until Android 4.0) return 'function' rather than
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
- // passes PropTypes.object.
- return 'object';
- }
- if (isSymbol(propType, propValue)) {
- return 'symbol';
- }
- return propType;
- }
-
- // This handles more types than `getPropType`. Only used for error messages.
- // See `createPrimitiveTypeChecker`.
- function getPreciseType(propValue) {
- if (typeof propValue === 'undefined' || propValue === null) {
- return '' + propValue;
- }
- var propType = getPropType(propValue);
- if (propType === 'object') {
- if (propValue instanceof Date) {
- return 'date';
- } else if (propValue instanceof RegExp) {
- return 'regexp';
- }
- }
- return propType;
- }
-
- // Returns a string that is postfixed to a warning about an invalid type.
- // For example, "undefined" or "of type array"
- function getPostfixForTypeWarning(value) {
- var type = getPreciseType(value);
- switch (type) {
- case 'array':
- case 'object':
- return 'an ' + type;
- case 'boolean':
- case 'date':
- case 'regexp':
- return 'a ' + type;
- default:
- return type;
- }
- }
-
- // Returns class name of the object, if any.
- function getClassName(propValue) {
- if (!propValue.constructor || !propValue.constructor.name) {
- return ANONYMOUS;
- }
- return propValue.constructor.name;
- }
-
- ReactPropTypes.checkPropTypes = checkPropTypes;
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
- ReactPropTypes.PropTypes = ReactPropTypes;
-
- return ReactPropTypes;
-};
diff --git a/node_modules/prop-types/index.js b/node_modules/prop-types/index.js
deleted file mode 100644
index e9ef51d..0000000
--- a/node_modules/prop-types/index.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-if (process.env.NODE_ENV !== 'production') {
- var ReactIs = require('react-is');
-
- // By explicitly using `prop-types` you are opting into new development behavior.
- // http://fb.me/prop-types-in-prod
- var throwOnDirectAccess = true;
- module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);
-} else {
- // By explicitly using `prop-types` you are opting into new production behavior.
- // http://fb.me/prop-types-in-prod
- module.exports = require('./factoryWithThrowingShims')();
-}
diff --git a/node_modules/prop-types/lib/ReactPropTypesSecret.js b/node_modules/prop-types/lib/ReactPropTypesSecret.js
deleted file mode 100644
index f54525e..0000000
--- a/node_modules/prop-types/lib/ReactPropTypesSecret.js
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
-
-module.exports = ReactPropTypesSecret;
diff --git a/node_modules/prop-types/lib/has.js b/node_modules/prop-types/lib/has.js
deleted file mode 100644
index 007bae3..0000000
--- a/node_modules/prop-types/lib/has.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
diff --git a/node_modules/prop-types/package.json b/node_modules/prop-types/package.json
deleted file mode 100644
index 63daf70..0000000
--- a/node_modules/prop-types/package.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "prop-types",
- "version": "15.8.1",
- "description": "Runtime type checking for React props and similar objects.",
- "sideEffects": false,
- "main": "index.js",
- "license": "MIT",
- "files": [
- "LICENSE",
- "README.md",
- "checkPropTypes.js",
- "factory.js",
- "factoryWithThrowingShims.js",
- "factoryWithTypeCheckers.js",
- "index.js",
- "prop-types.js",
- "prop-types.min.js",
- "lib"
- ],
- "repository": "facebook/prop-types",
- "keywords": [
- "react"
- ],
- "bugs": {
- "url": "https://github.com/facebook/prop-types/issues"
- },
- "homepage": "https://facebook.github.io/react/",
- "dependencies": {
- "loose-envify": "^1.4.0",
- "object-assign": "^4.1.1",
- "react-is": "^16.13.1"
- },
- "scripts": {
- "pretest": "npm run lint",
- "lint": "eslint .",
- "test": "npm run tests-only",
- "tests-only": "jest",
- "umd": "NODE_ENV=development browserify index.js -t loose-envify --standalone PropTypes -o prop-types.js",
- "umd-min": "NODE_ENV=production browserify index.js -t loose-envify -t uglifyify --standalone PropTypes -p bundle-collapser/plugin -o | uglifyjs --compress unused,dead_code -o prop-types.min.js",
- "build": "yarn umd && yarn umd-min",
- "prepublish": "not-in-publish || yarn build"
- },
- "devDependencies": {
- "babel-jest": "^19.0.0",
- "babel-preset-react": "^6.24.1",
- "browserify": "^16.5.0",
- "bundle-collapser": "^1.4.0",
- "eslint": "^8.6.0",
- "in-publish": "^2.0.1",
- "jest": "^19.0.2",
- "react": "^15.7.0",
- "uglifyify": "^5.0.2",
- "uglifyjs": "^2.4.11"
- },
- "browserify": {
- "transform": [
- "loose-envify"
- ]
- }
-}
diff --git a/node_modules/prop-types/prop-types.js b/node_modules/prop-types/prop-types.js
deleted file mode 100644
index a5a15dd..0000000
--- a/node_modules/prop-types/prop-types.js
+++ /dev/null
@@ -1,1315 +0,0 @@
-(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.PropTypes = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-var printWarning = function() {};
-
-if ("development" !== 'production') {
- var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
- var loggedTypeFailures = {};
- var has = require('./lib/has');
-
- printWarning = function(text) {
- var message = 'Warning: ' + text;
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) { /**/ }
- };
-}
-
-/**
- * Assert that the values match with the type specs.
- * Error messages are memorized and will only be shown once.
- *
- * @param {object} typeSpecs Map of name to a ReactPropType
- * @param {object} values Runtime values that need to be type-checked
- * @param {string} location e.g. "prop", "context", "child context"
- * @param {string} componentName Name of the component for error messages.
- * @param {?Function} getStack Returns the component stack.
- * @private
- */
-function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
- if ("development" !== 'production') {
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error;
- // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.'
- );
- err.name = 'Invariant Violation';
- throw err;
- }
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
- } catch (ex) {
- error = ex;
- }
- if (error && !(error instanceof Error)) {
- printWarning(
- (componentName || 'React class') + ': type specification of ' +
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
- 'You may have forgotten to pass an argument to the type checker ' +
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
- 'shape all require an argument).'
- );
- }
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error.message] = true;
-
- var stack = getStack ? getStack() : '';
-
- printWarning(
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
- );
- }
- }
- }
- }
-}
-
-/**
- * Resets warning cache when testing.
- *
- * @private
- */
-checkPropTypes.resetWarningCache = function() {
- if ("development" !== 'production') {
- loggedTypeFailures = {};
- }
-}
-
-module.exports = checkPropTypes;
-
-},{"./lib/ReactPropTypesSecret":5,"./lib/has":6}],2:[function(require,module,exports){
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
-
-function emptyFunction() {}
-function emptyFunctionWithReset() {}
-emptyFunctionWithReset.resetWarningCache = emptyFunction;
-
-module.exports = function() {
- function shim(props, propName, componentName, location, propFullName, secret) {
- if (secret === ReactPropTypesSecret) {
- // It is still safe when called from React.
- return;
- }
- var err = new Error(
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
- 'Use PropTypes.checkPropTypes() to call them. ' +
- 'Read more at http://fb.me/use-check-prop-types'
- );
- err.name = 'Invariant Violation';
- throw err;
- };
- shim.isRequired = shim;
- function getShim() {
- return shim;
- };
- // Important!
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
- var ReactPropTypes = {
- array: shim,
- bigint: shim,
- bool: shim,
- func: shim,
- number: shim,
- object: shim,
- string: shim,
- symbol: shim,
-
- any: shim,
- arrayOf: getShim,
- element: shim,
- elementType: shim,
- instanceOf: getShim,
- node: shim,
- objectOf: getShim,
- oneOf: getShim,
- oneOfType: getShim,
- shape: getShim,
- exact: getShim,
-
- checkPropTypes: emptyFunctionWithReset,
- resetWarningCache: emptyFunction
- };
-
- ReactPropTypes.PropTypes = ReactPropTypes;
-
- return ReactPropTypes;
-};
-
-},{"./lib/ReactPropTypesSecret":5}],3:[function(require,module,exports){
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-var ReactIs = require('react-is');
-var assign = require('object-assign');
-
-var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');
-var has = require('./lib/has');
-var checkPropTypes = require('./checkPropTypes');
-
-var printWarning = function() {};
-
-if ("development" !== 'production') {
- printWarning = function(text) {
- var message = 'Warning: ' + text;
- if (typeof console !== 'undefined') {
- console.error(message);
- }
- try {
- // --- Welcome to debugging React ---
- // This error was thrown as a convenience so that you can use this stack
- // to find the callsite that caused this warning to fire.
- throw new Error(message);
- } catch (x) {}
- };
-}
-
-function emptyFunctionThatReturnsNull() {
- return null;
-}
-
-module.exports = function(isValidElement, throwOnDirectAccess) {
- /* global Symbol */
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
-
- /**
- * Returns the iterator method function contained on the iterable object.
- *
- * Be sure to invoke the function with the iterable as context:
- *
- * var iteratorFn = getIteratorFn(myIterable);
- * if (iteratorFn) {
- * var iterator = iteratorFn.call(myIterable);
- * ...
- * }
- *
- * @param {?object} maybeIterable
- * @return {?function}
- */
- function getIteratorFn(maybeIterable) {
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
- if (typeof iteratorFn === 'function') {
- return iteratorFn;
- }
- }
-
- /**
- * Collection of methods that allow declaration and validation of props that are
- * supplied to React components. Example usage:
- *
- * var Props = require('ReactPropTypes');
- * var MyArticle = React.createClass({
- * propTypes: {
- * // An optional string prop named "description".
- * description: Props.string,
- *
- * // A required enum prop named "category".
- * category: Props.oneOf(['News','Photos']).isRequired,
- *
- * // A prop named "dialog" that requires an instance of Dialog.
- * dialog: Props.instanceOf(Dialog).isRequired
- * },
- * render: function() { ... }
- * });
- *
- * A more formal specification of how these methods are used:
- *
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
- * decl := ReactPropTypes.{type}(.isRequired)?
- *
- * Each and every declaration produces a function with the same signature. This
- * allows the creation of custom validation functions. For example:
- *
- * var MyLink = React.createClass({
- * propTypes: {
- * // An optional string or URI prop named "href".
- * href: function(props, propName, componentName) {
- * var propValue = props[propName];
- * if (propValue != null && typeof propValue !== 'string' &&
- * !(propValue instanceof URI)) {
- * return new Error(
- * 'Expected a string or an URI for ' + propName + ' in ' +
- * componentName
- * );
- * }
- * }
- * },
- * render: function() {...}
- * });
- *
- * @internal
- */
-
- var ANONYMOUS = '<<anonymous>>';
-
- // Important!
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
- var ReactPropTypes = {
- array: createPrimitiveTypeChecker('array'),
- bigint: createPrimitiveTypeChecker('bigint'),
- bool: createPrimitiveTypeChecker('boolean'),
- func: createPrimitiveTypeChecker('function'),
- number: createPrimitiveTypeChecker('number'),
- object: createPrimitiveTypeChecker('object'),
- string: createPrimitiveTypeChecker('string'),
- symbol: createPrimitiveTypeChecker('symbol'),
-
- any: createAnyTypeChecker(),
- arrayOf: createArrayOfTypeChecker,
- element: createElementTypeChecker(),
- elementType: createElementTypeTypeChecker(),
- instanceOf: createInstanceTypeChecker,
- node: createNodeChecker(),
- objectOf: createObjectOfTypeChecker,
- oneOf: createEnumTypeChecker,
- oneOfType: createUnionTypeChecker,
- shape: createShapeTypeChecker,
- exact: createStrictShapeTypeChecker,
- };
-
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- /*eslint-disable no-self-compare*/
- function is(x, y) {
- // SameValue algorithm
- if (x === y) {
- // Steps 1-5, 7-10
- // Steps 6.b-6.e: +0 != -0
- return x !== 0 || 1 / x === 1 / y;
- } else {
- // Step 6.a: NaN == NaN
- return x !== x && y !== y;
- }
- }
- /*eslint-enable no-self-compare*/
-
- /**
- * We use an Error-like object for backward compatibility as people may call
- * PropTypes directly and inspect their output. However, we don't use real
- * Errors anymore. We don't inspect their stack anyway, and creating them
- * is prohibitively expensive if they are created too often, such as what
- * happens in oneOfType() for any type before the one that matched.
- */
- function PropTypeError(message, data) {
- this.message = message;
- this.data = data && typeof data === 'object' ? data: {};
- this.stack = '';
- }
- // Make `instanceof Error` still work for returned errors.
- PropTypeError.prototype = Error.prototype;
-
- function createChainableTypeChecker(validate) {
- if ("development" !== 'production') {
- var manualPropTypeCallCache = {};
- var manualPropTypeWarningCount = 0;
- }
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
- componentName = componentName || ANONYMOUS;
- propFullName = propFullName || propName;
-
- if (secret !== ReactPropTypesSecret) {
- if (throwOnDirectAccess) {
- // New behavior only for users of `prop-types` package
- var err = new Error(
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
- 'Read more at http://fb.me/use-check-prop-types'
- );
- err.name = 'Invariant Violation';
- throw err;
- } else if ("development" !== 'production' && typeof console !== 'undefined') {
- // Old behavior for people using React.PropTypes
- var cacheKey = componentName + ':' + propName;
- if (
- !manualPropTypeCallCache[cacheKey] &&
- // Avoid spamming the console because they are often not actionable except for lib authors
- manualPropTypeWarningCount < 3
- ) {
- printWarning(
- 'You are manually calling a React.PropTypes validation ' +
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
- 'and will throw in the standalone `prop-types` package. ' +
- 'You may be seeing this warning due to a third-party PropTypes ' +
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
- );
- manualPropTypeCallCache[cacheKey] = true;
- manualPropTypeWarningCount++;
- }
- }
- }
- if (props[propName] == null) {
- if (isRequired) {
- if (props[propName] === null) {
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
- }
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
- }
- return null;
- } else {
- return validate(props, propName, componentName, location, propFullName);
- }
- }
-
- var chainedCheckType = checkType.bind(null, false);
- chainedCheckType.isRequired = checkType.bind(null, true);
-
- return chainedCheckType;
- }
-
- function createPrimitiveTypeChecker(expectedType) {
- function validate(props, propName, componentName, location, propFullName, secret) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== expectedType) {
- // `propValue` being instance of, say, date/regexp, pass the 'object'
- // check, but we can offer a more precise error message here rather than
- // 'of type `object`'.
- var preciseType = getPreciseType(propValue);
-
- return new PropTypeError(
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
- {expectedType: expectedType}
- );
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createAnyTypeChecker() {
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
- }
-
- function createArrayOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
- }
- var propValue = props[propName];
- if (!Array.isArray(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
- }
- for (var i = 0; i < propValue.length; i++) {
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
- if (error instanceof Error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createElementTypeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- if (!isValidElement(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createElementTypeTypeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- if (!ReactIs.isValidElementType(propValue)) {
- var propType = getPropType(propValue);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createInstanceTypeChecker(expectedClass) {
- function validate(props, propName, componentName, location, propFullName) {
- if (!(props[propName] instanceof expectedClass)) {
- var expectedClassName = expectedClass.name || ANONYMOUS;
- var actualClassName = getClassName(props[propName]);
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createEnumTypeChecker(expectedValues) {
- if (!Array.isArray(expectedValues)) {
- if ("development" !== 'production') {
- if (arguments.length > 1) {
- printWarning(
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
- );
- } else {
- printWarning('Invalid argument supplied to oneOf, expected an array.');
- }
- }
- return emptyFunctionThatReturnsNull;
- }
-
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- for (var i = 0; i < expectedValues.length; i++) {
- if (is(propValue, expectedValues[i])) {
- return null;
- }
- }
-
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
- var type = getPreciseType(value);
- if (type === 'symbol') {
- return String(value);
- }
- return value;
- });
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
- }
- return createChainableTypeChecker(validate);
- }
-
- function createObjectOfTypeChecker(typeChecker) {
- function validate(props, propName, componentName, location, propFullName) {
- if (typeof typeChecker !== 'function') {
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
- }
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
- }
- for (var key in propValue) {
- if (has(propValue, key)) {
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error instanceof Error) {
- return error;
- }
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createUnionTypeChecker(arrayOfTypeCheckers) {
- if (!Array.isArray(arrayOfTypeCheckers)) {
- "development" !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
- return emptyFunctionThatReturnsNull;
- }
-
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- if (typeof checker !== 'function') {
- printWarning(
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
- );
- return emptyFunctionThatReturnsNull;
- }
- }
-
- function validate(props, propName, componentName, location, propFullName) {
- var expectedTypes = [];
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
- var checker = arrayOfTypeCheckers[i];
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
- if (checkerResult == null) {
- return null;
- }
- if (checkerResult.data.hasOwnProperty('expectedType')) {
- expectedTypes.push(checkerResult.data.expectedType);
- }
- }
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
- }
- return createChainableTypeChecker(validate);
- }
-
- function createNodeChecker() {
- function validate(props, propName, componentName, location, propFullName) {
- if (!isNode(props[propName])) {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function invalidValidatorError(componentName, location, propFullName, key, type) {
- return new PropTypeError(
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
- );
- }
-
- function createShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- for (var key in shapeTypes) {
- var checker = shapeTypes[key];
- if (typeof checker !== 'function') {
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error) {
- return error;
- }
- }
- return null;
- }
- return createChainableTypeChecker(validate);
- }
-
- function createStrictShapeTypeChecker(shapeTypes) {
- function validate(props, propName, componentName, location, propFullName) {
- var propValue = props[propName];
- var propType = getPropType(propValue);
- if (propType !== 'object') {
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
- }
- // We need to check all keys in case some are required but missing from props.
- var allKeys = assign({}, props[propName], shapeTypes);
- for (var key in allKeys) {
- var checker = shapeTypes[key];
- if (has(shapeTypes, key) && typeof checker !== 'function') {
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
- }
- if (!checker) {
- return new PropTypeError(
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
- );
- }
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
- if (error) {
- return error;
- }
- }
- return null;
- }
-
- return createChainableTypeChecker(validate);
- }
-
- function isNode(propValue) {
- switch (typeof propValue) {
- case 'number':
- case 'string':
- case 'undefined':
- return true;
- case 'boolean':
- return !propValue;
- case 'object':
- if (Array.isArray(propValue)) {
- return propValue.every(isNode);
- }
- if (propValue === null || isValidElement(propValue)) {
- return true;
- }
-
- var iteratorFn = getIteratorFn(propValue);
- if (iteratorFn) {
- var iterator = iteratorFn.call(propValue);
- var step;
- if (iteratorFn !== propValue.entries) {
- while (!(step = iterator.next()).done) {
- if (!isNode(step.value)) {
- return false;
- }
- }
- } else {
- // Iterator will provide entry [k,v] tuples rather than values.
- while (!(step = iterator.next()).done) {
- var entry = step.value;
- if (entry) {
- if (!isNode(entry[1])) {
- return false;
- }
- }
- }
- }
- } else {
- return false;
- }
-
- return true;
- default:
- return false;
- }
- }
-
- function isSymbol(propType, propValue) {
- // Native Symbol.
- if (propType === 'symbol') {
- return true;
- }
-
- // falsy value can't be a Symbol
- if (!propValue) {
- return false;
- }
-
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
- if (propValue['@@toStringTag'] === 'Symbol') {
- return true;
- }
-
- // Fallback for non-spec compliant Symbols which are polyfilled.
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
- return true;
- }
-
- return false;
- }
-
- // Equivalent of `typeof` but with special handling for array and regexp.
- function getPropType(propValue) {
- var propType = typeof propValue;
- if (Array.isArray(propValue)) {
- return 'array';
- }
- if (propValue instanceof RegExp) {
- // Old webkits (at least until Android 4.0) return 'function' rather than
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
- // passes PropTypes.object.
- return 'object';
- }
- if (isSymbol(propType, propValue)) {
- return 'symbol';
- }
- return propType;
- }
-
- // This handles more types than `getPropType`. Only used for error messages.
- // See `createPrimitiveTypeChecker`.
- function getPreciseType(propValue) {
- if (typeof propValue === 'undefined' || propValue === null) {
- return '' + propValue;
- }
- var propType = getPropType(propValue);
- if (propType === 'object') {
- if (propValue instanceof Date) {
- return 'date';
- } else if (propValue instanceof RegExp) {
- return 'regexp';
- }
- }
- return propType;
- }
-
- // Returns a string that is postfixed to a warning about an invalid type.
- // For example, "undefined" or "of type array"
- function getPostfixForTypeWarning(value) {
- var type = getPreciseType(value);
- switch (type) {
- case 'array':
- case 'object':
- return 'an ' + type;
- case 'boolean':
- case 'date':
- case 'regexp':
- return 'a ' + type;
- default:
- return type;
- }
- }
-
- // Returns class name of the object, if any.
- function getClassName(propValue) {
- if (!propValue.constructor || !propValue.constructor.name) {
- return ANONYMOUS;
- }
- return propValue.constructor.name;
- }
-
- ReactPropTypes.checkPropTypes = checkPropTypes;
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
- ReactPropTypes.PropTypes = ReactPropTypes;
-
- return ReactPropTypes;
-};
-
-},{"./checkPropTypes":1,"./lib/ReactPropTypesSecret":5,"./lib/has":6,"object-assign":7,"react-is":11}],4:[function(require,module,exports){
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-if ("development" !== 'production') {
- var ReactIs = require('react-is');
-
- // By explicitly using `prop-types` you are opting into new development behavior.
- // http://fb.me/prop-types-in-prod
- var throwOnDirectAccess = true;
- module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);
-} else {
- // By explicitly using `prop-types` you are opting into new production behavior.
- // http://fb.me/prop-types-in-prod
- module.exports = require('./factoryWithThrowingShims')();
-}
-
-},{"./factoryWithThrowingShims":2,"./factoryWithTypeCheckers":3,"react-is":11}],5:[function(require,module,exports){
-/**
- * Copyright (c) 2013-present, Facebook, Inc.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
-
-module.exports = ReactPropTypesSecret;
-
-},{}],6:[function(require,module,exports){
-module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
-
-},{}],7:[function(require,module,exports){
-/*
-object-assign
-(c) Sindre Sorhus
-@license MIT
-*/
-
-'use strict';
-/* eslint-disable no-unused-vars */
-var getOwnPropertySymbols = Object.getOwnPropertySymbols;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var propIsEnumerable = Object.prototype.propertyIsEnumerable;
-
-function toObject(val) {
- if (val === null || val === undefined) {
- throw new TypeError('Object.assign cannot be called with null or undefined');
- }
-
- return Object(val);
-}
-
-function shouldUseNative() {
- try {
- if (!Object.assign) {
- return false;
- }
-
- // Detect buggy property enumeration order in older V8 versions.
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
- test1[5] = 'de';
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test2 = {};
- for (var i = 0; i < 10; i++) {
- test2['_' + String.fromCharCode(i)] = i;
- }
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
- return test2[n];
- });
- if (order2.join('') !== '0123456789') {
- return false;
- }
-
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
- var test3 = {};
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
- test3[letter] = letter;
- });
- if (Object.keys(Object.assign({}, test3)).join('') !==
- 'abcdefghijklmnopqrst') {
- return false;
- }
-
- return true;
- } catch (err) {
- // We don't expect any of the above to throw, but better to be safe.
- return false;
- }
-}
-
-module.exports = shouldUseNative() ? Object.assign : function (target, source) {
- var from;
- var to = toObject(target);
- var symbols;
-
- for (var s = 1; s < arguments.length; s++) {
- from = Object(arguments[s]);
-
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
-
- if (getOwnPropertySymbols) {
- symbols = getOwnPropertySymbols(from);
- for (var i = 0; i < symbols.length; i++) {
- if (propIsEnumerable.call(from, symbols[i])) {
- to[symbols[i]] = from[symbols[i]];
- }
- }
- }
- }
-
- return to;
-};
-
-},{}],8:[function(require,module,exports){
-// shim for using process in browser
-var process = module.exports = {};
-
-// cached from whatever global is present so that test runners that stub it
-// don't break things. But we need to wrap it in a try catch in case it is
-// wrapped in strict mode code which doesn't define any globals. It's inside a
-// function because try/catches deoptimize in certain engines.
-
-var cachedSetTimeout;
-var cachedClearTimeout;
-
-function defaultSetTimout() {
- throw new Error('setTimeout has not been defined');
-}
-function defaultClearTimeout () {
- throw new Error('clearTimeout has not been defined');
-}
-(function () {
- try {
- if (typeof setTimeout === 'function') {
- cachedSetTimeout = setTimeout;
- } else {
- cachedSetTimeout = defaultSetTimout;
- }
- } catch (e) {
- cachedSetTimeout = defaultSetTimout;
- }
- try {
- if (typeof clearTimeout === 'function') {
- cachedClearTimeout = clearTimeout;
- } else {
- cachedClearTimeout = defaultClearTimeout;
- }
- } catch (e) {
- cachedClearTimeout = defaultClearTimeout;
- }
-} ())
-function runTimeout(fun) {
- if (cachedSetTimeout === setTimeout) {
- //normal enviroments in sane situations
- return setTimeout(fun, 0);
- }
- // if setTimeout wasn't available but was latter defined
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
- cachedSetTimeout = setTimeout;
- return setTimeout(fun, 0);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedSetTimeout(fun, 0);
- } catch(e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedSetTimeout.call(null, fun, 0);
- } catch(e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
- return cachedSetTimeout.call(this, fun, 0);
- }
- }
-
-
-}
-function runClearTimeout(marker) {
- if (cachedClearTimeout === clearTimeout) {
- //normal enviroments in sane situations
- return clearTimeout(marker);
- }
- // if clearTimeout wasn't available but was latter defined
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
- cachedClearTimeout = clearTimeout;
- return clearTimeout(marker);
- }
- try {
- // when when somebody has screwed with setTimeout but no I.E. maddness
- return cachedClearTimeout(marker);
- } catch (e){
- try {
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
- return cachedClearTimeout.call(null, marker);
- } catch (e){
- // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
- return cachedClearTimeout.call(this, marker);
- }
- }
-
-
-
-}
-var queue = [];
-var draining = false;
-var currentQueue;
-var queueIndex = -1;
-
-function cleanUpNextTick() {
- if (!draining || !currentQueue) {
- return;
- }
- draining = false;
- if (currentQueue.length) {
- queue = currentQueue.concat(queue);
- } else {
- queueIndex = -1;
- }
- if (queue.length) {
- drainQueue();
- }
-}
-
-function drainQueue() {
- if (draining) {
- return;
- }
- var timeout = runTimeout(cleanUpNextTick);
- draining = true;
-
- var len = queue.length;
- while(len) {
- currentQueue = queue;
- queue = [];
- while (++queueIndex < len) {
- if (currentQueue) {
- currentQueue[queueIndex].run();
- }
- }
- queueIndex = -1;
- len = queue.length;
- }
- currentQueue = null;
- draining = false;
- runClearTimeout(timeout);
-}
-
-process.nextTick = function (fun) {
- var args = new Array(arguments.length - 1);
- if (arguments.length > 1) {
- for (var i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i];
- }
- }
- queue.push(new Item(fun, args));
- if (queue.length === 1 && !draining) {
- runTimeout(drainQueue);
- }
-};
-
-// v8 likes predictible objects
-function Item(fun, array) {
- this.fun = fun;
- this.array = array;
-}
-Item.prototype.run = function () {
- this.fun.apply(null, this.array);
-};
-process.title = 'browser';
-process.browser = true;
-process.env = {};
-process.argv = [];
-process.version = ''; // empty string to avoid regexp issues
-process.versions = {};
-
-function noop() {}
-
-process.on = noop;
-process.addListener = noop;
-process.once = noop;
-process.off = noop;
-process.removeListener = noop;
-process.removeAllListeners = noop;
-process.emit = noop;
-process.prependListener = noop;
-process.prependOnceListener = noop;
-
-process.listeners = function (name) { return [] }
-
-process.binding = function (name) {
- throw new Error('process.binding is not supported');
-};
-
-process.cwd = function () { return '/' };
-process.chdir = function (dir) {
- throw new Error('process.chdir is not supported');
-};
-process.umask = function() { return 0; };
-
-},{}],9:[function(require,module,exports){
-(function (process){(function (){
-/** @license React v16.13.1
- * react-is.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var hasSymbol = typeof Symbol === 'function' && Symbol.for;
-var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
-var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
-var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
-var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
-var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
-var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
-var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
-// (unstable) APIs that have been removed. Can we remove the symbols?
-
-var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
-var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
-var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
-var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
-var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
-var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
-var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
-var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
-var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
-var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
-
-function isValidElementType(type) {
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
-}
-
-function typeOf(object) {
- if (typeof object === 'object' && object !== null) {
- var $$typeof = object.$$typeof;
-
- switch ($$typeof) {
- case REACT_ELEMENT_TYPE:
- var type = object.type;
-
- switch (type) {
- case REACT_ASYNC_MODE_TYPE:
- case REACT_CONCURRENT_MODE_TYPE:
- case REACT_FRAGMENT_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_SUSPENSE_TYPE:
- return type;
-
- default:
- var $$typeofType = type && type.$$typeof;
-
- switch ($$typeofType) {
- case REACT_CONTEXT_TYPE:
- case REACT_FORWARD_REF_TYPE:
- case REACT_LAZY_TYPE:
- case REACT_MEMO_TYPE:
- case REACT_PROVIDER_TYPE:
- return $$typeofType;
-
- default:
- return $$typeof;
- }
-
- }
-
- case REACT_PORTAL_TYPE:
- return $$typeof;
- }
- }
-
- return undefined;
-} // AsyncMode is deprecated along with isAsyncMode
-
-var AsyncMode = REACT_ASYNC_MODE_TYPE;
-var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
-var ContextConsumer = REACT_CONTEXT_TYPE;
-var ContextProvider = REACT_PROVIDER_TYPE;
-var Element = REACT_ELEMENT_TYPE;
-var ForwardRef = REACT_FORWARD_REF_TYPE;
-var Fragment = REACT_FRAGMENT_TYPE;
-var Lazy = REACT_LAZY_TYPE;
-var Memo = REACT_MEMO_TYPE;
-var Portal = REACT_PORTAL_TYPE;
-var Profiler = REACT_PROFILER_TYPE;
-var StrictMode = REACT_STRICT_MODE_TYPE;
-var Suspense = REACT_SUSPENSE_TYPE;
-var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
-
-function isAsyncMode(object) {
- {
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
-
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
- }
- }
-
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
-}
-function isConcurrentMode(object) {
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
-}
-function isContextConsumer(object) {
- return typeOf(object) === REACT_CONTEXT_TYPE;
-}
-function isContextProvider(object) {
- return typeOf(object) === REACT_PROVIDER_TYPE;
-}
-function isElement(object) {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
-}
-function isForwardRef(object) {
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
-}
-function isFragment(object) {
- return typeOf(object) === REACT_FRAGMENT_TYPE;
-}
-function isLazy(object) {
- return typeOf(object) === REACT_LAZY_TYPE;
-}
-function isMemo(object) {
- return typeOf(object) === REACT_MEMO_TYPE;
-}
-function isPortal(object) {
- return typeOf(object) === REACT_PORTAL_TYPE;
-}
-function isProfiler(object) {
- return typeOf(object) === REACT_PROFILER_TYPE;
-}
-function isStrictMode(object) {
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
-}
-function isSuspense(object) {
- return typeOf(object) === REACT_SUSPENSE_TYPE;
-}
-
-exports.AsyncMode = AsyncMode;
-exports.ConcurrentMode = ConcurrentMode;
-exports.ContextConsumer = ContextConsumer;
-exports.ContextProvider = ContextProvider;
-exports.Element = Element;
-exports.ForwardRef = ForwardRef;
-exports.Fragment = Fragment;
-exports.Lazy = Lazy;
-exports.Memo = Memo;
-exports.Portal = Portal;
-exports.Profiler = Profiler;
-exports.StrictMode = StrictMode;
-exports.Suspense = Suspense;
-exports.isAsyncMode = isAsyncMode;
-exports.isConcurrentMode = isConcurrentMode;
-exports.isContextConsumer = isContextConsumer;
-exports.isContextProvider = isContextProvider;
-exports.isElement = isElement;
-exports.isForwardRef = isForwardRef;
-exports.isFragment = isFragment;
-exports.isLazy = isLazy;
-exports.isMemo = isMemo;
-exports.isPortal = isPortal;
-exports.isProfiler = isProfiler;
-exports.isStrictMode = isStrictMode;
-exports.isSuspense = isSuspense;
-exports.isValidElementType = isValidElementType;
-exports.typeOf = typeOf;
- })();
-}
-
-}).call(this)}).call(this,require('_process'))
-},{"_process":8}],10:[function(require,module,exports){
-/** @license React v16.13.1
- * react-is.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
-Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
-function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
-exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
-exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
-exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
-
-},{}],11:[function(require,module,exports){
-(function (process){(function (){
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-is.production.min.js');
-} else {
- module.exports = require('./cjs/react-is.development.js');
-}
-
-}).call(this)}).call(this,require('_process'))
-},{"./cjs/react-is.development.js":9,"./cjs/react-is.production.min.js":10,"_process":8}]},{},[4])(4)
-});
diff --git a/node_modules/prop-types/prop-types.min.js b/node_modules/prop-types/prop-types.min.js
deleted file mode 100644
index 7a746e1..0000000
--- a/node_modules/prop-types/prop-types.min.js
+++ /dev/null
@@ -1 +0,0 @@
-!function(f){"object"==typeof exports&&"undefined"!=typeof module?module.exports=f():"function"==typeof define&&define.amd?define([],f):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).PropTypes=f()}(function(){return function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var p="function"==typeof require&&require;if(!f&&p)return p(i,!0);if(u)return u(i,!0);throw(p=new Error("Cannot find module '"+i+"'")).code="MODULE_NOT_FOUND",p}p=n[i]={exports:{}},e[i][0].call(p.exports,function(r){return o(e[i][1][r]||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}({1:[function(require,module,exports){"use strict";var ReactPropTypesSecret=require(3);function emptyFunction(){}function emptyFunctionWithReset(){}emptyFunctionWithReset.resetWarningCache=emptyFunction,module.exports=function(){function e(e,t,n,r,o,c){if(c!==ReactPropTypesSecret){c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}var n={array:e.isRequired=e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:emptyFunctionWithReset,resetWarningCache:emptyFunction};return n.PropTypes=n}},{3:3}],2:[function(require,module,exports){module.exports=require(1)()},{1:1}],3:[function(require,module,exports){"use strict";module.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},{}]},{},[2])(2)}); \ No newline at end of file
diff --git a/node_modules/react-dom/LICENSE b/node_modules/react-dom/LICENSE
deleted file mode 100644
index b96dcb0..0000000
--- a/node_modules/react-dom/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) Facebook, Inc. and its affiliates.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/react-dom/README.md b/node_modules/react-dom/README.md
deleted file mode 100644
index 2652912..0000000
--- a/node_modules/react-dom/README.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# `react-dom`
-
-This package serves as the entry point to the DOM and server renderers for React. It is intended to be paired with the generic React package, which is shipped as `react` to npm.
-
-## Installation
-
-```sh
-npm install react react-dom
-```
-
-## Usage
-
-### In the browser
-
-```js
-var React = require('react');
-var ReactDOM = require('react-dom');
-
-class MyComponent extends React.Component {
- render() {
- return <div>Hello World</div>;
- }
-}
-
-ReactDOM.render(<MyComponent />, node);
-```
-
-### On the server
-
-```js
-var React = require('react');
-var ReactDOMServer = require('react-dom/server');
-
-class MyComponent extends React.Component {
- render() {
- return <div>Hello World</div>;
- }
-}
-
-ReactDOMServer.renderToString(<MyComponent />);
-```
-
-## API
-
-### `react-dom`
-
-- `findDOMNode`
-- `render`
-- `unmountComponentAtNode`
-
-### `react-dom/server`
-
-- `renderToString`
-- `renderToStaticMarkup`
diff --git a/node_modules/react-dom/build-info.json b/node_modules/react-dom/build-info.json
deleted file mode 100644
index db5dbe5..0000000
--- a/node_modules/react-dom/build-info.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "branch": "pull/21051",
- "buildNumber": "287151",
- "checksum": "94f5c65",
- "commit": "12adaffef",
- "environment": "ci",
- "reactVersion": "17.0.0-12adaffef"
-}
diff --git a/node_modules/react-dom/cjs/react-dom-server.browser.development.js b/node_modules/react-dom/cjs/react-dom-server.browser.development.js
deleted file mode 100644
index 37fe89d..0000000
--- a/node_modules/react-dom/cjs/react-dom-server.browser.development.js
+++ /dev/null
@@ -1,4342 +0,0 @@
-/** @license React v17.0.2
- * react-dom-server.browser.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var React = require('react');
-var _assign = require('object-assign');
-
-// Do not require this module directly! Use normal `invariant` calls with
-// template literal strings. The messages will be replaced with error codes
-// during build.
-function formatProdErrorMessage(code) {
- var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
-
- for (var i = 1; i < arguments.length; i++) {
- url += '&args[]=' + encodeURIComponent(arguments[i]);
- }
-
- return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
-}
-
-// TODO: this is special because it gets imported during build.
-var ReactVersion = '17.0.2';
-
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
-// by calls to these methods by a Babel plugin.
-//
-// In PROD (or in packages without access to React internals),
-// they are left as they are instead.
-
-function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
-}
-function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
-}
-
-function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
-}
-
-// ATTENTION
-// When adding new symbols to this file,
-// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var REACT_ELEMENT_TYPE = 0xeac7;
-var REACT_PORTAL_TYPE = 0xeaca;
-var REACT_FRAGMENT_TYPE = 0xeacb;
-var REACT_STRICT_MODE_TYPE = 0xeacc;
-var REACT_PROFILER_TYPE = 0xead2;
-var REACT_PROVIDER_TYPE = 0xeacd;
-var REACT_CONTEXT_TYPE = 0xeace;
-var REACT_FORWARD_REF_TYPE = 0xead0;
-var REACT_SUSPENSE_TYPE = 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = 0xead8;
-var REACT_MEMO_TYPE = 0xead3;
-var REACT_LAZY_TYPE = 0xead4;
-var REACT_BLOCK_TYPE = 0xead9;
-var REACT_SERVER_BLOCK_TYPE = 0xeada;
-var REACT_FUNDAMENTAL_TYPE = 0xead5;
-var REACT_SCOPE_TYPE = 0xead7;
-var REACT_OPAQUE_ID_TYPE = 0xeae0;
-var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
-var REACT_OFFSCREEN_TYPE = 0xeae2;
-var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
-}
-
-function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
-}
-
-function getContextName(type) {
- return type.displayName || 'Context';
-}
-
-function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case REACT_PROFILER_TYPE:
- return 'Profiler';
-
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
-
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
-}
-
-// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
-var enableSuspenseServerRenderer = false;
-
-// Helpers to patch console.logs to avoid logging during side-effect free
-// replaying on render function. This currently only patches the object
-// lazily which won't cover if the log function was extracted eagerly.
-// We could also eagerly patch the method.
-var disabledDepth = 0;
-var prevLog;
-var prevInfo;
-var prevWarn;
-var prevError;
-var prevGroup;
-var prevGroupCollapsed;
-var prevGroupEnd;
-
-function disabledLog() {}
-
-disabledLog.__reactDisabledLog = true;
-function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
-}
-function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: _assign({}, props, {
- value: prevLog
- }),
- info: _assign({}, props, {
- value: prevInfo
- }),
- warn: _assign({}, props, {
- value: prevWarn
- }),
- error: _assign({}, props, {
- value: prevError
- }),
- group: _assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: _assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: _assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
-}
-
-var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
-var prefix;
-function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
-}
-var reentry = false;
-var componentFrameCache;
-
-{
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
-}
-
-function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
-}
-function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
-}
-
-function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
-}
-
-function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case REACT_SUSPENSE_TYPE:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
-}
-
-var loggedTypeFailures = {};
-var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame.setExtraStackFrame(null);
- }
- }
-}
-
-function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
-}
-
-var didWarnAboutInvalidateContextType;
-
-{
- didWarnAboutInvalidateContextType = new Set();
-}
-
-var emptyObject = {};
-
-{
- Object.freeze(emptyObject);
-}
-
-function maskContext(type, context) {
- var contextTypes = type.contextTypes;
-
- if (!contextTypes) {
- return emptyObject;
- }
-
- var maskedContext = {};
-
- for (var contextName in contextTypes) {
- maskedContext[contextName] = context[contextName];
- }
-
- return maskedContext;
-}
-
-function checkContextTypes(typeSpecs, values, location) {
- {
- checkPropTypes(typeSpecs, values, location, 'Component');
- }
-}
-
-function validateContextBounds(context, threadID) {
- // If we don't have enough slots in this context to store this threadID,
- // fill it in without leaving any holes to ensure that the VM optimizes
- // this as non-holey index properties.
- // (Note: If `react` package is < 16.6, _threadCount is undefined.)
- for (var i = context._threadCount | 0; i <= threadID; i++) {
- // We assume that this is the same as the defaultValue which might not be
- // true if we're rendering inside a secondary renderer but they are
- // secondary because these use cases are very rare.
- context[i] = context._currentValue2;
- context._threadCount = i + 1;
- }
-}
-function processContext(type, context, threadID, isClass) {
- if (isClass) {
- var contextType = type.contextType;
-
- {
- if ('contextType' in type) {
- var isValid = // Allow null for conditional declaration
- contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
-
- if (!isValid && !didWarnAboutInvalidateContextType.has(type)) {
- didWarnAboutInvalidateContextType.add(type);
- var addendum = '';
-
- if (contextType === undefined) {
- 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.';
- } else if (typeof contextType !== 'object') {
- addendum = ' However, it is set to a ' + typeof contextType + '.';
- } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
- addendum = ' Did you accidentally pass the Context.Provider instead?';
- } else if (contextType._context !== undefined) {
- // <Context.Consumer>
- addendum = ' Did you accidentally pass the Context.Consumer instead?';
- } else {
- addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
- }
-
- error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
- }
- }
- }
-
- if (typeof contextType === 'object' && contextType !== null) {
- validateContextBounds(contextType, threadID);
- return contextType[threadID];
- }
-
- {
- var maskedContext = maskContext(type, context);
-
- {
- if (type.contextTypes) {
- checkContextTypes(type.contextTypes, maskedContext, 'context');
- }
- }
-
- return maskedContext;
- }
- } else {
- {
- var _maskedContext = maskContext(type, context);
-
- {
- if (type.contextTypes) {
- checkContextTypes(type.contextTypes, _maskedContext, 'context');
- }
- }
-
- return _maskedContext;
- }
- }
-}
-
-var nextAvailableThreadIDs = new Uint16Array(16);
-
-for (var i = 0; i < 15; i++) {
- nextAvailableThreadIDs[i] = i + 1;
-}
-
-nextAvailableThreadIDs[15] = 0;
-
-function growThreadCountAndReturnNextAvailable() {
- var oldArray = nextAvailableThreadIDs;
- var oldSize = oldArray.length;
- var newSize = oldSize * 2;
-
- if (!(newSize <= 0x10000)) {
- {
- throw Error( "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic." );
- }
- }
-
- var newArray = new Uint16Array(newSize);
- newArray.set(oldArray);
- nextAvailableThreadIDs = newArray;
- nextAvailableThreadIDs[0] = oldSize + 1;
-
- for (var _i = oldSize; _i < newSize - 1; _i++) {
- nextAvailableThreadIDs[_i] = _i + 1;
- }
-
- nextAvailableThreadIDs[newSize - 1] = 0;
- return oldSize;
-}
-
-function allocThreadID() {
- var nextID = nextAvailableThreadIDs[0];
-
- if (nextID === 0) {
- return growThreadCountAndReturnNextAvailable();
- }
-
- nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID];
- return nextID;
-}
-function freeThreadID(id) {
- nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0];
- nextAvailableThreadIDs[0] = id;
-}
-
-// A reserved attribute.
-// It is handled by React separately and shouldn't be written to the DOM.
-var RESERVED = 0; // A simple string attribute.
-// Attributes that aren't in the filter are presumed to have this type.
-
-var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
-// "enumerated" attributes with "true" and "false" as possible values.
-// When true, it should be set to a "true" string.
-// When false, it should be set to a "false" string.
-
-var BOOLEANISH_STRING = 2; // A real boolean attribute.
-// When true, it should be present (set either to an empty string or its name).
-// When false, it should be omitted.
-
-var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
-// When true, it should be present (set either to an empty string or its name).
-// When false, it should be omitted.
-// For any other value, should be present with that value.
-
-var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
-// When falsy, it should be removed.
-
-var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
-// When falsy, it should be removed.
-
-var POSITIVE_NUMERIC = 6;
-
-/* eslint-disable max-len */
-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";
-/* eslint-enable max-len */
-
-var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
-var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
-var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var illegalAttributeNameCache = {};
-var validatedAttributeNameCache = {};
-function isAttributeNameSafe(attributeName) {
- if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
- return true;
- }
-
- if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
- return false;
- }
-
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
- validatedAttributeNameCache[attributeName] = true;
- return true;
- }
-
- illegalAttributeNameCache[attributeName] = true;
-
- {
- error('Invalid attribute name: `%s`', attributeName);
- }
-
- return false;
-}
-function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null) {
- return propertyInfo.type === RESERVED;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
- return true;
- }
-
- return false;
-}
-function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null && propertyInfo.type === RESERVED) {
- return false;
- }
-
- switch (typeof value) {
- case 'function': // $FlowIssue symbol is perfectly valid here
-
- case 'symbol':
- // eslint-disable-line
- return true;
-
- case 'boolean':
- {
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
- return !propertyInfo.acceptsBooleans;
- } else {
- var prefix = name.toLowerCase().slice(0, 5);
- return prefix !== 'data-' && prefix !== 'aria-';
- }
- }
-
- default:
- return false;
- }
-}
-function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
- if (value === null || typeof value === 'undefined') {
- return true;
- }
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
- return true;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
-
- switch (propertyInfo.type) {
- case BOOLEAN:
- return !value;
-
- case OVERLOADED_BOOLEAN:
- return value === false;
-
- case NUMERIC:
- return isNaN(value);
-
- case POSITIVE_NUMERIC:
- return isNaN(value) || value < 1;
- }
- }
-
- return false;
-}
-function getPropertyInfo(name) {
- return properties.hasOwnProperty(name) ? properties[name] : null;
-}
-
-function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
- this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
- this.attributeName = attributeName;
- this.attributeNamespace = attributeNamespace;
- this.mustUseProperty = mustUseProperty;
- this.propertyName = name;
- this.type = type;
- this.sanitizeURL = sanitizeURL;
- this.removeEmptyString = removeEmptyString;
-} // When adding attributes to this list, be sure to also add them to
-// the `possibleStandardNames` module to ensure casing and incorrect
-// name warnings.
-
-
-var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
-
-var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
-// elements (not just inputs). Now that ReactDOMInput assigns to the
-// defaultValue property -- do we need this?
-'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
-reservedProps.forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // A few React string attributes have a different name.
-// This is a mapping from React prop names to the attribute names.
-
-[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
- var name = _ref[0],
- attributeName = _ref[1];
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are "enumerated" HTML attributes that accept "true" and "false".
-// In React, we let users pass `true` and `false` even though technically
-// these aren't boolean attributes (they are coerced to strings).
-
-['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are "enumerated" SVG attributes that accept "true" and "false".
-// In React, we let users pass `true` and `false` even though technically
-// these aren't boolean attributes (they are coerced to strings).
-// Since these are SVG attributes, their attribute names are case-sensitive.
-
-['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML boolean attributes.
-
-['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
-// on the client side because the browsers are inconsistent. Instead we call focus().
-'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
-'itemScope'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are the few React props that we set as DOM properties
-// rather than attributes. These are all booleans.
-
-['checked', // Note: `option.selected` is not updated if `select.multiple` is
-// disabled with `removeAttribute`. We have special logic for handling this.
-'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that are "overloaded booleans": they behave like
-// booleans, but can also accept a string value.
-
-['capture', 'download' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that must be positive numbers.
-
-['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that must be numbers.
-
-['rowSpan', 'start'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-});
-var CAMELIZE = /[\-\:]([a-z])/g;
-
-var capitalize = function (token) {
- return token[1].toUpperCase();
-}; // This is a list of all SVG attributes that need special casing, namespacing,
-// or boolean value assignment. Regular attributes that just accept strings
-// and have the same names are omitted, just like in the HTML attribute filter.
-// Some of these attributes can be hard to find. This list was created by
-// scraping the MDN documentation.
-
-
-['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' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // String SVG attributes with the xlink namespace.
-
-['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
- false);
-}); // String SVG attributes with the xml namespace.
-
-['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
- false);
-}); // These attribute exists both in HTML and SVG.
-// The attribute name is case-sensitive in SVG so we can't just use
-// the React name like we do for attributes that exist only in HTML.
-
-['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These attributes accept URLs. These must not allow javascript: URLS.
-// These will also need to accept Trusted Types object in the future.
-
-var xlinkHref = 'xlinkHref';
-properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
-'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
-false);
-['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- true, // sanitizeURL
- true);
-});
-
-// and any newline or tab are filtered out as if they're not part of the URL.
-// https://url.spec.whatwg.org/#url-parsing
-// Tab or newline are defined as \r\n\t:
-// https://infra.spec.whatwg.org/#ascii-tab-or-newline
-// A C0 control is a code point in the range \u0000 NULL to \u001F
-// INFORMATION SEPARATOR ONE, inclusive:
-// https://infra.spec.whatwg.org/#c0-control-or-space
-
-/* eslint-disable max-len */
-
-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;
-var didWarn = false;
-
-function sanitizeURL(url) {
- {
- if (!didWarn && isJavaScriptProtocol.test(url)) {
- didWarn = true;
-
- 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));
- }
- }
-}
-
-// code copied and modified from escape-html
-
-/**
- * Module variables.
- * @private
- */
-var matchHtmlRegExp = /["'&<>]/;
-/**
- * Escapes special characters and HTML entities in a given html string.
- *
- * @param {string} string HTML string to escape for later insertion
- * @return {string}
- * @public
- */
-
-function escapeHtml(string) {
- var str = '' + string;
- var match = matchHtmlRegExp.exec(str);
-
- if (!match) {
- return str;
- }
-
- var escape;
- var html = '';
- var index;
- var lastIndex = 0;
-
- for (index = match.index; index < str.length; index++) {
- switch (str.charCodeAt(index)) {
- case 34:
- // "
- escape = '&quot;';
- break;
-
- case 38:
- // &
- escape = '&amp;';
- break;
-
- case 39:
- // '
- escape = '&#x27;'; // modified from escape-html; used to be '&#39'
-
- break;
-
- case 60:
- // <
- escape = '&lt;';
- break;
-
- case 62:
- // >
- escape = '&gt;';
- break;
-
- default:
- continue;
- }
-
- if (lastIndex !== index) {
- html += str.substring(lastIndex, index);
- }
-
- lastIndex = index + 1;
- html += escape;
- }
-
- return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
-} // end code copied and modified from escape-html
-
-/**
- * Escapes text to prevent scripting attacks.
- *
- * @param {*} text Text value to escape.
- * @return {string} An escaped string.
- */
-
-
-function escapeTextForBrowser(text) {
- if (typeof text === 'boolean' || typeof text === 'number') {
- // this shortcircuit helps perf for types that we know will never have
- // special characters, especially given that this function is used often
- // for numeric dom ids.
- return '' + text;
- }
-
- return escapeHtml(text);
-}
-
-/**
- * Escapes attribute value to prevent scripting attacks.
- *
- * @param {*} value Value to escape.
- * @return {string} An escaped string.
- */
-
-function quoteAttributeValueForBrowser(value) {
- return '"' + escapeTextForBrowser(value) + '"';
-}
-
-function createMarkupForRoot() {
- return ROOT_ATTRIBUTE_NAME + '=""';
-}
-/**
- * Creates markup for a property.
- *
- * @param {string} name
- * @param {*} value
- * @return {?string} Markup string, or null if the property was invalid.
- */
-
-function createMarkupForProperty(name, value) {
- var propertyInfo = getPropertyInfo(name);
-
- if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo, false)) {
- return '';
- }
-
- if (shouldRemoveAttribute(name, value, propertyInfo, false)) {
- return '';
- }
-
- if (propertyInfo !== null) {
- var attributeName = propertyInfo.attributeName;
- var type = propertyInfo.type;
-
- if (type === BOOLEAN || type === OVERLOADED_BOOLEAN && value === true) {
- return attributeName + '=""';
- } else {
- if (propertyInfo.sanitizeURL) {
- value = '' + value;
- sanitizeURL(value);
- }
-
- return attributeName + '=' + quoteAttributeValueForBrowser(value);
- }
- } else if (isAttributeNameSafe(name)) {
- return name + '=' + quoteAttributeValueForBrowser(value);
- }
-
- return '';
-}
-/**
- * Creates markup for a custom property.
- *
- * @param {string} name
- * @param {*} value
- * @return {string} Markup string, or empty string if the property was invalid.
- */
-
-function createMarkupForCustomAttribute(name, value) {
- if (!isAttributeNameSafe(name) || value == null) {
- return '';
- }
-
- return name + '=' + quoteAttributeValueForBrowser(value);
-}
-
-/**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
-function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
- ;
-}
-
-var objectIs = typeof Object.is === 'function' ? Object.is : is;
-
-var currentlyRenderingComponent = null;
-var firstWorkInProgressHook = null;
-var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook
-
-var isReRender = false; // Whether an update was scheduled during the currently executing render pass.
-
-var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates
-
-var renderPhaseUpdates = null; // Counter to prevent infinite loops.
-
-var numberOfReRenders = 0;
-var RE_RENDER_LIMIT = 25;
-var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook
-
-var currentHookNameInDev;
-
-function resolveCurrentlyRenderingComponent() {
- if (!(currentlyRenderingComponent !== null)) {
- {
- throw 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
-
- {
- if (isInHookUserCodeInDev) {
- 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');
- }
- }
-
- return currentlyRenderingComponent;
-}
-
-function areHookInputsEqual(nextDeps, prevDeps) {
- if (prevDeps === null) {
- {
- 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);
- }
-
- return false;
- }
-
- {
- // Don't bother comparing lengths in prod because these arrays should be
- // passed inline.
- if (nextDeps.length !== prevDeps.length) {
- 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(', ') + "]");
- }
- }
-
- for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
- if (objectIs(nextDeps[i], prevDeps[i])) {
- continue;
- }
-
- return false;
- }
-
- return true;
-}
-
-function createHook() {
- if (numberOfReRenders > 0) {
- {
- {
- throw Error( "Rendered more hooks than during the previous render" );
- }
- }
- }
-
- return {
- memoizedState: null,
- queue: null,
- next: null
- };
-}
-
-function createWorkInProgressHook() {
- if (workInProgressHook === null) {
- // This is the first hook in the list
- if (firstWorkInProgressHook === null) {
- isReRender = false;
- firstWorkInProgressHook = workInProgressHook = createHook();
- } else {
- // There's already a work-in-progress. Reuse it.
- isReRender = true;
- workInProgressHook = firstWorkInProgressHook;
- }
- } else {
- if (workInProgressHook.next === null) {
- isReRender = false; // Append to the end of the list
-
- workInProgressHook = workInProgressHook.next = createHook();
- } else {
- // There's already a work-in-progress. Reuse it.
- isReRender = true;
- workInProgressHook = workInProgressHook.next;
- }
- }
-
- return workInProgressHook;
-}
-
-function prepareToUseHooks(componentIdentity) {
- currentlyRenderingComponent = componentIdentity;
-
- {
- isInHookUserCodeInDev = false;
- } // The following should have already been reset
- // didScheduleRenderPhaseUpdate = false;
- // firstWorkInProgressHook = null;
- // numberOfReRenders = 0;
- // renderPhaseUpdates = null;
- // workInProgressHook = null;
-
-}
-function finishHooks(Component, props, children, refOrContext) {
- // This must be called after every function component to prevent hooks from
- // being used in classes.
- while (didScheduleRenderPhaseUpdate) {
- // Updates were scheduled during the render phase. They are stored in
- // the `renderPhaseUpdates` map. Call the component again, reusing the
- // work-in-progress hooks and applying the additional updates on top. Keep
- // restarting until no more updates are scheduled.
- didScheduleRenderPhaseUpdate = false;
- numberOfReRenders += 1; // Start over from the beginning of the list
-
- workInProgressHook = null;
- children = Component(props, refOrContext);
- }
-
- resetHooksState();
- return children;
-} // Reset the internal hooks state if an error occurs while rendering a component
-
-function resetHooksState() {
- {
- isInHookUserCodeInDev = false;
- }
-
- currentlyRenderingComponent = null;
- didScheduleRenderPhaseUpdate = false;
- firstWorkInProgressHook = null;
- numberOfReRenders = 0;
- renderPhaseUpdates = null;
- workInProgressHook = null;
-}
-
-function readContext(context, observedBits) {
- var threadID = currentPartialRenderer.threadID;
- validateContextBounds(context, threadID);
-
- {
- if (isInHookUserCodeInDev) {
- 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().');
- }
- }
-
- return context[threadID];
-}
-
-function useContext(context, observedBits) {
- {
- currentHookNameInDev = 'useContext';
- }
-
- resolveCurrentlyRenderingComponent();
- var threadID = currentPartialRenderer.threadID;
- validateContextBounds(context, threadID);
- return context[threadID];
-}
-
-function basicStateReducer(state, action) {
- // $FlowFixMe: Flow doesn't like mixed types
- return typeof action === 'function' ? action(state) : action;
-}
-
-function useState(initialState) {
- {
- currentHookNameInDev = 'useState';
- }
-
- return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers
- initialState);
-}
-function useReducer(reducer, initialArg, init) {
- {
- if (reducer !== basicStateReducer) {
- currentHookNameInDev = 'useReducer';
- }
- }
-
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
-
- if (isReRender) {
- // This is a re-render. Apply the new render phase updates to the previous
- // current hook.
- var queue = workInProgressHook.queue;
- var dispatch = queue.dispatch;
-
- if (renderPhaseUpdates !== null) {
- // Render phase updates are stored in a map of queue -> linked list
- var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
-
- if (firstRenderPhaseUpdate !== undefined) {
- renderPhaseUpdates.delete(queue);
- var newState = workInProgressHook.memoizedState;
- var update = firstRenderPhaseUpdate;
-
- do {
- // Process this render phase update. We don't have to check the
- // priority because it will always be the same as the current
- // render's.
- var action = update.action;
-
- {
- isInHookUserCodeInDev = true;
- }
-
- newState = reducer(newState, action);
-
- {
- isInHookUserCodeInDev = false;
- }
-
- update = update.next;
- } while (update !== null);
-
- workInProgressHook.memoizedState = newState;
- return [newState, dispatch];
- }
- }
-
- return [workInProgressHook.memoizedState, dispatch];
- } else {
- {
- isInHookUserCodeInDev = true;
- }
-
- var initialState;
-
- if (reducer === basicStateReducer) {
- // Special case for `useState`.
- initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
- } else {
- initialState = init !== undefined ? init(initialArg) : initialArg;
- }
-
- {
- isInHookUserCodeInDev = false;
- }
-
- workInProgressHook.memoizedState = initialState;
-
- var _queue = workInProgressHook.queue = {
- last: null,
- dispatch: null
- };
-
- var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);
-
- return [workInProgressHook.memoizedState, _dispatch];
- }
-}
-
-function useMemo(nextCreate, deps) {
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
-
- if (workInProgressHook !== null) {
- var prevState = workInProgressHook.memoizedState;
-
- if (prevState !== null) {
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
- }
-
- {
- isInHookUserCodeInDev = true;
- }
-
- var nextValue = nextCreate();
-
- {
- isInHookUserCodeInDev = false;
- }
-
- workInProgressHook.memoizedState = [nextValue, nextDeps];
- return nextValue;
-}
-
-function useRef(initialValue) {
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
- var previousRef = workInProgressHook.memoizedState;
-
- if (previousRef === null) {
- var ref = {
- current: initialValue
- };
-
- {
- Object.seal(ref);
- }
-
- workInProgressHook.memoizedState = ref;
- return ref;
- } else {
- return previousRef;
- }
-}
-
-function useLayoutEffect(create, inputs) {
- {
- currentHookNameInDev = 'useLayoutEffect';
-
- 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.');
- }
-}
-
-function dispatchAction(componentIdentity, queue, action) {
- if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
- {
- throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
- }
- }
-
- if (componentIdentity === currentlyRenderingComponent) {
- // This is a render phase update. Stash it in a lazily-created map of
- // queue -> linked list of updates. After this render pass, we'll restart
- // and apply the stashed updates on top of the work-in-progress hook.
- didScheduleRenderPhaseUpdate = true;
- var update = {
- action: action,
- next: null
- };
-
- if (renderPhaseUpdates === null) {
- renderPhaseUpdates = new Map();
- }
-
- var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
-
- if (firstRenderPhaseUpdate === undefined) {
- renderPhaseUpdates.set(queue, update);
- } else {
- // Append the update to the end of the list.
- var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
-
- while (lastRenderPhaseUpdate.next !== null) {
- lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
- }
-
- lastRenderPhaseUpdate.next = update;
- }
- }
-}
-
-function useCallback(callback, deps) {
- return useMemo(function () {
- return callback;
- }, deps);
-} // TODO Decide on how to implement this hook for server rendering.
-// If a mutation occurs during render, consider triggering a Suspense boundary
-// and falling back to client rendering.
-
-function useMutableSource(source, getSnapshot, subscribe) {
- resolveCurrentlyRenderingComponent();
- return getSnapshot(source._source);
-}
-
-function useDeferredValue(value) {
- resolveCurrentlyRenderingComponent();
- return value;
-}
-
-function useTransition() {
- resolveCurrentlyRenderingComponent();
-
- var startTransition = function (callback) {
- callback();
- };
-
- return [startTransition, false];
-}
-
-function useOpaqueIdentifier() {
- return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
-}
-
-function noop() {}
-
-var currentPartialRenderer = null;
-function setCurrentPartialRenderer(renderer) {
- currentPartialRenderer = renderer;
-}
-var Dispatcher = {
- readContext: readContext,
- useContext: useContext,
- useMemo: useMemo,
- useReducer: useReducer,
- useRef: useRef,
- useState: useState,
- useLayoutEffect: useLayoutEffect,
- useCallback: useCallback,
- // useImperativeHandle is not run in the server environment
- useImperativeHandle: noop,
- // Effects are not run in the server environment.
- useEffect: noop,
- // Debugging effect
- useDebugValue: noop,
- useDeferredValue: useDeferredValue,
- useTransition: useTransition,
- useOpaqueIdentifier: useOpaqueIdentifier,
- // Subscriptions are not setup in a server environment.
- useMutableSource: useMutableSource
-};
-
-var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
-var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
-var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
-var Namespaces = {
- html: HTML_NAMESPACE,
- mathml: MATH_NAMESPACE,
- svg: SVG_NAMESPACE
-}; // Assumes there is no parent namespace.
-
-function getIntrinsicNamespace(type) {
- switch (type) {
- case 'svg':
- return SVG_NAMESPACE;
-
- case 'math':
- return MATH_NAMESPACE;
-
- default:
- return HTML_NAMESPACE;
- }
-}
-function getChildNamespace(parentNamespace, type) {
- if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
- // No (or default) parent namespace: potential entry point.
- return getIntrinsicNamespace(type);
- }
-
- if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
- // We're leaving SVG.
- return HTML_NAMESPACE;
- } // By default, pass namespace below.
-
-
- return parentNamespace;
-}
-
-var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
-};
-function checkControlledValueProps(tagName, props) {
- {
- if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
- 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`.');
- }
-
- if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
- 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`.');
- }
- }
-}
-
-// For HTML, certain tags should omit their close tag. We keep a list for
-// those special-case tags.
-var omittedCloseTags = {
- area: true,
- base: true,
- br: true,
- col: true,
- embed: true,
- hr: true,
- img: true,
- input: true,
- keygen: true,
- link: true,
- meta: true,
- param: true,
- source: true,
- track: true,
- wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
-
-};
-
-// `omittedCloseTags` except that `menuitem` should still have its closing tag.
-
-var voidElementTags = _assign({
- menuitem: true
-}, omittedCloseTags);
-
-var HTML = '__html';
-
-function assertValidProps(tag, props) {
- if (!props) {
- return;
- } // Note the use of `==` which checks for null or undefined.
-
-
- if (voidElementTags[tag]) {
- if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
- }
- }
- }
-
- if (props.dangerouslySetInnerHTML != null) {
- if (!(props.children == null)) {
- {
- throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
- }
- }
-
- if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
- {
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
- }
- }
- }
-
- {
- if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
- 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.');
- }
- }
-
- if (!(props.style == null || typeof props.style === 'object')) {
- {
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
- }
- }
-}
-
-/**
- * CSS properties which accept numbers but are not in units of "px".
- */
-var isUnitlessNumber = {
- animationIterationCount: true,
- borderImageOutset: true,
- borderImageSlice: true,
- borderImageWidth: true,
- boxFlex: true,
- boxFlexGroup: true,
- boxOrdinalGroup: true,
- columnCount: true,
- columns: true,
- flex: true,
- flexGrow: true,
- flexPositive: true,
- flexShrink: true,
- flexNegative: true,
- flexOrder: true,
- gridArea: true,
- gridRow: true,
- gridRowEnd: true,
- gridRowSpan: true,
- gridRowStart: true,
- gridColumn: true,
- gridColumnEnd: true,
- gridColumnSpan: true,
- gridColumnStart: true,
- fontWeight: true,
- lineClamp: true,
- lineHeight: true,
- opacity: true,
- order: true,
- orphans: true,
- tabSize: true,
- widows: true,
- zIndex: true,
- zoom: true,
- // SVG-related properties
- fillOpacity: true,
- floodOpacity: true,
- stopOpacity: true,
- strokeDasharray: true,
- strokeDashoffset: true,
- strokeMiterlimit: true,
- strokeOpacity: true,
- strokeWidth: true
-};
-/**
- * @param {string} prefix vendor-specific prefix, eg: Webkit
- * @param {string} key style name, eg: transitionDuration
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
- * WebkitTransitionDuration
- */
-
-function prefixKey(prefix, key) {
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
-}
-/**
- * Support style names that may come passed in prefixed by adding permutations
- * of vendor prefixes.
- */
-
-
-var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
-// infinite loop, because it iterates over the newly added props too.
-
-Object.keys(isUnitlessNumber).forEach(function (prop) {
- prefixes.forEach(function (prefix) {
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
- });
-});
-
-/**
- * Convert a value into the proper css writable value. The style name `name`
- * should be logical (no hyphens), as specified
- * in `CSSProperty.isUnitlessNumber`.
- *
- * @param {string} name CSS property name such as `topMargin`.
- * @param {*} value CSS property value such as `10px`.
- * @return {string} Normalized style value with dimensions applied.
- */
-
-function dangerousStyleValue(name, value, isCustomProperty) {
- // Note that we've removed escapeTextForBrowser() calls here since the
- // whole string will be escaped when the attribute is injected into
- // the markup. If you provide unsafe user data here they can inject
- // arbitrary CSS which may be problematic (I couldn't repro this):
- // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
- // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
- // This is not an XSS hole but instead a potential CSS injection issue
- // which has lead to a greater discussion about how we're going to
- // trust URLs moving forward. See #2115901
- var isEmpty = value == null || typeof value === 'boolean' || value === '';
-
- if (isEmpty) {
- return '';
- }
-
- if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
- return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
- }
-
- return ('' + value).trim();
-}
-
-var uppercasePattern = /([A-Z])/g;
-var msPattern = /^ms-/;
-/**
- * Hyphenates a camelcased CSS property name, for example:
- *
- * > hyphenateStyleName('backgroundColor')
- * < "background-color"
- * > hyphenateStyleName('MozTransition')
- * < "-moz-transition"
- * > hyphenateStyleName('msTransition')
- * < "-ms-transition"
- *
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
- * is converted to `-ms-`.
- */
-
-function hyphenateStyleName(name) {
- return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
-}
-
-function isCustomComponent(tagName, props) {
- if (tagName.indexOf('-') === -1) {
- return typeof props.is === 'string';
- }
-
- switch (tagName) {
- // These are reserved SVG and MathML elements.
- // We don't mind this list too much because we expect it to never grow.
- // The alternative is to track the namespace in a few places which is convoluted.
- // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
- case 'annotation-xml':
- case 'color-profile':
- case 'font-face':
- case 'font-face-src':
- case 'font-face-uri':
- case 'font-face-format':
- case 'font-face-name':
- case 'missing-glyph':
- return false;
-
- default:
- return true;
- }
-}
-
-var warnValidStyle = function () {};
-
-{
- // 'msTransform' is correct, but the other prefixes should be capitalized
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
- var msPattern$1 = /^-ms-/;
- var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
-
- var badStyleValueWithSemicolonPattern = /;\s*$/;
- var warnedStyleNames = {};
- var warnedStyleValues = {};
- var warnedForNaNValue = false;
- var warnedForInfinityValue = false;
-
- var camelize = function (string) {
- return string.replace(hyphenPattern, function (_, character) {
- return character.toUpperCase();
- });
- };
-
- var warnHyphenatedStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
- // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
- // is converted to lowercase `ms`.
- camelize(name.replace(msPattern$1, 'ms-')));
- };
-
- var warnBadVendoredStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
- };
-
- var warnStyleValueWithSemicolon = function (name, value) {
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
- return;
- }
-
- warnedStyleValues[value] = true;
-
- error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
- };
-
- var warnStyleValueIsNaN = function (name, value) {
- if (warnedForNaNValue) {
- return;
- }
-
- warnedForNaNValue = true;
-
- error('`NaN` is an invalid value for the `%s` css style property.', name);
- };
-
- var warnStyleValueIsInfinity = function (name, value) {
- if (warnedForInfinityValue) {
- return;
- }
-
- warnedForInfinityValue = true;
-
- error('`Infinity` is an invalid value for the `%s` css style property.', name);
- };
-
- warnValidStyle = function (name, value) {
- if (name.indexOf('-') > -1) {
- warnHyphenatedStyleName(name);
- } else if (badVendoredStyleNamePattern.test(name)) {
- warnBadVendoredStyleName(name);
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
- warnStyleValueWithSemicolon(name, value);
- }
-
- if (typeof value === 'number') {
- if (isNaN(value)) {
- warnStyleValueIsNaN(name, value);
- } else if (!isFinite(value)) {
- warnStyleValueIsInfinity(name, value);
- }
- }
- };
-}
-
-var warnValidStyle$1 = warnValidStyle;
-
-var ariaProperties = {
- 'aria-current': 0,
- // state
- 'aria-details': 0,
- 'aria-disabled': 0,
- // state
- 'aria-hidden': 0,
- // state
- 'aria-invalid': 0,
- // state
- 'aria-keyshortcuts': 0,
- 'aria-label': 0,
- 'aria-roledescription': 0,
- // Widget Attributes
- 'aria-autocomplete': 0,
- 'aria-checked': 0,
- 'aria-expanded': 0,
- 'aria-haspopup': 0,
- 'aria-level': 0,
- 'aria-modal': 0,
- 'aria-multiline': 0,
- 'aria-multiselectable': 0,
- 'aria-orientation': 0,
- 'aria-placeholder': 0,
- 'aria-pressed': 0,
- 'aria-readonly': 0,
- 'aria-required': 0,
- 'aria-selected': 0,
- 'aria-sort': 0,
- 'aria-valuemax': 0,
- 'aria-valuemin': 0,
- 'aria-valuenow': 0,
- 'aria-valuetext': 0,
- // Live Region Attributes
- 'aria-atomic': 0,
- 'aria-busy': 0,
- 'aria-live': 0,
- 'aria-relevant': 0,
- // Drag-and-Drop Attributes
- 'aria-dropeffect': 0,
- 'aria-grabbed': 0,
- // Relationship Attributes
- 'aria-activedescendant': 0,
- 'aria-colcount': 0,
- 'aria-colindex': 0,
- 'aria-colspan': 0,
- 'aria-controls': 0,
- 'aria-describedby': 0,
- 'aria-errormessage': 0,
- 'aria-flowto': 0,
- 'aria-labelledby': 0,
- 'aria-owns': 0,
- 'aria-posinset': 0,
- 'aria-rowcount': 0,
- 'aria-rowindex': 0,
- 'aria-rowspan': 0,
- 'aria-setsize': 0
-};
-
-var warnedProperties = {};
-var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
-var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
-var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
-
-function validateProperty(tagName, name) {
- {
- if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
- return true;
- }
-
- if (rARIACamel.test(name)) {
- var ariaName = 'aria-' + name.slice(4).toLowerCase();
- var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (correctName == null) {
- error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
-
- warnedProperties[name] = true;
- return true;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== correctName) {
- error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
-
- if (rARIA.test(name)) {
- var lowerCasedName = name.toLowerCase();
- var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (standardName == null) {
- warnedProperties[name] = true;
- return false;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== standardName) {
- error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
- }
-
- return true;
-}
-
-function warnInvalidARIAProps(type, props) {
- {
- var invalidProps = [];
-
- for (var key in props) {
- var isValid = validateProperty(type, key);
-
- if (!isValid) {
- invalidProps.push(key);
- }
- }
-
- var unknownPropString = invalidProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- } else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- }
- }
-}
-
-function validateProperties(type, props) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnInvalidARIAProps(type, props);
-}
-
-var didWarnValueNull = false;
-function validateProperties$1(type, props) {
- {
- if (type !== 'input' && type !== 'textarea' && type !== 'select') {
- return;
- }
-
- if (props != null && props.value === null && !didWarnValueNull) {
- didWarnValueNull = true;
-
- if (type === 'select' && props.multiple) {
- 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);
- } else {
- error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
- }
- }
- }
-}
-
-// When adding attributes to the HTML or SVG allowed attribute list, be sure to
-// also add them to this module to ensure casing and incorrect name
-// warnings.
-var possibleStandardNames = {
- // HTML
- accept: 'accept',
- acceptcharset: 'acceptCharset',
- 'accept-charset': 'acceptCharset',
- accesskey: 'accessKey',
- action: 'action',
- allowfullscreen: 'allowFullScreen',
- alt: 'alt',
- as: 'as',
- async: 'async',
- autocapitalize: 'autoCapitalize',
- autocomplete: 'autoComplete',
- autocorrect: 'autoCorrect',
- autofocus: 'autoFocus',
- autoplay: 'autoPlay',
- autosave: 'autoSave',
- capture: 'capture',
- cellpadding: 'cellPadding',
- cellspacing: 'cellSpacing',
- challenge: 'challenge',
- charset: 'charSet',
- checked: 'checked',
- children: 'children',
- cite: 'cite',
- class: 'className',
- classid: 'classID',
- classname: 'className',
- cols: 'cols',
- colspan: 'colSpan',
- content: 'content',
- contenteditable: 'contentEditable',
- contextmenu: 'contextMenu',
- controls: 'controls',
- controlslist: 'controlsList',
- coords: 'coords',
- crossorigin: 'crossOrigin',
- dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
- data: 'data',
- datetime: 'dateTime',
- default: 'default',
- defaultchecked: 'defaultChecked',
- defaultvalue: 'defaultValue',
- defer: 'defer',
- dir: 'dir',
- disabled: 'disabled',
- disablepictureinpicture: 'disablePictureInPicture',
- disableremoteplayback: 'disableRemotePlayback',
- download: 'download',
- draggable: 'draggable',
- enctype: 'encType',
- enterkeyhint: 'enterKeyHint',
- for: 'htmlFor',
- form: 'form',
- formmethod: 'formMethod',
- formaction: 'formAction',
- formenctype: 'formEncType',
- formnovalidate: 'formNoValidate',
- formtarget: 'formTarget',
- frameborder: 'frameBorder',
- headers: 'headers',
- height: 'height',
- hidden: 'hidden',
- high: 'high',
- href: 'href',
- hreflang: 'hrefLang',
- htmlfor: 'htmlFor',
- httpequiv: 'httpEquiv',
- 'http-equiv': 'httpEquiv',
- icon: 'icon',
- id: 'id',
- innerhtml: 'innerHTML',
- inputmode: 'inputMode',
- integrity: 'integrity',
- is: 'is',
- itemid: 'itemID',
- itemprop: 'itemProp',
- itemref: 'itemRef',
- itemscope: 'itemScope',
- itemtype: 'itemType',
- keyparams: 'keyParams',
- keytype: 'keyType',
- kind: 'kind',
- label: 'label',
- lang: 'lang',
- list: 'list',
- loop: 'loop',
- low: 'low',
- manifest: 'manifest',
- marginwidth: 'marginWidth',
- marginheight: 'marginHeight',
- max: 'max',
- maxlength: 'maxLength',
- media: 'media',
- mediagroup: 'mediaGroup',
- method: 'method',
- min: 'min',
- minlength: 'minLength',
- multiple: 'multiple',
- muted: 'muted',
- name: 'name',
- nomodule: 'noModule',
- nonce: 'nonce',
- novalidate: 'noValidate',
- open: 'open',
- optimum: 'optimum',
- pattern: 'pattern',
- placeholder: 'placeholder',
- playsinline: 'playsInline',
- poster: 'poster',
- preload: 'preload',
- profile: 'profile',
- radiogroup: 'radioGroup',
- readonly: 'readOnly',
- referrerpolicy: 'referrerPolicy',
- rel: 'rel',
- required: 'required',
- reversed: 'reversed',
- role: 'role',
- rows: 'rows',
- rowspan: 'rowSpan',
- sandbox: 'sandbox',
- scope: 'scope',
- scoped: 'scoped',
- scrolling: 'scrolling',
- seamless: 'seamless',
- selected: 'selected',
- shape: 'shape',
- size: 'size',
- sizes: 'sizes',
- span: 'span',
- spellcheck: 'spellCheck',
- src: 'src',
- srcdoc: 'srcDoc',
- srclang: 'srcLang',
- srcset: 'srcSet',
- start: 'start',
- step: 'step',
- style: 'style',
- summary: 'summary',
- tabindex: 'tabIndex',
- target: 'target',
- title: 'title',
- type: 'type',
- usemap: 'useMap',
- value: 'value',
- width: 'width',
- wmode: 'wmode',
- wrap: 'wrap',
- // SVG
- about: 'about',
- accentheight: 'accentHeight',
- 'accent-height': 'accentHeight',
- accumulate: 'accumulate',
- additive: 'additive',
- alignmentbaseline: 'alignmentBaseline',
- 'alignment-baseline': 'alignmentBaseline',
- allowreorder: 'allowReorder',
- alphabetic: 'alphabetic',
- amplitude: 'amplitude',
- arabicform: 'arabicForm',
- 'arabic-form': 'arabicForm',
- ascent: 'ascent',
- attributename: 'attributeName',
- attributetype: 'attributeType',
- autoreverse: 'autoReverse',
- azimuth: 'azimuth',
- basefrequency: 'baseFrequency',
- baselineshift: 'baselineShift',
- 'baseline-shift': 'baselineShift',
- baseprofile: 'baseProfile',
- bbox: 'bbox',
- begin: 'begin',
- bias: 'bias',
- by: 'by',
- calcmode: 'calcMode',
- capheight: 'capHeight',
- 'cap-height': 'capHeight',
- clip: 'clip',
- clippath: 'clipPath',
- 'clip-path': 'clipPath',
- clippathunits: 'clipPathUnits',
- cliprule: 'clipRule',
- 'clip-rule': 'clipRule',
- color: 'color',
- colorinterpolation: 'colorInterpolation',
- 'color-interpolation': 'colorInterpolation',
- colorinterpolationfilters: 'colorInterpolationFilters',
- 'color-interpolation-filters': 'colorInterpolationFilters',
- colorprofile: 'colorProfile',
- 'color-profile': 'colorProfile',
- colorrendering: 'colorRendering',
- 'color-rendering': 'colorRendering',
- contentscripttype: 'contentScriptType',
- contentstyletype: 'contentStyleType',
- cursor: 'cursor',
- cx: 'cx',
- cy: 'cy',
- d: 'd',
- datatype: 'datatype',
- decelerate: 'decelerate',
- descent: 'descent',
- diffuseconstant: 'diffuseConstant',
- direction: 'direction',
- display: 'display',
- divisor: 'divisor',
- dominantbaseline: 'dominantBaseline',
- 'dominant-baseline': 'dominantBaseline',
- dur: 'dur',
- dx: 'dx',
- dy: 'dy',
- edgemode: 'edgeMode',
- elevation: 'elevation',
- enablebackground: 'enableBackground',
- 'enable-background': 'enableBackground',
- end: 'end',
- exponent: 'exponent',
- externalresourcesrequired: 'externalResourcesRequired',
- fill: 'fill',
- fillopacity: 'fillOpacity',
- 'fill-opacity': 'fillOpacity',
- fillrule: 'fillRule',
- 'fill-rule': 'fillRule',
- filter: 'filter',
- filterres: 'filterRes',
- filterunits: 'filterUnits',
- floodopacity: 'floodOpacity',
- 'flood-opacity': 'floodOpacity',
- floodcolor: 'floodColor',
- 'flood-color': 'floodColor',
- focusable: 'focusable',
- fontfamily: 'fontFamily',
- 'font-family': 'fontFamily',
- fontsize: 'fontSize',
- 'font-size': 'fontSize',
- fontsizeadjust: 'fontSizeAdjust',
- 'font-size-adjust': 'fontSizeAdjust',
- fontstretch: 'fontStretch',
- 'font-stretch': 'fontStretch',
- fontstyle: 'fontStyle',
- 'font-style': 'fontStyle',
- fontvariant: 'fontVariant',
- 'font-variant': 'fontVariant',
- fontweight: 'fontWeight',
- 'font-weight': 'fontWeight',
- format: 'format',
- from: 'from',
- fx: 'fx',
- fy: 'fy',
- g1: 'g1',
- g2: 'g2',
- glyphname: 'glyphName',
- 'glyph-name': 'glyphName',
- glyphorientationhorizontal: 'glyphOrientationHorizontal',
- 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
- glyphorientationvertical: 'glyphOrientationVertical',
- 'glyph-orientation-vertical': 'glyphOrientationVertical',
- glyphref: 'glyphRef',
- gradienttransform: 'gradientTransform',
- gradientunits: 'gradientUnits',
- hanging: 'hanging',
- horizadvx: 'horizAdvX',
- 'horiz-adv-x': 'horizAdvX',
- horizoriginx: 'horizOriginX',
- 'horiz-origin-x': 'horizOriginX',
- ideographic: 'ideographic',
- imagerendering: 'imageRendering',
- 'image-rendering': 'imageRendering',
- in2: 'in2',
- in: 'in',
- inlist: 'inlist',
- intercept: 'intercept',
- k1: 'k1',
- k2: 'k2',
- k3: 'k3',
- k4: 'k4',
- k: 'k',
- kernelmatrix: 'kernelMatrix',
- kernelunitlength: 'kernelUnitLength',
- kerning: 'kerning',
- keypoints: 'keyPoints',
- keysplines: 'keySplines',
- keytimes: 'keyTimes',
- lengthadjust: 'lengthAdjust',
- letterspacing: 'letterSpacing',
- 'letter-spacing': 'letterSpacing',
- lightingcolor: 'lightingColor',
- 'lighting-color': 'lightingColor',
- limitingconeangle: 'limitingConeAngle',
- local: 'local',
- markerend: 'markerEnd',
- 'marker-end': 'markerEnd',
- markerheight: 'markerHeight',
- markermid: 'markerMid',
- 'marker-mid': 'markerMid',
- markerstart: 'markerStart',
- 'marker-start': 'markerStart',
- markerunits: 'markerUnits',
- markerwidth: 'markerWidth',
- mask: 'mask',
- maskcontentunits: 'maskContentUnits',
- maskunits: 'maskUnits',
- mathematical: 'mathematical',
- mode: 'mode',
- numoctaves: 'numOctaves',
- offset: 'offset',
- opacity: 'opacity',
- operator: 'operator',
- order: 'order',
- orient: 'orient',
- orientation: 'orientation',
- origin: 'origin',
- overflow: 'overflow',
- overlineposition: 'overlinePosition',
- 'overline-position': 'overlinePosition',
- overlinethickness: 'overlineThickness',
- 'overline-thickness': 'overlineThickness',
- paintorder: 'paintOrder',
- 'paint-order': 'paintOrder',
- panose1: 'panose1',
- 'panose-1': 'panose1',
- pathlength: 'pathLength',
- patterncontentunits: 'patternContentUnits',
- patterntransform: 'patternTransform',
- patternunits: 'patternUnits',
- pointerevents: 'pointerEvents',
- 'pointer-events': 'pointerEvents',
- points: 'points',
- pointsatx: 'pointsAtX',
- pointsaty: 'pointsAtY',
- pointsatz: 'pointsAtZ',
- prefix: 'prefix',
- preservealpha: 'preserveAlpha',
- preserveaspectratio: 'preserveAspectRatio',
- primitiveunits: 'primitiveUnits',
- property: 'property',
- r: 'r',
- radius: 'radius',
- refx: 'refX',
- refy: 'refY',
- renderingintent: 'renderingIntent',
- 'rendering-intent': 'renderingIntent',
- repeatcount: 'repeatCount',
- repeatdur: 'repeatDur',
- requiredextensions: 'requiredExtensions',
- requiredfeatures: 'requiredFeatures',
- resource: 'resource',
- restart: 'restart',
- result: 'result',
- results: 'results',
- rotate: 'rotate',
- rx: 'rx',
- ry: 'ry',
- scale: 'scale',
- security: 'security',
- seed: 'seed',
- shaperendering: 'shapeRendering',
- 'shape-rendering': 'shapeRendering',
- slope: 'slope',
- spacing: 'spacing',
- specularconstant: 'specularConstant',
- specularexponent: 'specularExponent',
- speed: 'speed',
- spreadmethod: 'spreadMethod',
- startoffset: 'startOffset',
- stddeviation: 'stdDeviation',
- stemh: 'stemh',
- stemv: 'stemv',
- stitchtiles: 'stitchTiles',
- stopcolor: 'stopColor',
- 'stop-color': 'stopColor',
- stopopacity: 'stopOpacity',
- 'stop-opacity': 'stopOpacity',
- strikethroughposition: 'strikethroughPosition',
- 'strikethrough-position': 'strikethroughPosition',
- strikethroughthickness: 'strikethroughThickness',
- 'strikethrough-thickness': 'strikethroughThickness',
- string: 'string',
- stroke: 'stroke',
- strokedasharray: 'strokeDasharray',
- 'stroke-dasharray': 'strokeDasharray',
- strokedashoffset: 'strokeDashoffset',
- 'stroke-dashoffset': 'strokeDashoffset',
- strokelinecap: 'strokeLinecap',
- 'stroke-linecap': 'strokeLinecap',
- strokelinejoin: 'strokeLinejoin',
- 'stroke-linejoin': 'strokeLinejoin',
- strokemiterlimit: 'strokeMiterlimit',
- 'stroke-miterlimit': 'strokeMiterlimit',
- strokewidth: 'strokeWidth',
- 'stroke-width': 'strokeWidth',
- strokeopacity: 'strokeOpacity',
- 'stroke-opacity': 'strokeOpacity',
- suppresscontenteditablewarning: 'suppressContentEditableWarning',
- suppresshydrationwarning: 'suppressHydrationWarning',
- surfacescale: 'surfaceScale',
- systemlanguage: 'systemLanguage',
- tablevalues: 'tableValues',
- targetx: 'targetX',
- targety: 'targetY',
- textanchor: 'textAnchor',
- 'text-anchor': 'textAnchor',
- textdecoration: 'textDecoration',
- 'text-decoration': 'textDecoration',
- textlength: 'textLength',
- textrendering: 'textRendering',
- 'text-rendering': 'textRendering',
- to: 'to',
- transform: 'transform',
- typeof: 'typeof',
- u1: 'u1',
- u2: 'u2',
- underlineposition: 'underlinePosition',
- 'underline-position': 'underlinePosition',
- underlinethickness: 'underlineThickness',
- 'underline-thickness': 'underlineThickness',
- unicode: 'unicode',
- unicodebidi: 'unicodeBidi',
- 'unicode-bidi': 'unicodeBidi',
- unicoderange: 'unicodeRange',
- 'unicode-range': 'unicodeRange',
- unitsperem: 'unitsPerEm',
- 'units-per-em': 'unitsPerEm',
- unselectable: 'unselectable',
- valphabetic: 'vAlphabetic',
- 'v-alphabetic': 'vAlphabetic',
- values: 'values',
- vectoreffect: 'vectorEffect',
- 'vector-effect': 'vectorEffect',
- version: 'version',
- vertadvy: 'vertAdvY',
- 'vert-adv-y': 'vertAdvY',
- vertoriginx: 'vertOriginX',
- 'vert-origin-x': 'vertOriginX',
- vertoriginy: 'vertOriginY',
- 'vert-origin-y': 'vertOriginY',
- vhanging: 'vHanging',
- 'v-hanging': 'vHanging',
- videographic: 'vIdeographic',
- 'v-ideographic': 'vIdeographic',
- viewbox: 'viewBox',
- viewtarget: 'viewTarget',
- visibility: 'visibility',
- vmathematical: 'vMathematical',
- 'v-mathematical': 'vMathematical',
- vocab: 'vocab',
- widths: 'widths',
- wordspacing: 'wordSpacing',
- 'word-spacing': 'wordSpacing',
- writingmode: 'writingMode',
- 'writing-mode': 'writingMode',
- x1: 'x1',
- x2: 'x2',
- x: 'x',
- xchannelselector: 'xChannelSelector',
- xheight: 'xHeight',
- 'x-height': 'xHeight',
- xlinkactuate: 'xlinkActuate',
- 'xlink:actuate': 'xlinkActuate',
- xlinkarcrole: 'xlinkArcrole',
- 'xlink:arcrole': 'xlinkArcrole',
- xlinkhref: 'xlinkHref',
- 'xlink:href': 'xlinkHref',
- xlinkrole: 'xlinkRole',
- 'xlink:role': 'xlinkRole',
- xlinkshow: 'xlinkShow',
- 'xlink:show': 'xlinkShow',
- xlinktitle: 'xlinkTitle',
- 'xlink:title': 'xlinkTitle',
- xlinktype: 'xlinkType',
- 'xlink:type': 'xlinkType',
- xmlbase: 'xmlBase',
- 'xml:base': 'xmlBase',
- xmllang: 'xmlLang',
- 'xml:lang': 'xmlLang',
- xmlns: 'xmlns',
- 'xml:space': 'xmlSpace',
- xmlnsxlink: 'xmlnsXlink',
- 'xmlns:xlink': 'xmlnsXlink',
- xmlspace: 'xmlSpace',
- y1: 'y1',
- y2: 'y2',
- y: 'y',
- ychannelselector: 'yChannelSelector',
- z: 'z',
- zoomandpan: 'zoomAndPan'
-};
-
-var validateProperty$1 = function () {};
-
-{
- var warnedProperties$1 = {};
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
- var EVENT_NAME_REGEX = /^on./;
- var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
- var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
-
- validateProperty$1 = function (tagName, name, value, eventRegistry) {
- if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
- return true;
- }
-
- var lowerCasedName = name.toLowerCase();
-
- if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
- 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.');
-
- warnedProperties$1[name] = true;
- return true;
- } // We can't rely on the event system being injected on the server.
-
-
- if (eventRegistry != null) {
- var registrationNameDependencies = eventRegistry.registrationNameDependencies,
- possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
-
- if (registrationNameDependencies.hasOwnProperty(name)) {
- return true;
- }
-
- var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
-
- if (registrationName != null) {
- error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (EVENT_NAME_REGEX.test(name)) {
- error('Unknown event handler property `%s`. It will be ignored.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (EVENT_NAME_REGEX.test(name)) {
- // If no event plugins have been injected, we are in a server environment.
- // So we can't tell if the event name is correct for sure, but we can filter
- // out known bad ones like `onclick`. We can't suggest a specific replacement though.
- if (INVALID_EVENT_NAME_REGEX.test(name)) {
- error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Let the ARIA attribute hook validate ARIA attributes
-
-
- if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
- return true;
- }
-
- if (lowerCasedName === 'innerhtml') {
- error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'aria') {
- error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
- error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'number' && isNaN(value)) {
- error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- var propertyInfo = getPropertyInfo(name);
- var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
-
- if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- var standardName = possibleStandardNames[lowerCasedName];
-
- if (standardName !== name) {
- error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (!isReserved && name !== lowerCasedName) {
- // Unknown attributes should have lowercase casing since that's how they
- // will be cased anyway with server rendering.
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- if (value) {
- 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);
- } else {
- 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);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Now that we've validated casing, do not validate
- // data types for reserved props
-
-
- if (isReserved) {
- return true;
- } // Warn when a known attribute is a bad type
-
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- warnedProperties$1[name] = true;
- return false;
- } // Warn when passing the strings 'false' or 'true' into a boolean prop
-
-
- if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- return true;
- };
-}
-
-var warnUnknownProperties = function (type, props, eventRegistry) {
- {
- var unknownProps = [];
-
- for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], eventRegistry);
-
- if (!isValid) {
- unknownProps.push(key);
- }
- }
-
- var unknownPropString = unknownProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (unknownProps.length === 1) {
- 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);
- } else if (unknownProps.length > 1) {
- 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);
- }
- }
-};
-
-function validateProperties$2(type, props, eventRegistry) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnUnknownProperties(type, props, eventRegistry);
-}
-
-var toArray = React.Children.toArray; // This is only used in DEV.
-// Each entry is `this.stack` from a currently executing renderer instance.
-// (There may be more than one because ReactDOMServer is reentrant).
-// Each stack is an array of frames which may contain nested stacks of elements.
-
-var currentDebugStacks = [];
-var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
-var ReactDebugCurrentFrame$1;
-var prevGetCurrentStackImpl = null;
-
-var getCurrentServerStackImpl = function () {
- return '';
-};
-
-var describeStackFrame = function (element) {
- return '';
-};
-
-var validatePropertiesInDevelopment = function (type, props) {};
-
-var pushCurrentDebugStack = function (stack) {};
-
-var pushElementToDebugStack = function (element) {};
-
-var popCurrentDebugStack = function () {};
-
-var hasWarnedAboutUsingContextAsConsumer = false;
-
-{
- ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
- validatePropertiesInDevelopment = function (type, props) {
- validateProperties(type, props);
- validateProperties$1(type, props);
- validateProperties$2(type, props, null);
- };
-
- describeStackFrame = function (element) {
- return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
- };
-
- pushCurrentDebugStack = function (stack) {
- currentDebugStacks.push(stack);
-
- if (currentDebugStacks.length === 1) {
- // We are entering a server renderer.
- // Remember the previous (e.g. client) global stack implementation.
- prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
- ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
- }
- };
-
- pushElementToDebugStack = function (element) {
- // For the innermost executing ReactDOMServer call,
- var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>),
-
- var frame = stack[stack.length - 1]; // and record that it has one more element associated with it.
-
- frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element
- // children and directly handle them in an inner loop instead of
- // creating separate frames for them.
- };
-
- popCurrentDebugStack = function () {
- currentDebugStacks.pop();
-
- if (currentDebugStacks.length === 0) {
- // We are exiting the server renderer.
- // Restore the previous (e.g. client) global stack implementation.
- ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
- prevGetCurrentStackImpl = null;
- }
- };
-
- getCurrentServerStackImpl = function () {
- if (currentDebugStacks.length === 0) {
- // Nothing is currently rendering.
- return '';
- } // ReactDOMServer is reentrant so there may be multiple calls at the same time.
- // Take the frames from the innermost call which is the last in the array.
-
-
- var frames = currentDebugStacks[currentDebugStacks.length - 1];
- var stack = ''; // Go through every frame in the stack from the innermost one.
-
- for (var i = frames.length - 1; i >= 0; i--) {
- var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it.
- // This is because single-child nesting doesn't create materialized frames.
- // Instead it would push them through `pushElementToDebugStack()`.
-
- var debugElementStack = frame.debugElementStack;
-
- for (var ii = debugElementStack.length - 1; ii >= 0; ii--) {
- stack += describeStackFrame(debugElementStack[ii]);
- }
- }
-
- return stack;
- };
-}
-
-var didWarnDefaultInputValue = false;
-var didWarnDefaultChecked = false;
-var didWarnDefaultSelectValue = false;
-var didWarnDefaultTextareaValue = false;
-var didWarnInvalidOptionChildren = false;
-var didWarnAboutNoopUpdateForComponent = {};
-var didWarnAboutBadClass = {};
-var didWarnAboutModulePatternComponent = {};
-var didWarnAboutDeprecatedWillMount = {};
-var didWarnAboutUndefinedDerivedState = {};
-var didWarnAboutUninitializedState = {};
-var valuePropNames = ['value', 'defaultValue'];
-var newlineEatingTags = {
- listing: true,
- pre: true,
- textarea: true
-}; // We accept any tag to be rendered but since this gets injected into arbitrary
-// HTML, we want to make sure that it's a safe tag.
-// http://www.w3.org/TR/REC-xml/#NT-Name
-
-var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
-
-var validatedTagCache = {};
-
-function validateDangerousTag(tag) {
- if (!validatedTagCache.hasOwnProperty(tag)) {
- if (!VALID_TAG_REGEX.test(tag)) {
- {
- throw Error( "Invalid tag: " + tag );
- }
- }
-
- validatedTagCache[tag] = true;
- }
-}
-
-var styleNameCache = {};
-
-var processStyleName = function (styleName) {
- if (styleNameCache.hasOwnProperty(styleName)) {
- return styleNameCache[styleName];
- }
-
- var result = hyphenateStyleName(styleName);
- styleNameCache[styleName] = result;
- return result;
-};
-
-function createMarkupForStyles(styles) {
- var serialized = '';
- var delimiter = '';
-
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
-
- var isCustomProperty = styleName.indexOf('--') === 0;
- var styleValue = styles[styleName];
-
- {
- if (!isCustomProperty) {
- warnValidStyle$1(styleName, styleValue);
- }
- }
-
- if (styleValue != null) {
- serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':';
- serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
- delimiter = ';';
- }
- }
-
- return serialized || null;
-}
-
-function warnNoop(publicInstance, callerName) {
- {
- var _constructor = publicInstance.constructor;
- var componentName = _constructor && getComponentName(_constructor) || 'ReactClass';
- var warningKey = componentName + '.' + callerName;
-
- if (didWarnAboutNoopUpdateForComponent[warningKey]) {
- return;
- }
-
- 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);
-
- didWarnAboutNoopUpdateForComponent[warningKey] = true;
- }
-}
-
-function shouldConstruct$1(Component) {
- return Component.prototype && Component.prototype.isReactComponent;
-}
-
-function getNonChildrenInnerMarkup(props) {
- var innerHTML = props.dangerouslySetInnerHTML;
-
- if (innerHTML != null) {
- if (innerHTML.__html != null) {
- return innerHTML.__html;
- }
- } else {
- var content = props.children;
-
- if (typeof content === 'string' || typeof content === 'number') {
- return escapeTextForBrowser(content);
- }
- }
-
- return null;
-}
-
-function flattenTopLevelChildren(children) {
- if (!React.isValidElement(children)) {
- return toArray(children);
- }
-
- var element = children;
-
- if (element.type !== REACT_FRAGMENT_TYPE) {
- return [element];
- }
-
- var fragmentChildren = element.props.children;
-
- if (!React.isValidElement(fragmentChildren)) {
- return toArray(fragmentChildren);
- }
-
- var fragmentChildElement = fragmentChildren;
- return [fragmentChildElement];
-}
-
-function flattenOptionChildren(children) {
- if (children === undefined || children === null) {
- return children;
- }
-
- var content = ''; // Flatten children and warn if they aren't strings or numbers;
- // invalid types are ignored.
-
- React.Children.forEach(children, function (child) {
- if (child == null) {
- return;
- }
-
- content += child;
-
- {
- if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
- didWarnInvalidOptionChildren = true;
-
- error('Only strings and numbers are supported as <option> children.');
- }
- }
- });
- return content;
-}
-
-var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
-var STYLE = 'style';
-var RESERVED_PROPS = {
- children: null,
- dangerouslySetInnerHTML: null,
- suppressContentEditableWarning: null,
- suppressHydrationWarning: null
-};
-
-function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
- var ret = '<' + tagVerbatim;
- var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
-
- for (var propKey in props) {
- if (!hasOwnProperty$2.call(props, propKey)) {
- continue;
- }
-
- var propValue = props[propKey];
-
- if (propValue == null) {
- continue;
- }
-
- if (propKey === STYLE) {
- propValue = createMarkupForStyles(propValue);
- }
-
- var markup = null;
-
- if (isCustomComponent$1) {
- if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
- markup = createMarkupForCustomAttribute(propKey, propValue);
- }
- } else {
- markup = createMarkupForProperty(propKey, propValue);
- }
-
- if (markup) {
- ret += ' ' + markup;
- }
- } // For static pages, no need to put React ID and checksum. Saves lots of
- // bytes.
-
-
- if (makeStaticMarkup) {
- return ret;
- }
-
- if (isRootElement) {
- ret += ' ' + createMarkupForRoot();
- }
-
- return ret;
-}
-
-function validateRenderResult(child, type) {
- if (child === undefined) {
- {
- {
- throw Error( (getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
- }
- }
- }
-}
-
-function resolve(child, context, threadID) {
- while (React.isValidElement(child)) {
- // Safe because we just checked it's an element.
- var element = child;
- var Component = element.type;
-
- {
- pushElementToDebugStack(element);
- }
-
- if (typeof Component !== 'function') {
- break;
- }
-
- processChild(element, Component);
- } // Extra closure so queue and replace can be captured properly
-
-
- function processChild(element, Component) {
- var isClass = shouldConstruct$1(Component);
- var publicContext = processContext(Component, context, threadID, isClass);
- var queue = [];
- var replace = false;
- var updater = {
- isMounted: function (publicInstance) {
- return false;
- },
- enqueueForceUpdate: function (publicInstance) {
- if (queue === null) {
- warnNoop(publicInstance, 'forceUpdate');
- return null;
- }
- },
- enqueueReplaceState: function (publicInstance, completeState) {
- replace = true;
- queue = [completeState];
- },
- enqueueSetState: function (publicInstance, currentPartialState) {
- if (queue === null) {
- warnNoop(publicInstance, 'setState');
- return null;
- }
-
- queue.push(currentPartialState);
- }
- };
- var inst;
-
- if (isClass) {
- inst = new Component(element.props, publicContext, updater);
-
- if (typeof Component.getDerivedStateFromProps === 'function') {
- {
- if (inst.state === null || inst.state === undefined) {
- var componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutUninitializedState[componentName]) {
- 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, inst.state === null ? 'null' : 'undefined', componentName);
-
- didWarnAboutUninitializedState[componentName] = true;
- }
- }
- }
-
- var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state);
-
- {
- if (partialState === undefined) {
- var _componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutUndefinedDerivedState[_componentName]) {
- error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
-
- didWarnAboutUndefinedDerivedState[_componentName] = true;
- }
- }
- }
-
- if (partialState != null) {
- inst.state = _assign({}, inst.state, partialState);
- }
- }
- } else {
- {
- if (Component.prototype && typeof Component.prototype.render === 'function') {
- var _componentName2 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutBadClass[_componentName2]) {
- 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.', _componentName2, _componentName2);
-
- didWarnAboutBadClass[_componentName2] = true;
- }
- }
- }
-
- var componentIdentity = {};
- prepareToUseHooks(componentIdentity);
- inst = Component(element.props, publicContext, updater);
- inst = finishHooks(Component, element.props, inst, publicContext);
-
- {
- // Support for module components is deprecated and is removed behind a flag.
- // Whether or not it would crash later, we want to show a good message in DEV first.
- if (inst != null && inst.render != null) {
- var _componentName3 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutModulePatternComponent[_componentName3]) {
- 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.', _componentName3, _componentName3, _componentName3);
-
- didWarnAboutModulePatternComponent[_componentName3] = true;
- }
- }
- } // If the flag is on, everything is assumed to be a function component.
- // Otherwise, we also do the unfortunate dynamic checks.
-
-
- if ( inst == null || inst.render == null) {
- child = inst;
- validateRenderResult(child, Component);
- return;
- }
- }
-
- inst.props = element.props;
- inst.context = publicContext;
- inst.updater = updater;
- var initialState = inst.state;
-
- if (initialState === undefined) {
- inst.state = initialState = null;
- }
-
- if (typeof inst.UNSAFE_componentWillMount === 'function' || typeof inst.componentWillMount === 'function') {
- if (typeof inst.componentWillMount === 'function') {
- {
- if ( inst.componentWillMount.__suppressDeprecationWarning !== true) {
- var _componentName4 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
- warn( // keep this warning in sync with ReactStrictModeWarning.js
- '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', _componentName4);
-
- didWarnAboutDeprecatedWillMount[_componentName4] = true;
- }
- }
- } // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
-
-
- if (typeof Component.getDerivedStateFromProps !== 'function') {
- inst.componentWillMount();
- }
- }
-
- if (typeof inst.UNSAFE_componentWillMount === 'function' && typeof Component.getDerivedStateFromProps !== 'function') {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
- inst.UNSAFE_componentWillMount();
- }
-
- if (queue.length) {
- var oldQueue = queue;
- var oldReplace = replace;
- queue = null;
- replace = false;
-
- if (oldReplace && oldQueue.length === 1) {
- inst.state = oldQueue[0];
- } else {
- var nextState = oldReplace ? oldQueue[0] : inst.state;
- var dontMutate = true;
-
- for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
- var partial = oldQueue[i];
-
- var _partialState = typeof partial === 'function' ? partial.call(inst, nextState, element.props, publicContext) : partial;
-
- if (_partialState != null) {
- if (dontMutate) {
- dontMutate = false;
- nextState = _assign({}, nextState, _partialState);
- } else {
- _assign(nextState, _partialState);
- }
- }
- }
-
- inst.state = nextState;
- }
- } else {
- queue = null;
- }
- }
-
- child = inst.render();
-
- {
- if (child === undefined && inst.render._isMockFunction) {
- // This is probably bad practice. Consider warning here and
- // deprecating this convenience.
- child = null;
- }
- }
-
- validateRenderResult(child, Component);
- var childContext;
-
- {
- if (typeof inst.getChildContext === 'function') {
- var _childContextTypes = Component.childContextTypes;
-
- if (typeof _childContextTypes === 'object') {
- childContext = inst.getChildContext();
-
- for (var contextKey in childContext) {
- if (!(contextKey in _childContextTypes)) {
- {
- throw Error( (getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
- }
- }
- }
- } else {
- {
- error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
- }
- }
- }
-
- if (childContext) {
- context = _assign({}, context, childContext);
- }
- }
- }
-
- return {
- child: child,
- context: context
- };
-}
-
-var ReactDOMServerRenderer = /*#__PURE__*/function () {
- // TODO: type this more strictly:
- // DEV-only
- function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
- var flatChildren = flattenTopLevelChildren(children);
- var topFrame = {
- type: null,
- // Assume all trees start in the HTML namespace (not totally true, but
- // this is what we did historically)
- domNamespace: Namespaces.html,
- children: flatChildren,
- childIndex: 0,
- context: emptyObject,
- footer: ''
- };
-
- {
- topFrame.debugElementStack = [];
- }
-
- this.threadID = allocThreadID();
- this.stack = [topFrame];
- this.exhausted = false;
- this.currentSelectValue = null;
- this.previousWasTextNode = false;
- this.makeStaticMarkup = makeStaticMarkup;
- this.suspenseDepth = 0; // Context (new API)
-
- this.contextIndex = -1;
- this.contextStack = [];
- this.contextValueStack = []; // useOpaqueIdentifier ID
-
- this.uniqueID = 0;
- this.identifierPrefix = options && options.identifierPrefix || '';
-
- {
- this.contextProviderStack = [];
- }
- }
-
- var _proto = ReactDOMServerRenderer.prototype;
-
- _proto.destroy = function destroy() {
- if (!this.exhausted) {
- this.exhausted = true;
- this.clearProviders();
- freeThreadID(this.threadID);
- }
- }
- /**
- * Note: We use just two stacks regardless of how many context providers you have.
- * Providers are always popped in the reverse order to how they were pushed
- * so we always know on the way down which provider you'll encounter next on the way up.
- * On the way down, we push the current provider, and its context value *before*
- * we mutated it, onto the stacks. Therefore, on the way up, we always know which
- * provider needs to be "restored" to which value.
- * https://github.com/facebook/react/pull/12985#issuecomment-396301248
- */
- ;
-
- _proto.pushProvider = function pushProvider(provider) {
- var index = ++this.contextIndex;
- var context = provider.type._context;
- var threadID = this.threadID;
- validateContextBounds(context, threadID);
- var previousValue = context[threadID]; // Remember which value to restore this context to on our way up.
-
- this.contextStack[index] = context;
- this.contextValueStack[index] = previousValue;
-
- {
- // Only used for push/pop mismatch warnings.
- this.contextProviderStack[index] = provider;
- } // Mutate the current value.
-
-
- context[threadID] = provider.props.value;
- };
-
- _proto.popProvider = function popProvider(provider) {
- var index = this.contextIndex;
-
- {
- if (index < 0 || provider !== this.contextProviderStack[index]) {
- error('Unexpected pop.');
- }
- }
-
- var context = this.contextStack[index];
- var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any`
- // because conceptually they are deletions--as long as we
- // promise to never access values beyond `this.contextIndex`.
-
- this.contextStack[index] = null;
- this.contextValueStack[index] = null;
-
- {
- this.contextProviderStack[index] = null;
- }
-
- this.contextIndex--; // Restore to the previous value we stored as we were walking down.
- // We've already verified that this context has been expanded to accommodate
- // this thread id, so we don't need to do it again.
-
- context[this.threadID] = previousValue;
- };
-
- _proto.clearProviders = function clearProviders() {
- // Restore any remaining providers on the stack to previous values
- for (var index = this.contextIndex; index >= 0; index--) {
- var context = this.contextStack[index];
- var previousValue = this.contextValueStack[index];
- context[this.threadID] = previousValue;
- }
- };
-
- _proto.read = function read(bytes) {
- if (this.exhausted) {
- return null;
- }
-
- var prevPartialRenderer = currentPartialRenderer;
- setCurrentPartialRenderer(this);
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = Dispatcher;
-
- try {
- // Markup generated within <Suspense> ends up buffered until we know
- // nothing in that boundary suspended
- var out = [''];
- var suspended = false;
-
- while (out[0].length < bytes) {
- if (this.stack.length === 0) {
- this.exhausted = true;
- freeThreadID(this.threadID);
- break;
- }
-
- var frame = this.stack[this.stack.length - 1];
-
- if (suspended || frame.childIndex >= frame.children.length) {
- var footer = frame.footer;
-
- if (footer !== '') {
- this.previousWasTextNode = false;
- }
-
- this.stack.pop();
-
- if (frame.type === 'select') {
- this.currentSelectValue = null;
- } else if (frame.type != null && frame.type.type != null && frame.type.type.$$typeof === REACT_PROVIDER_TYPE) {
- var provider = frame.type;
- this.popProvider(provider);
- } else if (frame.type === REACT_SUSPENSE_TYPE) {
- this.suspenseDepth--;
- var buffered = out.pop();
-
- if (suspended) {
- suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame
-
- var fallbackFrame = frame.fallbackFrame;
-
- if (!fallbackFrame) {
- {
- throw Error(true ? "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue." : formatProdErrorMessage(303));
- }
- }
-
- this.stack.push(fallbackFrame);
- out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
-
- continue;
- } else {
- out[this.suspenseDepth] += buffered;
- }
- } // Flush output
-
-
- out[this.suspenseDepth] += footer;
- continue;
- }
-
- var child = frame.children[frame.childIndex++];
- var outBuffer = '';
-
- if (true) {
- pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack.
-
- frame.debugElementStack.length = 0;
- }
-
- try {
- outBuffer += this.render(child, frame.context, frame.domNamespace);
- } catch (err) {
- if (err != null && typeof err.then === 'function') {
- if (enableSuspenseServerRenderer) {
- if (!(this.suspenseDepth > 0)) {
- {
- throw Error(true ? "A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." : formatProdErrorMessage(342));
- }
- }
-
- suspended = true;
- } else {
- if (!false) {
- {
- throw Error(true ? "ReactDOMServer does not yet support Suspense." : formatProdErrorMessage(294));
- }
- }
- }
- } else {
- throw err;
- }
- } finally {
- if (true) {
- popCurrentDebugStack();
- }
- }
-
- if (out.length <= this.suspenseDepth) {
- out.push('');
- }
-
- out[this.suspenseDepth] += outBuffer;
- }
-
- return out[0];
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- setCurrentPartialRenderer(prevPartialRenderer);
- resetHooksState();
- }
- };
-
- _proto.render = function render(child, context, parentNamespace) {
- if (typeof child === 'string' || typeof child === 'number') {
- var text = '' + child;
-
- if (text === '') {
- return '';
- }
-
- if (this.makeStaticMarkup) {
- return escapeTextForBrowser(text);
- }
-
- if (this.previousWasTextNode) {
- return '<!-- -->' + escapeTextForBrowser(text);
- }
-
- this.previousWasTextNode = true;
- return escapeTextForBrowser(text);
- } else {
- var nextChild;
-
- var _resolve = resolve(child, context, this.threadID);
-
- nextChild = _resolve.child;
- context = _resolve.context;
-
- if (nextChild === null || nextChild === false) {
- return '';
- } else if (!React.isValidElement(nextChild)) {
- if (nextChild != null && nextChild.$$typeof != null) {
- // Catch unexpected special types early.
- var $$typeof = nextChild.$$typeof;
-
- if (!($$typeof !== REACT_PORTAL_TYPE)) {
- {
- throw Error( "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render." );
- }
- } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
-
-
- {
- {
- throw Error( "Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue." );
- }
- }
- }
-
- var nextChildren = toArray(nextChild);
- var frame = {
- type: null,
- domNamespace: parentNamespace,
- children: nextChildren,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- frame.debugElementStack = [];
- }
-
- this.stack.push(frame);
- return '';
- } // Safe because we just checked it's an element.
-
-
- var nextElement = nextChild;
- var elementType = nextElement.type;
-
- if (typeof elementType === 'string') {
- return this.renderDOM(nextElement, context, parentNamespace);
- }
-
- switch (elementType) {
- // TODO: LegacyHidden acts the same as a fragment. This only works
- // because we currently assume that every instance of LegacyHidden is
- // accompanied by a host component wrapper. In the hidden mode, the host
- // component is given a `hidden` attribute, which ensures that the
- // initial HTML is not visible. To support the use of LegacyHidden as a
- // true fragment, without an extra DOM node, we would have to hide the
- // initial HTML in some other way.
- case REACT_LEGACY_HIDDEN_TYPE:
- case REACT_DEBUG_TRACING_MODE_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_SUSPENSE_LIST_TYPE:
- case REACT_FRAGMENT_TYPE:
- {
- var _nextChildren = toArray(nextChild.props.children);
-
- var _frame = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame.debugElementStack = [];
- }
-
- this.stack.push(_frame);
- return '';
- }
-
- case REACT_SUSPENSE_TYPE:
- {
- {
- {
- {
- throw Error( "ReactDOMServer does not yet support Suspense." );
- }
- }
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_SCOPE_TYPE:
- {
-
- {
- {
- throw Error( "ReactDOMServer does not yet support scope components." );
- }
- }
- }
- }
-
- if (typeof elementType === 'object' && elementType !== null) {
- switch (elementType.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- {
- var element = nextChild;
-
- var _nextChildren5;
-
- var componentIdentity = {};
- prepareToUseHooks(componentIdentity);
- _nextChildren5 = elementType.render(element.props, element.ref);
- _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
- _nextChildren5 = toArray(_nextChildren5);
- var _frame5 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren5,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame5.debugElementStack = [];
- }
-
- this.stack.push(_frame5);
- return '';
- }
-
- case REACT_MEMO_TYPE:
- {
- var _element = nextChild;
- var _nextChildren6 = [React.createElement(elementType.type, _assign({
- ref: _element.ref
- }, _element.props))];
- var _frame6 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren6,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame6.debugElementStack = [];
- }
-
- this.stack.push(_frame6);
- return '';
- }
-
- case REACT_PROVIDER_TYPE:
- {
- var provider = nextChild;
- var nextProps = provider.props;
-
- var _nextChildren7 = toArray(nextProps.children);
-
- var _frame7 = {
- type: provider,
- domNamespace: parentNamespace,
- children: _nextChildren7,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame7.debugElementStack = [];
- }
-
- this.pushProvider(provider);
- this.stack.push(_frame7);
- return '';
- }
-
- case REACT_CONTEXT_TYPE:
- {
- var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In
- // DEV mode, we create a separate object for Context.Consumer that acts
- // like a proxy to Context. This proxy object adds unnecessary code in PROD
- // so we use the old behaviour (Context.Consumer references Context) to
- // reduce size and overhead. The separate object references context via
- // a property called "_context", which also gives us the ability to check
- // in DEV mode if this property exists or not and warn if it does not.
-
- {
- if (reactContext._context === undefined) {
- // This may be because it's a Context (rather than a Consumer).
- // Or it may be because it's older React where they're the same thing.
- // We only want to warn if we're sure it's a new React.
- if (reactContext !== reactContext.Consumer) {
- if (!hasWarnedAboutUsingContextAsConsumer) {
- hasWarnedAboutUsingContextAsConsumer = true;
-
- error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
- }
- } else {
- reactContext = reactContext._context;
- }
- }
-
- var _nextProps = nextChild.props;
- var threadID = this.threadID;
- validateContextBounds(reactContext, threadID);
- var nextValue = reactContext[threadID];
-
- var _nextChildren8 = toArray(_nextProps.children(nextValue));
-
- var _frame8 = {
- type: nextChild,
- domNamespace: parentNamespace,
- children: _nextChildren8,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame8.debugElementStack = [];
- }
-
- this.stack.push(_frame8);
- return '';
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_FUNDAMENTAL_TYPE:
- {
-
- {
- {
- throw Error( "ReactDOMServer does not yet support the fundamental API." );
- }
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_LAZY_TYPE:
- {
- var _element2 = nextChild;
- var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the
- // suspense server-side renderer is enabled so synchronously
- // resolved constructors are supported.
-
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
- var result = init(payload);
- var _nextChildren10 = [React.createElement(result, _assign({
- ref: _element2.ref
- }, _element2.props))];
- var _frame10 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren10,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame10.debugElementStack = [];
- }
-
- this.stack.push(_frame10);
- return '';
- }
- }
- }
-
- var info = '';
-
- {
- var owner = nextElement._owner;
-
- if (elementType === undefined || typeof elementType === 'object' && elementType !== null && Object.keys(elementType).length === 0) {
- 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.';
- }
-
- var ownerName = owner ? getComponentName(owner) : null;
-
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
- }
-
- {
- {
- throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info );
- }
- }
- }
- };
-
- _proto.renderDOM = function renderDOM(element, context, parentNamespace) {
- var tag = element.type.toLowerCase();
- var namespace = parentNamespace;
-
- if (parentNamespace === Namespaces.html) {
- namespace = getIntrinsicNamespace(tag);
- }
-
- {
- if (namespace === Namespaces.html) {
- // Should this check be gated by parent namespace? Not sure we want to
- // allow <SVG> or <mATH>.
- if (tag !== element.type) {
- error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type);
- }
- }
- }
-
- validateDangerousTag(tag);
- var props = element.props;
-
- if (tag === 'input') {
- {
- checkControlledValueProps('input', props);
-
- if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
- 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);
-
- didWarnDefaultChecked = true;
- }
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
- 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);
-
- didWarnDefaultInputValue = true;
- }
- }
-
- props = _assign({
- type: undefined
- }, props, {
- defaultChecked: undefined,
- defaultValue: undefined,
- value: props.value != null ? props.value : props.defaultValue,
- checked: props.checked != null ? props.checked : props.defaultChecked
- });
- } else if (tag === 'textarea') {
- {
- checkControlledValueProps('textarea', props);
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
- 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');
-
- didWarnDefaultTextareaValue = true;
- }
- }
-
- var initialValue = props.value;
-
- if (initialValue == null) {
- var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>.
-
- var textareaChildren = props.children;
-
- if (textareaChildren != null) {
- {
- error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
- }
-
- if (!(defaultValue == null)) {
- {
- throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
- }
- }
-
- if (Array.isArray(textareaChildren)) {
- if (!(textareaChildren.length <= 1)) {
- {
- throw Error( "<textarea> can only have at most one child." );
- }
- }
-
- textareaChildren = textareaChildren[0];
- }
-
- defaultValue = '' + textareaChildren;
- }
-
- if (defaultValue == null) {
- defaultValue = '';
- }
-
- initialValue = defaultValue;
- }
-
- props = _assign({}, props, {
- value: undefined,
- children: '' + initialValue
- });
- } else if (tag === 'select') {
- {
- checkControlledValueProps('select', props);
-
- for (var i = 0; i < valuePropNames.length; i++) {
- var propName = valuePropNames[i];
-
- if (props[propName] == null) {
- continue;
- }
-
- var isArray = Array.isArray(props[propName]);
-
- if (props.multiple && !isArray) {
- error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
- } else if (!props.multiple && isArray) {
- error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
- }
- }
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
- 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');
-
- didWarnDefaultSelectValue = true;
- }
- }
-
- this.currentSelectValue = props.value != null ? props.value : props.defaultValue;
- props = _assign({}, props, {
- value: undefined
- });
- } else if (tag === 'option') {
- var selected = null;
- var selectValue = this.currentSelectValue;
- var optionChildren = flattenOptionChildren(props.children);
-
- if (selectValue != null) {
- var value;
-
- if (props.value != null) {
- value = props.value + '';
- } else {
- value = optionChildren;
- }
-
- selected = false;
-
- if (Array.isArray(selectValue)) {
- // multiple
- for (var j = 0; j < selectValue.length; j++) {
- if ('' + selectValue[j] === value) {
- selected = true;
- break;
- }
- }
- } else {
- selected = '' + selectValue === value;
- }
-
- props = _assign({
- selected: undefined,
- children: undefined
- }, props, {
- selected: selected,
- children: optionChildren
- });
- }
- }
-
- {
- validatePropertiesInDevelopment(tag, props);
- }
-
- assertValidProps(tag, props);
- var out = createOpenTagMarkup(element.type, tag, props, namespace, this.makeStaticMarkup, this.stack.length === 1);
- var footer = '';
-
- if (omittedCloseTags.hasOwnProperty(tag)) {
- out += '/>';
- } else {
- out += '>';
- footer = '</' + element.type + '>';
- }
-
- var children;
- var innerMarkup = getNonChildrenInnerMarkup(props);
-
- if (innerMarkup != null) {
- children = [];
-
- if (newlineEatingTags.hasOwnProperty(tag) && innerMarkup.charAt(0) === '\n') {
- // text/html ignores the first character in these tags if it's a newline
- // Prefer to break application/xml over text/html (for now) by adding
- // a newline specifically to get eaten by the parser. (Alternately for
- // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
- // \r is normalized out by HTMLTextAreaElement#value.)
- // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
- // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
- // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
- // See: Parsing of "textarea" "listing" and "pre" elements
- // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
- out += '\n';
- }
-
- out += innerMarkup;
- } else {
- children = toArray(props.children);
- }
-
- var frame = {
- domNamespace: getChildNamespace(parentNamespace, element.type),
- type: tag,
- children: children,
- childIndex: 0,
- context: context,
- footer: footer
- };
-
- {
- frame.debugElementStack = [];
- }
-
- this.stack.push(frame);
- this.previousWasTextNode = false;
- return out;
- };
-
- return ReactDOMServerRenderer;
-}();
-
-/**
- * Render a ReactElement to its initial HTML. This should only be used on the
- * server.
- * See https://reactjs.org/docs/react-dom-server.html#rendertostring
- */
-
-function renderToString(element, options) {
- var renderer = new ReactDOMServerRenderer(element, false, options);
-
- try {
- var markup = renderer.read(Infinity);
- return markup;
- } finally {
- renderer.destroy();
- }
-}
-/**
- * Similar to renderToString, except this doesn't create extra DOM attributes
- * such as data-react-id that React uses internally.
- * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
- */
-
-function renderToStaticMarkup(element, options) {
- var renderer = new ReactDOMServerRenderer(element, true, options);
-
- try {
- var markup = renderer.read(Infinity);
- return markup;
- } finally {
- renderer.destroy();
- }
-}
-
-function renderToNodeStream() {
- {
- {
- throw Error( "ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead." );
- }
- }
-}
-
-function renderToStaticNodeStream() {
- {
- {
- throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
- }
- }
-}
-
-exports.renderToNodeStream = renderToNodeStream;
-exports.renderToStaticMarkup = renderToStaticMarkup;
-exports.renderToStaticNodeStream = renderToStaticNodeStream;
-exports.renderToString = renderToString;
-exports.version = ReactVersion;
- })();
-}
diff --git a/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js b/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js
deleted file mode 100644
index a38fc31..0000000
--- a/node_modules/react-dom/cjs/react-dom-server.browser.production.min.js
+++ /dev/null
@@ -1,51 +0,0 @@
-/** @license React v17.0.2
- * react-dom-server.browser.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var l=require("object-assign"),m=require("react");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-var q=60106,r=60107,u=60108,z=60114,B=60109,aa=60110,ba=60112,D=60113,ca=60120,da=60115,ea=60116,fa=60121,ha=60117,ia=60119,ja=60129,ka=60131;
-if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;q=E("react.portal");r=E("react.fragment");u=E("react.strict_mode");z=E("react.profiler");B=E("react.provider");aa=E("react.context");ba=E("react.forward_ref");D=E("react.suspense");ca=E("react.suspense_list");da=E("react.memo");ea=E("react.lazy");fa=E("react.block");ha=E("react.fundamental");ia=E("react.scope");ja=E("react.debug_trace_mode");ka=E("react.legacy_hidden")}
-function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case r:return"Fragment";case q:return"Portal";case z:return"Profiler";case u:return"StrictMode";case D:return"Suspense";case ca:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case aa:return(a.displayName||"Context")+".Consumer";case B:return(a._context.displayName||"Context")+".Provider";case ba:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
-(""!==b?"ForwardRef("+b+")":"ForwardRef");case da:return F(a.type);case fa:return F(a._render);case ea:b=a._payload;a=a._init;try{return F(a(b))}catch(c){}}return null}var la=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ma={};function I(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function na(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return I(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=ma;return b}
-for(var J=new Uint16Array(16),K=0;15>K;K++)J[K]=K+1;J[15]=0;var oa=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,pa=Object.prototype.hasOwnProperty,qa={},ra={};
-function sa(a){if(pa.call(ra,a))return!0;if(pa.call(qa,a))return!1;if(oa.test(a))return ra[a]=!0;qa[a]=!0;return!1}function ta(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
-function ua(a,b,c,d){if(null===b||"undefined"===typeof b||ta(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function M(a,b,c,d,f,h,t){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=h;this.removeEmptyString=t}var N={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){N[a]=new M(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];N[b]=new M(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){N[a]=new M(a,2,!1,a.toLowerCase(),null,!1,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){N[a]=new M(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){N[a]=new M(a,3,!1,a.toLowerCase(),null,!1,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){N[a]=new M(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){N[a]=new M(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){N[a]=new M(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){N[a]=new M(a,5,!1,a.toLowerCase(),null,!1,!1)});var va=/[\-:]([a-z])/g;function wa(a){return a[1].toUpperCase()}
-"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".split(" ").forEach(function(a){var b=a.replace(va,
-wa);N[b]=new M(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(va,wa);N[b]=new M(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!1,!1)});
-N.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!0,!0)});var xa=/["'&<>]/;
-function O(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=xa.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}
-function ya(a,b){var c=N.hasOwnProperty(a)?N[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||ua(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(O(b)+'"')}return sa(a)?a+'="'+(O(b)+'"'):""}function za(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
-var Aa="function"===typeof Object.is?Object.is:za,P=null,Q=null,R=null,S=!1,T=!1,U=null,V=0;function W(){if(null===P)throw Error(p(321));return P}function Ba(){if(0<V)throw Error(p(312));return{memoizedState:null,queue:null,next:null}}function Ca(){null===R?null===Q?(S=!1,Q=R=Ba()):(S=!0,R=Q):null===R.next?(S=!1,R=R.next=Ba()):(S=!0,R=R.next);return R}function Da(a,b,c,d){for(;T;)T=!1,V+=1,R=null,c=a(b,d);Ea();return c}function Ea(){P=null;T=!1;Q=null;V=0;R=U=null}
-function Fa(a,b){return"function"===typeof b?b(a):b}function Ga(a,b,c){P=W();R=Ca();if(S){var d=R.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=R.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);R.memoizedState=d;return[d,b]}return[R.memoizedState,b]}a=a===Fa?"function"===typeof b?b():b:void 0!==c?c(b):b;R.memoizedState=a;a=R.queue={last:null,dispatch:null};a=a.dispatch=Ha.bind(null,P,a);return[R.memoizedState,a]}
-function Ia(a,b){P=W();R=Ca();b=void 0===b?null:b;if(null!==R){var c=R.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Aa(b[f],d[f])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();R.memoizedState=[a,b];return a}function Ha(a,b,c){if(!(25>V))throw Error(p(301));if(a===P)if(T=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ja(){}
-var X=null,Ka={readContext:function(a){var b=X.threadID;I(a,b);return a[b]},useContext:function(a){W();var b=X.threadID;I(a,b);return a[b]},useMemo:Ia,useReducer:Ga,useRef:function(a){P=W();R=Ca();var b=R.memoizedState;return null===b?(a={current:a},R.memoizedState=a):b},useState:function(a){return Ga(Fa,a)},useLayoutEffect:function(){},useCallback:function(a,b){return Ia(function(){return a},b)},useImperativeHandle:Ja,useEffect:Ja,useDebugValue:Ja,useDeferredValue:function(a){W();return a},useTransition:function(){W();
-return[function(a){a()},!1]},useOpaqueIdentifier:function(){return(X.identifierPrefix||"")+"R:"+(X.uniqueID++).toString(36)},useMutableSource:function(a,b){W();return b(a._source)}},La={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Ma(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
-var Na={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Oa=l({menuitem:!0},Na),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
-gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pa=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Pa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});
-var Qa=/([A-Z])/g,Ra=/^ms-/,Z=m.Children.toArray,Sa=la.ReactCurrentDispatcher,Ta={listing:!0,pre:!0,textarea:!0},Ua=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Va={},Wa={};function Xa(a){if(void 0===a||null===a)return a;var b="";m.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Ya=Object.prototype.hasOwnProperty,Za={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function $a(a,b){if(void 0===a)throw Error(p(152,F(b)||"Component"));}
-function ab(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=na(h,b,c,e),t=[],g=!1,n={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===t)return null},enqueueReplaceState:function(a,c){g=!0;t=[c]},enqueueSetState:function(a,c){if(null===t)return null;t.push(c)}};if(e){if(e=new h(d.props,f,n),"function"===typeof h.getDerivedStateFromProps){var k=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=k&&(e.state=l({},e.state,k))}}else if(P={},e=h(d.props,
-f,n),e=Da(h,d.props,e,f),null==e||null==e.render){a=e;$a(a,h);return}e.props=d.props;e.context=f;e.updater=n;n=e.state;void 0===n&&(e.state=n=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),t.length){n=t;var v=
-g;t=null;g=!1;if(v&&1===n.length)e.state=n[0];else{k=v?n[0]:e.state;var H=!0;for(v=v?1:0;v<n.length;v++){var x=n[v];x="function"===typeof x?x.call(e,k,d.props,f):x;null!=x&&(H?(H=!1,k=l({},k,x)):l(k,x))}e.state=k}}else t=null;a=e.render();$a(a,h);if("function"===typeof e.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var y=e.getChildContext();for(var A in y)if(!(A in d))throw Error(p(108,F(h)||"Unknown",A));}y&&(b=l({},b,y))}for(;m.isValidElement(a);){var f=a,h=f.type;if("function"!==
-typeof h)break;d(f,h)}return{child:a,context:b}}
-var bb=function(){function a(a,b,f){m.isValidElement(a)?a.type!==r?a=[a]:(a=a.props.children,a=m.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:La.html,children:a,childIndex:0,context:ma,footer:""};var c=J[0];if(0===c){var d=J;c=d.length;var g=2*c;if(!(65536>=g))throw Error(p(304));var e=new Uint16Array(g);e.set(d);J=e;J[0]=c+1;for(d=c;d<g-1;d++)J[d]=d+1;J[g-1]=0}else J[0]=J[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;
-this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||""}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;J[a]=J[0];J[0]=a}};b.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;I(c,h);var t=c[h];this.contextStack[b]=c;this.contextValueStack[b]=t;c[h]=a.props.value};b.popProvider=
-function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this;var c=Sa.current;Sa.current=Ka;try{for(var h=[""],t=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var g=this.threadID;
-J[g]=J[0];J[0]=g;break}var e=this.stack[this.stack.length-1];if(t||e.childIndex>=e.children.length){var L=e.footer;""!==L&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===B)this.popProvider(e.type);else if(e.type===D){this.suspenseDepth--;var G=h.pop();if(t){t=!1;var C=e.fallbackFrame;if(!C)throw Error(p(303));this.stack.push(C);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=
-G}h[this.suspenseDepth]+=L}else{var n=e.children[e.childIndex++],k="";try{k+=this.render(n,e.context,e.domNamespace)}catch(v){if(null!=v&&"function"===typeof v.then)throw Error(p(294));throw v;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=k}}return h[0]}finally{Sa.current=c,X=b,Ea()}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return O(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+O(f);
-this.previousWasTextNode=!0;return O(f)}b=ab(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return"";if(!m.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===q)throw Error(p(257));throw Error(p(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case ka:case ja:case u:case z:case ca:case r:return a=Z(a.props.children),this.stack.push({type:null,
-domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case D:throw Error(p(294));case ia:throw Error(p(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ba:P={};var d=c.render(a.props,a.ref);d=Da(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return"";case da:return a=[m.createElement(c.type,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
-"";case B:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case aa:c=a.type;d=a.props;var g=this.threadID;I(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";case ha:throw Error(p(338));case ea:return c=a.type,d=c._init,c=d(c._payload),a=[m.createElement(c,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,
-context:b,footer:""}),""}throw Error(p(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===La.html&&Ma(c);if(!Va.hasOwnProperty(c)){if(!Ua.test(c))throw Error(p(65,c));Va[c]=!0}var d=a.props;if("input"===c)d=l({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=
-g)throw Error(p(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(p(93));e=e[0]}g=""+e}null==g&&(g="")}d=l({},d,{value:void 0,children:""+g})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=l({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var L=Xa(d.children);if(null!=e){var G=null!=d.value?d.value+"":L;g=!1;if(Array.isArray(e))for(var C=0;C<e.length;C++){if(""+e[C]===G){g=!0;break}}else g=""+e===G;d=l({selected:void 0,children:void 0},
-d,{selected:g,children:L})}}if(g=d){if(Oa[c]&&(null!=g.children||null!=g.dangerouslySetInnerHTML))throw Error(p(137,c));if(null!=g.dangerouslySetInnerHTML){if(null!=g.children)throw Error(p(60));if(!("object"===typeof g.dangerouslySetInnerHTML&&"__html"in g.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=g.style&&"object"!==typeof g.style)throw Error(p(62));}g=d;e=this.makeStaticMarkup;L=1===this.stack.length;G="<"+a.type;b:if(-1===c.indexOf("-"))C="string"===typeof g.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":C=
-!1;break b;default:C=!0}for(w in g)if(Ya.call(g,w)){var n=g[w];if(null!=n){if("style"===w){var k=void 0,v="",H="";for(k in n)if(n.hasOwnProperty(k)){var x=0===k.indexOf("--"),y=n[k];if(null!=y){if(x)var A=k;else if(A=k,Wa.hasOwnProperty(A))A=Wa[A];else{var cb=A.replace(Qa,"-$1").toLowerCase().replace(Ra,"-ms-");A=Wa[A]=cb}v+=H+A+":";H=k;x=null==y||"boolean"===typeof y||""===y?"":x||"number"!==typeof y||0===y||Y.hasOwnProperty(H)&&Y[H]?(""+y).trim():y+"px";v+=x;H=";"}}n=v||null}k=null;C?Za.hasOwnProperty(w)||
-(k=w,k=sa(k)&&null!=n?k+'="'+(O(n)+'"'):""):k=ya(w,n);k&&(G+=" "+k)}}e||L&&(G+=' data-reactroot=""');var w=G;g="";Na.hasOwnProperty(c)?w+="/>":(w+=">",g="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=O(e);break a}e=null}null!=e?(d=[],Ta.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(w+="\n"),w+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?Ma(a):"http://www.w3.org/2000/svg"===
-f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=!1;return w};return a}();exports.renderToNodeStream=function(){throw Error(p(207));};exports.renderToStaticMarkup=function(a,b){a=new bb(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};exports.renderToStaticNodeStream=function(){throw Error(p(208));};exports.renderToString=function(a,b){a=new bb(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};
-exports.version="17.0.2";
diff --git a/node_modules/react-dom/cjs/react-dom-server.node.development.js b/node_modules/react-dom/cjs/react-dom-server.node.development.js
deleted file mode 100644
index 405bd3a..0000000
--- a/node_modules/react-dom/cjs/react-dom-server.node.development.js
+++ /dev/null
@@ -1,4383 +0,0 @@
-/** @license React v17.0.2
- * react-dom-server.node.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var React = require('react');
-var _assign = require('object-assign');
-var stream = require('stream');
-
-// TODO: this is special because it gets imported during build.
-var ReactVersion = '17.0.2';
-
-// Do not require this module directly! Use normal `invariant` calls with
-// template literal strings. The messages will be replaced with error codes
-// during build.
-function formatProdErrorMessage(code) {
- var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
-
- for (var i = 1; i < arguments.length; i++) {
- url += '&args[]=' + encodeURIComponent(arguments[i]);
- }
-
- return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
-}
-
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
-// by calls to these methods by a Babel plugin.
-//
-// In PROD (or in packages without access to React internals),
-// they are left as they are instead.
-
-function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
-}
-function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
-}
-
-function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
-}
-
-// ATTENTION
-// When adding new symbols to this file,
-// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var REACT_ELEMENT_TYPE = 0xeac7;
-var REACT_PORTAL_TYPE = 0xeaca;
-var REACT_FRAGMENT_TYPE = 0xeacb;
-var REACT_STRICT_MODE_TYPE = 0xeacc;
-var REACT_PROFILER_TYPE = 0xead2;
-var REACT_PROVIDER_TYPE = 0xeacd;
-var REACT_CONTEXT_TYPE = 0xeace;
-var REACT_FORWARD_REF_TYPE = 0xead0;
-var REACT_SUSPENSE_TYPE = 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = 0xead8;
-var REACT_MEMO_TYPE = 0xead3;
-var REACT_LAZY_TYPE = 0xead4;
-var REACT_BLOCK_TYPE = 0xead9;
-var REACT_SERVER_BLOCK_TYPE = 0xeada;
-var REACT_FUNDAMENTAL_TYPE = 0xead5;
-var REACT_SCOPE_TYPE = 0xead7;
-var REACT_OPAQUE_ID_TYPE = 0xeae0;
-var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
-var REACT_OFFSCREEN_TYPE = 0xeae2;
-var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
-}
-
-function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
-}
-
-function getContextName(type) {
- return type.displayName || 'Context';
-}
-
-function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case REACT_PROFILER_TYPE:
- return 'Profiler';
-
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
-
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
-}
-
-// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
-var enableSuspenseServerRenderer = false;
-
-// Helpers to patch console.logs to avoid logging during side-effect free
-// replaying on render function. This currently only patches the object
-// lazily which won't cover if the log function was extracted eagerly.
-// We could also eagerly patch the method.
-var disabledDepth = 0;
-var prevLog;
-var prevInfo;
-var prevWarn;
-var prevError;
-var prevGroup;
-var prevGroupCollapsed;
-var prevGroupEnd;
-
-function disabledLog() {}
-
-disabledLog.__reactDisabledLog = true;
-function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
-}
-function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: _assign({}, props, {
- value: prevLog
- }),
- info: _assign({}, props, {
- value: prevInfo
- }),
- warn: _assign({}, props, {
- value: prevWarn
- }),
- error: _assign({}, props, {
- value: prevError
- }),
- group: _assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: _assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: _assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
-}
-
-var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
-var prefix;
-function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
-}
-var reentry = false;
-var componentFrameCache;
-
-{
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
-}
-
-function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
-}
-function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
-}
-
-function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
-}
-
-function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case REACT_SUSPENSE_TYPE:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
-}
-
-var loggedTypeFailures = {};
-var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame.setExtraStackFrame(null);
- }
- }
-}
-
-function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
-}
-
-var didWarnAboutInvalidateContextType;
-
-{
- didWarnAboutInvalidateContextType = new Set();
-}
-
-var emptyObject = {};
-
-{
- Object.freeze(emptyObject);
-}
-
-function maskContext(type, context) {
- var contextTypes = type.contextTypes;
-
- if (!contextTypes) {
- return emptyObject;
- }
-
- var maskedContext = {};
-
- for (var contextName in contextTypes) {
- maskedContext[contextName] = context[contextName];
- }
-
- return maskedContext;
-}
-
-function checkContextTypes(typeSpecs, values, location) {
- {
- checkPropTypes(typeSpecs, values, location, 'Component');
- }
-}
-
-function validateContextBounds(context, threadID) {
- // If we don't have enough slots in this context to store this threadID,
- // fill it in without leaving any holes to ensure that the VM optimizes
- // this as non-holey index properties.
- // (Note: If `react` package is < 16.6, _threadCount is undefined.)
- for (var i = context._threadCount | 0; i <= threadID; i++) {
- // We assume that this is the same as the defaultValue which might not be
- // true if we're rendering inside a secondary renderer but they are
- // secondary because these use cases are very rare.
- context[i] = context._currentValue2;
- context._threadCount = i + 1;
- }
-}
-function processContext(type, context, threadID, isClass) {
- if (isClass) {
- var contextType = type.contextType;
-
- {
- if ('contextType' in type) {
- var isValid = // Allow null for conditional declaration
- contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
-
- if (!isValid && !didWarnAboutInvalidateContextType.has(type)) {
- didWarnAboutInvalidateContextType.add(type);
- var addendum = '';
-
- if (contextType === undefined) {
- 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.';
- } else if (typeof contextType !== 'object') {
- addendum = ' However, it is set to a ' + typeof contextType + '.';
- } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
- addendum = ' Did you accidentally pass the Context.Provider instead?';
- } else if (contextType._context !== undefined) {
- // <Context.Consumer>
- addendum = ' Did you accidentally pass the Context.Consumer instead?';
- } else {
- addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
- }
-
- error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
- }
- }
- }
-
- if (typeof contextType === 'object' && contextType !== null) {
- validateContextBounds(contextType, threadID);
- return contextType[threadID];
- }
-
- {
- var maskedContext = maskContext(type, context);
-
- {
- if (type.contextTypes) {
- checkContextTypes(type.contextTypes, maskedContext, 'context');
- }
- }
-
- return maskedContext;
- }
- } else {
- {
- var _maskedContext = maskContext(type, context);
-
- {
- if (type.contextTypes) {
- checkContextTypes(type.contextTypes, _maskedContext, 'context');
- }
- }
-
- return _maskedContext;
- }
- }
-}
-
-var nextAvailableThreadIDs = new Uint16Array(16);
-
-for (var i = 0; i < 15; i++) {
- nextAvailableThreadIDs[i] = i + 1;
-}
-
-nextAvailableThreadIDs[15] = 0;
-
-function growThreadCountAndReturnNextAvailable() {
- var oldArray = nextAvailableThreadIDs;
- var oldSize = oldArray.length;
- var newSize = oldSize * 2;
-
- if (!(newSize <= 0x10000)) {
- {
- throw Error( "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic." );
- }
- }
-
- var newArray = new Uint16Array(newSize);
- newArray.set(oldArray);
- nextAvailableThreadIDs = newArray;
- nextAvailableThreadIDs[0] = oldSize + 1;
-
- for (var _i = oldSize; _i < newSize - 1; _i++) {
- nextAvailableThreadIDs[_i] = _i + 1;
- }
-
- nextAvailableThreadIDs[newSize - 1] = 0;
- return oldSize;
-}
-
-function allocThreadID() {
- var nextID = nextAvailableThreadIDs[0];
-
- if (nextID === 0) {
- return growThreadCountAndReturnNextAvailable();
- }
-
- nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID];
- return nextID;
-}
-function freeThreadID(id) {
- nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0];
- nextAvailableThreadIDs[0] = id;
-}
-
-// A reserved attribute.
-// It is handled by React separately and shouldn't be written to the DOM.
-var RESERVED = 0; // A simple string attribute.
-// Attributes that aren't in the filter are presumed to have this type.
-
-var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
-// "enumerated" attributes with "true" and "false" as possible values.
-// When true, it should be set to a "true" string.
-// When false, it should be set to a "false" string.
-
-var BOOLEANISH_STRING = 2; // A real boolean attribute.
-// When true, it should be present (set either to an empty string or its name).
-// When false, it should be omitted.
-
-var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
-// When true, it should be present (set either to an empty string or its name).
-// When false, it should be omitted.
-// For any other value, should be present with that value.
-
-var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
-// When falsy, it should be removed.
-
-var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
-// When falsy, it should be removed.
-
-var POSITIVE_NUMERIC = 6;
-
-/* eslint-disable max-len */
-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";
-/* eslint-enable max-len */
-
-var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
-var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
-var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var illegalAttributeNameCache = {};
-var validatedAttributeNameCache = {};
-function isAttributeNameSafe(attributeName) {
- if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
- return true;
- }
-
- if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
- return false;
- }
-
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
- validatedAttributeNameCache[attributeName] = true;
- return true;
- }
-
- illegalAttributeNameCache[attributeName] = true;
-
- {
- error('Invalid attribute name: `%s`', attributeName);
- }
-
- return false;
-}
-function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null) {
- return propertyInfo.type === RESERVED;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
- return true;
- }
-
- return false;
-}
-function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null && propertyInfo.type === RESERVED) {
- return false;
- }
-
- switch (typeof value) {
- case 'function': // $FlowIssue symbol is perfectly valid here
-
- case 'symbol':
- // eslint-disable-line
- return true;
-
- case 'boolean':
- {
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
- return !propertyInfo.acceptsBooleans;
- } else {
- var prefix = name.toLowerCase().slice(0, 5);
- return prefix !== 'data-' && prefix !== 'aria-';
- }
- }
-
- default:
- return false;
- }
-}
-function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
- if (value === null || typeof value === 'undefined') {
- return true;
- }
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
- return true;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
-
- switch (propertyInfo.type) {
- case BOOLEAN:
- return !value;
-
- case OVERLOADED_BOOLEAN:
- return value === false;
-
- case NUMERIC:
- return isNaN(value);
-
- case POSITIVE_NUMERIC:
- return isNaN(value) || value < 1;
- }
- }
-
- return false;
-}
-function getPropertyInfo(name) {
- return properties.hasOwnProperty(name) ? properties[name] : null;
-}
-
-function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
- this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
- this.attributeName = attributeName;
- this.attributeNamespace = attributeNamespace;
- this.mustUseProperty = mustUseProperty;
- this.propertyName = name;
- this.type = type;
- this.sanitizeURL = sanitizeURL;
- this.removeEmptyString = removeEmptyString;
-} // When adding attributes to this list, be sure to also add them to
-// the `possibleStandardNames` module to ensure casing and incorrect
-// name warnings.
-
-
-var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
-
-var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
-// elements (not just inputs). Now that ReactDOMInput assigns to the
-// defaultValue property -- do we need this?
-'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
-reservedProps.forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // A few React string attributes have a different name.
-// This is a mapping from React prop names to the attribute names.
-
-[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
- var name = _ref[0],
- attributeName = _ref[1];
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are "enumerated" HTML attributes that accept "true" and "false".
-// In React, we let users pass `true` and `false` even though technically
-// these aren't boolean attributes (they are coerced to strings).
-
-['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are "enumerated" SVG attributes that accept "true" and "false".
-// In React, we let users pass `true` and `false` even though technically
-// these aren't boolean attributes (they are coerced to strings).
-// Since these are SVG attributes, their attribute names are case-sensitive.
-
-['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML boolean attributes.
-
-['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
-// on the client side because the browsers are inconsistent. Instead we call focus().
-'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
-'itemScope'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are the few React props that we set as DOM properties
-// rather than attributes. These are all booleans.
-
-['checked', // Note: `option.selected` is not updated if `select.multiple` is
-// disabled with `removeAttribute`. We have special logic for handling this.
-'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that are "overloaded booleans": they behave like
-// booleans, but can also accept a string value.
-
-['capture', 'download' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that must be positive numbers.
-
-['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that must be numbers.
-
-['rowSpan', 'start'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-});
-var CAMELIZE = /[\-\:]([a-z])/g;
-
-var capitalize = function (token) {
- return token[1].toUpperCase();
-}; // This is a list of all SVG attributes that need special casing, namespacing,
-// or boolean value assignment. Regular attributes that just accept strings
-// and have the same names are omitted, just like in the HTML attribute filter.
-// Some of these attributes can be hard to find. This list was created by
-// scraping the MDN documentation.
-
-
-['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' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // String SVG attributes with the xlink namespace.
-
-['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
- false);
-}); // String SVG attributes with the xml namespace.
-
-['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
- false);
-}); // These attribute exists both in HTML and SVG.
-// The attribute name is case-sensitive in SVG so we can't just use
-// the React name like we do for attributes that exist only in HTML.
-
-['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These attributes accept URLs. These must not allow javascript: URLS.
-// These will also need to accept Trusted Types object in the future.
-
-var xlinkHref = 'xlinkHref';
-properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
-'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
-false);
-['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- true, // sanitizeURL
- true);
-});
-
-// and any newline or tab are filtered out as if they're not part of the URL.
-// https://url.spec.whatwg.org/#url-parsing
-// Tab or newline are defined as \r\n\t:
-// https://infra.spec.whatwg.org/#ascii-tab-or-newline
-// A C0 control is a code point in the range \u0000 NULL to \u001F
-// INFORMATION SEPARATOR ONE, inclusive:
-// https://infra.spec.whatwg.org/#c0-control-or-space
-
-/* eslint-disable max-len */
-
-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;
-var didWarn = false;
-
-function sanitizeURL(url) {
- {
- if (!didWarn && isJavaScriptProtocol.test(url)) {
- didWarn = true;
-
- 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));
- }
- }
-}
-
-// code copied and modified from escape-html
-
-/**
- * Module variables.
- * @private
- */
-var matchHtmlRegExp = /["'&<>]/;
-/**
- * Escapes special characters and HTML entities in a given html string.
- *
- * @param {string} string HTML string to escape for later insertion
- * @return {string}
- * @public
- */
-
-function escapeHtml(string) {
- var str = '' + string;
- var match = matchHtmlRegExp.exec(str);
-
- if (!match) {
- return str;
- }
-
- var escape;
- var html = '';
- var index;
- var lastIndex = 0;
-
- for (index = match.index; index < str.length; index++) {
- switch (str.charCodeAt(index)) {
- case 34:
- // "
- escape = '&quot;';
- break;
-
- case 38:
- // &
- escape = '&amp;';
- break;
-
- case 39:
- // '
- escape = '&#x27;'; // modified from escape-html; used to be '&#39'
-
- break;
-
- case 60:
- // <
- escape = '&lt;';
- break;
-
- case 62:
- // >
- escape = '&gt;';
- break;
-
- default:
- continue;
- }
-
- if (lastIndex !== index) {
- html += str.substring(lastIndex, index);
- }
-
- lastIndex = index + 1;
- html += escape;
- }
-
- return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
-} // end code copied and modified from escape-html
-
-/**
- * Escapes text to prevent scripting attacks.
- *
- * @param {*} text Text value to escape.
- * @return {string} An escaped string.
- */
-
-
-function escapeTextForBrowser(text) {
- if (typeof text === 'boolean' || typeof text === 'number') {
- // this shortcircuit helps perf for types that we know will never have
- // special characters, especially given that this function is used often
- // for numeric dom ids.
- return '' + text;
- }
-
- return escapeHtml(text);
-}
-
-/**
- * Escapes attribute value to prevent scripting attacks.
- *
- * @param {*} value Value to escape.
- * @return {string} An escaped string.
- */
-
-function quoteAttributeValueForBrowser(value) {
- return '"' + escapeTextForBrowser(value) + '"';
-}
-
-function createMarkupForRoot() {
- return ROOT_ATTRIBUTE_NAME + '=""';
-}
-/**
- * Creates markup for a property.
- *
- * @param {string} name
- * @param {*} value
- * @return {?string} Markup string, or null if the property was invalid.
- */
-
-function createMarkupForProperty(name, value) {
- var propertyInfo = getPropertyInfo(name);
-
- if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo, false)) {
- return '';
- }
-
- if (shouldRemoveAttribute(name, value, propertyInfo, false)) {
- return '';
- }
-
- if (propertyInfo !== null) {
- var attributeName = propertyInfo.attributeName;
- var type = propertyInfo.type;
-
- if (type === BOOLEAN || type === OVERLOADED_BOOLEAN && value === true) {
- return attributeName + '=""';
- } else {
- if (propertyInfo.sanitizeURL) {
- value = '' + value;
- sanitizeURL(value);
- }
-
- return attributeName + '=' + quoteAttributeValueForBrowser(value);
- }
- } else if (isAttributeNameSafe(name)) {
- return name + '=' + quoteAttributeValueForBrowser(value);
- }
-
- return '';
-}
-/**
- * Creates markup for a custom property.
- *
- * @param {string} name
- * @param {*} value
- * @return {string} Markup string, or empty string if the property was invalid.
- */
-
-function createMarkupForCustomAttribute(name, value) {
- if (!isAttributeNameSafe(name) || value == null) {
- return '';
- }
-
- return name + '=' + quoteAttributeValueForBrowser(value);
-}
-
-/**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
-function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
- ;
-}
-
-var objectIs = typeof Object.is === 'function' ? Object.is : is;
-
-var currentlyRenderingComponent = null;
-var firstWorkInProgressHook = null;
-var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook
-
-var isReRender = false; // Whether an update was scheduled during the currently executing render pass.
-
-var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates
-
-var renderPhaseUpdates = null; // Counter to prevent infinite loops.
-
-var numberOfReRenders = 0;
-var RE_RENDER_LIMIT = 25;
-var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook
-
-var currentHookNameInDev;
-
-function resolveCurrentlyRenderingComponent() {
- if (!(currentlyRenderingComponent !== null)) {
- {
- throw 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
-
- {
- if (isInHookUserCodeInDev) {
- 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');
- }
- }
-
- return currentlyRenderingComponent;
-}
-
-function areHookInputsEqual(nextDeps, prevDeps) {
- if (prevDeps === null) {
- {
- 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);
- }
-
- return false;
- }
-
- {
- // Don't bother comparing lengths in prod because these arrays should be
- // passed inline.
- if (nextDeps.length !== prevDeps.length) {
- 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(', ') + "]");
- }
- }
-
- for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
- if (objectIs(nextDeps[i], prevDeps[i])) {
- continue;
- }
-
- return false;
- }
-
- return true;
-}
-
-function createHook() {
- if (numberOfReRenders > 0) {
- {
- {
- throw Error( "Rendered more hooks than during the previous render" );
- }
- }
- }
-
- return {
- memoizedState: null,
- queue: null,
- next: null
- };
-}
-
-function createWorkInProgressHook() {
- if (workInProgressHook === null) {
- // This is the first hook in the list
- if (firstWorkInProgressHook === null) {
- isReRender = false;
- firstWorkInProgressHook = workInProgressHook = createHook();
- } else {
- // There's already a work-in-progress. Reuse it.
- isReRender = true;
- workInProgressHook = firstWorkInProgressHook;
- }
- } else {
- if (workInProgressHook.next === null) {
- isReRender = false; // Append to the end of the list
-
- workInProgressHook = workInProgressHook.next = createHook();
- } else {
- // There's already a work-in-progress. Reuse it.
- isReRender = true;
- workInProgressHook = workInProgressHook.next;
- }
- }
-
- return workInProgressHook;
-}
-
-function prepareToUseHooks(componentIdentity) {
- currentlyRenderingComponent = componentIdentity;
-
- {
- isInHookUserCodeInDev = false;
- } // The following should have already been reset
- // didScheduleRenderPhaseUpdate = false;
- // firstWorkInProgressHook = null;
- // numberOfReRenders = 0;
- // renderPhaseUpdates = null;
- // workInProgressHook = null;
-
-}
-function finishHooks(Component, props, children, refOrContext) {
- // This must be called after every function component to prevent hooks from
- // being used in classes.
- while (didScheduleRenderPhaseUpdate) {
- // Updates were scheduled during the render phase. They are stored in
- // the `renderPhaseUpdates` map. Call the component again, reusing the
- // work-in-progress hooks and applying the additional updates on top. Keep
- // restarting until no more updates are scheduled.
- didScheduleRenderPhaseUpdate = false;
- numberOfReRenders += 1; // Start over from the beginning of the list
-
- workInProgressHook = null;
- children = Component(props, refOrContext);
- }
-
- resetHooksState();
- return children;
-} // Reset the internal hooks state if an error occurs while rendering a component
-
-function resetHooksState() {
- {
- isInHookUserCodeInDev = false;
- }
-
- currentlyRenderingComponent = null;
- didScheduleRenderPhaseUpdate = false;
- firstWorkInProgressHook = null;
- numberOfReRenders = 0;
- renderPhaseUpdates = null;
- workInProgressHook = null;
-}
-
-function readContext(context, observedBits) {
- var threadID = currentPartialRenderer.threadID;
- validateContextBounds(context, threadID);
-
- {
- if (isInHookUserCodeInDev) {
- 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().');
- }
- }
-
- return context[threadID];
-}
-
-function useContext(context, observedBits) {
- {
- currentHookNameInDev = 'useContext';
- }
-
- resolveCurrentlyRenderingComponent();
- var threadID = currentPartialRenderer.threadID;
- validateContextBounds(context, threadID);
- return context[threadID];
-}
-
-function basicStateReducer(state, action) {
- // $FlowFixMe: Flow doesn't like mixed types
- return typeof action === 'function' ? action(state) : action;
-}
-
-function useState(initialState) {
- {
- currentHookNameInDev = 'useState';
- }
-
- return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers
- initialState);
-}
-function useReducer(reducer, initialArg, init) {
- {
- if (reducer !== basicStateReducer) {
- currentHookNameInDev = 'useReducer';
- }
- }
-
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
-
- if (isReRender) {
- // This is a re-render. Apply the new render phase updates to the previous
- // current hook.
- var queue = workInProgressHook.queue;
- var dispatch = queue.dispatch;
-
- if (renderPhaseUpdates !== null) {
- // Render phase updates are stored in a map of queue -> linked list
- var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
-
- if (firstRenderPhaseUpdate !== undefined) {
- renderPhaseUpdates.delete(queue);
- var newState = workInProgressHook.memoizedState;
- var update = firstRenderPhaseUpdate;
-
- do {
- // Process this render phase update. We don't have to check the
- // priority because it will always be the same as the current
- // render's.
- var action = update.action;
-
- {
- isInHookUserCodeInDev = true;
- }
-
- newState = reducer(newState, action);
-
- {
- isInHookUserCodeInDev = false;
- }
-
- update = update.next;
- } while (update !== null);
-
- workInProgressHook.memoizedState = newState;
- return [newState, dispatch];
- }
- }
-
- return [workInProgressHook.memoizedState, dispatch];
- } else {
- {
- isInHookUserCodeInDev = true;
- }
-
- var initialState;
-
- if (reducer === basicStateReducer) {
- // Special case for `useState`.
- initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
- } else {
- initialState = init !== undefined ? init(initialArg) : initialArg;
- }
-
- {
- isInHookUserCodeInDev = false;
- }
-
- workInProgressHook.memoizedState = initialState;
-
- var _queue = workInProgressHook.queue = {
- last: null,
- dispatch: null
- };
-
- var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);
-
- return [workInProgressHook.memoizedState, _dispatch];
- }
-}
-
-function useMemo(nextCreate, deps) {
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
-
- if (workInProgressHook !== null) {
- var prevState = workInProgressHook.memoizedState;
-
- if (prevState !== null) {
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
- }
-
- {
- isInHookUserCodeInDev = true;
- }
-
- var nextValue = nextCreate();
-
- {
- isInHookUserCodeInDev = false;
- }
-
- workInProgressHook.memoizedState = [nextValue, nextDeps];
- return nextValue;
-}
-
-function useRef(initialValue) {
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
- var previousRef = workInProgressHook.memoizedState;
-
- if (previousRef === null) {
- var ref = {
- current: initialValue
- };
-
- {
- Object.seal(ref);
- }
-
- workInProgressHook.memoizedState = ref;
- return ref;
- } else {
- return previousRef;
- }
-}
-
-function useLayoutEffect(create, inputs) {
- {
- currentHookNameInDev = 'useLayoutEffect';
-
- 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.');
- }
-}
-
-function dispatchAction(componentIdentity, queue, action) {
- if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
- {
- throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
- }
- }
-
- if (componentIdentity === currentlyRenderingComponent) {
- // This is a render phase update. Stash it in a lazily-created map of
- // queue -> linked list of updates. After this render pass, we'll restart
- // and apply the stashed updates on top of the work-in-progress hook.
- didScheduleRenderPhaseUpdate = true;
- var update = {
- action: action,
- next: null
- };
-
- if (renderPhaseUpdates === null) {
- renderPhaseUpdates = new Map();
- }
-
- var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
-
- if (firstRenderPhaseUpdate === undefined) {
- renderPhaseUpdates.set(queue, update);
- } else {
- // Append the update to the end of the list.
- var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
-
- while (lastRenderPhaseUpdate.next !== null) {
- lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
- }
-
- lastRenderPhaseUpdate.next = update;
- }
- }
-}
-
-function useCallback(callback, deps) {
- return useMemo(function () {
- return callback;
- }, deps);
-} // TODO Decide on how to implement this hook for server rendering.
-// If a mutation occurs during render, consider triggering a Suspense boundary
-// and falling back to client rendering.
-
-function useMutableSource(source, getSnapshot, subscribe) {
- resolveCurrentlyRenderingComponent();
- return getSnapshot(source._source);
-}
-
-function useDeferredValue(value) {
- resolveCurrentlyRenderingComponent();
- return value;
-}
-
-function useTransition() {
- resolveCurrentlyRenderingComponent();
-
- var startTransition = function (callback) {
- callback();
- };
-
- return [startTransition, false];
-}
-
-function useOpaqueIdentifier() {
- return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
-}
-
-function noop() {}
-
-var currentPartialRenderer = null;
-function setCurrentPartialRenderer(renderer) {
- currentPartialRenderer = renderer;
-}
-var Dispatcher = {
- readContext: readContext,
- useContext: useContext,
- useMemo: useMemo,
- useReducer: useReducer,
- useRef: useRef,
- useState: useState,
- useLayoutEffect: useLayoutEffect,
- useCallback: useCallback,
- // useImperativeHandle is not run in the server environment
- useImperativeHandle: noop,
- // Effects are not run in the server environment.
- useEffect: noop,
- // Debugging effect
- useDebugValue: noop,
- useDeferredValue: useDeferredValue,
- useTransition: useTransition,
- useOpaqueIdentifier: useOpaqueIdentifier,
- // Subscriptions are not setup in a server environment.
- useMutableSource: useMutableSource
-};
-
-var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
-var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
-var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
-var Namespaces = {
- html: HTML_NAMESPACE,
- mathml: MATH_NAMESPACE,
- svg: SVG_NAMESPACE
-}; // Assumes there is no parent namespace.
-
-function getIntrinsicNamespace(type) {
- switch (type) {
- case 'svg':
- return SVG_NAMESPACE;
-
- case 'math':
- return MATH_NAMESPACE;
-
- default:
- return HTML_NAMESPACE;
- }
-}
-function getChildNamespace(parentNamespace, type) {
- if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
- // No (or default) parent namespace: potential entry point.
- return getIntrinsicNamespace(type);
- }
-
- if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
- // We're leaving SVG.
- return HTML_NAMESPACE;
- } // By default, pass namespace below.
-
-
- return parentNamespace;
-}
-
-var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
-};
-function checkControlledValueProps(tagName, props) {
- {
- if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
- 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`.');
- }
-
- if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
- 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`.');
- }
- }
-}
-
-// For HTML, certain tags should omit their close tag. We keep a list for
-// those special-case tags.
-var omittedCloseTags = {
- area: true,
- base: true,
- br: true,
- col: true,
- embed: true,
- hr: true,
- img: true,
- input: true,
- keygen: true,
- link: true,
- meta: true,
- param: true,
- source: true,
- track: true,
- wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
-
-};
-
-// `omittedCloseTags` except that `menuitem` should still have its closing tag.
-
-var voidElementTags = _assign({
- menuitem: true
-}, omittedCloseTags);
-
-var HTML = '__html';
-
-function assertValidProps(tag, props) {
- if (!props) {
- return;
- } // Note the use of `==` which checks for null or undefined.
-
-
- if (voidElementTags[tag]) {
- if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
- }
- }
- }
-
- if (props.dangerouslySetInnerHTML != null) {
- if (!(props.children == null)) {
- {
- throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
- }
- }
-
- if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
- {
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
- }
- }
- }
-
- {
- if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
- 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.');
- }
- }
-
- if (!(props.style == null || typeof props.style === 'object')) {
- {
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
- }
- }
-}
-
-/**
- * CSS properties which accept numbers but are not in units of "px".
- */
-var isUnitlessNumber = {
- animationIterationCount: true,
- borderImageOutset: true,
- borderImageSlice: true,
- borderImageWidth: true,
- boxFlex: true,
- boxFlexGroup: true,
- boxOrdinalGroup: true,
- columnCount: true,
- columns: true,
- flex: true,
- flexGrow: true,
- flexPositive: true,
- flexShrink: true,
- flexNegative: true,
- flexOrder: true,
- gridArea: true,
- gridRow: true,
- gridRowEnd: true,
- gridRowSpan: true,
- gridRowStart: true,
- gridColumn: true,
- gridColumnEnd: true,
- gridColumnSpan: true,
- gridColumnStart: true,
- fontWeight: true,
- lineClamp: true,
- lineHeight: true,
- opacity: true,
- order: true,
- orphans: true,
- tabSize: true,
- widows: true,
- zIndex: true,
- zoom: true,
- // SVG-related properties
- fillOpacity: true,
- floodOpacity: true,
- stopOpacity: true,
- strokeDasharray: true,
- strokeDashoffset: true,
- strokeMiterlimit: true,
- strokeOpacity: true,
- strokeWidth: true
-};
-/**
- * @param {string} prefix vendor-specific prefix, eg: Webkit
- * @param {string} key style name, eg: transitionDuration
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
- * WebkitTransitionDuration
- */
-
-function prefixKey(prefix, key) {
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
-}
-/**
- * Support style names that may come passed in prefixed by adding permutations
- * of vendor prefixes.
- */
-
-
-var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
-// infinite loop, because it iterates over the newly added props too.
-
-Object.keys(isUnitlessNumber).forEach(function (prop) {
- prefixes.forEach(function (prefix) {
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
- });
-});
-
-/**
- * Convert a value into the proper css writable value. The style name `name`
- * should be logical (no hyphens), as specified
- * in `CSSProperty.isUnitlessNumber`.
- *
- * @param {string} name CSS property name such as `topMargin`.
- * @param {*} value CSS property value such as `10px`.
- * @return {string} Normalized style value with dimensions applied.
- */
-
-function dangerousStyleValue(name, value, isCustomProperty) {
- // Note that we've removed escapeTextForBrowser() calls here since the
- // whole string will be escaped when the attribute is injected into
- // the markup. If you provide unsafe user data here they can inject
- // arbitrary CSS which may be problematic (I couldn't repro this):
- // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
- // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
- // This is not an XSS hole but instead a potential CSS injection issue
- // which has lead to a greater discussion about how we're going to
- // trust URLs moving forward. See #2115901
- var isEmpty = value == null || typeof value === 'boolean' || value === '';
-
- if (isEmpty) {
- return '';
- }
-
- if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
- return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
- }
-
- return ('' + value).trim();
-}
-
-var uppercasePattern = /([A-Z])/g;
-var msPattern = /^ms-/;
-/**
- * Hyphenates a camelcased CSS property name, for example:
- *
- * > hyphenateStyleName('backgroundColor')
- * < "background-color"
- * > hyphenateStyleName('MozTransition')
- * < "-moz-transition"
- * > hyphenateStyleName('msTransition')
- * < "-ms-transition"
- *
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
- * is converted to `-ms-`.
- */
-
-function hyphenateStyleName(name) {
- return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
-}
-
-function isCustomComponent(tagName, props) {
- if (tagName.indexOf('-') === -1) {
- return typeof props.is === 'string';
- }
-
- switch (tagName) {
- // These are reserved SVG and MathML elements.
- // We don't mind this list too much because we expect it to never grow.
- // The alternative is to track the namespace in a few places which is convoluted.
- // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
- case 'annotation-xml':
- case 'color-profile':
- case 'font-face':
- case 'font-face-src':
- case 'font-face-uri':
- case 'font-face-format':
- case 'font-face-name':
- case 'missing-glyph':
- return false;
-
- default:
- return true;
- }
-}
-
-var warnValidStyle = function () {};
-
-{
- // 'msTransform' is correct, but the other prefixes should be capitalized
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
- var msPattern$1 = /^-ms-/;
- var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
-
- var badStyleValueWithSemicolonPattern = /;\s*$/;
- var warnedStyleNames = {};
- var warnedStyleValues = {};
- var warnedForNaNValue = false;
- var warnedForInfinityValue = false;
-
- var camelize = function (string) {
- return string.replace(hyphenPattern, function (_, character) {
- return character.toUpperCase();
- });
- };
-
- var warnHyphenatedStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
- // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
- // is converted to lowercase `ms`.
- camelize(name.replace(msPattern$1, 'ms-')));
- };
-
- var warnBadVendoredStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
- };
-
- var warnStyleValueWithSemicolon = function (name, value) {
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
- return;
- }
-
- warnedStyleValues[value] = true;
-
- error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
- };
-
- var warnStyleValueIsNaN = function (name, value) {
- if (warnedForNaNValue) {
- return;
- }
-
- warnedForNaNValue = true;
-
- error('`NaN` is an invalid value for the `%s` css style property.', name);
- };
-
- var warnStyleValueIsInfinity = function (name, value) {
- if (warnedForInfinityValue) {
- return;
- }
-
- warnedForInfinityValue = true;
-
- error('`Infinity` is an invalid value for the `%s` css style property.', name);
- };
-
- warnValidStyle = function (name, value) {
- if (name.indexOf('-') > -1) {
- warnHyphenatedStyleName(name);
- } else if (badVendoredStyleNamePattern.test(name)) {
- warnBadVendoredStyleName(name);
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
- warnStyleValueWithSemicolon(name, value);
- }
-
- if (typeof value === 'number') {
- if (isNaN(value)) {
- warnStyleValueIsNaN(name, value);
- } else if (!isFinite(value)) {
- warnStyleValueIsInfinity(name, value);
- }
- }
- };
-}
-
-var warnValidStyle$1 = warnValidStyle;
-
-var ariaProperties = {
- 'aria-current': 0,
- // state
- 'aria-details': 0,
- 'aria-disabled': 0,
- // state
- 'aria-hidden': 0,
- // state
- 'aria-invalid': 0,
- // state
- 'aria-keyshortcuts': 0,
- 'aria-label': 0,
- 'aria-roledescription': 0,
- // Widget Attributes
- 'aria-autocomplete': 0,
- 'aria-checked': 0,
- 'aria-expanded': 0,
- 'aria-haspopup': 0,
- 'aria-level': 0,
- 'aria-modal': 0,
- 'aria-multiline': 0,
- 'aria-multiselectable': 0,
- 'aria-orientation': 0,
- 'aria-placeholder': 0,
- 'aria-pressed': 0,
- 'aria-readonly': 0,
- 'aria-required': 0,
- 'aria-selected': 0,
- 'aria-sort': 0,
- 'aria-valuemax': 0,
- 'aria-valuemin': 0,
- 'aria-valuenow': 0,
- 'aria-valuetext': 0,
- // Live Region Attributes
- 'aria-atomic': 0,
- 'aria-busy': 0,
- 'aria-live': 0,
- 'aria-relevant': 0,
- // Drag-and-Drop Attributes
- 'aria-dropeffect': 0,
- 'aria-grabbed': 0,
- // Relationship Attributes
- 'aria-activedescendant': 0,
- 'aria-colcount': 0,
- 'aria-colindex': 0,
- 'aria-colspan': 0,
- 'aria-controls': 0,
- 'aria-describedby': 0,
- 'aria-errormessage': 0,
- 'aria-flowto': 0,
- 'aria-labelledby': 0,
- 'aria-owns': 0,
- 'aria-posinset': 0,
- 'aria-rowcount': 0,
- 'aria-rowindex': 0,
- 'aria-rowspan': 0,
- 'aria-setsize': 0
-};
-
-var warnedProperties = {};
-var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
-var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
-var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
-
-function validateProperty(tagName, name) {
- {
- if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
- return true;
- }
-
- if (rARIACamel.test(name)) {
- var ariaName = 'aria-' + name.slice(4).toLowerCase();
- var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (correctName == null) {
- error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
-
- warnedProperties[name] = true;
- return true;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== correctName) {
- error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
-
- if (rARIA.test(name)) {
- var lowerCasedName = name.toLowerCase();
- var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (standardName == null) {
- warnedProperties[name] = true;
- return false;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== standardName) {
- error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
- }
-
- return true;
-}
-
-function warnInvalidARIAProps(type, props) {
- {
- var invalidProps = [];
-
- for (var key in props) {
- var isValid = validateProperty(type, key);
-
- if (!isValid) {
- invalidProps.push(key);
- }
- }
-
- var unknownPropString = invalidProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- } else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- }
- }
-}
-
-function validateProperties(type, props) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnInvalidARIAProps(type, props);
-}
-
-var didWarnValueNull = false;
-function validateProperties$1(type, props) {
- {
- if (type !== 'input' && type !== 'textarea' && type !== 'select') {
- return;
- }
-
- if (props != null && props.value === null && !didWarnValueNull) {
- didWarnValueNull = true;
-
- if (type === 'select' && props.multiple) {
- 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);
- } else {
- error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
- }
- }
- }
-}
-
-// When adding attributes to the HTML or SVG allowed attribute list, be sure to
-// also add them to this module to ensure casing and incorrect name
-// warnings.
-var possibleStandardNames = {
- // HTML
- accept: 'accept',
- acceptcharset: 'acceptCharset',
- 'accept-charset': 'acceptCharset',
- accesskey: 'accessKey',
- action: 'action',
- allowfullscreen: 'allowFullScreen',
- alt: 'alt',
- as: 'as',
- async: 'async',
- autocapitalize: 'autoCapitalize',
- autocomplete: 'autoComplete',
- autocorrect: 'autoCorrect',
- autofocus: 'autoFocus',
- autoplay: 'autoPlay',
- autosave: 'autoSave',
- capture: 'capture',
- cellpadding: 'cellPadding',
- cellspacing: 'cellSpacing',
- challenge: 'challenge',
- charset: 'charSet',
- checked: 'checked',
- children: 'children',
- cite: 'cite',
- class: 'className',
- classid: 'classID',
- classname: 'className',
- cols: 'cols',
- colspan: 'colSpan',
- content: 'content',
- contenteditable: 'contentEditable',
- contextmenu: 'contextMenu',
- controls: 'controls',
- controlslist: 'controlsList',
- coords: 'coords',
- crossorigin: 'crossOrigin',
- dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
- data: 'data',
- datetime: 'dateTime',
- default: 'default',
- defaultchecked: 'defaultChecked',
- defaultvalue: 'defaultValue',
- defer: 'defer',
- dir: 'dir',
- disabled: 'disabled',
- disablepictureinpicture: 'disablePictureInPicture',
- disableremoteplayback: 'disableRemotePlayback',
- download: 'download',
- draggable: 'draggable',
- enctype: 'encType',
- enterkeyhint: 'enterKeyHint',
- for: 'htmlFor',
- form: 'form',
- formmethod: 'formMethod',
- formaction: 'formAction',
- formenctype: 'formEncType',
- formnovalidate: 'formNoValidate',
- formtarget: 'formTarget',
- frameborder: 'frameBorder',
- headers: 'headers',
- height: 'height',
- hidden: 'hidden',
- high: 'high',
- href: 'href',
- hreflang: 'hrefLang',
- htmlfor: 'htmlFor',
- httpequiv: 'httpEquiv',
- 'http-equiv': 'httpEquiv',
- icon: 'icon',
- id: 'id',
- innerhtml: 'innerHTML',
- inputmode: 'inputMode',
- integrity: 'integrity',
- is: 'is',
- itemid: 'itemID',
- itemprop: 'itemProp',
- itemref: 'itemRef',
- itemscope: 'itemScope',
- itemtype: 'itemType',
- keyparams: 'keyParams',
- keytype: 'keyType',
- kind: 'kind',
- label: 'label',
- lang: 'lang',
- list: 'list',
- loop: 'loop',
- low: 'low',
- manifest: 'manifest',
- marginwidth: 'marginWidth',
- marginheight: 'marginHeight',
- max: 'max',
- maxlength: 'maxLength',
- media: 'media',
- mediagroup: 'mediaGroup',
- method: 'method',
- min: 'min',
- minlength: 'minLength',
- multiple: 'multiple',
- muted: 'muted',
- name: 'name',
- nomodule: 'noModule',
- nonce: 'nonce',
- novalidate: 'noValidate',
- open: 'open',
- optimum: 'optimum',
- pattern: 'pattern',
- placeholder: 'placeholder',
- playsinline: 'playsInline',
- poster: 'poster',
- preload: 'preload',
- profile: 'profile',
- radiogroup: 'radioGroup',
- readonly: 'readOnly',
- referrerpolicy: 'referrerPolicy',
- rel: 'rel',
- required: 'required',
- reversed: 'reversed',
- role: 'role',
- rows: 'rows',
- rowspan: 'rowSpan',
- sandbox: 'sandbox',
- scope: 'scope',
- scoped: 'scoped',
- scrolling: 'scrolling',
- seamless: 'seamless',
- selected: 'selected',
- shape: 'shape',
- size: 'size',
- sizes: 'sizes',
- span: 'span',
- spellcheck: 'spellCheck',
- src: 'src',
- srcdoc: 'srcDoc',
- srclang: 'srcLang',
- srcset: 'srcSet',
- start: 'start',
- step: 'step',
- style: 'style',
- summary: 'summary',
- tabindex: 'tabIndex',
- target: 'target',
- title: 'title',
- type: 'type',
- usemap: 'useMap',
- value: 'value',
- width: 'width',
- wmode: 'wmode',
- wrap: 'wrap',
- // SVG
- about: 'about',
- accentheight: 'accentHeight',
- 'accent-height': 'accentHeight',
- accumulate: 'accumulate',
- additive: 'additive',
- alignmentbaseline: 'alignmentBaseline',
- 'alignment-baseline': 'alignmentBaseline',
- allowreorder: 'allowReorder',
- alphabetic: 'alphabetic',
- amplitude: 'amplitude',
- arabicform: 'arabicForm',
- 'arabic-form': 'arabicForm',
- ascent: 'ascent',
- attributename: 'attributeName',
- attributetype: 'attributeType',
- autoreverse: 'autoReverse',
- azimuth: 'azimuth',
- basefrequency: 'baseFrequency',
- baselineshift: 'baselineShift',
- 'baseline-shift': 'baselineShift',
- baseprofile: 'baseProfile',
- bbox: 'bbox',
- begin: 'begin',
- bias: 'bias',
- by: 'by',
- calcmode: 'calcMode',
- capheight: 'capHeight',
- 'cap-height': 'capHeight',
- clip: 'clip',
- clippath: 'clipPath',
- 'clip-path': 'clipPath',
- clippathunits: 'clipPathUnits',
- cliprule: 'clipRule',
- 'clip-rule': 'clipRule',
- color: 'color',
- colorinterpolation: 'colorInterpolation',
- 'color-interpolation': 'colorInterpolation',
- colorinterpolationfilters: 'colorInterpolationFilters',
- 'color-interpolation-filters': 'colorInterpolationFilters',
- colorprofile: 'colorProfile',
- 'color-profile': 'colorProfile',
- colorrendering: 'colorRendering',
- 'color-rendering': 'colorRendering',
- contentscripttype: 'contentScriptType',
- contentstyletype: 'contentStyleType',
- cursor: 'cursor',
- cx: 'cx',
- cy: 'cy',
- d: 'd',
- datatype: 'datatype',
- decelerate: 'decelerate',
- descent: 'descent',
- diffuseconstant: 'diffuseConstant',
- direction: 'direction',
- display: 'display',
- divisor: 'divisor',
- dominantbaseline: 'dominantBaseline',
- 'dominant-baseline': 'dominantBaseline',
- dur: 'dur',
- dx: 'dx',
- dy: 'dy',
- edgemode: 'edgeMode',
- elevation: 'elevation',
- enablebackground: 'enableBackground',
- 'enable-background': 'enableBackground',
- end: 'end',
- exponent: 'exponent',
- externalresourcesrequired: 'externalResourcesRequired',
- fill: 'fill',
- fillopacity: 'fillOpacity',
- 'fill-opacity': 'fillOpacity',
- fillrule: 'fillRule',
- 'fill-rule': 'fillRule',
- filter: 'filter',
- filterres: 'filterRes',
- filterunits: 'filterUnits',
- floodopacity: 'floodOpacity',
- 'flood-opacity': 'floodOpacity',
- floodcolor: 'floodColor',
- 'flood-color': 'floodColor',
- focusable: 'focusable',
- fontfamily: 'fontFamily',
- 'font-family': 'fontFamily',
- fontsize: 'fontSize',
- 'font-size': 'fontSize',
- fontsizeadjust: 'fontSizeAdjust',
- 'font-size-adjust': 'fontSizeAdjust',
- fontstretch: 'fontStretch',
- 'font-stretch': 'fontStretch',
- fontstyle: 'fontStyle',
- 'font-style': 'fontStyle',
- fontvariant: 'fontVariant',
- 'font-variant': 'fontVariant',
- fontweight: 'fontWeight',
- 'font-weight': 'fontWeight',
- format: 'format',
- from: 'from',
- fx: 'fx',
- fy: 'fy',
- g1: 'g1',
- g2: 'g2',
- glyphname: 'glyphName',
- 'glyph-name': 'glyphName',
- glyphorientationhorizontal: 'glyphOrientationHorizontal',
- 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
- glyphorientationvertical: 'glyphOrientationVertical',
- 'glyph-orientation-vertical': 'glyphOrientationVertical',
- glyphref: 'glyphRef',
- gradienttransform: 'gradientTransform',
- gradientunits: 'gradientUnits',
- hanging: 'hanging',
- horizadvx: 'horizAdvX',
- 'horiz-adv-x': 'horizAdvX',
- horizoriginx: 'horizOriginX',
- 'horiz-origin-x': 'horizOriginX',
- ideographic: 'ideographic',
- imagerendering: 'imageRendering',
- 'image-rendering': 'imageRendering',
- in2: 'in2',
- in: 'in',
- inlist: 'inlist',
- intercept: 'intercept',
- k1: 'k1',
- k2: 'k2',
- k3: 'k3',
- k4: 'k4',
- k: 'k',
- kernelmatrix: 'kernelMatrix',
- kernelunitlength: 'kernelUnitLength',
- kerning: 'kerning',
- keypoints: 'keyPoints',
- keysplines: 'keySplines',
- keytimes: 'keyTimes',
- lengthadjust: 'lengthAdjust',
- letterspacing: 'letterSpacing',
- 'letter-spacing': 'letterSpacing',
- lightingcolor: 'lightingColor',
- 'lighting-color': 'lightingColor',
- limitingconeangle: 'limitingConeAngle',
- local: 'local',
- markerend: 'markerEnd',
- 'marker-end': 'markerEnd',
- markerheight: 'markerHeight',
- markermid: 'markerMid',
- 'marker-mid': 'markerMid',
- markerstart: 'markerStart',
- 'marker-start': 'markerStart',
- markerunits: 'markerUnits',
- markerwidth: 'markerWidth',
- mask: 'mask',
- maskcontentunits: 'maskContentUnits',
- maskunits: 'maskUnits',
- mathematical: 'mathematical',
- mode: 'mode',
- numoctaves: 'numOctaves',
- offset: 'offset',
- opacity: 'opacity',
- operator: 'operator',
- order: 'order',
- orient: 'orient',
- orientation: 'orientation',
- origin: 'origin',
- overflow: 'overflow',
- overlineposition: 'overlinePosition',
- 'overline-position': 'overlinePosition',
- overlinethickness: 'overlineThickness',
- 'overline-thickness': 'overlineThickness',
- paintorder: 'paintOrder',
- 'paint-order': 'paintOrder',
- panose1: 'panose1',
- 'panose-1': 'panose1',
- pathlength: 'pathLength',
- patterncontentunits: 'patternContentUnits',
- patterntransform: 'patternTransform',
- patternunits: 'patternUnits',
- pointerevents: 'pointerEvents',
- 'pointer-events': 'pointerEvents',
- points: 'points',
- pointsatx: 'pointsAtX',
- pointsaty: 'pointsAtY',
- pointsatz: 'pointsAtZ',
- prefix: 'prefix',
- preservealpha: 'preserveAlpha',
- preserveaspectratio: 'preserveAspectRatio',
- primitiveunits: 'primitiveUnits',
- property: 'property',
- r: 'r',
- radius: 'radius',
- refx: 'refX',
- refy: 'refY',
- renderingintent: 'renderingIntent',
- 'rendering-intent': 'renderingIntent',
- repeatcount: 'repeatCount',
- repeatdur: 'repeatDur',
- requiredextensions: 'requiredExtensions',
- requiredfeatures: 'requiredFeatures',
- resource: 'resource',
- restart: 'restart',
- result: 'result',
- results: 'results',
- rotate: 'rotate',
- rx: 'rx',
- ry: 'ry',
- scale: 'scale',
- security: 'security',
- seed: 'seed',
- shaperendering: 'shapeRendering',
- 'shape-rendering': 'shapeRendering',
- slope: 'slope',
- spacing: 'spacing',
- specularconstant: 'specularConstant',
- specularexponent: 'specularExponent',
- speed: 'speed',
- spreadmethod: 'spreadMethod',
- startoffset: 'startOffset',
- stddeviation: 'stdDeviation',
- stemh: 'stemh',
- stemv: 'stemv',
- stitchtiles: 'stitchTiles',
- stopcolor: 'stopColor',
- 'stop-color': 'stopColor',
- stopopacity: 'stopOpacity',
- 'stop-opacity': 'stopOpacity',
- strikethroughposition: 'strikethroughPosition',
- 'strikethrough-position': 'strikethroughPosition',
- strikethroughthickness: 'strikethroughThickness',
- 'strikethrough-thickness': 'strikethroughThickness',
- string: 'string',
- stroke: 'stroke',
- strokedasharray: 'strokeDasharray',
- 'stroke-dasharray': 'strokeDasharray',
- strokedashoffset: 'strokeDashoffset',
- 'stroke-dashoffset': 'strokeDashoffset',
- strokelinecap: 'strokeLinecap',
- 'stroke-linecap': 'strokeLinecap',
- strokelinejoin: 'strokeLinejoin',
- 'stroke-linejoin': 'strokeLinejoin',
- strokemiterlimit: 'strokeMiterlimit',
- 'stroke-miterlimit': 'strokeMiterlimit',
- strokewidth: 'strokeWidth',
- 'stroke-width': 'strokeWidth',
- strokeopacity: 'strokeOpacity',
- 'stroke-opacity': 'strokeOpacity',
- suppresscontenteditablewarning: 'suppressContentEditableWarning',
- suppresshydrationwarning: 'suppressHydrationWarning',
- surfacescale: 'surfaceScale',
- systemlanguage: 'systemLanguage',
- tablevalues: 'tableValues',
- targetx: 'targetX',
- targety: 'targetY',
- textanchor: 'textAnchor',
- 'text-anchor': 'textAnchor',
- textdecoration: 'textDecoration',
- 'text-decoration': 'textDecoration',
- textlength: 'textLength',
- textrendering: 'textRendering',
- 'text-rendering': 'textRendering',
- to: 'to',
- transform: 'transform',
- typeof: 'typeof',
- u1: 'u1',
- u2: 'u2',
- underlineposition: 'underlinePosition',
- 'underline-position': 'underlinePosition',
- underlinethickness: 'underlineThickness',
- 'underline-thickness': 'underlineThickness',
- unicode: 'unicode',
- unicodebidi: 'unicodeBidi',
- 'unicode-bidi': 'unicodeBidi',
- unicoderange: 'unicodeRange',
- 'unicode-range': 'unicodeRange',
- unitsperem: 'unitsPerEm',
- 'units-per-em': 'unitsPerEm',
- unselectable: 'unselectable',
- valphabetic: 'vAlphabetic',
- 'v-alphabetic': 'vAlphabetic',
- values: 'values',
- vectoreffect: 'vectorEffect',
- 'vector-effect': 'vectorEffect',
- version: 'version',
- vertadvy: 'vertAdvY',
- 'vert-adv-y': 'vertAdvY',
- vertoriginx: 'vertOriginX',
- 'vert-origin-x': 'vertOriginX',
- vertoriginy: 'vertOriginY',
- 'vert-origin-y': 'vertOriginY',
- vhanging: 'vHanging',
- 'v-hanging': 'vHanging',
- videographic: 'vIdeographic',
- 'v-ideographic': 'vIdeographic',
- viewbox: 'viewBox',
- viewtarget: 'viewTarget',
- visibility: 'visibility',
- vmathematical: 'vMathematical',
- 'v-mathematical': 'vMathematical',
- vocab: 'vocab',
- widths: 'widths',
- wordspacing: 'wordSpacing',
- 'word-spacing': 'wordSpacing',
- writingmode: 'writingMode',
- 'writing-mode': 'writingMode',
- x1: 'x1',
- x2: 'x2',
- x: 'x',
- xchannelselector: 'xChannelSelector',
- xheight: 'xHeight',
- 'x-height': 'xHeight',
- xlinkactuate: 'xlinkActuate',
- 'xlink:actuate': 'xlinkActuate',
- xlinkarcrole: 'xlinkArcrole',
- 'xlink:arcrole': 'xlinkArcrole',
- xlinkhref: 'xlinkHref',
- 'xlink:href': 'xlinkHref',
- xlinkrole: 'xlinkRole',
- 'xlink:role': 'xlinkRole',
- xlinkshow: 'xlinkShow',
- 'xlink:show': 'xlinkShow',
- xlinktitle: 'xlinkTitle',
- 'xlink:title': 'xlinkTitle',
- xlinktype: 'xlinkType',
- 'xlink:type': 'xlinkType',
- xmlbase: 'xmlBase',
- 'xml:base': 'xmlBase',
- xmllang: 'xmlLang',
- 'xml:lang': 'xmlLang',
- xmlns: 'xmlns',
- 'xml:space': 'xmlSpace',
- xmlnsxlink: 'xmlnsXlink',
- 'xmlns:xlink': 'xmlnsXlink',
- xmlspace: 'xmlSpace',
- y1: 'y1',
- y2: 'y2',
- y: 'y',
- ychannelselector: 'yChannelSelector',
- z: 'z',
- zoomandpan: 'zoomAndPan'
-};
-
-var validateProperty$1 = function () {};
-
-{
- var warnedProperties$1 = {};
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
- var EVENT_NAME_REGEX = /^on./;
- var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
- var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
-
- validateProperty$1 = function (tagName, name, value, eventRegistry) {
- if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
- return true;
- }
-
- var lowerCasedName = name.toLowerCase();
-
- if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
- 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.');
-
- warnedProperties$1[name] = true;
- return true;
- } // We can't rely on the event system being injected on the server.
-
-
- if (eventRegistry != null) {
- var registrationNameDependencies = eventRegistry.registrationNameDependencies,
- possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
-
- if (registrationNameDependencies.hasOwnProperty(name)) {
- return true;
- }
-
- var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
-
- if (registrationName != null) {
- error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (EVENT_NAME_REGEX.test(name)) {
- error('Unknown event handler property `%s`. It will be ignored.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (EVENT_NAME_REGEX.test(name)) {
- // If no event plugins have been injected, we are in a server environment.
- // So we can't tell if the event name is correct for sure, but we can filter
- // out known bad ones like `onclick`. We can't suggest a specific replacement though.
- if (INVALID_EVENT_NAME_REGEX.test(name)) {
- error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Let the ARIA attribute hook validate ARIA attributes
-
-
- if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
- return true;
- }
-
- if (lowerCasedName === 'innerhtml') {
- error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'aria') {
- error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
- error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'number' && isNaN(value)) {
- error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- var propertyInfo = getPropertyInfo(name);
- var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
-
- if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- var standardName = possibleStandardNames[lowerCasedName];
-
- if (standardName !== name) {
- error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (!isReserved && name !== lowerCasedName) {
- // Unknown attributes should have lowercase casing since that's how they
- // will be cased anyway with server rendering.
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- if (value) {
- 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);
- } else {
- 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);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Now that we've validated casing, do not validate
- // data types for reserved props
-
-
- if (isReserved) {
- return true;
- } // Warn when a known attribute is a bad type
-
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- warnedProperties$1[name] = true;
- return false;
- } // Warn when passing the strings 'false' or 'true' into a boolean prop
-
-
- if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- return true;
- };
-}
-
-var warnUnknownProperties = function (type, props, eventRegistry) {
- {
- var unknownProps = [];
-
- for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], eventRegistry);
-
- if (!isValid) {
- unknownProps.push(key);
- }
- }
-
- var unknownPropString = unknownProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (unknownProps.length === 1) {
- 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);
- } else if (unknownProps.length > 1) {
- 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);
- }
- }
-};
-
-function validateProperties$2(type, props, eventRegistry) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnUnknownProperties(type, props, eventRegistry);
-}
-
-var toArray = React.Children.toArray; // This is only used in DEV.
-// Each entry is `this.stack` from a currently executing renderer instance.
-// (There may be more than one because ReactDOMServer is reentrant).
-// Each stack is an array of frames which may contain nested stacks of elements.
-
-var currentDebugStacks = [];
-var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
-var ReactDebugCurrentFrame$1;
-var prevGetCurrentStackImpl = null;
-
-var getCurrentServerStackImpl = function () {
- return '';
-};
-
-var describeStackFrame = function (element) {
- return '';
-};
-
-var validatePropertiesInDevelopment = function (type, props) {};
-
-var pushCurrentDebugStack = function (stack) {};
-
-var pushElementToDebugStack = function (element) {};
-
-var popCurrentDebugStack = function () {};
-
-var hasWarnedAboutUsingContextAsConsumer = false;
-
-{
- ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
- validatePropertiesInDevelopment = function (type, props) {
- validateProperties(type, props);
- validateProperties$1(type, props);
- validateProperties$2(type, props, null);
- };
-
- describeStackFrame = function (element) {
- return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
- };
-
- pushCurrentDebugStack = function (stack) {
- currentDebugStacks.push(stack);
-
- if (currentDebugStacks.length === 1) {
- // We are entering a server renderer.
- // Remember the previous (e.g. client) global stack implementation.
- prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
- ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
- }
- };
-
- pushElementToDebugStack = function (element) {
- // For the innermost executing ReactDOMServer call,
- var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>),
-
- var frame = stack[stack.length - 1]; // and record that it has one more element associated with it.
-
- frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element
- // children and directly handle them in an inner loop instead of
- // creating separate frames for them.
- };
-
- popCurrentDebugStack = function () {
- currentDebugStacks.pop();
-
- if (currentDebugStacks.length === 0) {
- // We are exiting the server renderer.
- // Restore the previous (e.g. client) global stack implementation.
- ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
- prevGetCurrentStackImpl = null;
- }
- };
-
- getCurrentServerStackImpl = function () {
- if (currentDebugStacks.length === 0) {
- // Nothing is currently rendering.
- return '';
- } // ReactDOMServer is reentrant so there may be multiple calls at the same time.
- // Take the frames from the innermost call which is the last in the array.
-
-
- var frames = currentDebugStacks[currentDebugStacks.length - 1];
- var stack = ''; // Go through every frame in the stack from the innermost one.
-
- for (var i = frames.length - 1; i >= 0; i--) {
- var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it.
- // This is because single-child nesting doesn't create materialized frames.
- // Instead it would push them through `pushElementToDebugStack()`.
-
- var debugElementStack = frame.debugElementStack;
-
- for (var ii = debugElementStack.length - 1; ii >= 0; ii--) {
- stack += describeStackFrame(debugElementStack[ii]);
- }
- }
-
- return stack;
- };
-}
-
-var didWarnDefaultInputValue = false;
-var didWarnDefaultChecked = false;
-var didWarnDefaultSelectValue = false;
-var didWarnDefaultTextareaValue = false;
-var didWarnInvalidOptionChildren = false;
-var didWarnAboutNoopUpdateForComponent = {};
-var didWarnAboutBadClass = {};
-var didWarnAboutModulePatternComponent = {};
-var didWarnAboutDeprecatedWillMount = {};
-var didWarnAboutUndefinedDerivedState = {};
-var didWarnAboutUninitializedState = {};
-var valuePropNames = ['value', 'defaultValue'];
-var newlineEatingTags = {
- listing: true,
- pre: true,
- textarea: true
-}; // We accept any tag to be rendered but since this gets injected into arbitrary
-// HTML, we want to make sure that it's a safe tag.
-// http://www.w3.org/TR/REC-xml/#NT-Name
-
-var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
-
-var validatedTagCache = {};
-
-function validateDangerousTag(tag) {
- if (!validatedTagCache.hasOwnProperty(tag)) {
- if (!VALID_TAG_REGEX.test(tag)) {
- {
- throw Error( "Invalid tag: " + tag );
- }
- }
-
- validatedTagCache[tag] = true;
- }
-}
-
-var styleNameCache = {};
-
-var processStyleName = function (styleName) {
- if (styleNameCache.hasOwnProperty(styleName)) {
- return styleNameCache[styleName];
- }
-
- var result = hyphenateStyleName(styleName);
- styleNameCache[styleName] = result;
- return result;
-};
-
-function createMarkupForStyles(styles) {
- var serialized = '';
- var delimiter = '';
-
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
-
- var isCustomProperty = styleName.indexOf('--') === 0;
- var styleValue = styles[styleName];
-
- {
- if (!isCustomProperty) {
- warnValidStyle$1(styleName, styleValue);
- }
- }
-
- if (styleValue != null) {
- serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':';
- serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
- delimiter = ';';
- }
- }
-
- return serialized || null;
-}
-
-function warnNoop(publicInstance, callerName) {
- {
- var _constructor = publicInstance.constructor;
- var componentName = _constructor && getComponentName(_constructor) || 'ReactClass';
- var warningKey = componentName + '.' + callerName;
-
- if (didWarnAboutNoopUpdateForComponent[warningKey]) {
- return;
- }
-
- 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);
-
- didWarnAboutNoopUpdateForComponent[warningKey] = true;
- }
-}
-
-function shouldConstruct$1(Component) {
- return Component.prototype && Component.prototype.isReactComponent;
-}
-
-function getNonChildrenInnerMarkup(props) {
- var innerHTML = props.dangerouslySetInnerHTML;
-
- if (innerHTML != null) {
- if (innerHTML.__html != null) {
- return innerHTML.__html;
- }
- } else {
- var content = props.children;
-
- if (typeof content === 'string' || typeof content === 'number') {
- return escapeTextForBrowser(content);
- }
- }
-
- return null;
-}
-
-function flattenTopLevelChildren(children) {
- if (!React.isValidElement(children)) {
- return toArray(children);
- }
-
- var element = children;
-
- if (element.type !== REACT_FRAGMENT_TYPE) {
- return [element];
- }
-
- var fragmentChildren = element.props.children;
-
- if (!React.isValidElement(fragmentChildren)) {
- return toArray(fragmentChildren);
- }
-
- var fragmentChildElement = fragmentChildren;
- return [fragmentChildElement];
-}
-
-function flattenOptionChildren(children) {
- if (children === undefined || children === null) {
- return children;
- }
-
- var content = ''; // Flatten children and warn if they aren't strings or numbers;
- // invalid types are ignored.
-
- React.Children.forEach(children, function (child) {
- if (child == null) {
- return;
- }
-
- content += child;
-
- {
- if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
- didWarnInvalidOptionChildren = true;
-
- error('Only strings and numbers are supported as <option> children.');
- }
- }
- });
- return content;
-}
-
-var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
-var STYLE = 'style';
-var RESERVED_PROPS = {
- children: null,
- dangerouslySetInnerHTML: null,
- suppressContentEditableWarning: null,
- suppressHydrationWarning: null
-};
-
-function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
- var ret = '<' + tagVerbatim;
- var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
-
- for (var propKey in props) {
- if (!hasOwnProperty$2.call(props, propKey)) {
- continue;
- }
-
- var propValue = props[propKey];
-
- if (propValue == null) {
- continue;
- }
-
- if (propKey === STYLE) {
- propValue = createMarkupForStyles(propValue);
- }
-
- var markup = null;
-
- if (isCustomComponent$1) {
- if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
- markup = createMarkupForCustomAttribute(propKey, propValue);
- }
- } else {
- markup = createMarkupForProperty(propKey, propValue);
- }
-
- if (markup) {
- ret += ' ' + markup;
- }
- } // For static pages, no need to put React ID and checksum. Saves lots of
- // bytes.
-
-
- if (makeStaticMarkup) {
- return ret;
- }
-
- if (isRootElement) {
- ret += ' ' + createMarkupForRoot();
- }
-
- return ret;
-}
-
-function validateRenderResult(child, type) {
- if (child === undefined) {
- {
- {
- throw Error( (getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
- }
- }
- }
-}
-
-function resolve(child, context, threadID) {
- while (React.isValidElement(child)) {
- // Safe because we just checked it's an element.
- var element = child;
- var Component = element.type;
-
- {
- pushElementToDebugStack(element);
- }
-
- if (typeof Component !== 'function') {
- break;
- }
-
- processChild(element, Component);
- } // Extra closure so queue and replace can be captured properly
-
-
- function processChild(element, Component) {
- var isClass = shouldConstruct$1(Component);
- var publicContext = processContext(Component, context, threadID, isClass);
- var queue = [];
- var replace = false;
- var updater = {
- isMounted: function (publicInstance) {
- return false;
- },
- enqueueForceUpdate: function (publicInstance) {
- if (queue === null) {
- warnNoop(publicInstance, 'forceUpdate');
- return null;
- }
- },
- enqueueReplaceState: function (publicInstance, completeState) {
- replace = true;
- queue = [completeState];
- },
- enqueueSetState: function (publicInstance, currentPartialState) {
- if (queue === null) {
- warnNoop(publicInstance, 'setState');
- return null;
- }
-
- queue.push(currentPartialState);
- }
- };
- var inst;
-
- if (isClass) {
- inst = new Component(element.props, publicContext, updater);
-
- if (typeof Component.getDerivedStateFromProps === 'function') {
- {
- if (inst.state === null || inst.state === undefined) {
- var componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutUninitializedState[componentName]) {
- 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, inst.state === null ? 'null' : 'undefined', componentName);
-
- didWarnAboutUninitializedState[componentName] = true;
- }
- }
- }
-
- var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state);
-
- {
- if (partialState === undefined) {
- var _componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutUndefinedDerivedState[_componentName]) {
- error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
-
- didWarnAboutUndefinedDerivedState[_componentName] = true;
- }
- }
- }
-
- if (partialState != null) {
- inst.state = _assign({}, inst.state, partialState);
- }
- }
- } else {
- {
- if (Component.prototype && typeof Component.prototype.render === 'function') {
- var _componentName2 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutBadClass[_componentName2]) {
- 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.', _componentName2, _componentName2);
-
- didWarnAboutBadClass[_componentName2] = true;
- }
- }
- }
-
- var componentIdentity = {};
- prepareToUseHooks(componentIdentity);
- inst = Component(element.props, publicContext, updater);
- inst = finishHooks(Component, element.props, inst, publicContext);
-
- {
- // Support for module components is deprecated and is removed behind a flag.
- // Whether or not it would crash later, we want to show a good message in DEV first.
- if (inst != null && inst.render != null) {
- var _componentName3 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutModulePatternComponent[_componentName3]) {
- 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.', _componentName3, _componentName3, _componentName3);
-
- didWarnAboutModulePatternComponent[_componentName3] = true;
- }
- }
- } // If the flag is on, everything is assumed to be a function component.
- // Otherwise, we also do the unfortunate dynamic checks.
-
-
- if ( inst == null || inst.render == null) {
- child = inst;
- validateRenderResult(child, Component);
- return;
- }
- }
-
- inst.props = element.props;
- inst.context = publicContext;
- inst.updater = updater;
- var initialState = inst.state;
-
- if (initialState === undefined) {
- inst.state = initialState = null;
- }
-
- if (typeof inst.UNSAFE_componentWillMount === 'function' || typeof inst.componentWillMount === 'function') {
- if (typeof inst.componentWillMount === 'function') {
- {
- if ( inst.componentWillMount.__suppressDeprecationWarning !== true) {
- var _componentName4 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
- warn( // keep this warning in sync with ReactStrictModeWarning.js
- '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', _componentName4);
-
- didWarnAboutDeprecatedWillMount[_componentName4] = true;
- }
- }
- } // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
-
-
- if (typeof Component.getDerivedStateFromProps !== 'function') {
- inst.componentWillMount();
- }
- }
-
- if (typeof inst.UNSAFE_componentWillMount === 'function' && typeof Component.getDerivedStateFromProps !== 'function') {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
- inst.UNSAFE_componentWillMount();
- }
-
- if (queue.length) {
- var oldQueue = queue;
- var oldReplace = replace;
- queue = null;
- replace = false;
-
- if (oldReplace && oldQueue.length === 1) {
- inst.state = oldQueue[0];
- } else {
- var nextState = oldReplace ? oldQueue[0] : inst.state;
- var dontMutate = true;
-
- for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
- var partial = oldQueue[i];
-
- var _partialState = typeof partial === 'function' ? partial.call(inst, nextState, element.props, publicContext) : partial;
-
- if (_partialState != null) {
- if (dontMutate) {
- dontMutate = false;
- nextState = _assign({}, nextState, _partialState);
- } else {
- _assign(nextState, _partialState);
- }
- }
- }
-
- inst.state = nextState;
- }
- } else {
- queue = null;
- }
- }
-
- child = inst.render();
-
- {
- if (child === undefined && inst.render._isMockFunction) {
- // This is probably bad practice. Consider warning here and
- // deprecating this convenience.
- child = null;
- }
- }
-
- validateRenderResult(child, Component);
- var childContext;
-
- {
- if (typeof inst.getChildContext === 'function') {
- var _childContextTypes = Component.childContextTypes;
-
- if (typeof _childContextTypes === 'object') {
- childContext = inst.getChildContext();
-
- for (var contextKey in childContext) {
- if (!(contextKey in _childContextTypes)) {
- {
- throw Error( (getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
- }
- }
- }
- } else {
- {
- error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
- }
- }
- }
-
- if (childContext) {
- context = _assign({}, context, childContext);
- }
- }
- }
-
- return {
- child: child,
- context: context
- };
-}
-
-var ReactDOMServerRenderer = /*#__PURE__*/function () {
- // TODO: type this more strictly:
- // DEV-only
- function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
- var flatChildren = flattenTopLevelChildren(children);
- var topFrame = {
- type: null,
- // Assume all trees start in the HTML namespace (not totally true, but
- // this is what we did historically)
- domNamespace: Namespaces.html,
- children: flatChildren,
- childIndex: 0,
- context: emptyObject,
- footer: ''
- };
-
- {
- topFrame.debugElementStack = [];
- }
-
- this.threadID = allocThreadID();
- this.stack = [topFrame];
- this.exhausted = false;
- this.currentSelectValue = null;
- this.previousWasTextNode = false;
- this.makeStaticMarkup = makeStaticMarkup;
- this.suspenseDepth = 0; // Context (new API)
-
- this.contextIndex = -1;
- this.contextStack = [];
- this.contextValueStack = []; // useOpaqueIdentifier ID
-
- this.uniqueID = 0;
- this.identifierPrefix = options && options.identifierPrefix || '';
-
- {
- this.contextProviderStack = [];
- }
- }
-
- var _proto = ReactDOMServerRenderer.prototype;
-
- _proto.destroy = function destroy() {
- if (!this.exhausted) {
- this.exhausted = true;
- this.clearProviders();
- freeThreadID(this.threadID);
- }
- }
- /**
- * Note: We use just two stacks regardless of how many context providers you have.
- * Providers are always popped in the reverse order to how they were pushed
- * so we always know on the way down which provider you'll encounter next on the way up.
- * On the way down, we push the current provider, and its context value *before*
- * we mutated it, onto the stacks. Therefore, on the way up, we always know which
- * provider needs to be "restored" to which value.
- * https://github.com/facebook/react/pull/12985#issuecomment-396301248
- */
- ;
-
- _proto.pushProvider = function pushProvider(provider) {
- var index = ++this.contextIndex;
- var context = provider.type._context;
- var threadID = this.threadID;
- validateContextBounds(context, threadID);
- var previousValue = context[threadID]; // Remember which value to restore this context to on our way up.
-
- this.contextStack[index] = context;
- this.contextValueStack[index] = previousValue;
-
- {
- // Only used for push/pop mismatch warnings.
- this.contextProviderStack[index] = provider;
- } // Mutate the current value.
-
-
- context[threadID] = provider.props.value;
- };
-
- _proto.popProvider = function popProvider(provider) {
- var index = this.contextIndex;
-
- {
- if (index < 0 || provider !== this.contextProviderStack[index]) {
- error('Unexpected pop.');
- }
- }
-
- var context = this.contextStack[index];
- var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any`
- // because conceptually they are deletions--as long as we
- // promise to never access values beyond `this.contextIndex`.
-
- this.contextStack[index] = null;
- this.contextValueStack[index] = null;
-
- {
- this.contextProviderStack[index] = null;
- }
-
- this.contextIndex--; // Restore to the previous value we stored as we were walking down.
- // We've already verified that this context has been expanded to accommodate
- // this thread id, so we don't need to do it again.
-
- context[this.threadID] = previousValue;
- };
-
- _proto.clearProviders = function clearProviders() {
- // Restore any remaining providers on the stack to previous values
- for (var index = this.contextIndex; index >= 0; index--) {
- var context = this.contextStack[index];
- var previousValue = this.contextValueStack[index];
- context[this.threadID] = previousValue;
- }
- };
-
- _proto.read = function read(bytes) {
- if (this.exhausted) {
- return null;
- }
-
- var prevPartialRenderer = currentPartialRenderer;
- setCurrentPartialRenderer(this);
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = Dispatcher;
-
- try {
- // Markup generated within <Suspense> ends up buffered until we know
- // nothing in that boundary suspended
- var out = [''];
- var suspended = false;
-
- while (out[0].length < bytes) {
- if (this.stack.length === 0) {
- this.exhausted = true;
- freeThreadID(this.threadID);
- break;
- }
-
- var frame = this.stack[this.stack.length - 1];
-
- if (suspended || frame.childIndex >= frame.children.length) {
- var footer = frame.footer;
-
- if (footer !== '') {
- this.previousWasTextNode = false;
- }
-
- this.stack.pop();
-
- if (frame.type === 'select') {
- this.currentSelectValue = null;
- } else if (frame.type != null && frame.type.type != null && frame.type.type.$$typeof === REACT_PROVIDER_TYPE) {
- var provider = frame.type;
- this.popProvider(provider);
- } else if (frame.type === REACT_SUSPENSE_TYPE) {
- this.suspenseDepth--;
- var buffered = out.pop();
-
- if (suspended) {
- suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame
-
- var fallbackFrame = frame.fallbackFrame;
-
- if (!fallbackFrame) {
- {
- throw Error(true ? "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue." : formatProdErrorMessage(303));
- }
- }
-
- this.stack.push(fallbackFrame);
- out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
-
- continue;
- } else {
- out[this.suspenseDepth] += buffered;
- }
- } // Flush output
-
-
- out[this.suspenseDepth] += footer;
- continue;
- }
-
- var child = frame.children[frame.childIndex++];
- var outBuffer = '';
-
- if (true) {
- pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack.
-
- frame.debugElementStack.length = 0;
- }
-
- try {
- outBuffer += this.render(child, frame.context, frame.domNamespace);
- } catch (err) {
- if (err != null && typeof err.then === 'function') {
- if (enableSuspenseServerRenderer) {
- if (!(this.suspenseDepth > 0)) {
- {
- throw Error(true ? "A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." : formatProdErrorMessage(342));
- }
- }
-
- suspended = true;
- } else {
- if (!false) {
- {
- throw Error(true ? "ReactDOMServer does not yet support Suspense." : formatProdErrorMessage(294));
- }
- }
- }
- } else {
- throw err;
- }
- } finally {
- if (true) {
- popCurrentDebugStack();
- }
- }
-
- if (out.length <= this.suspenseDepth) {
- out.push('');
- }
-
- out[this.suspenseDepth] += outBuffer;
- }
-
- return out[0];
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- setCurrentPartialRenderer(prevPartialRenderer);
- resetHooksState();
- }
- };
-
- _proto.render = function render(child, context, parentNamespace) {
- if (typeof child === 'string' || typeof child === 'number') {
- var text = '' + child;
-
- if (text === '') {
- return '';
- }
-
- if (this.makeStaticMarkup) {
- return escapeTextForBrowser(text);
- }
-
- if (this.previousWasTextNode) {
- return '<!-- -->' + escapeTextForBrowser(text);
- }
-
- this.previousWasTextNode = true;
- return escapeTextForBrowser(text);
- } else {
- var nextChild;
-
- var _resolve = resolve(child, context, this.threadID);
-
- nextChild = _resolve.child;
- context = _resolve.context;
-
- if (nextChild === null || nextChild === false) {
- return '';
- } else if (!React.isValidElement(nextChild)) {
- if (nextChild != null && nextChild.$$typeof != null) {
- // Catch unexpected special types early.
- var $$typeof = nextChild.$$typeof;
-
- if (!($$typeof !== REACT_PORTAL_TYPE)) {
- {
- throw Error( "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render." );
- }
- } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
-
-
- {
- {
- throw Error( "Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue." );
- }
- }
- }
-
- var nextChildren = toArray(nextChild);
- var frame = {
- type: null,
- domNamespace: parentNamespace,
- children: nextChildren,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- frame.debugElementStack = [];
- }
-
- this.stack.push(frame);
- return '';
- } // Safe because we just checked it's an element.
-
-
- var nextElement = nextChild;
- var elementType = nextElement.type;
-
- if (typeof elementType === 'string') {
- return this.renderDOM(nextElement, context, parentNamespace);
- }
-
- switch (elementType) {
- // TODO: LegacyHidden acts the same as a fragment. This only works
- // because we currently assume that every instance of LegacyHidden is
- // accompanied by a host component wrapper. In the hidden mode, the host
- // component is given a `hidden` attribute, which ensures that the
- // initial HTML is not visible. To support the use of LegacyHidden as a
- // true fragment, without an extra DOM node, we would have to hide the
- // initial HTML in some other way.
- case REACT_LEGACY_HIDDEN_TYPE:
- case REACT_DEBUG_TRACING_MODE_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_SUSPENSE_LIST_TYPE:
- case REACT_FRAGMENT_TYPE:
- {
- var _nextChildren = toArray(nextChild.props.children);
-
- var _frame = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame.debugElementStack = [];
- }
-
- this.stack.push(_frame);
- return '';
- }
-
- case REACT_SUSPENSE_TYPE:
- {
- {
- {
- {
- throw Error( "ReactDOMServer does not yet support Suspense." );
- }
- }
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_SCOPE_TYPE:
- {
-
- {
- {
- throw Error( "ReactDOMServer does not yet support scope components." );
- }
- }
- }
- }
-
- if (typeof elementType === 'object' && elementType !== null) {
- switch (elementType.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- {
- var element = nextChild;
-
- var _nextChildren5;
-
- var componentIdentity = {};
- prepareToUseHooks(componentIdentity);
- _nextChildren5 = elementType.render(element.props, element.ref);
- _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
- _nextChildren5 = toArray(_nextChildren5);
- var _frame5 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren5,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame5.debugElementStack = [];
- }
-
- this.stack.push(_frame5);
- return '';
- }
-
- case REACT_MEMO_TYPE:
- {
- var _element = nextChild;
- var _nextChildren6 = [React.createElement(elementType.type, _assign({
- ref: _element.ref
- }, _element.props))];
- var _frame6 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren6,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame6.debugElementStack = [];
- }
-
- this.stack.push(_frame6);
- return '';
- }
-
- case REACT_PROVIDER_TYPE:
- {
- var provider = nextChild;
- var nextProps = provider.props;
-
- var _nextChildren7 = toArray(nextProps.children);
-
- var _frame7 = {
- type: provider,
- domNamespace: parentNamespace,
- children: _nextChildren7,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame7.debugElementStack = [];
- }
-
- this.pushProvider(provider);
- this.stack.push(_frame7);
- return '';
- }
-
- case REACT_CONTEXT_TYPE:
- {
- var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In
- // DEV mode, we create a separate object for Context.Consumer that acts
- // like a proxy to Context. This proxy object adds unnecessary code in PROD
- // so we use the old behaviour (Context.Consumer references Context) to
- // reduce size and overhead. The separate object references context via
- // a property called "_context", which also gives us the ability to check
- // in DEV mode if this property exists or not and warn if it does not.
-
- {
- if (reactContext._context === undefined) {
- // This may be because it's a Context (rather than a Consumer).
- // Or it may be because it's older React where they're the same thing.
- // We only want to warn if we're sure it's a new React.
- if (reactContext !== reactContext.Consumer) {
- if (!hasWarnedAboutUsingContextAsConsumer) {
- hasWarnedAboutUsingContextAsConsumer = true;
-
- error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
- }
- } else {
- reactContext = reactContext._context;
- }
- }
-
- var _nextProps = nextChild.props;
- var threadID = this.threadID;
- validateContextBounds(reactContext, threadID);
- var nextValue = reactContext[threadID];
-
- var _nextChildren8 = toArray(_nextProps.children(nextValue));
-
- var _frame8 = {
- type: nextChild,
- domNamespace: parentNamespace,
- children: _nextChildren8,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame8.debugElementStack = [];
- }
-
- this.stack.push(_frame8);
- return '';
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_FUNDAMENTAL_TYPE:
- {
-
- {
- {
- throw Error( "ReactDOMServer does not yet support the fundamental API." );
- }
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_LAZY_TYPE:
- {
- var _element2 = nextChild;
- var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the
- // suspense server-side renderer is enabled so synchronously
- // resolved constructors are supported.
-
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
- var result = init(payload);
- var _nextChildren10 = [React.createElement(result, _assign({
- ref: _element2.ref
- }, _element2.props))];
- var _frame10 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren10,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame10.debugElementStack = [];
- }
-
- this.stack.push(_frame10);
- return '';
- }
- }
- }
-
- var info = '';
-
- {
- var owner = nextElement._owner;
-
- if (elementType === undefined || typeof elementType === 'object' && elementType !== null && Object.keys(elementType).length === 0) {
- 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.';
- }
-
- var ownerName = owner ? getComponentName(owner) : null;
-
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
- }
-
- {
- {
- throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info );
- }
- }
- }
- };
-
- _proto.renderDOM = function renderDOM(element, context, parentNamespace) {
- var tag = element.type.toLowerCase();
- var namespace = parentNamespace;
-
- if (parentNamespace === Namespaces.html) {
- namespace = getIntrinsicNamespace(tag);
- }
-
- {
- if (namespace === Namespaces.html) {
- // Should this check be gated by parent namespace? Not sure we want to
- // allow <SVG> or <mATH>.
- if (tag !== element.type) {
- error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type);
- }
- }
- }
-
- validateDangerousTag(tag);
- var props = element.props;
-
- if (tag === 'input') {
- {
- checkControlledValueProps('input', props);
-
- if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
- 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);
-
- didWarnDefaultChecked = true;
- }
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
- 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);
-
- didWarnDefaultInputValue = true;
- }
- }
-
- props = _assign({
- type: undefined
- }, props, {
- defaultChecked: undefined,
- defaultValue: undefined,
- value: props.value != null ? props.value : props.defaultValue,
- checked: props.checked != null ? props.checked : props.defaultChecked
- });
- } else if (tag === 'textarea') {
- {
- checkControlledValueProps('textarea', props);
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
- 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');
-
- didWarnDefaultTextareaValue = true;
- }
- }
-
- var initialValue = props.value;
-
- if (initialValue == null) {
- var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>.
-
- var textareaChildren = props.children;
-
- if (textareaChildren != null) {
- {
- error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
- }
-
- if (!(defaultValue == null)) {
- {
- throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
- }
- }
-
- if (Array.isArray(textareaChildren)) {
- if (!(textareaChildren.length <= 1)) {
- {
- throw Error( "<textarea> can only have at most one child." );
- }
- }
-
- textareaChildren = textareaChildren[0];
- }
-
- defaultValue = '' + textareaChildren;
- }
-
- if (defaultValue == null) {
- defaultValue = '';
- }
-
- initialValue = defaultValue;
- }
-
- props = _assign({}, props, {
- value: undefined,
- children: '' + initialValue
- });
- } else if (tag === 'select') {
- {
- checkControlledValueProps('select', props);
-
- for (var i = 0; i < valuePropNames.length; i++) {
- var propName = valuePropNames[i];
-
- if (props[propName] == null) {
- continue;
- }
-
- var isArray = Array.isArray(props[propName]);
-
- if (props.multiple && !isArray) {
- error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
- } else if (!props.multiple && isArray) {
- error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
- }
- }
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
- 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');
-
- didWarnDefaultSelectValue = true;
- }
- }
-
- this.currentSelectValue = props.value != null ? props.value : props.defaultValue;
- props = _assign({}, props, {
- value: undefined
- });
- } else if (tag === 'option') {
- var selected = null;
- var selectValue = this.currentSelectValue;
- var optionChildren = flattenOptionChildren(props.children);
-
- if (selectValue != null) {
- var value;
-
- if (props.value != null) {
- value = props.value + '';
- } else {
- value = optionChildren;
- }
-
- selected = false;
-
- if (Array.isArray(selectValue)) {
- // multiple
- for (var j = 0; j < selectValue.length; j++) {
- if ('' + selectValue[j] === value) {
- selected = true;
- break;
- }
- }
- } else {
- selected = '' + selectValue === value;
- }
-
- props = _assign({
- selected: undefined,
- children: undefined
- }, props, {
- selected: selected,
- children: optionChildren
- });
- }
- }
-
- {
- validatePropertiesInDevelopment(tag, props);
- }
-
- assertValidProps(tag, props);
- var out = createOpenTagMarkup(element.type, tag, props, namespace, this.makeStaticMarkup, this.stack.length === 1);
- var footer = '';
-
- if (omittedCloseTags.hasOwnProperty(tag)) {
- out += '/>';
- } else {
- out += '>';
- footer = '</' + element.type + '>';
- }
-
- var children;
- var innerMarkup = getNonChildrenInnerMarkup(props);
-
- if (innerMarkup != null) {
- children = [];
-
- if (newlineEatingTags.hasOwnProperty(tag) && innerMarkup.charAt(0) === '\n') {
- // text/html ignores the first character in these tags if it's a newline
- // Prefer to break application/xml over text/html (for now) by adding
- // a newline specifically to get eaten by the parser. (Alternately for
- // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
- // \r is normalized out by HTMLTextAreaElement#value.)
- // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
- // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
- // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
- // See: Parsing of "textarea" "listing" and "pre" elements
- // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
- out += '\n';
- }
-
- out += innerMarkup;
- } else {
- children = toArray(props.children);
- }
-
- var frame = {
- domNamespace: getChildNamespace(parentNamespace, element.type),
- type: tag,
- children: children,
- childIndex: 0,
- context: context,
- footer: footer
- };
-
- {
- frame.debugElementStack = [];
- }
-
- this.stack.push(frame);
- this.previousWasTextNode = false;
- return out;
- };
-
- return ReactDOMServerRenderer;
-}();
-
-/**
- * Render a ReactElement to its initial HTML. This should only be used on the
- * server.
- * See https://reactjs.org/docs/react-dom-server.html#rendertostring
- */
-
-function renderToString(element, options) {
- var renderer = new ReactDOMServerRenderer(element, false, options);
-
- try {
- var markup = renderer.read(Infinity);
- return markup;
- } finally {
- renderer.destroy();
- }
-}
-/**
- * Similar to renderToString, except this doesn't create extra DOM attributes
- * such as data-react-id that React uses internally.
- * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
- */
-
-function renderToStaticMarkup(element, options) {
- var renderer = new ReactDOMServerRenderer(element, true, options);
-
- try {
- var markup = renderer.read(Infinity);
- return markup;
- } finally {
- renderer.destroy();
- }
-}
-
-function _inheritsLoose(subClass, superClass) {
- subClass.prototype = Object.create(superClass.prototype);
- subClass.prototype.constructor = subClass;
- subClass.__proto__ = superClass;
-}
-
-var ReactMarkupReadableStream = /*#__PURE__*/function (_Readable) {
- _inheritsLoose(ReactMarkupReadableStream, _Readable);
-
- function ReactMarkupReadableStream(element, makeStaticMarkup, options) {
- var _this;
-
- // Calls the stream.Readable(options) constructor. Consider exposing built-in
- // features like highWaterMark in the future.
- _this = _Readable.call(this, {}) || this;
- _this.partialRenderer = new ReactDOMServerRenderer(element, makeStaticMarkup, options);
- return _this;
- }
-
- var _proto = ReactMarkupReadableStream.prototype;
-
- _proto._destroy = function _destroy(err, callback) {
- this.partialRenderer.destroy();
- callback(err);
- };
-
- _proto._read = function _read(size) {
- try {
- this.push(this.partialRenderer.read(size));
- } catch (err) {
- this.destroy(err);
- }
- };
-
- return ReactMarkupReadableStream;
-}(stream.Readable);
-/**
- * Render a ReactElement to its initial HTML. This should only be used on the
- * server.
- * See https://reactjs.org/docs/react-dom-server.html#rendertonodestream
- */
-
-
-function renderToNodeStream(element, options) {
- return new ReactMarkupReadableStream(element, false, options);
-}
-/**
- * Similar to renderToNodeStream, except this doesn't create extra DOM attributes
- * such as data-react-id that React uses internally.
- * See https://reactjs.org/docs/react-dom-server.html#rendertostaticnodestream
- */
-
-function renderToStaticNodeStream(element, options) {
- return new ReactMarkupReadableStream(element, true, options);
-}
-
-exports.renderToNodeStream = renderToNodeStream;
-exports.renderToStaticMarkup = renderToStaticMarkup;
-exports.renderToStaticNodeStream = renderToStaticNodeStream;
-exports.renderToString = renderToString;
-exports.version = ReactVersion;
- })();
-}
diff --git a/node_modules/react-dom/cjs/react-dom-server.node.production.min.js b/node_modules/react-dom/cjs/react-dom-server.node.production.min.js
deleted file mode 100644
index 685483d..0000000
--- a/node_modules/react-dom/cjs/react-dom-server.node.production.min.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/** @license React v17.0.2
- * react-dom-server.node.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var l=require("object-assign"),n=require("react"),aa=require("stream");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-var q=60106,r=60107,u=60108,z=60114,B=60109,ba=60110,ca=60112,D=60113,da=60120,ea=60115,fa=60116,ha=60121,ia=60117,ja=60119,ka=60129,la=60131;
-if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;q=E("react.portal");r=E("react.fragment");u=E("react.strict_mode");z=E("react.profiler");B=E("react.provider");ba=E("react.context");ca=E("react.forward_ref");D=E("react.suspense");da=E("react.suspense_list");ea=E("react.memo");fa=E("react.lazy");ha=E("react.block");ia=E("react.fundamental");ja=E("react.scope");ka=E("react.debug_trace_mode");la=E("react.legacy_hidden")}
-function F(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case r:return"Fragment";case q:return"Portal";case z:return"Profiler";case u:return"StrictMode";case D:return"Suspense";case da:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case ba:return(a.displayName||"Context")+".Consumer";case B:return(a._context.displayName||"Context")+".Provider";case ca:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
-(""!==b?"ForwardRef("+b+")":"ForwardRef");case ea:return F(a.type);case ha:return F(a._render);case fa:b=a._payload;a=a._init;try{return F(a(b))}catch(c){}}return null}var ma=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,na={};function I(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function oa(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return I(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=na;return b}
-for(var J=new Uint16Array(16),K=0;15>K;K++)J[K]=K+1;J[15]=0;var pa=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,qa=Object.prototype.hasOwnProperty,ra={},sa={};
-function ta(a){if(qa.call(sa,a))return!0;if(qa.call(ra,a))return!1;if(pa.test(a))return sa[a]=!0;ra[a]=!0;return!1}function ua(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
-function va(a,b,c,d){if(null===b||"undefined"===typeof b||ua(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function M(a,b,c,d,f,h,t){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=h;this.removeEmptyString=t}var N={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){N[a]=new M(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];N[b]=new M(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){N[a]=new M(a,2,!1,a.toLowerCase(),null,!1,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){N[a]=new M(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){N[a]=new M(a,3,!1,a.toLowerCase(),null,!1,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){N[a]=new M(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){N[a]=new M(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){N[a]=new M(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){N[a]=new M(a,5,!1,a.toLowerCase(),null,!1,!1)});var wa=/[\-:]([a-z])/g;function xa(a){return a[1].toUpperCase()}
-"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".split(" ").forEach(function(a){var b=a.replace(wa,
-xa);N[b]=new M(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(wa,xa);N[b]=new M(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(wa,xa);N[b]=new M(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!1,!1)});
-N.xlinkHref=new M("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){N[a]=new M(a,1,!1,a.toLowerCase(),null,!0,!0)});var ya=/["'&<>]/;
-function O(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=ya.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}
-function za(a,b){var c=N.hasOwnProperty(a)?N[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||va(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(O(b)+'"')}return ta(a)?a+'="'+(O(b)+'"'):""}function Aa(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}
-var Ba="function"===typeof Object.is?Object.is:Aa,P=null,Q=null,R=null,S=!1,T=!1,U=null,V=0;function W(){if(null===P)throw Error(p(321));return P}function Ca(){if(0<V)throw Error(p(312));return{memoizedState:null,queue:null,next:null}}function Da(){null===R?null===Q?(S=!1,Q=R=Ca()):(S=!0,R=Q):null===R.next?(S=!1,R=R.next=Ca()):(S=!0,R=R.next);return R}function Ea(a,b,c,d){for(;T;)T=!1,V+=1,R=null,c=a(b,d);Fa();return c}function Fa(){P=null;T=!1;Q=null;V=0;R=U=null}
-function Ga(a,b){return"function"===typeof b?b(a):b}function Ha(a,b,c){P=W();R=Da();if(S){var d=R.queue;b=d.dispatch;if(null!==U&&(c=U.get(d),void 0!==c)){U.delete(d);d=R.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);R.memoizedState=d;return[d,b]}return[R.memoizedState,b]}a=a===Ga?"function"===typeof b?b():b:void 0!==c?c(b):b;R.memoizedState=a;a=R.queue={last:null,dispatch:null};a=a.dispatch=Ia.bind(null,P,a);return[R.memoizedState,a]}
-function Ja(a,b){P=W();R=Da();b=void 0===b?null:b;if(null!==R){var c=R.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Ba(b[f],d[f])){d=!1;break a}d=!0}if(d)return c[0]}}a=a();R.memoizedState=[a,b];return a}function Ia(a,b,c){if(!(25>V))throw Error(p(301));if(a===P)if(T=!0,a={action:c,next:null},null===U&&(U=new Map),c=U.get(b),void 0===c)U.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Ka(){}
-var X=null,La={readContext:function(a){var b=X.threadID;I(a,b);return a[b]},useContext:function(a){W();var b=X.threadID;I(a,b);return a[b]},useMemo:Ja,useReducer:Ha,useRef:function(a){P=W();R=Da();var b=R.memoizedState;return null===b?(a={current:a},R.memoizedState=a):b},useState:function(a){return Ha(Ga,a)},useLayoutEffect:function(){},useCallback:function(a,b){return Ja(function(){return a},b)},useImperativeHandle:Ka,useEffect:Ka,useDebugValue:Ka,useDeferredValue:function(a){W();return a},useTransition:function(){W();
-return[function(a){a()},!1]},useOpaqueIdentifier:function(){return(X.identifierPrefix||"")+"R:"+(X.uniqueID++).toString(36)},useMutableSource:function(a,b){W();return b(a._source)}},Ma={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};function Na(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
-var Oa={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Pa=l({menuitem:!0},Oa),Y={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,
-gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Qa=["Webkit","ms","Moz","O"];Object.keys(Y).forEach(function(a){Qa.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Y[b]=Y[a]})});
-var Ra=/([A-Z])/g,Sa=/^ms-/,Z=n.Children.toArray,Ta=ma.ReactCurrentDispatcher,Ua={listing:!0,pre:!0,textarea:!0},Va=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,Wa={},Xa={};function Ya(a){if(void 0===a||null===a)return a;var b="";n.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}var Za=Object.prototype.hasOwnProperty,$a={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null};function ab(a,b){if(void 0===a)throw Error(p(152,F(b)||"Component"));}
-function bb(a,b,c){function d(d,h){var e=h.prototype&&h.prototype.isReactComponent,f=oa(h,b,c,e),t=[],g=!1,m={isMounted:function(){return!1},enqueueForceUpdate:function(){if(null===t)return null},enqueueReplaceState:function(a,b){g=!0;t=[b]},enqueueSetState:function(a,b){if(null===t)return null;t.push(b)}};if(e){if(e=new h(d.props,f,m),"function"===typeof h.getDerivedStateFromProps){var k=h.getDerivedStateFromProps.call(null,d.props,e.state);null!=k&&(e.state=l({},e.state,k))}}else if(P={},e=h(d.props,
-f,m),e=Ea(h,d.props,e,f),null==e||null==e.render){a=e;ab(a,h);return}e.props=d.props;e.context=f;e.updater=m;m=e.state;void 0===m&&(e.state=m=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&"function"!==typeof h.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),t.length){m=t;var v=
-g;t=null;g=!1;if(v&&1===m.length)e.state=m[0];else{k=v?m[0]:e.state;var H=!0;for(v=v?1:0;v<m.length;v++){var x=m[v];x="function"===typeof x?x.call(e,k,d.props,f):x;null!=x&&(H?(H=!1,k=l({},k,x)):l(k,x))}e.state=k}}else t=null;a=e.render();ab(a,h);if("function"===typeof e.getChildContext&&(d=h.childContextTypes,"object"===typeof d)){var y=e.getChildContext();for(var A in y)if(!(A in d))throw Error(p(108,F(h)||"Unknown",A));}y&&(b=l({},b,y))}for(;n.isValidElement(a);){var f=a,h=f.type;if("function"!==
-typeof h)break;d(f,h)}return{child:a,context:b}}
-var cb=function(){function a(a,b,f){n.isValidElement(a)?a.type!==r?a=[a]:(a=a.props.children,a=n.isValidElement(a)?[a]:Z(a)):a=Z(a);a={type:null,domNamespace:Ma.html,children:a,childIndex:0,context:na,footer:""};var c=J[0];if(0===c){var d=J;c=d.length;var g=2*c;if(!(65536>=g))throw Error(p(304));var e=new Uint16Array(g);e.set(d);J=e;J[0]=c+1;for(d=c;d<g-1;d++)J[d]=d+1;J[g-1]=0}else J[0]=J[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;
-this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||""}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;J[a]=J[0];J[0]=a}};b.pushProvider=function(a){var b=++this.contextIndex,c=a.type._context,h=this.threadID;I(c,h);var t=c[h];this.contextStack[b]=c;this.contextValueStack[b]=t;c[h]=a.props.value};b.popProvider=
-function(){var a=this.contextIndex,b=this.contextStack[a],f=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=f};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;var b=X;X=this;var c=Ta.current;Ta.current=La;try{for(var h=[""],t=!1;h[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var g=this.threadID;
-J[g]=J[0];J[0]=g;break}var e=this.stack[this.stack.length-1];if(t||e.childIndex>=e.children.length){var L=e.footer;""!==L&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===B)this.popProvider(e.type);else if(e.type===D){this.suspenseDepth--;var G=h.pop();if(t){t=!1;var C=e.fallbackFrame;if(!C)throw Error(p(303));this.stack.push(C);h[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else h[this.suspenseDepth]+=
-G}h[this.suspenseDepth]+=L}else{var m=e.children[e.childIndex++],k="";try{k+=this.render(m,e.context,e.domNamespace)}catch(v){if(null!=v&&"function"===typeof v.then)throw Error(p(294));throw v;}finally{}h.length<=this.suspenseDepth&&h.push("");h[this.suspenseDepth]+=k}}return h[0]}finally{Ta.current=c,X=b,Fa()}};b.render=function(a,b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return O(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+O(f);
-this.previousWasTextNode=!0;return O(f)}b=bb(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return"";if(!n.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===q)throw Error(p(257));throw Error(p(258,f.toString()));}a=Z(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case la:case ka:case u:case z:case da:case r:return a=Z(a.props.children),this.stack.push({type:null,
-domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case D:throw Error(p(294));case ja:throw Error(p(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case ca:P={};var d=c.render(a.props,a.ref);d=Ea(c.render,a.props,d,a.ref);d=Z(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,context:b,footer:""});return"";case ea:return a=[n.createElement(c.type,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),
-"";case B:return c=Z(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case ba:c=a.type;d=a.props;var g=this.threadID;I(c,g);c=Z(d.children(c[g]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";case ia:throw Error(p(338));case fa:return c=a.type,d=c._init,c=d(c._payload),a=[n.createElement(c,l({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,
-context:b,footer:""}),""}throw Error(p(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();f===Ma.html&&Na(c);if(!Wa.hasOwnProperty(c)){if(!Va.test(c))throw Error(p(65,c));Wa[c]=!0}var d=a.props;if("input"===c)d=l({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var g=d.value;if(null==g){g=d.defaultValue;var e=d.children;if(null!=e){if(null!=
-g)throw Error(p(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(p(93));e=e[0]}g=""+e}null==g&&(g="")}d=l({},d,{value:void 0,children:""+g})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=l({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;var L=Ya(d.children);if(null!=e){var G=null!=d.value?d.value+"":L;g=!1;if(Array.isArray(e))for(var C=0;C<e.length;C++){if(""+e[C]===G){g=!0;break}}else g=""+e===G;d=l({selected:void 0,children:void 0},
-d,{selected:g,children:L})}}if(g=d){if(Pa[c]&&(null!=g.children||null!=g.dangerouslySetInnerHTML))throw Error(p(137,c));if(null!=g.dangerouslySetInnerHTML){if(null!=g.children)throw Error(p(60));if(!("object"===typeof g.dangerouslySetInnerHTML&&"__html"in g.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=g.style&&"object"!==typeof g.style)throw Error(p(62));}g=d;e=this.makeStaticMarkup;L=1===this.stack.length;G="<"+a.type;b:if(-1===c.indexOf("-"))C="string"===typeof g.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":C=
-!1;break b;default:C=!0}for(w in g)if(Za.call(g,w)){var m=g[w];if(null!=m){if("style"===w){var k=void 0,v="",H="";for(k in m)if(m.hasOwnProperty(k)){var x=0===k.indexOf("--"),y=m[k];if(null!=y){if(x)var A=k;else if(A=k,Xa.hasOwnProperty(A))A=Xa[A];else{var eb=A.replace(Ra,"-$1").toLowerCase().replace(Sa,"-ms-");A=Xa[A]=eb}v+=H+A+":";H=k;x=null==y||"boolean"===typeof y||""===y?"":x||"number"!==typeof y||0===y||Y.hasOwnProperty(H)&&Y[H]?(""+y).trim():y+"px";v+=x;H=";"}}m=v||null}k=null;C?$a.hasOwnProperty(w)||
-(k=w,k=ta(k)&&null!=m?k+'="'+(O(m)+'"'):""):k=za(w,m);k&&(G+=" "+k)}}e||L&&(G+=' data-reactroot=""');var w=G;g="";Oa.hasOwnProperty(c)?w+="/>":(w+=">",g="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=O(e);break a}e=null}null!=e?(d=[],Ua.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(w+="\n"),w+=e):d=Z(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?Na(a):"http://www.w3.org/2000/svg"===
-f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:g});this.previousWasTextNode=!1;return w};return a}();function db(a,b){a.prototype=Object.create(b.prototype);a.prototype.constructor=a;a.__proto__=b}
-var fb=function(a){function b(b,c,h){var d=a.call(this,{})||this;d.partialRenderer=new cb(b,c,h);return d}db(b,a);var c=b.prototype;c._destroy=function(a,b){this.partialRenderer.destroy();b(a)};c._read=function(a){try{this.push(this.partialRenderer.read(a))}catch(f){this.destroy(f)}};return b}(aa.Readable);exports.renderToNodeStream=function(a,b){return new fb(a,!1,b)};exports.renderToStaticMarkup=function(a,b){a=new cb(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};
-exports.renderToStaticNodeStream=function(a,b){return new fb(a,!0,b)};exports.renderToString=function(a,b){a=new cb(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};exports.version="17.0.2";
diff --git a/node_modules/react-dom/cjs/react-dom-test-utils.development.js b/node_modules/react-dom/cjs/react-dom-test-utils.development.js
deleted file mode 100644
index a3adf21..0000000
--- a/node_modules/react-dom/cjs/react-dom-test-utils.development.js
+++ /dev/null
@@ -1,2118 +0,0 @@
-/** @license React v17.0.2
- * react-dom-test-utils.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var _assign = require('object-assign');
-var React = require('react');
-var ReactDOM = require('react-dom');
-var Scheduler = require('scheduler');
-
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
-// by calls to these methods by a Babel plugin.
-//
-// In PROD (or in packages without access to React internals),
-// they are left as they are instead.
-
-function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
-}
-function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
-}
-
-function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
-}
-
-/**
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
- * instance (key) and the internal representation (value). This allows public
- * methods to accept the user facing instance as an argument and map them back
- * to internal methods.
- *
- * Note that this module is currently shared and assumed to be stateless.
- * If this becomes an actual Map, that will break.
- */
-function get(key) {
- return key._reactInternals;
-}
-
-// ATTENTION
-// When adding new symbols to this file,
-// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var REACT_ELEMENT_TYPE = 0xeac7;
-var REACT_PORTAL_TYPE = 0xeaca;
-var REACT_FRAGMENT_TYPE = 0xeacb;
-var REACT_STRICT_MODE_TYPE = 0xeacc;
-var REACT_PROFILER_TYPE = 0xead2;
-var REACT_PROVIDER_TYPE = 0xeacd;
-var REACT_CONTEXT_TYPE = 0xeace;
-var REACT_FORWARD_REF_TYPE = 0xead0;
-var REACT_SUSPENSE_TYPE = 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = 0xead8;
-var REACT_MEMO_TYPE = 0xead3;
-var REACT_LAZY_TYPE = 0xead4;
-var REACT_BLOCK_TYPE = 0xead9;
-var REACT_SERVER_BLOCK_TYPE = 0xeada;
-var REACT_FUNDAMENTAL_TYPE = 0xead5;
-var REACT_SCOPE_TYPE = 0xead7;
-var REACT_OPAQUE_ID_TYPE = 0xeae0;
-var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
-var REACT_OFFSCREEN_TYPE = 0xeae2;
-var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
-}
-
-var FunctionComponent = 0;
-var ClassComponent = 1;
-
-var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
-
-var HostComponent = 5;
-var HostText = 6;
-
-// Don't change these two values. They're used by React Dev Tools.
-var NoFlags =
-/* */
-0;
-
-var Placement =
-/* */
-2;
-var Hydrating =
-/* */
-1024;
-
-var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
-function getNearestMountedFiber(fiber) {
- var node = fiber;
- var nearestMounted = fiber;
-
- if (!fiber.alternate) {
- // If there is no alternate, this might be a new tree that isn't inserted
- // yet. If it is, then it will have a pending insertion effect on it.
- var nextNode = node;
-
- do {
- node = nextNode;
-
- if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
- // This is an insertion or in-progress hydration. The nearest possible
- // mounted fiber is the parent but we need to continue to figure out
- // if that one is still mounted.
- nearestMounted = node.return;
- }
-
- nextNode = node.return;
- } while (nextNode);
- } else {
- while (node.return) {
- node = node.return;
- }
- }
-
- if (node.tag === HostRoot) {
- // TODO: Check if this was a nested HostRoot when used with
- // renderContainerIntoSubtree.
- return nearestMounted;
- } // If we didn't hit the root, that means that we're in an disconnected tree
- // that has been unmounted.
-
-
- return null;
-}
-
-function assertIsMounted(fiber) {
- if (!(getNearestMountedFiber(fiber) === fiber)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-}
-
-function findCurrentFiberUsingSlowPath(fiber) {
- var alternate = fiber.alternate;
-
- if (!alternate) {
- // If there is no alternate, then we only need to check if it is mounted.
- var nearestMounted = getNearestMountedFiber(fiber);
-
- if (!(nearestMounted !== null)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (nearestMounted !== fiber) {
- return null;
- }
-
- return fiber;
- } // If we have two possible branches, we'll walk backwards up to the root
- // to see what path the root points to. On the way we may hit one of the
- // special cases and we'll deal with them.
-
-
- var a = fiber;
- var b = alternate;
-
- while (true) {
- var parentA = a.return;
-
- if (parentA === null) {
- // We're at the root.
- break;
- }
-
- var parentB = parentA.alternate;
-
- if (parentB === null) {
- // There is no alternate. This is an unusual case. Currently, it only
- // happens when a Suspense component is hidden. An extra fragment fiber
- // is inserted in between the Suspense fiber and its children. Skip
- // over this extra fragment fiber and proceed to the next parent.
- var nextParent = parentA.return;
-
- if (nextParent !== null) {
- a = b = nextParent;
- continue;
- } // If there's no parent, we're at the root.
-
-
- break;
- } // If both copies of the parent fiber point to the same child, we can
- // assume that the child is current. This happens when we bailout on low
- // priority: the bailed out fiber's child reuses the current child.
-
-
- if (parentA.child === parentB.child) {
- var child = parentA.child;
-
- while (child) {
- if (child === a) {
- // We've determined that A is the current branch.
- assertIsMounted(parentA);
- return fiber;
- }
-
- if (child === b) {
- // We've determined that B is the current branch.
- assertIsMounted(parentA);
- return alternate;
- }
-
- child = child.sibling;
- } // We should never have an alternate for any mounting node. So the only
- // way this could possibly happen is if this was unmounted, if at all.
-
-
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- if (a.return !== b.return) {
- // The return pointer of A and the return pointer of B point to different
- // fibers. We assume that return pointers never criss-cross, so A must
- // belong to the child set of A.return, and B must belong to the child
- // set of B.return.
- a = parentA;
- b = parentB;
- } else {
- // The return pointers point to the same fiber. We'll have to use the
- // default, slow path: scan the child sets of each parent alternate to see
- // which child belongs to which set.
- //
- // Search parent A's child set
- var didFindChild = false;
- var _child = parentA.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentA;
- b = parentB;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentA;
- a = parentB;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- // Search parent B's child set
- _child = parentB.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentB;
- b = parentA;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentB;
- a = parentA;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- {
- throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
- }
- }
- }
- }
-
- if (!(a.alternate === b)) {
- {
- throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } // If the root is not a host container, we're in a disconnected tree. I.e.
- // unmounted.
-
-
- if (!(a.tag === HostRoot)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (a.stateNode.current === a) {
- // We've determined that A is the current branch.
- return fiber;
- } // Otherwise B has to be current branch.
-
-
- return alternate;
-}
-
-/**
- * `charCode` represents the actual "character code" and is safe to use with
- * `String.fromCharCode`. As such, only keys that correspond to printable
- * characters produce a valid `charCode`, the only exception to this is Enter.
- * The Tab-key is considered non-printable and does not have a `charCode`,
- * presumably because it does not produce a tab-character in browsers.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {number} Normalized `charCode` property.
- */
-function getEventCharCode(nativeEvent) {
- var charCode;
- var keyCode = nativeEvent.keyCode;
-
- if ('charCode' in nativeEvent) {
- charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
-
- if (charCode === 0 && keyCode === 13) {
- charCode = 13;
- }
- } else {
- // IE8 does not implement `charCode`, but `keyCode` has the correct value.
- charCode = keyCode;
- } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
- // report Enter as charCode 10 when ctrl is pressed.
-
-
- if (charCode === 10) {
- charCode = 13;
- } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
- // Must not discard the (non-)printable Enter-key.
-
-
- if (charCode >= 32 || charCode === 13) {
- return charCode;
- }
-
- return 0;
-}
-
-function functionThatReturnsTrue() {
- return true;
-}
-
-function functionThatReturnsFalse() {
- return false;
-} // This is intentionally a factory so that we have different returned constructors.
-// If we had a single constructor, it would be megamorphic and engines would deopt.
-
-
-function createSyntheticEvent(Interface) {
- /**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- */
- function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
- this._reactName = reactName;
- this._targetInst = targetInst;
- this.type = reactEventType;
- this.nativeEvent = nativeEvent;
- this.target = nativeEventTarget;
- this.currentTarget = null;
-
- for (var _propName in Interface) {
- if (!Interface.hasOwnProperty(_propName)) {
- continue;
- }
-
- var normalize = Interface[_propName];
-
- if (normalize) {
- this[_propName] = normalize(nativeEvent);
- } else {
- this[_propName] = nativeEvent[_propName];
- }
- }
-
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
-
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
-
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
- }
-
- _assign(SyntheticBaseEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.preventDefault) {
- event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
-
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.stopPropagation) {
- event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
-
- this.isPropagationStopped = functionThatReturnsTrue;
- },
-
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {// Modern event system doesn't use pooling.
- },
-
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsTrue
- });
-
- return SyntheticBaseEvent;
-}
-/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
-var EventInterface = {
- eventPhase: 0,
- bubbles: 0,
- cancelable: 0,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: 0,
- isTrusted: 0
-};
-var SyntheticEvent = createSyntheticEvent(EventInterface);
-
-var UIEventInterface = _assign({}, EventInterface, {
- view: 0,
- detail: 0
-});
-
-var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
-var lastMovementX;
-var lastMovementY;
-var lastMouseEvent;
-
-function updateMouseMovementPolyfillState(event) {
- if (event !== lastMouseEvent) {
- if (lastMouseEvent && event.type === 'mousemove') {
- lastMovementX = event.screenX - lastMouseEvent.screenX;
- lastMovementY = event.screenY - lastMouseEvent.screenY;
- } else {
- lastMovementX = 0;
- lastMovementY = 0;
- }
-
- lastMouseEvent = event;
- }
-}
-/**
- * @interface MouseEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
-var MouseEventInterface = _assign({}, UIEventInterface, {
- screenX: 0,
- screenY: 0,
- clientX: 0,
- clientY: 0,
- pageX: 0,
- pageY: 0,
- ctrlKey: 0,
- shiftKey: 0,
- altKey: 0,
- metaKey: 0,
- getModifierState: getEventModifierState,
- button: 0,
- buttons: 0,
- relatedTarget: function (event) {
- if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
- return event.relatedTarget;
- },
- movementX: function (event) {
- if ('movementX' in event) {
- return event.movementX;
- }
-
- updateMouseMovementPolyfillState(event);
- return lastMovementX;
- },
- movementY: function (event) {
- if ('movementY' in event) {
- return event.movementY;
- } // Don't need to call updateMouseMovementPolyfillState() here
- // because it's guaranteed to have already run when movementX
- // was copied.
-
-
- return lastMovementY;
- }
-});
-
-var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
-/**
- * @interface DragEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var DragEventInterface = _assign({}, MouseEventInterface, {
- dataTransfer: 0
-});
-
-var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
-/**
- * @interface FocusEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var FocusEventInterface = _assign({}, UIEventInterface, {
- relatedTarget: 0
-});
-
-var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
- */
-
-var AnimationEventInterface = _assign({}, EventInterface, {
- animationName: 0,
- elapsedTime: 0,
- pseudoElement: 0
-});
-
-var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/clipboard-apis/
- */
-
-var ClipboardEventInterface = _assign({}, EventInterface, {
- clipboardData: function (event) {
- return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
- }
-});
-
-var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
- */
-
-var CompositionEventInterface = _assign({}, EventInterface, {
- data: 0
-});
-
-var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
-/**
- * Normalization of deprecated HTML5 `key` values
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
-var normalizeKey = {
- Esc: 'Escape',
- Spacebar: ' ',
- Left: 'ArrowLeft',
- Up: 'ArrowUp',
- Right: 'ArrowRight',
- Down: 'ArrowDown',
- Del: 'Delete',
- Win: 'OS',
- Menu: 'ContextMenu',
- Apps: 'ContextMenu',
- Scroll: 'ScrollLock',
- MozPrintableKey: 'Unidentified'
-};
-/**
- * Translation from legacy `keyCode` to HTML5 `key`
- * Only special keys supported, all others depend on keyboard layout or browser
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
-var translateToKey = {
- '8': 'Backspace',
- '9': 'Tab',
- '12': 'Clear',
- '13': 'Enter',
- '16': 'Shift',
- '17': 'Control',
- '18': 'Alt',
- '19': 'Pause',
- '20': 'CapsLock',
- '27': 'Escape',
- '32': ' ',
- '33': 'PageUp',
- '34': 'PageDown',
- '35': 'End',
- '36': 'Home',
- '37': 'ArrowLeft',
- '38': 'ArrowUp',
- '39': 'ArrowRight',
- '40': 'ArrowDown',
- '45': 'Insert',
- '46': 'Delete',
- '112': 'F1',
- '113': 'F2',
- '114': 'F3',
- '115': 'F4',
- '116': 'F5',
- '117': 'F6',
- '118': 'F7',
- '119': 'F8',
- '120': 'F9',
- '121': 'F10',
- '122': 'F11',
- '123': 'F12',
- '144': 'NumLock',
- '145': 'ScrollLock',
- '224': 'Meta'
-};
-/**
- * @param {object} nativeEvent Native browser event.
- * @return {string} Normalized `key` property.
- */
-
-function getEventKey(nativeEvent) {
- if (nativeEvent.key) {
- // Normalize inconsistent values reported by browsers due to
- // implementations of a working draft specification.
- // FireFox implements `key` but returns `MozPrintableKey` for all
- // printable characters (normalized to `Unidentified`), ignore it.
- var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
-
- if (key !== 'Unidentified') {
- return key;
- }
- } // Browser does not implement `key`, polyfill as much of it as we can.
-
-
- if (nativeEvent.type === 'keypress') {
- var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
- // thus be captured by `keypress`, no other non-printable key should.
-
- return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
- }
-
- if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
- // While user keyboard layout determines the actual meaning of each
- // `keyCode` value, almost all function keys have a universal value.
- return translateToKey[nativeEvent.keyCode] || 'Unidentified';
- }
-
- return '';
-}
-/**
- * Translation from modifier key to the associated property in the event.
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
- */
-
-
-var modifierKeyToProp = {
- Alt: 'altKey',
- Control: 'ctrlKey',
- Meta: 'metaKey',
- Shift: 'shiftKey'
-}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
-// getModifierState. If getModifierState is not supported, we map it to a set of
-// modifier keys exposed by the event. In this case, Lock-keys are not supported.
-
-function modifierStateGetter(keyArg) {
- var syntheticEvent = this;
- var nativeEvent = syntheticEvent.nativeEvent;
-
- if (nativeEvent.getModifierState) {
- return nativeEvent.getModifierState(keyArg);
- }
-
- var keyProp = modifierKeyToProp[keyArg];
- return keyProp ? !!nativeEvent[keyProp] : false;
-}
-
-function getEventModifierState(nativeEvent) {
- return modifierStateGetter;
-}
-/**
- * @interface KeyboardEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
-var KeyboardEventInterface = _assign({}, UIEventInterface, {
- key: getEventKey,
- code: 0,
- location: 0,
- ctrlKey: 0,
- shiftKey: 0,
- altKey: 0,
- metaKey: 0,
- repeat: 0,
- locale: 0,
- getModifierState: getEventModifierState,
- // Legacy Interface
- charCode: function (event) {
- // `charCode` is the result of a KeyPress event and represents the value of
- // the actual printable character.
- // KeyPress is deprecated, but its replacement is not yet final and not
- // implemented in any major browser. Only KeyPress has charCode.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- return 0;
- },
- keyCode: function (event) {
- // `keyCode` is the result of a KeyDown/Up event and represents the value of
- // physical keyboard key.
- // The actual meaning of the value depends on the users' keyboard layout
- // which cannot be detected. Assuming that it is a US keyboard layout
- // provides a surprisingly accurate mapping for US and European users.
- // Due to this, it is left to the user to implement at this time.
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- },
- which: function (event) {
- // `which` is an alias for either `keyCode` or `charCode` depending on the
- // type of the event.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- }
-});
-
-var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
-/**
- * @interface PointerEvent
- * @see http://www.w3.org/TR/pointerevents/
- */
-
-var PointerEventInterface = _assign({}, MouseEventInterface, {
- pointerId: 0,
- width: 0,
- height: 0,
- pressure: 0,
- tangentialPressure: 0,
- tiltX: 0,
- tiltY: 0,
- twist: 0,
- pointerType: 0,
- isPrimary: 0
-});
-
-var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
-/**
- * @interface TouchEvent
- * @see http://www.w3.org/TR/touch-events/
- */
-
-var TouchEventInterface = _assign({}, UIEventInterface, {
- touches: 0,
- targetTouches: 0,
- changedTouches: 0,
- altKey: 0,
- metaKey: 0,
- ctrlKey: 0,
- shiftKey: 0,
- getModifierState: getEventModifierState
-});
-
-var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
- */
-
-var TransitionEventInterface = _assign({}, EventInterface, {
- propertyName: 0,
- elapsedTime: 0,
- pseudoElement: 0
-});
-
-var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
-/**
- * @interface WheelEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var WheelEventInterface = _assign({}, MouseEventInterface, {
- deltaX: function (event) {
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
- },
- deltaY: function (event) {
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
- 'wheelDelta' in event ? -event.wheelDelta : 0;
- },
- deltaZ: 0,
- // Browsers without "deltaMode" is reporting in raw wheel delta where one
- // notch on the scroll is always +/- 120, roughly equivalent to pixels.
- // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
- // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
- deltaMode: 0
-});
-
-var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
-
-/**
- * HTML nodeType values that represent the type of the node
- */
-var ELEMENT_NODE = 1;
-
-var didWarnAboutMessageChannel = false;
-var enqueueTaskImpl = null;
-function enqueueTask(task) {
- if (enqueueTaskImpl === null) {
- try {
- // read require off the module object to get around the bundlers.
- // we don't want them to detect a require and bundle a Node polyfill.
- var requireString = ('require' + Math.random()).slice(0, 7);
- var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
- // version of setImmediate, bypassing fake timers if any.
-
- enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
- } catch (_err) {
- // we're in a browser
- // we can't use regular timers because they may still be faked
- // so we try MessageChannel+postMessage instead
- enqueueTaskImpl = function (callback) {
- {
- if (didWarnAboutMessageChannel === false) {
- didWarnAboutMessageChannel = true;
-
- if (typeof MessageChannel === 'undefined') {
- error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
- }
- }
- }
-
- var channel = new MessageChannel();
- channel.port1.onmessage = callback;
- channel.port2.postMessage(undefined);
- };
- }
- }
-
- return enqueueTaskImpl(task);
-}
-
-var EventInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
-// const getNodeFromInstance = EventInternals[1];
-// const getFiberCurrentPropsFromNode = EventInternals[2];
-// const enqueueStateRestore = EventInternals[3];
-// const restoreStateIfNeeded = EventInternals[4];
-
-var flushPassiveEffects = EventInternals[5];
-var IsThisRendererActing = EventInternals[6];
-var batchedUpdates = ReactDOM.unstable_batchedUpdates;
-var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; // This is the public version of `ReactTestUtils.act`. It is implemented in
-// "userspace" (i.e. not the reconciler), so that it doesn't add to the
-// production bundle size.
-// TODO: Remove this implementation of `act` in favor of the one exported by
-// the reconciler. To do this, we must first drop support for `act` in
-// production mode.
-// TODO: Remove support for the mock scheduler build, which was only added for
-// the purposes of internal testing. Internal tests should use
-// `unstable_concurrentAct` instead.
-
-var isSchedulerMocked = typeof Scheduler.unstable_flushAllWithoutAsserting === 'function';
-
-var flushWork = Scheduler.unstable_flushAllWithoutAsserting || function () {
- var didFlushWork = false;
-
- while (flushPassiveEffects()) {
- didFlushWork = true;
- }
-
- return didFlushWork;
-};
-
-function flushWorkAndMicroTasks(onDone) {
- try {
- flushWork();
- enqueueTask(function () {
- if (flushWork()) {
- flushWorkAndMicroTasks(onDone);
- } else {
- onDone();
- }
- });
- } catch (err) {
- onDone(err);
- }
-} // we track the 'depth' of the act() calls with this counter,
-// so we can tell if any async act() calls try to run in parallel.
-
-
-var actingUpdatesScopeDepth = 0;
-function act(callback) {
-
- var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth;
- actingUpdatesScopeDepth++;
- var previousIsSomeRendererActing = IsSomeRendererActing.current;
- var previousIsThisRendererActing = IsThisRendererActing.current;
- IsSomeRendererActing.current = true;
- IsThisRendererActing.current = true;
-
- function onDone() {
- actingUpdatesScopeDepth--;
- IsSomeRendererActing.current = previousIsSomeRendererActing;
- IsThisRendererActing.current = previousIsThisRendererActing;
-
- {
- if (actingUpdatesScopeDepth > previousActingUpdatesScopeDepth) {
- // if it's _less than_ previousActingUpdatesScopeDepth, then we can assume the 'other' one has warned
- error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
- }
- }
- }
-
- var result;
-
- try {
- result = batchedUpdates(callback);
- } catch (error) {
- // on sync errors, we still want to 'cleanup' and decrement actingUpdatesScopeDepth
- onDone();
- throw error;
- }
-
- if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
- // setup a boolean that gets set to true only
- // once this act() call is await-ed
- var called = false;
-
- {
- if (typeof Promise !== 'undefined') {
- //eslint-disable-next-line no-undef
- Promise.resolve().then(function () {}).then(function () {
- if (called === false) {
- error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, interleaving multiple act ' + 'calls and mixing their scopes. You should - await act(async () => ...);');
- }
- });
- }
- } // in the async case, the returned thenable runs the callback, flushes
- // effects and microtasks in a loop until flushPassiveEffects() === false,
- // and cleans up
-
-
- return {
- then: function (resolve, reject) {
- called = true;
- result.then(function () {
- if (actingUpdatesScopeDepth > 1 || isSchedulerMocked === true && previousIsSomeRendererActing === true) {
- onDone();
- resolve();
- return;
- } // we're about to exit the act() scope,
- // now's the time to flush tasks/effects
-
-
- flushWorkAndMicroTasks(function (err) {
- onDone();
-
- if (err) {
- reject(err);
- } else {
- resolve();
- }
- });
- }, function (err) {
- onDone();
- reject(err);
- });
- }
- };
- } else {
- {
- if (result !== undefined) {
- error('The callback passed to act(...) function ' + 'must return undefined, or a Promise. You returned %s', result);
- }
- } // flush effects until none remain, and cleanup
-
-
- try {
- if (actingUpdatesScopeDepth === 1 && (isSchedulerMocked === false || previousIsSomeRendererActing === false)) {
- // we're about to exit the act() scope,
- // now's the time to flush effects
- flushWork();
- }
-
- onDone();
- } catch (err) {
- onDone();
- throw err;
- } // in the sync case, the returned thenable only warns *if* await-ed
-
-
- return {
- then: function (resolve) {
- {
- error('Do not await the result of calling act(...) with sync logic, it is not a Promise.');
- }
-
- resolve();
- }
- };
- }
-}
-
-var EventInternals$1 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
-// const getNodeFromInstance = EventInternals[1];
-// const getFiberCurrentPropsFromNode = EventInternals[2];
-// const enqueueStateRestore = EventInternals[3];
-// const restoreStateIfNeeded = EventInternals[4];
-// const flushPassiveEffects = EventInternals[5];
-
-var IsThisRendererActing$1 = EventInternals$1[6];
-var batchedUpdates$1 = ReactDOM.unstable_batchedUpdates;
-var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing; // This version of `act` is only used by our tests. Unlike the public version
-// of `act`, it's designed to work identically in both production and
-// development. It may have slightly different behavior from the public
-// version, too, since our constraints in our test suite are not the same as
-// those of developers using React — we're testing React itself, as opposed to
-// building an app with React.
-
-var actingUpdatesScopeDepth$1 = 0;
-function unstable_concurrentAct(scope) {
- if (Scheduler.unstable_flushAllWithoutAsserting === undefined) {
- throw Error('This version of `act` requires a special mock build of Scheduler.');
- }
-
- if (setTimeout._isMockFunction !== true) {
- throw Error("This version of `act` requires Jest's timer mocks " + '(i.e. jest.useFakeTimers).');
- }
-
- var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth$1;
- var previousIsSomeRendererActing = IsSomeRendererActing$1.current;
- var previousIsThisRendererActing = IsThisRendererActing$1.current;
- IsSomeRendererActing$1.current = true;
- IsThisRendererActing$1.current = true;
- actingUpdatesScopeDepth$1++;
-
- var unwind = function () {
- actingUpdatesScopeDepth$1--;
- IsSomeRendererActing$1.current = previousIsSomeRendererActing;
- IsThisRendererActing$1.current = previousIsThisRendererActing;
-
- {
- if (actingUpdatesScopeDepth$1 > previousActingUpdatesScopeDepth) {
- // if it's _less than_ previousActingUpdatesScopeDepth, then we can
- // assume the 'other' one has warned
- error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
- }
- }
- }; // TODO: This would be way simpler if 1) we required a promise to be
- // returned and 2) we could use async/await. Since it's only our used in
- // our test suite, we should be able to.
-
-
- try {
- var thenable = batchedUpdates$1(scope);
-
- if (typeof thenable === 'object' && thenable !== null && typeof thenable.then === 'function') {
- return {
- then: function (resolve, reject) {
- thenable.then(function () {
- flushActWork(function () {
- unwind();
- resolve();
- }, function (error) {
- unwind();
- reject(error);
- });
- }, function (error) {
- unwind();
- reject(error);
- });
- }
- };
- } else {
- try {
- // TODO: Let's not support non-async scopes at all in our tests. Need to
- // migrate existing tests.
- var didFlushWork;
-
- do {
- didFlushWork = Scheduler.unstable_flushAllWithoutAsserting();
- } while (didFlushWork);
- } finally {
- unwind();
- }
- }
- } catch (error) {
- unwind();
- throw error;
- }
-}
-
-function flushActWork(resolve, reject) {
- // Flush suspended fallbacks
- // $FlowFixMe: Flow doesn't know about global Jest object
- jest.runOnlyPendingTimers();
- enqueueTask(function () {
- try {
- var didFlushWork = Scheduler.unstable_flushAllWithoutAsserting();
-
- if (didFlushWork) {
- flushActWork(resolve, reject);
- } else {
- resolve();
- }
- } catch (error) {
- reject(error);
- }
- });
-}
-
-function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- try {
- func.apply(context, funcArgs);
- } catch (error) {
- this.onError(error);
- }
-}
-
-var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
-
-{
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
-
- invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
- // If document doesn't exist we know for sure we will crash in this method
- // when we call document.createEvent(). However this can cause confusing
- // errors: https://github.com/facebookincubator/create-react-app/issues/3482
- // So we preemptively throw with a better message instead.
- if (!(typeof document !== 'undefined')) {
- {
- throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
- }
- }
-
- var evt = document.createEvent('Event');
- var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
- // set this to true at the beginning, then set it to false right after
- // calling the function. If the function errors, `didError` will never be
- // set to false. This strategy works even if the browser is flaky and
- // fails to call our global error handler, because it doesn't rely on
- // the error event at all.
-
- var didError = true; // Keeps track of the value of window.event so that we can reset it
- // during the callback to let user code access window.event in the
- // browsers that support it.
-
- var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
- // dispatching: https://github.com/facebook/react/issues/13688
-
- var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
-
- function restoreAfterDispatch() {
- // We immediately remove the callback from event listeners so that
- // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
- // nested call would trigger the fake event handlers of any call higher
- // in the stack.
- fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
- // window.event assignment in both IE <= 10 as they throw an error
- // "Member not found" in strict mode, and in Firefox which does not
- // support window.event.
-
- if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
- window.event = windowEvent;
- }
- } // Create an event handler for our fake event. We will synchronously
- // dispatch our fake event using `dispatchEvent`. Inside the handler, we
- // call the user-provided callback.
-
-
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- function callCallback() {
- didCall = true;
- restoreAfterDispatch();
- func.apply(context, funcArgs);
- didError = false;
- } // Create a global error event handler. We use this to capture the value
- // that was thrown. It's possible that this error handler will fire more
- // than once; for example, if non-React code also calls `dispatchEvent`
- // and a handler for that event throws. We should be resilient to most of
- // those cases. Even if our error event handler fires more than once, the
- // last error event is always used. If the callback actually does error,
- // we know that the last error event is the correct one, because it's not
- // possible for anything else to have happened in between our callback
- // erroring and the code that follows the `dispatchEvent` call below. If
- // the callback doesn't error, but the error event was fired, we know to
- // ignore it because `didError` will be false, as described above.
-
-
- var error; // Use this to track whether the error event is ever called.
-
- var didSetError = false;
- var isCrossOriginError = false;
-
- function handleWindowError(event) {
- error = event.error;
- didSetError = true;
-
- if (error === null && event.colno === 0 && event.lineno === 0) {
- isCrossOriginError = true;
- }
-
- if (event.defaultPrevented) {
- // Some other error handler has prevented default.
- // Browsers silence the error report if this happens.
- // We'll remember this to later decide whether to log it or not.
- if (error != null && typeof error === 'object') {
- try {
- error._suppressLogging = true;
- } catch (inner) {// Ignore.
- }
- }
- }
- } // Create a fake event type.
-
-
- var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
-
- window.addEventListener('error', handleWindowError);
- fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
- // errors, it will trigger our global error handler.
-
- evt.initEvent(evtType, false, false);
- fakeNode.dispatchEvent(evt);
-
- if (windowEventDescriptor) {
- Object.defineProperty(window, 'event', windowEventDescriptor);
- }
-
- if (didCall && didError) {
- if (!didSetError) {
- // The callback errored, but the error event never fired.
- error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
- } else if (isCrossOriginError) {
- error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
- }
-
- this.onError(error);
- } // Remove our event listeners
-
-
- window.removeEventListener('error', handleWindowError);
-
- if (!didCall) {
- // Something went really wrong, and our event was not dispatched.
- // https://github.com/facebook/react/issues/16734
- // https://github.com/facebook/react/issues/16585
- // Fall back to the production implementation.
- restoreAfterDispatch();
- return invokeGuardedCallbackProd.apply(this, arguments);
- }
- };
- }
-}
-
-var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
-
-var hasError = false;
-var caughtError = null; // Used by event system to capture/rethrow the first error.
-
-var hasRethrowError = false;
-var rethrowError = null;
-var reporter = {
- onError: function (error) {
- hasError = true;
- caughtError = error;
- }
-};
-/**
- * Call a function while guarding against errors that happens within it.
- * Returns an error if it throws, otherwise null.
- *
- * In production, this is implemented using a try-catch. The reason we don't
- * use a try-catch directly is so that we can swap out a different
- * implementation in DEV mode.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
-function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
- hasError = false;
- caughtError = null;
- invokeGuardedCallbackImpl$1.apply(reporter, arguments);
-}
-/**
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
- * TODO: See if caughtError and rethrowError can be unified.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
-function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
- invokeGuardedCallback.apply(this, arguments);
-
- if (hasError) {
- var error = clearCaughtError();
-
- if (!hasRethrowError) {
- hasRethrowError = true;
- rethrowError = error;
- }
- }
-}
-/**
- * During execution of guarded functions we will capture the first error which
- * we will rethrow to be handled by the top level error handler.
- */
-
-function rethrowCaughtError() {
- if (hasRethrowError) {
- var error = rethrowError;
- hasRethrowError = false;
- rethrowError = null;
- throw error;
- }
-}
-function clearCaughtError() {
- if (hasError) {
- var error = caughtError;
- hasError = false;
- caughtError = null;
- return error;
- } else {
- {
- {
- throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-}
-
-var EventInternals$2 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
-var getInstanceFromNode = EventInternals$2[0];
-var getNodeFromInstance = EventInternals$2[1];
-var getFiberCurrentPropsFromNode = EventInternals$2[2];
-var enqueueStateRestore = EventInternals$2[3];
-var restoreStateIfNeeded = EventInternals$2[4]; // const flushPassiveEffects = EventInternals[5];
-// TODO: This is related to `act`, not events. Move to separate key?
-// const IsThisRendererActing = EventInternals[6];
-
-function Event(suffix) {}
-
-var hasWarnedAboutDeprecatedMockComponent = false;
-/**
- * @class ReactTestUtils
- */
-
-function findAllInRenderedFiberTreeInternal(fiber, test) {
- if (!fiber) {
- return [];
- }
-
- var currentParent = findCurrentFiberUsingSlowPath(fiber);
-
- if (!currentParent) {
- return [];
- }
-
- var node = currentParent;
- var ret = [];
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText || node.tag === ClassComponent || node.tag === FunctionComponent) {
- var publicInst = node.stateNode;
-
- if (test(publicInst)) {
- ret.push(publicInst);
- }
- }
-
- if (node.child) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return ret;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return ret;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
-}
-
-function validateClassInstance(inst, methodName) {
- if (!inst) {
- // This is probably too relaxed but it's existing behavior.
- return;
- }
-
- if (get(inst)) {
- // This is a public instance indeed.
- return;
- }
-
- var received;
- var stringified = '' + inst;
-
- if (Array.isArray(inst)) {
- received = 'an array';
- } else if (inst && inst.nodeType === ELEMENT_NODE && inst.tagName) {
- received = 'a DOM node';
- } else if (stringified === '[object Object]') {
- received = 'object with keys {' + Object.keys(inst).join(', ') + '}';
- } else {
- received = stringified;
- }
-
- {
- {
- throw Error( methodName + "(...): the first argument must be a React class instance. Instead received: " + received + "." );
- }
- }
-}
-/**
- * Utilities for making it easy to test React components.
- *
- * See https://reactjs.org/docs/test-utils.html
- *
- * Todo: Support the entire DOM.scry query syntax. For now, these simple
- * utilities will suffice for testing purposes.
- * @lends ReactTestUtils
- */
-
-
-function renderIntoDocument(element) {
- var div = document.createElement('div'); // None of our tests actually require attaching the container to the
- // DOM, and doing so creates a mess that we rely on test isolation to
- // clean up, so we're going to stop honoring the name of this method
- // (and probably rename it eventually) if no problems arise.
- // document.documentElement.appendChild(div);
-
- return ReactDOM.render(element, div);
-}
-
-function isElement(element) {
- return React.isValidElement(element);
-}
-
-function isElementOfType(inst, convenienceConstructor) {
- return React.isValidElement(inst) && inst.type === convenienceConstructor;
-}
-
-function isDOMComponent(inst) {
- return !!(inst && inst.nodeType === ELEMENT_NODE && inst.tagName);
-}
-
-function isDOMComponentElement(inst) {
- return !!(inst && React.isValidElement(inst) && !!inst.tagName);
-}
-
-function isCompositeComponent(inst) {
- if (isDOMComponent(inst)) {
- // Accessing inst.setState warns; just return false as that'll be what
- // this returns when we have DOM nodes as refs directly
- return false;
- }
-
- return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';
-}
-
-function isCompositeComponentWithType(inst, type) {
- if (!isCompositeComponent(inst)) {
- return false;
- }
-
- var internalInstance = get(inst);
- var constructor = internalInstance.type;
- return constructor === type;
-}
-
-function findAllInRenderedTree(inst, test) {
- validateClassInstance(inst, 'findAllInRenderedTree');
-
- if (!inst) {
- return [];
- }
-
- var internalInstance = get(inst);
- return findAllInRenderedFiberTreeInternal(internalInstance, test);
-}
-/**
- * Finds all instance of components in the rendered tree that are DOM
- * components with the class name matching `className`.
- * @return {array} an array of all the matches.
- */
-
-
-function scryRenderedDOMComponentsWithClass(root, classNames) {
- validateClassInstance(root, 'scryRenderedDOMComponentsWithClass');
- return findAllInRenderedTree(root, function (inst) {
- if (isDOMComponent(inst)) {
- var className = inst.className;
-
- if (typeof className !== 'string') {
- // SVG, probably.
- className = inst.getAttribute('class') || '';
- }
-
- var classList = className.split(/\s+/);
-
- if (!Array.isArray(classNames)) {
- if (!(classNames !== undefined)) {
- {
- throw Error( "TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument." );
- }
- }
-
- classNames = classNames.split(/\s+/);
- }
-
- return classNames.every(function (name) {
- return classList.indexOf(name) !== -1;
- });
- }
-
- return false;
- });
-}
-/**
- * Like scryRenderedDOMComponentsWithClass but expects there to be one result,
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactDOMComponent} The one match.
- */
-
-
-function findRenderedDOMComponentWithClass(root, className) {
- validateClassInstance(root, 'findRenderedDOMComponentWithClass');
- var all = scryRenderedDOMComponentsWithClass(root, className);
-
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);
- }
-
- return all[0];
-}
-/**
- * Finds all instance of components in the rendered tree that are DOM
- * components with the tag name matching `tagName`.
- * @return {array} an array of all the matches.
- */
-
-
-function scryRenderedDOMComponentsWithTag(root, tagName) {
- validateClassInstance(root, 'scryRenderedDOMComponentsWithTag');
- return findAllInRenderedTree(root, function (inst) {
- return isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();
- });
-}
-/**
- * Like scryRenderedDOMComponentsWithTag but expects there to be one result,
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactDOMComponent} The one match.
- */
-
-
-function findRenderedDOMComponentWithTag(root, tagName) {
- validateClassInstance(root, 'findRenderedDOMComponentWithTag');
- var all = scryRenderedDOMComponentsWithTag(root, tagName);
-
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);
- }
-
- return all[0];
-}
-/**
- * Finds all instances of components with type equal to `componentType`.
- * @return {array} an array of all the matches.
- */
-
-
-function scryRenderedComponentsWithType(root, componentType) {
- validateClassInstance(root, 'scryRenderedComponentsWithType');
- return findAllInRenderedTree(root, function (inst) {
- return isCompositeComponentWithType(inst, componentType);
- });
-}
-/**
- * Same as `scryRenderedComponentsWithType` but expects there to be one result
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactComponent} The one match.
- */
-
-
-function findRenderedComponentWithType(root, componentType) {
- validateClassInstance(root, 'findRenderedComponentWithType');
- var all = scryRenderedComponentsWithType(root, componentType);
-
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);
- }
-
- return all[0];
-}
-/**
- * Pass a mocked component module to this method to augment it with
- * useful methods that allow it to be used as a dummy React component.
- * Instead of rendering as usual, the component will become a simple
- * <div> containing any provided children.
- *
- * @param {object} module the mock function object exported from a
- * module that defines the component to be mocked
- * @param {?string} mockTagName optional dummy root tag name to return
- * from render method (overrides
- * module.mockTagName if provided)
- * @return {object} the ReactTestUtils object (for chaining)
- */
-
-
-function mockComponent(module, mockTagName) {
- {
- if (!hasWarnedAboutDeprecatedMockComponent) {
- hasWarnedAboutDeprecatedMockComponent = true;
-
- warn('ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + 'See https://reactjs.org/link/test-utils-mock-component for more information.');
- }
- }
-
- mockTagName = mockTagName || module.mockTagName || 'div';
- module.prototype.render.mockImplementation(function () {
- return React.createElement(mockTagName, null, this.props.children);
- });
- return this;
-}
-
-function nativeTouchData(x, y) {
- return {
- touches: [{
- pageX: x,
- pageY: y
- }]
- };
-} // Start of inline: the below functions were inlined from
-// EventPropagator.js, as they deviated from ReactDOM's newer
-// implementations.
-
-/**
- * Dispatch the event to the listener.
- * @param {SyntheticEvent} event SyntheticEvent to handle
- * @param {function} listener Application-level callback
- * @param {*} inst Internal component instance
- */
-
-
-function executeDispatch(event, listener, inst) {
- var type = event.type || 'unknown-event';
- event.currentTarget = getNodeFromInstance(inst);
- invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
- event.currentTarget = null;
-}
-/**
- * Standard/simple iteration through an event's collected dispatches.
- */
-
-
-function executeDispatchesInOrder(event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
-
- if (Array.isArray(dispatchListeners)) {
- for (var i = 0; i < dispatchListeners.length; i++) {
- if (event.isPropagationStopped()) {
- break;
- } // Listeners and Instances are two parallel arrays that are always in sync.
-
-
- executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
- }
- } else if (dispatchListeners) {
- executeDispatch(event, dispatchListeners, dispatchInstances);
- }
-
- event._dispatchListeners = null;
- event._dispatchInstances = null;
-}
-/**
- * Dispatches an event and releases it back into the pool, unless persistent.
- *
- * @param {?object} event Synthetic event to be dispatched.
- * @private
- */
-
-
-var executeDispatchesAndRelease = function (event) {
- if (event) {
- executeDispatchesInOrder(event);
-
- if (!event.isPersistent()) {
- event.constructor.release(event);
- }
- }
-};
-
-function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
-}
-
-function getParent(inst) {
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
-
- if (inst) {
- return inst;
- }
-
- return null;
-}
-/**
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
- */
-
-
-function traverseTwoPhase(inst, fn, arg) {
- var path = [];
-
- while (inst) {
- path.push(inst);
- inst = getParent(inst);
- }
-
- var i;
-
- for (i = path.length; i-- > 0;) {
- fn(path[i], 'captured', arg);
- }
-
- for (i = 0; i < path.length; i++) {
- fn(path[i], 'bubbled', arg);
- }
-}
-
-function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
-
- default:
- return false;
- }
-}
-/**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
-
-
-function getListener(inst, registrationName) {
- // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
- // live here; needs to be moved to a better place soon
- var stateNode = inst.stateNode;
-
- if (!stateNode) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
-
- var props = getFiberCurrentPropsFromNode(stateNode);
-
- if (!props) {
- // Work in progress.
- return null;
- }
-
- var listener = props[registrationName];
-
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
-
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
-
- return listener;
-}
-
-function listenerAtPhase(inst, event, propagationPhase) {
- var registrationName = event._reactName;
-
- if (propagationPhase === 'captured') {
- registrationName += 'Capture';
- }
-
- return getListener(inst, registrationName);
-}
-
-function accumulateDispatches(inst, ignoredDirection, event) {
- if (inst && event && event._reactName) {
- var registrationName = event._reactName;
- var listener = getListener(inst, registrationName);
-
- if (listener) {
- if (event._dispatchListeners == null) {
- event._dispatchListeners = [];
- }
-
- if (event._dispatchInstances == null) {
- event._dispatchInstances = [];
- }
-
- event._dispatchListeners.push(listener);
-
- event._dispatchInstances.push(inst);
- }
- }
-}
-
-function accumulateDirectionalDispatches(inst, phase, event) {
- {
- if (!inst) {
- error('Dispatching inst must not be null');
- }
- }
-
- var listener = listenerAtPhase(inst, event, phase);
-
- if (listener) {
- if (event._dispatchListeners == null) {
- event._dispatchListeners = [];
- }
-
- if (event._dispatchInstances == null) {
- event._dispatchInstances = [];
- }
-
- event._dispatchListeners.push(listener);
-
- event._dispatchInstances.push(inst);
- }
-}
-
-function accumulateDirectDispatchesSingle(event) {
- if (event && event._reactName) {
- accumulateDispatches(event._targetInst, null, event);
- }
-}
-
-function accumulateTwoPhaseDispatchesSingle(event) {
- if (event && event._reactName) {
- traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
- }
-} // End of inline
-
-
-var Simulate = {};
-var directDispatchEventTypes = new Set(['mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave']);
-/**
- * Exports:
- *
- * - `Simulate.click(Element)`
- * - `Simulate.mouseMove(Element)`
- * - `Simulate.change(Element)`
- * - ... (All keys from event plugin `eventTypes` objects)
- */
-
-function makeSimulator(eventType) {
- return function (domNode, eventData) {
- if (!!React.isValidElement(domNode)) {
- {
- throw Error( "TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note that TestUtils.Simulate will not work if you are using shallow rendering." );
- }
- }
-
- if (!!isCompositeComponent(domNode)) {
- {
- throw Error( "TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead." );
- }
- }
-
- var reactName = 'on' + eventType[0].toUpperCase() + eventType.slice(1);
- var fakeNativeEvent = new Event();
- fakeNativeEvent.target = domNode;
- fakeNativeEvent.type = eventType.toLowerCase();
- var targetInst = getInstanceFromNode(domNode);
- var event = new SyntheticEvent(reactName, fakeNativeEvent.type, targetInst, fakeNativeEvent, domNode); // Since we aren't using pooling, always persist the event. This will make
- // sure it's marked and won't warn when setting additional properties.
-
- event.persist();
-
- _assign(event, eventData);
-
- if (directDispatchEventTypes.has(eventType)) {
- accumulateDirectDispatchesSingle(event);
- } else {
- accumulateTwoPhaseDispatchesSingle(event);
- }
-
- ReactDOM.unstable_batchedUpdates(function () {
- // Normally extractEvent enqueues a state restore, but we'll just always
- // do that since we're by-passing it here.
- enqueueStateRestore(domNode);
- executeDispatchesAndRelease(event);
- rethrowCaughtError();
- });
- restoreStateIfNeeded();
- };
-} // A one-time snapshot with no plans to update. We'll probably want to deprecate Simulate API.
-
-
-var simulatedEventTypes = ['blur', 'cancel', 'click', 'close', 'contextMenu', 'copy', 'cut', 'auxClick', 'doubleClick', 'dragEnd', 'dragStart', 'drop', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'mouseDown', 'mouseUp', 'paste', 'pause', 'play', 'pointerCancel', 'pointerDown', 'pointerUp', 'rateChange', 'reset', 'seeked', 'submit', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'drag', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'mouseMove', 'mouseOut', 'mouseOver', 'pointerMove', 'pointerOut', 'pointerOver', 'scroll', 'toggle', 'touchMove', 'wheel', 'abort', 'animationEnd', 'animationIteration', 'animationStart', 'canPlay', 'canPlayThrough', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'playing', 'progress', 'seeking', 'stalled', 'suspend', 'timeUpdate', 'transitionEnd', 'waiting', 'mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave', 'change', 'select', 'beforeInput', 'compositionEnd', 'compositionStart', 'compositionUpdate'];
-
-function buildSimulators() {
- simulatedEventTypes.forEach(function (eventType) {
- Simulate[eventType] = makeSimulator(eventType);
- });
-}
-
-buildSimulators();
-
-exports.Simulate = Simulate;
-exports.act = act;
-exports.findAllInRenderedTree = findAllInRenderedTree;
-exports.findRenderedComponentWithType = findRenderedComponentWithType;
-exports.findRenderedDOMComponentWithClass = findRenderedDOMComponentWithClass;
-exports.findRenderedDOMComponentWithTag = findRenderedDOMComponentWithTag;
-exports.isCompositeComponent = isCompositeComponent;
-exports.isCompositeComponentWithType = isCompositeComponentWithType;
-exports.isDOMComponent = isDOMComponent;
-exports.isDOMComponentElement = isDOMComponentElement;
-exports.isElement = isElement;
-exports.isElementOfType = isElementOfType;
-exports.mockComponent = mockComponent;
-exports.nativeTouchData = nativeTouchData;
-exports.renderIntoDocument = renderIntoDocument;
-exports.scryRenderedComponentsWithType = scryRenderedComponentsWithType;
-exports.scryRenderedDOMComponentsWithClass = scryRenderedDOMComponentsWithClass;
-exports.scryRenderedDOMComponentsWithTag = scryRenderedDOMComponentsWithTag;
-exports.traverseTwoPhase = traverseTwoPhase;
-exports.unstable_concurrentAct = unstable_concurrentAct;
- })();
-}
diff --git a/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js b/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js
deleted file mode 100644
index 64f9692..0000000
--- a/node_modules/react-dom/cjs/react-dom-test-utils.production.min.js
+++ /dev/null
@@ -1,43 +0,0 @@
-/** @license React v17.0.2
- * react-dom-test-utils.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var h=require("object-assign"),l=require("react"),m=require("react-dom"),n=require("scheduler");function p(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var q=l.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-function r(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function t(a){if(r(a)!==a)throw Error(p(188));}
-function aa(a){var b=a.alternate;if(!b){b=r(a);if(null===b)throw Error(p(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var g=e.alternate;if(null===g){d=e.return;if(null!==d){c=d;continue}break}if(e.child===g.child){for(g=e.child;g;){if(g===c)return t(e),a;if(g===d)return t(e),b;g=g.sibling}throw Error(p(188));}if(c.return!==d.return)c=e,d=g;else{for(var f=!1,k=e.child;k;){if(k===c){f=!0;c=e;d=g;break}if(k===d){f=!0;d=e;c=g;break}k=k.sibling}if(!f){for(k=g.child;k;){if(k===
-c){f=!0;c=g;d=e;break}if(k===d){f=!0;d=g;c=e;break}k=k.sibling}if(!f)throw Error(p(189));}}if(c.alternate!==d)throw Error(p(190));}if(3!==c.tag)throw Error(p(188));return c.stateNode.current===c?a:b}function u(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function v(){return!0}function w(){return!1}
-function x(a){function b(c,b,e,g,f){this._reactName=c;this._targetInst=e;this.type=b;this.nativeEvent=g;this.target=f;this.currentTarget=null;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],this[d]=c?c(g):g[d]);this.isDefaultPrevented=(null!=g.defaultPrevented?g.defaultPrevented:!1===g.returnValue)?v:w;this.isPropagationStopped=w;return this}h(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&
-(a.returnValue=!1),this.isDefaultPrevented=v)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=v)},persist:function(){},isPersistent:v});return b}var y={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ba=x(y),z=h({},y,{view:0,detail:0});x(z);
-var A,B,C,E=h({},z,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:D,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==C&&(C&&"mousemove"===a.type?(A=a.screenX-C.screenX,B=a.screenY-C.screenY):B=A=0,C=a);return A},movementY:function(a){return"movementY"in a?a.movementY:B}});
-x(E);var da=h({},E,{dataTransfer:0});x(da);var ea=h({},z,{relatedTarget:0});x(ea);var fa=h({},y,{animationName:0,elapsedTime:0,pseudoElement:0});x(fa);var ha=h({},y,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});x(ha);var ia=h({},y,{data:0});x(ia);
-var ja={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ka={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
-116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},la={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ma(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=la[a])?!!b[a]:!1}function D(){return ma}
-var na=h({},z,{key:function(a){if(a.key){var b=ja[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=u(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?ka[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:D,charCode:function(a){return"keypress"===a.type?u(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
-a.type?u(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});x(na);var oa=h({},E,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});x(oa);var pa=h({},z,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:D});x(pa);var qa=h({},y,{propertyName:0,elapsedTime:0,pseudoElement:0});x(qa);
-var ra=h({},E,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0});x(ra);var F=null;function G(a){if(null===F)try{var b=("require"+Math.random()).slice(0,7);F=(module&&module[b]).call(module,"timers").setImmediate}catch(c){F=function(a){var b=new MessageChannel;b.port1.onmessage=a;b.port2.postMessage(void 0)}}return F(a)}
-var H=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,sa=H[5],I=H[6],ta=m.unstable_batchedUpdates,J=q.IsSomeRendererActing,K="function"===typeof n.unstable_flushAllWithoutAsserting,L=n.unstable_flushAllWithoutAsserting||function(){for(var a=!1;sa();)a=!0;return a};function M(a){try{L(),G(function(){L()?M(a):a()})}catch(b){a(b)}}var N=0,ua=!1,O=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events[6],va=m.unstable_batchedUpdates,Q=q.IsSomeRendererActing;
-function wa(a,b){jest.runOnlyPendingTimers();G(function(){try{n.unstable_flushAllWithoutAsserting()?wa(a,b):a()}catch(c){b(c)}})}function xa(a,b,c,d,e,g,f,k,ca){var P=Array.prototype.slice.call(arguments,3);try{b.apply(c,P)}catch(Ga){this.onError(Ga)}}var R=!1,S=null,T=!1,U=null,ya={onError:function(a){R=!0;S=a}};function za(a,b,c,d,e,g,f,k,ca){R=!1;S=null;xa.apply(ya,arguments)}
-function Aa(a,b,c,d,e,g,f,k,ca){za.apply(this,arguments);if(R){if(R){var P=S;R=!1;S=null}else throw Error(p(198));T||(T=!0,U=P)}}var V=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events,Ba=V[0],Ca=V[1],Da=V[2],Ea=V[3],Fa=V[4];function Ha(){}
-function Ia(a,b){if(!a)return[];a=aa(a);if(!a)return[];for(var c=a,d=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var e=c.stateNode;b(e)&&d.push(e)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return d;for(;!c.sibling;){if(!c.return||c.return===a)return d;c=c.return}c.sibling.return=c.return;c=c.sibling}}}
-function W(a,b){if(a&&!a._reactInternals){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw Error(p(286,b,a));}}function X(a){return!(!a||1!==a.nodeType||!a.tagName)}function Y(a){return X(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState}function Ja(a,b){return Y(a)?a._reactInternals.type===b:!1}
-function Z(a,b){W(a,"findAllInRenderedTree");return a?Ia(a._reactInternals,b):[]}function Ka(a,b){W(a,"scryRenderedDOMComponentsWithClass");return Z(a,function(a){if(X(a)){var c=a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var e=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===b)throw Error(p(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==e.indexOf(a)})}return!1})}
-function La(a,b){W(a,"scryRenderedDOMComponentsWithTag");return Z(a,function(a){return X(a)&&a.tagName.toUpperCase()===b.toUpperCase()})}function Ma(a,b){W(a,"scryRenderedComponentsWithType");return Z(a,function(a){return Ja(a,b)})}function Na(a,b,c){var d=a.type||"unknown-event";a.currentTarget=Ca(c);Aa(d,b,void 0,a);a.currentTarget=null}
-function Oa(a,b,c){for(var d=[];a;){d.push(a);do a=a.return;while(a&&5!==a.tag);a=a?a:null}for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}
-function Pa(a,b){var c=a.stateNode;if(!c)return null;var d=Da(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(p(231,
-b,typeof c));return c}function Qa(a,b,c){a&&c&&c._reactName&&(b=Pa(a,c._reactName))&&(null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a))}
-function Ra(a,b,c){var d=c._reactName;"captured"===b&&(d+="Capture");if(b=Pa(a,d))null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a)}var Sa={},Ta=new Set(["mouseEnter","mouseLeave","pointerEnter","pointerLeave"]);
-function Ua(a){return function(b,c){if(l.isValidElement(b))throw Error(p(228));if(Y(b))throw Error(p(229));var d="on"+a[0].toUpperCase()+a.slice(1),e=new Ha;e.target=b;e.type=a.toLowerCase();var g=Ba(b),f=new ba(d,e.type,g,e,b);f.persist();h(f,c);Ta.has(a)?f&&f._reactName&&Qa(f._targetInst,null,f):f&&f._reactName&&Oa(f._targetInst,Ra,f);m.unstable_batchedUpdates(function(){Ea(b);if(f){var a=f._dispatchListeners,c=f._dispatchInstances;if(Array.isArray(a))for(var d=0;d<a.length&&!f.isPropagationStopped();d++)Na(f,
-a[d],c[d]);else a&&Na(f,a,c);f._dispatchListeners=null;f._dispatchInstances=null;f.isPersistent()||f.constructor.release(f)}if(T)throw a=U,T=!1,U=null,a;});Fa()}}
-"blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ").forEach(function(a){Sa[a]=Ua(a)});
-exports.Simulate=Sa;
-exports.act=function(a){function b(){N--;J.current=c;I.current=d}!1===ua&&(ua=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));N++;var c=J.current,d=I.current;J.current=!0;I.current=!0;try{var e=ta(a)}catch(g){throw b(),g;}if(null!==e&&"object"===typeof e&&"function"===typeof e.then)return{then:function(a,d){e.then(function(){1<N||!0===K&&!0===c?(b(),a()):M(function(c){b();c?d(c):a()})},function(a){b();d(a)})}};try{1!==N||!1!==K&&!1!==
-c||L(),b()}catch(g){throw b(),g;}return{then:function(a){a()}}};exports.findAllInRenderedTree=Z;exports.findRenderedComponentWithType=function(a,b){W(a,"findRenderedComponentWithType");a=Ma(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]};
-exports.findRenderedDOMComponentWithClass=function(a,b){W(a,"findRenderedDOMComponentWithClass");a=Ka(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for class:"+b);return a[0]};exports.findRenderedDOMComponentWithTag=function(a,b){W(a,"findRenderedDOMComponentWithTag");a=La(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]};exports.isCompositeComponent=Y;exports.isCompositeComponentWithType=Ja;
-exports.isDOMComponent=X;exports.isDOMComponentElement=function(a){return!!(a&&l.isValidElement(a)&&a.tagName)};exports.isElement=function(a){return l.isValidElement(a)};exports.isElementOfType=function(a,b){return l.isValidElement(a)&&a.type===b};exports.mockComponent=function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return l.createElement(b,null,this.props.children)});return this};exports.nativeTouchData=function(a,b){return{touches:[{pageX:a,pageY:b}]}};
-exports.renderIntoDocument=function(a){var b=document.createElement("div");return m.render(a,b)};exports.scryRenderedComponentsWithType=Ma;exports.scryRenderedDOMComponentsWithClass=Ka;exports.scryRenderedDOMComponentsWithTag=La;exports.traverseTwoPhase=Oa;
-exports.unstable_concurrentAct=function(a){function b(){Q.current=c;O.current=d}if(void 0===n.unstable_flushAllWithoutAsserting)throw Error("This version of `act` requires a special mock build of Scheduler.");if(!0!==setTimeout._isMockFunction)throw Error("This version of `act` requires Jest's timer mocks (i.e. jest.useFakeTimers).");var c=Q.current,d=O.current;Q.current=!0;O.current=!0;try{var e=va(a);if("object"===typeof e&&null!==e&&"function"===typeof e.then)return{then:function(a,c){e.then(function(){wa(function(){b();
-a()},function(a){b();c(a)})},function(a){b();c(a)})}};try{do var g=n.unstable_flushAllWithoutAsserting();while(g)}finally{b()}}catch(f){throw b(),f;}};
diff --git a/node_modules/react-dom/cjs/react-dom.development.js b/node_modules/react-dom/cjs/react-dom.development.js
deleted file mode 100644
index f0b9ee7..0000000
--- a/node_modules/react-dom/cjs/react-dom.development.js
+++ /dev/null
@@ -1,26262 +0,0 @@
-/** @license React v17.0.2
- * react-dom.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var React = require('react');
-var _assign = require('object-assign');
-var Scheduler = require('scheduler');
-var tracing = require('scheduler/tracing');
-
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
-// by calls to these methods by a Babel plugin.
-//
-// In PROD (or in packages without access to React internals),
-// they are left as they are instead.
-
-function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
-}
-function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
-}
-
-function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
-}
-
-if (!React) {
- {
- throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." );
- }
-}
-
-var FunctionComponent = 0;
-var ClassComponent = 1;
-var IndeterminateComponent = 2; // Before we know whether it is function or class
-
-var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
-
-var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
-
-var HostComponent = 5;
-var HostText = 6;
-var Fragment = 7;
-var Mode = 8;
-var ContextConsumer = 9;
-var ContextProvider = 10;
-var ForwardRef = 11;
-var Profiler = 12;
-var SuspenseComponent = 13;
-var MemoComponent = 14;
-var SimpleMemoComponent = 15;
-var LazyComponent = 16;
-var IncompleteClassComponent = 17;
-var DehydratedFragment = 18;
-var SuspenseListComponent = 19;
-var FundamentalComponent = 20;
-var ScopeComponent = 21;
-var Block = 22;
-var OffscreenComponent = 23;
-var LegacyHiddenComponent = 24;
-
-// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
-var enableProfilerTimer = true; // Record durations for commit and passive effects phases.
-
-var enableFundamentalAPI = false; // Experimental Scope support.
-var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)
-var warnAboutStringRefs = false;
-
-var allNativeEvents = new Set();
-/**
- * Mapping from registration name to event name
- */
-
-
-var registrationNameDependencies = {};
-/**
- * Mapping from lowercase registration names to the properly cased version,
- * used to warn in the case of missing event handlers. Available
- * only in true.
- * @type {Object}
- */
-
-var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
-
-function registerTwoPhaseEvent(registrationName, dependencies) {
- registerDirectEvent(registrationName, dependencies);
- registerDirectEvent(registrationName + 'Capture', dependencies);
-}
-function registerDirectEvent(registrationName, dependencies) {
- {
- if (registrationNameDependencies[registrationName]) {
- error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
- }
- }
-
- registrationNameDependencies[registrationName] = dependencies;
-
- {
- var lowerCasedName = registrationName.toLowerCase();
- possibleRegistrationNames[lowerCasedName] = registrationName;
-
- if (registrationName === 'onDoubleClick') {
- possibleRegistrationNames.ondblclick = registrationName;
- }
- }
-
- for (var i = 0; i < dependencies.length; i++) {
- allNativeEvents.add(dependencies[i]);
- }
-}
-
-var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
-
-// A reserved attribute.
-// It is handled by React separately and shouldn't be written to the DOM.
-var RESERVED = 0; // A simple string attribute.
-// Attributes that aren't in the filter are presumed to have this type.
-
-var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
-// "enumerated" attributes with "true" and "false" as possible values.
-// When true, it should be set to a "true" string.
-// When false, it should be set to a "false" string.
-
-var BOOLEANISH_STRING = 2; // A real boolean attribute.
-// When true, it should be present (set either to an empty string or its name).
-// When false, it should be omitted.
-
-var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
-// When true, it should be present (set either to an empty string or its name).
-// When false, it should be omitted.
-// For any other value, should be present with that value.
-
-var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
-// When falsy, it should be removed.
-
-var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
-// When falsy, it should be removed.
-
-var POSITIVE_NUMERIC = 6;
-
-/* eslint-disable max-len */
-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";
-/* eslint-enable max-len */
-
-var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
-var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
-var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var illegalAttributeNameCache = {};
-var validatedAttributeNameCache = {};
-function isAttributeNameSafe(attributeName) {
- if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
- return true;
- }
-
- if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
- return false;
- }
-
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
- validatedAttributeNameCache[attributeName] = true;
- return true;
- }
-
- illegalAttributeNameCache[attributeName] = true;
-
- {
- error('Invalid attribute name: `%s`', attributeName);
- }
-
- return false;
-}
-function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null) {
- return propertyInfo.type === RESERVED;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
- return true;
- }
-
- return false;
-}
-function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null && propertyInfo.type === RESERVED) {
- return false;
- }
-
- switch (typeof value) {
- case 'function': // $FlowIssue symbol is perfectly valid here
-
- case 'symbol':
- // eslint-disable-line
- return true;
-
- case 'boolean':
- {
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
- return !propertyInfo.acceptsBooleans;
- } else {
- var prefix = name.toLowerCase().slice(0, 5);
- return prefix !== 'data-' && prefix !== 'aria-';
- }
- }
-
- default:
- return false;
- }
-}
-function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
- if (value === null || typeof value === 'undefined') {
- return true;
- }
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
- return true;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
-
- switch (propertyInfo.type) {
- case BOOLEAN:
- return !value;
-
- case OVERLOADED_BOOLEAN:
- return value === false;
-
- case NUMERIC:
- return isNaN(value);
-
- case POSITIVE_NUMERIC:
- return isNaN(value) || value < 1;
- }
- }
-
- return false;
-}
-function getPropertyInfo(name) {
- return properties.hasOwnProperty(name) ? properties[name] : null;
-}
-
-function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
- this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
- this.attributeName = attributeName;
- this.attributeNamespace = attributeNamespace;
- this.mustUseProperty = mustUseProperty;
- this.propertyName = name;
- this.type = type;
- this.sanitizeURL = sanitizeURL;
- this.removeEmptyString = removeEmptyString;
-} // When adding attributes to this list, be sure to also add them to
-// the `possibleStandardNames` module to ensure casing and incorrect
-// name warnings.
-
-
-var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
-
-var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
-// elements (not just inputs). Now that ReactDOMInput assigns to the
-// defaultValue property -- do we need this?
-'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
-reservedProps.forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // A few React string attributes have a different name.
-// This is a mapping from React prop names to the attribute names.
-
-[['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
- var name = _ref[0],
- attributeName = _ref[1];
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are "enumerated" HTML attributes that accept "true" and "false".
-// In React, we let users pass `true` and `false` even though technically
-// these aren't boolean attributes (they are coerced to strings).
-
-['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are "enumerated" SVG attributes that accept "true" and "false".
-// In React, we let users pass `true` and `false` even though technically
-// these aren't boolean attributes (they are coerced to strings).
-// Since these are SVG attributes, their attribute names are case-sensitive.
-
-['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML boolean attributes.
-
-['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
-// on the client side because the browsers are inconsistent. Instead we call focus().
-'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
-'itemScope'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are the few React props that we set as DOM properties
-// rather than attributes. These are all booleans.
-
-['checked', // Note: `option.selected` is not updated if `select.multiple` is
-// disabled with `removeAttribute`. We have special logic for handling this.
-'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that are "overloaded booleans": they behave like
-// booleans, but can also accept a string value.
-
-['capture', 'download' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that must be positive numbers.
-
-['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These are HTML attributes that must be numbers.
-
-['rowSpan', 'start'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-});
-var CAMELIZE = /[\-\:]([a-z])/g;
-
-var capitalize = function (token) {
- return token[1].toUpperCase();
-}; // This is a list of all SVG attributes that need special casing, namespacing,
-// or boolean value assignment. Regular attributes that just accept strings
-// and have the same names are omitted, just like in the HTML attribute filter.
-// Some of these attributes can be hard to find. This list was created by
-// scraping the MDN documentation.
-
-
-['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' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // String SVG attributes with the xlink namespace.
-
-['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
- false);
-}); // String SVG attributes with the xml namespace.
-
-['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
-// you'll need to set attributeName to name.toLowerCase()
-// instead in the assignment below.
-].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
- false);
-}); // These attribute exists both in HTML and SVG.
-// The attribute name is case-sensitive in SVG so we can't just use
-// the React name like we do for attributes that exist only in HTML.
-
-['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
-}); // These attributes accept URLs. These must not allow javascript: URLS.
-// These will also need to accept Trusted Types object in the future.
-
-var xlinkHref = 'xlinkHref';
-properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
-'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
-false);
-['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- true, // sanitizeURL
- true);
-});
-
-// and any newline or tab are filtered out as if they're not part of the URL.
-// https://url.spec.whatwg.org/#url-parsing
-// Tab or newline are defined as \r\n\t:
-// https://infra.spec.whatwg.org/#ascii-tab-or-newline
-// A C0 control is a code point in the range \u0000 NULL to \u001F
-// INFORMATION SEPARATOR ONE, inclusive:
-// https://infra.spec.whatwg.org/#c0-control-or-space
-
-/* eslint-disable max-len */
-
-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;
-var didWarn = false;
-
-function sanitizeURL(url) {
- {
- if (!didWarn && isJavaScriptProtocol.test(url)) {
- didWarn = true;
-
- 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));
- }
- }
-}
-
-/**
- * Get the value for a property on a node. Only used in DEV for SSR validation.
- * The "expected" argument is used as a hint of what the expected value is.
- * Some properties have multiple equivalent values.
- */
-function getValueForProperty(node, name, expected, propertyInfo) {
- {
- if (propertyInfo.mustUseProperty) {
- var propertyName = propertyInfo.propertyName;
- return node[propertyName];
- } else {
- if ( propertyInfo.sanitizeURL) {
- // If we haven't fully disabled javascript: URLs, and if
- // the hydration is successful of a javascript: URL, we
- // still want to warn on the client.
- sanitizeURL('' + expected);
- }
-
- var attributeName = propertyInfo.attributeName;
- var stringValue = null;
-
- if (propertyInfo.type === OVERLOADED_BOOLEAN) {
- if (node.hasAttribute(attributeName)) {
- var value = node.getAttribute(attributeName);
-
- if (value === '') {
- return true;
- }
-
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- return value;
- }
-
- if (value === '' + expected) {
- return expected;
- }
-
- return value;
- }
- } else if (node.hasAttribute(attributeName)) {
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- // We had an attribute but shouldn't have had one, so read it
- // for the error message.
- return node.getAttribute(attributeName);
- }
-
- if (propertyInfo.type === BOOLEAN) {
- // If this was a boolean, it doesn't matter what the value is
- // the fact that we have it is the same as the expected.
- return expected;
- } // Even if this property uses a namespace we use getAttribute
- // because we assume its namespaced name is the same as our config.
- // To use getAttributeNS we need the local name which we don't have
- // in our config atm.
-
-
- stringValue = node.getAttribute(attributeName);
- }
-
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- return stringValue === null ? expected : stringValue;
- } else if (stringValue === '' + expected) {
- return expected;
- } else {
- return stringValue;
- }
- }
- }
-}
-/**
- * Get the value for a attribute on a node. Only used in DEV for SSR validation.
- * The third argument is used as a hint of what the expected value is. Some
- * attributes have multiple equivalent values.
- */
-
-function getValueForAttribute(node, name, expected) {
- {
- if (!isAttributeNameSafe(name)) {
- return;
- } // If the object is an opaque reference ID, it's expected that
- // the next prop is different than the server value, so just return
- // expected
-
-
- if (isOpaqueHydratingObject(expected)) {
- return expected;
- }
-
- if (!node.hasAttribute(name)) {
- return expected === undefined ? undefined : null;
- }
-
- var value = node.getAttribute(name);
-
- if (value === '' + expected) {
- return expected;
- }
-
- return value;
- }
-}
-/**
- * Sets the value for a property on a node.
- *
- * @param {DOMElement} node
- * @param {string} name
- * @param {*} value
- */
-
-function setValueForProperty(node, name, value, isCustomComponentTag) {
- var propertyInfo = getPropertyInfo(name);
-
- if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
- return;
- }
-
- if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
- value = null;
- } // If the prop isn't in the special list, treat it as a simple attribute.
-
-
- if (isCustomComponentTag || propertyInfo === null) {
- if (isAttributeNameSafe(name)) {
- var _attributeName = name;
-
- if (value === null) {
- node.removeAttribute(_attributeName);
- } else {
- node.setAttribute(_attributeName, '' + value);
- }
- }
-
- return;
- }
-
- var mustUseProperty = propertyInfo.mustUseProperty;
-
- if (mustUseProperty) {
- var propertyName = propertyInfo.propertyName;
-
- if (value === null) {
- var type = propertyInfo.type;
- node[propertyName] = type === BOOLEAN ? false : '';
- } else {
- // Contrary to `setAttribute`, object properties are properly
- // `toString`ed by IE8/9.
- node[propertyName] = value;
- }
-
- return;
- } // The rest are treated as attributes with special cases.
-
-
- var attributeName = propertyInfo.attributeName,
- attributeNamespace = propertyInfo.attributeNamespace;
-
- if (value === null) {
- node.removeAttribute(attributeName);
- } else {
- var _type = propertyInfo.type;
- var attributeValue;
-
- if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
- // If attribute type is boolean, we know for sure it won't be an execution sink
- // and we won't require Trusted Type here.
- attributeValue = '';
- } else {
- // `setAttribute` with objects becomes only `[object]` in IE8/9,
- // ('' + value) makes it output the correct toString()-value.
- {
- attributeValue = '' + value;
- }
-
- if (propertyInfo.sanitizeURL) {
- sanitizeURL(attributeValue.toString());
- }
- }
-
- if (attributeNamespace) {
- node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
- } else {
- node.setAttribute(attributeName, attributeValue);
- }
- }
-}
-
-// ATTENTION
-// When adding new symbols to this file,
-// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var REACT_ELEMENT_TYPE = 0xeac7;
-var REACT_PORTAL_TYPE = 0xeaca;
-var REACT_FRAGMENT_TYPE = 0xeacb;
-var REACT_STRICT_MODE_TYPE = 0xeacc;
-var REACT_PROFILER_TYPE = 0xead2;
-var REACT_PROVIDER_TYPE = 0xeacd;
-var REACT_CONTEXT_TYPE = 0xeace;
-var REACT_FORWARD_REF_TYPE = 0xead0;
-var REACT_SUSPENSE_TYPE = 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = 0xead8;
-var REACT_MEMO_TYPE = 0xead3;
-var REACT_LAZY_TYPE = 0xead4;
-var REACT_BLOCK_TYPE = 0xead9;
-var REACT_SERVER_BLOCK_TYPE = 0xeada;
-var REACT_FUNDAMENTAL_TYPE = 0xead5;
-var REACT_SCOPE_TYPE = 0xead7;
-var REACT_OPAQUE_ID_TYPE = 0xeae0;
-var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
-var REACT_OFFSCREEN_TYPE = 0xeae2;
-var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
-}
-
-var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
-var FAUX_ITERATOR_SYMBOL = '@@iterator';
-function getIteratorFn(maybeIterable) {
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
- return null;
- }
-
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
-
- if (typeof maybeIterator === 'function') {
- return maybeIterator;
- }
-
- return null;
-}
-
-// Helpers to patch console.logs to avoid logging during side-effect free
-// replaying on render function. This currently only patches the object
-// lazily which won't cover if the log function was extracted eagerly.
-// We could also eagerly patch the method.
-var disabledDepth = 0;
-var prevLog;
-var prevInfo;
-var prevWarn;
-var prevError;
-var prevGroup;
-var prevGroupCollapsed;
-var prevGroupEnd;
-
-function disabledLog() {}
-
-disabledLog.__reactDisabledLog = true;
-function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
-}
-function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: _assign({}, props, {
- value: prevLog
- }),
- info: _assign({}, props, {
- value: prevInfo
- }),
- warn: _assign({}, props, {
- value: prevWarn
- }),
- error: _assign({}, props, {
- value: prevError
- }),
- group: _assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: _assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: _assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
-}
-
-var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
-var prefix;
-function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
-}
-var reentry = false;
-var componentFrameCache;
-
-{
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
-}
-
-function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
-}
-
-function describeClassComponentFrame(ctor, source, ownerFn) {
- {
- return describeNativeComponentFrame(ctor, true);
- }
-}
-function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
-}
-
-function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
-}
-
-function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case REACT_SUSPENSE_TYPE:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
-}
-
-function describeFiber(fiber) {
- var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;
- var source = fiber._debugSource ;
-
- switch (fiber.tag) {
- case HostComponent:
- return describeBuiltInComponentFrame(fiber.type);
-
- case LazyComponent:
- return describeBuiltInComponentFrame('Lazy');
-
- case SuspenseComponent:
- return describeBuiltInComponentFrame('Suspense');
-
- case SuspenseListComponent:
- return describeBuiltInComponentFrame('SuspenseList');
-
- case FunctionComponent:
- case IndeterminateComponent:
- case SimpleMemoComponent:
- return describeFunctionComponentFrame(fiber.type);
-
- case ForwardRef:
- return describeFunctionComponentFrame(fiber.type.render);
-
- case Block:
- return describeFunctionComponentFrame(fiber.type._render);
-
- case ClassComponent:
- return describeClassComponentFrame(fiber.type);
-
- default:
- return '';
- }
-}
-
-function getStackByFiberInDevAndProd(workInProgress) {
- try {
- var info = '';
- var node = workInProgress;
-
- do {
- info += describeFiber(node);
- node = node.return;
- } while (node);
-
- return info;
- } catch (x) {
- return '\nError generating stack: ' + x.message + '\n' + x.stack;
- }
-}
-
-function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
-}
-
-function getContextName(type) {
- return type.displayName || 'Context';
-}
-
-function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case REACT_PROFILER_TYPE:
- return 'Profiler';
-
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
-
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
-}
-
-var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
-var current = null;
-var isRendering = false;
-function getCurrentFiberOwnerNameInDevOrNull() {
- {
- if (current === null) {
- return null;
- }
-
- var owner = current._debugOwner;
-
- if (owner !== null && typeof owner !== 'undefined') {
- return getComponentName(owner.type);
- }
- }
-
- return null;
-}
-
-function getCurrentFiberStackInDev() {
- {
- if (current === null) {
- return '';
- } // Safe because if current fiber exists, we are reconciling,
- // and it is guaranteed to be the work-in-progress version.
-
-
- return getStackByFiberInDevAndProd(current);
- }
-}
-
-function resetCurrentFiber() {
- {
- ReactDebugCurrentFrame.getCurrentStack = null;
- current = null;
- isRendering = false;
- }
-}
-function setCurrentFiber(fiber) {
- {
- ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
- current = fiber;
- isRendering = false;
- }
-}
-function setIsRendering(rendering) {
- {
- isRendering = rendering;
- }
-}
-function getIsRendering() {
- {
- return isRendering;
- }
-}
-
-// Flow does not allow string concatenation of most non-string types. To work
-// around this limitation, we use an opaque type that can only be obtained by
-// passing the value through getToStringValue first.
-function toString(value) {
- return '' + value;
-}
-function getToStringValue(value) {
- switch (typeof value) {
- case 'boolean':
- case 'number':
- case 'object':
- case 'string':
- case 'undefined':
- return value;
-
- default:
- // function, symbol are assigned as empty strings
- return '';
- }
-}
-
-var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
-};
-function checkControlledValueProps(tagName, props) {
- {
- if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
- 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`.');
- }
-
- if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
- 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`.');
- }
- }
-}
-
-function isCheckable(elem) {
- var type = elem.type;
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
-}
-
-function getTracker(node) {
- return node._valueTracker;
-}
-
-function detachTracker(node) {
- node._valueTracker = null;
-}
-
-function getValueFromNode(node) {
- var value = '';
-
- if (!node) {
- return value;
- }
-
- if (isCheckable(node)) {
- value = node.checked ? 'true' : 'false';
- } else {
- value = node.value;
- }
-
- return value;
-}
-
-function trackValueOnNode(node) {
- var valueField = isCheckable(node) ? 'checked' : 'value';
- var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
- var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
- // and don't track value will cause over reporting of changes,
- // but it's better then a hard failure
- // (needed for certain tests that spyOn input values and Safari)
-
- if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
- return;
- }
-
- var get = descriptor.get,
- set = descriptor.set;
- Object.defineProperty(node, valueField, {
- configurable: true,
- get: function () {
- return get.call(this);
- },
- set: function (value) {
- currentValue = '' + value;
- set.call(this, value);
- }
- }); // We could've passed this the first time
- // but it triggers a bug in IE11 and Edge 14/15.
- // Calling defineProperty() again should be equivalent.
- // https://github.com/facebook/react/issues/11768
-
- Object.defineProperty(node, valueField, {
- enumerable: descriptor.enumerable
- });
- var tracker = {
- getValue: function () {
- return currentValue;
- },
- setValue: function (value) {
- currentValue = '' + value;
- },
- stopTracking: function () {
- detachTracker(node);
- delete node[valueField];
- }
- };
- return tracker;
-}
-
-function track(node) {
- if (getTracker(node)) {
- return;
- } // TODO: Once it's just Fiber we can move this to node._wrapperState
-
-
- node._valueTracker = trackValueOnNode(node);
-}
-function updateValueIfChanged(node) {
- if (!node) {
- return false;
- }
-
- var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
- // that trying again will succeed
-
- if (!tracker) {
- return true;
- }
-
- var lastValue = tracker.getValue();
- var nextValue = getValueFromNode(node);
-
- if (nextValue !== lastValue) {
- tracker.setValue(nextValue);
- return true;
- }
-
- return false;
-}
-
-function getActiveElement(doc) {
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
-
- if (typeof doc === 'undefined') {
- return null;
- }
-
- try {
- return doc.activeElement || doc.body;
- } catch (e) {
- return doc.body;
- }
-}
-
-var didWarnValueDefaultValue = false;
-var didWarnCheckedDefaultChecked = false;
-var didWarnControlledToUncontrolled = false;
-var didWarnUncontrolledToControlled = false;
-
-function isControlled(props) {
- var usesChecked = props.type === 'checkbox' || props.type === 'radio';
- return usesChecked ? props.checked != null : props.value != null;
-}
-/**
- * Implements an <input> host component that allows setting these optional
- * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
- *
- * If `checked` or `value` are not supplied (or null/undefined), user actions
- * that affect the checked state or value will trigger updates to the element.
- *
- * If they are supplied (and not null/undefined), the rendered element will not
- * trigger updates to the element. Instead, the props must change in order for
- * the rendered element to be updated.
- *
- * The rendered element will be initialized as unchecked (or `defaultChecked`)
- * with an empty value (or `defaultValue`).
- *
- * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
- */
-
-
-function getHostProps(element, props) {
- var node = element;
- var checked = props.checked;
-
- var hostProps = _assign({}, props, {
- defaultChecked: undefined,
- defaultValue: undefined,
- value: undefined,
- checked: checked != null ? checked : node._wrapperState.initialChecked
- });
-
- return hostProps;
-}
-function initWrapperState(element, props) {
- {
- checkControlledValueProps('input', props);
-
- if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
- 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', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
-
- didWarnCheckedDefaultChecked = true;
- }
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
- 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', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
-
- didWarnValueDefaultValue = true;
- }
- }
-
- var node = element;
- var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
- node._wrapperState = {
- initialChecked: props.checked != null ? props.checked : props.defaultChecked,
- initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
- controlled: isControlled(props)
- };
-}
-function updateChecked(element, props) {
- var node = element;
- var checked = props.checked;
-
- if (checked != null) {
- setValueForProperty(node, 'checked', checked, false);
- }
-}
-function updateWrapper(element, props) {
- var node = element;
-
- {
- var controlled = isControlled(props);
-
- if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
- error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
-
- didWarnUncontrolledToControlled = true;
- }
-
- if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
- error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
-
- didWarnControlledToUncontrolled = true;
- }
- }
-
- updateChecked(element, props);
- var value = getToStringValue(props.value);
- var type = props.type;
-
- if (value != null) {
- if (type === 'number') {
- if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
- // eslint-disable-next-line
- node.value != value) {
- node.value = toString(value);
- }
- } else if (node.value !== toString(value)) {
- node.value = toString(value);
- }
- } else if (type === 'submit' || type === 'reset') {
- // Submit/reset inputs need the attribute removed completely to avoid
- // blank-text buttons.
- node.removeAttribute('value');
- return;
- }
-
- {
- // When syncing the value attribute, the value comes from a cascade of
- // properties:
- // 1. The value React property
- // 2. The defaultValue React property
- // 3. Otherwise there should be no change
- if (props.hasOwnProperty('value')) {
- setDefaultValue(node, props.type, value);
- } else if (props.hasOwnProperty('defaultValue')) {
- setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
- }
- }
-
- {
- // When syncing the checked attribute, it only changes when it needs
- // to be removed, such as transitioning from a checkbox into a text input
- if (props.checked == null && props.defaultChecked != null) {
- node.defaultChecked = !!props.defaultChecked;
- }
- }
-}
-function postMountWrapper(element, props, isHydrating) {
- var node = element; // Do not assign value if it is already set. This prevents user text input
- // from being lost during SSR hydration.
-
- if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
- var type = props.type;
- var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
- // default value provided by the browser. See: #12872
-
- if (isButton && (props.value === undefined || props.value === null)) {
- return;
- }
-
- var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
- // from being lost during SSR hydration.
-
- if (!isHydrating) {
- {
- // When syncing the value attribute, the value property should use
- // the wrapperState._initialValue property. This uses:
- //
- // 1. The value React property when present
- // 2. The defaultValue React property when present
- // 3. An empty string
- if (initialValue !== node.value) {
- node.value = initialValue;
- }
- }
- }
-
- {
- // Otherwise, the value attribute is synchronized to the property,
- // so we assign defaultValue to the same thing as the value property
- // assignment step above.
- node.defaultValue = initialValue;
- }
- } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
- // this is needed to work around a chrome bug where setting defaultChecked
- // will sometimes influence the value of checked (even after detachment).
- // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
- // We need to temporarily unset name to avoid disrupting radio button groups.
-
-
- var name = node.name;
-
- if (name !== '') {
- node.name = '';
- }
-
- {
- // When syncing the checked attribute, both the checked property and
- // attribute are assigned at the same time using defaultChecked. This uses:
- //
- // 1. The checked React property when present
- // 2. The defaultChecked React property when present
- // 3. Otherwise, false
- node.defaultChecked = !node.defaultChecked;
- node.defaultChecked = !!node._wrapperState.initialChecked;
- }
-
- if (name !== '') {
- node.name = name;
- }
-}
-function restoreControlledState(element, props) {
- var node = element;
- updateWrapper(node, props);
- updateNamedCousins(node, props);
-}
-
-function updateNamedCousins(rootNode, props) {
- var name = props.name;
-
- if (props.type === 'radio' && name != null) {
- var queryRoot = rootNode;
-
- while (queryRoot.parentNode) {
- queryRoot = queryRoot.parentNode;
- } // If `rootNode.form` was non-null, then we could try `form.elements`,
- // but that sometimes behaves strangely in IE8. We could also try using
- // `form.getElementsByName`, but that will only return direct children
- // and won't include inputs that use the HTML5 `form=` attribute. Since
- // the input might not even be in a form. It might not even be in the
- // document. Let's just use the local `querySelectorAll` to ensure we don't
- // miss anything.
-
-
- var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
-
- for (var i = 0; i < group.length; i++) {
- var otherNode = group[i];
-
- if (otherNode === rootNode || otherNode.form !== rootNode.form) {
- continue;
- } // This will throw if radio buttons rendered by different copies of React
- // and the same name are rendered into the same form (same as #1939).
- // That's probably okay; we don't support it just as we don't support
- // mixing React radio buttons with non-React ones.
-
-
- var otherProps = getFiberCurrentPropsFromNode(otherNode);
-
- if (!otherProps) {
- {
- throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." );
- }
- } // We need update the tracked value on the named cousin since the value
- // was changed but the input saw no event or value set
-
-
- updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
- // was previously checked to update will cause it to be come re-checked
- // as appropriate.
-
- updateWrapper(otherNode, otherProps);
- }
- }
-} // In Chrome, assigning defaultValue to certain input types triggers input validation.
-// For number inputs, the display value loses trailing decimal points. For email inputs,
-// Chrome raises "The specified value <x> is not a valid email address".
-//
-// Here we check to see if the defaultValue has actually changed, avoiding these problems
-// when the user is inputting text
-//
-// https://github.com/facebook/react/issues/7253
-
-
-function setDefaultValue(node, type, value) {
- if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
- type !== 'number' || getActiveElement(node.ownerDocument) !== node) {
- if (value == null) {
- node.defaultValue = toString(node._wrapperState.initialValue);
- } else if (node.defaultValue !== toString(value)) {
- node.defaultValue = toString(value);
- }
- }
-}
-
-var didWarnSelectedSetOnOption = false;
-var didWarnInvalidChild = false;
-
-function flattenChildren(children) {
- var content = ''; // Flatten children. We'll warn if they are invalid
- // during validateProps() which runs for hydration too.
- // Note that this would throw on non-element objects.
- // Elements are stringified (which is normally irrelevant
- // but matters for <fbt>).
-
- React.Children.forEach(children, function (child) {
- if (child == null) {
- return;
- }
-
- content += child; // Note: we don't warn about invalid children here.
- // Instead, this is done separately below so that
- // it happens during the hydration code path too.
- });
- return content;
-}
-/**
- * Implements an <option> host component that warns when `selected` is set.
- */
-
-
-function validateProps(element, props) {
- {
- // This mirrors the code path above, but runs for hydration too.
- // Warn about invalid children here so that client and hydration are consistent.
- // TODO: this seems like it could cause a DEV-only throw for hydration
- // if children contains a non-element object. We should try to avoid that.
- if (typeof props.children === 'object' && props.children !== null) {
- React.Children.forEach(props.children, function (child) {
- if (child == null) {
- return;
- }
-
- if (typeof child === 'string' || typeof child === 'number') {
- return;
- }
-
- if (typeof child.type !== 'string') {
- return;
- }
-
- if (!didWarnInvalidChild) {
- didWarnInvalidChild = true;
-
- error('Only strings and numbers are supported as <option> children.');
- }
- });
- } // TODO: Remove support for `selected` in <option>.
-
-
- if (props.selected != null && !didWarnSelectedSetOnOption) {
- error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
-
- didWarnSelectedSetOnOption = true;
- }
- }
-}
-function postMountWrapper$1(element, props) {
- // value="" should make a value attribute (#6219)
- if (props.value != null) {
- element.setAttribute('value', toString(getToStringValue(props.value)));
- }
-}
-function getHostProps$1(element, props) {
- var hostProps = _assign({
- children: undefined
- }, props);
-
- var content = flattenChildren(props.children);
-
- if (content) {
- hostProps.children = content;
- }
-
- return hostProps;
-}
-
-var didWarnValueDefaultValue$1;
-
-{
- didWarnValueDefaultValue$1 = false;
-}
-
-function getDeclarationErrorAddendum() {
- var ownerName = getCurrentFiberOwnerNameInDevOrNull();
-
- if (ownerName) {
- return '\n\nCheck the render method of `' + ownerName + '`.';
- }
-
- return '';
-}
-
-var valuePropNames = ['value', 'defaultValue'];
-/**
- * Validation function for `value` and `defaultValue`.
- */
-
-function checkSelectPropTypes(props) {
- {
- checkControlledValueProps('select', props);
-
- for (var i = 0; i < valuePropNames.length; i++) {
- var propName = valuePropNames[i];
-
- if (props[propName] == null) {
- continue;
- }
-
- var isArray = Array.isArray(props[propName]);
-
- if (props.multiple && !isArray) {
- error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
- } else if (!props.multiple && isArray) {
- error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
- }
- }
- }
-}
-
-function updateOptions(node, multiple, propValue, setDefaultSelected) {
- var options = node.options;
-
- if (multiple) {
- var selectedValues = propValue;
- var selectedValue = {};
-
- for (var i = 0; i < selectedValues.length; i++) {
- // Prefix to avoid chaos with special keys.
- selectedValue['$' + selectedValues[i]] = true;
- }
-
- for (var _i = 0; _i < options.length; _i++) {
- var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
-
- if (options[_i].selected !== selected) {
- options[_i].selected = selected;
- }
-
- if (selected && setDefaultSelected) {
- options[_i].defaultSelected = true;
- }
- }
- } else {
- // Do not set `select.value` as exact behavior isn't consistent across all
- // browsers for all cases.
- var _selectedValue = toString(getToStringValue(propValue));
-
- var defaultSelected = null;
-
- for (var _i2 = 0; _i2 < options.length; _i2++) {
- if (options[_i2].value === _selectedValue) {
- options[_i2].selected = true;
-
- if (setDefaultSelected) {
- options[_i2].defaultSelected = true;
- }
-
- return;
- }
-
- if (defaultSelected === null && !options[_i2].disabled) {
- defaultSelected = options[_i2];
- }
- }
-
- if (defaultSelected !== null) {
- defaultSelected.selected = true;
- }
- }
-}
-/**
- * Implements a <select> host component that allows optionally setting the
- * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
- * stringable. If `multiple` is true, the prop must be an array of stringables.
- *
- * If `value` is not supplied (or null/undefined), user actions that change the
- * selected option will trigger updates to the rendered options.
- *
- * If it is supplied (and not null/undefined), the rendered options will not
- * update in response to user actions. Instead, the `value` prop must change in
- * order for the rendered options to update.
- *
- * If `defaultValue` is provided, any options with the supplied values will be
- * selected.
- */
-
-
-function getHostProps$2(element, props) {
- return _assign({}, props, {
- value: undefined
- });
-}
-function initWrapperState$1(element, props) {
- var node = element;
-
- {
- checkSelectPropTypes(props);
- }
-
- node._wrapperState = {
- wasMultiple: !!props.multiple
- };
-
- {
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
- 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');
-
- didWarnValueDefaultValue$1 = true;
- }
- }
-}
-function postMountWrapper$2(element, props) {
- var node = element;
- node.multiple = !!props.multiple;
- var value = props.value;
-
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- } else if (props.defaultValue != null) {
- updateOptions(node, !!props.multiple, props.defaultValue, true);
- }
-}
-function postUpdateWrapper(element, props) {
- var node = element;
- var wasMultiple = node._wrapperState.wasMultiple;
- node._wrapperState.wasMultiple = !!props.multiple;
- var value = props.value;
-
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- } else if (wasMultiple !== !!props.multiple) {
- // For simplicity, reapply `defaultValue` if `multiple` is toggled.
- if (props.defaultValue != null) {
- updateOptions(node, !!props.multiple, props.defaultValue, true);
- } else {
- // Revert the select back to its default unselected state.
- updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
- }
- }
-}
-function restoreControlledState$1(element, props) {
- var node = element;
- var value = props.value;
-
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- }
-}
-
-var didWarnValDefaultVal = false;
-
-/**
- * Implements a <textarea> host component that allows setting `value`, and
- * `defaultValue`. This differs from the traditional DOM API because value is
- * usually set as PCDATA children.
- *
- * If `value` is not supplied (or null/undefined), user actions that affect the
- * value will trigger updates to the element.
- *
- * If `value` is supplied (and not null/undefined), the rendered element will
- * not trigger updates to the element. Instead, the `value` prop must change in
- * order for the rendered element to be updated.
- *
- * The rendered element will be initialized with an empty value, the prop
- * `defaultValue` if specified, or the children content (deprecated).
- */
-function getHostProps$3(element, props) {
- var node = element;
-
- if (!(props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." );
- }
- } // Always set children to the same thing. In IE9, the selection range will
- // get reset if `textContent` is mutated. We could add a check in setTextContent
- // to only set the value if/when the value differs from the node value (which would
- // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
- // solution. The value can be a boolean or object so that's why it's forced
- // to be a string.
-
-
- var hostProps = _assign({}, props, {
- value: undefined,
- defaultValue: undefined,
- children: toString(node._wrapperState.initialValue)
- });
-
- return hostProps;
-}
-function initWrapperState$2(element, props) {
- var node = element;
-
- {
- checkControlledValueProps('textarea', props);
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
- error('%s contains a textarea with both value and defaultValue props. ' + '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', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
-
- didWarnValDefaultVal = true;
- }
- }
-
- var initialValue = props.value; // Only bother fetching default value if we're going to use it
-
- if (initialValue == null) {
- var children = props.children,
- defaultValue = props.defaultValue;
-
- if (children != null) {
- {
- error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
- }
-
- {
- if (!(defaultValue == null)) {
- {
- throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
- }
- }
-
- if (Array.isArray(children)) {
- if (!(children.length <= 1)) {
- {
- throw Error( "<textarea> can only have at most one child." );
- }
- }
-
- children = children[0];
- }
-
- defaultValue = children;
- }
- }
-
- if (defaultValue == null) {
- defaultValue = '';
- }
-
- initialValue = defaultValue;
- }
-
- node._wrapperState = {
- initialValue: getToStringValue(initialValue)
- };
-}
-function updateWrapper$1(element, props) {
- var node = element;
- var value = getToStringValue(props.value);
- var defaultValue = getToStringValue(props.defaultValue);
-
- if (value != null) {
- // Cast `value` to a string to ensure the value is set correctly. While
- // browsers typically do this as necessary, jsdom doesn't.
- var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed
-
- if (newValue !== node.value) {
- node.value = newValue;
- }
-
- if (props.defaultValue == null && node.defaultValue !== newValue) {
- node.defaultValue = newValue;
- }
- }
-
- if (defaultValue != null) {
- node.defaultValue = toString(defaultValue);
- }
-}
-function postMountWrapper$3(element, props) {
- var node = element; // This is in postMount because we need access to the DOM node, which is not
- // available until after the component has mounted.
-
- var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
- // initial value. In IE10/IE11 there is a bug where the placeholder attribute
- // will populate textContent as well.
- // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
-
- if (textContent === node._wrapperState.initialValue) {
- if (textContent !== '' && textContent !== null) {
- node.value = textContent;
- }
- }
-}
-function restoreControlledState$2(element, props) {
- // DOM component is still mounted; update
- updateWrapper$1(element, props);
-}
-
-var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
-var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
-var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
-var Namespaces = {
- html: HTML_NAMESPACE,
- mathml: MATH_NAMESPACE,
- svg: SVG_NAMESPACE
-}; // Assumes there is no parent namespace.
-
-function getIntrinsicNamespace(type) {
- switch (type) {
- case 'svg':
- return SVG_NAMESPACE;
-
- case 'math':
- return MATH_NAMESPACE;
-
- default:
- return HTML_NAMESPACE;
- }
-}
-function getChildNamespace(parentNamespace, type) {
- if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
- // No (or default) parent namespace: potential entry point.
- return getIntrinsicNamespace(type);
- }
-
- if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
- // We're leaving SVG.
- return HTML_NAMESPACE;
- } // By default, pass namespace below.
-
-
- return parentNamespace;
-}
-
-/* globals MSApp */
-
-/**
- * Create a function which has 'unsafe' privileges (required by windows8 apps)
- */
-var createMicrosoftUnsafeLocalFunction = function (func) {
- if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
- return function (arg0, arg1, arg2, arg3) {
- MSApp.execUnsafeLocalFunction(function () {
- return func(arg0, arg1, arg2, arg3);
- });
- };
- } else {
- return func;
- }
-};
-
-var reusableSVGContainer;
-/**
- * Set the innerHTML property of a node
- *
- * @param {DOMElement} node
- * @param {string} html
- * @internal
- */
-
-var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
- if (node.namespaceURI === Namespaces.svg) {
-
- if (!('innerHTML' in node)) {
- // IE does not have innerHTML for SVG nodes, so instead we inject the
- // new markup in a temp node and then move the child nodes across into
- // the target node
- reusableSVGContainer = reusableSVGContainer || document.createElement('div');
- reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
- var svgNode = reusableSVGContainer.firstChild;
-
- while (node.firstChild) {
- node.removeChild(node.firstChild);
- }
-
- while (svgNode.firstChild) {
- node.appendChild(svgNode.firstChild);
- }
-
- return;
- }
- }
-
- node.innerHTML = html;
-});
-
-/**
- * HTML nodeType values that represent the type of the node
- */
-var ELEMENT_NODE = 1;
-var TEXT_NODE = 3;
-var COMMENT_NODE = 8;
-var DOCUMENT_NODE = 9;
-var DOCUMENT_FRAGMENT_NODE = 11;
-
-/**
- * Set the textContent property of a node. For text updates, it's faster
- * to set the `nodeValue` of the Text node directly instead of using
- * `.textContent` which will remove the existing node and create a new one.
- *
- * @param {DOMElement} node
- * @param {string} text
- * @internal
- */
-
-var setTextContent = function (node, text) {
- if (text) {
- var firstChild = node.firstChild;
-
- if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
- firstChild.nodeValue = text;
- return;
- }
- }
-
- node.textContent = text;
-};
-
-// List derived from Gecko source code:
-// https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
-var shorthandToLonghand = {
- animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
- background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
- backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
- border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
- borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
- borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
- borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
- borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
- borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
- borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
- borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
- borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
- borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
- borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
- borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
- borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
- borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
- columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
- columns: ['columnCount', 'columnWidth'],
- flex: ['flexBasis', 'flexGrow', 'flexShrink'],
- flexFlow: ['flexDirection', 'flexWrap'],
- font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
- fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
- gap: ['columnGap', 'rowGap'],
- grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
- gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
- gridColumn: ['gridColumnEnd', 'gridColumnStart'],
- gridColumnGap: ['columnGap'],
- gridGap: ['columnGap', 'rowGap'],
- gridRow: ['gridRowEnd', 'gridRowStart'],
- gridRowGap: ['rowGap'],
- gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
- listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
- margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
- marker: ['markerEnd', 'markerMid', 'markerStart'],
- mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
- maskPosition: ['maskPositionX', 'maskPositionY'],
- outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
- overflow: ['overflowX', 'overflowY'],
- padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
- placeContent: ['alignContent', 'justifyContent'],
- placeItems: ['alignItems', 'justifyItems'],
- placeSelf: ['alignSelf', 'justifySelf'],
- textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
- textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
- transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
- wordWrap: ['overflowWrap']
-};
-
-/**
- * CSS properties which accept numbers but are not in units of "px".
- */
-var isUnitlessNumber = {
- animationIterationCount: true,
- borderImageOutset: true,
- borderImageSlice: true,
- borderImageWidth: true,
- boxFlex: true,
- boxFlexGroup: true,
- boxOrdinalGroup: true,
- columnCount: true,
- columns: true,
- flex: true,
- flexGrow: true,
- flexPositive: true,
- flexShrink: true,
- flexNegative: true,
- flexOrder: true,
- gridArea: true,
- gridRow: true,
- gridRowEnd: true,
- gridRowSpan: true,
- gridRowStart: true,
- gridColumn: true,
- gridColumnEnd: true,
- gridColumnSpan: true,
- gridColumnStart: true,
- fontWeight: true,
- lineClamp: true,
- lineHeight: true,
- opacity: true,
- order: true,
- orphans: true,
- tabSize: true,
- widows: true,
- zIndex: true,
- zoom: true,
- // SVG-related properties
- fillOpacity: true,
- floodOpacity: true,
- stopOpacity: true,
- strokeDasharray: true,
- strokeDashoffset: true,
- strokeMiterlimit: true,
- strokeOpacity: true,
- strokeWidth: true
-};
-/**
- * @param {string} prefix vendor-specific prefix, eg: Webkit
- * @param {string} key style name, eg: transitionDuration
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
- * WebkitTransitionDuration
- */
-
-function prefixKey(prefix, key) {
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
-}
-/**
- * Support style names that may come passed in prefixed by adding permutations
- * of vendor prefixes.
- */
-
-
-var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
-// infinite loop, because it iterates over the newly added props too.
-
-Object.keys(isUnitlessNumber).forEach(function (prop) {
- prefixes.forEach(function (prefix) {
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
- });
-});
-
-/**
- * Convert a value into the proper css writable value. The style name `name`
- * should be logical (no hyphens), as specified
- * in `CSSProperty.isUnitlessNumber`.
- *
- * @param {string} name CSS property name such as `topMargin`.
- * @param {*} value CSS property value such as `10px`.
- * @return {string} Normalized style value with dimensions applied.
- */
-
-function dangerousStyleValue(name, value, isCustomProperty) {
- // Note that we've removed escapeTextForBrowser() calls here since the
- // whole string will be escaped when the attribute is injected into
- // the markup. If you provide unsafe user data here they can inject
- // arbitrary CSS which may be problematic (I couldn't repro this):
- // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
- // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
- // This is not an XSS hole but instead a potential CSS injection issue
- // which has lead to a greater discussion about how we're going to
- // trust URLs moving forward. See #2115901
- var isEmpty = value == null || typeof value === 'boolean' || value === '';
-
- if (isEmpty) {
- return '';
- }
-
- if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
- return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
- }
-
- return ('' + value).trim();
-}
-
-var uppercasePattern = /([A-Z])/g;
-var msPattern = /^ms-/;
-/**
- * Hyphenates a camelcased CSS property name, for example:
- *
- * > hyphenateStyleName('backgroundColor')
- * < "background-color"
- * > hyphenateStyleName('MozTransition')
- * < "-moz-transition"
- * > hyphenateStyleName('msTransition')
- * < "-ms-transition"
- *
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
- * is converted to `-ms-`.
- */
-
-function hyphenateStyleName(name) {
- return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
-}
-
-var warnValidStyle = function () {};
-
-{
- // 'msTransform' is correct, but the other prefixes should be capitalized
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
- var msPattern$1 = /^-ms-/;
- var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
-
- var badStyleValueWithSemicolonPattern = /;\s*$/;
- var warnedStyleNames = {};
- var warnedStyleValues = {};
- var warnedForNaNValue = false;
- var warnedForInfinityValue = false;
-
- var camelize = function (string) {
- return string.replace(hyphenPattern, function (_, character) {
- return character.toUpperCase();
- });
- };
-
- var warnHyphenatedStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
- // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
- // is converted to lowercase `ms`.
- camelize(name.replace(msPattern$1, 'ms-')));
- };
-
- var warnBadVendoredStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
- };
-
- var warnStyleValueWithSemicolon = function (name, value) {
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
- return;
- }
-
- warnedStyleValues[value] = true;
-
- error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
- };
-
- var warnStyleValueIsNaN = function (name, value) {
- if (warnedForNaNValue) {
- return;
- }
-
- warnedForNaNValue = true;
-
- error('`NaN` is an invalid value for the `%s` css style property.', name);
- };
-
- var warnStyleValueIsInfinity = function (name, value) {
- if (warnedForInfinityValue) {
- return;
- }
-
- warnedForInfinityValue = true;
-
- error('`Infinity` is an invalid value for the `%s` css style property.', name);
- };
-
- warnValidStyle = function (name, value) {
- if (name.indexOf('-') > -1) {
- warnHyphenatedStyleName(name);
- } else if (badVendoredStyleNamePattern.test(name)) {
- warnBadVendoredStyleName(name);
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
- warnStyleValueWithSemicolon(name, value);
- }
-
- if (typeof value === 'number') {
- if (isNaN(value)) {
- warnStyleValueIsNaN(name, value);
- } else if (!isFinite(value)) {
- warnStyleValueIsInfinity(name, value);
- }
- }
- };
-}
-
-var warnValidStyle$1 = warnValidStyle;
-
-/**
- * Operations for dealing with CSS properties.
- */
-
-/**
- * This creates a string that is expected to be equivalent to the style
- * attribute generated by server-side rendering. It by-passes warnings and
- * security checks so it's not safe to use this value for anything other than
- * comparison. It is only used in DEV for SSR validation.
- */
-
-function createDangerousStringForStyles(styles) {
- {
- var serialized = '';
- var delimiter = '';
-
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
-
- var styleValue = styles[styleName];
-
- if (styleValue != null) {
- var isCustomProperty = styleName.indexOf('--') === 0;
- serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
- serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
- delimiter = ';';
- }
- }
-
- return serialized || null;
- }
-}
-/**
- * Sets the value for multiple styles on a node. If a value is specified as
- * '' (empty string), the corresponding style property will be unset.
- *
- * @param {DOMElement} node
- * @param {object} styles
- */
-
-function setValueForStyles(node, styles) {
- var style = node.style;
-
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
-
- var isCustomProperty = styleName.indexOf('--') === 0;
-
- {
- if (!isCustomProperty) {
- warnValidStyle$1(styleName, styles[styleName]);
- }
- }
-
- var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
-
- if (styleName === 'float') {
- styleName = 'cssFloat';
- }
-
- if (isCustomProperty) {
- style.setProperty(styleName, styleValue);
- } else {
- style[styleName] = styleValue;
- }
- }
-}
-
-function isValueEmpty(value) {
- return value == null || typeof value === 'boolean' || value === '';
-}
-/**
- * Given {color: 'red', overflow: 'hidden'} returns {
- * color: 'color',
- * overflowX: 'overflow',
- * overflowY: 'overflow',
- * }. This can be read as "the overflowY property was set by the overflow
- * shorthand". That is, the values are the property that each was derived from.
- */
-
-
-function expandShorthandMap(styles) {
- var expanded = {};
-
- for (var key in styles) {
- var longhands = shorthandToLonghand[key] || [key];
-
- for (var i = 0; i < longhands.length; i++) {
- expanded[longhands[i]] = key;
- }
- }
-
- return expanded;
-}
-/**
- * When mixing shorthand and longhand property names, we warn during updates if
- * we expect an incorrect result to occur. In particular, we warn for:
- *
- * Updating a shorthand property (longhand gets overwritten):
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
- * becomes .style.font = 'baz'
- * Removing a shorthand property (longhand gets lost too):
- * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
- * becomes .style.font = ''
- * Removing a longhand property (should revert to shorthand; doesn't):
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
- * becomes .style.fontVariant = ''
- */
-
-
-function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
- {
- if (!nextStyles) {
- return;
- }
-
- var expandedUpdates = expandShorthandMap(styleUpdates);
- var expandedStyles = expandShorthandMap(nextStyles);
- var warnedAbout = {};
-
- for (var key in expandedUpdates) {
- var originalKey = expandedUpdates[key];
- var correctOriginalKey = expandedStyles[key];
-
- if (correctOriginalKey && originalKey !== correctOriginalKey) {
- var warningKey = originalKey + ',' + correctOriginalKey;
-
- if (warnedAbout[warningKey]) {
- continue;
- }
-
- warnedAbout[warningKey] = true;
-
- error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
- }
- }
- }
-}
-
-// For HTML, certain tags should omit their close tag. We keep a list for
-// those special-case tags.
-var omittedCloseTags = {
- area: true,
- base: true,
- br: true,
- col: true,
- embed: true,
- hr: true,
- img: true,
- input: true,
- keygen: true,
- link: true,
- meta: true,
- param: true,
- source: true,
- track: true,
- wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
-
-};
-
-// `omittedCloseTags` except that `menuitem` should still have its closing tag.
-
-var voidElementTags = _assign({
- menuitem: true
-}, omittedCloseTags);
-
-var HTML = '__html';
-
-function assertValidProps(tag, props) {
- if (!props) {
- return;
- } // Note the use of `==` which checks for null or undefined.
-
-
- if (voidElementTags[tag]) {
- if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
- }
- }
- }
-
- if (props.dangerouslySetInnerHTML != null) {
- if (!(props.children == null)) {
- {
- throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
- }
- }
-
- if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
- {
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
- }
- }
- }
-
- {
- if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
- 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.');
- }
- }
-
- if (!(props.style == null || typeof props.style === 'object')) {
- {
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
- }
- }
-}
-
-function isCustomComponent(tagName, props) {
- if (tagName.indexOf('-') === -1) {
- return typeof props.is === 'string';
- }
-
- switch (tagName) {
- // These are reserved SVG and MathML elements.
- // We don't mind this list too much because we expect it to never grow.
- // The alternative is to track the namespace in a few places which is convoluted.
- // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
- case 'annotation-xml':
- case 'color-profile':
- case 'font-face':
- case 'font-face-src':
- case 'font-face-uri':
- case 'font-face-format':
- case 'font-face-name':
- case 'missing-glyph':
- return false;
-
- default:
- return true;
- }
-}
-
-// When adding attributes to the HTML or SVG allowed attribute list, be sure to
-// also add them to this module to ensure casing and incorrect name
-// warnings.
-var possibleStandardNames = {
- // HTML
- accept: 'accept',
- acceptcharset: 'acceptCharset',
- 'accept-charset': 'acceptCharset',
- accesskey: 'accessKey',
- action: 'action',
- allowfullscreen: 'allowFullScreen',
- alt: 'alt',
- as: 'as',
- async: 'async',
- autocapitalize: 'autoCapitalize',
- autocomplete: 'autoComplete',
- autocorrect: 'autoCorrect',
- autofocus: 'autoFocus',
- autoplay: 'autoPlay',
- autosave: 'autoSave',
- capture: 'capture',
- cellpadding: 'cellPadding',
- cellspacing: 'cellSpacing',
- challenge: 'challenge',
- charset: 'charSet',
- checked: 'checked',
- children: 'children',
- cite: 'cite',
- class: 'className',
- classid: 'classID',
- classname: 'className',
- cols: 'cols',
- colspan: 'colSpan',
- content: 'content',
- contenteditable: 'contentEditable',
- contextmenu: 'contextMenu',
- controls: 'controls',
- controlslist: 'controlsList',
- coords: 'coords',
- crossorigin: 'crossOrigin',
- dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
- data: 'data',
- datetime: 'dateTime',
- default: 'default',
- defaultchecked: 'defaultChecked',
- defaultvalue: 'defaultValue',
- defer: 'defer',
- dir: 'dir',
- disabled: 'disabled',
- disablepictureinpicture: 'disablePictureInPicture',
- disableremoteplayback: 'disableRemotePlayback',
- download: 'download',
- draggable: 'draggable',
- enctype: 'encType',
- enterkeyhint: 'enterKeyHint',
- for: 'htmlFor',
- form: 'form',
- formmethod: 'formMethod',
- formaction: 'formAction',
- formenctype: 'formEncType',
- formnovalidate: 'formNoValidate',
- formtarget: 'formTarget',
- frameborder: 'frameBorder',
- headers: 'headers',
- height: 'height',
- hidden: 'hidden',
- high: 'high',
- href: 'href',
- hreflang: 'hrefLang',
- htmlfor: 'htmlFor',
- httpequiv: 'httpEquiv',
- 'http-equiv': 'httpEquiv',
- icon: 'icon',
- id: 'id',
- innerhtml: 'innerHTML',
- inputmode: 'inputMode',
- integrity: 'integrity',
- is: 'is',
- itemid: 'itemID',
- itemprop: 'itemProp',
- itemref: 'itemRef',
- itemscope: 'itemScope',
- itemtype: 'itemType',
- keyparams: 'keyParams',
- keytype: 'keyType',
- kind: 'kind',
- label: 'label',
- lang: 'lang',
- list: 'list',
- loop: 'loop',
- low: 'low',
- manifest: 'manifest',
- marginwidth: 'marginWidth',
- marginheight: 'marginHeight',
- max: 'max',
- maxlength: 'maxLength',
- media: 'media',
- mediagroup: 'mediaGroup',
- method: 'method',
- min: 'min',
- minlength: 'minLength',
- multiple: 'multiple',
- muted: 'muted',
- name: 'name',
- nomodule: 'noModule',
- nonce: 'nonce',
- novalidate: 'noValidate',
- open: 'open',
- optimum: 'optimum',
- pattern: 'pattern',
- placeholder: 'placeholder',
- playsinline: 'playsInline',
- poster: 'poster',
- preload: 'preload',
- profile: 'profile',
- radiogroup: 'radioGroup',
- readonly: 'readOnly',
- referrerpolicy: 'referrerPolicy',
- rel: 'rel',
- required: 'required',
- reversed: 'reversed',
- role: 'role',
- rows: 'rows',
- rowspan: 'rowSpan',
- sandbox: 'sandbox',
- scope: 'scope',
- scoped: 'scoped',
- scrolling: 'scrolling',
- seamless: 'seamless',
- selected: 'selected',
- shape: 'shape',
- size: 'size',
- sizes: 'sizes',
- span: 'span',
- spellcheck: 'spellCheck',
- src: 'src',
- srcdoc: 'srcDoc',
- srclang: 'srcLang',
- srcset: 'srcSet',
- start: 'start',
- step: 'step',
- style: 'style',
- summary: 'summary',
- tabindex: 'tabIndex',
- target: 'target',
- title: 'title',
- type: 'type',
- usemap: 'useMap',
- value: 'value',
- width: 'width',
- wmode: 'wmode',
- wrap: 'wrap',
- // SVG
- about: 'about',
- accentheight: 'accentHeight',
- 'accent-height': 'accentHeight',
- accumulate: 'accumulate',
- additive: 'additive',
- alignmentbaseline: 'alignmentBaseline',
- 'alignment-baseline': 'alignmentBaseline',
- allowreorder: 'allowReorder',
- alphabetic: 'alphabetic',
- amplitude: 'amplitude',
- arabicform: 'arabicForm',
- 'arabic-form': 'arabicForm',
- ascent: 'ascent',
- attributename: 'attributeName',
- attributetype: 'attributeType',
- autoreverse: 'autoReverse',
- azimuth: 'azimuth',
- basefrequency: 'baseFrequency',
- baselineshift: 'baselineShift',
- 'baseline-shift': 'baselineShift',
- baseprofile: 'baseProfile',
- bbox: 'bbox',
- begin: 'begin',
- bias: 'bias',
- by: 'by',
- calcmode: 'calcMode',
- capheight: 'capHeight',
- 'cap-height': 'capHeight',
- clip: 'clip',
- clippath: 'clipPath',
- 'clip-path': 'clipPath',
- clippathunits: 'clipPathUnits',
- cliprule: 'clipRule',
- 'clip-rule': 'clipRule',
- color: 'color',
- colorinterpolation: 'colorInterpolation',
- 'color-interpolation': 'colorInterpolation',
- colorinterpolationfilters: 'colorInterpolationFilters',
- 'color-interpolation-filters': 'colorInterpolationFilters',
- colorprofile: 'colorProfile',
- 'color-profile': 'colorProfile',
- colorrendering: 'colorRendering',
- 'color-rendering': 'colorRendering',
- contentscripttype: 'contentScriptType',
- contentstyletype: 'contentStyleType',
- cursor: 'cursor',
- cx: 'cx',
- cy: 'cy',
- d: 'd',
- datatype: 'datatype',
- decelerate: 'decelerate',
- descent: 'descent',
- diffuseconstant: 'diffuseConstant',
- direction: 'direction',
- display: 'display',
- divisor: 'divisor',
- dominantbaseline: 'dominantBaseline',
- 'dominant-baseline': 'dominantBaseline',
- dur: 'dur',
- dx: 'dx',
- dy: 'dy',
- edgemode: 'edgeMode',
- elevation: 'elevation',
- enablebackground: 'enableBackground',
- 'enable-background': 'enableBackground',
- end: 'end',
- exponent: 'exponent',
- externalresourcesrequired: 'externalResourcesRequired',
- fill: 'fill',
- fillopacity: 'fillOpacity',
- 'fill-opacity': 'fillOpacity',
- fillrule: 'fillRule',
- 'fill-rule': 'fillRule',
- filter: 'filter',
- filterres: 'filterRes',
- filterunits: 'filterUnits',
- floodopacity: 'floodOpacity',
- 'flood-opacity': 'floodOpacity',
- floodcolor: 'floodColor',
- 'flood-color': 'floodColor',
- focusable: 'focusable',
- fontfamily: 'fontFamily',
- 'font-family': 'fontFamily',
- fontsize: 'fontSize',
- 'font-size': 'fontSize',
- fontsizeadjust: 'fontSizeAdjust',
- 'font-size-adjust': 'fontSizeAdjust',
- fontstretch: 'fontStretch',
- 'font-stretch': 'fontStretch',
- fontstyle: 'fontStyle',
- 'font-style': 'fontStyle',
- fontvariant: 'fontVariant',
- 'font-variant': 'fontVariant',
- fontweight: 'fontWeight',
- 'font-weight': 'fontWeight',
- format: 'format',
- from: 'from',
- fx: 'fx',
- fy: 'fy',
- g1: 'g1',
- g2: 'g2',
- glyphname: 'glyphName',
- 'glyph-name': 'glyphName',
- glyphorientationhorizontal: 'glyphOrientationHorizontal',
- 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
- glyphorientationvertical: 'glyphOrientationVertical',
- 'glyph-orientation-vertical': 'glyphOrientationVertical',
- glyphref: 'glyphRef',
- gradienttransform: 'gradientTransform',
- gradientunits: 'gradientUnits',
- hanging: 'hanging',
- horizadvx: 'horizAdvX',
- 'horiz-adv-x': 'horizAdvX',
- horizoriginx: 'horizOriginX',
- 'horiz-origin-x': 'horizOriginX',
- ideographic: 'ideographic',
- imagerendering: 'imageRendering',
- 'image-rendering': 'imageRendering',
- in2: 'in2',
- in: 'in',
- inlist: 'inlist',
- intercept: 'intercept',
- k1: 'k1',
- k2: 'k2',
- k3: 'k3',
- k4: 'k4',
- k: 'k',
- kernelmatrix: 'kernelMatrix',
- kernelunitlength: 'kernelUnitLength',
- kerning: 'kerning',
- keypoints: 'keyPoints',
- keysplines: 'keySplines',
- keytimes: 'keyTimes',
- lengthadjust: 'lengthAdjust',
- letterspacing: 'letterSpacing',
- 'letter-spacing': 'letterSpacing',
- lightingcolor: 'lightingColor',
- 'lighting-color': 'lightingColor',
- limitingconeangle: 'limitingConeAngle',
- local: 'local',
- markerend: 'markerEnd',
- 'marker-end': 'markerEnd',
- markerheight: 'markerHeight',
- markermid: 'markerMid',
- 'marker-mid': 'markerMid',
- markerstart: 'markerStart',
- 'marker-start': 'markerStart',
- markerunits: 'markerUnits',
- markerwidth: 'markerWidth',
- mask: 'mask',
- maskcontentunits: 'maskContentUnits',
- maskunits: 'maskUnits',
- mathematical: 'mathematical',
- mode: 'mode',
- numoctaves: 'numOctaves',
- offset: 'offset',
- opacity: 'opacity',
- operator: 'operator',
- order: 'order',
- orient: 'orient',
- orientation: 'orientation',
- origin: 'origin',
- overflow: 'overflow',
- overlineposition: 'overlinePosition',
- 'overline-position': 'overlinePosition',
- overlinethickness: 'overlineThickness',
- 'overline-thickness': 'overlineThickness',
- paintorder: 'paintOrder',
- 'paint-order': 'paintOrder',
- panose1: 'panose1',
- 'panose-1': 'panose1',
- pathlength: 'pathLength',
- patterncontentunits: 'patternContentUnits',
- patterntransform: 'patternTransform',
- patternunits: 'patternUnits',
- pointerevents: 'pointerEvents',
- 'pointer-events': 'pointerEvents',
- points: 'points',
- pointsatx: 'pointsAtX',
- pointsaty: 'pointsAtY',
- pointsatz: 'pointsAtZ',
- prefix: 'prefix',
- preservealpha: 'preserveAlpha',
- preserveaspectratio: 'preserveAspectRatio',
- primitiveunits: 'primitiveUnits',
- property: 'property',
- r: 'r',
- radius: 'radius',
- refx: 'refX',
- refy: 'refY',
- renderingintent: 'renderingIntent',
- 'rendering-intent': 'renderingIntent',
- repeatcount: 'repeatCount',
- repeatdur: 'repeatDur',
- requiredextensions: 'requiredExtensions',
- requiredfeatures: 'requiredFeatures',
- resource: 'resource',
- restart: 'restart',
- result: 'result',
- results: 'results',
- rotate: 'rotate',
- rx: 'rx',
- ry: 'ry',
- scale: 'scale',
- security: 'security',
- seed: 'seed',
- shaperendering: 'shapeRendering',
- 'shape-rendering': 'shapeRendering',
- slope: 'slope',
- spacing: 'spacing',
- specularconstant: 'specularConstant',
- specularexponent: 'specularExponent',
- speed: 'speed',
- spreadmethod: 'spreadMethod',
- startoffset: 'startOffset',
- stddeviation: 'stdDeviation',
- stemh: 'stemh',
- stemv: 'stemv',
- stitchtiles: 'stitchTiles',
- stopcolor: 'stopColor',
- 'stop-color': 'stopColor',
- stopopacity: 'stopOpacity',
- 'stop-opacity': 'stopOpacity',
- strikethroughposition: 'strikethroughPosition',
- 'strikethrough-position': 'strikethroughPosition',
- strikethroughthickness: 'strikethroughThickness',
- 'strikethrough-thickness': 'strikethroughThickness',
- string: 'string',
- stroke: 'stroke',
- strokedasharray: 'strokeDasharray',
- 'stroke-dasharray': 'strokeDasharray',
- strokedashoffset: 'strokeDashoffset',
- 'stroke-dashoffset': 'strokeDashoffset',
- strokelinecap: 'strokeLinecap',
- 'stroke-linecap': 'strokeLinecap',
- strokelinejoin: 'strokeLinejoin',
- 'stroke-linejoin': 'strokeLinejoin',
- strokemiterlimit: 'strokeMiterlimit',
- 'stroke-miterlimit': 'strokeMiterlimit',
- strokewidth: 'strokeWidth',
- 'stroke-width': 'strokeWidth',
- strokeopacity: 'strokeOpacity',
- 'stroke-opacity': 'strokeOpacity',
- suppresscontenteditablewarning: 'suppressContentEditableWarning',
- suppresshydrationwarning: 'suppressHydrationWarning',
- surfacescale: 'surfaceScale',
- systemlanguage: 'systemLanguage',
- tablevalues: 'tableValues',
- targetx: 'targetX',
- targety: 'targetY',
- textanchor: 'textAnchor',
- 'text-anchor': 'textAnchor',
- textdecoration: 'textDecoration',
- 'text-decoration': 'textDecoration',
- textlength: 'textLength',
- textrendering: 'textRendering',
- 'text-rendering': 'textRendering',
- to: 'to',
- transform: 'transform',
- typeof: 'typeof',
- u1: 'u1',
- u2: 'u2',
- underlineposition: 'underlinePosition',
- 'underline-position': 'underlinePosition',
- underlinethickness: 'underlineThickness',
- 'underline-thickness': 'underlineThickness',
- unicode: 'unicode',
- unicodebidi: 'unicodeBidi',
- 'unicode-bidi': 'unicodeBidi',
- unicoderange: 'unicodeRange',
- 'unicode-range': 'unicodeRange',
- unitsperem: 'unitsPerEm',
- 'units-per-em': 'unitsPerEm',
- unselectable: 'unselectable',
- valphabetic: 'vAlphabetic',
- 'v-alphabetic': 'vAlphabetic',
- values: 'values',
- vectoreffect: 'vectorEffect',
- 'vector-effect': 'vectorEffect',
- version: 'version',
- vertadvy: 'vertAdvY',
- 'vert-adv-y': 'vertAdvY',
- vertoriginx: 'vertOriginX',
- 'vert-origin-x': 'vertOriginX',
- vertoriginy: 'vertOriginY',
- 'vert-origin-y': 'vertOriginY',
- vhanging: 'vHanging',
- 'v-hanging': 'vHanging',
- videographic: 'vIdeographic',
- 'v-ideographic': 'vIdeographic',
- viewbox: 'viewBox',
- viewtarget: 'viewTarget',
- visibility: 'visibility',
- vmathematical: 'vMathematical',
- 'v-mathematical': 'vMathematical',
- vocab: 'vocab',
- widths: 'widths',
- wordspacing: 'wordSpacing',
- 'word-spacing': 'wordSpacing',
- writingmode: 'writingMode',
- 'writing-mode': 'writingMode',
- x1: 'x1',
- x2: 'x2',
- x: 'x',
- xchannelselector: 'xChannelSelector',
- xheight: 'xHeight',
- 'x-height': 'xHeight',
- xlinkactuate: 'xlinkActuate',
- 'xlink:actuate': 'xlinkActuate',
- xlinkarcrole: 'xlinkArcrole',
- 'xlink:arcrole': 'xlinkArcrole',
- xlinkhref: 'xlinkHref',
- 'xlink:href': 'xlinkHref',
- xlinkrole: 'xlinkRole',
- 'xlink:role': 'xlinkRole',
- xlinkshow: 'xlinkShow',
- 'xlink:show': 'xlinkShow',
- xlinktitle: 'xlinkTitle',
- 'xlink:title': 'xlinkTitle',
- xlinktype: 'xlinkType',
- 'xlink:type': 'xlinkType',
- xmlbase: 'xmlBase',
- 'xml:base': 'xmlBase',
- xmllang: 'xmlLang',
- 'xml:lang': 'xmlLang',
- xmlns: 'xmlns',
- 'xml:space': 'xmlSpace',
- xmlnsxlink: 'xmlnsXlink',
- 'xmlns:xlink': 'xmlnsXlink',
- xmlspace: 'xmlSpace',
- y1: 'y1',
- y2: 'y2',
- y: 'y',
- ychannelselector: 'yChannelSelector',
- z: 'z',
- zoomandpan: 'zoomAndPan'
-};
-
-var ariaProperties = {
- 'aria-current': 0,
- // state
- 'aria-details': 0,
- 'aria-disabled': 0,
- // state
- 'aria-hidden': 0,
- // state
- 'aria-invalid': 0,
- // state
- 'aria-keyshortcuts': 0,
- 'aria-label': 0,
- 'aria-roledescription': 0,
- // Widget Attributes
- 'aria-autocomplete': 0,
- 'aria-checked': 0,
- 'aria-expanded': 0,
- 'aria-haspopup': 0,
- 'aria-level': 0,
- 'aria-modal': 0,
- 'aria-multiline': 0,
- 'aria-multiselectable': 0,
- 'aria-orientation': 0,
- 'aria-placeholder': 0,
- 'aria-pressed': 0,
- 'aria-readonly': 0,
- 'aria-required': 0,
- 'aria-selected': 0,
- 'aria-sort': 0,
- 'aria-valuemax': 0,
- 'aria-valuemin': 0,
- 'aria-valuenow': 0,
- 'aria-valuetext': 0,
- // Live Region Attributes
- 'aria-atomic': 0,
- 'aria-busy': 0,
- 'aria-live': 0,
- 'aria-relevant': 0,
- // Drag-and-Drop Attributes
- 'aria-dropeffect': 0,
- 'aria-grabbed': 0,
- // Relationship Attributes
- 'aria-activedescendant': 0,
- 'aria-colcount': 0,
- 'aria-colindex': 0,
- 'aria-colspan': 0,
- 'aria-controls': 0,
- 'aria-describedby': 0,
- 'aria-errormessage': 0,
- 'aria-flowto': 0,
- 'aria-labelledby': 0,
- 'aria-owns': 0,
- 'aria-posinset': 0,
- 'aria-rowcount': 0,
- 'aria-rowindex': 0,
- 'aria-rowspan': 0,
- 'aria-setsize': 0
-};
-
-var warnedProperties = {};
-var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
-var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
-var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
-
-function validateProperty(tagName, name) {
- {
- if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
- return true;
- }
-
- if (rARIACamel.test(name)) {
- var ariaName = 'aria-' + name.slice(4).toLowerCase();
- var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (correctName == null) {
- error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
-
- warnedProperties[name] = true;
- return true;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== correctName) {
- error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
-
- if (rARIA.test(name)) {
- var lowerCasedName = name.toLowerCase();
- var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (standardName == null) {
- warnedProperties[name] = true;
- return false;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== standardName) {
- error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
- }
-
- return true;
-}
-
-function warnInvalidARIAProps(type, props) {
- {
- var invalidProps = [];
-
- for (var key in props) {
- var isValid = validateProperty(type, key);
-
- if (!isValid) {
- invalidProps.push(key);
- }
- }
-
- var unknownPropString = invalidProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- } else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- }
- }
-}
-
-function validateProperties(type, props) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnInvalidARIAProps(type, props);
-}
-
-var didWarnValueNull = false;
-function validateProperties$1(type, props) {
- {
- if (type !== 'input' && type !== 'textarea' && type !== 'select') {
- return;
- }
-
- if (props != null && props.value === null && !didWarnValueNull) {
- didWarnValueNull = true;
-
- if (type === 'select' && props.multiple) {
- 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);
- } else {
- error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
- }
- }
- }
-}
-
-var validateProperty$1 = function () {};
-
-{
- var warnedProperties$1 = {};
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
- var EVENT_NAME_REGEX = /^on./;
- var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
- var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
-
- validateProperty$1 = function (tagName, name, value, eventRegistry) {
- if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
- return true;
- }
-
- var lowerCasedName = name.toLowerCase();
-
- if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
- 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.');
-
- warnedProperties$1[name] = true;
- return true;
- } // We can't rely on the event system being injected on the server.
-
-
- if (eventRegistry != null) {
- var registrationNameDependencies = eventRegistry.registrationNameDependencies,
- possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
-
- if (registrationNameDependencies.hasOwnProperty(name)) {
- return true;
- }
-
- var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
-
- if (registrationName != null) {
- error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (EVENT_NAME_REGEX.test(name)) {
- error('Unknown event handler property `%s`. It will be ignored.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (EVENT_NAME_REGEX.test(name)) {
- // If no event plugins have been injected, we are in a server environment.
- // So we can't tell if the event name is correct for sure, but we can filter
- // out known bad ones like `onclick`. We can't suggest a specific replacement though.
- if (INVALID_EVENT_NAME_REGEX.test(name)) {
- error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Let the ARIA attribute hook validate ARIA attributes
-
-
- if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
- return true;
- }
-
- if (lowerCasedName === 'innerhtml') {
- error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'aria') {
- error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
- error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'number' && isNaN(value)) {
- error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- var propertyInfo = getPropertyInfo(name);
- var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
-
- if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- var standardName = possibleStandardNames[lowerCasedName];
-
- if (standardName !== name) {
- error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (!isReserved && name !== lowerCasedName) {
- // Unknown attributes should have lowercase casing since that's how they
- // will be cased anyway with server rendering.
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- if (value) {
- 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);
- } else {
- 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);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Now that we've validated casing, do not validate
- // data types for reserved props
-
-
- if (isReserved) {
- return true;
- } // Warn when a known attribute is a bad type
-
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- warnedProperties$1[name] = true;
- return false;
- } // Warn when passing the strings 'false' or 'true' into a boolean prop
-
-
- if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- return true;
- };
-}
-
-var warnUnknownProperties = function (type, props, eventRegistry) {
- {
- var unknownProps = [];
-
- for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], eventRegistry);
-
- if (!isValid) {
- unknownProps.push(key);
- }
- }
-
- var unknownPropString = unknownProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (unknownProps.length === 1) {
- 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);
- } else if (unknownProps.length > 1) {
- 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);
- }
- }
-};
-
-function validateProperties$2(type, props, eventRegistry) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnUnknownProperties(type, props, eventRegistry);
-}
-
-var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
-var IS_NON_DELEGATED = 1 << 1;
-var IS_CAPTURE_PHASE = 1 << 2;
-var IS_REPLAYED = 1 << 4;
-// set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
-// we call willDeferLaterForLegacyFBSupport, thus not bailing out
-// will result in endless cycles like an infinite loop.
-// We also don't want to defer during event replaying.
-
-var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;
-
-/**
- * Gets the target node from a native browser event by accounting for
- * inconsistencies in browser DOM APIs.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {DOMEventTarget} Target node.
- */
-
-function getEventTarget(nativeEvent) {
- // Fallback to nativeEvent.srcElement for IE9
- // https://github.com/facebook/react/issues/12506
- var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
-
- if (target.correspondingUseElement) {
- target = target.correspondingUseElement;
- } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
- // @see http://www.quirksmode.org/js/events_properties.html
-
-
- return target.nodeType === TEXT_NODE ? target.parentNode : target;
-}
-
-var restoreImpl = null;
-var restoreTarget = null;
-var restoreQueue = null;
-
-function restoreStateOfTarget(target) {
- // We perform this translation at the end of the event loop so that we
- // always receive the correct fiber here
- var internalInstance = getInstanceFromNode(target);
-
- if (!internalInstance) {
- // Unmounted
- return;
- }
-
- if (!(typeof restoreImpl === 'function')) {
- {
- throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
-
- if (stateNode) {
- var _props = getFiberCurrentPropsFromNode(stateNode);
-
- restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
- }
-}
-
-function setRestoreImplementation(impl) {
- restoreImpl = impl;
-}
-function enqueueStateRestore(target) {
- if (restoreTarget) {
- if (restoreQueue) {
- restoreQueue.push(target);
- } else {
- restoreQueue = [target];
- }
- } else {
- restoreTarget = target;
- }
-}
-function needsStateRestore() {
- return restoreTarget !== null || restoreQueue !== null;
-}
-function restoreStateIfNeeded() {
- if (!restoreTarget) {
- return;
- }
-
- var target = restoreTarget;
- var queuedTargets = restoreQueue;
- restoreTarget = null;
- restoreQueue = null;
- restoreStateOfTarget(target);
-
- if (queuedTargets) {
- for (var i = 0; i < queuedTargets.length; i++) {
- restoreStateOfTarget(queuedTargets[i]);
- }
- }
-}
-
-// the renderer. Such as when we're dispatching events or if third party
-// libraries need to call batchedUpdates. Eventually, this API will go away when
-// everything is batched by default. We'll then have a similar API to opt-out of
-// scheduled work and instead do synchronous work.
-// Defaults
-
-var batchedUpdatesImpl = function (fn, bookkeeping) {
- return fn(bookkeeping);
-};
-
-var discreteUpdatesImpl = function (fn, a, b, c, d) {
- return fn(a, b, c, d);
-};
-
-var flushDiscreteUpdatesImpl = function () {};
-
-var batchedEventUpdatesImpl = batchedUpdatesImpl;
-var isInsideEventHandler = false;
-var isBatchingEventUpdates = false;
-
-function finishEventHandler() {
- // Here we wait until all updates have propagated, which is important
- // when using controlled components within layers:
- // https://github.com/facebook/react/issues/1698
- // Then we restore state of any controlled component.
- var controlledComponentsHavePendingUpdates = needsStateRestore();
-
- if (controlledComponentsHavePendingUpdates) {
- // If a controlled event was fired, we may need to restore the state of
- // the DOM node back to the controlled value. This is necessary when React
- // bails out of the update without touching the DOM.
- flushDiscreteUpdatesImpl();
- restoreStateIfNeeded();
- }
-}
-
-function batchedUpdates(fn, bookkeeping) {
- if (isInsideEventHandler) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(bookkeeping);
- }
-
- isInsideEventHandler = true;
-
- try {
- return batchedUpdatesImpl(fn, bookkeeping);
- } finally {
- isInsideEventHandler = false;
- finishEventHandler();
- }
-}
-function batchedEventUpdates(fn, a, b) {
- if (isBatchingEventUpdates) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(a, b);
- }
-
- isBatchingEventUpdates = true;
-
- try {
- return batchedEventUpdatesImpl(fn, a, b);
- } finally {
- isBatchingEventUpdates = false;
- finishEventHandler();
- }
-}
-function discreteUpdates(fn, a, b, c, d) {
- var prevIsInsideEventHandler = isInsideEventHandler;
- isInsideEventHandler = true;
-
- try {
- return discreteUpdatesImpl(fn, a, b, c, d);
- } finally {
- isInsideEventHandler = prevIsInsideEventHandler;
-
- if (!isInsideEventHandler) {
- finishEventHandler();
- }
- }
-}
-function flushDiscreteUpdatesIfNeeded(timeStamp) {
- {
- if (!isInsideEventHandler) {
- flushDiscreteUpdatesImpl();
- }
- }
-}
-function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
- batchedUpdatesImpl = _batchedUpdatesImpl;
- discreteUpdatesImpl = _discreteUpdatesImpl;
- flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
- batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
-}
-
-function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
-}
-
-function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
-
- default:
- return false;
- }
-}
-/**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
-
-
-function getListener(inst, registrationName) {
- var stateNode = inst.stateNode;
-
- if (stateNode === null) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
-
- var props = getFiberCurrentPropsFromNode(stateNode);
-
- if (props === null) {
- // Work in progress.
- return null;
- }
-
- var listener = props[registrationName];
-
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
-
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
-
- return listener;
-}
-
-var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners
-// https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
-
-if (canUseDOM) {
- try {
- var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value
-
- Object.defineProperty(options, 'passive', {
- get: function () {
- passiveBrowserEventsSupported = true;
- }
- });
- window.addEventListener('test', options, options);
- window.removeEventListener('test', options, options);
- } catch (e) {
- passiveBrowserEventsSupported = false;
- }
-}
-
-function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- try {
- func.apply(context, funcArgs);
- } catch (error) {
- this.onError(error);
- }
-}
-
-var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
-
-{
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
-
- invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
- // If document doesn't exist we know for sure we will crash in this method
- // when we call document.createEvent(). However this can cause confusing
- // errors: https://github.com/facebookincubator/create-react-app/issues/3482
- // So we preemptively throw with a better message instead.
- if (!(typeof document !== 'undefined')) {
- {
- throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
- }
- }
-
- var evt = document.createEvent('Event');
- var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
- // set this to true at the beginning, then set it to false right after
- // calling the function. If the function errors, `didError` will never be
- // set to false. This strategy works even if the browser is flaky and
- // fails to call our global error handler, because it doesn't rely on
- // the error event at all.
-
- var didError = true; // Keeps track of the value of window.event so that we can reset it
- // during the callback to let user code access window.event in the
- // browsers that support it.
-
- var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
- // dispatching: https://github.com/facebook/react/issues/13688
-
- var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
-
- function restoreAfterDispatch() {
- // We immediately remove the callback from event listeners so that
- // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
- // nested call would trigger the fake event handlers of any call higher
- // in the stack.
- fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
- // window.event assignment in both IE <= 10 as they throw an error
- // "Member not found" in strict mode, and in Firefox which does not
- // support window.event.
-
- if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
- window.event = windowEvent;
- }
- } // Create an event handler for our fake event. We will synchronously
- // dispatch our fake event using `dispatchEvent`. Inside the handler, we
- // call the user-provided callback.
-
-
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- function callCallback() {
- didCall = true;
- restoreAfterDispatch();
- func.apply(context, funcArgs);
- didError = false;
- } // Create a global error event handler. We use this to capture the value
- // that was thrown. It's possible that this error handler will fire more
- // than once; for example, if non-React code also calls `dispatchEvent`
- // and a handler for that event throws. We should be resilient to most of
- // those cases. Even if our error event handler fires more than once, the
- // last error event is always used. If the callback actually does error,
- // we know that the last error event is the correct one, because it's not
- // possible for anything else to have happened in between our callback
- // erroring and the code that follows the `dispatchEvent` call below. If
- // the callback doesn't error, but the error event was fired, we know to
- // ignore it because `didError` will be false, as described above.
-
-
- var error; // Use this to track whether the error event is ever called.
-
- var didSetError = false;
- var isCrossOriginError = false;
-
- function handleWindowError(event) {
- error = event.error;
- didSetError = true;
-
- if (error === null && event.colno === 0 && event.lineno === 0) {
- isCrossOriginError = true;
- }
-
- if (event.defaultPrevented) {
- // Some other error handler has prevented default.
- // Browsers silence the error report if this happens.
- // We'll remember this to later decide whether to log it or not.
- if (error != null && typeof error === 'object') {
- try {
- error._suppressLogging = true;
- } catch (inner) {// Ignore.
- }
- }
- }
- } // Create a fake event type.
-
-
- var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
-
- window.addEventListener('error', handleWindowError);
- fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
- // errors, it will trigger our global error handler.
-
- evt.initEvent(evtType, false, false);
- fakeNode.dispatchEvent(evt);
-
- if (windowEventDescriptor) {
- Object.defineProperty(window, 'event', windowEventDescriptor);
- }
-
- if (didCall && didError) {
- if (!didSetError) {
- // The callback errored, but the error event never fired.
- error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
- } else if (isCrossOriginError) {
- error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
- }
-
- this.onError(error);
- } // Remove our event listeners
-
-
- window.removeEventListener('error', handleWindowError);
-
- if (!didCall) {
- // Something went really wrong, and our event was not dispatched.
- // https://github.com/facebook/react/issues/16734
- // https://github.com/facebook/react/issues/16585
- // Fall back to the production implementation.
- restoreAfterDispatch();
- return invokeGuardedCallbackProd.apply(this, arguments);
- }
- };
- }
-}
-
-var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
-
-var hasError = false;
-var caughtError = null; // Used by event system to capture/rethrow the first error.
-
-var hasRethrowError = false;
-var rethrowError = null;
-var reporter = {
- onError: function (error) {
- hasError = true;
- caughtError = error;
- }
-};
-/**
- * Call a function while guarding against errors that happens within it.
- * Returns an error if it throws, otherwise null.
- *
- * In production, this is implemented using a try-catch. The reason we don't
- * use a try-catch directly is so that we can swap out a different
- * implementation in DEV mode.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
-function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
- hasError = false;
- caughtError = null;
- invokeGuardedCallbackImpl$1.apply(reporter, arguments);
-}
-/**
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
- * TODO: See if caughtError and rethrowError can be unified.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
-function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
- invokeGuardedCallback.apply(this, arguments);
-
- if (hasError) {
- var error = clearCaughtError();
-
- if (!hasRethrowError) {
- hasRethrowError = true;
- rethrowError = error;
- }
- }
-}
-/**
- * During execution of guarded functions we will capture the first error which
- * we will rethrow to be handled by the top level error handler.
- */
-
-function rethrowCaughtError() {
- if (hasRethrowError) {
- var error = rethrowError;
- hasRethrowError = false;
- rethrowError = null;
- throw error;
- }
-}
-function hasCaughtError() {
- return hasError;
-}
-function clearCaughtError() {
- if (hasError) {
- var error = caughtError;
- hasError = false;
- caughtError = null;
- return error;
- } else {
- {
- {
- throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-}
-
-/**
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
- * instance (key) and the internal representation (value). This allows public
- * methods to accept the user facing instance as an argument and map them back
- * to internal methods.
- *
- * Note that this module is currently shared and assumed to be stateless.
- * If this becomes an actual Map, that will break.
- */
-function get(key) {
- return key._reactInternals;
-}
-function has(key) {
- return key._reactInternals !== undefined;
-}
-function set(key, value) {
- key._reactInternals = value;
-}
-
-// Don't change these two values. They're used by React Dev Tools.
-var NoFlags =
-/* */
-0;
-var PerformedWork =
-/* */
-1; // You can change the rest (and add more).
-
-var Placement =
-/* */
-2;
-var Update =
-/* */
-4;
-var PlacementAndUpdate =
-/* */
-6;
-var Deletion =
-/* */
-8;
-var ContentReset =
-/* */
-16;
-var Callback =
-/* */
-32;
-var DidCapture =
-/* */
-64;
-var Ref =
-/* */
-128;
-var Snapshot =
-/* */
-256;
-var Passive =
-/* */
-512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.
-
-var PassiveUnmountPendingDev =
-/* */
-8192;
-var Hydrating =
-/* */
-1024;
-var HydratingAndUpdate =
-/* */
-1028; // Passive & Update & Callback & Ref & Snapshot
-
-var LifecycleEffectMask =
-/* */
-932; // Union of all host effects
-
-var HostEffectMask =
-/* */
-2047; // These are not really side effects, but we still reuse this field.
-
-var Incomplete =
-/* */
-2048;
-var ShouldCapture =
-/* */
-4096;
-var ForceUpdateForLegacySuspense =
-/* */
-16384; // Static tags describe aspects of a fiber that are not specific to a render,
-
-var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
-function getNearestMountedFiber(fiber) {
- var node = fiber;
- var nearestMounted = fiber;
-
- if (!fiber.alternate) {
- // If there is no alternate, this might be a new tree that isn't inserted
- // yet. If it is, then it will have a pending insertion effect on it.
- var nextNode = node;
-
- do {
- node = nextNode;
-
- if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
- // This is an insertion or in-progress hydration. The nearest possible
- // mounted fiber is the parent but we need to continue to figure out
- // if that one is still mounted.
- nearestMounted = node.return;
- }
-
- nextNode = node.return;
- } while (nextNode);
- } else {
- while (node.return) {
- node = node.return;
- }
- }
-
- if (node.tag === HostRoot) {
- // TODO: Check if this was a nested HostRoot when used with
- // renderContainerIntoSubtree.
- return nearestMounted;
- } // If we didn't hit the root, that means that we're in an disconnected tree
- // that has been unmounted.
-
-
- return null;
-}
-function getSuspenseInstanceFromFiber(fiber) {
- if (fiber.tag === SuspenseComponent) {
- var suspenseState = fiber.memoizedState;
-
- if (suspenseState === null) {
- var current = fiber.alternate;
-
- if (current !== null) {
- suspenseState = current.memoizedState;
- }
- }
-
- if (suspenseState !== null) {
- return suspenseState.dehydrated;
- }
- }
-
- return null;
-}
-function getContainerFromFiber(fiber) {
- return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
-}
-function isFiberMounted(fiber) {
- return getNearestMountedFiber(fiber) === fiber;
-}
-function isMounted(component) {
- {
- var owner = ReactCurrentOwner.current;
-
- if (owner !== null && owner.tag === ClassComponent) {
- var ownerFiber = owner;
- var instance = ownerFiber.stateNode;
-
- if (!instance._warnedAboutRefsInRender) {
- error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
- }
-
- instance._warnedAboutRefsInRender = true;
- }
- }
-
- var fiber = get(component);
-
- if (!fiber) {
- return false;
- }
-
- return getNearestMountedFiber(fiber) === fiber;
-}
-
-function assertIsMounted(fiber) {
- if (!(getNearestMountedFiber(fiber) === fiber)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-}
-
-function findCurrentFiberUsingSlowPath(fiber) {
- var alternate = fiber.alternate;
-
- if (!alternate) {
- // If there is no alternate, then we only need to check if it is mounted.
- var nearestMounted = getNearestMountedFiber(fiber);
-
- if (!(nearestMounted !== null)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (nearestMounted !== fiber) {
- return null;
- }
-
- return fiber;
- } // If we have two possible branches, we'll walk backwards up to the root
- // to see what path the root points to. On the way we may hit one of the
- // special cases and we'll deal with them.
-
-
- var a = fiber;
- var b = alternate;
-
- while (true) {
- var parentA = a.return;
-
- if (parentA === null) {
- // We're at the root.
- break;
- }
-
- var parentB = parentA.alternate;
-
- if (parentB === null) {
- // There is no alternate. This is an unusual case. Currently, it only
- // happens when a Suspense component is hidden. An extra fragment fiber
- // is inserted in between the Suspense fiber and its children. Skip
- // over this extra fragment fiber and proceed to the next parent.
- var nextParent = parentA.return;
-
- if (nextParent !== null) {
- a = b = nextParent;
- continue;
- } // If there's no parent, we're at the root.
-
-
- break;
- } // If both copies of the parent fiber point to the same child, we can
- // assume that the child is current. This happens when we bailout on low
- // priority: the bailed out fiber's child reuses the current child.
-
-
- if (parentA.child === parentB.child) {
- var child = parentA.child;
-
- while (child) {
- if (child === a) {
- // We've determined that A is the current branch.
- assertIsMounted(parentA);
- return fiber;
- }
-
- if (child === b) {
- // We've determined that B is the current branch.
- assertIsMounted(parentA);
- return alternate;
- }
-
- child = child.sibling;
- } // We should never have an alternate for any mounting node. So the only
- // way this could possibly happen is if this was unmounted, if at all.
-
-
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- if (a.return !== b.return) {
- // The return pointer of A and the return pointer of B point to different
- // fibers. We assume that return pointers never criss-cross, so A must
- // belong to the child set of A.return, and B must belong to the child
- // set of B.return.
- a = parentA;
- b = parentB;
- } else {
- // The return pointers point to the same fiber. We'll have to use the
- // default, slow path: scan the child sets of each parent alternate to see
- // which child belongs to which set.
- //
- // Search parent A's child set
- var didFindChild = false;
- var _child = parentA.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentA;
- b = parentB;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentA;
- a = parentB;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- // Search parent B's child set
- _child = parentB.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentB;
- b = parentA;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentB;
- a = parentA;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- {
- throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
- }
- }
- }
- }
-
- if (!(a.alternate === b)) {
- {
- throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } // If the root is not a host container, we're in a disconnected tree. I.e.
- // unmounted.
-
-
- if (!(a.tag === HostRoot)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (a.stateNode.current === a) {
- // We've determined that A is the current branch.
- return fiber;
- } // Otherwise B has to be current branch.
-
-
- return alternate;
-}
-function findCurrentHostFiber(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
-
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
-
-
- var node = currentParent;
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText) {
- return node;
- } else if (node.child) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return null;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
-
-
- return null;
-}
-function findCurrentHostFiberWithNoPortals(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
-
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
-
-
- var node = currentParent;
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
- return node;
- } else if (node.child && node.tag !== HostPortal) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return null;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
-
-
- return null;
-}
-function doesFiberContain(parentFiber, childFiber) {
- var node = childFiber;
- var parentFiberAlternate = parentFiber.alternate;
-
- while (node !== null) {
- if (node === parentFiber || node === parentFiberAlternate) {
- return true;
- }
-
- node = node.return;
- }
-
- return false;
-}
-
-var attemptUserBlockingHydration;
-function setAttemptUserBlockingHydration(fn) {
- attemptUserBlockingHydration = fn;
-}
-var attemptContinuousHydration;
-function setAttemptContinuousHydration(fn) {
- attemptContinuousHydration = fn;
-}
-var attemptHydrationAtCurrentPriority;
-function setAttemptHydrationAtCurrentPriority(fn) {
- attemptHydrationAtCurrentPriority = fn;
-}
-var attemptHydrationAtPriority;
-function setAttemptHydrationAtPriority(fn) {
- attemptHydrationAtPriority = fn;
-} // TODO: Upgrade this definition once we're on a newer version of Flow that
-var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
-
-var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
-// if the last target was dehydrated.
-
-var queuedFocus = null;
-var queuedDrag = null;
-var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
-
-var queuedPointers = new Map();
-var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
-
-var queuedExplicitHydrationTargets = [];
-function hasQueuedDiscreteEvents() {
- return queuedDiscreteEvents.length > 0;
-}
-var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
-'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
-function isReplayableDiscreteEvent(eventType) {
- return discreteReplayableEvents.indexOf(eventType) > -1;
-}
-
-function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- return {
- blockedOn: blockedOn,
- domEventName: domEventName,
- eventSystemFlags: eventSystemFlags | IS_REPLAYED,
- nativeEvent: nativeEvent,
- targetContainers: [targetContainer]
- };
-}
-
-function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
- queuedDiscreteEvents.push(queuedEvent);
-} // Resets the replaying for this type of continuous event to no event.
-
-function clearIfContinuousEvent(domEventName, nativeEvent) {
- switch (domEventName) {
- case 'focusin':
- case 'focusout':
- queuedFocus = null;
- break;
-
- case 'dragenter':
- case 'dragleave':
- queuedDrag = null;
- break;
-
- case 'mouseover':
- case 'mouseout':
- queuedMouse = null;
- break;
-
- case 'pointerover':
- case 'pointerout':
- {
- var pointerId = nativeEvent.pointerId;
- queuedPointers.delete(pointerId);
- break;
- }
-
- case 'gotpointercapture':
- case 'lostpointercapture':
- {
- var _pointerId = nativeEvent.pointerId;
- queuedPointerCaptures.delete(_pointerId);
- break;
- }
- }
-}
-
-function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
-
- if (blockedOn !== null) {
- var _fiber2 = getInstanceFromNode(blockedOn);
-
- if (_fiber2 !== null) {
- // Attempt to increase the priority of this target.
- attemptContinuousHydration(_fiber2);
- }
- }
-
- return queuedEvent;
- } // If we have already queued this exact event, then it's because
- // the different event systems have different DOM event listeners.
- // We can accumulate the flags, and the targetContainers, and
- // store a single event to be replayed.
-
-
- existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
- var targetContainers = existingQueuedEvent.targetContainers;
-
- if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
- targetContainers.push(targetContainer);
- }
-
- return existingQueuedEvent;
-}
-
-function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- // These set relatedTarget to null because the replayed event will be treated as if we
- // moved from outside the window (no target) onto the target once it hydrates.
- // Instead of mutating we could clone the event.
- switch (domEventName) {
- case 'focusin':
- {
- var focusEvent = nativeEvent;
- queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
- return true;
- }
-
- case 'dragenter':
- {
- var dragEvent = nativeEvent;
- queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
- return true;
- }
-
- case 'mouseover':
- {
- var mouseEvent = nativeEvent;
- queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
- return true;
- }
-
- case 'pointerover':
- {
- var pointerEvent = nativeEvent;
- var pointerId = pointerEvent.pointerId;
- queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
- return true;
- }
-
- case 'gotpointercapture':
- {
- var _pointerEvent = nativeEvent;
- var _pointerId2 = _pointerEvent.pointerId;
- queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
- return true;
- }
- }
-
- return false;
-} // Check if this target is unblocked. Returns true if it's unblocked.
-
-function attemptExplicitHydrationTarget(queuedTarget) {
- // TODO: This function shares a lot of logic with attemptToDispatchEvent.
- // Try to unify them. It's a bit tricky since it would require two return
- // values.
- var targetInst = getClosestInstanceFromNode(queuedTarget.target);
-
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
-
- if (nearestMounted !== null) {
- var tag = nearestMounted.tag;
-
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
-
- if (instance !== null) {
- // We're blocked on hydrating this boundary.
- // Increase its priority.
- queuedTarget.blockedOn = instance;
- attemptHydrationAtPriority(queuedTarget.lanePriority, function () {
- Scheduler.unstable_runWithPriority(queuedTarget.priority, function () {
- attemptHydrationAtCurrentPriority(nearestMounted);
- });
- });
- return;
- }
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
-
- if (root.hydrate) {
- queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
- // a root other than sync.
-
- return;
- }
- }
- }
- }
-
- queuedTarget.blockedOn = null;
-}
-
-function attemptReplayContinuousQueuedEvent(queuedEvent) {
- if (queuedEvent.blockedOn !== null) {
- return false;
- }
-
- var targetContainers = queuedEvent.targetContainers;
-
- while (targetContainers.length > 0) {
- var targetContainer = targetContainers[0];
- var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);
-
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- var _fiber3 = getInstanceFromNode(nextBlockedOn);
-
- if (_fiber3 !== null) {
- attemptContinuousHydration(_fiber3);
- }
-
- queuedEvent.blockedOn = nextBlockedOn;
- return false;
- } // This target container was successfully dispatched. Try the next.
-
-
- targetContainers.shift();
- }
-
- return true;
-}
-
-function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
- if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
- map.delete(key);
- }
-}
-
-function replayUnblockedEvents() {
- hasScheduledReplayAttempt = false; // First replay discrete events.
-
- while (queuedDiscreteEvents.length > 0) {
- var nextDiscreteEvent = queuedDiscreteEvents[0];
-
- if (nextDiscreteEvent.blockedOn !== null) {
- // We're still blocked.
- // Increase the priority of this boundary to unblock
- // the next discrete event.
- var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);
-
- if (_fiber4 !== null) {
- attemptUserBlockingHydration(_fiber4);
- }
-
- break;
- }
-
- var targetContainers = nextDiscreteEvent.targetContainers;
-
- while (targetContainers.length > 0) {
- var targetContainer = targetContainers[0];
- var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);
-
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- nextDiscreteEvent.blockedOn = nextBlockedOn;
- break;
- } // This target container was successfully dispatched. Try the next.
-
-
- targetContainers.shift();
- }
-
- if (nextDiscreteEvent.blockedOn === null) {
- // We've successfully replayed the first event. Let's try the next one.
- queuedDiscreteEvents.shift();
- }
- } // Next replay any continuous events.
-
-
- if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
- queuedFocus = null;
- }
-
- if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
- queuedDrag = null;
- }
-
- if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
- queuedMouse = null;
- }
-
- queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
- queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
-}
-
-function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
-
- if (!hasScheduledReplayAttempt) {
- hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
- // now unblocked. This first might not actually be unblocked yet.
- // We could check it early to avoid scheduling an unnecessary callback.
-
- Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
- }
- }
-}
-
-function retryIfBlockedOn(unblocked) {
- // Mark anything that was blocked on this as no longer blocked
- // and eligible for a replay.
- if (queuedDiscreteEvents.length > 0) {
- scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
- // worth it because we expect very few discrete events to queue up and once
- // we are actually fully unblocked it will be fast to replay them.
-
- for (var i = 1; i < queuedDiscreteEvents.length; i++) {
- var queuedEvent = queuedDiscreteEvents[i];
-
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
- }
- }
- }
-
- if (queuedFocus !== null) {
- scheduleCallbackIfUnblocked(queuedFocus, unblocked);
- }
-
- if (queuedDrag !== null) {
- scheduleCallbackIfUnblocked(queuedDrag, unblocked);
- }
-
- if (queuedMouse !== null) {
- scheduleCallbackIfUnblocked(queuedMouse, unblocked);
- }
-
- var unblock = function (queuedEvent) {
- return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
- };
-
- queuedPointers.forEach(unblock);
- queuedPointerCaptures.forEach(unblock);
-
- for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
- var queuedTarget = queuedExplicitHydrationTargets[_i];
-
- if (queuedTarget.blockedOn === unblocked) {
- queuedTarget.blockedOn = null;
- }
- }
-
- while (queuedExplicitHydrationTargets.length > 0) {
- var nextExplicitTarget = queuedExplicitHydrationTargets[0];
-
- if (nextExplicitTarget.blockedOn !== null) {
- // We're still blocked.
- break;
- } else {
- attemptExplicitHydrationTarget(nextExplicitTarget);
-
- if (nextExplicitTarget.blockedOn === null) {
- // We're unblocked.
- queuedExplicitHydrationTargets.shift();
- }
- }
- }
-}
-
-var DiscreteEvent = 0;
-var UserBlockingEvent = 1;
-var ContinuousEvent = 2;
-
-/**
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
- *
- * @param {string} styleProp
- * @param {string} eventName
- * @returns {object}
- */
-
-function makePrefixMap(styleProp, eventName) {
- var prefixes = {};
- prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
- prefixes['Webkit' + styleProp] = 'webkit' + eventName;
- prefixes['Moz' + styleProp] = 'moz' + eventName;
- return prefixes;
-}
-/**
- * A list of event names to a configurable list of vendor prefixes.
- */
-
-
-var vendorPrefixes = {
- animationend: makePrefixMap('Animation', 'AnimationEnd'),
- animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
- animationstart: makePrefixMap('Animation', 'AnimationStart'),
- transitionend: makePrefixMap('Transition', 'TransitionEnd')
-};
-/**
- * Event names that have already been detected and prefixed (if applicable).
- */
-
-var prefixedEventNames = {};
-/**
- * Element to check for prefixes on.
- */
-
-var style = {};
-/**
- * Bootstrap if a DOM exists.
- */
-
-if (canUseDOM) {
- style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
- // the un-prefixed "animation" and "transition" properties are defined on the
- // style object but the events that fire will still be prefixed, so we need
- // to check if the un-prefixed events are usable, and if not remove them from the map.
-
- if (!('AnimationEvent' in window)) {
- delete vendorPrefixes.animationend.animation;
- delete vendorPrefixes.animationiteration.animation;
- delete vendorPrefixes.animationstart.animation;
- } // Same as above
-
-
- if (!('TransitionEvent' in window)) {
- delete vendorPrefixes.transitionend.transition;
- }
-}
-/**
- * Attempts to determine the correct vendor prefixed event name.
- *
- * @param {string} eventName
- * @returns {string}
- */
-
-
-function getVendorPrefixedEventName(eventName) {
- if (prefixedEventNames[eventName]) {
- return prefixedEventNames[eventName];
- } else if (!vendorPrefixes[eventName]) {
- return eventName;
- }
-
- var prefixMap = vendorPrefixes[eventName];
-
- for (var styleProp in prefixMap) {
- if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
- return prefixedEventNames[eventName] = prefixMap[styleProp];
- }
- }
-
- return eventName;
-}
-
-var ANIMATION_END = getVendorPrefixedEventName('animationend');
-var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
-var ANIMATION_START = getVendorPrefixedEventName('animationstart');
-var TRANSITION_END = getVendorPrefixedEventName('transitionend');
-
-var topLevelEventsToReactNames = new Map();
-var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
-// the code required to apply the same logic for event prioritization and that of the
-// SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
-// duplication (for which there would be quite a bit). For the events that are not needed
-// for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
-// array of top level events.
-// Lastly, we ignore prettier so we can keep the formatting sane.
-// prettier-ignore
-
-var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!
-'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!
-'focusout', 'blur', // Careful!
-'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange'];
-var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];
-
-
-var userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore
-
-var continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting'];
-/**
- * Turns
- * ['abort', ...]
- *
- * into
- *
- * topLevelEventsToReactNames = new Map([
- * ['abort', 'onAbort'],
- * ]);
- *
- * and registers them.
- */
-
-function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {
- // As the event types are in pairs of two, we need to iterate
- // through in twos. The events are in pairs of two to save code
- // and improve init perf of processing this array, as it will
- // result in far fewer object allocations and property accesses
- // if we only use three arrays to process all the categories of
- // instead of tuples.
- for (var i = 0; i < eventTypes.length; i += 2) {
- var topEvent = eventTypes[i];
- var event = eventTypes[i + 1];
- var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
- var reactName = 'on' + capitalizedEvent;
- eventPriorities.set(topEvent, priority);
- topLevelEventsToReactNames.set(topEvent, reactName);
- registerTwoPhaseEvent(reactName, [topEvent]);
- }
-}
-
-function setEventPriorities(eventTypes, priority) {
- for (var i = 0; i < eventTypes.length; i++) {
- eventPriorities.set(eventTypes[i], priority);
- }
-}
-
-function getEventPriorityForPluginSystem(domEventName) {
- var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might
- // want to warn if we can't detect the priority
- // for the event.
-
- return priority === undefined ? ContinuousEvent : priority;
-}
-function registerSimpleEvents() {
- registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
- registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
- registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);
- setEventPriorities(otherDiscreteEvents, DiscreteEvent);
-}
-
-var Scheduler_now = Scheduler.unstable_now;
-
-{
- // Provide explicit error message when production+profiling bundle of e.g.
- // react-dom is used with production (non-profiling) bundle of
- // scheduler/tracing
- if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
- {
- throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
- }
- }
-}
-// ascending numbers so we can compare them like numbers. They start at 90 to
-// avoid clashing with Scheduler's priorities.
-
-var ImmediatePriority = 99;
-var UserBlockingPriority = 98;
-var NormalPriority = 97;
-var LowPriority = 96;
-var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
-
-var NoPriority = 90;
-var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
-
-var SyncLanePriority = 15;
-var SyncBatchedLanePriority = 14;
-var InputDiscreteHydrationLanePriority = 13;
-var InputDiscreteLanePriority = 12;
-var InputContinuousHydrationLanePriority = 11;
-var InputContinuousLanePriority = 10;
-var DefaultHydrationLanePriority = 9;
-var DefaultLanePriority = 8;
-var TransitionHydrationPriority = 7;
-var TransitionPriority = 6;
-var RetryLanePriority = 5;
-var SelectiveHydrationLanePriority = 4;
-var IdleHydrationLanePriority = 3;
-var IdleLanePriority = 2;
-var OffscreenLanePriority = 1;
-var NoLanePriority = 0;
-var TotalLanes = 31;
-var NoLanes =
-/* */
-0;
-var NoLane =
-/* */
-0;
-var SyncLane =
-/* */
-1;
-var SyncBatchedLane =
-/* */
-2;
-var InputDiscreteHydrationLane =
-/* */
-4;
-var InputDiscreteLanes =
-/* */
-24;
-var InputContinuousHydrationLane =
-/* */
-32;
-var InputContinuousLanes =
-/* */
-192;
-var DefaultHydrationLane =
-/* */
-256;
-var DefaultLanes =
-/* */
-3584;
-var TransitionHydrationLane =
-/* */
-4096;
-var TransitionLanes =
-/* */
-4186112;
-var RetryLanes =
-/* */
-62914560;
-var SomeRetryLane =
-/* */
-33554432;
-var SelectiveHydrationLane =
-/* */
-67108864;
-var NonIdleLanes =
-/* */
-134217727;
-var IdleHydrationLane =
-/* */
-134217728;
-var IdleLanes =
-/* */
-805306368;
-var OffscreenLane =
-/* */
-1073741824;
-var NoTimestamp = -1;
-function setCurrentUpdateLanePriority(newLanePriority) {
-} // "Registers" used to "return" multiple values
-// Used by getHighestPriorityLanes and getNextLanes:
-
-var return_highestLanePriority = DefaultLanePriority;
-
-function getHighestPriorityLanes(lanes) {
- if ((SyncLane & lanes) !== NoLanes) {
- return_highestLanePriority = SyncLanePriority;
- return SyncLane;
- }
-
- if ((SyncBatchedLane & lanes) !== NoLanes) {
- return_highestLanePriority = SyncBatchedLanePriority;
- return SyncBatchedLane;
- }
-
- if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {
- return_highestLanePriority = InputDiscreteHydrationLanePriority;
- return InputDiscreteHydrationLane;
- }
-
- var inputDiscreteLanes = InputDiscreteLanes & lanes;
-
- if (inputDiscreteLanes !== NoLanes) {
- return_highestLanePriority = InputDiscreteLanePriority;
- return inputDiscreteLanes;
- }
-
- if ((lanes & InputContinuousHydrationLane) !== NoLanes) {
- return_highestLanePriority = InputContinuousHydrationLanePriority;
- return InputContinuousHydrationLane;
- }
-
- var inputContinuousLanes = InputContinuousLanes & lanes;
-
- if (inputContinuousLanes !== NoLanes) {
- return_highestLanePriority = InputContinuousLanePriority;
- return inputContinuousLanes;
- }
-
- if ((lanes & DefaultHydrationLane) !== NoLanes) {
- return_highestLanePriority = DefaultHydrationLanePriority;
- return DefaultHydrationLane;
- }
-
- var defaultLanes = DefaultLanes & lanes;
-
- if (defaultLanes !== NoLanes) {
- return_highestLanePriority = DefaultLanePriority;
- return defaultLanes;
- }
-
- if ((lanes & TransitionHydrationLane) !== NoLanes) {
- return_highestLanePriority = TransitionHydrationPriority;
- return TransitionHydrationLane;
- }
-
- var transitionLanes = TransitionLanes & lanes;
-
- if (transitionLanes !== NoLanes) {
- return_highestLanePriority = TransitionPriority;
- return transitionLanes;
- }
-
- var retryLanes = RetryLanes & lanes;
-
- if (retryLanes !== NoLanes) {
- return_highestLanePriority = RetryLanePriority;
- return retryLanes;
- }
-
- if (lanes & SelectiveHydrationLane) {
- return_highestLanePriority = SelectiveHydrationLanePriority;
- return SelectiveHydrationLane;
- }
-
- if ((lanes & IdleHydrationLane) !== NoLanes) {
- return_highestLanePriority = IdleHydrationLanePriority;
- return IdleHydrationLane;
- }
-
- var idleLanes = IdleLanes & lanes;
-
- if (idleLanes !== NoLanes) {
- return_highestLanePriority = IdleLanePriority;
- return idleLanes;
- }
-
- if ((OffscreenLane & lanes) !== NoLanes) {
- return_highestLanePriority = OffscreenLanePriority;
- return OffscreenLane;
- }
-
- {
- error('Should have found matching lanes. This is a bug in React.');
- } // This shouldn't be reachable, but as a fallback, return the entire bitmask.
-
-
- return_highestLanePriority = DefaultLanePriority;
- return lanes;
-}
-
-function schedulerPriorityToLanePriority(schedulerPriorityLevel) {
- switch (schedulerPriorityLevel) {
- case ImmediatePriority:
- return SyncLanePriority;
-
- case UserBlockingPriority:
- return InputContinuousLanePriority;
-
- case NormalPriority:
- case LowPriority:
- // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
- return DefaultLanePriority;
-
- case IdlePriority:
- return IdleLanePriority;
-
- default:
- return NoLanePriority;
- }
-}
-function lanePriorityToSchedulerPriority(lanePriority) {
- switch (lanePriority) {
- case SyncLanePriority:
- case SyncBatchedLanePriority:
- return ImmediatePriority;
-
- case InputDiscreteHydrationLanePriority:
- case InputDiscreteLanePriority:
- case InputContinuousHydrationLanePriority:
- case InputContinuousLanePriority:
- return UserBlockingPriority;
-
- case DefaultHydrationLanePriority:
- case DefaultLanePriority:
- case TransitionHydrationPriority:
- case TransitionPriority:
- case SelectiveHydrationLanePriority:
- case RetryLanePriority:
- return NormalPriority;
-
- case IdleHydrationLanePriority:
- case IdleLanePriority:
- case OffscreenLanePriority:
- return IdlePriority;
-
- case NoLanePriority:
- return NoPriority;
-
- default:
- {
- {
- throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
- }
- }
-
- }
-}
-function getNextLanes(root, wipLanes) {
- // Early bailout if there's no pending work left.
- var pendingLanes = root.pendingLanes;
-
- if (pendingLanes === NoLanes) {
- return_highestLanePriority = NoLanePriority;
- return NoLanes;
- }
-
- var nextLanes = NoLanes;
- var nextLanePriority = NoLanePriority;
- var expiredLanes = root.expiredLanes;
- var suspendedLanes = root.suspendedLanes;
- var pingedLanes = root.pingedLanes; // Check if any work has expired.
-
- if (expiredLanes !== NoLanes) {
- nextLanes = expiredLanes;
- nextLanePriority = return_highestLanePriority = SyncLanePriority;
- } else {
- // Do not work on any idle work until all the non-idle work has finished,
- // even if the work is suspended.
- var nonIdlePendingLanes = pendingLanes & NonIdleLanes;
-
- if (nonIdlePendingLanes !== NoLanes) {
- var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;
-
- if (nonIdleUnblockedLanes !== NoLanes) {
- nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
- nextLanePriority = return_highestLanePriority;
- } else {
- var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;
-
- if (nonIdlePingedLanes !== NoLanes) {
- nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
- nextLanePriority = return_highestLanePriority;
- }
- }
- } else {
- // The only remaining work is Idle.
- var unblockedLanes = pendingLanes & ~suspendedLanes;
-
- if (unblockedLanes !== NoLanes) {
- nextLanes = getHighestPriorityLanes(unblockedLanes);
- nextLanePriority = return_highestLanePriority;
- } else {
- if (pingedLanes !== NoLanes) {
- nextLanes = getHighestPriorityLanes(pingedLanes);
- nextLanePriority = return_highestLanePriority;
- }
- }
- }
- }
-
- if (nextLanes === NoLanes) {
- // This should only be reachable if we're suspended
- // TODO: Consider warning in this path if a fallback timer is not scheduled.
- return NoLanes;
- } // If there are higher priority lanes, we'll include them even if they
- // are suspended.
-
-
- nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt
- // it and we'll lose our progress. We should only do this if the new lanes are
- // higher priority.
-
- if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
- // bother waiting until the root is complete.
- (wipLanes & suspendedLanes) === NoLanes) {
- getHighestPriorityLanes(wipLanes);
- var wipLanePriority = return_highestLanePriority;
-
- if (nextLanePriority <= wipLanePriority) {
- return wipLanes;
- } else {
- return_highestLanePriority = nextLanePriority;
- }
- } // Check for entangled lanes and add them to the batch.
- //
- // A lane is said to be entangled with another when it's not allowed to render
- // in a batch that does not also include the other lane. Typically we do this
- // when multiple updates have the same source, and we only want to respond to
- // the most recent event from that source.
- //
- // Note that we apply entanglements *after* checking for partial work above.
- // This means that if a lane is entangled during an interleaved event while
- // it's already rendering, we won't interrupt it. This is intentional, since
- // entanglement is usually "best effort": we'll try our best to render the
- // lanes in the same batch, but it's not worth throwing out partially
- // completed work in order to do it.
- //
- // For those exceptions where entanglement is semantically important, like
- // useMutableSource, we should ensure that there is no partial work at the
- // time we apply the entanglement.
-
-
- var entangledLanes = root.entangledLanes;
-
- if (entangledLanes !== NoLanes) {
- var entanglements = root.entanglements;
- var lanes = nextLanes & entangledLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- nextLanes |= entanglements[index];
- lanes &= ~lane;
- }
- }
-
- return nextLanes;
-}
-function getMostRecentEventTime(root, lanes) {
- var eventTimes = root.eventTimes;
- var mostRecentEventTime = NoTimestamp;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- var eventTime = eventTimes[index];
-
- if (eventTime > mostRecentEventTime) {
- mostRecentEventTime = eventTime;
- }
-
- lanes &= ~lane;
- }
-
- return mostRecentEventTime;
-}
-
-function computeExpirationTime(lane, currentTime) {
- // TODO: Expiration heuristic is constant per lane, so could use a map.
- getHighestPriorityLanes(lane);
- var priority = return_highestLanePriority;
-
- if (priority >= InputContinuousLanePriority) {
- // User interactions should expire slightly more quickly.
- //
- // NOTE: This is set to the corresponding constant as in Scheduler.js. When
- // we made it larger, a product metric in www regressed, suggesting there's
- // a user interaction that's being starved by a series of synchronous
- // updates. If that theory is correct, the proper solution is to fix the
- // starvation. However, this scenario supports the idea that expiration
- // times are an important safeguard when starvation does happen.
- //
- // Also note that, in the case of user input specifically, this will soon no
- // longer be an issue because we plan to make user input synchronous by
- // default (until you enter `startTransition`, of course.)
- //
- // If weren't planning to make these updates synchronous soon anyway, I
- // would probably make this number a configurable parameter.
- return currentTime + 250;
- } else if (priority >= TransitionPriority) {
- return currentTime + 5000;
- } else {
- // Anything idle priority or lower should never expire.
- return NoTimestamp;
- }
-}
-
-function markStarvedLanesAsExpired(root, currentTime) {
- // TODO: This gets called every time we yield. We can optimize by storing
- // the earliest expiration time on the root. Then use that to quickly bail out
- // of this function.
- var pendingLanes = root.pendingLanes;
- var suspendedLanes = root.suspendedLanes;
- var pingedLanes = root.pingedLanes;
- var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
- // expiration time. If so, we'll assume the update is being starved and mark
- // it as expired to force it to finish.
-
- var lanes = pendingLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- var expirationTime = expirationTimes[index];
-
- if (expirationTime === NoTimestamp) {
- // Found a pending lane with no expiration time. If it's not suspended, or
- // if it's pinged, assume it's CPU-bound. Compute a new expiration time
- // using the current time.
- if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
- // Assumes timestamps are monotonically increasing.
- expirationTimes[index] = computeExpirationTime(lane, currentTime);
- }
- } else if (expirationTime <= currentTime) {
- // This lane expired
- root.expiredLanes |= lane;
- }
-
- lanes &= ~lane;
- }
-} // This returns the highest priority pending lanes regardless of whether they
-function getLanesToRetrySynchronouslyOnError(root) {
- var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
-
- if (everythingButOffscreen !== NoLanes) {
- return everythingButOffscreen;
- }
-
- if (everythingButOffscreen & OffscreenLane) {
- return OffscreenLane;
- }
-
- return NoLanes;
-}
-function returnNextLanesPriority() {
- return return_highestLanePriority;
-}
-function includesNonIdleWork(lanes) {
- return (lanes & NonIdleLanes) !== NoLanes;
-}
-function includesOnlyRetries(lanes) {
- return (lanes & RetryLanes) === lanes;
-}
-function includesOnlyTransitions(lanes) {
- return (lanes & TransitionLanes) === lanes;
-} // To ensure consistency across multiple updates in the same event, this should
-// be a pure function, so that it always returns the same lane for given inputs.
-
-function findUpdateLane(lanePriority, wipLanes) {
- switch (lanePriority) {
- case NoLanePriority:
- break;
-
- case SyncLanePriority:
- return SyncLane;
-
- case SyncBatchedLanePriority:
- return SyncBatchedLane;
-
- case InputDiscreteLanePriority:
- {
- var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);
-
- if (_lane === NoLane) {
- // Shift to the next priority level
- return findUpdateLane(InputContinuousLanePriority, wipLanes);
- }
-
- return _lane;
- }
-
- case InputContinuousLanePriority:
- {
- var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);
-
- if (_lane2 === NoLane) {
- // Shift to the next priority level
- return findUpdateLane(DefaultLanePriority, wipLanes);
- }
-
- return _lane2;
- }
-
- case DefaultLanePriority:
- {
- var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);
-
- if (_lane3 === NoLane) {
- // If all the default lanes are already being worked on, look for a
- // lane in the transition range.
- _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);
-
- if (_lane3 === NoLane) {
- // All the transition lanes are taken, too. This should be very
- // rare, but as a last resort, pick a default lane. This will have
- // the effect of interrupting the current work-in-progress render.
- _lane3 = pickArbitraryLane(DefaultLanes);
- }
- }
-
- return _lane3;
- }
-
- case TransitionPriority: // Should be handled by findTransitionLane instead
-
- case RetryLanePriority:
- // Should be handled by findRetryLane instead
- break;
-
- case IdleLanePriority:
- var lane = pickArbitraryLane(IdleLanes & ~wipLanes);
-
- if (lane === NoLane) {
- lane = pickArbitraryLane(IdleLanes);
- }
-
- return lane;
- }
-
- {
- {
- throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
- }
- }
-} // To ensure consistency across multiple updates in the same event, this should
-// be pure function, so that it always returns the same lane for given inputs.
-
-function findTransitionLane(wipLanes, pendingLanes) {
- // First look for lanes that are completely unclaimed, i.e. have no
- // pending work.
- var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);
-
- if (lane === NoLane) {
- // If all lanes have pending work, look for a lane that isn't currently
- // being worked on.
- lane = pickArbitraryLane(TransitionLanes & ~wipLanes);
-
- if (lane === NoLane) {
- // If everything is being worked on, pick any lane. This has the
- // effect of interrupting the current work-in-progress.
- lane = pickArbitraryLane(TransitionLanes);
- }
- }
-
- return lane;
-} // To ensure consistency across multiple updates in the same event, this should
-// be pure function, so that it always returns the same lane for given inputs.
-
-function findRetryLane(wipLanes) {
- // This is a fork of `findUpdateLane` designed specifically for Suspense
- // "retries" — a special update that attempts to flip a Suspense boundary
- // from its placeholder state to its primary/resolved state.
- var lane = pickArbitraryLane(RetryLanes & ~wipLanes);
-
- if (lane === NoLane) {
- lane = pickArbitraryLane(RetryLanes);
- }
-
- return lane;
-}
-
-function getHighestPriorityLane(lanes) {
- return lanes & -lanes;
-}
-
-function getLowestPriorityLane(lanes) {
- // This finds the most significant non-zero bit.
- var index = 31 - clz32(lanes);
- return index < 0 ? NoLanes : 1 << index;
-}
-
-function getEqualOrHigherPriorityLanes(lanes) {
- return (getLowestPriorityLane(lanes) << 1) - 1;
-}
-
-function pickArbitraryLane(lanes) {
- // This wrapper function gets inlined. Only exists so to communicate that it
- // doesn't matter which bit is selected; you can pick any bit without
- // affecting the algorithms where its used. Here I'm using
- // getHighestPriorityLane because it requires the fewest operations.
- return getHighestPriorityLane(lanes);
-}
-
-function pickArbitraryLaneIndex(lanes) {
- return 31 - clz32(lanes);
-}
-
-function laneToIndex(lane) {
- return pickArbitraryLaneIndex(lane);
-}
-
-function includesSomeLane(a, b) {
- return (a & b) !== NoLanes;
-}
-function isSubsetOfLanes(set, subset) {
- return (set & subset) === subset;
-}
-function mergeLanes(a, b) {
- return a | b;
-}
-function removeLanes(set, subset) {
- return set & ~subset;
-} // Seems redundant, but it changes the type from a single lane (used for
-// updates) to a group of lanes (used for flushing work).
-
-function laneToLanes(lane) {
- return lane;
-}
-function higherPriorityLane(a, b) {
- // This works because the bit ranges decrease in priority as you go left.
- return a !== NoLane && a < b ? a : b;
-}
-function createLaneMap(initial) {
- // Intentionally pushing one by one.
- // https://v8.dev/blog/elements-kinds#avoid-creating-holes
- var laneMap = [];
-
- for (var i = 0; i < TotalLanes; i++) {
- laneMap.push(initial);
- }
-
- return laneMap;
-}
-function markRootUpdated(root, updateLane, eventTime) {
- root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But
- // it's not practical to try every single possible combination. We need a
- // heuristic to decide which lanes to attempt to render, and in which batches.
- // For now, we use the same heuristic as in the old ExpirationTimes model:
- // retry any lane at equal or lower priority, but don't try updates at higher
- // priority without also including the lower priority updates. This works well
- // when considering updates across different priority levels, but isn't
- // sufficient for updates within the same priority, since we want to treat
- // those updates as parallel.
- // Unsuspend any update at equal or lower priority.
-
- var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111
-
- root.suspendedLanes &= higherPriorityLanes;
- root.pingedLanes &= higherPriorityLanes;
- var eventTimes = root.eventTimes;
- var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
- // recent event, and we assume time is monotonically increasing.
-
- eventTimes[index] = eventTime;
-}
-function markRootSuspended(root, suspendedLanes) {
- root.suspendedLanes |= suspendedLanes;
- root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.
-
- var expirationTimes = root.expirationTimes;
- var lanes = suspendedLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- expirationTimes[index] = NoTimestamp;
- lanes &= ~lane;
- }
-}
-function markRootPinged(root, pingedLanes, eventTime) {
- root.pingedLanes |= root.suspendedLanes & pingedLanes;
-}
-function markDiscreteUpdatesExpired(root) {
- root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;
-}
-function hasDiscreteLanes(lanes) {
- return (lanes & InputDiscreteLanes) !== NoLanes;
-}
-function markRootMutableRead(root, updateLane) {
- root.mutableReadLanes |= updateLane & root.pendingLanes;
-}
-function markRootFinished(root, remainingLanes) {
- var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
- root.pendingLanes = remainingLanes; // Let's try everything again
-
- root.suspendedLanes = 0;
- root.pingedLanes = 0;
- root.expiredLanes &= remainingLanes;
- root.mutableReadLanes &= remainingLanes;
- root.entangledLanes &= remainingLanes;
- var entanglements = root.entanglements;
- var eventTimes = root.eventTimes;
- var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work
-
- var lanes = noLongerPendingLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- entanglements[index] = NoLanes;
- eventTimes[index] = NoTimestamp;
- expirationTimes[index] = NoTimestamp;
- lanes &= ~lane;
- }
-}
-function markRootEntangled(root, entangledLanes) {
- root.entangledLanes |= entangledLanes;
- var entanglements = root.entanglements;
- var lanes = entangledLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- entanglements[index] |= entangledLanes;
- lanes &= ~lane;
- }
-}
-var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.
-// Based on:
-// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
-
-var log = Math.log;
-var LN2 = Math.LN2;
-
-function clz32Fallback(lanes) {
- if (lanes === 0) {
- return 32;
- }
-
- return 31 - (log(lanes) / LN2 | 0) | 0;
-}
-
-// Intentionally not named imports because Rollup would use dynamic dispatch for
-var UserBlockingPriority$1 = Scheduler.unstable_UserBlockingPriority,
- runWithPriority = Scheduler.unstable_runWithPriority; // TODO: can we stop exporting these?
-
-var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
-// We'd like to remove this but it's not clear if this is safe.
-
-function setEnabled(enabled) {
- _enabled = !!enabled;
-}
-function isEnabled() {
- return _enabled;
-}
-function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
- var eventPriority = getEventPriorityForPluginSystem(domEventName);
- var listenerWrapper;
-
- switch (eventPriority) {
- case DiscreteEvent:
- listenerWrapper = dispatchDiscreteEvent;
- break;
-
- case UserBlockingEvent:
- listenerWrapper = dispatchUserBlockingUpdate;
- break;
-
- case ContinuousEvent:
- default:
- listenerWrapper = dispatchEvent;
- break;
- }
-
- return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
-}
-
-function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
- {
- flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
- }
-
- discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);
-}
-
-function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {
- {
- runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));
- }
-}
-
-function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- if (!_enabled) {
- return;
- }
-
- var allowReplay = true;
-
- {
- // TODO: replaying capture phase events is currently broken
- // because we used to do it during top-level native bubble handlers
- // but now we use different bubble and capture handlers.
- // In eager mode, we attach capture listeners early, so we need
- // to filter them out until we fix the logic to handle them correctly.
- // This could've been outside the flag but I put it inside to reduce risk.
- allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;
- }
-
- if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {
- // If we already have a queue of discrete events, and this is another discrete
- // event, then we can't dispatch it regardless of its target, since they
- // need to dispatch in order.
- queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
- domEventName, eventSystemFlags, targetContainer, nativeEvent);
- return;
- }
-
- var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
-
- if (blockedOn === null) {
- // We successfully dispatched this event.
- if (allowReplay) {
- clearIfContinuousEvent(domEventName, nativeEvent);
- }
-
- return;
- }
-
- if (allowReplay) {
- if (isReplayableDiscreteEvent(domEventName)) {
- // This this to be replayed later once the target is available.
- queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
- return;
- }
-
- if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
- return;
- } // We need to clear only if we didn't queue because
- // queueing is accummulative.
-
-
- clearIfContinuousEvent(domEventName, nativeEvent);
- } // This is not replayable so we'll invoke it but without a target,
- // in case the event system needs to trace it.
-
-
- dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
-} // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
-
-function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- // TODO: Warn if _enabled is false.
- var nativeEventTarget = getEventTarget(nativeEvent);
- var targetInst = getClosestInstanceFromNode(nativeEventTarget);
-
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
-
- if (nearestMounted === null) {
- // This tree has been unmounted already. Dispatch without a target.
- targetInst = null;
- } else {
- var tag = nearestMounted.tag;
-
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
-
- if (instance !== null) {
- // Queue the event to be replayed later. Abort dispatching since we
- // don't want this event dispatched twice through the event system.
- // TODO: If this is the first discrete event in the queue. Schedule an increased
- // priority for this boundary.
- return instance;
- } // This shouldn't happen, something went wrong but to avoid blocking
- // the whole system, dispatch the event without a target.
- // TODO: Warn.
-
-
- targetInst = null;
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
-
- if (root.hydrate) {
- // If this happens during a replay something went wrong and it might block
- // the whole system.
- return getContainerFromFiber(nearestMounted);
- }
-
- targetInst = null;
- } else if (nearestMounted !== targetInst) {
- // If we get an event (ex: img onload) before committing that
- // component's mount, ignore it for now (that is, treat it as if it was an
- // event on a non-React tree). We might also consider queueing events and
- // dispatching them after the mount.
- targetInst = null;
- }
- }
- }
-
- dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.
-
- return null;
-}
-
-function addEventBubbleListener(target, eventType, listener) {
- target.addEventListener(eventType, listener, false);
- return listener;
-}
-function addEventCaptureListener(target, eventType, listener) {
- target.addEventListener(eventType, listener, true);
- return listener;
-}
-function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
- target.addEventListener(eventType, listener, {
- capture: true,
- passive: passive
- });
- return listener;
-}
-function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
- target.addEventListener(eventType, listener, {
- passive: passive
- });
- return listener;
-}
-
-/**
- * These variables store information about text content of a target node,
- * allowing comparison of content before and after a given event.
- *
- * Identify the node where selection currently begins, then observe
- * both its text content and its current position in the DOM. Since the
- * browser may natively replace the target node during composition, we can
- * use its position to find its replacement.
- *
- *
- */
-var root = null;
-var startText = null;
-var fallbackText = null;
-function initialize(nativeEventTarget) {
- root = nativeEventTarget;
- startText = getText();
- return true;
-}
-function reset() {
- root = null;
- startText = null;
- fallbackText = null;
-}
-function getData() {
- if (fallbackText) {
- return fallbackText;
- }
-
- var start;
- var startValue = startText;
- var startLength = startValue.length;
- var end;
- var endValue = getText();
- var endLength = endValue.length;
-
- for (start = 0; start < startLength; start++) {
- if (startValue[start] !== endValue[start]) {
- break;
- }
- }
-
- var minEnd = startLength - start;
-
- for (end = 1; end <= minEnd; end++) {
- if (startValue[startLength - end] !== endValue[endLength - end]) {
- break;
- }
- }
-
- var sliceTail = end > 1 ? 1 - end : undefined;
- fallbackText = endValue.slice(start, sliceTail);
- return fallbackText;
-}
-function getText() {
- if ('value' in root) {
- return root.value;
- }
-
- return root.textContent;
-}
-
-/**
- * `charCode` represents the actual "character code" and is safe to use with
- * `String.fromCharCode`. As such, only keys that correspond to printable
- * characters produce a valid `charCode`, the only exception to this is Enter.
- * The Tab-key is considered non-printable and does not have a `charCode`,
- * presumably because it does not produce a tab-character in browsers.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {number} Normalized `charCode` property.
- */
-function getEventCharCode(nativeEvent) {
- var charCode;
- var keyCode = nativeEvent.keyCode;
-
- if ('charCode' in nativeEvent) {
- charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
-
- if (charCode === 0 && keyCode === 13) {
- charCode = 13;
- }
- } else {
- // IE8 does not implement `charCode`, but `keyCode` has the correct value.
- charCode = keyCode;
- } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
- // report Enter as charCode 10 when ctrl is pressed.
-
-
- if (charCode === 10) {
- charCode = 13;
- } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
- // Must not discard the (non-)printable Enter-key.
-
-
- if (charCode >= 32 || charCode === 13) {
- return charCode;
- }
-
- return 0;
-}
-
-function functionThatReturnsTrue() {
- return true;
-}
-
-function functionThatReturnsFalse() {
- return false;
-} // This is intentionally a factory so that we have different returned constructors.
-// If we had a single constructor, it would be megamorphic and engines would deopt.
-
-
-function createSyntheticEvent(Interface) {
- /**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- */
- function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
- this._reactName = reactName;
- this._targetInst = targetInst;
- this.type = reactEventType;
- this.nativeEvent = nativeEvent;
- this.target = nativeEventTarget;
- this.currentTarget = null;
-
- for (var _propName in Interface) {
- if (!Interface.hasOwnProperty(_propName)) {
- continue;
- }
-
- var normalize = Interface[_propName];
-
- if (normalize) {
- this[_propName] = normalize(nativeEvent);
- } else {
- this[_propName] = nativeEvent[_propName];
- }
- }
-
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
-
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
-
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
- }
-
- _assign(SyntheticBaseEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.preventDefault) {
- event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
-
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.stopPropagation) {
- event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
-
- this.isPropagationStopped = functionThatReturnsTrue;
- },
-
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {// Modern event system doesn't use pooling.
- },
-
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsTrue
- });
-
- return SyntheticBaseEvent;
-}
-/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
-var EventInterface = {
- eventPhase: 0,
- bubbles: 0,
- cancelable: 0,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: 0,
- isTrusted: 0
-};
-var SyntheticEvent = createSyntheticEvent(EventInterface);
-
-var UIEventInterface = _assign({}, EventInterface, {
- view: 0,
- detail: 0
-});
-
-var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
-var lastMovementX;
-var lastMovementY;
-var lastMouseEvent;
-
-function updateMouseMovementPolyfillState(event) {
- if (event !== lastMouseEvent) {
- if (lastMouseEvent && event.type === 'mousemove') {
- lastMovementX = event.screenX - lastMouseEvent.screenX;
- lastMovementY = event.screenY - lastMouseEvent.screenY;
- } else {
- lastMovementX = 0;
- lastMovementY = 0;
- }
-
- lastMouseEvent = event;
- }
-}
-/**
- * @interface MouseEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
-var MouseEventInterface = _assign({}, UIEventInterface, {
- screenX: 0,
- screenY: 0,
- clientX: 0,
- clientY: 0,
- pageX: 0,
- pageY: 0,
- ctrlKey: 0,
- shiftKey: 0,
- altKey: 0,
- metaKey: 0,
- getModifierState: getEventModifierState,
- button: 0,
- buttons: 0,
- relatedTarget: function (event) {
- if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
- return event.relatedTarget;
- },
- movementX: function (event) {
- if ('movementX' in event) {
- return event.movementX;
- }
-
- updateMouseMovementPolyfillState(event);
- return lastMovementX;
- },
- movementY: function (event) {
- if ('movementY' in event) {
- return event.movementY;
- } // Don't need to call updateMouseMovementPolyfillState() here
- // because it's guaranteed to have already run when movementX
- // was copied.
-
-
- return lastMovementY;
- }
-});
-
-var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
-/**
- * @interface DragEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var DragEventInterface = _assign({}, MouseEventInterface, {
- dataTransfer: 0
-});
-
-var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
-/**
- * @interface FocusEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var FocusEventInterface = _assign({}, UIEventInterface, {
- relatedTarget: 0
-});
-
-var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
- */
-
-var AnimationEventInterface = _assign({}, EventInterface, {
- animationName: 0,
- elapsedTime: 0,
- pseudoElement: 0
-});
-
-var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/clipboard-apis/
- */
-
-var ClipboardEventInterface = _assign({}, EventInterface, {
- clipboardData: function (event) {
- return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
- }
-});
-
-var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
- */
-
-var CompositionEventInterface = _assign({}, EventInterface, {
- data: 0
-});
-
-var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
- * /#events-inputevents
- */
-// Happens to share the same list for now.
-
-var SyntheticInputEvent = SyntheticCompositionEvent;
-/**
- * Normalization of deprecated HTML5 `key` values
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
-var normalizeKey = {
- Esc: 'Escape',
- Spacebar: ' ',
- Left: 'ArrowLeft',
- Up: 'ArrowUp',
- Right: 'ArrowRight',
- Down: 'ArrowDown',
- Del: 'Delete',
- Win: 'OS',
- Menu: 'ContextMenu',
- Apps: 'ContextMenu',
- Scroll: 'ScrollLock',
- MozPrintableKey: 'Unidentified'
-};
-/**
- * Translation from legacy `keyCode` to HTML5 `key`
- * Only special keys supported, all others depend on keyboard layout or browser
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
-var translateToKey = {
- '8': 'Backspace',
- '9': 'Tab',
- '12': 'Clear',
- '13': 'Enter',
- '16': 'Shift',
- '17': 'Control',
- '18': 'Alt',
- '19': 'Pause',
- '20': 'CapsLock',
- '27': 'Escape',
- '32': ' ',
- '33': 'PageUp',
- '34': 'PageDown',
- '35': 'End',
- '36': 'Home',
- '37': 'ArrowLeft',
- '38': 'ArrowUp',
- '39': 'ArrowRight',
- '40': 'ArrowDown',
- '45': 'Insert',
- '46': 'Delete',
- '112': 'F1',
- '113': 'F2',
- '114': 'F3',
- '115': 'F4',
- '116': 'F5',
- '117': 'F6',
- '118': 'F7',
- '119': 'F8',
- '120': 'F9',
- '121': 'F10',
- '122': 'F11',
- '123': 'F12',
- '144': 'NumLock',
- '145': 'ScrollLock',
- '224': 'Meta'
-};
-/**
- * @param {object} nativeEvent Native browser event.
- * @return {string} Normalized `key` property.
- */
-
-function getEventKey(nativeEvent) {
- if (nativeEvent.key) {
- // Normalize inconsistent values reported by browsers due to
- // implementations of a working draft specification.
- // FireFox implements `key` but returns `MozPrintableKey` for all
- // printable characters (normalized to `Unidentified`), ignore it.
- var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
-
- if (key !== 'Unidentified') {
- return key;
- }
- } // Browser does not implement `key`, polyfill as much of it as we can.
-
-
- if (nativeEvent.type === 'keypress') {
- var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
- // thus be captured by `keypress`, no other non-printable key should.
-
- return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
- }
-
- if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
- // While user keyboard layout determines the actual meaning of each
- // `keyCode` value, almost all function keys have a universal value.
- return translateToKey[nativeEvent.keyCode] || 'Unidentified';
- }
-
- return '';
-}
-/**
- * Translation from modifier key to the associated property in the event.
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
- */
-
-
-var modifierKeyToProp = {
- Alt: 'altKey',
- Control: 'ctrlKey',
- Meta: 'metaKey',
- Shift: 'shiftKey'
-}; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
-// getModifierState. If getModifierState is not supported, we map it to a set of
-// modifier keys exposed by the event. In this case, Lock-keys are not supported.
-
-function modifierStateGetter(keyArg) {
- var syntheticEvent = this;
- var nativeEvent = syntheticEvent.nativeEvent;
-
- if (nativeEvent.getModifierState) {
- return nativeEvent.getModifierState(keyArg);
- }
-
- var keyProp = modifierKeyToProp[keyArg];
- return keyProp ? !!nativeEvent[keyProp] : false;
-}
-
-function getEventModifierState(nativeEvent) {
- return modifierStateGetter;
-}
-/**
- * @interface KeyboardEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
-var KeyboardEventInterface = _assign({}, UIEventInterface, {
- key: getEventKey,
- code: 0,
- location: 0,
- ctrlKey: 0,
- shiftKey: 0,
- altKey: 0,
- metaKey: 0,
- repeat: 0,
- locale: 0,
- getModifierState: getEventModifierState,
- // Legacy Interface
- charCode: function (event) {
- // `charCode` is the result of a KeyPress event and represents the value of
- // the actual printable character.
- // KeyPress is deprecated, but its replacement is not yet final and not
- // implemented in any major browser. Only KeyPress has charCode.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- return 0;
- },
- keyCode: function (event) {
- // `keyCode` is the result of a KeyDown/Up event and represents the value of
- // physical keyboard key.
- // The actual meaning of the value depends on the users' keyboard layout
- // which cannot be detected. Assuming that it is a US keyboard layout
- // provides a surprisingly accurate mapping for US and European users.
- // Due to this, it is left to the user to implement at this time.
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- },
- which: function (event) {
- // `which` is an alias for either `keyCode` or `charCode` depending on the
- // type of the event.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- }
-});
-
-var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
-/**
- * @interface PointerEvent
- * @see http://www.w3.org/TR/pointerevents/
- */
-
-var PointerEventInterface = _assign({}, MouseEventInterface, {
- pointerId: 0,
- width: 0,
- height: 0,
- pressure: 0,
- tangentialPressure: 0,
- tiltX: 0,
- tiltY: 0,
- twist: 0,
- pointerType: 0,
- isPrimary: 0
-});
-
-var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
-/**
- * @interface TouchEvent
- * @see http://www.w3.org/TR/touch-events/
- */
-
-var TouchEventInterface = _assign({}, UIEventInterface, {
- touches: 0,
- targetTouches: 0,
- changedTouches: 0,
- altKey: 0,
- metaKey: 0,
- ctrlKey: 0,
- shiftKey: 0,
- getModifierState: getEventModifierState
-});
-
-var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
-/**
- * @interface Event
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
- */
-
-var TransitionEventInterface = _assign({}, EventInterface, {
- propertyName: 0,
- elapsedTime: 0,
- pseudoElement: 0
-});
-
-var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
-/**
- * @interface WheelEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-var WheelEventInterface = _assign({}, MouseEventInterface, {
- deltaX: function (event) {
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
- },
- deltaY: function (event) {
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
- 'wheelDelta' in event ? -event.wheelDelta : 0;
- },
- deltaZ: 0,
- // Browsers without "deltaMode" is reporting in raw wheel delta where one
- // notch on the scroll is always +/- 120, roughly equivalent to pixels.
- // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
- // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
- deltaMode: 0
-});
-
-var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
-
-var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
-
-var START_KEYCODE = 229;
-var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
-var documentMode = null;
-
-if (canUseDOM && 'documentMode' in document) {
- documentMode = document.documentMode;
-} // Webkit offers a very useful `textInput` event that can be used to
-// directly represent `beforeInput`. The IE `textinput` event is not as
-// useful, so we don't use it.
-
-
-var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
-// by the native compositionend event may be incorrect. Japanese ideographic
-// spaces, for instance (\u3000) are not recorded correctly.
-
-var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
-var SPACEBAR_CODE = 32;
-var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
-
-function registerEvents() {
- registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
- registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
- registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
- registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
-} // Track whether we've ever handled a keypress on the space key.
-
-
-var hasSpaceKeypress = false;
-/**
- * Return whether a native keypress event is assumed to be a command.
- * This is required because Firefox fires `keypress` events for key commands
- * (cut, copy, select-all, etc.) even though no character is inserted.
- */
-
-function isKeypressCommand(nativeEvent) {
- return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
- !(nativeEvent.ctrlKey && nativeEvent.altKey);
-}
-/**
- * Translate native top level events into event types.
- */
-
-
-function getCompositionEventType(domEventName) {
- switch (domEventName) {
- case 'compositionstart':
- return 'onCompositionStart';
-
- case 'compositionend':
- return 'onCompositionEnd';
-
- case 'compositionupdate':
- return 'onCompositionUpdate';
- }
-}
-/**
- * Does our fallback best-guess model think this event signifies that
- * composition has begun?
- */
-
-
-function isFallbackCompositionStart(domEventName, nativeEvent) {
- return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
-}
-/**
- * Does our fallback mode think that this event is the end of composition?
- */
-
-
-function isFallbackCompositionEnd(domEventName, nativeEvent) {
- switch (domEventName) {
- case 'keyup':
- // Command keys insert or clear IME input.
- return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
-
- case 'keydown':
- // Expect IME keyCode on each keydown. If we get any other
- // code we must have exited earlier.
- return nativeEvent.keyCode !== START_KEYCODE;
-
- case 'keypress':
- case 'mousedown':
- case 'focusout':
- // Events are not possible without cancelling IME.
- return true;
-
- default:
- return false;
- }
-}
-/**
- * Google Input Tools provides composition data via a CustomEvent,
- * with the `data` property populated in the `detail` object. If this
- * is available on the event object, use it. If not, this is a plain
- * composition event and we have nothing special to extract.
- *
- * @param {object} nativeEvent
- * @return {?string}
- */
-
-
-function getDataFromCustomEvent(nativeEvent) {
- var detail = nativeEvent.detail;
-
- if (typeof detail === 'object' && 'data' in detail) {
- return detail.data;
- }
-
- return null;
-}
-/**
- * Check if a composition event was triggered by Korean IME.
- * Our fallback mode does not work well with IE's Korean IME,
- * so just use native composition events when Korean IME is used.
- * Although CompositionEvent.locale property is deprecated,
- * it is available in IE, where our fallback mode is enabled.
- *
- * @param {object} nativeEvent
- * @return {boolean}
- */
-
-
-function isUsingKoreanIME(nativeEvent) {
- return nativeEvent.locale === 'ko';
-} // Track the current IME composition status, if any.
-
-
-var isComposing = false;
-/**
- * @return {?object} A SyntheticCompositionEvent.
- */
-
-function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
- var eventType;
- var fallbackData;
-
- if (canUseCompositionEvent) {
- eventType = getCompositionEventType(domEventName);
- } else if (!isComposing) {
- if (isFallbackCompositionStart(domEventName, nativeEvent)) {
- eventType = 'onCompositionStart';
- }
- } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
- eventType = 'onCompositionEnd';
- }
-
- if (!eventType) {
- return null;
- }
-
- if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
- // The current composition is stored statically and must not be
- // overwritten while composition continues.
- if (!isComposing && eventType === 'onCompositionStart') {
- isComposing = initialize(nativeEventTarget);
- } else if (eventType === 'onCompositionEnd') {
- if (isComposing) {
- fallbackData = getData();
- }
- }
- }
-
- var listeners = accumulateTwoPhaseListeners(targetInst, eventType);
-
- if (listeners.length > 0) {
- var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
-
- if (fallbackData) {
- // Inject data generated from fallback path into the synthetic event.
- // This matches the property of native CompositionEventInterface.
- event.data = fallbackData;
- } else {
- var customData = getDataFromCustomEvent(nativeEvent);
-
- if (customData !== null) {
- event.data = customData;
- }
- }
- }
-}
-
-function getNativeBeforeInputChars(domEventName, nativeEvent) {
- switch (domEventName) {
- case 'compositionend':
- return getDataFromCustomEvent(nativeEvent);
-
- case 'keypress':
- /**
- * If native `textInput` events are available, our goal is to make
- * use of them. However, there is a special case: the spacebar key.
- * In Webkit, preventing default on a spacebar `textInput` event
- * cancels character insertion, but it *also* causes the browser
- * to fall back to its default spacebar behavior of scrolling the
- * page.
- *
- * Tracking at:
- * https://code.google.com/p/chromium/issues/detail?id=355103
- *
- * To avoid this issue, use the keypress event as if no `textInput`
- * event is available.
- */
- var which = nativeEvent.which;
-
- if (which !== SPACEBAR_CODE) {
- return null;
- }
-
- hasSpaceKeypress = true;
- return SPACEBAR_CHAR;
-
- case 'textInput':
- // Record the characters to be added to the DOM.
- var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
- // it at the keypress level and bail immediately. Android Chrome
- // doesn't give us keycodes, so we need to ignore it.
-
- if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
- return null;
- }
-
- return chars;
-
- default:
- // For other native event types, do nothing.
- return null;
- }
-}
-/**
- * For browsers that do not provide the `textInput` event, extract the
- * appropriate string to use for SyntheticInputEvent.
- */
-
-
-function getFallbackBeforeInputChars(domEventName, nativeEvent) {
- // If we are currently composing (IME) and using a fallback to do so,
- // try to extract the composed characters from the fallback object.
- // If composition event is available, we extract a string only at
- // compositionevent, otherwise extract it at fallback events.
- if (isComposing) {
- if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
- var chars = getData();
- reset();
- isComposing = false;
- return chars;
- }
-
- return null;
- }
-
- switch (domEventName) {
- case 'paste':
- // If a paste event occurs after a keypress, throw out the input
- // chars. Paste events should not lead to BeforeInput events.
- return null;
-
- case 'keypress':
- /**
- * As of v27, Firefox may fire keypress events even when no character
- * will be inserted. A few possibilities:
- *
- * - `which` is `0`. Arrow keys, Esc key, etc.
- *
- * - `which` is the pressed key code, but no char is available.
- * Ex: 'AltGr + d` in Polish. There is no modified character for
- * this key combination and no character is inserted into the
- * document, but FF fires the keypress for char code `100` anyway.
- * No `input` event will occur.
- *
- * - `which` is the pressed key code, but a command combination is
- * being used. Ex: `Cmd+C`. No character is inserted, and no
- * `input` event will occur.
- */
- if (!isKeypressCommand(nativeEvent)) {
- // IE fires the `keypress` event when a user types an emoji via
- // Touch keyboard of Windows. In such a case, the `char` property
- // holds an emoji character like `\uD83D\uDE0A`. Because its length
- // is 2, the property `which` does not represent an emoji correctly.
- // In such a case, we directly return the `char` property instead of
- // using `which`.
- if (nativeEvent.char && nativeEvent.char.length > 1) {
- return nativeEvent.char;
- } else if (nativeEvent.which) {
- return String.fromCharCode(nativeEvent.which);
- }
- }
-
- return null;
-
- case 'compositionend':
- return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
-
- default:
- return null;
- }
-}
-/**
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
- * `textInput` or fallback behavior.
- *
- * @return {?object} A SyntheticInputEvent.
- */
-
-
-function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
- var chars;
-
- if (canUseTextInputEvent) {
- chars = getNativeBeforeInputChars(domEventName, nativeEvent);
- } else {
- chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
- } // If no characters are being inserted, no BeforeInput event should
- // be fired.
-
-
- if (!chars) {
- return null;
- }
-
- var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');
-
- if (listeners.length > 0) {
- var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
- event.data = chars;
- }
-}
-/**
- * Create an `onBeforeInput` event to match
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
- *
- * This event plugin is based on the native `textInput` event
- * available in Chrome, Safari, Opera, and IE. This event fires after
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
- *
- * `beforeInput` is spec'd but not implemented in any browsers, and
- * the `input` event does not provide any useful information about what has
- * actually been added, contrary to the spec. Thus, `textInput` is the best
- * available event to identify the characters that have actually been inserted
- * into the target node.
- *
- * This plugin is also responsible for emitting `composition` events, thus
- * allowing us to share composition fallback code for both `beforeInput` and
- * `composition` event types.
- */
-
-
-function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
-}
-
-/**
- * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
- */
-var supportedInputTypes = {
- color: true,
- date: true,
- datetime: true,
- 'datetime-local': true,
- email: true,
- month: true,
- number: true,
- password: true,
- range: true,
- search: true,
- tel: true,
- text: true,
- time: true,
- url: true,
- week: true
-};
-
-function isTextInputElement(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
-
- if (nodeName === 'input') {
- return !!supportedInputTypes[elem.type];
- }
-
- if (nodeName === 'textarea') {
- return true;
- }
-
- return false;
-}
-
-/**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
-
-function isEventSupported(eventNameSuffix) {
- if (!canUseDOM) {
- return false;
- }
-
- var eventName = 'on' + eventNameSuffix;
- var isSupported = (eventName in document);
-
- if (!isSupported) {
- var element = document.createElement('div');
- element.setAttribute(eventName, 'return;');
- isSupported = typeof element[eventName] === 'function';
- }
-
- return isSupported;
-}
-
-function registerEvents$1() {
- registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
-}
-
-function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
- // Flag this event loop as needing state restore.
- enqueueStateRestore(target);
- var listeners = accumulateTwoPhaseListeners(inst, 'onChange');
-
- if (listeners.length > 0) {
- var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
- }
-}
-/**
- * For IE shims
- */
-
-
-var activeElement = null;
-var activeElementInst = null;
-/**
- * SECTION: handle `change` event
- */
-
-function shouldUseChangeEvent(elem) {
- var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
-}
-
-function manualDispatchChangeEvent(nativeEvent) {
- var dispatchQueue = [];
- createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
- // other events and have it go through ReactBrowserEventEmitter. Since it
- // doesn't, we manually listen for the events and so we have to enqueue and
- // process the abstract event manually.
- //
- // Batching is necessary here in order to ensure that all event handlers run
- // before the next rerender (including event handlers attached to ancestor
- // elements instead of directly on the input). Without this, controlled
- // components don't work properly in conjunction with event bubbling because
- // the component is rerendered and the value reverted before all the event
- // handlers can run. See https://github.com/facebook/react/issues/708.
-
- batchedUpdates(runEventInBatch, dispatchQueue);
-}
-
-function runEventInBatch(dispatchQueue) {
- processDispatchQueue(dispatchQueue, 0);
-}
-
-function getInstIfValueChanged(targetInst) {
- var targetNode = getNodeFromInstance(targetInst);
-
- if (updateValueIfChanged(targetNode)) {
- return targetInst;
- }
-}
-
-function getTargetInstForChangeEvent(domEventName, targetInst) {
- if (domEventName === 'change') {
- return targetInst;
- }
-}
-/**
- * SECTION: handle `input` event
- */
-
-
-var isInputEventSupported = false;
-
-if (canUseDOM) {
- // IE9 claims to support the input event but fails to trigger it when
- // deleting text, so we ignore its input events.
- isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
-}
-/**
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
- * and override the value property so that we can distinguish user events from
- * value changes in JS.
- */
-
-
-function startWatchingForValueChange(target, targetInst) {
- activeElement = target;
- activeElementInst = targetInst;
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
-}
-/**
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
- * if any exists.
- */
-
-
-function stopWatchingForValueChange() {
- if (!activeElement) {
- return;
- }
-
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
- activeElement = null;
- activeElementInst = null;
-}
-/**
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
- * the value of the active element has changed.
- */
-
-
-function handlePropertyChange(nativeEvent) {
- if (nativeEvent.propertyName !== 'value') {
- return;
- }
-
- if (getInstIfValueChanged(activeElementInst)) {
- manualDispatchChangeEvent(nativeEvent);
- }
-}
-
-function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
- if (domEventName === 'focusin') {
- // In IE9, propertychange fires for most input events but is buggy and
- // doesn't fire when text is deleted, but conveniently, selectionchange
- // appears to fire in all of the remaining cases so we catch those and
- // forward the event if the value has changed
- // In either case, we don't want to call the event handler if the value
- // is changed from JS so we redefine a setter for `.value` that updates
- // our activeElementValue variable, allowing us to ignore those changes
- //
- // stopWatching() should be a noop here but we call it just in case we
- // missed a blur event somehow.
- stopWatchingForValueChange();
- startWatchingForValueChange(target, targetInst);
- } else if (domEventName === 'focusout') {
- stopWatchingForValueChange();
- }
-} // For IE8 and IE9.
-
-
-function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
- if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
- // On the selectionchange event, the target is just document which isn't
- // helpful for us so just check activeElement instead.
- //
- // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
- // propertychange on the first input event after setting `value` from a
- // script and fires only keydown, keypress, keyup. Catching keyup usually
- // gets it and catching keydown lets us fire an event for the first
- // keystroke if user does a key repeat (it'll be a little delayed: right
- // before the second keystroke). Other input methods (e.g., paste) seem to
- // fire selectionchange normally.
- return getInstIfValueChanged(activeElementInst);
- }
-}
-/**
- * SECTION: handle `click` event
- */
-
-
-function shouldUseClickEvent(elem) {
- // Use the `click` event to detect changes to checkbox and radio inputs.
- // This approach works across all browsers, whereas `change` does not fire
- // until `blur` in IE8.
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
-}
-
-function getTargetInstForClickEvent(domEventName, targetInst) {
- if (domEventName === 'click') {
- return getInstIfValueChanged(targetInst);
- }
-}
-
-function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
- if (domEventName === 'input' || domEventName === 'change') {
- return getInstIfValueChanged(targetInst);
- }
-}
-
-function handleControlledInputBlur(node) {
- var state = node._wrapperState;
-
- if (!state || !state.controlled || node.type !== 'number') {
- return;
- }
-
- {
- // If controlled, assign the value attribute to the current value on blur
- setDefaultValue(node, 'number', node.value);
- }
-}
-/**
- * This plugin creates an `onChange` event that normalizes change events
- * across form elements. This event fires at a time when it's possible to
- * change the element's value without seeing a flicker.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - select
- */
-
-
-function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
- var getTargetInstFunc, handleEventFunc;
-
- if (shouldUseChangeEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForChangeEvent;
- } else if (isTextInputElement(targetNode)) {
- if (isInputEventSupported) {
- getTargetInstFunc = getTargetInstForInputOrChangeEvent;
- } else {
- getTargetInstFunc = getTargetInstForInputEventPolyfill;
- handleEventFunc = handleEventsForInputEventPolyfill;
- }
- } else if (shouldUseClickEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForClickEvent;
- }
-
- if (getTargetInstFunc) {
- var inst = getTargetInstFunc(domEventName, targetInst);
-
- if (inst) {
- createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
- return;
- }
- }
-
- if (handleEventFunc) {
- handleEventFunc(domEventName, targetNode, targetInst);
- } // When blurring, set the value attribute for number inputs
-
-
- if (domEventName === 'focusout') {
- handleControlledInputBlur(targetNode);
- }
-}
-
-function registerEvents$2() {
- registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
- registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
- registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
- registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
-}
-/**
- * For almost every interaction we care about, there will be both a top-level
- * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
- * we do not extract duplicate events. However, moving the mouse into the
- * browser from outside will not fire a `mouseout` event. In this case, we use
- * the `mouseover` top-level event.
- */
-
-
-function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
- var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';
-
- if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {
- // If this is an over event with a target, we might have already dispatched
- // the event in the out event of the other target. If this is replayed,
- // then it's because we couldn't dispatch against this target previously
- // so we have to do it now instead.
- var related = nativeEvent.relatedTarget || nativeEvent.fromElement;
-
- if (related) {
- // If the related node is managed by React, we can assume that we have
- // already dispatched the corresponding events during its mouseout.
- if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
- return;
- }
- }
- }
-
- if (!isOutEvent && !isOverEvent) {
- // Must not be a mouse or pointer in or out - ignoring.
- return;
- }
-
- var win; // TODO: why is this nullable in the types but we read from it?
-
- if (nativeEventTarget.window === nativeEventTarget) {
- // `nativeEventTarget` is probably a window object.
- win = nativeEventTarget;
- } else {
- // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
- var doc = nativeEventTarget.ownerDocument;
-
- if (doc) {
- win = doc.defaultView || doc.parentWindow;
- } else {
- win = window;
- }
- }
-
- var from;
- var to;
-
- if (isOutEvent) {
- var _related = nativeEvent.relatedTarget || nativeEvent.toElement;
-
- from = targetInst;
- to = _related ? getClosestInstanceFromNode(_related) : null;
-
- if (to !== null) {
- var nearestMounted = getNearestMountedFiber(to);
-
- if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
- to = null;
- }
- }
- } else {
- // Moving to a node from outside the window.
- from = null;
- to = targetInst;
- }
-
- if (from === to) {
- // Nothing pertains to our managed components.
- return;
- }
-
- var SyntheticEventCtor = SyntheticMouseEvent;
- var leaveEventType = 'onMouseLeave';
- var enterEventType = 'onMouseEnter';
- var eventTypePrefix = 'mouse';
-
- if (domEventName === 'pointerout' || domEventName === 'pointerover') {
- SyntheticEventCtor = SyntheticPointerEvent;
- leaveEventType = 'onPointerLeave';
- enterEventType = 'onPointerEnter';
- eventTypePrefix = 'pointer';
- }
-
- var fromNode = from == null ? win : getNodeFromInstance(from);
- var toNode = to == null ? win : getNodeFromInstance(to);
- var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
- leave.target = fromNode;
- leave.relatedTarget = toNode;
- var enter = null; // We should only process this nativeEvent if we are processing
- // the first ancestor. Next time, we will ignore the event.
-
- var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);
-
- if (nativeTargetInst === targetInst) {
- var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
- enterEvent.target = toNode;
- enterEvent.relatedTarget = fromNode;
- enter = enterEvent;
- }
-
- accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
-}
-
-/**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
-function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
- ;
-}
-
-var objectIs = typeof Object.is === 'function' ? Object.is : is;
-
-var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
-/**
- * Performs equality by iterating through keys on an object and returning false
- * when any key has values which are not strictly equal between the arguments.
- * Returns true when the values of all keys are strictly equal.
- */
-
-function shallowEqual(objA, objB) {
- if (objectIs(objA, objB)) {
- return true;
- }
-
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
-
- var keysA = Object.keys(objA);
- var keysB = Object.keys(objB);
-
- if (keysA.length !== keysB.length) {
- return false;
- } // Test for A's keys different from B.
-
-
- for (var i = 0; i < keysA.length; i++) {
- if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
- return false;
- }
- }
-
- return true;
-}
-
-/**
- * Given any node return the first leaf node without children.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {DOMElement|DOMTextNode}
- */
-
-function getLeafNode(node) {
- while (node && node.firstChild) {
- node = node.firstChild;
- }
-
- return node;
-}
-/**
- * Get the next sibling within a container. This will walk up the
- * DOM if a node's siblings have been exhausted.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {?DOMElement|DOMTextNode}
- */
-
-
-function getSiblingNode(node) {
- while (node) {
- if (node.nextSibling) {
- return node.nextSibling;
- }
-
- node = node.parentNode;
- }
-}
-/**
- * Get object describing the nodes which contain characters at offset.
- *
- * @param {DOMElement|DOMTextNode} root
- * @param {number} offset
- * @return {?object}
- */
-
-
-function getNodeForCharacterOffset(root, offset) {
- var node = getLeafNode(root);
- var nodeStart = 0;
- var nodeEnd = 0;
-
- while (node) {
- if (node.nodeType === TEXT_NODE) {
- nodeEnd = nodeStart + node.textContent.length;
-
- if (nodeStart <= offset && nodeEnd >= offset) {
- return {
- node: node,
- offset: offset - nodeStart
- };
- }
-
- nodeStart = nodeEnd;
- }
-
- node = getLeafNode(getSiblingNode(node));
- }
-}
-
-/**
- * @param {DOMElement} outerNode
- * @return {?object}
- */
-
-function getOffsets(outerNode) {
- var ownerDocument = outerNode.ownerDocument;
- var win = ownerDocument && ownerDocument.defaultView || window;
- var selection = win.getSelection && win.getSelection();
-
- if (!selection || selection.rangeCount === 0) {
- return null;
- }
-
- var anchorNode = selection.anchorNode,
- anchorOffset = selection.anchorOffset,
- focusNode = selection.focusNode,
- focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
- // up/down buttons on an <input type="number">. Anonymous divs do not seem to
- // expose properties, triggering a "Permission denied error" if any of its
- // properties are accessed. The only seemingly possible way to avoid erroring
- // is to access a property that typically works for non-anonymous divs and
- // catch any error that may otherwise arise. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
-
- try {
- /* eslint-disable no-unused-expressions */
- anchorNode.nodeType;
- focusNode.nodeType;
- /* eslint-enable no-unused-expressions */
- } catch (e) {
- return null;
- }
-
- return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
-}
-/**
- * Returns {start, end} where `start` is the character/codepoint index of
- * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
- * `end` is the index of (focusNode, focusOffset).
- *
- * Returns null if you pass in garbage input but we should probably just crash.
- *
- * Exported only for testing.
- */
-
-function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
- var length = 0;
- var start = -1;
- var end = -1;
- var indexWithinAnchor = 0;
- var indexWithinFocus = 0;
- var node = outerNode;
- var parentNode = null;
-
- outer: while (true) {
- var next = null;
-
- while (true) {
- if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
- start = length + anchorOffset;
- }
-
- if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
- end = length + focusOffset;
- }
-
- if (node.nodeType === TEXT_NODE) {
- length += node.nodeValue.length;
- }
-
- if ((next = node.firstChild) === null) {
- break;
- } // Moving from `node` to its first child `next`.
-
-
- parentNode = node;
- node = next;
- }
-
- while (true) {
- if (node === outerNode) {
- // If `outerNode` has children, this is always the second time visiting
- // it. If it has no children, this is still the first loop, and the only
- // valid selection is anchorNode and focusNode both equal to this node
- // and both offsets 0, in which case we will have handled above.
- break outer;
- }
-
- if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
- start = length;
- }
-
- if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
- end = length;
- }
-
- if ((next = node.nextSibling) !== null) {
- break;
- }
-
- node = parentNode;
- parentNode = node.parentNode;
- } // Moving from `node` to its next sibling `next`.
-
-
- node = next;
- }
-
- if (start === -1 || end === -1) {
- // This should never happen. (Would happen if the anchor/focus nodes aren't
- // actually inside the passed-in node.)
- return null;
- }
-
- return {
- start: start,
- end: end
- };
-}
-/**
- * In modern non-IE browsers, we can support both forward and backward
- * selections.
- *
- * Note: IE10+ supports the Selection object, but it does not support
- * the `extend` method, which means that even in modern IE, it's not possible
- * to programmatically create a backward selection. Thus, for all IE
- * versions, we use the old IE API to create our selections.
- *
- * @param {DOMElement|DOMTextNode} node
- * @param {object} offsets
- */
-
-function setOffsets(node, offsets) {
- var doc = node.ownerDocument || document;
- var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
- // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
- // fails when pasting 100+ items)
-
- if (!win.getSelection) {
- return;
- }
-
- var selection = win.getSelection();
- var length = node.textContent.length;
- var start = Math.min(offsets.start, length);
- var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
- // Flip backward selections, so we can set with a single range.
-
- if (!selection.extend && start > end) {
- var temp = end;
- end = start;
- start = temp;
- }
-
- var startMarker = getNodeForCharacterOffset(node, start);
- var endMarker = getNodeForCharacterOffset(node, end);
-
- if (startMarker && endMarker) {
- if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
- return;
- }
-
- var range = doc.createRange();
- range.setStart(startMarker.node, startMarker.offset);
- selection.removeAllRanges();
-
- if (start > end) {
- selection.addRange(range);
- selection.extend(endMarker.node, endMarker.offset);
- } else {
- range.setEnd(endMarker.node, endMarker.offset);
- selection.addRange(range);
- }
- }
-}
-
-function isTextNode(node) {
- return node && node.nodeType === TEXT_NODE;
-}
-
-function containsNode(outerNode, innerNode) {
- if (!outerNode || !innerNode) {
- return false;
- } else if (outerNode === innerNode) {
- return true;
- } else if (isTextNode(outerNode)) {
- return false;
- } else if (isTextNode(innerNode)) {
- return containsNode(outerNode, innerNode.parentNode);
- } else if ('contains' in outerNode) {
- return outerNode.contains(innerNode);
- } else if (outerNode.compareDocumentPosition) {
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
- } else {
- return false;
- }
-}
-
-function isInDocument(node) {
- return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
-}
-
-function isSameOriginFrame(iframe) {
- try {
- // Accessing the contentDocument of a HTMLIframeElement can cause the browser
- // to throw, e.g. if it has a cross-origin src attribute.
- // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
- // iframe.contentDocument.defaultView;
- // A safety way is to access one of the cross origin properties: Window or Location
- // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
- // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
- return typeof iframe.contentWindow.location.href === 'string';
- } catch (err) {
- return false;
- }
-}
-
-function getActiveElementDeep() {
- var win = window;
- var element = getActiveElement();
-
- while (element instanceof win.HTMLIFrameElement) {
- if (isSameOriginFrame(element)) {
- win = element.contentWindow;
- } else {
- return element;
- }
-
- element = getActiveElement(win.document);
- }
-
- return element;
-}
-/**
- * @ReactInputSelection: React input selection module. Based on Selection.js,
- * but modified to be suitable for react and has a couple of bug fixes (doesn't
- * assume buttons have range selections allowed).
- * Input selection module for React.
- */
-
-/**
- * @hasSelectionCapabilities: we get the element types that support selection
- * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
- * and `selectionEnd` rows.
- */
-
-
-function hasSelectionCapabilities(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
-}
-function getSelectionInformation() {
- var focusedElem = getActiveElementDeep();
- return {
- focusedElem: focusedElem,
- selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
- };
-}
-/**
- * @restoreSelection: If any selection information was potentially lost,
- * restore it. This is useful when performing operations that could remove dom
- * nodes and place them back in, resulting in focus being lost.
- */
-
-function restoreSelection(priorSelectionInformation) {
- var curFocusedElem = getActiveElementDeep();
- var priorFocusedElem = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
-
- if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
- if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
- setSelection(priorFocusedElem, priorSelectionRange);
- } // Focusing a node can change the scroll position, which is undesirable
-
-
- var ancestors = [];
- var ancestor = priorFocusedElem;
-
- while (ancestor = ancestor.parentNode) {
- if (ancestor.nodeType === ELEMENT_NODE) {
- ancestors.push({
- element: ancestor,
- left: ancestor.scrollLeft,
- top: ancestor.scrollTop
- });
- }
- }
-
- if (typeof priorFocusedElem.focus === 'function') {
- priorFocusedElem.focus();
- }
-
- for (var i = 0; i < ancestors.length; i++) {
- var info = ancestors[i];
- info.element.scrollLeft = info.left;
- info.element.scrollTop = info.top;
- }
- }
-}
-/**
- * @getSelection: Gets the selection bounds of a focused textarea, input or
- * contentEditable node.
- * -@input: Look up selection bounds of this input
- * -@return {start: selectionStart, end: selectionEnd}
- */
-
-function getSelection(input) {
- var selection;
-
- if ('selectionStart' in input) {
- // Modern browser with input or textarea.
- selection = {
- start: input.selectionStart,
- end: input.selectionEnd
- };
- } else {
- // Content editable or old IE textarea.
- selection = getOffsets(input);
- }
-
- return selection || {
- start: 0,
- end: 0
- };
-}
-/**
- * @setSelection: Sets the selection bounds of a textarea or input and focuses
- * the input.
- * -@input Set selection bounds of this input or textarea
- * -@offsets Object of same form that is returned from get*
- */
-
-function setSelection(input, offsets) {
- var start = offsets.start;
- var end = offsets.end;
-
- if (end === undefined) {
- end = start;
- }
-
- if ('selectionStart' in input) {
- input.selectionStart = start;
- input.selectionEnd = Math.min(end, input.value.length);
- } else {
- setOffsets(input, offsets);
- }
-}
-
-var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
-
-function registerEvents$3() {
- registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
-}
-
-var activeElement$1 = null;
-var activeElementInst$1 = null;
-var lastSelection = null;
-var mouseDown = false;
-/**
- * Get an object which is a unique representation of the current selection.
- *
- * The return value will not be consistent across nodes or browsers, but
- * two identical selections on the same node will return identical objects.
- */
-
-function getSelection$1(node) {
- if ('selectionStart' in node && hasSelectionCapabilities(node)) {
- return {
- start: node.selectionStart,
- end: node.selectionEnd
- };
- } else {
- var win = node.ownerDocument && node.ownerDocument.defaultView || window;
- var selection = win.getSelection();
- return {
- anchorNode: selection.anchorNode,
- anchorOffset: selection.anchorOffset,
- focusNode: selection.focusNode,
- focusOffset: selection.focusOffset
- };
- }
-}
-/**
- * Get document associated with the event target.
- */
-
-
-function getEventTargetDocument(eventTarget) {
- return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
-}
-/**
- * Poll selection to see whether it's changed.
- *
- * @param {object} nativeEvent
- * @param {object} nativeEventTarget
- * @return {?SyntheticEvent}
- */
-
-
-function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
- // Ensure we have the right element, and that the user is not dragging a
- // selection (this matches native `select` event behavior). In HTML5, select
- // fires only on input and textarea thus if there's no focused element we
- // won't dispatch.
- var doc = getEventTargetDocument(nativeEventTarget);
-
- if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
- return;
- } // Only fire when selection has actually changed.
-
-
- var currentSelection = getSelection$1(activeElement$1);
-
- if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
- lastSelection = currentSelection;
- var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');
-
- if (listeners.length > 0) {
- var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
- event.target = activeElement$1;
- }
- }
-}
-/**
- * This plugin creates an `onSelect` event that normalizes select events
- * across form elements.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - contentEditable
- *
- * This differs from native browser implementations in the following ways:
- * - Fires on contentEditable fields as well as inputs.
- * - Fires for collapsed selection.
- * - Fires after user input.
- */
-
-
-function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
-
- var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
-
- switch (domEventName) {
- // Track the input node that has focus.
- case 'focusin':
- if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
- activeElement$1 = targetNode;
- activeElementInst$1 = targetInst;
- lastSelection = null;
- }
-
- break;
-
- case 'focusout':
- activeElement$1 = null;
- activeElementInst$1 = null;
- lastSelection = null;
- break;
- // Don't fire the event while the user is dragging. This matches the
- // semantics of the native select event.
-
- case 'mousedown':
- mouseDown = true;
- break;
-
- case 'contextmenu':
- case 'mouseup':
- case 'dragend':
- mouseDown = false;
- constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
- break;
- // Chrome and IE fire non-standard event when selection is changed (and
- // sometimes when it hasn't). IE's event fires out of order with respect
- // to key and input events on deletion, so we discard it.
- //
- // Firefox doesn't support selectionchange, so check selection status
- // after each key entry. The selection changes after keydown and before
- // keyup, but we check on keydown as well in the case of holding down a
- // key, when multiple keydown events are fired but only one keyup is.
- // This is also our approach for IE handling, for the reason above.
-
- case 'selectionchange':
- if (skipSelectionChangeEvent) {
- break;
- }
-
- // falls through
-
- case 'keydown':
- case 'keyup':
- constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
- }
-}
-
-function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- var reactName = topLevelEventsToReactNames.get(domEventName);
-
- if (reactName === undefined) {
- return;
- }
-
- var SyntheticEventCtor = SyntheticEvent;
- var reactEventType = domEventName;
-
- switch (domEventName) {
- case 'keypress':
- // Firefox creates a keypress event for function keys too. This removes
- // the unwanted keypress events. Enter is however both printable and
- // non-printable. One would expect Tab to be as well (but it isn't).
- if (getEventCharCode(nativeEvent) === 0) {
- return;
- }
-
- /* falls through */
-
- case 'keydown':
- case 'keyup':
- SyntheticEventCtor = SyntheticKeyboardEvent;
- break;
-
- case 'focusin':
- reactEventType = 'focus';
- SyntheticEventCtor = SyntheticFocusEvent;
- break;
-
- case 'focusout':
- reactEventType = 'blur';
- SyntheticEventCtor = SyntheticFocusEvent;
- break;
-
- case 'beforeblur':
- case 'afterblur':
- SyntheticEventCtor = SyntheticFocusEvent;
- break;
-
- case 'click':
- // Firefox creates a click event on right mouse clicks. This removes the
- // unwanted click events.
- if (nativeEvent.button === 2) {
- return;
- }
-
- /* falls through */
-
- case 'auxclick':
- case 'dblclick':
- case 'mousedown':
- case 'mousemove':
- case 'mouseup': // TODO: Disabled elements should not respond to mouse events
-
- /* falls through */
-
- case 'mouseout':
- case 'mouseover':
- case 'contextmenu':
- SyntheticEventCtor = SyntheticMouseEvent;
- break;
-
- case 'drag':
- case 'dragend':
- case 'dragenter':
- case 'dragexit':
- case 'dragleave':
- case 'dragover':
- case 'dragstart':
- case 'drop':
- SyntheticEventCtor = SyntheticDragEvent;
- break;
-
- case 'touchcancel':
- case 'touchend':
- case 'touchmove':
- case 'touchstart':
- SyntheticEventCtor = SyntheticTouchEvent;
- break;
-
- case ANIMATION_END:
- case ANIMATION_ITERATION:
- case ANIMATION_START:
- SyntheticEventCtor = SyntheticAnimationEvent;
- break;
-
- case TRANSITION_END:
- SyntheticEventCtor = SyntheticTransitionEvent;
- break;
-
- case 'scroll':
- SyntheticEventCtor = SyntheticUIEvent;
- break;
-
- case 'wheel':
- SyntheticEventCtor = SyntheticWheelEvent;
- break;
-
- case 'copy':
- case 'cut':
- case 'paste':
- SyntheticEventCtor = SyntheticClipboardEvent;
- break;
-
- case 'gotpointercapture':
- case 'lostpointercapture':
- case 'pointercancel':
- case 'pointerdown':
- case 'pointermove':
- case 'pointerout':
- case 'pointerover':
- case 'pointerup':
- SyntheticEventCtor = SyntheticPointerEvent;
- break;
- }
-
- var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
-
- {
- // Some events don't bubble in the browser.
- // In the past, React has always bubbled them, but this can be surprising.
- // We're going to try aligning closer to the browser behavior by not bubbling
- // them in React either. We'll start by not bubbling onScroll, and then expand.
- var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
- // nonDelegatedEvents list in DOMPluginEventSystem.
- // Then we can remove this special list.
- // This is a breaking change that can wait until React 18.
- domEventName === 'scroll';
-
- var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);
-
- if (_listeners.length > 0) {
- // Intentionally create event lazily.
- var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);
-
- dispatchQueue.push({
- event: _event,
- listeners: _listeners
- });
- }
- }
-}
-
-// TODO: remove top-level side effect.
-registerSimpleEvents();
-registerEvents$2();
-registerEvents$1();
-registerEvents$3();
-registerEvents();
-
-function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- // TODO: we should remove the concept of a "SimpleEventPlugin".
- // This is the basic functionality of the event system. All
- // the other plugins are essentially polyfills. So the plugin
- // should probably be inlined somewhere and have its logic
- // be core the to event system. This would potentially allow
- // us to ship builds of React without the polyfilled plugins below.
- extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
- // event's native "bubble" phase, which means that we're
- // not in the capture phase. That's because we emulate
- // the capture phase here still. This is a trade-off,
- // because in an ideal world we would not emulate and use
- // the phases properly, like we do with the SimpleEvent
- // plugin. However, the plugins below either expect
- // emulation (EnterLeave) or use state localized to that
- // plugin (BeforeInput, Change, Select). The state in
- // these modules complicates things, as you'll essentially
- // get the case where the capture phase event might change
- // state, only for the following bubble event to come in
- // later and not trigger anything as the state now
- // invalidates the heuristics of the event plugin. We
- // could alter all these plugins to work in such ways, but
- // that might cause other unknown side-effects that we
- // can't forsee right now.
-
- if (shouldProcessPolyfillPlugins) {
- extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- }
-} // List of events that need to be individually attached to media elements.
-
-
-var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
-// set them on the actual target element itself. This is primarily
-// because these events do not consistently bubble in the DOM.
-
-var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));
-
-function executeDispatch(event, listener, currentTarget) {
- var type = event.type || 'unknown-event';
- event.currentTarget = currentTarget;
- invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
- event.currentTarget = null;
-}
-
-function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
- var previousInstance;
-
- if (inCapturePhase) {
- for (var i = dispatchListeners.length - 1; i >= 0; i--) {
- var _dispatchListeners$i = dispatchListeners[i],
- instance = _dispatchListeners$i.instance,
- currentTarget = _dispatchListeners$i.currentTarget,
- listener = _dispatchListeners$i.listener;
-
- if (instance !== previousInstance && event.isPropagationStopped()) {
- return;
- }
-
- executeDispatch(event, listener, currentTarget);
- previousInstance = instance;
- }
- } else {
- for (var _i = 0; _i < dispatchListeners.length; _i++) {
- var _dispatchListeners$_i = dispatchListeners[_i],
- _instance = _dispatchListeners$_i.instance,
- _currentTarget = _dispatchListeners$_i.currentTarget,
- _listener = _dispatchListeners$_i.listener;
-
- if (_instance !== previousInstance && event.isPropagationStopped()) {
- return;
- }
-
- executeDispatch(event, _listener, _currentTarget);
- previousInstance = _instance;
- }
- }
-}
-
-function processDispatchQueue(dispatchQueue, eventSystemFlags) {
- var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
-
- for (var i = 0; i < dispatchQueue.length; i++) {
- var _dispatchQueue$i = dispatchQueue[i],
- event = _dispatchQueue$i.event,
- listeners = _dispatchQueue$i.listeners;
- processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.
- } // This would be a good time to rethrow if any of the event handlers threw.
-
-
- rethrowCaughtError();
-}
-
-function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
- var nativeEventTarget = getEventTarget(nativeEvent);
- var dispatchQueue = [];
- extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- processDispatchQueue(dispatchQueue, eventSystemFlags);
-}
-
-function listenToNonDelegatedEvent(domEventName, targetElement) {
- var isCapturePhaseListener = false;
- var listenerSet = getEventListenerSet(targetElement);
- var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
-
- if (!listenerSet.has(listenerSetKey)) {
- addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
- listenerSet.add(listenerSetKey);
- }
-}
-var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
-function listenToAllSupportedEvents(rootContainerElement) {
- {
- if (rootContainerElement[listeningMarker]) {
- // Performance optimization: don't iterate through events
- // for the same portal container or root node more than once.
- // TODO: once we remove the flag, we may be able to also
- // remove some of the bookkeeping maps used for laziness.
- return;
- }
-
- rootContainerElement[listeningMarker] = true;
- allNativeEvents.forEach(function (domEventName) {
- if (!nonDelegatedEvents.has(domEventName)) {
- listenToNativeEvent(domEventName, false, rootContainerElement, null);
- }
-
- listenToNativeEvent(domEventName, true, rootContainerElement, null);
- });
- }
-}
-function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {
- var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
- var target = rootContainerElement; // selectionchange needs to be attached to the document
- // otherwise it won't capture incoming events that are only
- // triggered on the document directly.
-
- if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {
- target = rootContainerElement.ownerDocument;
- } // If the event can be delegated (or is capture phase), we can
- // register it to the root container. Otherwise, we should
- // register the event to the target element and mark it as
- // a non-delegated event.
-
-
- if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {
- // For all non-delegated events, apart from scroll, we attach
- // their event listeners to the respective elements that their
- // events fire on. That means we can skip this step, as event
- // listener has already been added previously. However, we
- // special case the scroll event because the reality is that any
- // element can scroll.
- // TODO: ideally, we'd eventually apply the same logic to all
- // events from the nonDelegatedEvents list. Then we can remove
- // this special case and use the same logic for all events.
- if (domEventName !== 'scroll') {
- return;
- }
-
- eventSystemFlags |= IS_NON_DELEGATED;
- target = targetElement;
- }
-
- var listenerSet = getEventListenerSet(target);
- var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then
- // we need to trap an event listener onto the target.
-
- if (!listenerSet.has(listenerSetKey)) {
- if (isCapturePhaseListener) {
- eventSystemFlags |= IS_CAPTURE_PHASE;
- }
-
- addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
- listenerSet.add(listenerSetKey);
- }
-}
-
-function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
- var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
- // active and not passive.
-
- var isPassiveListener = undefined;
-
- if (passiveBrowserEventsSupported) {
- // Browsers introduced an intervention, making these events
- // passive by default on document. React doesn't bind them
- // to document anymore, but changing this now would undo
- // the performance wins from the change. So we emulate
- // the existing behavior manually on the roots now.
- // https://github.com/facebook/react/issues/19651
- if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
- isPassiveListener = true;
- }
- }
-
- targetContainer = targetContainer;
- var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we
-
-
- if (isCapturePhaseListener) {
- if (isPassiveListener !== undefined) {
- unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
- } else {
- unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
- }
- } else {
- if (isPassiveListener !== undefined) {
- unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
- } else {
- unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
- }
- }
-}
-
-function isMatchingRootContainer(grandContainer, targetContainer) {
- return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
-}
-
-function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
- var ancestorInst = targetInst;
-
- if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
- var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we
-
- if (targetInst !== null) {
- // The below logic attempts to work out if we need to change
- // the target fiber to a different ancestor. We had similar logic
- // in the legacy event system, except the big difference between
- // systems is that the modern event system now has an event listener
- // attached to each React Root and React Portal Root. Together,
- // the DOM nodes representing these roots are the "rootContainer".
- // To figure out which ancestor instance we should use, we traverse
- // up the fiber tree from the target instance and attempt to find
- // root boundaries that match that of our current "rootContainer".
- // If we find that "rootContainer", we find the parent fiber
- // sub-tree for that root and make that our ancestor instance.
- var node = targetInst;
-
- mainLoop: while (true) {
- if (node === null) {
- return;
- }
-
- var nodeTag = node.tag;
-
- if (nodeTag === HostRoot || nodeTag === HostPortal) {
- var container = node.stateNode.containerInfo;
-
- if (isMatchingRootContainer(container, targetContainerNode)) {
- break;
- }
-
- if (nodeTag === HostPortal) {
- // The target is a portal, but it's not the rootContainer we're looking for.
- // Normally portals handle their own events all the way down to the root.
- // So we should be able to stop now. However, we don't know if this portal
- // was part of *our* root.
- var grandNode = node.return;
-
- while (grandNode !== null) {
- var grandTag = grandNode.tag;
-
- if (grandTag === HostRoot || grandTag === HostPortal) {
- var grandContainer = grandNode.stateNode.containerInfo;
-
- if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
- // This is the rootContainer we're looking for and we found it as
- // a parent of the Portal. That means we can ignore it because the
- // Portal will bubble through to us.
- return;
- }
- }
-
- grandNode = grandNode.return;
- }
- } // Now we need to find it's corresponding host fiber in the other
- // tree. To do this we can use getClosestInstanceFromNode, but we
- // need to validate that the fiber is a host instance, otherwise
- // we need to traverse up through the DOM till we find the correct
- // node that is from the other tree.
-
-
- while (container !== null) {
- var parentNode = getClosestInstanceFromNode(container);
-
- if (parentNode === null) {
- return;
- }
-
- var parentTag = parentNode.tag;
-
- if (parentTag === HostComponent || parentTag === HostText) {
- node = ancestorInst = parentNode;
- continue mainLoop;
- }
-
- container = container.parentNode;
- }
- }
-
- node = node.return;
- }
- }
- }
-
- batchedEventUpdates(function () {
- return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
- });
-}
-
-function createDispatchListener(instance, listener, currentTarget) {
- return {
- instance: instance,
- listener: listener,
- currentTarget: currentTarget
- };
-}
-
-function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {
- var captureName = reactName !== null ? reactName + 'Capture' : null;
- var reactEventName = inCapturePhase ? captureName : reactName;
- var listeners = [];
- var instance = targetFiber;
- var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.
-
- while (instance !== null) {
- var _instance2 = instance,
- stateNode = _instance2.stateNode,
- tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)
-
- if (tag === HostComponent && stateNode !== null) {
- lastHostComponent = stateNode; // createEventHandle listeners
-
-
- if (reactEventName !== null) {
- var listener = getListener(instance, reactEventName);
-
- if (listener != null) {
- listeners.push(createDispatchListener(instance, listener, lastHostComponent));
- }
- }
- } // If we are only accumulating events for the target, then we don't
- // continue to propagate through the React fiber tree to find other
- // listeners.
-
-
- if (accumulateTargetOnly) {
- break;
- }
-
- instance = instance.return;
- }
-
- return listeners;
-} // We should only use this function for:
-// - BeforeInputEventPlugin
-// - ChangeEventPlugin
-// - SelectEventPlugin
-// This is because we only process these plugins
-// in the bubble phase, so we need to accumulate two
-// phase event listeners (via emulation).
-
-function accumulateTwoPhaseListeners(targetFiber, reactName) {
- var captureName = reactName + 'Capture';
- var listeners = [];
- var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.
-
- while (instance !== null) {
- var _instance3 = instance,
- stateNode = _instance3.stateNode,
- tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)
-
- if (tag === HostComponent && stateNode !== null) {
- var currentTarget = stateNode;
- var captureListener = getListener(instance, captureName);
-
- if (captureListener != null) {
- listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
- }
-
- var bubbleListener = getListener(instance, reactName);
-
- if (bubbleListener != null) {
- listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
- }
- }
-
- instance = instance.return;
- }
-
- return listeners;
-}
-
-function getParent(inst) {
- if (inst === null) {
- return null;
- }
-
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
-
- if (inst) {
- return inst;
- }
-
- return null;
-}
-/**
- * Return the lowest common ancestor of A and B, or null if they are in
- * different trees.
- */
-
-
-function getLowestCommonAncestor(instA, instB) {
- var nodeA = instA;
- var nodeB = instB;
- var depthA = 0;
-
- for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
- depthA++;
- }
-
- var depthB = 0;
-
- for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
- depthB++;
- } // If A is deeper, crawl up.
-
-
- while (depthA - depthB > 0) {
- nodeA = getParent(nodeA);
- depthA--;
- } // If B is deeper, crawl up.
-
-
- while (depthB - depthA > 0) {
- nodeB = getParent(nodeB);
- depthB--;
- } // Walk in lockstep until we find a match.
-
-
- var depth = depthA;
-
- while (depth--) {
- if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
- return nodeA;
- }
-
- nodeA = getParent(nodeA);
- nodeB = getParent(nodeB);
- }
-
- return null;
-}
-
-function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
- var registrationName = event._reactName;
- var listeners = [];
- var instance = target;
-
- while (instance !== null) {
- if (instance === common) {
- break;
- }
-
- var _instance4 = instance,
- alternate = _instance4.alternate,
- stateNode = _instance4.stateNode,
- tag = _instance4.tag;
-
- if (alternate !== null && alternate === common) {
- break;
- }
-
- if (tag === HostComponent && stateNode !== null) {
- var currentTarget = stateNode;
-
- if (inCapturePhase) {
- var captureListener = getListener(instance, registrationName);
-
- if (captureListener != null) {
- listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
- }
- } else if (!inCapturePhase) {
- var bubbleListener = getListener(instance, registrationName);
-
- if (bubbleListener != null) {
- listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
- }
- }
- }
-
- instance = instance.return;
- }
-
- if (listeners.length !== 0) {
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
- }
-} // We should only use this function for:
-// - EnterLeaveEventPlugin
-// This is because we only process this plugin
-// in the bubble phase, so we need to accumulate two
-// phase event listeners.
-
-
-function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
- var common = from && to ? getLowestCommonAncestor(from, to) : null;
-
- if (from !== null) {
- accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
- }
-
- if (to !== null && enterEvent !== null) {
- accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
- }
-}
-function getListenerSetKey(domEventName, capture) {
- return domEventName + "__" + (capture ? 'capture' : 'bubble');
-}
-
-var didWarnInvalidHydration = false;
-var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
-var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
-var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
-var AUTOFOCUS = 'autoFocus';
-var CHILDREN = 'children';
-var STYLE = 'style';
-var HTML$1 = '__html';
-var HTML_NAMESPACE$1 = Namespaces.html;
-var warnedUnknownTags;
-var suppressHydrationWarning;
-var validatePropertiesInDevelopment;
-var warnForTextDifference;
-var warnForPropDifference;
-var warnForExtraAttributes;
-var warnForInvalidEventListener;
-var canDiffStyleForHydrationWarning;
-var normalizeMarkupForTextOrAttribute;
-var normalizeHTML;
-
-{
- warnedUnknownTags = {
- // There are working polyfills for <dialog>. Let people use it.
- dialog: true,
- // Electron ships a custom <webview> tag to display external web content in
- // an isolated frame and process.
- // This tag is not present in non Electron environments such as JSDom which
- // is often used for testing purposes.
- // @see https://electronjs.org/docs/api/webview-tag
- webview: true
- };
-
- validatePropertiesInDevelopment = function (type, props) {
- validateProperties(type, props);
- validateProperties$1(type, props);
- validateProperties$2(type, props, {
- registrationNameDependencies: registrationNameDependencies,
- possibleRegistrationNames: possibleRegistrationNames
- });
- }; // IE 11 parses & normalizes the style attribute as opposed to other
- // browsers. It adds spaces and sorts the properties in some
- // non-alphabetical order. Handling that would require sorting CSS
- // properties in the client & server versions or applying
- // `expectedStyle` to a temporary DOM node to read its `style` attribute
- // normalized. Since it only affects IE, we're skipping style warnings
- // in that browser completely in favor of doing all that work.
- // See https://github.com/facebook/react/issues/11807
-
-
- canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.
- // It also can turn \u0000 into \uFFFD inside attributes.
- // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
- // If we have a mismatch, it might be caused by that.
- // We will still patch up in this case but not fire the warning.
-
- var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
- var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
-
- normalizeMarkupForTextOrAttribute = function (markup) {
- var markupString = typeof markup === 'string' ? markup : '' + markup;
- return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
- };
-
- warnForTextDifference = function (serverText, clientText) {
- if (didWarnInvalidHydration) {
- return;
- }
-
- var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
- var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
-
- if (normalizedServerText === normalizedClientText) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
- };
-
- warnForPropDifference = function (propName, serverValue, clientValue) {
- if (didWarnInvalidHydration) {
- return;
- }
-
- var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
- var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
-
- if (normalizedServerValue === normalizedClientValue) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
- };
-
- warnForExtraAttributes = function (attributeNames) {
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
- var names = [];
- attributeNames.forEach(function (name) {
- names.push(name);
- });
-
- error('Extra attributes from the server: %s', names);
- };
-
- warnForInvalidEventListener = function (registrationName, listener) {
- if (listener === false) {
- error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
- } else {
- error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
- }
- }; // Parse the HTML and read it back to normalize the HTML string so that it
- // can be used for comparison.
-
-
- normalizeHTML = function (parent, html) {
- // We could have created a separate document here to avoid
- // re-initializing custom elements if they exist. But this breaks
- // how <noscript> is being handled. So we use the same document.
- // See the discussion in https://github.com/facebook/react/pull/11157.
- var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
- testElement.innerHTML = html;
- return testElement.innerHTML;
- };
-}
-
-function getOwnerDocumentFromRootContainer(rootContainerElement) {
- return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
-}
-
-function noop() {}
-
-function trapClickOnNonInteractiveElement(node) {
- // Mobile Safari does not fire properly bubble click events on
- // non-interactive elements, which means delegated click listeners do not
- // fire. The workaround for this bug involves attaching an empty click
- // listener on the target node.
- // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
- // Just set it using the onclick property so that we don't have to manage any
- // bookkeeping for it. Not sure if we need to clear it when the listener is
- // removed.
- // TODO: Only do this for the relevant Safaris maybe?
- node.onclick = noop;
-}
-
-function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
- for (var propKey in nextProps) {
- if (!nextProps.hasOwnProperty(propKey)) {
- continue;
- }
-
- var nextProp = nextProps[propKey];
-
- if (propKey === STYLE) {
- {
- if (nextProp) {
- // Freeze the next style object so that we can assume it won't be
- // mutated. We have already warned for this in the past.
- Object.freeze(nextProp);
- }
- } // Relies on `updateStylesByID` not mutating `styleUpdates`.
-
-
- setValueForStyles(domElement, nextProp);
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
-
- if (nextHtml != null) {
- setInnerHTML(domElement, nextHtml);
- }
- } else if (propKey === CHILDREN) {
- if (typeof nextProp === 'string') {
- // Avoid setting initial textContent when the text is empty. In IE11 setting
- // textContent on a <textarea> will cause the placeholder to not
- // show within the <textarea> until it has been focused and blurred again.
- // https://github.com/facebook/react/issues/6731#issuecomment-254874553
- var canSetTextContent = tag !== 'textarea' || nextProp !== '';
-
- if (canSetTextContent) {
- setTextContent(domElement, nextProp);
- }
- } else if (typeof nextProp === 'number') {
- setTextContent(domElement, '' + nextProp);
- }
- } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
-
- if (propKey === 'onScroll') {
- listenToNonDelegatedEvent('scroll', domElement);
- }
- }
- } else if (nextProp != null) {
- setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
- }
- }
-}
-
-function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
- // TODO: Handle wasCustomComponentTag
- for (var i = 0; i < updatePayload.length; i += 2) {
- var propKey = updatePayload[i];
- var propValue = updatePayload[i + 1];
-
- if (propKey === STYLE) {
- setValueForStyles(domElement, propValue);
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- setInnerHTML(domElement, propValue);
- } else if (propKey === CHILDREN) {
- setTextContent(domElement, propValue);
- } else {
- setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
- }
- }
-}
-
-function createElement(type, props, rootContainerElement, parentNamespace) {
- var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
- // tags get no namespace.
-
- var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
- var domElement;
- var namespaceURI = parentNamespace;
-
- if (namespaceURI === HTML_NAMESPACE$1) {
- namespaceURI = getIntrinsicNamespace(type);
- }
-
- if (namespaceURI === HTML_NAMESPACE$1) {
- {
- isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
- // allow <SVG> or <mATH>.
-
- if (!isCustomComponentTag && type !== type.toLowerCase()) {
- error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
- }
- }
-
- if (type === 'script') {
- // Create the script via .innerHTML so its "parser-inserted" flag is
- // set to true and it does not execute
- var div = ownerDocument.createElement('div');
-
- div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
- // This is guaranteed to yield a script element.
-
- var firstChild = div.firstChild;
- domElement = div.removeChild(firstChild);
- } else if (typeof props.is === 'string') {
- // $FlowIssue `createElement` should be updated for Web Components
- domElement = ownerDocument.createElement(type, {
- is: props.is
- });
- } else {
- // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
- // See discussion in https://github.com/facebook/react/pull/6896
- // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
- domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
- // attributes on `select`s needs to be added before `option`s are inserted.
- // This prevents:
- // - a bug where the `select` does not scroll to the correct option because singular
- // `select` elements automatically pick the first item #13222
- // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
- // See https://github.com/facebook/react/issues/13222
- // and https://github.com/facebook/react/issues/14239
-
- if (type === 'select') {
- var node = domElement;
-
- if (props.multiple) {
- node.multiple = true;
- } else if (props.size) {
- // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
- // it is possible that no option is selected.
- //
- // This is only necessary when a select in "single selection mode".
- node.size = props.size;
- }
- }
- }
- } else {
- domElement = ownerDocument.createElementNS(namespaceURI, type);
- }
-
- {
- if (namespaceURI === HTML_NAMESPACE$1) {
- if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
- warnedUnknownTags[type] = true;
-
- error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
- }
- }
- }
-
- return domElement;
-}
-function createTextNode(text, rootContainerElement) {
- return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
-}
-function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
- var isCustomComponentTag = isCustomComponent(tag, rawProps);
-
- {
- validatePropertiesInDevelopment(tag, rawProps);
- } // TODO: Make sure that we check isMounted before firing any of these events.
-
-
- var props;
-
- switch (tag) {
- case 'dialog':
- listenToNonDelegatedEvent('cancel', domElement);
- listenToNonDelegatedEvent('close', domElement);
- props = rawProps;
- break;
-
- case 'iframe':
- case 'object':
- case 'embed':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the load event.
- listenToNonDelegatedEvent('load', domElement);
- props = rawProps;
- break;
-
- case 'video':
- case 'audio':
- // We listen to these events in case to ensure emulated bubble
- // listeners still fire for all the media events.
- for (var i = 0; i < mediaEventTypes.length; i++) {
- listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
- }
-
- props = rawProps;
- break;
-
- case 'source':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the error event.
- listenToNonDelegatedEvent('error', domElement);
- props = rawProps;
- break;
-
- case 'img':
- case 'image':
- case 'link':
- // We listen to these events in case to ensure emulated bubble
- // listeners still fire for error and load events.
- listenToNonDelegatedEvent('error', domElement);
- listenToNonDelegatedEvent('load', domElement);
- props = rawProps;
- break;
-
- case 'details':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the toggle event.
- listenToNonDelegatedEvent('toggle', domElement);
- props = rawProps;
- break;
-
- case 'input':
- initWrapperState(domElement, rawProps);
- props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- case 'option':
- validateProps(domElement, rawProps);
- props = getHostProps$1(domElement, rawProps);
- break;
-
- case 'select':
- initWrapperState$1(domElement, rawProps);
- props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- case 'textarea':
- initWrapperState$2(domElement, rawProps);
- props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- default:
- props = rawProps;
- }
-
- assertValidProps(tag, props);
- setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
-
- switch (tag) {
- case 'input':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper(domElement, rawProps, false);
- break;
-
- case 'textarea':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper$3(domElement);
- break;
-
- case 'option':
- postMountWrapper$1(domElement, rawProps);
- break;
-
- case 'select':
- postMountWrapper$2(domElement, rawProps);
- break;
-
- default:
- if (typeof props.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
-
- break;
- }
-} // Calculate the diff between the two objects.
-
-function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
- {
- validatePropertiesInDevelopment(tag, nextRawProps);
- }
-
- var updatePayload = null;
- var lastProps;
- var nextProps;
-
- switch (tag) {
- case 'input':
- lastProps = getHostProps(domElement, lastRawProps);
- nextProps = getHostProps(domElement, nextRawProps);
- updatePayload = [];
- break;
-
- case 'option':
- lastProps = getHostProps$1(domElement, lastRawProps);
- nextProps = getHostProps$1(domElement, nextRawProps);
- updatePayload = [];
- break;
-
- case 'select':
- lastProps = getHostProps$2(domElement, lastRawProps);
- nextProps = getHostProps$2(domElement, nextRawProps);
- updatePayload = [];
- break;
-
- case 'textarea':
- lastProps = getHostProps$3(domElement, lastRawProps);
- nextProps = getHostProps$3(domElement, nextRawProps);
- updatePayload = [];
- break;
-
- default:
- lastProps = lastRawProps;
- nextProps = nextRawProps;
-
- if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
-
- break;
- }
-
- assertValidProps(tag, nextProps);
- var propKey;
- var styleName;
- var styleUpdates = null;
-
- for (propKey in lastProps) {
- if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
- continue;
- }
-
- if (propKey === STYLE) {
- var lastStyle = lastProps[propKey];
-
- for (styleName in lastStyle) {
- if (lastStyle.hasOwnProperty(styleName)) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
-
- styleUpdates[styleName] = '';
- }
- }
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
- // This is a special case. If any listener updates we need to ensure
- // that the "current" fiber pointer gets updated so we need a commit
- // to update this element.
- if (!updatePayload) {
- updatePayload = [];
- }
- } else {
- // For all other deleted properties we add it to the queue. We use
- // the allowed property list in the commit phase instead.
- (updatePayload = updatePayload || []).push(propKey, null);
- }
- }
-
- for (propKey in nextProps) {
- var nextProp = nextProps[propKey];
- var lastProp = lastProps != null ? lastProps[propKey] : undefined;
-
- if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
- continue;
- }
-
- if (propKey === STYLE) {
- {
- if (nextProp) {
- // Freeze the next style object so that we can assume it won't be
- // mutated. We have already warned for this in the past.
- Object.freeze(nextProp);
- }
- }
-
- if (lastProp) {
- // Unset styles on `lastProp` but not on `nextProp`.
- for (styleName in lastProp) {
- if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
-
- styleUpdates[styleName] = '';
- }
- } // Update styles that changed since `lastProp`.
-
-
- for (styleName in nextProp) {
- if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
-
- styleUpdates[styleName] = nextProp[styleName];
- }
- }
- } else {
- // Relies on `updateStylesByID` not mutating `styleUpdates`.
- if (!styleUpdates) {
- if (!updatePayload) {
- updatePayload = [];
- }
-
- updatePayload.push(propKey, styleUpdates);
- }
-
- styleUpdates = nextProp;
- }
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
- var lastHtml = lastProp ? lastProp[HTML$1] : undefined;
-
- if (nextHtml != null) {
- if (lastHtml !== nextHtml) {
- (updatePayload = updatePayload || []).push(propKey, nextHtml);
- }
- }
- } else if (propKey === CHILDREN) {
- if (typeof nextProp === 'string' || typeof nextProp === 'number') {
- (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
- }
- } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- // We eagerly listen to this even though we haven't committed yet.
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
-
- if (propKey === 'onScroll') {
- listenToNonDelegatedEvent('scroll', domElement);
- }
- }
-
- if (!updatePayload && lastProp !== nextProp) {
- // This is a special case. If any listener updates we need to ensure
- // that the "current" props pointer gets updated so we need a commit
- // to update this element.
- updatePayload = [];
- }
- } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {
- // If we encounter useOpaqueReference's opaque object, this means we are hydrating.
- // In this case, call the opaque object's toString function which generates a new client
- // ID so client and server IDs match and throws to rerender.
- nextProp.toString();
- } else {
- // For any other property we always add it to the queue and then we
- // filter it out using the allowed property list during the commit.
- (updatePayload = updatePayload || []).push(propKey, nextProp);
- }
- }
-
- if (styleUpdates) {
- {
- validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
- }
-
- (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
- }
-
- return updatePayload;
-} // Apply the diff.
-
-function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
- // Update checked *before* name.
- // In the middle of an update, it is possible to have multiple checked.
- // When a checked radio tries to change name, browser makes another radio's checked false.
- if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
- updateChecked(domElement, nextRawProps);
- }
-
- var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
- var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
-
- updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
- // changed.
-
- switch (tag) {
- case 'input':
- // Update the wrapper around inputs *after* updating props. This has to
- // happen after `updateDOMProperties`. Otherwise HTML5 input validations
- // raise warnings and prevent the new value from being assigned.
- updateWrapper(domElement, nextRawProps);
- break;
-
- case 'textarea':
- updateWrapper$1(domElement, nextRawProps);
- break;
-
- case 'select':
- // <select> value update needs to occur after <option> children
- // reconciliation
- postUpdateWrapper(domElement, nextRawProps);
- break;
- }
-}
-
-function getPossibleStandardName(propName) {
- {
- var lowerCasedName = propName.toLowerCase();
-
- if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- return null;
- }
-
- return possibleStandardNames[lowerCasedName] || null;
- }
-}
-
-function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
- var isCustomComponentTag;
- var extraAttributeNames;
-
- {
- suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
- isCustomComponentTag = isCustomComponent(tag, rawProps);
- validatePropertiesInDevelopment(tag, rawProps);
- } // TODO: Make sure that we check isMounted before firing any of these events.
-
-
- switch (tag) {
- case 'dialog':
- listenToNonDelegatedEvent('cancel', domElement);
- listenToNonDelegatedEvent('close', domElement);
- break;
-
- case 'iframe':
- case 'object':
- case 'embed':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the load event.
- listenToNonDelegatedEvent('load', domElement);
- break;
-
- case 'video':
- case 'audio':
- // We listen to these events in case to ensure emulated bubble
- // listeners still fire for all the media events.
- for (var i = 0; i < mediaEventTypes.length; i++) {
- listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
- }
-
- break;
-
- case 'source':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the error event.
- listenToNonDelegatedEvent('error', domElement);
- break;
-
- case 'img':
- case 'image':
- case 'link':
- // We listen to these events in case to ensure emulated bubble
- // listeners still fire for error and load events.
- listenToNonDelegatedEvent('error', domElement);
- listenToNonDelegatedEvent('load', domElement);
- break;
-
- case 'details':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the toggle event.
- listenToNonDelegatedEvent('toggle', domElement);
- break;
-
- case 'input':
- initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- case 'option':
- validateProps(domElement, rawProps);
- break;
-
- case 'select':
- initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- case 'textarea':
- initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
- }
-
- assertValidProps(tag, rawProps);
-
- {
- extraAttributeNames = new Set();
- var attributes = domElement.attributes;
-
- for (var _i = 0; _i < attributes.length; _i++) {
- var name = attributes[_i].name.toLowerCase();
-
- switch (name) {
- // Built-in SSR attribute is allowed
- case 'data-reactroot':
- break;
- // Controlled attributes are not validated
- // TODO: Only ignore them on controlled tags.
-
- case 'value':
- break;
-
- case 'checked':
- break;
-
- case 'selected':
- break;
-
- default:
- // Intentionally use the original name.
- // See discussion in https://github.com/facebook/react/pull/10676.
- extraAttributeNames.add(attributes[_i].name);
- }
- }
- }
-
- var updatePayload = null;
-
- for (var propKey in rawProps) {
- if (!rawProps.hasOwnProperty(propKey)) {
- continue;
- }
-
- var nextProp = rawProps[propKey];
-
- if (propKey === CHILDREN) {
- // For text content children we compare against textContent. This
- // might match additional HTML that is hidden when we read it using
- // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
- // satisfies our requirement. Our requirement is not to produce perfect
- // HTML and attributes. Ideally we should preserve structure but it's
- // ok not to if the visible content is still enough to indicate what
- // even listeners these nodes might be wired up to.
- // TODO: Warn if there is more than a single textNode as a child.
- // TODO: Should we use domElement.firstChild.nodeValue to compare?
- if (typeof nextProp === 'string') {
- if (domElement.textContent !== nextProp) {
- if ( !suppressHydrationWarning) {
- warnForTextDifference(domElement.textContent, nextProp);
- }
-
- updatePayload = [CHILDREN, nextProp];
- }
- } else if (typeof nextProp === 'number') {
- if (domElement.textContent !== '' + nextProp) {
- if ( !suppressHydrationWarning) {
- warnForTextDifference(domElement.textContent, nextProp);
- }
-
- updatePayload = [CHILDREN, '' + nextProp];
- }
- }
- } else if (registrationNameDependencies.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
-
- if (propKey === 'onScroll') {
- listenToNonDelegatedEvent('scroll', domElement);
- }
- }
- } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
- typeof isCustomComponentTag === 'boolean') {
- // Validate that the properties correspond to their expected values.
- var serverValue = void 0;
- var propertyInfo = getPropertyInfo(propKey);
-
- if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
- // TODO: Only ignore them on controlled tags.
- propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var serverHTML = domElement.innerHTML;
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
-
- if (nextHtml != null) {
- var expectedHTML = normalizeHTML(domElement, nextHtml);
-
- if (expectedHTML !== serverHTML) {
- warnForPropDifference(propKey, serverHTML, expectedHTML);
- }
- }
- } else if (propKey === STYLE) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey);
-
- if (canDiffStyleForHydrationWarning) {
- var expectedStyle = createDangerousStringForStyles(nextProp);
- serverValue = domElement.getAttribute('style');
-
- if (expectedStyle !== serverValue) {
- warnForPropDifference(propKey, serverValue, expectedStyle);
- }
- }
- } else if (isCustomComponentTag) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey.toLowerCase());
- serverValue = getValueForAttribute(domElement, propKey, nextProp);
-
- if (nextProp !== serverValue) {
- warnForPropDifference(propKey, serverValue, nextProp);
- }
- } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
- var isMismatchDueToBadCasing = false;
-
- if (propertyInfo !== null) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propertyInfo.attributeName);
- serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
- } else {
- var ownNamespace = parentNamespace;
-
- if (ownNamespace === HTML_NAMESPACE$1) {
- ownNamespace = getIntrinsicNamespace(tag);
- }
-
- if (ownNamespace === HTML_NAMESPACE$1) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey.toLowerCase());
- } else {
- var standardName = getPossibleStandardName(propKey);
-
- if (standardName !== null && standardName !== propKey) {
- // If an SVG prop is supplied with bad casing, it will
- // be successfully parsed from HTML, but will produce a mismatch
- // (and would be incorrectly rendered on the client).
- // However, we already warn about bad casing elsewhere.
- // So we'll skip the misleading extra mismatch warning in this case.
- isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.
-
- extraAttributeNames.delete(standardName);
- } // $FlowFixMe - Should be inferred as not undefined.
-
-
- extraAttributeNames.delete(propKey);
- }
-
- serverValue = getValueForAttribute(domElement, propKey, nextProp);
- }
-
- if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
- warnForPropDifference(propKey, serverValue, nextProp);
- }
- }
- }
- }
-
- {
- // $FlowFixMe - Should be inferred as not undefined.
- if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
- // $FlowFixMe - Should be inferred as not undefined.
- warnForExtraAttributes(extraAttributeNames);
- }
- }
-
- switch (tag) {
- case 'input':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper(domElement, rawProps, true);
- break;
-
- case 'textarea':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper$3(domElement);
- break;
-
- case 'select':
- case 'option':
- // For input and textarea we current always set the value property at
- // post mount to force it to diverge from attributes. However, for
- // option and select we don't quite do the same thing and select
- // is not resilient to the DOM state changing so we don't do that here.
- // TODO: Consider not doing this for input and textarea.
- break;
-
- default:
- if (typeof rawProps.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
-
- break;
- }
-
- return updatePayload;
-}
-function diffHydratedText(textNode, text) {
- var isDifferent = textNode.nodeValue !== text;
- return isDifferent;
-}
-function warnForUnmatchedText(textNode, text) {
- {
- warnForTextDifference(textNode.nodeValue, text);
- }
-}
-function warnForDeletedHydratableElement(parentNode, child) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
- }
-}
-function warnForDeletedHydratableText(parentNode, child) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
- }
-}
-function warnForInsertedHydratedElement(parentNode, tag, props) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
- }
-}
-function warnForInsertedHydratedText(parentNode, text) {
- {
- if (text === '') {
- // We expect to insert empty text nodes since they're not represented in
- // the HTML.
- // TODO: Remove this special case if we can just avoid inserting empty
- // text nodes.
- return;
- }
-
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
- }
-}
-function restoreControlledState$3(domElement, tag, props) {
- switch (tag) {
- case 'input':
- restoreControlledState(domElement, props);
- return;
-
- case 'textarea':
- restoreControlledState$2(domElement, props);
- return;
-
- case 'select':
- restoreControlledState$1(domElement, props);
- return;
- }
-}
-
-var validateDOMNesting = function () {};
-
-var updatedAncestorInfo = function () {};
-
-{
- // This validation code was written based on the HTML5 parsing spec:
- // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
- //
- // Note: this does not catch all invalid nesting, nor does it try to (as it's
- // not clear what practical benefit doing so provides); instead, we warn only
- // for cases where the parser will give a parse tree differing from what React
- // intended. For example, <b><div></div></b> is invalid but we don't warn
- // because it still parses correctly; we do warn for other cases like nested
- // <p> tags where the beginning of the second element implicitly closes the
- // first, causing a confusing mess.
- // https://html.spec.whatwg.org/multipage/syntax.html#special
- var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
-
- var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
- // TODO: Distinguish by namespace here -- for <title>, including it here
- // errs on the side of fewer warnings
- 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
-
- var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
-
- var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
- var emptyAncestorInfo = {
- current: null,
- formTag: null,
- aTagInScope: null,
- buttonTagInScope: null,
- nobrTagInScope: null,
- pTagInButtonScope: null,
- listItemTagAutoclosing: null,
- dlItemTagAutoclosing: null
- };
-
- updatedAncestorInfo = function (oldInfo, tag) {
- var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
-
- var info = {
- tag: tag
- };
-
- if (inScopeTags.indexOf(tag) !== -1) {
- ancestorInfo.aTagInScope = null;
- ancestorInfo.buttonTagInScope = null;
- ancestorInfo.nobrTagInScope = null;
- }
-
- if (buttonScopeTags.indexOf(tag) !== -1) {
- ancestorInfo.pTagInButtonScope = null;
- } // See rules for 'li', 'dd', 'dt' start tags in
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
-
-
- if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
- ancestorInfo.listItemTagAutoclosing = null;
- ancestorInfo.dlItemTagAutoclosing = null;
- }
-
- ancestorInfo.current = info;
-
- if (tag === 'form') {
- ancestorInfo.formTag = info;
- }
-
- if (tag === 'a') {
- ancestorInfo.aTagInScope = info;
- }
-
- if (tag === 'button') {
- ancestorInfo.buttonTagInScope = info;
- }
-
- if (tag === 'nobr') {
- ancestorInfo.nobrTagInScope = info;
- }
-
- if (tag === 'p') {
- ancestorInfo.pTagInButtonScope = info;
- }
-
- if (tag === 'li') {
- ancestorInfo.listItemTagAutoclosing = info;
- }
-
- if (tag === 'dd' || tag === 'dt') {
- ancestorInfo.dlItemTagAutoclosing = info;
- }
-
- return ancestorInfo;
- };
- /**
- * Returns whether
- */
-
-
- var isTagValidWithParent = function (tag, parentTag) {
- // First, let's check if we're in an unusual parsing mode...
- switch (parentTag) {
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
- case 'select':
- return tag === 'option' || tag === 'optgroup' || tag === '#text';
-
- case 'optgroup':
- return tag === 'option' || tag === '#text';
- // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
- // but
-
- case 'option':
- return tag === '#text';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
- // No special behavior since these rules fall back to "in body" mode for
- // all except special table nodes which cause bad parsing behavior anyway.
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
-
- case 'tr':
- return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
-
- case 'tbody':
- case 'thead':
- case 'tfoot':
- return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
-
- case 'colgroup':
- return tag === 'col' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
-
- case 'table':
- return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
-
- case 'head':
- return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
-
- case 'html':
- return tag === 'head' || tag === 'body' || tag === 'frameset';
-
- case 'frameset':
- return tag === 'frame';
-
- case '#document':
- return tag === 'html';
- } // Probably in the "in body" parsing mode, so we outlaw only tag combos
- // where the parsing rules cause implicit opens or closes to be added.
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
-
-
- switch (tag) {
- case 'h1':
- case 'h2':
- case 'h3':
- case 'h4':
- case 'h5':
- case 'h6':
- return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
-
- case 'rp':
- case 'rt':
- return impliedEndTags.indexOf(parentTag) === -1;
-
- case 'body':
- case 'caption':
- case 'col':
- case 'colgroup':
- case 'frameset':
- case 'frame':
- case 'head':
- case 'html':
- case 'tbody':
- case 'td':
- case 'tfoot':
- case 'th':
- case 'thead':
- case 'tr':
- // These tags are only valid with a few parents that have special child
- // parsing rules -- if we're down here, then none of those matched and
- // so we allow it only if we don't know what the parent is, as all other
- // cases are invalid.
- return parentTag == null;
- }
-
- return true;
- };
- /**
- * Returns whether
- */
-
-
- var findInvalidAncestorForTag = function (tag, ancestorInfo) {
- switch (tag) {
- case 'address':
- case 'article':
- case 'aside':
- case 'blockquote':
- case 'center':
- case 'details':
- case 'dialog':
- case 'dir':
- case 'div':
- case 'dl':
- case 'fieldset':
- case 'figcaption':
- case 'figure':
- case 'footer':
- case 'header':
- case 'hgroup':
- case 'main':
- case 'menu':
- case 'nav':
- case 'ol':
- case 'p':
- case 'section':
- case 'summary':
- case 'ul':
- case 'pre':
- case 'listing':
- case 'table':
- case 'hr':
- case 'xmp':
- case 'h1':
- case 'h2':
- case 'h3':
- case 'h4':
- case 'h5':
- case 'h6':
- return ancestorInfo.pTagInButtonScope;
-
- case 'form':
- return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
-
- case 'li':
- return ancestorInfo.listItemTagAutoclosing;
-
- case 'dd':
- case 'dt':
- return ancestorInfo.dlItemTagAutoclosing;
-
- case 'button':
- return ancestorInfo.buttonTagInScope;
-
- case 'a':
- // Spec says something about storing a list of markers, but it sounds
- // equivalent to this check.
- return ancestorInfo.aTagInScope;
-
- case 'nobr':
- return ancestorInfo.nobrTagInScope;
- }
-
- return null;
- };
-
- var didWarn$1 = {};
-
- validateDOMNesting = function (childTag, childText, ancestorInfo) {
- ancestorInfo = ancestorInfo || emptyAncestorInfo;
- var parentInfo = ancestorInfo.current;
- var parentTag = parentInfo && parentInfo.tag;
-
- if (childText != null) {
- if (childTag != null) {
- error('validateDOMNesting: when childText is passed, childTag should be null');
- }
-
- childTag = '#text';
- }
-
- var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
- var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
- var invalidParentOrAncestor = invalidParent || invalidAncestor;
-
- if (!invalidParentOrAncestor) {
- return;
- }
-
- var ancestorTag = invalidParentOrAncestor.tag;
- var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;
-
- if (didWarn$1[warnKey]) {
- return;
- }
-
- didWarn$1[warnKey] = true;
- var tagDisplayName = childTag;
- var whitespaceInfo = '';
-
- if (childTag === '#text') {
- if (/\S/.test(childText)) {
- tagDisplayName = 'Text nodes';
- } else {
- tagDisplayName = 'Whitespace text nodes';
- whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
- }
- } else {
- tagDisplayName = '<' + childTag + '>';
- }
-
- if (invalidParent) {
- var info = '';
-
- if (ancestorTag === 'table' && childTag === 'tr') {
- info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
- }
-
- error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
- } else {
- error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
- }
- };
-}
-
-var SUPPRESS_HYDRATION_WARNING$1;
-
-{
- SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
-}
-
-var SUSPENSE_START_DATA = '$';
-var SUSPENSE_END_DATA = '/$';
-var SUSPENSE_PENDING_START_DATA = '$?';
-var SUSPENSE_FALLBACK_START_DATA = '$!';
-var STYLE$1 = 'style';
-var eventsEnabled = null;
-var selectionInformation = null;
-
-function shouldAutoFocusHostComponent(type, props) {
- switch (type) {
- case 'button':
- case 'input':
- case 'select':
- case 'textarea':
- return !!props.autoFocus;
- }
-
- return false;
-}
-function getRootHostContext(rootContainerInstance) {
- var type;
- var namespace;
- var nodeType = rootContainerInstance.nodeType;
-
- switch (nodeType) {
- case DOCUMENT_NODE:
- case DOCUMENT_FRAGMENT_NODE:
- {
- type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
- var root = rootContainerInstance.documentElement;
- namespace = root ? root.namespaceURI : getChildNamespace(null, '');
- break;
- }
-
- default:
- {
- var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
- var ownNamespace = container.namespaceURI || null;
- type = container.tagName;
- namespace = getChildNamespace(ownNamespace, type);
- break;
- }
- }
-
- {
- var validatedTag = type.toLowerCase();
- var ancestorInfo = updatedAncestorInfo(null, validatedTag);
- return {
- namespace: namespace,
- ancestorInfo: ancestorInfo
- };
- }
-}
-function getChildHostContext(parentHostContext, type, rootContainerInstance) {
- {
- var parentHostContextDev = parentHostContext;
- var namespace = getChildNamespace(parentHostContextDev.namespace, type);
- var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
- return {
- namespace: namespace,
- ancestorInfo: ancestorInfo
- };
- }
-}
-function getPublicInstance(instance) {
- return instance;
-}
-function prepareForCommit(containerInfo) {
- eventsEnabled = isEnabled();
- selectionInformation = getSelectionInformation();
- var activeInstance = null;
-
- setEnabled(false);
- return activeInstance;
-}
-function resetAfterCommit(containerInfo) {
- restoreSelection(selectionInformation);
- setEnabled(eventsEnabled);
- eventsEnabled = null;
- selectionInformation = null;
-}
-function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
- var parentNamespace;
-
- {
- // TODO: take namespace into account when validating.
- var hostContextDev = hostContext;
- validateDOMNesting(type, null, hostContextDev.ancestorInfo);
-
- if (typeof props.children === 'string' || typeof props.children === 'number') {
- var string = '' + props.children;
- var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
- validateDOMNesting(null, string, ownAncestorInfo);
- }
-
- parentNamespace = hostContextDev.namespace;
- }
-
- var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
- precacheFiberNode(internalInstanceHandle, domElement);
- updateFiberProps(domElement, props);
- return domElement;
-}
-function appendInitialChild(parentInstance, child) {
- parentInstance.appendChild(child);
-}
-function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
- setInitialProperties(domElement, type, props, rootContainerInstance);
- return shouldAutoFocusHostComponent(type, props);
-}
-function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
- {
- var hostContextDev = hostContext;
-
- if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
- var string = '' + newProps.children;
- var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
- validateDOMNesting(null, string, ownAncestorInfo);
- }
- }
-
- return diffProperties(domElement, type, oldProps, newProps);
-}
-function shouldSetTextContent(type, props) {
- return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
-}
-function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
- {
- var hostContextDev = hostContext;
- validateDOMNesting(null, text, hostContextDev.ancestorInfo);
- }
-
- var textNode = createTextNode(text, rootContainerInstance);
- precacheFiberNode(internalInstanceHandle, textNode);
- return textNode;
-}
-// if a component just imports ReactDOM (e.g. for findDOMNode).
-// Some environments might not have setTimeout or clearTimeout.
-
-var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
-var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
-var noTimeout = -1; // -------------------
-function commitMount(domElement, type, newProps, internalInstanceHandle) {
- // Despite the naming that might imply otherwise, this method only
- // fires if there is an `Update` effect scheduled during mounting.
- // This happens if `finalizeInitialChildren` returns `true` (which it
- // does to implement the `autoFocus` attribute on the client). But
- // there are also other cases when this might happen (such as patching
- // up text content during hydration mismatch). So we'll check this again.
- if (shouldAutoFocusHostComponent(type, newProps)) {
- domElement.focus();
- }
-}
-function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
- // Update the props handle so that we know which props are the ones with
- // with current event handlers.
- updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.
-
- updateProperties(domElement, updatePayload, type, oldProps, newProps);
-}
-function resetTextContent(domElement) {
- setTextContent(domElement, '');
-}
-function commitTextUpdate(textInstance, oldText, newText) {
- textInstance.nodeValue = newText;
-}
-function appendChild(parentInstance, child) {
- parentInstance.appendChild(child);
-}
-function appendChildToContainer(container, child) {
- var parentNode;
-
- if (container.nodeType === COMMENT_NODE) {
- parentNode = container.parentNode;
- parentNode.insertBefore(child, container);
- } else {
- parentNode = container;
- parentNode.appendChild(child);
- } // This container might be used for a portal.
- // If something inside a portal is clicked, that click should bubble
- // through the React tree. However, on Mobile Safari the click would
- // never bubble through the *DOM* tree unless an ancestor with onclick
- // event exists. So we wouldn't see it and dispatch it.
- // This is why we ensure that non React root containers have inline onclick
- // defined.
- // https://github.com/facebook/react/issues/11918
-
-
- var reactRootContainer = container._reactRootContainer;
-
- if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(parentNode);
- }
-}
-function insertBefore(parentInstance, child, beforeChild) {
- parentInstance.insertBefore(child, beforeChild);
-}
-function insertInContainerBefore(container, child, beforeChild) {
- if (container.nodeType === COMMENT_NODE) {
- container.parentNode.insertBefore(child, beforeChild);
- } else {
- container.insertBefore(child, beforeChild);
- }
-}
-
-function removeChild(parentInstance, child) {
- parentInstance.removeChild(child);
-}
-function removeChildFromContainer(container, child) {
- if (container.nodeType === COMMENT_NODE) {
- container.parentNode.removeChild(child);
- } else {
- container.removeChild(child);
- }
-}
-function hideInstance(instance) {
- // TODO: Does this work for all element types? What about MathML? Should we
- // pass host context to this method?
- instance = instance;
- var style = instance.style;
-
- if (typeof style.setProperty === 'function') {
- style.setProperty('display', 'none', 'important');
- } else {
- style.display = 'none';
- }
-}
-function hideTextInstance(textInstance) {
- textInstance.nodeValue = '';
-}
-function unhideInstance(instance, props) {
- instance = instance;
- var styleProp = props[STYLE$1];
- var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
- instance.style.display = dangerousStyleValue('display', display);
-}
-function unhideTextInstance(textInstance, text) {
- textInstance.nodeValue = text;
-}
-function clearContainer(container) {
- if (container.nodeType === ELEMENT_NODE) {
- container.textContent = '';
- } else if (container.nodeType === DOCUMENT_NODE) {
- var body = container.body;
-
- if (body != null) {
- body.textContent = '';
- }
- }
-} // -------------------
-function canHydrateInstance(instance, type, props) {
- if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
- return null;
- } // This has now been refined to an element node.
-
-
- return instance;
-}
-function canHydrateTextInstance(instance, text) {
- if (text === '' || instance.nodeType !== TEXT_NODE) {
- // Empty strings are not parsed by HTML so there won't be a correct match here.
- return null;
- } // This has now been refined to a text node.
-
-
- return instance;
-}
-function isSuspenseInstancePending(instance) {
- return instance.data === SUSPENSE_PENDING_START_DATA;
-}
-function isSuspenseInstanceFallback(instance) {
- return instance.data === SUSPENSE_FALLBACK_START_DATA;
-}
-
-function getNextHydratable(node) {
- // Skip non-hydratable nodes.
- for (; node != null; node = node.nextSibling) {
- var nodeType = node.nodeType;
-
- if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
- break;
- }
- }
-
- return node;
-}
-
-function getNextHydratableSibling(instance) {
- return getNextHydratable(instance.nextSibling);
-}
-function getFirstHydratableChild(parentInstance) {
- return getNextHydratable(parentInstance.firstChild);
-}
-function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
- precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
- // get attached.
-
- updateFiberProps(instance, props);
- var parentNamespace;
-
- {
- var hostContextDev = hostContext;
- parentNamespace = hostContextDev.namespace;
- }
-
- return diffHydratedProperties(instance, type, props, parentNamespace);
-}
-function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
- precacheFiberNode(internalInstanceHandle, textInstance);
- return diffHydratedText(textInstance, text);
-}
-function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
- var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
- // There might be nested nodes so we need to keep track of how
- // deep we are and only break out when we're back on top.
-
- var depth = 0;
-
- while (node) {
- if (node.nodeType === COMMENT_NODE) {
- var data = node.data;
-
- if (data === SUSPENSE_END_DATA) {
- if (depth === 0) {
- return getNextHydratableSibling(node);
- } else {
- depth--;
- }
- } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
- depth++;
- }
- }
-
- node = node.nextSibling;
- } // TODO: Warn, we didn't find the end comment boundary.
-
-
- return null;
-} // Returns the SuspenseInstance if this node is a direct child of a
-// SuspenseInstance. I.e. if its previous sibling is a Comment with
-// SUSPENSE_x_START_DATA. Otherwise, null.
-
-function getParentSuspenseInstance(targetInstance) {
- var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
- // There might be nested nodes so we need to keep track of how
- // deep we are and only break out when we're back on top.
-
- var depth = 0;
-
- while (node) {
- if (node.nodeType === COMMENT_NODE) {
- var data = node.data;
-
- if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
- if (depth === 0) {
- return node;
- } else {
- depth--;
- }
- } else if (data === SUSPENSE_END_DATA) {
- depth++;
- }
- }
-
- node = node.previousSibling;
- }
-
- return null;
-}
-function commitHydratedContainer(container) {
- // Retry if any event replaying was blocked on this.
- retryIfBlockedOn(container);
-}
-function commitHydratedSuspenseInstance(suspenseInstance) {
- // Retry if any event replaying was blocked on this.
- retryIfBlockedOn(suspenseInstance);
-}
-function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
- {
- warnForUnmatchedText(textInstance, text);
- }
-}
-function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForUnmatchedText(textInstance, text);
- }
-}
-function didNotHydrateContainerInstance(parentContainer, instance) {
- {
- if (instance.nodeType === ELEMENT_NODE) {
- warnForDeletedHydratableElement(parentContainer, instance);
- } else if (instance.nodeType === COMMENT_NODE) ; else {
- warnForDeletedHydratableText(parentContainer, instance);
- }
- }
-}
-function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- if (instance.nodeType === ELEMENT_NODE) {
- warnForDeletedHydratableElement(parentInstance, instance);
- } else if (instance.nodeType === COMMENT_NODE) ; else {
- warnForDeletedHydratableText(parentInstance, instance);
- }
- }
-}
-function didNotFindHydratableContainerInstance(parentContainer, type, props) {
- {
- warnForInsertedHydratedElement(parentContainer, type);
- }
-}
-function didNotFindHydratableContainerTextInstance(parentContainer, text) {
- {
- warnForInsertedHydratedText(parentContainer, text);
- }
-}
-function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForInsertedHydratedElement(parentInstance, type);
- }
-}
-function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForInsertedHydratedText(parentInstance, text);
- }
-}
-function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
-}
-var clientId = 0;
-function makeClientIdInDEV(warnOnAccessInDEV) {
- var id = 'r:' + (clientId++).toString(36);
- return {
- toString: function () {
- warnOnAccessInDEV();
- return id;
- },
- valueOf: function () {
- warnOnAccessInDEV();
- return id;
- }
- };
-}
-function isOpaqueHydratingObject(value) {
- return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;
-}
-function makeOpaqueHydratingObject(attemptToReadValue) {
- return {
- $$typeof: REACT_OPAQUE_ID_TYPE,
- toString: attemptToReadValue,
- valueOf: attemptToReadValue
- };
-}
-function preparePortalMount(portalInstance) {
- {
- listenToAllSupportedEvents(portalInstance);
- }
-}
-
-var randomKey = Math.random().toString(36).slice(2);
-var internalInstanceKey = '__reactFiber$' + randomKey;
-var internalPropsKey = '__reactProps$' + randomKey;
-var internalContainerInstanceKey = '__reactContainer$' + randomKey;
-var internalEventHandlersKey = '__reactEvents$' + randomKey;
-function precacheFiberNode(hostInst, node) {
- node[internalInstanceKey] = hostInst;
-}
-function markContainerAsRoot(hostRoot, node) {
- node[internalContainerInstanceKey] = hostRoot;
-}
-function unmarkContainerAsRoot(node) {
- node[internalContainerInstanceKey] = null;
-}
-function isContainerMarkedAsRoot(node) {
- return !!node[internalContainerInstanceKey];
-} // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
-// If the target node is part of a hydrated or not yet rendered subtree, then
-// this may also return a SuspenseComponent or HostRoot to indicate that.
-// Conceptually the HostRoot fiber is a child of the Container node. So if you
-// pass the Container node as the targetNode, you will not actually get the
-// HostRoot back. To get to the HostRoot, you need to pass a child of it.
-// The same thing applies to Suspense boundaries.
-
-function getClosestInstanceFromNode(targetNode) {
- var targetInst = targetNode[internalInstanceKey];
-
- if (targetInst) {
- // Don't return HostRoot or SuspenseComponent here.
- return targetInst;
- } // If the direct event target isn't a React owned DOM node, we need to look
- // to see if one of its parents is a React owned DOM node.
-
-
- var parentNode = targetNode.parentNode;
-
- while (parentNode) {
- // We'll check if this is a container root that could include
- // React nodes in the future. We need to check this first because
- // if we're a child of a dehydrated container, we need to first
- // find that inner container before moving on to finding the parent
- // instance. Note that we don't check this field on the targetNode
- // itself because the fibers are conceptually between the container
- // node and the first child. It isn't surrounding the container node.
- // If it's not a container, we check if it's an instance.
- targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];
-
- if (targetInst) {
- // Since this wasn't the direct target of the event, we might have
- // stepped past dehydrated DOM nodes to get here. However they could
- // also have been non-React nodes. We need to answer which one.
- // If we the instance doesn't have any children, then there can't be
- // a nested suspense boundary within it. So we can use this as a fast
- // bailout. Most of the time, when people add non-React children to
- // the tree, it is using a ref to a child-less DOM node.
- // Normally we'd only need to check one of the fibers because if it
- // has ever gone from having children to deleting them or vice versa
- // it would have deleted the dehydrated boundary nested inside already.
- // However, since the HostRoot starts out with an alternate it might
- // have one on the alternate so we need to check in case this was a
- // root.
- var alternate = targetInst.alternate;
-
- if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
- // Next we need to figure out if the node that skipped past is
- // nested within a dehydrated boundary and if so, which one.
- var suspenseInstance = getParentSuspenseInstance(targetNode);
-
- while (suspenseInstance !== null) {
- // We found a suspense instance. That means that we haven't
- // hydrated it yet. Even though we leave the comments in the
- // DOM after hydrating, and there are boundaries in the DOM
- // that could already be hydrated, we wouldn't have found them
- // through this pass since if the target is hydrated it would
- // have had an internalInstanceKey on it.
- // Let's get the fiber associated with the SuspenseComponent
- // as the deepest instance.
- var targetSuspenseInst = suspenseInstance[internalInstanceKey];
-
- if (targetSuspenseInst) {
- return targetSuspenseInst;
- } // If we don't find a Fiber on the comment, it might be because
- // we haven't gotten to hydrate it yet. There might still be a
- // parent boundary that hasn't above this one so we need to find
- // the outer most that is known.
-
-
- suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
- // host component also hasn't hydrated yet. We can return it
- // below since it will bail out on the isMounted check later.
- }
- }
-
- return targetInst;
- }
-
- targetNode = parentNode;
- parentNode = targetNode.parentNode;
- }
-
- return null;
-}
-/**
- * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
- * instance, or null if the node was not rendered by this React.
- */
-
-function getInstanceFromNode(node) {
- var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
-
- if (inst) {
- if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
- return inst;
- } else {
- return null;
- }
- }
-
- return null;
-}
-/**
- * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
- * DOM node.
- */
-
-function getNodeFromInstance(inst) {
- if (inst.tag === HostComponent || inst.tag === HostText) {
- // In Fiber this, is just the state node right now. We assume it will be
- // a host component or host text.
- return inst.stateNode;
- } // Without this first invariant, passing a non-DOM-component triggers the next
- // invariant for a missing parent, which is super confusing.
-
-
- {
- {
- throw Error( "getNodeFromInstance: Invalid argument." );
- }
- }
-}
-function getFiberCurrentPropsFromNode(node) {
- return node[internalPropsKey] || null;
-}
-function updateFiberProps(node, props) {
- node[internalPropsKey] = props;
-}
-function getEventListenerSet(node) {
- var elementListenerSet = node[internalEventHandlersKey];
-
- if (elementListenerSet === undefined) {
- elementListenerSet = node[internalEventHandlersKey] = new Set();
- }
-
- return elementListenerSet;
-}
-
-var loggedTypeFailures = {};
-var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
- }
- }
-}
-
-function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
-}
-
-var valueStack = [];
-var fiberStack;
-
-{
- fiberStack = [];
-}
-
-var index = -1;
-
-function createCursor(defaultValue) {
- return {
- current: defaultValue
- };
-}
-
-function pop(cursor, fiber) {
- if (index < 0) {
- {
- error('Unexpected pop.');
- }
-
- return;
- }
-
- {
- if (fiber !== fiberStack[index]) {
- error('Unexpected Fiber popped.');
- }
- }
-
- cursor.current = valueStack[index];
- valueStack[index] = null;
-
- {
- fiberStack[index] = null;
- }
-
- index--;
-}
-
-function push(cursor, value, fiber) {
- index++;
- valueStack[index] = cursor.current;
-
- {
- fiberStack[index] = fiber;
- }
-
- cursor.current = value;
-}
-
-var warnedAboutMissingGetChildContext;
-
-{
- warnedAboutMissingGetChildContext = {};
-}
-
-var emptyContextObject = {};
-
-{
- Object.freeze(emptyContextObject);
-} // A cursor to the current merged context object on the stack.
-
-
-var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.
-
-var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
-// We use this to get access to the parent context after we have already
-// pushed the next context provider, and now need to merge their contexts.
-
-var previousContext = emptyContextObject;
-
-function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
- {
- if (didPushOwnContextIfProvider && isContextProvider(Component)) {
- // If the fiber is a context provider itself, when we read its context
- // we may have already pushed its own child context on the stack. A context
- // provider should not "see" its own child context. Therefore we read the
- // previous (parent) context instead for a context provider.
- return previousContext;
- }
-
- return contextStackCursor.current;
- }
-}
-
-function cacheContext(workInProgress, unmaskedContext, maskedContext) {
- {
- var instance = workInProgress.stateNode;
- instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
- instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
- }
-}
-
-function getMaskedContext(workInProgress, unmaskedContext) {
- {
- var type = workInProgress.type;
- var contextTypes = type.contextTypes;
-
- if (!contextTypes) {
- return emptyContextObject;
- } // Avoid recreating masked context unless unmasked context has changed.
- // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
- // This may trigger infinite loops if componentWillReceiveProps calls setState.
-
-
- var instance = workInProgress.stateNode;
-
- if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
- return instance.__reactInternalMemoizedMaskedChildContext;
- }
-
- var context = {};
-
- for (var key in contextTypes) {
- context[key] = unmaskedContext[key];
- }
-
- {
- var name = getComponentName(type) || 'Unknown';
- checkPropTypes(contextTypes, context, 'context', name);
- } // Cache unmasked context so we can avoid recreating masked context unless necessary.
- // Context is created before the class component is instantiated so check for instance.
-
-
- if (instance) {
- cacheContext(workInProgress, unmaskedContext, context);
- }
-
- return context;
- }
-}
-
-function hasContextChanged() {
- {
- return didPerformWorkStackCursor.current;
- }
-}
-
-function isContextProvider(type) {
- {
- var childContextTypes = type.childContextTypes;
- return childContextTypes !== null && childContextTypes !== undefined;
- }
-}
-
-function popContext(fiber) {
- {
- pop(didPerformWorkStackCursor, fiber);
- pop(contextStackCursor, fiber);
- }
-}
-
-function popTopLevelContextObject(fiber) {
- {
- pop(didPerformWorkStackCursor, fiber);
- pop(contextStackCursor, fiber);
- }
-}
-
-function pushTopLevelContextObject(fiber, context, didChange) {
- {
- if (!(contextStackCursor.current === emptyContextObject)) {
- {
- throw Error( "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- push(contextStackCursor, context, fiber);
- push(didPerformWorkStackCursor, didChange, fiber);
- }
-}
-
-function processChildContext(fiber, type, parentContext) {
- {
- var instance = fiber.stateNode;
- var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
- // It has only been added in Fiber to match the (unintentional) behavior in Stack.
-
- if (typeof instance.getChildContext !== 'function') {
- {
- var componentName = getComponentName(type) || 'Unknown';
-
- if (!warnedAboutMissingGetChildContext[componentName]) {
- warnedAboutMissingGetChildContext[componentName] = true;
-
- 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);
- }
- }
-
- return parentContext;
- }
-
- var childContext = instance.getChildContext();
-
- for (var contextKey in childContext) {
- if (!(contextKey in childContextTypes)) {
- {
- throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
- }
- }
- }
-
- {
- var name = getComponentName(type) || 'Unknown';
- checkPropTypes(childContextTypes, childContext, 'child context', name);
- }
-
- return _assign({}, parentContext, childContext);
- }
-}
-
-function pushContextProvider(workInProgress) {
- {
- var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
- // If the instance does not exist yet, we will push null at first,
- // and replace it on the stack later when invalidating the context.
-
- var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
- // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
-
- previousContext = contextStackCursor.current;
- push(contextStackCursor, memoizedMergedChildContext, workInProgress);
- push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
- return true;
- }
-}
-
-function invalidateContextProvider(workInProgress, type, didChange) {
- {
- var instance = workInProgress.stateNode;
-
- if (!instance) {
- {
- throw Error( "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- if (didChange) {
- // Merge parent and own context.
- // Skip this if we're not updating due to sCU.
- // This avoids unnecessarily recomputing memoized values.
- var mergedContext = processChildContext(workInProgress, type, previousContext);
- instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
- // It is important to unwind the context in the reverse order.
-
- pop(didPerformWorkStackCursor, workInProgress);
- pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.
-
- push(contextStackCursor, mergedContext, workInProgress);
- push(didPerformWorkStackCursor, didChange, workInProgress);
- } else {
- pop(didPerformWorkStackCursor, workInProgress);
- push(didPerformWorkStackCursor, didChange, workInProgress);
- }
- }
-}
-
-function findCurrentUnmaskedContext(fiber) {
- {
- // Currently this is only used with renderSubtreeIntoContainer; not sure if it
- // makes sense elsewhere
- if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
- {
- throw Error( "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var node = fiber;
-
- do {
- switch (node.tag) {
- case HostRoot:
- return node.stateNode.context;
-
- case ClassComponent:
- {
- var Component = node.type;
-
- if (isContextProvider(Component)) {
- return node.stateNode.__reactInternalMemoizedMergedChildContext;
- }
-
- break;
- }
- }
-
- node = node.return;
- } while (node !== null);
-
- {
- {
- throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-}
-
-var LegacyRoot = 0;
-var BlockingRoot = 1;
-var ConcurrentRoot = 2;
-
-var rendererID = null;
-var injectedHook = null;
-var hasLoggedError = false;
-var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
-function injectInternals(internals) {
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
- // No DevTools
- return false;
- }
-
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
-
- if (hook.isDisabled) {
- // This isn't a real property on the hook, but it can be set to opt out
- // of DevTools integration and associated warnings and logs.
- // https://github.com/facebook/react/issues/3877
- return true;
- }
-
- if (!hook.supportsFiber) {
- {
- error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
- } // DevTools exists, even though it doesn't support Fiber.
-
-
- return true;
- }
-
- try {
- rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
-
- injectedHook = hook;
- } catch (err) {
- // Catch all errors because it is unsafe to throw during initialization.
- {
- error('React instrumentation encountered an error: %s.', err);
- }
- } // DevTools exists
-
-
- return true;
-}
-function onScheduleRoot(root, children) {
- {
- if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
- try {
- injectedHook.onScheduleFiberRoot(rendererID, root, children);
- } catch (err) {
- if ( !hasLoggedError) {
- hasLoggedError = true;
-
- error('React instrumentation encountered an error: %s', err);
- }
- }
- }
- }
-}
-function onCommitRoot(root, priorityLevel) {
- if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
- try {
- var didError = (root.current.flags & DidCapture) === DidCapture;
-
- if (enableProfilerTimer) {
- injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
- } else {
- injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
- }
- } catch (err) {
- {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error('React instrumentation encountered an error: %s', err);
- }
- }
- }
- }
-}
-function onCommitUnmount(fiber) {
- if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
- try {
- injectedHook.onCommitFiberUnmount(rendererID, fiber);
- } catch (err) {
- {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error('React instrumentation encountered an error: %s', err);
- }
- }
- }
- }
-}
-
-var Scheduler_runWithPriority = Scheduler.unstable_runWithPriority,
- Scheduler_scheduleCallback = Scheduler.unstable_scheduleCallback,
- Scheduler_cancelCallback = Scheduler.unstable_cancelCallback,
- Scheduler_shouldYield = Scheduler.unstable_shouldYield,
- Scheduler_requestPaint = Scheduler.unstable_requestPaint,
- Scheduler_now$1 = Scheduler.unstable_now,
- Scheduler_getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,
- Scheduler_ImmediatePriority = Scheduler.unstable_ImmediatePriority,
- Scheduler_UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,
- Scheduler_NormalPriority = Scheduler.unstable_NormalPriority,
- Scheduler_LowPriority = Scheduler.unstable_LowPriority,
- Scheduler_IdlePriority = Scheduler.unstable_IdlePriority;
-
-{
- // Provide explicit error message when production+profiling bundle of e.g.
- // react-dom is used with production (non-profiling) bundle of
- // scheduler/tracing
- if (!(tracing.__interactionsRef != null && tracing.__interactionsRef.current != null)) {
- {
- throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
- }
- }
-}
-
-var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use
-// ascending numbers so we can compare them like numbers. They start at 90 to
-// avoid clashing with Scheduler's priorities.
-
-var ImmediatePriority$1 = 99;
-var UserBlockingPriority$2 = 98;
-var NormalPriority$1 = 97;
-var LowPriority$1 = 96;
-var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.
-
-var NoPriority$1 = 90;
-var shouldYield = Scheduler_shouldYield;
-var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
-Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
-var syncQueue = null;
-var immediateQueueCallbackNode = null;
-var isFlushingSyncQueue = false;
-var initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
-// This will be the case for modern browsers that support `performance.now`. In
-// older browsers, Scheduler falls back to `Date.now`, which returns a Unix
-// timestamp. In that case, subtract the module initialization time to simulate
-// the behavior of performance.now and keep our times small enough to fit
-// within 32 bits.
-// TODO: Consider lifting this into Scheduler.
-
-var now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {
- return Scheduler_now$1() - initialTimeMs$1;
-};
-function getCurrentPriorityLevel() {
- switch (Scheduler_getCurrentPriorityLevel()) {
- case Scheduler_ImmediatePriority:
- return ImmediatePriority$1;
-
- case Scheduler_UserBlockingPriority:
- return UserBlockingPriority$2;
-
- case Scheduler_NormalPriority:
- return NormalPriority$1;
-
- case Scheduler_LowPriority:
- return LowPriority$1;
-
- case Scheduler_IdlePriority:
- return IdlePriority$1;
-
- default:
- {
- {
- throw Error( "Unknown priority level." );
- }
- }
-
- }
-}
-
-function reactPriorityToSchedulerPriority(reactPriorityLevel) {
- switch (reactPriorityLevel) {
- case ImmediatePriority$1:
- return Scheduler_ImmediatePriority;
-
- case UserBlockingPriority$2:
- return Scheduler_UserBlockingPriority;
-
- case NormalPriority$1:
- return Scheduler_NormalPriority;
-
- case LowPriority$1:
- return Scheduler_LowPriority;
-
- case IdlePriority$1:
- return Scheduler_IdlePriority;
-
- default:
- {
- {
- throw Error( "Unknown priority level." );
- }
- }
-
- }
-}
-
-function runWithPriority$1(reactPriorityLevel, fn) {
- var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
- return Scheduler_runWithPriority(priorityLevel, fn);
-}
-function scheduleCallback(reactPriorityLevel, callback, options) {
- var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
- return Scheduler_scheduleCallback(priorityLevel, callback, options);
-}
-function scheduleSyncCallback(callback) {
- // Push this callback into an internal queue. We'll flush these either in
- // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
- if (syncQueue === null) {
- syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.
-
- immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
- } else {
- // Push onto existing queue. Don't need to schedule a callback because
- // we already scheduled one when we created the queue.
- syncQueue.push(callback);
- }
-
- return fakeCallbackNode;
-}
-function cancelCallback(callbackNode) {
- if (callbackNode !== fakeCallbackNode) {
- Scheduler_cancelCallback(callbackNode);
- }
-}
-function flushSyncCallbackQueue() {
- if (immediateQueueCallbackNode !== null) {
- var node = immediateQueueCallbackNode;
- immediateQueueCallbackNode = null;
- Scheduler_cancelCallback(node);
- }
-
- flushSyncCallbackQueueImpl();
-}
-
-function flushSyncCallbackQueueImpl() {
- if (!isFlushingSyncQueue && syncQueue !== null) {
- // Prevent re-entrancy.
- isFlushingSyncQueue = true;
- var i = 0;
-
- {
- try {
- var _isSync2 = true;
- var _queue = syncQueue;
- runWithPriority$1(ImmediatePriority$1, function () {
- for (; i < _queue.length; i++) {
- var callback = _queue[i];
-
- do {
- callback = callback(_isSync2);
- } while (callback !== null);
- }
- });
- syncQueue = null;
- } catch (error) {
- // If something throws, leave the remaining callbacks on the queue.
- if (syncQueue !== null) {
- syncQueue = syncQueue.slice(i + 1);
- } // Resume flushing in the next tick
-
-
- Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
- throw error;
- } finally {
- isFlushingSyncQueue = false;
- }
- }
- }
-}
-
-// TODO: this is special because it gets imported during build.
-var ReactVersion = '17.0.2';
-
-var NoMode = 0;
-var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
-// tag instead
-
-var BlockingMode = 2;
-var ConcurrentMode = 4;
-var ProfileMode = 8;
-var DebugTracingMode = 16;
-
-var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
-var NoTransition = 0;
-function requestCurrentTransition() {
- return ReactCurrentBatchConfig.transition;
-}
-
-var ReactStrictModeWarnings = {
- recordUnsafeLifecycleWarnings: function (fiber, instance) {},
- flushPendingUnsafeLifecycleWarnings: function () {},
- recordLegacyContextWarning: function (fiber, instance) {},
- flushLegacyContextWarning: function () {},
- discardPendingWarnings: function () {}
-};
-
-{
- var findStrictRoot = function (fiber) {
- var maybeStrictRoot = null;
- var node = fiber;
-
- while (node !== null) {
- if (node.mode & StrictMode) {
- maybeStrictRoot = node;
- }
-
- node = node.return;
- }
-
- return maybeStrictRoot;
- };
-
- var setToSortedString = function (set) {
- var array = [];
- set.forEach(function (value) {
- array.push(value);
- });
- return array.sort().join(', ');
- };
-
- var pendingComponentWillMountWarnings = [];
- var pendingUNSAFE_ComponentWillMountWarnings = [];
- var pendingComponentWillReceivePropsWarnings = [];
- var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- var pendingComponentWillUpdateWarnings = [];
- var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.
-
- var didWarnAboutUnsafeLifecycles = new Set();
-
- ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
- // Dedup strategy: Warn once per component.
- if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
- return;
- }
-
- if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
- instance.componentWillMount.__suppressDeprecationWarning !== true) {
- pendingComponentWillMountWarnings.push(fiber);
- }
-
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {
- pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
- }
-
- if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
- pendingComponentWillReceivePropsWarnings.push(fiber);
- }
-
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
- }
-
- if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
- pendingComponentWillUpdateWarnings.push(fiber);
- }
-
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
- pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
- }
- };
-
- ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
- // We do an initial pass to gather component names
- var componentWillMountUniqueNames = new Set();
-
- if (pendingComponentWillMountWarnings.length > 0) {
- pendingComponentWillMountWarnings.forEach(function (fiber) {
- componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillMountWarnings = [];
- }
-
- var UNSAFE_componentWillMountUniqueNames = new Set();
-
- if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
- pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
- UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillMountWarnings = [];
- }
-
- var componentWillReceivePropsUniqueNames = new Set();
-
- if (pendingComponentWillReceivePropsWarnings.length > 0) {
- pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
- componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillReceivePropsWarnings = [];
- }
-
- var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
-
- if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
- pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
- UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- }
-
- var componentWillUpdateUniqueNames = new Set();
-
- if (pendingComponentWillUpdateWarnings.length > 0) {
- pendingComponentWillUpdateWarnings.forEach(function (fiber) {
- componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillUpdateWarnings = [];
- }
-
- var UNSAFE_componentWillUpdateUniqueNames = new Set();
-
- if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
- pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
- UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillUpdateWarnings = [];
- } // Finally, we flush all the warnings
- // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
-
-
- if (UNSAFE_componentWillMountUniqueNames.size > 0) {
- var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
-
- error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
- }
-
- if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
- var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
-
- error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
- }
-
- if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
- var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
-
- error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
- }
-
- if (componentWillMountUniqueNames.size > 0) {
- var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
-
- 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 with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
- }
-
- if (componentWillReceivePropsUniqueNames.size > 0) {
- var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
-
- warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
- }
-
- if (componentWillUpdateUniqueNames.size > 0) {
- var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
-
- warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
- }
- };
-
- var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.
-
- var didWarnAboutLegacyContext = new Set();
-
- ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
- var strictRoot = findStrictRoot(fiber);
-
- if (strictRoot === null) {
- error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
-
- return;
- } // Dedup strategy: Warn once per component.
-
-
- if (didWarnAboutLegacyContext.has(fiber.type)) {
- return;
- }
-
- var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
-
- if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
- if (warningsForRoot === undefined) {
- warningsForRoot = [];
- pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
- }
-
- warningsForRoot.push(fiber);
- }
- };
-
- ReactStrictModeWarnings.flushLegacyContextWarning = function () {
- pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
- if (fiberArray.length === 0) {
- return;
- }
-
- var firstFiber = fiberArray[0];
- var uniqueNames = new Set();
- fiberArray.forEach(function (fiber) {
- uniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutLegacyContext.add(fiber.type);
- });
- var sortedNames = setToSortedString(uniqueNames);
-
- try {
- setCurrentFiber(firstFiber);
-
- error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);
- } finally {
- resetCurrentFiber();
- }
- });
- };
-
- ReactStrictModeWarnings.discardPendingWarnings = function () {
- pendingComponentWillMountWarnings = [];
- pendingUNSAFE_ComponentWillMountWarnings = [];
- pendingComponentWillReceivePropsWarnings = [];
- pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- pendingComponentWillUpdateWarnings = [];
- pendingUNSAFE_ComponentWillUpdateWarnings = [];
- pendingLegacyContextWarning = new Map();
- };
-}
-
-function resolveDefaultProps(Component, baseProps) {
- if (Component && Component.defaultProps) {
- // Resolve default props. Taken from ReactElement
- var props = _assign({}, baseProps);
-
- var defaultProps = Component.defaultProps;
-
- for (var propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
-
- return props;
- }
-
- return baseProps;
-}
-
-// Max 31 bit integer. The max integer size in V8 for 32-bit systems.
-// Math.pow(2, 30) - 1
-// 0b111111111111111111111111111111
-var MAX_SIGNED_31_BIT_INT = 1073741823;
-
-var valueCursor = createCursor(null);
-var rendererSigil;
-
-{
- // Use this to detect multiple renderers using the same context
- rendererSigil = {};
-}
-
-var currentlyRenderingFiber = null;
-var lastContextDependency = null;
-var lastContextWithAllBitsObserved = null;
-var isDisallowedContextReadInDEV = false;
-function resetContextDependencies() {
- // This is called right before React yields execution, to ensure `readContext`
- // cannot be called outside the render phase.
- currentlyRenderingFiber = null;
- lastContextDependency = null;
- lastContextWithAllBitsObserved = null;
-
- {
- isDisallowedContextReadInDEV = false;
- }
-}
-function enterDisallowedContextReadInDEV() {
- {
- isDisallowedContextReadInDEV = true;
- }
-}
-function exitDisallowedContextReadInDEV() {
- {
- isDisallowedContextReadInDEV = false;
- }
-}
-function pushProvider(providerFiber, nextValue) {
- var context = providerFiber.type._context;
-
- {
- push(valueCursor, context._currentValue, providerFiber);
- context._currentValue = nextValue;
-
- {
- if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
- error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
- }
-
- context._currentRenderer = rendererSigil;
- }
- }
-}
-function popProvider(providerFiber) {
- var currentValue = valueCursor.current;
- pop(valueCursor, providerFiber);
- var context = providerFiber.type._context;
-
- {
- context._currentValue = currentValue;
- }
-}
-function calculateChangedBits(context, newValue, oldValue) {
- if (objectIs(oldValue, newValue)) {
- // No change
- return 0;
- } else {
- var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
-
- {
- if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
- error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
- }
- }
-
- return changedBits | 0;
- }
-}
-function scheduleWorkOnParentPath(parent, renderLanes) {
- // Update the child lanes of all the ancestors, including the alternates.
- var node = parent;
-
- while (node !== null) {
- var alternate = node.alternate;
-
- if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
- node.childLanes = mergeLanes(node.childLanes, renderLanes);
-
- if (alternate !== null) {
- alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
- }
- } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
- alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
- } else {
- // Neither alternate was updated, which means the rest of the
- // ancestor path already has sufficient priority.
- break;
- }
-
- node = node.return;
- }
-}
-function propagateContextChange(workInProgress, context, changedBits, renderLanes) {
- var fiber = workInProgress.child;
-
- if (fiber !== null) {
- // Set the return pointer of the child to the work-in-progress fiber.
- fiber.return = workInProgress;
- }
-
- while (fiber !== null) {
- var nextFiber = void 0; // Visit this fiber.
-
- var list = fiber.dependencies;
-
- if (list !== null) {
- nextFiber = fiber.child;
- var dependency = list.firstContext;
-
- while (dependency !== null) {
- // Check if the context matches.
- if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
- // Match! Schedule an update on this fiber.
- if (fiber.tag === ClassComponent) {
- // Schedule a force update on the work-in-progress.
- var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));
- update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
- // update to the current fiber, too, which means it will persist even if
- // this render is thrown away. Since it's a race condition, not sure it's
- // worth fixing.
-
- enqueueUpdate(fiber, update);
- }
-
- fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
- var alternate = fiber.alternate;
-
- if (alternate !== null) {
- alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
- }
-
- scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.
-
- list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the
- // dependency list.
-
- break;
- }
-
- dependency = dependency.next;
- }
- } else if (fiber.tag === ContextProvider) {
- // Don't scan deeper if this is a matching provider
- nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
- } else {
- // Traverse down.
- nextFiber = fiber.child;
- }
-
- if (nextFiber !== null) {
- // Set the return pointer of the child to the work-in-progress fiber.
- nextFiber.return = fiber;
- } else {
- // No child. Traverse to next sibling.
- nextFiber = fiber;
-
- while (nextFiber !== null) {
- if (nextFiber === workInProgress) {
- // We're back to the root of this subtree. Exit.
- nextFiber = null;
- break;
- }
-
- var sibling = nextFiber.sibling;
-
- if (sibling !== null) {
- // Set the return pointer of the sibling to the work-in-progress fiber.
- sibling.return = nextFiber.return;
- nextFiber = sibling;
- break;
- } // No more siblings. Traverse up.
-
-
- nextFiber = nextFiber.return;
- }
- }
-
- fiber = nextFiber;
- }
-}
-function prepareToReadContext(workInProgress, renderLanes) {
- currentlyRenderingFiber = workInProgress;
- lastContextDependency = null;
- lastContextWithAllBitsObserved = null;
- var dependencies = workInProgress.dependencies;
-
- if (dependencies !== null) {
- var firstContext = dependencies.firstContext;
-
- if (firstContext !== null) {
- if (includesSomeLane(dependencies.lanes, renderLanes)) {
- // Context list has a pending update. Mark that this fiber performed work.
- markWorkInProgressReceivedUpdate();
- } // Reset the work-in-progress list
-
-
- dependencies.firstContext = null;
- }
- }
-}
-function readContext(context, observedBits) {
- {
- // This warning would fire if you read context inside a Hook like useMemo.
- // Unlike the class check below, it's not enforced in production for perf.
- if (isDisallowedContextReadInDEV) {
- 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().');
- }
- }
-
- if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {
- var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.
-
- if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {
- // Observe all updates.
- lastContextWithAllBitsObserved = context;
- resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
- } else {
- resolvedObservedBits = observedBits;
- }
-
- var contextItem = {
- context: context,
- observedBits: resolvedObservedBits,
- next: null
- };
-
- if (lastContextDependency === null) {
- if (!(currentlyRenderingFiber !== null)) {
- {
- throw 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()." );
- }
- } // This is the first dependency for this component. Create a new list.
-
-
- lastContextDependency = contextItem;
- currentlyRenderingFiber.dependencies = {
- lanes: NoLanes,
- firstContext: contextItem,
- responders: null
- };
- } else {
- // Append a new context item.
- lastContextDependency = lastContextDependency.next = contextItem;
- }
- }
-
- return context._currentValue ;
-}
-
-var UpdateState = 0;
-var ReplaceState = 1;
-var ForceUpdate = 2;
-var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
-// It should only be read right after calling `processUpdateQueue`, via
-// `checkHasForceUpdateAfterProcessing`.
-
-var hasForceUpdate = false;
-var didWarnUpdateInsideUpdate;
-var currentlyProcessingQueue;
-
-{
- didWarnUpdateInsideUpdate = false;
- currentlyProcessingQueue = null;
-}
-
-function initializeUpdateQueue(fiber) {
- var queue = {
- baseState: fiber.memoizedState,
- firstBaseUpdate: null,
- lastBaseUpdate: null,
- shared: {
- pending: null
- },
- effects: null
- };
- fiber.updateQueue = queue;
-}
-function cloneUpdateQueue(current, workInProgress) {
- // Clone the update queue from current. Unless it's already a clone.
- var queue = workInProgress.updateQueue;
- var currentQueue = current.updateQueue;
-
- if (queue === currentQueue) {
- var clone = {
- baseState: currentQueue.baseState,
- firstBaseUpdate: currentQueue.firstBaseUpdate,
- lastBaseUpdate: currentQueue.lastBaseUpdate,
- shared: currentQueue.shared,
- effects: currentQueue.effects
- };
- workInProgress.updateQueue = clone;
- }
-}
-function createUpdate(eventTime, lane) {
- var update = {
- eventTime: eventTime,
- lane: lane,
- tag: UpdateState,
- payload: null,
- callback: null,
- next: null
- };
- return update;
-}
-function enqueueUpdate(fiber, update) {
- var updateQueue = fiber.updateQueue;
-
- if (updateQueue === null) {
- // Only occurs if the fiber has been unmounted.
- return;
- }
-
- var sharedQueue = updateQueue.shared;
- var pending = sharedQueue.pending;
-
- if (pending === null) {
- // This is the first update. Create a circular list.
- update.next = update;
- } else {
- update.next = pending.next;
- pending.next = update;
- }
-
- sharedQueue.pending = update;
-
- {
- if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
- error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
-
- didWarnUpdateInsideUpdate = true;
- }
- }
-}
-function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
- // Captured updates are updates that are thrown by a child during the render
- // phase. They should be discarded if the render is aborted. Therefore,
- // we should only put them on the work-in-progress queue, not the current one.
- var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.
-
- var current = workInProgress.alternate;
-
- if (current !== null) {
- var currentQueue = current.updateQueue;
-
- if (queue === currentQueue) {
- // The work-in-progress queue is the same as current. This happens when
- // we bail out on a parent fiber that then captures an error thrown by
- // a child. Since we want to append the update only to the work-in
- // -progress queue, we need to clone the updates. We usually clone during
- // processUpdateQueue, but that didn't happen in this case because we
- // skipped over the parent when we bailed out.
- var newFirst = null;
- var newLast = null;
- var firstBaseUpdate = queue.firstBaseUpdate;
-
- if (firstBaseUpdate !== null) {
- // Loop through the updates and clone them.
- var update = firstBaseUpdate;
-
- do {
- var clone = {
- eventTime: update.eventTime,
- lane: update.lane,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
-
- if (newLast === null) {
- newFirst = newLast = clone;
- } else {
- newLast.next = clone;
- newLast = clone;
- }
-
- update = update.next;
- } while (update !== null); // Append the captured update the end of the cloned list.
-
-
- if (newLast === null) {
- newFirst = newLast = capturedUpdate;
- } else {
- newLast.next = capturedUpdate;
- newLast = capturedUpdate;
- }
- } else {
- // There are no base updates.
- newFirst = newLast = capturedUpdate;
- }
-
- queue = {
- baseState: currentQueue.baseState,
- firstBaseUpdate: newFirst,
- lastBaseUpdate: newLast,
- shared: currentQueue.shared,
- effects: currentQueue.effects
- };
- workInProgress.updateQueue = queue;
- return;
- }
- } // Append the update to the end of the list.
-
-
- var lastBaseUpdate = queue.lastBaseUpdate;
-
- if (lastBaseUpdate === null) {
- queue.firstBaseUpdate = capturedUpdate;
- } else {
- lastBaseUpdate.next = capturedUpdate;
- }
-
- queue.lastBaseUpdate = capturedUpdate;
-}
-
-function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
- switch (update.tag) {
- case ReplaceState:
- {
- var payload = update.payload;
-
- if (typeof payload === 'function') {
- // Updater function
- {
- enterDisallowedContextReadInDEV();
- }
-
- var nextState = payload.call(instance, prevState, nextProps);
-
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- payload.call(instance, prevState, nextProps);
- } finally {
- reenableLogs();
- }
- }
-
- exitDisallowedContextReadInDEV();
- }
-
- return nextState;
- } // State object
-
-
- return payload;
- }
-
- case CaptureUpdate:
- {
- workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
- }
- // Intentional fallthrough
-
- case UpdateState:
- {
- var _payload = update.payload;
- var partialState;
-
- if (typeof _payload === 'function') {
- // Updater function
- {
- enterDisallowedContextReadInDEV();
- }
-
- partialState = _payload.call(instance, prevState, nextProps);
-
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- _payload.call(instance, prevState, nextProps);
- } finally {
- reenableLogs();
- }
- }
-
- exitDisallowedContextReadInDEV();
- }
- } else {
- // Partial state object
- partialState = _payload;
- }
-
- if (partialState === null || partialState === undefined) {
- // Null and undefined are treated as no-ops.
- return prevState;
- } // Merge the partial state and the previous state.
-
-
- return _assign({}, prevState, partialState);
- }
-
- case ForceUpdate:
- {
- hasForceUpdate = true;
- return prevState;
- }
- }
-
- return prevState;
-}
-
-function processUpdateQueue(workInProgress, props, instance, renderLanes) {
- // This is always non-null on a ClassComponent or HostRoot
- var queue = workInProgress.updateQueue;
- hasForceUpdate = false;
-
- {
- currentlyProcessingQueue = queue.shared;
- }
-
- var firstBaseUpdate = queue.firstBaseUpdate;
- var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.
-
- var pendingQueue = queue.shared.pending;
-
- if (pendingQueue !== null) {
- queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
- // and last so that it's non-circular.
-
- var lastPendingUpdate = pendingQueue;
- var firstPendingUpdate = lastPendingUpdate.next;
- lastPendingUpdate.next = null; // Append pending updates to base queue
-
- if (lastBaseUpdate === null) {
- firstBaseUpdate = firstPendingUpdate;
- } else {
- lastBaseUpdate.next = firstPendingUpdate;
- }
-
- lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
- // we need to transfer the updates to that queue, too. Because the base
- // queue is a singly-linked list with no cycles, we can append to both
- // lists and take advantage of structural sharing.
- // TODO: Pass `current` as argument
-
- var current = workInProgress.alternate;
-
- if (current !== null) {
- // This is always non-null on a ClassComponent or HostRoot
- var currentQueue = current.updateQueue;
- var currentLastBaseUpdate = currentQueue.lastBaseUpdate;
-
- if (currentLastBaseUpdate !== lastBaseUpdate) {
- if (currentLastBaseUpdate === null) {
- currentQueue.firstBaseUpdate = firstPendingUpdate;
- } else {
- currentLastBaseUpdate.next = firstPendingUpdate;
- }
-
- currentQueue.lastBaseUpdate = lastPendingUpdate;
- }
- }
- } // These values may change as we process the queue.
-
-
- if (firstBaseUpdate !== null) {
- // Iterate through the list of updates to compute the result.
- var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
- // from the original lanes.
-
- var newLanes = NoLanes;
- var newBaseState = null;
- var newFirstBaseUpdate = null;
- var newLastBaseUpdate = null;
- var update = firstBaseUpdate;
-
- do {
- var updateLane = update.lane;
- var updateEventTime = update.eventTime;
-
- if (!isSubsetOfLanes(renderLanes, updateLane)) {
- // Priority is insufficient. Skip this update. If this is the first
- // skipped update, the previous update/state is the new base
- // update/state.
- var clone = {
- eventTime: updateEventTime,
- lane: updateLane,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
-
- if (newLastBaseUpdate === null) {
- newFirstBaseUpdate = newLastBaseUpdate = clone;
- newBaseState = newState;
- } else {
- newLastBaseUpdate = newLastBaseUpdate.next = clone;
- } // Update the remaining priority in the queue.
-
-
- newLanes = mergeLanes(newLanes, updateLane);
- } else {
- // This update does have sufficient priority.
- if (newLastBaseUpdate !== null) {
- var _clone = {
- eventTime: updateEventTime,
- // This update is going to be committed so we never want uncommit
- // it. Using NoLane works because 0 is a subset of all bitmasks, so
- // this will never be skipped by the check above.
- lane: NoLane,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
- newLastBaseUpdate = newLastBaseUpdate.next = _clone;
- } // Process this update.
-
-
- newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
- var callback = update.callback;
-
- if (callback !== null) {
- workInProgress.flags |= Callback;
- var effects = queue.effects;
-
- if (effects === null) {
- queue.effects = [update];
- } else {
- effects.push(update);
- }
- }
- }
-
- update = update.next;
-
- if (update === null) {
- pendingQueue = queue.shared.pending;
-
- if (pendingQueue === null) {
- break;
- } else {
- // An update was scheduled from inside a reducer. Add the new
- // pending updates to the end of the list and keep processing.
- var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
- // unravel them when transferring them to the base queue.
-
- var _firstPendingUpdate = _lastPendingUpdate.next;
- _lastPendingUpdate.next = null;
- update = _firstPendingUpdate;
- queue.lastBaseUpdate = _lastPendingUpdate;
- queue.shared.pending = null;
- }
- }
- } while (true);
-
- if (newLastBaseUpdate === null) {
- newBaseState = newState;
- }
-
- queue.baseState = newBaseState;
- queue.firstBaseUpdate = newFirstBaseUpdate;
- queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.
- // This should be fine because the only two other things that contribute to
- // expiration time are props and context. We're already in the middle of the
- // begin phase by the time we start processing the queue, so we've already
- // dealt with the props. Context in components that specify
- // shouldComponentUpdate is tricky; but we'll have to account for
- // that regardless.
-
- markSkippedUpdateLanes(newLanes);
- workInProgress.lanes = newLanes;
- workInProgress.memoizedState = newState;
- }
-
- {
- currentlyProcessingQueue = null;
- }
-}
-
-function callCallback(callback, context) {
- if (!(typeof callback === 'function')) {
- {
- throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + callback );
- }
- }
-
- callback.call(context);
-}
-
-function resetHasForceUpdateBeforeProcessing() {
- hasForceUpdate = false;
-}
-function checkHasForceUpdateAfterProcessing() {
- return hasForceUpdate;
-}
-function commitUpdateQueue(finishedWork, finishedQueue, instance) {
- // Commit the effects
- var effects = finishedQueue.effects;
- finishedQueue.effects = null;
-
- if (effects !== null) {
- for (var i = 0; i < effects.length; i++) {
- var effect = effects[i];
- var callback = effect.callback;
-
- if (callback !== null) {
- effect.callback = null;
- callCallback(callback, instance);
- }
- }
- }
-}
-
-var fakeInternalInstance = {};
-var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
-// We'll use it to determine whether we need to initialize legacy refs.
-
-var emptyRefsObject = new React.Component().refs;
-var didWarnAboutStateAssignmentForComponent;
-var didWarnAboutUninitializedState;
-var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
-var didWarnAboutLegacyLifecyclesAndDerivedState;
-var didWarnAboutUndefinedDerivedState;
-var warnOnUndefinedDerivedState;
-var warnOnInvalidCallback;
-var didWarnAboutDirectlyAssigningPropsToState;
-var didWarnAboutContextTypeAndContextTypes;
-var didWarnAboutInvalidateContextType;
-
-{
- didWarnAboutStateAssignmentForComponent = new Set();
- didWarnAboutUninitializedState = new Set();
- didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
- didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
- didWarnAboutDirectlyAssigningPropsToState = new Set();
- didWarnAboutUndefinedDerivedState = new Set();
- didWarnAboutContextTypeAndContextTypes = new Set();
- didWarnAboutInvalidateContextType = new Set();
- var didWarnOnInvalidCallback = new Set();
-
- warnOnInvalidCallback = function (callback, callerName) {
- if (callback === null || typeof callback === 'function') {
- return;
- }
-
- var key = callerName + '_' + callback;
-
- if (!didWarnOnInvalidCallback.has(key)) {
- didWarnOnInvalidCallback.add(key);
-
- error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
- }
- };
-
- warnOnUndefinedDerivedState = function (type, partialState) {
- if (partialState === undefined) {
- var componentName = getComponentName(type) || 'Component';
-
- if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
- didWarnAboutUndefinedDerivedState.add(componentName);
-
- error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
- }
- }
- }; // This is so gross but it's at least non-critical and can be removed if
- // it causes problems. This is meant to give a nicer error message for
- // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
- // ...)) which otherwise throws a "_processChildContext is not a function"
- // exception.
-
-
- Object.defineProperty(fakeInternalInstance, '_processChildContext', {
- enumerable: false,
- value: function () {
- {
- {
- throw Error( "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)." );
- }
- }
- }
- });
- Object.freeze(fakeInternalInstance);
-}
-
-function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
- var prevState = workInProgress.memoizedState;
-
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- // Invoke the function an extra time to help detect side-effects.
- getDerivedStateFromProps(nextProps, prevState);
- } finally {
- reenableLogs();
- }
- }
- }
-
- var partialState = getDerivedStateFromProps(nextProps, prevState);
-
- {
- warnOnUndefinedDerivedState(ctor, partialState);
- } // Merge the partial state and the previous state.
-
-
- var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
- workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
- // base state.
-
- if (workInProgress.lanes === NoLanes) {
- // Queue is always non-null for classes
- var updateQueue = workInProgress.updateQueue;
- updateQueue.baseState = memoizedState;
- }
-}
-var classComponentUpdater = {
- isMounted: isMounted,
- enqueueSetState: function (inst, payload, callback) {
- var fiber = get(inst);
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- var update = createUpdate(eventTime, lane);
- update.payload = payload;
-
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'setState');
- }
-
- update.callback = callback;
- }
-
- enqueueUpdate(fiber, update);
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- },
- enqueueReplaceState: function (inst, payload, callback) {
- var fiber = get(inst);
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- var update = createUpdate(eventTime, lane);
- update.tag = ReplaceState;
- update.payload = payload;
-
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'replaceState');
- }
-
- update.callback = callback;
- }
-
- enqueueUpdate(fiber, update);
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- },
- enqueueForceUpdate: function (inst, callback) {
- var fiber = get(inst);
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- var update = createUpdate(eventTime, lane);
- update.tag = ForceUpdate;
-
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'forceUpdate');
- }
-
- update.callback = callback;
- }
-
- enqueueUpdate(fiber, update);
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- }
-};
-
-function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
- var instance = workInProgress.stateNode;
-
- if (typeof instance.shouldComponentUpdate === 'function') {
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- // Invoke the function an extra time to help detect side-effects.
- instance.shouldComponentUpdate(newProps, newState, nextContext);
- } finally {
- reenableLogs();
- }
- }
- }
-
- var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
-
- {
- if (shouldUpdate === undefined) {
- error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');
- }
- }
-
- return shouldUpdate;
- }
-
- if (ctor.prototype && ctor.prototype.isPureReactComponent) {
- return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
- }
-
- return true;
-}
-
-function checkClassInstance(workInProgress, ctor, newProps) {
- var instance = workInProgress.stateNode;
-
- {
- var name = getComponentName(ctor) || 'Component';
- var renderPresent = instance.render;
-
- if (!renderPresent) {
- if (ctor.prototype && typeof ctor.prototype.render === 'function') {
- error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
- } else {
- error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
- }
- }
-
- if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
- 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);
- }
-
- if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
- 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);
- }
-
- if (instance.propTypes) {
- error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
- }
-
- if (instance.contextType) {
- error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
- }
-
- {
- if (instance.contextTypes) {
- error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
- }
-
- if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
- didWarnAboutContextTypeAndContextTypes.add(ctor);
-
- error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
- }
- }
-
- if (typeof instance.componentShouldUpdate === 'function') {
- 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);
- }
-
- if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
- error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
- }
-
- if (typeof instance.componentDidUnmount === 'function') {
- error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
- }
-
- if (typeof instance.componentDidReceiveProps === 'function') {
- 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);
- }
-
- if (typeof instance.componentWillRecieveProps === 'function') {
- error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
- }
-
- if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
- error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
- }
-
- var hasMutatedProps = instance.props !== newProps;
-
- if (instance.props !== undefined && hasMutatedProps) {
- error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
- }
-
- if (instance.defaultProps) {
- 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);
- }
-
- if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
- didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
-
- error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
- }
-
- if (typeof instance.getDerivedStateFromProps === 'function') {
- error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
- }
-
- if (typeof instance.getDerivedStateFromError === 'function') {
- error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
- }
-
- if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
- error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
- }
-
- var _state = instance.state;
-
- if (_state && (typeof _state !== 'object' || isArray(_state))) {
- error('%s.state: must be set to an object or null', name);
- }
-
- if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
- error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
- }
- }
-}
-
-function adoptClassInstance(workInProgress, instance) {
- instance.updater = classComponentUpdater;
- workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
-
- set(instance, workInProgress);
-
- {
- instance._reactInternalInstance = fakeInternalInstance;
- }
-}
-
-function constructClassInstance(workInProgress, ctor, props) {
- var isLegacyContextConsumer = false;
- var unmaskedContext = emptyContextObject;
- var context = emptyContextObject;
- var contextType = ctor.contextType;
-
- {
- if ('contextType' in ctor) {
- var isValid = // Allow null for conditional declaration
- contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
-
- if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
- didWarnAboutInvalidateContextType.add(ctor);
- var addendum = '';
-
- if (contextType === undefined) {
- 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.';
- } else if (typeof contextType !== 'object') {
- addendum = ' However, it is set to a ' + typeof contextType + '.';
- } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
- addendum = ' Did you accidentally pass the Context.Provider instead?';
- } else if (contextType._context !== undefined) {
- // <Context.Consumer>
- addendum = ' Did you accidentally pass the Context.Consumer instead?';
- } else {
- addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
- }
-
- error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
- }
- }
- }
-
- if (typeof contextType === 'object' && contextType !== null) {
- context = readContext(contextType);
- } else {
- unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- var contextTypes = ctor.contextTypes;
- isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
- context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
- } // Instantiate twice to help detect side-effects.
-
-
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- new ctor(props, context); // eslint-disable-line no-new
- } finally {
- reenableLogs();
- }
- }
- }
-
- var instance = new ctor(props, context);
- var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
- adoptClassInstance(workInProgress, instance);
-
- {
- if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
- var componentName = getComponentName(ctor) || 'Component';
-
- if (!didWarnAboutUninitializedState.has(componentName)) {
- didWarnAboutUninitializedState.add(componentName);
-
- 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);
- }
- } // If new component APIs are defined, "unsafe" lifecycles won't be called.
- // Warn about these lifecycles if they are present.
- // Don't warn about react-lifecycles-compat polyfilled methods though.
-
-
- if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
- var foundWillMountName = null;
- var foundWillReceivePropsName = null;
- var foundWillUpdateName = null;
-
- if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
- foundWillMountName = 'componentWillMount';
- } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
- foundWillMountName = 'UNSAFE_componentWillMount';
- }
-
- if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
- foundWillReceivePropsName = 'componentWillReceiveProps';
- } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
- }
-
- if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
- foundWillUpdateName = 'componentWillUpdate';
- } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
- foundWillUpdateName = 'UNSAFE_componentWillUpdate';
- }
-
- if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
- var _componentName = getComponentName(ctor) || 'Component';
-
- var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
-
- if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
- didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
-
- 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 : '');
- }
- }
- }
- } // Cache unmasked context so we can avoid recreating masked context unless necessary.
- // ReactFiberContext usually updates this cache but can't for newly-created instances.
-
-
- if (isLegacyContextConsumer) {
- cacheContext(workInProgress, unmaskedContext, context);
- }
-
- return instance;
-}
-
-function callComponentWillMount(workInProgress, instance) {
- var oldState = instance.state;
-
- if (typeof instance.componentWillMount === 'function') {
- instance.componentWillMount();
- }
-
- if (typeof instance.UNSAFE_componentWillMount === 'function') {
- instance.UNSAFE_componentWillMount();
- }
-
- if (oldState !== instance.state) {
- {
- error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
- }
-
- classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
- }
-}
-
-function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
- var oldState = instance.state;
-
- if (typeof instance.componentWillReceiveProps === 'function') {
- instance.componentWillReceiveProps(newProps, nextContext);
- }
-
- if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
- }
-
- if (instance.state !== oldState) {
- {
- var componentName = getComponentName(workInProgress.type) || 'Component';
-
- if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
- didWarnAboutStateAssignmentForComponent.add(componentName);
-
- error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
- }
- }
-
- classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
- }
-} // Invokes the mount life-cycles on a previously never rendered instance.
-
-
-function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
- {
- checkClassInstance(workInProgress, ctor, newProps);
- }
-
- var instance = workInProgress.stateNode;
- instance.props = newProps;
- instance.state = workInProgress.memoizedState;
- instance.refs = emptyRefsObject;
- initializeUpdateQueue(workInProgress);
- var contextType = ctor.contextType;
-
- if (typeof contextType === 'object' && contextType !== null) {
- instance.context = readContext(contextType);
- } else {
- var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- instance.context = getMaskedContext(workInProgress, unmaskedContext);
- }
-
- {
- if (instance.state === newProps) {
- var componentName = getComponentName(ctor) || 'Component';
-
- if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
- didWarnAboutDirectlyAssigningPropsToState.add(componentName);
-
- 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);
- }
- }
-
- if (workInProgress.mode & StrictMode) {
- ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
- }
-
- {
- ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
- }
- }
-
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
- instance.state = workInProgress.memoizedState;
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
-
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- instance.state = workInProgress.memoizedState;
- } // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
-
-
- if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
- callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
- // process them now.
-
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
- instance.state = workInProgress.memoizedState;
- }
-
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.flags |= Update;
- }
-}
-
-function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
- var instance = workInProgress.stateNode;
- var oldProps = workInProgress.memoizedProps;
- instance.props = oldProps;
- var oldContext = instance.context;
- var contextType = ctor.contextType;
- var nextContext = emptyContextObject;
-
- if (typeof contextType === 'object' && contextType !== null) {
- nextContext = readContext(contextType);
- } else {
- var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
- }
-
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
- var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
- // ever the previously attempted to render - not the "current". However,
- // during componentDidUpdate we pass the "current" props.
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
-
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
- if (oldProps !== newProps || oldContext !== nextContext) {
- callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
- }
- }
-
- resetHasForceUpdateBeforeProcessing();
- var oldState = workInProgress.memoizedState;
- var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
- newState = workInProgress.memoizedState;
-
- if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.flags |= Update;
- }
-
- return false;
- }
-
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- newState = workInProgress.memoizedState;
- }
-
- var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
-
- if (shouldUpdate) {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
- if (typeof instance.componentWillMount === 'function') {
- instance.componentWillMount();
- }
-
- if (typeof instance.UNSAFE_componentWillMount === 'function') {
- instance.UNSAFE_componentWillMount();
- }
- }
-
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.flags |= Update;
- }
- } else {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.flags |= Update;
- } // If shouldComponentUpdate returned false, we should still update the
- // memoized state to indicate that this work can be reused.
-
-
- workInProgress.memoizedProps = newProps;
- workInProgress.memoizedState = newState;
- } // Update the existing instance's state, props, and context pointers even
- // if shouldComponentUpdate returns false.
-
-
- instance.props = newProps;
- instance.state = newState;
- instance.context = nextContext;
- return shouldUpdate;
-} // Invokes the update life-cycles and returns false if it shouldn't rerender.
-
-
-function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {
- var instance = workInProgress.stateNode;
- cloneUpdateQueue(current, workInProgress);
- var unresolvedOldProps = workInProgress.memoizedProps;
- var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
- instance.props = oldProps;
- var unresolvedNewProps = workInProgress.pendingProps;
- var oldContext = instance.context;
- var contextType = ctor.contextType;
- var nextContext = emptyContextObject;
-
- if (typeof contextType === 'object' && contextType !== null) {
- nextContext = readContext(contextType);
- } else {
- var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
- }
-
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
- var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
- // ever the previously attempted to render - not the "current". However,
- // during componentDidUpdate we pass the "current" props.
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
-
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
- if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
- callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
- }
- }
-
- resetHasForceUpdateBeforeProcessing();
- var oldState = workInProgress.memoizedState;
- var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
- newState = workInProgress.memoizedState;
-
- if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidUpdate === 'function') {
- if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.flags |= Update;
- }
- }
-
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.flags |= Snapshot;
- }
- }
-
- return false;
- }
-
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- newState = workInProgress.memoizedState;
- }
-
- var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
-
- if (shouldUpdate) {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
- if (typeof instance.componentWillUpdate === 'function') {
- instance.componentWillUpdate(newProps, newState, nextContext);
- }
-
- if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
- instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
- }
- }
-
- if (typeof instance.componentDidUpdate === 'function') {
- workInProgress.flags |= Update;
- }
-
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- workInProgress.flags |= Snapshot;
- }
- } else {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidUpdate === 'function') {
- if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.flags |= Update;
- }
- }
-
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.flags |= Snapshot;
- }
- } // If shouldComponentUpdate returned false, we should still update the
- // memoized props/state to indicate that this work can be reused.
-
-
- workInProgress.memoizedProps = newProps;
- workInProgress.memoizedState = newState;
- } // Update the existing instance's state, props, and context pointers even
- // if shouldComponentUpdate returns false.
-
-
- instance.props = newProps;
- instance.state = newState;
- instance.context = nextContext;
- return shouldUpdate;
-}
-
-var didWarnAboutMaps;
-var didWarnAboutGenerators;
-var didWarnAboutStringRefs;
-var ownerHasKeyUseWarning;
-var ownerHasFunctionTypeWarning;
-
-var warnForMissingKey = function (child, returnFiber) {};
-
-{
- didWarnAboutMaps = false;
- didWarnAboutGenerators = false;
- didWarnAboutStringRefs = {};
- /**
- * Warn if there's no key explicitly set on dynamic arrays of children or
- * object keys are not valid. This allows us to keep track of children between
- * updates.
- */
-
- ownerHasKeyUseWarning = {};
- ownerHasFunctionTypeWarning = {};
-
- warnForMissingKey = function (child, returnFiber) {
- if (child === null || typeof child !== 'object') {
- return;
- }
-
- if (!child._store || child._store.validated || child.key != null) {
- return;
- }
-
- if (!(typeof child._store === 'object')) {
- {
- throw Error( "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- child._store.validated = true;
- var componentName = getComponentName(returnFiber.type) || 'Component';
-
- if (ownerHasKeyUseWarning[componentName]) {
- return;
- }
-
- ownerHasKeyUseWarning[componentName] = true;
-
- error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
- };
-}
-
-var isArray$1 = Array.isArray;
-
-function coerceRef(returnFiber, current, element) {
- var mixedRef = element.ref;
-
- if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
- {
- // TODO: Clean this up once we turn on the string ref warning for
- // everyone, because the strict mode case will no longer be relevant
- if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
- // because these cannot be automatically converted to an arrow function
- // using a codemod. Therefore, we don't have to warn about string refs again.
- !(element._owner && element._self && element._owner.stateNode !== element._self)) {
- var componentName = getComponentName(returnFiber.type) || 'Component';
-
- if (!didWarnAboutStringRefs[componentName]) {
- {
- error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);
- }
-
- didWarnAboutStringRefs[componentName] = true;
- }
- }
- }
-
- if (element._owner) {
- var owner = element._owner;
- var inst;
-
- if (owner) {
- var ownerFiber = owner;
-
- if (!(ownerFiber.tag === ClassComponent)) {
- {
- throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref" );
- }
- }
-
- inst = ownerFiber.stateNode;
- }
-
- if (!inst) {
- {
- throw Error( "Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref
-
- if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
- return current.ref;
- }
-
- var ref = function (value) {
- var refs = inst.refs;
-
- if (refs === emptyRefsObject) {
- // This is a lazy pooled frozen object, so we need to initialize.
- refs = inst.refs = {};
- }
-
- if (value === null) {
- delete refs[stringRef];
- } else {
- refs[stringRef] = value;
- }
- };
-
- ref._stringRef = stringRef;
- return ref;
- } else {
- if (!(typeof mixedRef === 'string')) {
- {
- throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." );
- }
- }
-
- if (!element._owner) {
- {
- throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." );
- }
- }
- }
- }
-
- return mixedRef;
-}
-
-function throwOnInvalidObjectType(returnFiber, newChild) {
- if (returnFiber.type !== 'textarea') {
- {
- {
- throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + "). If you meant to render a collection of children, use an array instead." );
- }
- }
- }
-}
-
-function warnOnFunctionType(returnFiber) {
- {
- var componentName = getComponentName(returnFiber.type) || 'Component';
-
- if (ownerHasFunctionTypeWarning[componentName]) {
- return;
- }
-
- ownerHasFunctionTypeWarning[componentName] = true;
-
- 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.');
- }
-} // We avoid inlining this to avoid potential deopts from using try/catch.
-// to be able to optimize each path individually by branching early. This needs
-// a compiler or we can do it manually. Helpers that don't need this branching
-// live outside of this function.
-
-
-function ChildReconciler(shouldTrackSideEffects) {
- function deleteChild(returnFiber, childToDelete) {
- if (!shouldTrackSideEffects) {
- // Noop.
- return;
- } // Deletions are added in reversed order so we add it to the front.
- // At this point, the return fiber's effect list is empty except for
- // deletions, so we can just append the deletion to the list. The remaining
- // effects aren't added until the complete phase. Once we implement
- // resuming, this may not be true.
-
-
- var last = returnFiber.lastEffect;
-
- if (last !== null) {
- last.nextEffect = childToDelete;
- returnFiber.lastEffect = childToDelete;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
- }
-
- childToDelete.nextEffect = null;
- childToDelete.flags = Deletion;
- }
-
- function deleteRemainingChildren(returnFiber, currentFirstChild) {
- if (!shouldTrackSideEffects) {
- // Noop.
- return null;
- } // TODO: For the shouldClone case, this could be micro-optimized a bit by
- // assuming that after the first child we've already added everything.
-
-
- var childToDelete = currentFirstChild;
-
- while (childToDelete !== null) {
- deleteChild(returnFiber, childToDelete);
- childToDelete = childToDelete.sibling;
- }
-
- return null;
- }
-
- function mapRemainingChildren(returnFiber, currentFirstChild) {
- // Add the remaining children to a temporary map so that we can find them by
- // keys quickly. Implicit (null) keys get added to this set with their index
- // instead.
- var existingChildren = new Map();
- var existingChild = currentFirstChild;
-
- while (existingChild !== null) {
- if (existingChild.key !== null) {
- existingChildren.set(existingChild.key, existingChild);
- } else {
- existingChildren.set(existingChild.index, existingChild);
- }
-
- existingChild = existingChild.sibling;
- }
-
- return existingChildren;
- }
-
- function useFiber(fiber, pendingProps) {
- // We currently set sibling to null and index to 0 here because it is easy
- // to forget to do before returning it. E.g. for the single child case.
- var clone = createWorkInProgress(fiber, pendingProps);
- clone.index = 0;
- clone.sibling = null;
- return clone;
- }
-
- function placeChild(newFiber, lastPlacedIndex, newIndex) {
- newFiber.index = newIndex;
-
- if (!shouldTrackSideEffects) {
- // Noop.
- return lastPlacedIndex;
- }
-
- var current = newFiber.alternate;
-
- if (current !== null) {
- var oldIndex = current.index;
-
- if (oldIndex < lastPlacedIndex) {
- // This is a move.
- newFiber.flags = Placement;
- return lastPlacedIndex;
- } else {
- // This item can stay in place.
- return oldIndex;
- }
- } else {
- // This is an insertion.
- newFiber.flags = Placement;
- return lastPlacedIndex;
- }
- }
-
- function placeSingleChild(newFiber) {
- // This is simpler for the single child case. We only need to do a
- // placement for inserting new children.
- if (shouldTrackSideEffects && newFiber.alternate === null) {
- newFiber.flags = Placement;
- }
-
- return newFiber;
- }
-
- function updateTextNode(returnFiber, current, textContent, lanes) {
- if (current === null || current.tag !== HostText) {
- // Insert
- var created = createFiberFromText(textContent, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, textContent);
- existing.return = returnFiber;
- return existing;
- }
- }
-
- function updateElement(returnFiber, current, element, lanes) {
- if (current !== null) {
- if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
- isCompatibleFamilyForHotReloading(current, element) )) {
- // Move based on index
- var existing = useFiber(current, element.props);
- existing.ref = coerceRef(returnFiber, current, element);
- existing.return = returnFiber;
-
- {
- existing._debugSource = element._source;
- existing._debugOwner = element._owner;
- }
-
- return existing;
- }
- } // Insert
-
-
- var created = createFiberFromElement(element, returnFiber.mode, lanes);
- created.ref = coerceRef(returnFiber, current, element);
- created.return = returnFiber;
- return created;
- }
-
- function updatePortal(returnFiber, current, portal, lanes) {
- if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
- // Insert
- var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, portal.children || []);
- existing.return = returnFiber;
- return existing;
- }
- }
-
- function updateFragment(returnFiber, current, fragment, lanes, key) {
- if (current === null || current.tag !== Fragment) {
- // Insert
- var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, fragment);
- existing.return = returnFiber;
- return existing;
- }
- }
-
- function createChild(returnFiber, newChild, lanes) {
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys. If the previous node is implicitly keyed
- // we can continue to replace it without aborting even if it is not a text
- // node.
- var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- }
-
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);
-
- _created.ref = coerceRef(returnFiber, null, newChild);
- _created.return = returnFiber;
- return _created;
- }
-
- case REACT_PORTAL_TYPE:
- {
- var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);
-
- _created2.return = returnFiber;
- return _created2;
- }
- }
-
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);
-
- _created3.return = returnFiber;
- return _created3;
- }
-
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType(returnFiber);
- }
- }
-
- return null;
- }
-
- function updateSlot(returnFiber, oldFiber, newChild, lanes) {
- // Update the fiber if the keys match, otherwise return null.
- var key = oldFiber !== null ? oldFiber.key : null;
-
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys. If the previous node is implicitly keyed
- // we can continue to replace it without aborting even if it is not a text
- // node.
- if (key !== null) {
- return null;
- }
-
- return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);
- }
-
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- if (newChild.key === key) {
- if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);
- }
-
- return updateElement(returnFiber, oldFiber, newChild, lanes);
- } else {
- return null;
- }
- }
-
- case REACT_PORTAL_TYPE:
- {
- if (newChild.key === key) {
- return updatePortal(returnFiber, oldFiber, newChild, lanes);
- } else {
- return null;
- }
- }
- }
-
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- if (key !== null) {
- return null;
- }
-
- return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
- }
-
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType(returnFiber);
- }
- }
-
- return null;
- }
-
- function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys, so we neither have to check the old nor
- // new node for the key. If both are text nodes, they match.
- var matchedFiber = existingChildren.get(newIdx) || null;
- return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);
- }
-
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
-
- if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);
- }
-
- return updateElement(returnFiber, _matchedFiber, newChild, lanes);
- }
-
- case REACT_PORTAL_TYPE:
- {
- var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
-
- return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
- }
-
- }
-
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- var _matchedFiber3 = existingChildren.get(newIdx) || null;
-
- return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
- }
-
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType(returnFiber);
- }
- }
-
- return null;
- }
- /**
- * Warns if there is a duplicate or missing key
- */
-
-
- function warnOnInvalidKey(child, knownKeys, returnFiber) {
- {
- if (typeof child !== 'object' || child === null) {
- return knownKeys;
- }
-
- switch (child.$$typeof) {
- case REACT_ELEMENT_TYPE:
- case REACT_PORTAL_TYPE:
- warnForMissingKey(child, returnFiber);
- var key = child.key;
-
- if (typeof key !== 'string') {
- break;
- }
-
- if (knownKeys === null) {
- knownKeys = new Set();
- knownKeys.add(key);
- break;
- }
-
- if (!knownKeys.has(key)) {
- knownKeys.add(key);
- break;
- }
-
- error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
-
- break;
- }
- }
-
- return knownKeys;
- }
-
- function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
- // This algorithm can't optimize by searching from both ends since we
- // don't have backpointers on fibers. I'm trying to see how far we can get
- // with that model. If it ends up not being worth the tradeoffs, we can
- // add it later.
- // Even with a two ended optimization, we'd want to optimize for the case
- // where there are few changes and brute force the comparison instead of
- // going for the Map. It'd like to explore hitting that path first in
- // forward-only mode and only go for the Map once we notice that we need
- // lots of look ahead. This doesn't handle reversal as well as two ended
- // search but that's unusual. Besides, for the two ended optimization to
- // work on Iterables, we'd need to copy the whole set.
- // In this first iteration, we'll just live with hitting the bad case
- // (adding everything to a Map) in for every insert/move.
- // If you change this code, also update reconcileChildrenIterator() which
- // uses the same algorithm.
- {
- // First, validate keys.
- var knownKeys = null;
-
- for (var i = 0; i < newChildren.length; i++) {
- var child = newChildren[i];
- knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
- }
- }
-
- var resultingFirstChild = null;
- var previousNewFiber = null;
- var oldFiber = currentFirstChild;
- var lastPlacedIndex = 0;
- var newIdx = 0;
- var nextOldFiber = null;
-
- for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
- if (oldFiber.index > newIdx) {
- nextOldFiber = oldFiber;
- oldFiber = null;
- } else {
- nextOldFiber = oldFiber.sibling;
- }
-
- var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
-
- if (newFiber === null) {
- // TODO: This breaks on empty slots like null children. That's
- // unfortunate because it triggers the slow path all the time. We need
- // a better way to communicate whether this was a miss or null,
- // boolean, undefined, etc.
- if (oldFiber === null) {
- oldFiber = nextOldFiber;
- }
-
- break;
- }
-
- if (shouldTrackSideEffects) {
- if (oldFiber && newFiber.alternate === null) {
- // We matched the slot, but we didn't reuse the existing fiber, so we
- // need to delete the existing child.
- deleteChild(returnFiber, oldFiber);
- }
- }
-
- lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = newFiber;
- } else {
- // TODO: Defer siblings if we're not at the right index for this slot.
- // I.e. if we had null values before, then we want to defer this
- // for each null value. However, we also don't want to call updateSlot
- // with the previous one.
- previousNewFiber.sibling = newFiber;
- }
-
- previousNewFiber = newFiber;
- oldFiber = nextOldFiber;
- }
-
- if (newIdx === newChildren.length) {
- // We've reached the end of the new children. We can delete the rest.
- deleteRemainingChildren(returnFiber, oldFiber);
- return resultingFirstChild;
- }
-
- if (oldFiber === null) {
- // If we don't have any more existing children we can choose a fast path
- // since the rest will all be insertions.
- for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);
-
- if (_newFiber === null) {
- continue;
- }
-
- lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = _newFiber;
- } else {
- previousNewFiber.sibling = _newFiber;
- }
-
- previousNewFiber = _newFiber;
- }
-
- return resultingFirstChild;
- } // Add all children to a key map for quick lookups.
-
-
- var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
-
- for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);
-
- if (_newFiber2 !== null) {
- if (shouldTrackSideEffects) {
- if (_newFiber2.alternate !== null) {
- // The new fiber is a work in progress, but if there exists a
- // current, that means that we reused the fiber. We need to delete
- // it from the child list so that we don't add it to the deletion
- // list.
- existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
- }
- }
-
- lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- resultingFirstChild = _newFiber2;
- } else {
- previousNewFiber.sibling = _newFiber2;
- }
-
- previousNewFiber = _newFiber2;
- }
- }
-
- if (shouldTrackSideEffects) {
- // Any existing children that weren't consumed above were deleted. We need
- // to add them to the deletion list.
- existingChildren.forEach(function (child) {
- return deleteChild(returnFiber, child);
- });
- }
-
- return resultingFirstChild;
- }
-
- function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
- // This is the same implementation as reconcileChildrenArray(),
- // but using the iterator instead.
- var iteratorFn = getIteratorFn(newChildrenIterable);
-
- if (!(typeof iteratorFn === 'function')) {
- {
- throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- {
- // We don't support rendering Generators because it's a mutation.
- // See https://github.com/facebook/react/issues/12995
- if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
- newChildrenIterable[Symbol.toStringTag] === 'Generator') {
- if (!didWarnAboutGenerators) {
- 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.');
- }
-
- didWarnAboutGenerators = true;
- } // Warn about using Maps as children
-
-
- if (newChildrenIterable.entries === iteratorFn) {
- if (!didWarnAboutMaps) {
- error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
- }
-
- didWarnAboutMaps = true;
- } // First, validate keys.
- // We'll get a different iterator later for the main pass.
-
-
- var _newChildren = iteratorFn.call(newChildrenIterable);
-
- if (_newChildren) {
- var knownKeys = null;
-
- var _step = _newChildren.next();
-
- for (; !_step.done; _step = _newChildren.next()) {
- var child = _step.value;
- knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
- }
- }
- }
-
- var newChildren = iteratorFn.call(newChildrenIterable);
-
- if (!(newChildren != null)) {
- {
- throw Error( "An iterable object provided no iterator." );
- }
- }
-
- var resultingFirstChild = null;
- var previousNewFiber = null;
- var oldFiber = currentFirstChild;
- var lastPlacedIndex = 0;
- var newIdx = 0;
- var nextOldFiber = null;
- var step = newChildren.next();
-
- for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
- if (oldFiber.index > newIdx) {
- nextOldFiber = oldFiber;
- oldFiber = null;
- } else {
- nextOldFiber = oldFiber.sibling;
- }
-
- var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
-
- if (newFiber === null) {
- // TODO: This breaks on empty slots like null children. That's
- // unfortunate because it triggers the slow path all the time. We need
- // a better way to communicate whether this was a miss or null,
- // boolean, undefined, etc.
- if (oldFiber === null) {
- oldFiber = nextOldFiber;
- }
-
- break;
- }
-
- if (shouldTrackSideEffects) {
- if (oldFiber && newFiber.alternate === null) {
- // We matched the slot, but we didn't reuse the existing fiber, so we
- // need to delete the existing child.
- deleteChild(returnFiber, oldFiber);
- }
- }
-
- lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = newFiber;
- } else {
- // TODO: Defer siblings if we're not at the right index for this slot.
- // I.e. if we had null values before, then we want to defer this
- // for each null value. However, we also don't want to call updateSlot
- // with the previous one.
- previousNewFiber.sibling = newFiber;
- }
-
- previousNewFiber = newFiber;
- oldFiber = nextOldFiber;
- }
-
- if (step.done) {
- // We've reached the end of the new children. We can delete the rest.
- deleteRemainingChildren(returnFiber, oldFiber);
- return resultingFirstChild;
- }
-
- if (oldFiber === null) {
- // If we don't have any more existing children we can choose a fast path
- // since the rest will all be insertions.
- for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber3 = createChild(returnFiber, step.value, lanes);
-
- if (_newFiber3 === null) {
- continue;
- }
-
- lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = _newFiber3;
- } else {
- previousNewFiber.sibling = _newFiber3;
- }
-
- previousNewFiber = _newFiber3;
- }
-
- return resultingFirstChild;
- } // Add all children to a key map for quick lookups.
-
-
- var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
-
- for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);
-
- if (_newFiber4 !== null) {
- if (shouldTrackSideEffects) {
- if (_newFiber4.alternate !== null) {
- // The new fiber is a work in progress, but if there exists a
- // current, that means that we reused the fiber. We need to delete
- // it from the child list so that we don't add it to the deletion
- // list.
- existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
- }
- }
-
- lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- resultingFirstChild = _newFiber4;
- } else {
- previousNewFiber.sibling = _newFiber4;
- }
-
- previousNewFiber = _newFiber4;
- }
- }
-
- if (shouldTrackSideEffects) {
- // Any existing children that weren't consumed above were deleted. We need
- // to add them to the deletion list.
- existingChildren.forEach(function (child) {
- return deleteChild(returnFiber, child);
- });
- }
-
- return resultingFirstChild;
- }
-
- function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
- // There's no need to check for keys on text nodes since we don't have a
- // way to define them.
- if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
- // We already have an existing node so let's just update it and delete
- // the rest.
- deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
- var existing = useFiber(currentFirstChild, textContent);
- existing.return = returnFiber;
- return existing;
- } // The existing first child is not a text node so we need to create one
- // and delete the existing ones.
-
-
- deleteRemainingChildren(returnFiber, currentFirstChild);
- var created = createFiberFromText(textContent, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- }
-
- function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
- var key = element.key;
- var child = currentFirstChild;
-
- while (child !== null) {
- // TODO: If key === null and child.key === null, then this only applies to
- // the first item in the list.
- if (child.key === key) {
- switch (child.tag) {
- case Fragment:
- {
- if (element.type === REACT_FRAGMENT_TYPE) {
- deleteRemainingChildren(returnFiber, child.sibling);
- var existing = useFiber(child, element.props.children);
- existing.return = returnFiber;
-
- {
- existing._debugSource = element._source;
- existing._debugOwner = element._owner;
- }
-
- return existing;
- }
-
- break;
- }
-
- case Block:
-
- // We intentionally fallthrough here if enableBlocksAPI is not on.
- // eslint-disable-next-lined no-fallthrough
-
- default:
- {
- if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
- isCompatibleFamilyForHotReloading(child, element) )) {
- deleteRemainingChildren(returnFiber, child.sibling);
-
- var _existing3 = useFiber(child, element.props);
-
- _existing3.ref = coerceRef(returnFiber, child, element);
- _existing3.return = returnFiber;
-
- {
- _existing3._debugSource = element._source;
- _existing3._debugOwner = element._owner;
- }
-
- return _existing3;
- }
-
- break;
- }
- } // Didn't match.
-
-
- deleteRemainingChildren(returnFiber, child);
- break;
- } else {
- deleteChild(returnFiber, child);
- }
-
- child = child.sibling;
- }
-
- if (element.type === REACT_FRAGMENT_TYPE) {
- var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
- created.return = returnFiber;
- return created;
- } else {
- var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);
-
- _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
- _created4.return = returnFiber;
- return _created4;
- }
- }
-
- function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
- var key = portal.key;
- var child = currentFirstChild;
-
- while (child !== null) {
- // TODO: If key === null and child.key === null, then this only applies to
- // the first item in the list.
- if (child.key === key) {
- if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
- deleteRemainingChildren(returnFiber, child.sibling);
- var existing = useFiber(child, portal.children || []);
- existing.return = returnFiber;
- return existing;
- } else {
- deleteRemainingChildren(returnFiber, child);
- break;
- }
- } else {
- deleteChild(returnFiber, child);
- }
-
- child = child.sibling;
- }
-
- var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- } // This API will tag the children with the side-effect of the reconciliation
- // itself. They will be added to the side-effect list as we pass through the
- // children and the parent.
-
-
- function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
- // This function is not recursive.
- // If the top level item is an array, we treat it as a set of children,
- // not as a fragment. Nested arrays on the other hand will be treated as
- // fragment nodes. Recursion happens at the normal flow.
- // Handle top level unkeyed fragments as if they were arrays.
- // This leads to an ambiguity between <>{[...]}</> and <>...</>.
- // We treat the ambiguous cases above the same.
- var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
-
- if (isUnkeyedTopLevelFragment) {
- newChild = newChild.props.children;
- } // Handle object types
-
-
- var isObject = typeof newChild === 'object' && newChild !== null;
-
- if (isObject) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));
-
- case REACT_PORTAL_TYPE:
- return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
-
- }
- }
-
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
- }
-
- if (isArray$1(newChild)) {
- return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
- }
-
- if (getIteratorFn(newChild)) {
- return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
- }
-
- if (isObject) {
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType(returnFiber);
- }
- }
-
- if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
- // If the new child is undefined, and the return fiber is a composite
- // component, throw an error. If Fiber return types are disabled,
- // we already threw above.
- switch (returnFiber.tag) {
- case ClassComponent:
- {
- {
- var instance = returnFiber.stateNode;
-
- if (instance.render._isMockFunction) {
- // We allow auto-mocks to proceed as if they're returning null.
- break;
- }
- }
- }
- // Intentionally fall through to the next case, which handles both
- // functions and classes
- // eslint-disable-next-lined no-fallthrough
-
- case Block:
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- {
- {
- {
- throw Error( (getComponentName(returnFiber.type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
- }
- }
- }
- }
- } // Remaining cases are all treated as empty.
-
-
- return deleteRemainingChildren(returnFiber, currentFirstChild);
- }
-
- return reconcileChildFibers;
-}
-
-var reconcileChildFibers = ChildReconciler(true);
-var mountChildFibers = ChildReconciler(false);
-function cloneChildFibers(current, workInProgress) {
- if (!(current === null || workInProgress.child === current.child)) {
- {
- throw Error( "Resuming work not yet implemented." );
- }
- }
-
- if (workInProgress.child === null) {
- return;
- }
-
- var currentChild = workInProgress.child;
- var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
- workInProgress.child = newChild;
- newChild.return = workInProgress;
-
- while (currentChild.sibling !== null) {
- currentChild = currentChild.sibling;
- newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
- newChild.return = workInProgress;
- }
-
- newChild.sibling = null;
-} // Reset a workInProgress child set to prepare it for a second pass.
-
-function resetChildFibers(workInProgress, lanes) {
- var child = workInProgress.child;
-
- while (child !== null) {
- resetWorkInProgress(child, lanes);
- child = child.sibling;
- }
-}
-
-var NO_CONTEXT = {};
-var contextStackCursor$1 = createCursor(NO_CONTEXT);
-var contextFiberStackCursor = createCursor(NO_CONTEXT);
-var rootInstanceStackCursor = createCursor(NO_CONTEXT);
-
-function requiredContext(c) {
- if (!(c !== NO_CONTEXT)) {
- {
- throw Error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- return c;
-}
-
-function getRootHostContainer() {
- var rootInstance = requiredContext(rootInstanceStackCursor.current);
- return rootInstance;
-}
-
-function pushHostContainer(fiber, nextRootInstance) {
- // Push current root instance onto the stack;
- // This allows us to reset root when portals are popped.
- push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
- // This enables us to pop only Fibers that provide unique contexts.
-
- push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.
- // However, we can't just call getRootHostContext() and push it because
- // we'd have a different number of entries on the stack depending on
- // whether getRootHostContext() throws somewhere in renderer code or not.
- // So we push an empty value first. This lets us safely unwind on errors.
-
- push(contextStackCursor$1, NO_CONTEXT, fiber);
- var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.
-
- pop(contextStackCursor$1, fiber);
- push(contextStackCursor$1, nextRootContext, fiber);
-}
-
-function popHostContainer(fiber) {
- pop(contextStackCursor$1, fiber);
- pop(contextFiberStackCursor, fiber);
- pop(rootInstanceStackCursor, fiber);
-}
-
-function getHostContext() {
- var context = requiredContext(contextStackCursor$1.current);
- return context;
-}
-
-function pushHostContext(fiber) {
- var rootInstance = requiredContext(rootInstanceStackCursor.current);
- var context = requiredContext(contextStackCursor$1.current);
- var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
-
- if (context === nextContext) {
- return;
- } // Track the context and the Fiber that provided it.
- // This enables us to pop only Fibers that provide unique contexts.
-
-
- push(contextFiberStackCursor, fiber, fiber);
- push(contextStackCursor$1, nextContext, fiber);
-}
-
-function popHostContext(fiber) {
- // Do not pop unless this Fiber provided the current context.
- // pushHostContext() only pushes Fibers that provide unique contexts.
- if (contextFiberStackCursor.current !== fiber) {
- return;
- }
-
- pop(contextStackCursor$1, fiber);
- pop(contextFiberStackCursor, fiber);
-}
-
-var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is
-// inherited deeply down the subtree. The upper bits only affect
-// this immediate suspense boundary and gets reset each new
-// boundary or suspense list.
-
-var SubtreeSuspenseContextMask = 1; // Subtree Flags:
-// InvisibleParentSuspenseContext indicates that one of our parent Suspense
-// boundaries is not currently showing visible main content.
-// Either because it is already showing a fallback or is not mounted at all.
-// We can use this to determine if it is desirable to trigger a fallback at
-// the parent. If not, then we might need to trigger undesirable boundaries
-// and/or suspend the commit to avoid hiding the parent content.
-
-var InvisibleParentSuspenseContext = 1; // Shallow Flags:
-// ForceSuspenseFallback can be used by SuspenseList to force newly added
-// items into their fallback state during one of the render passes.
-
-var ForceSuspenseFallback = 2;
-var suspenseStackCursor = createCursor(DefaultSuspenseContext);
-function hasSuspenseContext(parentContext, flag) {
- return (parentContext & flag) !== 0;
-}
-function setDefaultShallowSuspenseContext(parentContext) {
- return parentContext & SubtreeSuspenseContextMask;
-}
-function setShallowSuspenseContext(parentContext, shallowContext) {
- return parentContext & SubtreeSuspenseContextMask | shallowContext;
-}
-function addSubtreeSuspenseContext(parentContext, subtreeContext) {
- return parentContext | subtreeContext;
-}
-function pushSuspenseContext(fiber, newContext) {
- push(suspenseStackCursor, newContext, fiber);
-}
-function popSuspenseContext(fiber) {
- pop(suspenseStackCursor, fiber);
-}
-
-function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
- // If it was the primary children that just suspended, capture and render the
- // fallback. Otherwise, don't capture and bubble to the next boundary.
- var nextState = workInProgress.memoizedState;
-
- if (nextState !== null) {
- if (nextState.dehydrated !== null) {
- // A dehydrated boundary always captures.
- return true;
- }
-
- return false;
- }
-
- var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.
-
- if (props.fallback === undefined) {
- return false;
- } // Regular boundaries always capture.
-
-
- if (props.unstable_avoidThisFallback !== true) {
- return true;
- } // If it's a boundary we should avoid, then we prefer to bubble up to the
- // parent boundary if it is currently invisible.
-
-
- if (hasInvisibleParent) {
- return false;
- } // If the parent is not able to handle it, we must handle it.
-
-
- return true;
-}
-function findFirstSuspended(row) {
- var node = row;
-
- while (node !== null) {
- if (node.tag === SuspenseComponent) {
- var state = node.memoizedState;
-
- if (state !== null) {
- var dehydrated = state.dehydrated;
-
- if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
- return node;
- }
- }
- } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
- // keep track of whether it suspended or not.
- node.memoizedProps.revealOrder !== undefined) {
- var didSuspend = (node.flags & DidCapture) !== NoFlags;
-
- if (didSuspend) {
- return node;
- }
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === row) {
- return null;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === row) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
-
- return null;
-}
-
-var NoFlags$1 =
-/* */
-0; // Represents whether effect should fire.
-
-var HasEffect =
-/* */
-1; // Represents the phase in which the effect (not the clean-up) fires.
-
-var Layout =
-/* */
-2;
-var Passive$1 =
-/* */
-4;
-
-// This may have been an insertion or a hydration.
-
-var hydrationParentFiber = null;
-var nextHydratableInstance = null;
-var isHydrating = false;
-
-function enterHydrationState(fiber) {
-
- var parentInstance = fiber.stateNode.containerInfo;
- nextHydratableInstance = getFirstHydratableChild(parentInstance);
- hydrationParentFiber = fiber;
- isHydrating = true;
- return true;
-}
-
-function deleteHydratableInstance(returnFiber, instance) {
- {
- switch (returnFiber.tag) {
- case HostRoot:
- didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
- break;
-
- case HostComponent:
- didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
- break;
- }
- }
-
- var childToDelete = createFiberFromHostInstanceForDeletion();
- childToDelete.stateNode = instance;
- childToDelete.return = returnFiber;
- childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
- // these children are not part of the reconciliation list of children.
- // Even if we abort and rereconcile the children, that will try to hydrate
- // again and the nodes are still in the host tree so these will be
- // recreated.
-
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = childToDelete;
- returnFiber.lastEffect = childToDelete;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
- }
-}
-
-function insertNonHydratedInstance(returnFiber, fiber) {
- fiber.flags = fiber.flags & ~Hydrating | Placement;
-
- {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
-
- switch (fiber.tag) {
- case HostComponent:
- var type = fiber.type;
- var props = fiber.pendingProps;
- didNotFindHydratableContainerInstance(parentContainer, type);
- break;
-
- case HostText:
- var text = fiber.pendingProps;
- didNotFindHydratableContainerTextInstance(parentContainer, text);
- break;
- }
-
- break;
- }
-
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
-
- switch (fiber.tag) {
- case HostComponent:
- var _type = fiber.type;
- var _props = fiber.pendingProps;
- didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
- break;
-
- case HostText:
- var _text = fiber.pendingProps;
- didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
- break;
-
- case SuspenseComponent:
- didNotFindHydratableSuspenseInstance(parentType, parentProps);
- break;
- }
-
- break;
- }
-
- default:
- return;
- }
- }
-}
-
-function tryHydrate(fiber, nextInstance) {
- switch (fiber.tag) {
- case HostComponent:
- {
- var type = fiber.type;
- var props = fiber.pendingProps;
- var instance = canHydrateInstance(nextInstance, type);
-
- if (instance !== null) {
- fiber.stateNode = instance;
- return true;
- }
-
- return false;
- }
-
- case HostText:
- {
- var text = fiber.pendingProps;
- var textInstance = canHydrateTextInstance(nextInstance, text);
-
- if (textInstance !== null) {
- fiber.stateNode = textInstance;
- return true;
- }
-
- return false;
- }
-
- case SuspenseComponent:
- {
-
- return false;
- }
-
- default:
- return false;
- }
-}
-
-function tryToClaimNextHydratableInstance(fiber) {
- if (!isHydrating) {
- return;
- }
-
- var nextInstance = nextHydratableInstance;
-
- if (!nextInstance) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- }
-
- var firstAttemptedInstance = nextInstance;
-
- if (!tryHydrate(fiber, nextInstance)) {
- // If we can't hydrate this instance let's try the next one.
- // We use this as a heuristic. It's based on intuition and not data so it
- // might be flawed or unnecessary.
- nextInstance = getNextHydratableSibling(firstAttemptedInstance);
-
- if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- } // We matched the next one, we'll now assume that the first one was
- // superfluous and we'll delete it. Since we can't eagerly delete it
- // we'll have to schedule a deletion. To do that, this node needs a dummy
- // fiber associated with it.
-
-
- deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
- }
-
- hydrationParentFiber = fiber;
- nextHydratableInstance = getFirstHydratableChild(nextInstance);
-}
-
-function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
-
- var instance = fiber.stateNode;
- var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
-
- fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
- // is a new ref we mark this as an update.
-
- if (updatePayload !== null) {
- return true;
- }
-
- return false;
-}
-
-function prepareToHydrateHostTextInstance(fiber) {
-
- var textInstance = fiber.stateNode;
- var textContent = fiber.memoizedProps;
- var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
-
- {
- if (shouldUpdate) {
- // We assume that prepareToHydrateHostTextInstance is called in a context where the
- // hydration parent is the parent host component of this host text.
- var returnFiber = hydrationParentFiber;
-
- if (returnFiber !== null) {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
- didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
- break;
- }
-
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
- didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
- break;
- }
- }
- }
- }
- }
-
- return shouldUpdate;
-}
-
-function skipPastDehydratedSuspenseInstance(fiber) {
-
- var suspenseState = fiber.memoizedState;
- var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
-
- if (!suspenseInstance) {
- {
- throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
-}
-
-function popToNextHostParent(fiber) {
- var parent = fiber.return;
-
- while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
- parent = parent.return;
- }
-
- hydrationParentFiber = parent;
-}
-
-function popHydrationState(fiber) {
-
- if (fiber !== hydrationParentFiber) {
- // We're deeper than the current hydration context, inside an inserted
- // tree.
- return false;
- }
-
- if (!isHydrating) {
- // If we're not currently hydrating but we're in a hydration context, then
- // we were an insertion and now need to pop up reenter hydration of our
- // siblings.
- popToNextHostParent(fiber);
- isHydrating = true;
- return false;
- }
-
- var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
- // We only do this deeper than head and body since they tend to have random
- // other nodes in them. We also ignore components with pure text content in
- // side of them.
- // TODO: Better heuristic.
-
- if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
- var nextInstance = nextHydratableInstance;
-
- while (nextInstance) {
- deleteHydratableInstance(fiber, nextInstance);
- nextInstance = getNextHydratableSibling(nextInstance);
- }
- }
-
- popToNextHostParent(fiber);
-
- if (fiber.tag === SuspenseComponent) {
- nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
- } else {
- nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
- }
-
- return true;
-}
-
-function resetHydrationState() {
-
- hydrationParentFiber = null;
- nextHydratableInstance = null;
- isHydrating = false;
-}
-
-function getIsHydrating() {
- return isHydrating;
-}
-
-// and should be reset before starting a new render.
-// This tracks which mutable sources need to be reset after a render.
-
-var workInProgressSources = [];
-var rendererSigil$1;
-
-{
- // Used to detect multiple renderers using the same mutable source.
- rendererSigil$1 = {};
-}
-
-function markSourceAsDirty(mutableSource) {
- workInProgressSources.push(mutableSource);
-}
-function resetWorkInProgressVersions() {
- for (var i = 0; i < workInProgressSources.length; i++) {
- var mutableSource = workInProgressSources[i];
-
- {
- mutableSource._workInProgressVersionPrimary = null;
- }
- }
-
- workInProgressSources.length = 0;
-}
-function getWorkInProgressVersion(mutableSource) {
- {
- return mutableSource._workInProgressVersionPrimary;
- }
-}
-function setWorkInProgressVersion(mutableSource, version) {
- {
- mutableSource._workInProgressVersionPrimary = version;
- }
-
- workInProgressSources.push(mutableSource);
-}
-function warnAboutMultipleRenderersDEV(mutableSource) {
- {
- {
- if (mutableSource._currentPrimaryRenderer == null) {
- mutableSource._currentPrimaryRenderer = rendererSigil$1;
- } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {
- error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');
- }
- }
- }
-} // Eager reads the version of a mutable source and stores it on the root.
-
-var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
- ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
-var didWarnAboutMismatchedHooksForComponent;
-var didWarnAboutUseOpaqueIdentifier;
-
-{
- didWarnAboutUseOpaqueIdentifier = {};
- didWarnAboutMismatchedHooksForComponent = new Set();
-}
-
-// These are set right before calling the component.
-var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
-// the work-in-progress hook.
-
-var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
-// current hook list is the list that belongs to the current fiber. The
-// work-in-progress hook list is a new list that will be added to the
-// work-in-progress fiber.
-
-var currentHook = null;
-var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
-// does not get reset if we do another render pass; only when we're completely
-// finished evaluating this component. This is an optimization so we know
-// whether we need to clear render phase updates after a throw.
-
-var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This
-// gets reset after each attempt.
-// TODO: Maybe there's some way to consolidate this with
-// `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.
-
-var didScheduleRenderPhaseUpdateDuringThisPass = false;
-var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook
-
-var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
-// The list stores the order of hooks used during the initial render (mount).
-// Subsequent renders (updates) reference this list.
-
-var hookTypesDev = null;
-var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore
-// the dependencies for Hooks that need them (e.g. useEffect or useMemo).
-// When true, such Hooks will always be "remounted". Only used during hot reload.
-
-var ignorePreviousDependencies = false;
-
-function mountHookTypesDev() {
- {
- var hookName = currentHookNameInDev;
-
- if (hookTypesDev === null) {
- hookTypesDev = [hookName];
- } else {
- hookTypesDev.push(hookName);
- }
- }
-}
-
-function updateHookTypesDev() {
- {
- var hookName = currentHookNameInDev;
-
- if (hookTypesDev !== null) {
- hookTypesUpdateIndexDev++;
-
- if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
- warnOnHookMismatchInDev(hookName);
- }
- }
- }
-}
-
-function checkDepsAreArrayDev(deps) {
- {
- if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
- // Verify deps, but only on mount to avoid extra checks.
- // It's unlikely their type would change as usually you define them inline.
- error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
- }
- }
-}
-
-function warnOnHookMismatchInDev(currentHookName) {
- {
- var componentName = getComponentName(currentlyRenderingFiber$1.type);
-
- if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
- didWarnAboutMismatchedHooksForComponent.add(componentName);
-
- if (hookTypesDev !== null) {
- var table = '';
- var secondColumnStart = 30;
-
- for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
- var oldHookName = hookTypesDev[i];
- var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
- var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up
- // lol @ IE not supporting String#repeat
-
- while (row.length < secondColumnStart) {
- row += ' ';
- }
-
- row += newHookName + '\n';
- table += row;
- }
-
- error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
- }
- }
- }
-}
-
-function throwInvalidHookError() {
- {
- {
- throw 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
-}
-
-function areHookInputsEqual(nextDeps, prevDeps) {
- {
- if (ignorePreviousDependencies) {
- // Only true when this component is being hot reloaded.
- return false;
- }
- }
-
- if (prevDeps === null) {
- {
- 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);
- }
-
- return false;
- }
-
- {
- // Don't bother comparing lengths in prod because these arrays should be
- // passed inline.
- if (nextDeps.length !== prevDeps.length) {
- 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, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]");
- }
- }
-
- for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
- if (objectIs(nextDeps[i], prevDeps[i])) {
- continue;
- }
-
- return false;
- }
-
- return true;
-}
-
-function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
- renderLanes = nextRenderLanes;
- currentlyRenderingFiber$1 = workInProgress;
-
- {
- hookTypesDev = current !== null ? current._debugHookTypes : null;
- hookTypesUpdateIndexDev = -1; // Used for hot reloading:
-
- ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
- }
-
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null;
- workInProgress.lanes = NoLanes; // The following should have already been reset
- // currentHook = null;
- // workInProgressHook = null;
- // didScheduleRenderPhaseUpdate = false;
- // TODO Warn if no hooks are used at all during mount, then some are used during update.
- // Currently we will identify the update render as a mount because memoizedState === null.
- // This is tricky because it's valid for certain types of components (e.g. React.lazy)
- // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.
- // Non-stateful hooks (e.g. context) don't get added to memoizedState,
- // so memoizedState would be null during updates and mounts.
-
- {
- if (current !== null && current.memoizedState !== null) {
- ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
- } else if (hookTypesDev !== null) {
- // This dispatcher handles an edge case where a component is updating,
- // but no stateful hooks have been used.
- // We want to match the production code behavior (which will use HooksDispatcherOnMount),
- // but with the extra DEV validation to ensure hooks ordering hasn't changed.
- // This dispatcher does that.
- ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
- } else {
- ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
- }
- }
-
- var children = Component(props, secondArg); // Check if there was a render phase update
-
- if (didScheduleRenderPhaseUpdateDuringThisPass) {
- // Keep rendering in a loop for as long as render phase updates continue to
- // be scheduled. Use a counter to prevent infinite loops.
- var numberOfReRenders = 0;
-
- do {
- didScheduleRenderPhaseUpdateDuringThisPass = false;
-
- if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
- {
- throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
- }
- }
-
- numberOfReRenders += 1;
-
- {
- // Even when hot reloading, allow dependencies to stabilize
- // after first render to prevent infinite render phase updates.
- ignorePreviousDependencies = false;
- } // Start over from the beginning of the list
-
-
- currentHook = null;
- workInProgressHook = null;
- workInProgress.updateQueue = null;
-
- {
- // Also validate hook order for cascading updates.
- hookTypesUpdateIndexDev = -1;
- }
-
- ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;
- children = Component(props, secondArg);
- } while (didScheduleRenderPhaseUpdateDuringThisPass);
- } // We can assume the previous dispatcher is always this one, since we set it
- // at the beginning of the render phase and there's no re-entrancy.
-
-
- ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
-
- {
- workInProgress._debugHookTypes = hookTypesDev;
- } // This check uses currentHook so that it works the same in DEV and prod bundles.
- // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
-
-
- var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
- renderLanes = NoLanes;
- currentlyRenderingFiber$1 = null;
- currentHook = null;
- workInProgressHook = null;
-
- {
- currentHookNameInDev = null;
- hookTypesDev = null;
- hookTypesUpdateIndexDev = -1;
- }
-
- didScheduleRenderPhaseUpdate = false;
-
- if (!!didRenderTooFewHooks) {
- {
- throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." );
- }
- }
-
- return children;
-}
-function bailoutHooks(current, workInProgress, lanes) {
- workInProgress.updateQueue = current.updateQueue;
- workInProgress.flags &= ~(Passive | Update);
- current.lanes = removeLanes(current.lanes, lanes);
-}
-function resetHooksAfterThrow() {
- // We can assume the previous dispatcher is always this one, since we set it
- // at the beginning of the render phase and there's no re-entrancy.
- ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
-
- if (didScheduleRenderPhaseUpdate) {
- // There were render phase updates. These are only valid for this render
- // phase, which we are now aborting. Remove the updates from the queues so
- // they do not persist to the next render. Do not remove updates from hooks
- // that weren't processed.
- //
- // Only reset the updates from the queue if it has a clone. If it does
- // not have a clone, that means it wasn't processed, and the updates were
- // scheduled before we entered the render phase.
- var hook = currentlyRenderingFiber$1.memoizedState;
-
- while (hook !== null) {
- var queue = hook.queue;
-
- if (queue !== null) {
- queue.pending = null;
- }
-
- hook = hook.next;
- }
-
- didScheduleRenderPhaseUpdate = false;
- }
-
- renderLanes = NoLanes;
- currentlyRenderingFiber$1 = null;
- currentHook = null;
- workInProgressHook = null;
-
- {
- hookTypesDev = null;
- hookTypesUpdateIndexDev = -1;
- currentHookNameInDev = null;
- isUpdatingOpaqueValueInRenderPhase = false;
- }
-
- didScheduleRenderPhaseUpdateDuringThisPass = false;
-}
-
-function mountWorkInProgressHook() {
- var hook = {
- memoizedState: null,
- baseState: null,
- baseQueue: null,
- queue: null,
- next: null
- };
-
- if (workInProgressHook === null) {
- // This is the first hook in the list
- currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
- } else {
- // Append to the end of the list
- workInProgressHook = workInProgressHook.next = hook;
- }
-
- return workInProgressHook;
-}
-
-function updateWorkInProgressHook() {
- // This function is used both for updates and for re-renders triggered by a
- // render phase update. It assumes there is either a current hook we can
- // clone, or a work-in-progress hook from a previous render pass that we can
- // use as a base. When we reach the end of the base list, we must switch to
- // the dispatcher used for mounts.
- var nextCurrentHook;
-
- if (currentHook === null) {
- var current = currentlyRenderingFiber$1.alternate;
-
- if (current !== null) {
- nextCurrentHook = current.memoizedState;
- } else {
- nextCurrentHook = null;
- }
- } else {
- nextCurrentHook = currentHook.next;
- }
-
- var nextWorkInProgressHook;
-
- if (workInProgressHook === null) {
- nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
- } else {
- nextWorkInProgressHook = workInProgressHook.next;
- }
-
- if (nextWorkInProgressHook !== null) {
- // There's already a work-in-progress. Reuse it.
- workInProgressHook = nextWorkInProgressHook;
- nextWorkInProgressHook = workInProgressHook.next;
- currentHook = nextCurrentHook;
- } else {
- // Clone from the current hook.
- if (!(nextCurrentHook !== null)) {
- {
- throw Error( "Rendered more hooks than during the previous render." );
- }
- }
-
- currentHook = nextCurrentHook;
- var newHook = {
- memoizedState: currentHook.memoizedState,
- baseState: currentHook.baseState,
- baseQueue: currentHook.baseQueue,
- queue: currentHook.queue,
- next: null
- };
-
- if (workInProgressHook === null) {
- // This is the first hook in the list.
- currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
- } else {
- // Append to the end of the list.
- workInProgressHook = workInProgressHook.next = newHook;
- }
- }
-
- return workInProgressHook;
-}
-
-function createFunctionComponentUpdateQueue() {
- return {
- lastEffect: null
- };
-}
-
-function basicStateReducer(state, action) {
- // $FlowFixMe: Flow doesn't like mixed types
- return typeof action === 'function' ? action(state) : action;
-}
-
-function mountReducer(reducer, initialArg, init) {
- var hook = mountWorkInProgressHook();
- var initialState;
-
- if (init !== undefined) {
- initialState = init(initialArg);
- } else {
- initialState = initialArg;
- }
-
- hook.memoizedState = hook.baseState = initialState;
- var queue = hook.queue = {
- pending: null,
- dispatch: null,
- lastRenderedReducer: reducer,
- lastRenderedState: initialState
- };
- var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
- return [hook.memoizedState, dispatch];
-}
-
-function updateReducer(reducer, initialArg, init) {
- var hook = updateWorkInProgressHook();
- var queue = hook.queue;
-
- if (!(queue !== null)) {
- {
- throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
- }
- }
-
- queue.lastRenderedReducer = reducer;
- var current = currentHook; // The last rebase update that is NOT part of the base state.
-
- var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.
-
- var pendingQueue = queue.pending;
-
- if (pendingQueue !== null) {
- // We have new updates that haven't been processed yet.
- // We'll add them to the base queue.
- if (baseQueue !== null) {
- // Merge the pending queue and the base queue.
- var baseFirst = baseQueue.next;
- var pendingFirst = pendingQueue.next;
- baseQueue.next = pendingFirst;
- pendingQueue.next = baseFirst;
- }
-
- {
- if (current.baseQueue !== baseQueue) {
- // Internal invariant that should never happen, but feasibly could in
- // the future if we implement resuming, or some form of that.
- error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');
- }
- }
-
- current.baseQueue = baseQueue = pendingQueue;
- queue.pending = null;
- }
-
- if (baseQueue !== null) {
- // We have a queue to process.
- var first = baseQueue.next;
- var newState = current.baseState;
- var newBaseState = null;
- var newBaseQueueFirst = null;
- var newBaseQueueLast = null;
- var update = first;
-
- do {
- var updateLane = update.lane;
-
- if (!isSubsetOfLanes(renderLanes, updateLane)) {
- // Priority is insufficient. Skip this update. If this is the first
- // skipped update, the previous update/state is the new base
- // update/state.
- var clone = {
- lane: updateLane,
- action: update.action,
- eagerReducer: update.eagerReducer,
- eagerState: update.eagerState,
- next: null
- };
-
- if (newBaseQueueLast === null) {
- newBaseQueueFirst = newBaseQueueLast = clone;
- newBaseState = newState;
- } else {
- newBaseQueueLast = newBaseQueueLast.next = clone;
- } // Update the remaining priority in the queue.
- // TODO: Don't need to accumulate this. Instead, we can remove
- // renderLanes from the original lanes.
-
-
- currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
- markSkippedUpdateLanes(updateLane);
- } else {
- // This update does have sufficient priority.
- if (newBaseQueueLast !== null) {
- var _clone = {
- // This update is going to be committed so we never want uncommit
- // it. Using NoLane works because 0 is a subset of all bitmasks, so
- // this will never be skipped by the check above.
- lane: NoLane,
- action: update.action,
- eagerReducer: update.eagerReducer,
- eagerState: update.eagerState,
- next: null
- };
- newBaseQueueLast = newBaseQueueLast.next = _clone;
- } // Process this update.
-
-
- if (update.eagerReducer === reducer) {
- // If this update was processed eagerly, and its reducer matches the
- // current reducer, we can use the eagerly computed state.
- newState = update.eagerState;
- } else {
- var action = update.action;
- newState = reducer(newState, action);
- }
- }
-
- update = update.next;
- } while (update !== null && update !== first);
-
- if (newBaseQueueLast === null) {
- newBaseState = newState;
- } else {
- newBaseQueueLast.next = newBaseQueueFirst;
- } // Mark that the fiber performed work, but only if the new state is
- // different from the current state.
-
-
- if (!objectIs(newState, hook.memoizedState)) {
- markWorkInProgressReceivedUpdate();
- }
-
- hook.memoizedState = newState;
- hook.baseState = newBaseState;
- hook.baseQueue = newBaseQueueLast;
- queue.lastRenderedState = newState;
- }
-
- var dispatch = queue.dispatch;
- return [hook.memoizedState, dispatch];
-}
-
-function rerenderReducer(reducer, initialArg, init) {
- var hook = updateWorkInProgressHook();
- var queue = hook.queue;
-
- if (!(queue !== null)) {
- {
- throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
- }
- }
-
- queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
- // work-in-progress hook.
-
- var dispatch = queue.dispatch;
- var lastRenderPhaseUpdate = queue.pending;
- var newState = hook.memoizedState;
-
- if (lastRenderPhaseUpdate !== null) {
- // The queue doesn't persist past this render pass.
- queue.pending = null;
- var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
- var update = firstRenderPhaseUpdate;
-
- do {
- // Process this render phase update. We don't have to check the
- // priority because it will always be the same as the current
- // render's.
- var action = update.action;
- newState = reducer(newState, action);
- update = update.next;
- } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
- // different from the current state.
-
-
- if (!objectIs(newState, hook.memoizedState)) {
- markWorkInProgressReceivedUpdate();
- }
-
- hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to
- // the base state unless the queue is empty.
- // TODO: Not sure if this is the desired semantics, but it's what we
- // do for gDSFP. I can't remember why.
-
- if (hook.baseQueue === null) {
- hook.baseState = newState;
- }
-
- queue.lastRenderedState = newState;
- }
-
- return [newState, dispatch];
-}
-
-function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
- {
- warnAboutMultipleRenderersDEV(source);
- }
-
- var getVersion = source._getVersion;
- var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?
-
- var isSafeToReadFromSource = false; // Check the version first.
- // If this render has already been started with a specific version,
- // we can use it alone to determine if we can safely read from the source.
-
- var currentRenderVersion = getWorkInProgressVersion(source);
-
- if (currentRenderVersion !== null) {
- // It's safe to read if the store hasn't been mutated since the last time
- // we read something.
- isSafeToReadFromSource = currentRenderVersion === version;
- } else {
- // If there's no version, then this is the first time we've read from the
- // source during the current render pass, so we need to do a bit more work.
- // What we need to determine is if there are any hooks that already
- // subscribed to the source, and if so, whether there are any pending
- // mutations that haven't been synchronized yet.
- //
- // If there are no pending mutations, then `root.mutableReadLanes` will be
- // empty, and we know we can safely read.
- //
- // If there *are* pending mutations, we may still be able to safely read
- // if the currently rendering lanes are inclusive of the pending mutation
- // lanes, since that guarantees that the value we're about to read from
- // the source is consistent with the values that we read during the most
- // recent mutation.
- isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);
-
- if (isSafeToReadFromSource) {
- // If it's safe to read from this source during the current render,
- // store the version in case other components read from it.
- // A changed version number will let those components know to throw and restart the render.
- setWorkInProgressVersion(source, version);
- }
- }
-
- if (isSafeToReadFromSource) {
- var snapshot = getSnapshot(source._source);
-
- {
- if (typeof snapshot === 'function') {
- error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
- }
- }
-
- return snapshot;
- } else {
- // This handles the special case of a mutable source being shared between renderers.
- // In that case, if the source is mutated between the first and second renderer,
- // The second renderer don't know that it needs to reset the WIP version during unwind,
- // (because the hook only marks sources as dirty if it's written to their WIP version).
- // That would cause this tear check to throw again and eventually be visible to the user.
- // We can avoid this infinite loop by explicitly marking the source as dirty.
- //
- // This can lead to tearing in the first renderer when it resumes,
- // but there's nothing we can do about that (short of throwing here and refusing to continue the render).
- markSourceAsDirty(source);
-
- {
- {
- throw Error( "Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue." );
- }
- }
- }
-}
-
-function useMutableSource(hook, source, getSnapshot, subscribe) {
- var root = getWorkInProgressRoot();
-
- if (!(root !== null)) {
- {
- throw Error( "Expected a work-in-progress root. This is a bug in React. Please file an issue." );
- }
- }
-
- var getVersion = source._getVersion;
- var version = getVersion(source._source);
- var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
-
- var _dispatcher$useState = dispatcher.useState(function () {
- return readFromUnsubcribedMutableSource(root, source, getSnapshot);
- }),
- currentSnapshot = _dispatcher$useState[0],
- setSnapshot = _dispatcher$useState[1];
-
- var snapshot = currentSnapshot; // Grab a handle to the state hook as well.
- // We use it to clear the pending update queue if we have a new source.
-
- var stateHook = workInProgressHook;
- var memoizedState = hook.memoizedState;
- var refs = memoizedState.refs;
- var prevGetSnapshot = refs.getSnapshot;
- var prevSource = memoizedState.source;
- var prevSubscribe = memoizedState.subscribe;
- var fiber = currentlyRenderingFiber$1;
- hook.memoizedState = {
- refs: refs,
- source: source,
- subscribe: subscribe
- }; // Sync the values needed by our subscription handler after each commit.
-
- dispatcher.useEffect(function () {
- refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,
- // but this hook recreates the queue in certain cases to avoid updates from stale sources.
- // handleChange() below needs to reference the dispatch function without re-subscribing,
- // so we use a ref to ensure that it always has the latest version.
-
- refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.
-
- var maybeNewVersion = getVersion(source._source);
-
- if (!objectIs(version, maybeNewVersion)) {
- var maybeNewSnapshot = getSnapshot(source._source);
-
- {
- if (typeof maybeNewSnapshot === 'function') {
- error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
- }
- }
-
- if (!objectIs(snapshot, maybeNewSnapshot)) {
- setSnapshot(maybeNewSnapshot);
- var lane = requestUpdateLane(fiber);
- markRootMutableRead(root, lane);
- } // If the source mutated between render and now,
- // there may be state updates already scheduled from the old source.
- // Entangle the updates so that they render in the same batch.
-
-
- markRootEntangled(root, root.mutableReadLanes);
- }
- }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.
-
- dispatcher.useEffect(function () {
- var handleChange = function () {
- var latestGetSnapshot = refs.getSnapshot;
- var latestSetSnapshot = refs.setSnapshot;
-
- try {
- latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.
-
- var lane = requestUpdateLane(fiber);
- markRootMutableRead(root, lane);
- } catch (error) {
- // A selector might throw after a source mutation.
- // e.g. it might try to read from a part of the store that no longer exists.
- // In this case we should still schedule an update with React.
- // Worst case the selector will throw again and then an error boundary will handle it.
- latestSetSnapshot(function () {
- throw error;
- });
- }
- };
-
- var unsubscribe = subscribe(source._source, handleChange);
-
- {
- if (typeof unsubscribe !== 'function') {
- error('Mutable source subscribe function must return an unsubscribe function.');
- }
- }
-
- return unsubscribe;
- }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.
- //
- // If either the source or the subscription have changed we can't can't trust the update queue.
- // Maybe the source changed in a way that the old subscription ignored but the new one depends on.
- //
- // If the getSnapshot function changed, we also shouldn't rely on the update queue.
- // It's possible that the underlying source was mutated between the when the last "change" event fired,
- // and when the current render (with the new getSnapshot function) is processed.
- //
- // In both cases, we need to throw away pending updates (since they are no longer relevant)
- // and treat reading from the source as we do in the mount case.
-
- if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {
- // Create a new queue and setState method,
- // So if there are interleaved updates, they get pushed to the older queue.
- // When this becomes current, the previous queue and dispatch method will be discarded,
- // including any interleaving updates that occur.
- var newQueue = {
- pending: null,
- dispatch: null,
- lastRenderedReducer: basicStateReducer,
- lastRenderedState: snapshot
- };
- newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);
- stateHook.queue = newQueue;
- stateHook.baseQueue = null;
- snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
- stateHook.memoizedState = stateHook.baseState = snapshot;
- }
-
- return snapshot;
-}
-
-function mountMutableSource(source, getSnapshot, subscribe) {
- var hook = mountWorkInProgressHook();
- hook.memoizedState = {
- refs: {
- getSnapshot: getSnapshot,
- setSnapshot: null
- },
- source: source,
- subscribe: subscribe
- };
- return useMutableSource(hook, source, getSnapshot, subscribe);
-}
-
-function updateMutableSource(source, getSnapshot, subscribe) {
- var hook = updateWorkInProgressHook();
- return useMutableSource(hook, source, getSnapshot, subscribe);
-}
-
-function mountState(initialState) {
- var hook = mountWorkInProgressHook();
-
- if (typeof initialState === 'function') {
- // $FlowFixMe: Flow doesn't like mixed types
- initialState = initialState();
- }
-
- hook.memoizedState = hook.baseState = initialState;
- var queue = hook.queue = {
- pending: null,
- dispatch: null,
- lastRenderedReducer: basicStateReducer,
- lastRenderedState: initialState
- };
- var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
- return [hook.memoizedState, dispatch];
-}
-
-function updateState(initialState) {
- return updateReducer(basicStateReducer);
-}
-
-function rerenderState(initialState) {
- return rerenderReducer(basicStateReducer);
-}
-
-function pushEffect(tag, create, destroy, deps) {
- var effect = {
- tag: tag,
- create: create,
- destroy: destroy,
- deps: deps,
- // Circular
- next: null
- };
- var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
-
- if (componentUpdateQueue === null) {
- componentUpdateQueue = createFunctionComponentUpdateQueue();
- currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
- componentUpdateQueue.lastEffect = effect.next = effect;
- } else {
- var lastEffect = componentUpdateQueue.lastEffect;
-
- if (lastEffect === null) {
- componentUpdateQueue.lastEffect = effect.next = effect;
- } else {
- var firstEffect = lastEffect.next;
- lastEffect.next = effect;
- effect.next = firstEffect;
- componentUpdateQueue.lastEffect = effect;
- }
- }
-
- return effect;
-}
-
-function mountRef(initialValue) {
- var hook = mountWorkInProgressHook();
- var ref = {
- current: initialValue
- };
-
- {
- Object.seal(ref);
- }
-
- hook.memoizedState = ref;
- return ref;
-}
-
-function updateRef(initialValue) {
- var hook = updateWorkInProgressHook();
- return hook.memoizedState;
-}
-
-function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- currentlyRenderingFiber$1.flags |= fiberFlags;
- hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);
-}
-
-function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var destroy = undefined;
-
- if (currentHook !== null) {
- var prevEffect = currentHook.memoizedState;
- destroy = prevEffect.destroy;
-
- if (nextDeps !== null) {
- var prevDeps = prevEffect.deps;
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- pushEffect(hookFlags, create, destroy, nextDeps);
- return;
- }
- }
- }
-
- currentlyRenderingFiber$1.flags |= fiberFlags;
- hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);
-}
-
-function mountEffect(create, deps) {
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
- }
- }
-
- return mountEffectImpl(Update | Passive, Passive$1, create, deps);
-}
-
-function updateEffect(create, deps) {
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
- }
- }
-
- return updateEffectImpl(Update | Passive, Passive$1, create, deps);
-}
-
-function mountLayoutEffect(create, deps) {
- return mountEffectImpl(Update, Layout, create, deps);
-}
-
-function updateLayoutEffect(create, deps) {
- return updateEffectImpl(Update, Layout, create, deps);
-}
-
-function imperativeHandleEffect(create, ref) {
- if (typeof ref === 'function') {
- var refCallback = ref;
-
- var _inst = create();
-
- refCallback(_inst);
- return function () {
- refCallback(null);
- };
- } else if (ref !== null && ref !== undefined) {
- var refObject = ref;
-
- {
- if (!refObject.hasOwnProperty('current')) {
- error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');
- }
- }
-
- var _inst2 = create();
-
- refObject.current = _inst2;
- return function () {
- refObject.current = null;
- };
- }
-}
-
-function mountImperativeHandle(ref, create, deps) {
- {
- if (typeof create !== 'function') {
- error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
- }
- } // TODO: If deps are provided, should we skip comparing the ref itself?
-
-
- var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
- return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
-}
-
-function updateImperativeHandle(ref, create, deps) {
- {
- if (typeof create !== 'function') {
- error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
- }
- } // TODO: If deps are provided, should we skip comparing the ref itself?
-
-
- var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
- return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
-}
-
-function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
- // The react-debug-hooks package injects its own implementation
- // so that e.g. DevTools can display custom hook values.
-}
-
-var updateDebugValue = mountDebugValue;
-
-function mountCallback(callback, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- hook.memoizedState = [callback, nextDeps];
- return callback;
-}
-
-function updateCallback(callback, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var prevState = hook.memoizedState;
-
- if (prevState !== null) {
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
-
- hook.memoizedState = [callback, nextDeps];
- return callback;
-}
-
-function mountMemo(nextCreate, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var nextValue = nextCreate();
- hook.memoizedState = [nextValue, nextDeps];
- return nextValue;
-}
-
-function updateMemo(nextCreate, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var prevState = hook.memoizedState;
-
- if (prevState !== null) {
- // Assume these are defined. If they're not, areHookInputsEqual will warn.
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
-
- var nextValue = nextCreate();
- hook.memoizedState = [nextValue, nextDeps];
- return nextValue;
-}
-
-function mountDeferredValue(value) {
- var _mountState = mountState(value),
- prevValue = _mountState[0],
- setValue = _mountState[1];
-
- mountEffect(function () {
- var prevTransition = ReactCurrentBatchConfig$1.transition;
- ReactCurrentBatchConfig$1.transition = 1;
-
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.transition = prevTransition;
- }
- }, [value]);
- return prevValue;
-}
-
-function updateDeferredValue(value) {
- var _updateState = updateState(),
- prevValue = _updateState[0],
- setValue = _updateState[1];
-
- updateEffect(function () {
- var prevTransition = ReactCurrentBatchConfig$1.transition;
- ReactCurrentBatchConfig$1.transition = 1;
-
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.transition = prevTransition;
- }
- }, [value]);
- return prevValue;
-}
-
-function rerenderDeferredValue(value) {
- var _rerenderState = rerenderState(),
- prevValue = _rerenderState[0],
- setValue = _rerenderState[1];
-
- updateEffect(function () {
- var prevTransition = ReactCurrentBatchConfig$1.transition;
- ReactCurrentBatchConfig$1.transition = 1;
-
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.transition = prevTransition;
- }
- }, [value]);
- return prevValue;
-}
-
-function startTransition(setPending, callback) {
- var priorityLevel = getCurrentPriorityLevel();
-
- {
- runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {
- setPending(true);
- });
- runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {
- var prevTransition = ReactCurrentBatchConfig$1.transition;
- ReactCurrentBatchConfig$1.transition = 1;
-
- try {
- setPending(false);
- callback();
- } finally {
- ReactCurrentBatchConfig$1.transition = prevTransition;
- }
- });
- }
-}
-
-function mountTransition() {
- var _mountState2 = mountState(false),
- isPending = _mountState2[0],
- setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`
- // never changes.
-
-
- var start = startTransition.bind(null, setPending);
- mountRef(start);
- return [start, isPending];
-}
-
-function updateTransition() {
- var _updateState2 = updateState(),
- isPending = _updateState2[0];
-
- var startRef = updateRef();
- var start = startRef.current;
- return [start, isPending];
-}
-
-function rerenderTransition() {
- var _rerenderState2 = rerenderState(),
- isPending = _rerenderState2[0];
-
- var startRef = updateRef();
- var start = startRef.current;
- return [start, isPending];
-}
-
-var isUpdatingOpaqueValueInRenderPhase = false;
-function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
- {
- return isUpdatingOpaqueValueInRenderPhase;
- }
-}
-
-function warnOnOpaqueIdentifierAccessInDEV(fiber) {
- {
- // TODO: Should warn in effects and callbacks, too
- var name = getComponentName(fiber.type) || 'Unknown';
-
- if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {
- error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');
-
- didWarnAboutUseOpaqueIdentifier[name] = true;
- }
- }
-}
-
-function mountOpaqueIdentifier() {
- var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;
-
- if (getIsHydrating()) {
- var didUpgrade = false;
- var fiber = currentlyRenderingFiber$1;
-
- var readValue = function () {
- if (!didUpgrade) {
- // Only upgrade once. This works even inside the render phase because
- // the update is added to a shared queue, which outlasts the
- // in-progress render.
- didUpgrade = true;
-
- {
- isUpdatingOpaqueValueInRenderPhase = true;
- setId(makeId());
- isUpdatingOpaqueValueInRenderPhase = false;
- warnOnOpaqueIdentifierAccessInDEV(fiber);
- }
- }
-
- {
- {
- throw Error( "The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly." );
- }
- }
- };
-
- var id = makeOpaqueHydratingObject(readValue);
- var setId = mountState(id)[1];
-
- if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {
- currentlyRenderingFiber$1.flags |= Update | Passive;
- pushEffect(HasEffect | Passive$1, function () {
- setId(makeId());
- }, undefined, null);
- }
-
- return id;
- } else {
- var _id = makeId();
-
- mountState(_id);
- return _id;
- }
-}
-
-function updateOpaqueIdentifier() {
- var id = updateState()[0];
- return id;
-}
-
-function rerenderOpaqueIdentifier() {
- var id = rerenderState()[0];
- return id;
-}
-
-function dispatchAction(fiber, queue, action) {
- {
- if (typeof arguments[3] === 'function') {
- error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
- }
- }
-
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- var update = {
- lane: lane,
- action: action,
- eagerReducer: null,
- eagerState: null,
- next: null
- }; // Append the update to the end of the list.
-
- var pending = queue.pending;
-
- if (pending === null) {
- // This is the first update. Create a circular list.
- update.next = update;
- } else {
- update.next = pending.next;
- pending.next = update;
- }
-
- queue.pending = update;
- var alternate = fiber.alternate;
-
- if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
- // This is a render phase update. Stash it in a lazily-created map of
- // queue -> linked list of updates. After this render pass, we'll restart
- // and apply the stashed updates on top of the work-in-progress hook.
- didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
- } else {
- if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
- // The queue is currently empty, which means we can eagerly compute the
- // next state before entering the render phase. If the new state is the
- // same as the current state, we may be able to bail out entirely.
- var lastRenderedReducer = queue.lastRenderedReducer;
-
- if (lastRenderedReducer !== null) {
- var prevDispatcher;
-
- {
- prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- }
-
- try {
- var currentState = queue.lastRenderedState;
- var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute
- // it, on the update object. If the reducer hasn't changed by the
- // time we enter the render phase, then the eager state can be used
- // without calling the reducer again.
-
- update.eagerReducer = lastRenderedReducer;
- update.eagerState = eagerState;
-
- if (objectIs(eagerState, currentState)) {
- // Fast path. We can bail out without scheduling React to re-render.
- // It's still possible that we'll need to rebase this update later,
- // if the component re-renders for a different reason and by that
- // time the reducer has changed.
- return;
- }
- } catch (error) {// Suppress the error. It will throw again in the render phase.
- } finally {
- {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- }
- }
- }
-
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotScopedWithMatchingAct(fiber);
- warnIfNotCurrentlyActingUpdatesInDev(fiber);
- }
- }
-
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- }
-}
-
-var ContextOnlyDispatcher = {
- readContext: readContext,
- useCallback: throwInvalidHookError,
- useContext: throwInvalidHookError,
- useEffect: throwInvalidHookError,
- useImperativeHandle: throwInvalidHookError,
- useLayoutEffect: throwInvalidHookError,
- useMemo: throwInvalidHookError,
- useReducer: throwInvalidHookError,
- useRef: throwInvalidHookError,
- useState: throwInvalidHookError,
- useDebugValue: throwInvalidHookError,
- useDeferredValue: throwInvalidHookError,
- useTransition: throwInvalidHookError,
- useMutableSource: throwInvalidHookError,
- useOpaqueIdentifier: throwInvalidHookError,
- unstable_isNewReconciler: enableNewReconciler
-};
-var HooksDispatcherOnMountInDEV = null;
-var HooksDispatcherOnMountWithHookTypesInDEV = null;
-var HooksDispatcherOnUpdateInDEV = null;
-var HooksDispatcherOnRerenderInDEV = null;
-var InvalidNestedHooksDispatcherOnMountInDEV = null;
-var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
-var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
-
-{
- var warnInvalidContextAccess = function () {
- 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().');
- };
-
- var warnInvalidHookAccess = function () {
- 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');
- };
-
- HooksDispatcherOnMountInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- mountHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- mountHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- mountHookTypesDev();
- return mountDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- mountHookTypesDev();
- return mountDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- mountHookTypesDev();
- return mountTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- mountHookTypesDev();
- return mountMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- mountHookTypesDev();
- return mountOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- HooksDispatcherOnMountWithHookTypesInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return mountDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return mountDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return mountTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- updateHookTypesDev();
- return mountMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- updateHookTypesDev();
- return mountOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- HooksDispatcherOnUpdateInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return updateDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return updateDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return updateTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- updateHookTypesDev();
- return updateMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- updateHookTypesDev();
- return updateOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- HooksDispatcherOnRerenderInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
-
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
-
- try {
- return rerenderReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
-
- try {
- return rerenderState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return updateDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return rerenderDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return rerenderTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- updateHookTypesDev();
- return updateMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- updateHookTypesDev();
- return rerenderOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- InvalidNestedHooksDispatcherOnMountInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- InvalidNestedHooksDispatcherOnUpdateInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- InvalidNestedHooksDispatcherOnRerenderInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return rerenderReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return rerenderState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return rerenderDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return rerenderTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return rerenderOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
-}
-
-var now$1 = Scheduler.unstable_now;
-var commitTime = 0;
-var profilerStartTime = -1;
-
-function getCommitTime() {
- return commitTime;
-}
-
-function recordCommitTime() {
-
- commitTime = now$1();
-}
-
-function startProfilerTimer(fiber) {
-
- profilerStartTime = now$1();
-
- if (fiber.actualStartTime < 0) {
- fiber.actualStartTime = now$1();
- }
-}
-
-function stopProfilerTimerIfRunning(fiber) {
-
- profilerStartTime = -1;
-}
-
-function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
-
- if (profilerStartTime >= 0) {
- var elapsedTime = now$1() - profilerStartTime;
- fiber.actualDuration += elapsedTime;
-
- if (overrideBaseTime) {
- fiber.selfBaseDuration = elapsedTime;
- }
-
- profilerStartTime = -1;
- }
-}
-
-function transferActualDuration(fiber) {
- // Transfer time spent rendering these children so we don't lose it
- // after we rerender. This is used as a helper in special cases
- // where we should count the work of multiple passes.
- var child = fiber.child;
-
- while (child) {
- fiber.actualDuration += child.actualDuration;
- child = child.sibling;
- }
-}
-
-var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
-var didReceiveUpdate = false;
-var didWarnAboutBadClass;
-var didWarnAboutModulePatternComponent;
-var didWarnAboutContextTypeOnFunctionComponent;
-var didWarnAboutGetDerivedStateOnFunctionComponent;
-var didWarnAboutFunctionRefs;
-var didWarnAboutReassigningProps;
-var didWarnAboutRevealOrder;
-var didWarnAboutTailOptions;
-
-{
- didWarnAboutBadClass = {};
- didWarnAboutModulePatternComponent = {};
- didWarnAboutContextTypeOnFunctionComponent = {};
- didWarnAboutGetDerivedStateOnFunctionComponent = {};
- didWarnAboutFunctionRefs = {};
- didWarnAboutReassigningProps = false;
- didWarnAboutRevealOrder = {};
- didWarnAboutTailOptions = {};
-}
-
-function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
- if (current === null) {
- // If this is a fresh new component that hasn't been rendered yet, we
- // won't update its child set by applying minimal side-effects. Instead,
- // we will add them all to the child before it gets rendered. That means
- // we can optimize this reconciliation pass by not tracking side-effects.
- workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
- } else {
- // If the current child is the same as the work in progress, it means that
- // we haven't yet started any work on these children. Therefore, we use
- // the clone algorithm to create a copy of all the current children.
- // If we had any progressed work already, that is invalid at this point so
- // let's throw it out.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);
- }
-}
-
-function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {
- // This function is fork of reconcileChildren. It's used in cases where we
- // want to reconcile without matching against the existing set. This has the
- // effect of all current children being unmounted; even if the type and key
- // are the same, the old child is unmounted and a new child is created.
- //
- // To do this, we're going to go through the reconcile algorithm twice. In
- // the first pass, we schedule a deletion for all the current children by
- // passing null.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we
- // pass null in place of where we usually pass the current child set. This has
- // the effect of remounting all children regardless of whether their
- // identities match.
-
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
-}
-
-function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
- // TODO: current can be non-null here even if the component
- // hasn't yet mounted. This happens after the first render suspends.
- // We'll need to figure out if this is fine or can cause issues.
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
-
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component));
- }
- }
- }
-
- var render = Component.render;
- var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent
-
- var nextChildren;
- prepareToReadContext(workInProgress, renderLanes);
-
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
-
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
- } finally {
- reenableLogs();
- }
- }
-
- setIsRendering(false);
- }
-
- if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderLanes);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
-}
-
-function updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
- if (current === null) {
- var type = Component.type;
-
- if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
- Component.defaultProps === undefined) {
- var resolvedType = type;
-
- {
- resolvedType = resolveFunctionForHotReloading(type);
- } // If this is a plain function component without default props,
- // and with only the default shallow comparison, we upgrade it
- // to a SimpleMemoComponent to allow fast path updates.
-
-
- workInProgress.tag = SimpleMemoComponent;
- workInProgress.type = resolvedType;
-
- {
- validateFunctionComponentInDev(workInProgress, type);
- }
-
- return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);
- }
-
- {
- var innerPropTypes = type.propTypes;
-
- if (innerPropTypes) {
- // Inner memo component props aren't currently validated in createElement.
- // We could move it there, but we'd still need this for lazy code path.
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(type));
- }
- }
-
- var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);
- child.ref = workInProgress.ref;
- child.return = workInProgress;
- workInProgress.child = child;
- return child;
- }
-
- {
- var _type = Component.type;
- var _innerPropTypes = _type.propTypes;
-
- if (_innerPropTypes) {
- // Inner memo component props aren't currently validated in createElement.
- // We could move it there, but we'd still need this for lazy code path.
- checkPropTypes(_innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(_type));
- }
- }
-
- var currentChild = current.child; // This is always exactly one child
-
- if (!includesSomeLane(updateLanes, renderLanes)) {
- // This will be the props with resolved defaultProps,
- // unlike current.memoizedProps which will be the unresolved ones.
- var prevProps = currentChild.memoizedProps; // Default to shallow comparison
-
- var compare = Component.compare;
- compare = compare !== null ? compare : shallowEqual;
-
- if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- }
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
- var newChild = createWorkInProgress(currentChild, nextProps);
- newChild.ref = workInProgress.ref;
- newChild.return = workInProgress;
- workInProgress.child = newChild;
- return newChild;
-}
-
-function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
- // TODO: current can be non-null here even if the component
- // hasn't yet mounted. This happens when the inner render suspends.
- // We'll need to figure out if this is fine or can cause issues.
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var outerMemoType = workInProgress.elementType;
-
- if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
- // We warn when you define propTypes on lazy()
- // so let's just skip over it to find memo() outer wrapper.
- // Inner props for memo are validated later.
- var lazyComponent = outerMemoType;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- outerMemoType = init(payload);
- } catch (x) {
- outerMemoType = null;
- } // Inner propTypes will be validated in the function component path.
-
-
- var outerPropTypes = outerMemoType && outerMemoType.propTypes;
-
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
- 'prop', getComponentName(outerMemoType));
- }
- }
- }
- }
-
- if (current !== null) {
- var prevProps = current.memoizedProps;
-
- if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
- workInProgress.type === current.type )) {
- didReceiveUpdate = false;
-
- if (!includesSomeLane(renderLanes, updateLanes)) {
- // The pending lanes were cleared at the beginning of beginWork. We're
- // about to bail out, but there might be other lanes that weren't
- // included in the current render. Usually, the priority level of the
- // remaining updates is accumlated during the evaluation of the
- // component (i.e. when processing the update queue). But since since
- // we're bailing out early *without* evaluating the component, we need
- // to account for it here, too. Reset to the value of the current fiber.
- // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
- // because a MemoComponent fiber does not have hooks or an update queue;
- // rather, it wraps around an inner component, which may or may not
- // contains hooks.
- // TODO: Move the reset at in beginWork out of the common path so that
- // this is no longer necessary.
- workInProgress.lanes = current.lanes;
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
- // This is a special case that only exists for legacy mode.
- // See https://github.com/facebook/react/pull/19216.
- didReceiveUpdate = true;
- }
- }
- }
-
- return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
-}
-
-function updateOffscreenComponent(current, workInProgress, renderLanes) {
- var nextProps = workInProgress.pendingProps;
- var nextChildren = nextProps.children;
- var prevState = current !== null ? current.memoizedState : null;
-
- if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {
- if ((workInProgress.mode & ConcurrentMode) === NoMode) {
- // In legacy sync mode, don't defer the subtree. Render it now.
- // TODO: Figure out what we should do in Blocking mode.
- var nextState = {
- baseLanes: NoLanes
- };
- workInProgress.memoizedState = nextState;
- pushRenderLanes(workInProgress, renderLanes);
- } else if (!includesSomeLane(renderLanes, OffscreenLane)) {
- var nextBaseLanes;
-
- if (prevState !== null) {
- var prevBaseLanes = prevState.baseLanes;
- nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);
- } else {
- nextBaseLanes = renderLanes;
- } // Schedule this fiber to re-render at offscreen priority. Then bailout.
-
-
- {
- markSpawnedWork(OffscreenLane);
- }
-
- workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);
- var _nextState = {
- baseLanes: nextBaseLanes
- };
- workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway
- // to avoid a push/pop misalignment.
-
- pushRenderLanes(workInProgress, nextBaseLanes);
- return null;
- } else {
- // Rendering at offscreen, so we can clear the base lanes.
- var _nextState2 = {
- baseLanes: NoLanes
- };
- workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.
-
- var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;
- pushRenderLanes(workInProgress, subtreeRenderLanes);
- }
- } else {
- var _subtreeRenderLanes;
-
- if (prevState !== null) {
- _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state
-
- workInProgress.memoizedState = null;
- } else {
- // We weren't previously hidden, and we still aren't, so there's nothing
- // special to do. Need to push to the stack regardless, though, to avoid
- // a push/pop misalignment.
- _subtreeRenderLanes = renderLanes;
- }
-
- pushRenderLanes(workInProgress, _subtreeRenderLanes);
- }
-
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
-} // Note: These happen to have identical begin phases, for now. We shouldn't hold
-// ourselves to this constraint, though. If the behavior diverges, we should
-// fork the function.
-
-
-var updateLegacyHiddenComponent = updateOffscreenComponent;
-
-function updateFragment(current, workInProgress, renderLanes) {
- var nextChildren = workInProgress.pendingProps;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
-}
-
-function updateMode(current, workInProgress, renderLanes) {
- var nextChildren = workInProgress.pendingProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
-}
-
-function updateProfiler(current, workInProgress, renderLanes) {
- {
- workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.
- // These are reset during render to allow the DevTools commit hook a chance to read them,
-
- var stateNode = workInProgress.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- }
-
- var nextProps = workInProgress.pendingProps;
- var nextChildren = nextProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
-}
-
-function markRef(current, workInProgress) {
- var ref = workInProgress.ref;
-
- if (current === null && ref !== null || current !== null && current.ref !== ref) {
- // Schedule a Ref effect
- workInProgress.flags |= Ref;
- }
-}
-
-function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
-
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component));
- }
- }
- }
-
- var context;
-
- {
- var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
- context = getMaskedContext(workInProgress, unmaskedContext);
- }
-
- var nextChildren;
- prepareToReadContext(workInProgress, renderLanes);
-
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
-
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
- } finally {
- reenableLogs();
- }
- }
-
- setIsRendering(false);
- }
-
- if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderLanes);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
-}
-
-function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
-
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component));
- }
- }
- } // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
-
-
- var hasContext;
-
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
-
- prepareToReadContext(workInProgress, renderLanes);
- var instance = workInProgress.stateNode;
- var shouldUpdate;
-
- if (instance === null) {
- if (current !== null) {
- // A class component without an instance only mounts if it suspended
- // inside a non-concurrent tree, in an inconsistent state. We want to
- // treat it like a new mount, even though an empty version of it already
- // committed. Disconnect the alternate pointers.
- current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
-
- workInProgress.flags |= Placement;
- } // In the initial pass we might need to construct the instance.
-
-
- constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderLanes);
- shouldUpdate = true;
- } else if (current === null) {
- // In a resume, we'll already have an instance we can reuse.
- shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);
- } else {
- shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);
- }
-
- var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);
-
- {
- var inst = workInProgress.stateNode;
-
- if (shouldUpdate && inst.props !== nextProps) {
- if (!didWarnAboutReassigningProps) {
- error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');
- }
-
- didWarnAboutReassigningProps = true;
- }
- }
-
- return nextUnitOfWork;
-}
-
-function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {
- // Refs should update even if shouldComponentUpdate returns false
- markRef(current, workInProgress);
- var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;
-
- if (!shouldUpdate && !didCaptureError) {
- // Context providers should defer to sCU for rendering
- if (hasContext) {
- invalidateContextProvider(workInProgress, Component, false);
- }
-
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- }
-
- var instance = workInProgress.stateNode; // Rerender
-
- ReactCurrentOwner$1.current = workInProgress;
- var nextChildren;
-
- if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
- // If we captured an error, but getDerivedStateFromError is not defined,
- // unmount all the children. componentDidCatch will schedule an update to
- // re-render a fallback. This is temporary until we migrate everyone to
- // the new API.
- // TODO: Warn in a future release.
- nextChildren = null;
-
- {
- stopProfilerTimerIfRunning();
- }
- } else {
- {
- setIsRendering(true);
- nextChildren = instance.render();
-
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- instance.render();
- } finally {
- reenableLogs();
- }
- }
-
- setIsRendering(false);
- }
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
-
- if (current !== null && didCaptureError) {
- // If we're recovering from an error, reconcile without reusing any of
- // the existing children. Conceptually, the normal children and the children
- // that are shown on error are two different sets, so we shouldn't reuse
- // normal children even if their identities match.
- forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);
- } else {
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- } // Memoize state using the values we just used to render.
- // TODO: Restructure so we never read values from the instance.
-
-
- workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.
-
- if (hasContext) {
- invalidateContextProvider(workInProgress, Component, true);
- }
-
- return workInProgress.child;
-}
-
-function pushHostRootContext(workInProgress) {
- var root = workInProgress.stateNode;
-
- if (root.pendingContext) {
- pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
- } else if (root.context) {
- // Should always be set
- pushTopLevelContextObject(workInProgress, root.context, false);
- }
-
- pushHostContainer(workInProgress, root.containerInfo);
-}
-
-function updateHostRoot(current, workInProgress, renderLanes) {
- pushHostRootContext(workInProgress);
- var updateQueue = workInProgress.updateQueue;
-
- if (!(current !== null && updateQueue !== null)) {
- {
- throw Error( "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var nextProps = workInProgress.pendingProps;
- var prevState = workInProgress.memoizedState;
- var prevChildren = prevState !== null ? prevState.element : null;
- cloneUpdateQueue(current, workInProgress);
- processUpdateQueue(workInProgress, nextProps, null, renderLanes);
- var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
- // being called "element".
-
- var nextChildren = nextState.element;
-
- if (nextChildren === prevChildren) {
- resetHydrationState();
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- }
-
- var root = workInProgress.stateNode;
-
- if (root.hydrate && enterHydrationState(workInProgress)) {
- // If we don't have any current children this might be the first pass.
- // We always try to hydrate. If this isn't a hydration pass there won't
- // be any children to hydrate which is effectively the same thing as
- // not hydrating.
- {
- var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;
-
- if (mutableSourceEagerHydrationData != null) {
- for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {
- var mutableSource = mutableSourceEagerHydrationData[i];
- var version = mutableSourceEagerHydrationData[i + 1];
- setWorkInProgressVersion(mutableSource, version);
- }
- }
- }
-
- var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
- workInProgress.child = child;
- var node = child;
-
- while (node) {
- // Mark each child as hydrating. This is a fast path to know whether this
- // tree is part of a hydrating tree. This is used to determine if a child
- // node has fully mounted yet, and for scheduling event replaying.
- // Conceptually this is similar to Placement in that a new subtree is
- // inserted into the React tree here. It just happens to not need DOM
- // mutations because it already exists.
- node.flags = node.flags & ~Placement | Hydrating;
- node = node.sibling;
- }
- } else {
- // Otherwise reset hydration state in case we aborted and resumed another
- // root.
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- resetHydrationState();
- }
-
- return workInProgress.child;
-}
-
-function updateHostComponent(current, workInProgress, renderLanes) {
- pushHostContext(workInProgress);
-
- if (current === null) {
- tryToClaimNextHydratableInstance(workInProgress);
- }
-
- var type = workInProgress.type;
- var nextProps = workInProgress.pendingProps;
- var prevProps = current !== null ? current.memoizedProps : null;
- var nextChildren = nextProps.children;
- var isDirectTextChild = shouldSetTextContent(type, nextProps);
-
- if (isDirectTextChild) {
- // We special case a direct text child of a host node. This is a common
- // case. We won't handle it as a reified child. We will instead handle
- // this in the host environment that also has access to this prop. That
- // avoids allocating another HostText fiber and traversing it.
- nextChildren = null;
- } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
- // If we're switching from a direct text child to a normal child, or to
- // empty, we need to schedule the text content to be reset.
- workInProgress.flags |= ContentReset;
- }
-
- markRef(current, workInProgress);
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
-}
-
-function updateHostText(current, workInProgress) {
- if (current === null) {
- tryToClaimNextHydratableInstance(workInProgress);
- } // Nothing to do here. This is terminal. We'll do the completion step
- // immediately after.
-
-
- return null;
-}
-
-function mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) {
- if (_current !== null) {
- // A lazy component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
-
- workInProgress.flags |= Placement;
- }
-
- var props = workInProgress.pendingProps;
- var lazyComponent = elementType;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
- var Component = init(payload); // Store the unwrapped component in the type.
-
- workInProgress.type = Component;
- var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
- var resolvedProps = resolveDefaultProps(Component, props);
- var child;
-
- switch (resolvedTag) {
- case FunctionComponent:
- {
- {
- validateFunctionComponentInDev(workInProgress, Component);
- workInProgress.type = Component = resolveFunctionForHotReloading(Component);
- }
-
- child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);
- return child;
- }
-
- case ClassComponent:
- {
- {
- workInProgress.type = Component = resolveClassForHotReloading(Component);
- }
-
- child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);
- return child;
- }
-
- case ForwardRef:
- {
- {
- workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
- }
-
- child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);
- return child;
- }
-
- case MemoComponent:
- {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- var outerPropTypes = Component.propTypes;
-
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
- 'prop', getComponentName(Component));
- }
- }
- }
-
- child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
- updateLanes, renderLanes);
- return child;
- }
- }
-
- var hint = '';
-
- {
- if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
- hint = ' Did you wrap a component in React.lazy() more than once?';
- }
- } // This message intentionally doesn't mention ForwardRef or MemoComponent
- // because the fact that it's a separate type of work is an
- // implementation detail.
-
-
- {
- {
- throw Error( "Element type is invalid. Received a promise that resolves to: " + Component + ". Lazy element type must resolve to a class or function." + hint );
- }
- }
-}
-
-function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
- if (_current !== null) {
- // An incomplete component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
-
- workInProgress.flags |= Placement;
- } // Promote the fiber to a class and try rendering again.
-
-
- workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
- // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
-
- var hasContext;
-
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
-
- prepareToReadContext(workInProgress, renderLanes);
- constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderLanes);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
-}
-
-function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
- if (_current !== null) {
- // An indeterminate component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
-
- workInProgress.flags |= Placement;
- }
-
- var props = workInProgress.pendingProps;
- var context;
-
- {
- var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
- context = getMaskedContext(workInProgress, unmaskedContext);
- }
-
- prepareToReadContext(workInProgress, renderLanes);
- var value;
-
- {
- if (Component.prototype && typeof Component.prototype.render === 'function') {
- var componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutBadClass[componentName]) {
- 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);
-
- didWarnAboutBadClass[componentName] = true;
- }
- }
-
- if (workInProgress.mode & StrictMode) {
- ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
- }
-
- setIsRendering(true);
- ReactCurrentOwner$1.current = workInProgress;
- value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
- setIsRendering(false);
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
-
- {
- // Support for module components is deprecated and is removed behind a flag.
- // Whether or not it would crash later, we want to show a good message in DEV first.
- if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
- var _componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutModulePatternComponent[_componentName]) {
- 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);
-
- didWarnAboutModulePatternComponent[_componentName] = true;
- }
- }
- }
-
- if ( // Run these checks in production only if the flag is off.
- // Eventually we'll delete this branch altogether.
- typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
- {
- var _componentName2 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutModulePatternComponent[_componentName2]) {
- 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);
-
- didWarnAboutModulePatternComponent[_componentName2] = true;
- }
- } // Proceed under the assumption that this is a class instance
-
-
- workInProgress.tag = ClassComponent; // Throw out any hooks that were used.
-
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
-
- var hasContext = false;
-
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
-
- workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
- initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = Component.getDerivedStateFromProps;
-
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
- }
-
- adoptClassInstance(workInProgress, value);
- mountClassInstance(workInProgress, Component, props, renderLanes);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
- } else {
- // Proceed under the assumption that this is a function component
- workInProgress.tag = FunctionComponent;
-
- {
-
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
- } finally {
- reenableLogs();
- }
- }
- }
-
- reconcileChildren(null, workInProgress, value, renderLanes);
-
- {
- validateFunctionComponentInDev(workInProgress, Component);
- }
-
- return workInProgress.child;
- }
-}
-
-function validateFunctionComponentInDev(workInProgress, Component) {
- {
- if (Component) {
- if (Component.childContextTypes) {
- error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
- }
- }
-
- if (workInProgress.ref !== null) {
- var info = '';
- var ownerName = getCurrentFiberOwnerNameInDevOrNull();
-
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
-
- var warningKey = ownerName || workInProgress._debugID || '';
- var debugSource = workInProgress._debugSource;
-
- if (debugSource) {
- warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
- }
-
- if (!didWarnAboutFunctionRefs[warningKey]) {
- didWarnAboutFunctionRefs[warningKey] = true;
-
- error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
- }
- }
-
- if (typeof Component.getDerivedStateFromProps === 'function') {
- var _componentName3 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
- error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);
-
- didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
- }
- }
-
- if (typeof Component.contextType === 'object' && Component.contextType !== null) {
- var _componentName4 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
- error('%s: Function components do not support contextType.', _componentName4);
-
- didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
- }
- }
- }
-}
-
-var SUSPENDED_MARKER = {
- dehydrated: null,
- retryLane: NoLane
-};
-
-function mountSuspenseOffscreenState(renderLanes) {
- return {
- baseLanes: renderLanes
- };
-}
-
-function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {
- return {
- baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)
- };
-} // TODO: Probably should inline this back
-
-
-function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
- // If we're already showing a fallback, there are cases where we need to
- // remain on that fallback regardless of whether the content has resolved.
- // For example, SuspenseList coordinates when nested content appears.
- if (current !== null) {
- var suspenseState = current.memoizedState;
-
- if (suspenseState === null) {
- // Currently showing content. Don't hide it, even if ForceSuspenseFallack
- // is true. More precise name might be "ForceRemainSuspenseFallback".
- // Note: This is a factoring smell. Can't remain on a fallback if there's
- // no fallback to remain on.
- return false;
- }
- } // Not currently showing content. Consult the Suspense context.
-
-
- return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
-}
-
-function getRemainingWorkInPrimaryTree(current, renderLanes) {
- // TODO: Should not remove render lanes that were pinged during this render
- return removeLanes(current.childLanes, renderLanes);
-}
-
-function updateSuspenseComponent(current, workInProgress, renderLanes) {
- var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.
-
- {
- if (shouldSuspend(workInProgress)) {
- workInProgress.flags |= DidCapture;
- }
- }
-
- var suspenseContext = suspenseStackCursor.current;
- var showFallback = false;
- var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;
-
- if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
- // Something in this boundary's subtree already suspended. Switch to
- // rendering the fallback children.
- showFallback = true;
- workInProgress.flags &= ~DidCapture;
- } else {
- // Attempting the main content
- if (current === null || current.memoizedState !== null) {
- // This is a new mount or this boundary is already showing a fallback state.
- // Mark this subtree context as having at least one invisible parent that could
- // handle the fallback state.
- // Boundaries without fallbacks or should be avoided are not considered since
- // they cannot handle preferred fallback states.
- if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {
- suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
- }
- }
- }
-
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
- // boundary's children. This involves some custom reconcilation logic. Two
- // main reasons this is so complicated.
- //
- // First, Legacy Mode has different semantics for backwards compatibility. The
- // primary tree will commit in an inconsistent state, so when we do the
- // second pass to render the fallback, we do some exceedingly, uh, clever
- // hacks to make that not totally break. Like transferring effects and
- // deletions from hidden tree. In Concurrent Mode, it's much simpler,
- // because we bailout on the primary tree completely and leave it in its old
- // state, no effects. Same as what we do for Offscreen (except that
- // Offscreen doesn't have the first render pass).
- //
- // Second is hydration. During hydration, the Suspense fiber has a slightly
- // different layout, where the child points to a dehydrated fragment, which
- // contains the DOM rendered by the server.
- //
- // Third, even if you set all that aside, Suspense is like error boundaries in
- // that we first we try to render one tree, and if that fails, we render again
- // and switch to a different tree. Like a try/catch block. So we have to track
- // which branch we're currently rendering. Ideally we would model this using
- // a stack.
-
- if (current === null) {
- // Initial mount
- // If we're currently hydrating, try to hydrate this boundary.
- // But only if this has a fallback.
- if (nextProps.fallback !== undefined) {
- tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
- }
-
- var nextPrimaryChildren = nextProps.children;
- var nextFallbackChildren = nextProps.fallback;
-
- if (showFallback) {
- var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
- var primaryChildFragment = workInProgress.child;
- primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
- workInProgress.memoizedState = SUSPENDED_MARKER;
- return fallbackFragment;
- } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {
- // This is a CPU-bound tree. Skip this tree and show a placeholder to
- // unblock the surrounding content. Then immediately retry after the
- // initial commit.
- var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
-
- var _primaryChildFragment = workInProgress.child;
- _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
- workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to
- // get it started back up to attempt the next item. While in terms of
- // priority this work has the same priority as this current render, it's
- // not part of the same transition once the transition has committed. If
- // it's sync, we still want to yield so that it can be painted.
- // Conceptually, this is really the same as pinging. We can use any
- // RetryLane even if it's the one currently rendering since we're leaving
- // it behind on this node.
-
- workInProgress.lanes = SomeRetryLane;
-
- {
- markSpawnedWork(SomeRetryLane);
- }
-
- return _fallbackFragment;
- } else {
- return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);
- }
- } else {
- // This is an update.
- // If the current fiber has a SuspenseState, that means it's already showing
- // a fallback.
- var prevState = current.memoizedState;
-
- if (prevState !== null) {
-
- if (showFallback) {
- var _nextFallbackChildren2 = nextProps.fallback;
- var _nextPrimaryChildren2 = nextProps.children;
-
- var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);
-
- var _primaryChildFragment3 = workInProgress.child;
- var prevOffscreenState = current.child.memoizedState;
- _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);
- _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);
- workInProgress.memoizedState = SUSPENDED_MARKER;
- return _fallbackChildFragment;
- } else {
- var _nextPrimaryChildren3 = nextProps.children;
-
- var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);
-
- workInProgress.memoizedState = null;
- return _primaryChildFragment4;
- }
- } else {
- // The current tree is not already showing a fallback.
- if (showFallback) {
- // Timed out.
- var _nextFallbackChildren3 = nextProps.fallback;
- var _nextPrimaryChildren4 = nextProps.children;
-
- var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);
-
- var _primaryChildFragment5 = workInProgress.child;
- var _prevOffscreenState = current.child.memoizedState;
- _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);
- _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the
- // fallback children.
-
- workInProgress.memoizedState = SUSPENDED_MARKER;
- return _fallbackChildFragment2;
- } else {
- // Still haven't timed out. Continue rendering the children, like we
- // normally do.
- var _nextPrimaryChildren5 = nextProps.children;
-
- var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);
-
- workInProgress.memoizedState = null;
- return _primaryChildFragment6;
- }
- }
- }
-}
-
-function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {
- var mode = workInProgress.mode;
- var primaryChildProps = {
- mode: 'visible',
- children: primaryChildren
- };
- var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);
- primaryChildFragment.return = workInProgress;
- workInProgress.child = primaryChildFragment;
- return primaryChildFragment;
-}
-
-function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {
- var mode = workInProgress.mode;
- var progressedPrimaryFragment = workInProgress.child;
- var primaryChildProps = {
- mode: 'hidden',
- children: primaryChildren
- };
- var primaryChildFragment;
- var fallbackChildFragment;
-
- if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {
- // In legacy mode, we commit the primary tree as if it successfully
- // completed, even though it's in an inconsistent state.
- primaryChildFragment = progressedPrimaryFragment;
- primaryChildFragment.childLanes = NoLanes;
- primaryChildFragment.pendingProps = primaryChildProps;
-
- if ( workInProgress.mode & ProfileMode) {
- // Reset the durations from the first pass so they aren't included in the
- // final amounts. This seems counterintuitive, since we're intentionally
- // not measuring part of the render phase, but this makes it match what we
- // do in Concurrent Mode.
- primaryChildFragment.actualDuration = 0;
- primaryChildFragment.actualStartTime = -1;
- primaryChildFragment.selfBaseDuration = 0;
- primaryChildFragment.treeBaseDuration = 0;
- }
-
- fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
- } else {
- primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);
- fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
- }
-
- primaryChildFragment.return = workInProgress;
- fallbackChildFragment.return = workInProgress;
- primaryChildFragment.sibling = fallbackChildFragment;
- workInProgress.child = primaryChildFragment;
- return fallbackChildFragment;
-}
-
-function createWorkInProgressOffscreenFiber(current, offscreenProps) {
- // The props argument to `createWorkInProgress` is `any` typed, so we use this
- // wrapper function to constrain it.
- return createWorkInProgress(current, offscreenProps);
-}
-
-function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {
- var currentPrimaryChildFragment = current.child;
- var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
- var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
- mode: 'visible',
- children: primaryChildren
- });
-
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- primaryChildFragment.lanes = renderLanes;
- }
-
- primaryChildFragment.return = workInProgress;
- primaryChildFragment.sibling = null;
-
- if (currentFallbackChildFragment !== null) {
- // Delete the fallback child fragment
- currentFallbackChildFragment.nextEffect = null;
- currentFallbackChildFragment.flags = Deletion;
- workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
- }
-
- workInProgress.child = primaryChildFragment;
- return primaryChildFragment;
-}
-
-function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
- var mode = workInProgress.mode;
- var currentPrimaryChildFragment = current.child;
- var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
- var primaryChildProps = {
- mode: 'hidden',
- children: primaryChildren
- };
- var primaryChildFragment;
-
- if ( // In legacy mode, we commit the primary tree as if it successfully
- // completed, even though it's in an inconsistent state.
- (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
- // already cloned. In legacy mode, the only case where this isn't true is
- // when DevTools forces us to display a fallback; we skip the first render
- // pass entirely and go straight to rendering the fallback. (In Concurrent
- // Mode, SuspenseList can also trigger this scenario, but this is a legacy-
- // only codepath.)
- workInProgress.child !== currentPrimaryChildFragment) {
- var progressedPrimaryFragment = workInProgress.child;
- primaryChildFragment = progressedPrimaryFragment;
- primaryChildFragment.childLanes = NoLanes;
- primaryChildFragment.pendingProps = primaryChildProps;
-
- if ( workInProgress.mode & ProfileMode) {
- // Reset the durations from the first pass so they aren't included in the
- // final amounts. This seems counterintuitive, since we're intentionally
- // not measuring part of the render phase, but this makes it match what we
- // do in Concurrent Mode.
- primaryChildFragment.actualDuration = 0;
- primaryChildFragment.actualStartTime = -1;
- primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
- primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
- } // The fallback fiber was added as a deletion effect during the first pass.
- // However, since we're going to remain on the fallback, we no longer want
- // to delete it. So we need to remove it from the list. Deletions are stored
- // on the same list as effects. We want to keep the effects from the primary
- // tree. So we copy the primary child fragment's effect list, which does not
- // include the fallback deletion effect.
-
-
- var progressedLastEffect = primaryChildFragment.lastEffect;
-
- if (progressedLastEffect !== null) {
- workInProgress.firstEffect = primaryChildFragment.firstEffect;
- workInProgress.lastEffect = progressedLastEffect;
- progressedLastEffect.nextEffect = null;
- } else {
- // TODO: Reset this somewhere else? Lol legacy mode is so weird.
- workInProgress.firstEffect = workInProgress.lastEffect = null;
- }
- } else {
- primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);
- }
-
- var fallbackChildFragment;
-
- if (currentFallbackChildFragment !== null) {
- fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
- } else {
- fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already
- // mounted but this is a new fiber.
-
- fallbackChildFragment.flags |= Placement;
- }
-
- fallbackChildFragment.return = workInProgress;
- primaryChildFragment.return = workInProgress;
- primaryChildFragment.sibling = fallbackChildFragment;
- workInProgress.child = primaryChildFragment;
- return fallbackChildFragment;
-}
-
-function scheduleWorkOnFiber(fiber, renderLanes) {
- fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
- var alternate = fiber.alternate;
-
- if (alternate !== null) {
- alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
- }
-
- scheduleWorkOnParentPath(fiber.return, renderLanes);
-}
-
-function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
- // Mark any Suspense boundaries with fallbacks as having work to do.
- // If they were previously forced into fallbacks, they may now be able
- // to unblock.
- var node = firstChild;
-
- while (node !== null) {
- if (node.tag === SuspenseComponent) {
- var state = node.memoizedState;
-
- if (state !== null) {
- scheduleWorkOnFiber(node, renderLanes);
- }
- } else if (node.tag === SuspenseListComponent) {
- // If the tail is hidden there might not be an Suspense boundaries
- // to schedule work on. In this case we have to schedule it on the
- // list itself.
- // We don't have to traverse to the children of the list since
- // the list will propagate the change when it rerenders.
- scheduleWorkOnFiber(node, renderLanes);
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === workInProgress) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === workInProgress) {
- return;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
-}
-
-function findLastContentRow(firstChild) {
- // This is going to find the last row among these children that is already
- // showing content on the screen, as opposed to being in fallback state or
- // new. If a row has multiple Suspense boundaries, any of them being in the
- // fallback state, counts as the whole row being in a fallback state.
- // Note that the "rows" will be workInProgress, but any nested children
- // will still be current since we haven't rendered them yet. The mounted
- // order may not be the same as the new order. We use the new order.
- var row = firstChild;
- var lastContentRow = null;
-
- while (row !== null) {
- var currentRow = row.alternate; // New rows can't be content rows.
-
- if (currentRow !== null && findFirstSuspended(currentRow) === null) {
- lastContentRow = row;
- }
-
- row = row.sibling;
- }
-
- return lastContentRow;
-}
-
-function validateRevealOrder(revealOrder) {
- {
- if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
- didWarnAboutRevealOrder[revealOrder] = true;
-
- if (typeof revealOrder === 'string') {
- switch (revealOrder.toLowerCase()) {
- case 'together':
- case 'forwards':
- case 'backwards':
- {
- error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());
-
- break;
- }
-
- case 'forward':
- case 'backward':
- {
- error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());
-
- break;
- }
-
- default:
- error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
-
- break;
- }
- } else {
- error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
- }
- }
- }
-}
-
-function validateTailOptions(tailMode, revealOrder) {
- {
- if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
- if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
- didWarnAboutTailOptions[tailMode] = true;
-
- error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
- } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
- didWarnAboutTailOptions[tailMode] = true;
-
- error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
- }
- }
- }
-}
-
-function validateSuspenseListNestedChild(childSlot, index) {
- {
- var isArray = Array.isArray(childSlot);
- var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';
-
- if (isArray || isIterable) {
- var type = isArray ? 'array' : 'iterable';
-
- error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);
-
- return false;
- }
- }
-
- return true;
-}
-
-function validateSuspenseListChildren(children, revealOrder) {
- {
- if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- if (!validateSuspenseListNestedChild(children[i], i)) {
- return;
- }
- }
- } else {
- var iteratorFn = getIteratorFn(children);
-
- if (typeof iteratorFn === 'function') {
- var childrenIterator = iteratorFn.call(children);
-
- if (childrenIterator) {
- var step = childrenIterator.next();
- var _i = 0;
-
- for (; !step.done; step = childrenIterator.next()) {
- if (!validateSuspenseListNestedChild(step.value, _i)) {
- return;
- }
-
- _i++;
- }
- }
- } else {
- error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
- }
- }
- }
- }
-}
-
-function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {
- var renderState = workInProgress.memoizedState;
-
- if (renderState === null) {
- workInProgress.memoizedState = {
- isBackwards: isBackwards,
- rendering: null,
- renderingStartTime: 0,
- last: lastContentRow,
- tail: tail,
- tailMode: tailMode,
- lastEffect: lastEffectBeforeRendering
- };
- } else {
- // We can reuse the existing object from previous renders.
- renderState.isBackwards = isBackwards;
- renderState.rendering = null;
- renderState.renderingStartTime = 0;
- renderState.last = lastContentRow;
- renderState.tail = tail;
- renderState.tailMode = tailMode;
- renderState.lastEffect = lastEffectBeforeRendering;
- }
-} // This can end up rendering this component multiple passes.
-// The first pass splits the children fibers into two sets. A head and tail.
-// We first render the head. If anything is in fallback state, we do another
-// pass through beginWork to rerender all children (including the tail) with
-// the force suspend context. If the first render didn't have anything in
-// in fallback state. Then we render each row in the tail one-by-one.
-// That happens in the completeWork phase without going back to beginWork.
-
-
-function updateSuspenseListComponent(current, workInProgress, renderLanes) {
- var nextProps = workInProgress.pendingProps;
- var revealOrder = nextProps.revealOrder;
- var tailMode = nextProps.tail;
- var newChildren = nextProps.children;
- validateRevealOrder(revealOrder);
- validateTailOptions(tailMode, revealOrder);
- validateSuspenseListChildren(newChildren, revealOrder);
- reconcileChildren(current, workInProgress, newChildren, renderLanes);
- var suspenseContext = suspenseStackCursor.current;
- var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
-
- if (shouldForceFallback) {
- suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- workInProgress.flags |= DidCapture;
- } else {
- var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;
-
- if (didSuspendBefore) {
- // If we previously forced a fallback, we need to schedule work
- // on any nested boundaries to let them know to try to render
- // again. This is the same as context updating.
- propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);
- }
-
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- }
-
- pushSuspenseContext(workInProgress, suspenseContext);
-
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // In legacy mode, SuspenseList doesn't work so we just
- // use make it a noop by treating it as the default revealOrder.
- workInProgress.memoizedState = null;
- } else {
- switch (revealOrder) {
- case 'forwards':
- {
- var lastContentRow = findLastContentRow(workInProgress.child);
- var tail;
-
- if (lastContentRow === null) {
- // The whole list is part of the tail.
- // TODO: We could fast path by just rendering the tail now.
- tail = workInProgress.child;
- workInProgress.child = null;
- } else {
- // Disconnect the tail rows after the content row.
- // We're going to render them separately later.
- tail = lastContentRow.sibling;
- lastContentRow.sibling = null;
- }
-
- initSuspenseListRenderState(workInProgress, false, // isBackwards
- tail, lastContentRow, tailMode, workInProgress.lastEffect);
- break;
- }
-
- case 'backwards':
- {
- // We're going to find the first row that has existing content.
- // At the same time we're going to reverse the list of everything
- // we pass in the meantime. That's going to be our tail in reverse
- // order.
- var _tail = null;
- var row = workInProgress.child;
- workInProgress.child = null;
-
- while (row !== null) {
- var currentRow = row.alternate; // New rows can't be content rows.
-
- if (currentRow !== null && findFirstSuspended(currentRow) === null) {
- // This is the beginning of the main content.
- workInProgress.child = row;
- break;
- }
-
- var nextRow = row.sibling;
- row.sibling = _tail;
- _tail = row;
- row = nextRow;
- } // TODO: If workInProgress.child is null, we can continue on the tail immediately.
-
-
- initSuspenseListRenderState(workInProgress, true, // isBackwards
- _tail, null, // last
- tailMode, workInProgress.lastEffect);
- break;
- }
-
- case 'together':
- {
- initSuspenseListRenderState(workInProgress, false, // isBackwards
- null, // tail
- null, // last
- undefined, workInProgress.lastEffect);
- break;
- }
-
- default:
- {
- // The default reveal order is the same as not having
- // a boundary.
- workInProgress.memoizedState = null;
- }
- }
- }
-
- return workInProgress.child;
-}
-
-function updatePortalComponent(current, workInProgress, renderLanes) {
- pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
- var nextChildren = workInProgress.pendingProps;
-
- if (current === null) {
- // Portals are special because we don't append the children during mount
- // but at commit. Therefore we need to track insertions which the normal
- // flow doesn't do during mount. This doesn't happen at the root because
- // the root always starts with a "current" with a null child.
- // TODO: Consider unifying this with how the root works.
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
- } else {
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- }
-
- return workInProgress.child;
-}
-
-var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
-
-function updateContextProvider(current, workInProgress, renderLanes) {
- var providerType = workInProgress.type;
- var context = providerType._context;
- var newProps = workInProgress.pendingProps;
- var oldProps = workInProgress.memoizedProps;
- var newValue = newProps.value;
-
- {
- if (!('value' in newProps)) {
- if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
- hasWarnedAboutUsingNoValuePropOnContextProvider = true;
-
- error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');
- }
- }
-
- var providerPropTypes = workInProgress.type.propTypes;
-
- if (providerPropTypes) {
- checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');
- }
- }
-
- pushProvider(workInProgress, newValue);
-
- if (oldProps !== null) {
- var oldValue = oldProps.value;
- var changedBits = calculateChangedBits(context, newValue, oldValue);
-
- if (changedBits === 0) {
- // No change. Bailout early if children are the same.
- if (oldProps.children === newProps.children && !hasContextChanged()) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- }
- } else {
- // The context value changed. Search for matching consumers and schedule
- // them to update.
- propagateContextChange(workInProgress, context, changedBits, renderLanes);
- }
- }
-
- var newChildren = newProps.children;
- reconcileChildren(current, workInProgress, newChildren, renderLanes);
- return workInProgress.child;
-}
-
-var hasWarnedAboutUsingContextAsConsumer = false;
-
-function updateContextConsumer(current, workInProgress, renderLanes) {
- var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
- // DEV mode, we create a separate object for Context.Consumer that acts
- // like a proxy to Context. This proxy object adds unnecessary code in PROD
- // so we use the old behaviour (Context.Consumer references Context) to
- // reduce size and overhead. The separate object references context via
- // a property called "_context", which also gives us the ability to check
- // in DEV mode if this property exists or not and warn if it does not.
-
- {
- if (context._context === undefined) {
- // This may be because it's a Context (rather than a Consumer).
- // Or it may be because it's older React where they're the same thing.
- // We only want to warn if we're sure it's a new React.
- if (context !== context.Consumer) {
- if (!hasWarnedAboutUsingContextAsConsumer) {
- hasWarnedAboutUsingContextAsConsumer = true;
-
- error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
- }
- } else {
- context = context._context;
- }
- }
-
- var newProps = workInProgress.pendingProps;
- var render = newProps.children;
-
- {
- if (typeof render !== 'function') {
- 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.');
- }
- }
-
- prepareToReadContext(workInProgress, renderLanes);
- var newValue = readContext(context, newProps.unstable_observedBits);
- var newChildren;
-
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- newChildren = render(newValue);
- setIsRendering(false);
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
- reconcileChildren(current, workInProgress, newChildren, renderLanes);
- return workInProgress.child;
-}
-
-function markWorkInProgressReceivedUpdate() {
- didReceiveUpdate = true;
-}
-
-function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
- if (current !== null) {
- // Reuse previous dependencies
- workInProgress.dependencies = current.dependencies;
- }
-
- {
- // Don't update "base" render times for bailouts.
- stopProfilerTimerIfRunning();
- }
-
- markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.
-
- if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
- // The children don't have any work either. We can skip them.
- // TODO: Once we add back resuming, we should check if the children are
- // a work-in-progress set. If so, we need to transfer their effects.
- return null;
- } else {
- // This fiber doesn't have work, but its subtree does. Clone the child
- // fibers and continue.
- cloneChildFibers(current, workInProgress);
- return workInProgress.child;
- }
-}
-
-function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
- {
- var returnFiber = oldWorkInProgress.return;
-
- if (returnFiber === null) {
- throw new Error('Cannot swap the root fiber.');
- } // Disconnect from the old current.
- // It will get deleted.
-
-
- current.alternate = null;
- oldWorkInProgress.alternate = null; // Connect to the new tree.
-
- newWorkInProgress.index = oldWorkInProgress.index;
- newWorkInProgress.sibling = oldWorkInProgress.sibling;
- newWorkInProgress.return = oldWorkInProgress.return;
- newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.
-
- if (oldWorkInProgress === returnFiber.child) {
- returnFiber.child = newWorkInProgress;
- } else {
- var prevSibling = returnFiber.child;
-
- if (prevSibling === null) {
- throw new Error('Expected parent to have a child.');
- }
-
- while (prevSibling.sibling !== oldWorkInProgress) {
- prevSibling = prevSibling.sibling;
-
- if (prevSibling === null) {
- throw new Error('Expected to find the previous sibling.');
- }
- }
-
- prevSibling.sibling = newWorkInProgress;
- } // Delete the old fiber and place the new one.
- // Since the old fiber is disconnected, we have to schedule it manually.
-
-
- var last = returnFiber.lastEffect;
-
- if (last !== null) {
- last.nextEffect = current;
- returnFiber.lastEffect = current;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = current;
- }
-
- current.nextEffect = null;
- current.flags = Deletion;
- newWorkInProgress.flags |= Placement; // Restart work from the new fiber.
-
- return newWorkInProgress;
- }
-}
-
-function beginWork(current, workInProgress, renderLanes) {
- var updateLanes = workInProgress.lanes;
-
- {
- if (workInProgress._debugNeedsRemount && current !== null) {
- // This will restart the begin phase with a new fiber.
- return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
- }
- }
-
- if (current !== null) {
- var oldProps = current.memoizedProps;
- var newProps = workInProgress.pendingProps;
-
- if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
- workInProgress.type !== current.type )) {
- // If props or context changed, mark the fiber as having performed work.
- // This may be unset if the props are determined to be equal later (memo).
- didReceiveUpdate = true;
- } else if (!includesSomeLane(renderLanes, updateLanes)) {
- didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering
- // the begin phase. There's still some bookkeeping we that needs to be done
- // in this optimized path, mostly pushing stuff onto the stack.
-
- switch (workInProgress.tag) {
- case HostRoot:
- pushHostRootContext(workInProgress);
- resetHydrationState();
- break;
-
- case HostComponent:
- pushHostContext(workInProgress);
- break;
-
- case ClassComponent:
- {
- var Component = workInProgress.type;
-
- if (isContextProvider(Component)) {
- pushContextProvider(workInProgress);
- }
-
- break;
- }
-
- case HostPortal:
- pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
- break;
-
- case ContextProvider:
- {
- var newValue = workInProgress.memoizedProps.value;
- pushProvider(workInProgress, newValue);
- break;
- }
-
- case Profiler:
- {
- // Profiler should only call onRender when one of its descendants actually rendered.
- var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
-
- if (hasChildWork) {
- workInProgress.flags |= Update;
- } // Reset effect durations for the next eventual effect phase.
- // These are reset during render to allow the DevTools commit hook a chance to read them,
-
-
- var stateNode = workInProgress.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- }
-
- break;
-
- case SuspenseComponent:
- {
- var state = workInProgress.memoizedState;
-
- if (state !== null) {
- // whether to retry the primary children, or to skip over it and
- // go straight to the fallback. Check the priority of the primary
- // child fragment.
-
-
- var primaryChildFragment = workInProgress.child;
- var primaryChildLanes = primaryChildFragment.childLanes;
-
- if (includesSomeLane(renderLanes, primaryChildLanes)) {
- // The primary children have pending work. Use the normal path
- // to attempt to render the primary children again.
- return updateSuspenseComponent(current, workInProgress, renderLanes);
- } else {
- // The primary child fragment does not have pending work marked
- // on it
- pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
- // priority. Bailout.
-
- var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
-
- if (child !== null) {
- // The fallback children have pending work. Skip over the
- // primary children and work on the fallback.
- return child.sibling;
- } else {
- return null;
- }
- }
- } else {
- pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
- }
-
- break;
- }
-
- case SuspenseListComponent:
- {
- var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;
-
- var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
-
- if (didSuspendBefore) {
- if (_hasChildWork) {
- // If something was in fallback state last time, and we have all the
- // same children then we're still in progressive loading state.
- // Something might get unblocked by state updates or retries in the
- // tree which will affect the tail. So we need to use the normal
- // path to compute the correct tail.
- return updateSuspenseListComponent(current, workInProgress, renderLanes);
- } // If none of the children had any work, that means that none of
- // them got retried so they'll still be blocked in the same way
- // as before. We can fast bail out.
-
-
- workInProgress.flags |= DidCapture;
- } // If nothing suspended before and we're rendering the same children,
- // then the tail doesn't matter. Anything new that suspends will work
- // in the "together" mode, so we can continue from the state we had.
-
-
- var renderState = workInProgress.memoizedState;
-
- if (renderState !== null) {
- // Reset to the "together" mode in case we've started a different
- // update in the past but didn't complete it.
- renderState.rendering = null;
- renderState.tail = null;
- renderState.lastEffect = null;
- }
-
- pushSuspenseContext(workInProgress, suspenseStackCursor.current);
-
- if (_hasChildWork) {
- break;
- } else {
- // If none of the children had any work, that means that none of
- // them got retried so they'll still be blocked in the same way
- // as before. We can fast bail out.
- return null;
- }
- }
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- {
- // Need to check if the tree still needs to be deferred. This is
- // almost identical to the logic used in the normal update path,
- // so we'll just enter that. The only difference is we'll bail out
- // at the next level instead of this one, because the child props
- // have not changed. Which is fine.
- // TODO: Probably should refactor `beginWork` to split the bailout
- // path from the normal path. I'm tempted to do a labeled break here
- // but I won't :)
- workInProgress.lanes = NoLanes;
- return updateOffscreenComponent(current, workInProgress, renderLanes);
- }
- }
-
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- } else {
- if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
- // This is a special case that only exists for legacy mode.
- // See https://github.com/facebook/react/pull/19216.
- didReceiveUpdate = true;
- } else {
- // An update was scheduled on this fiber, but there are no new props
- // nor legacy context. Set this to false. If an update queue or context
- // consumer produces a changed value, it will set this to true. Otherwise,
- // the component will assume the children have not changed and bail out.
- didReceiveUpdate = false;
- }
- }
- } else {
- didReceiveUpdate = false;
- } // Before entering the begin phase, clear pending update priority.
- // TODO: This assumes that we're about to evaluate the component and process
- // the update queue. However, there's an exception: SimpleMemoComponent
- // sometimes bails out later in the begin phase. This indicates that we should
- // move this assignment out of the common path and into each branch.
-
-
- workInProgress.lanes = NoLanes;
-
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- {
- return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
- }
-
- case LazyComponent:
- {
- var elementType = workInProgress.elementType;
- return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);
- }
-
- case FunctionComponent:
- {
- var _Component = workInProgress.type;
- var unresolvedProps = workInProgress.pendingProps;
- var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
- return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);
- }
-
- case ClassComponent:
- {
- var _Component2 = workInProgress.type;
- var _unresolvedProps = workInProgress.pendingProps;
-
- var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
-
- return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);
- }
-
- case HostRoot:
- return updateHostRoot(current, workInProgress, renderLanes);
-
- case HostComponent:
- return updateHostComponent(current, workInProgress, renderLanes);
-
- case HostText:
- return updateHostText(current, workInProgress);
-
- case SuspenseComponent:
- return updateSuspenseComponent(current, workInProgress, renderLanes);
-
- case HostPortal:
- return updatePortalComponent(current, workInProgress, renderLanes);
-
- case ForwardRef:
- {
- var type = workInProgress.type;
- var _unresolvedProps2 = workInProgress.pendingProps;
-
- var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
-
- return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);
- }
-
- case Fragment:
- return updateFragment(current, workInProgress, renderLanes);
-
- case Mode:
- return updateMode(current, workInProgress, renderLanes);
-
- case Profiler:
- return updateProfiler(current, workInProgress, renderLanes);
-
- case ContextProvider:
- return updateContextProvider(current, workInProgress, renderLanes);
-
- case ContextConsumer:
- return updateContextConsumer(current, workInProgress, renderLanes);
-
- case MemoComponent:
- {
- var _type2 = workInProgress.type;
- var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.
-
- var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
-
- {
- if (workInProgress.type !== workInProgress.elementType) {
- var outerPropTypes = _type2.propTypes;
-
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
- 'prop', getComponentName(_type2));
- }
- }
- }
-
- _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
- return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);
- }
-
- case SimpleMemoComponent:
- {
- return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);
- }
-
- case IncompleteClassComponent:
- {
- var _Component3 = workInProgress.type;
- var _unresolvedProps4 = workInProgress.pendingProps;
-
- var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
-
- return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);
- }
-
- case SuspenseListComponent:
- {
- return updateSuspenseListComponent(current, workInProgress, renderLanes);
- }
-
- case FundamentalComponent:
- {
-
- break;
- }
-
- case ScopeComponent:
- {
-
- break;
- }
-
- case Block:
- {
-
- break;
- }
-
- case OffscreenComponent:
- {
- return updateOffscreenComponent(current, workInProgress, renderLanes);
- }
-
- case LegacyHiddenComponent:
- {
- return updateLegacyHiddenComponent(current, workInProgress, renderLanes);
- }
- }
-
- {
- {
- throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-}
-
-function markUpdate(workInProgress) {
- // Tag the fiber with an update effect. This turns a Placement into
- // a PlacementAndUpdate.
- workInProgress.flags |= Update;
-}
-
-function markRef$1(workInProgress) {
- workInProgress.flags |= Ref;
-}
-
-var appendAllChildren;
-var updateHostContainer;
-var updateHostComponent$1;
-var updateHostText$1;
-
-{
- // Mutation mode
- appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
- // We only have the top Fiber that was created but we need recurse down its
- // children to find all the terminal nodes.
- var node = workInProgress.child;
-
- while (node !== null) {
- if (node.tag === HostComponent || node.tag === HostText) {
- appendInitialChild(parent, node.stateNode);
- } else if (node.tag === HostPortal) ; else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === workInProgress) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === workInProgress) {
- return;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- };
-
- updateHostContainer = function (workInProgress) {// Noop
- };
-
- updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
- // If we have an alternate, that means this is an update and we need to
- // schedule a side-effect to do the updates.
- var oldProps = current.memoizedProps;
-
- if (oldProps === newProps) {
- // In mutation mode, this is sufficient for a bailout because
- // we won't touch this node even if children changed.
- return;
- } // If we get updated because one of our children updated, we don't
- // have newProps so we'll have to reuse them.
- // TODO: Split the update API as separate for the props vs. children.
- // Even better would be if children weren't special cased at all tho.
-
-
- var instance = workInProgress.stateNode;
- var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host
- // component is hitting the resume path. Figure out why. Possibly
- // related to `hidden`.
-
- var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.
-
- workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
- // is a new ref we mark this as an update. All the work is done in commitWork.
-
- if (updatePayload) {
- markUpdate(workInProgress);
- }
- };
-
- updateHostText$1 = function (current, workInProgress, oldText, newText) {
- // If the text differs, mark it as an update. All the work in done in commitWork.
- if (oldText !== newText) {
- markUpdate(workInProgress);
- }
- };
-}
-
-function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
- if (getIsHydrating()) {
- // If we're hydrating, we should consume as many items as we can
- // so we don't leave any behind.
- return;
- }
-
- switch (renderState.tailMode) {
- case 'hidden':
- {
- // Any insertions at the end of the tail list after this point
- // should be invisible. If there are already mounted boundaries
- // anything before them are not considered for collapsing.
- // Therefore we need to go through the whole tail to find if
- // there are any.
- var tailNode = renderState.tail;
- var lastTailNode = null;
-
- while (tailNode !== null) {
- if (tailNode.alternate !== null) {
- lastTailNode = tailNode;
- }
-
- tailNode = tailNode.sibling;
- } // Next we're simply going to delete all insertions after the
- // last rendered item.
-
-
- if (lastTailNode === null) {
- // All remaining items in the tail are insertions.
- renderState.tail = null;
- } else {
- // Detach the insertion after the last node that was already
- // inserted.
- lastTailNode.sibling = null;
- }
-
- break;
- }
-
- case 'collapsed':
- {
- // Any insertions at the end of the tail list after this point
- // should be invisible. If there are already mounted boundaries
- // anything before them are not considered for collapsing.
- // Therefore we need to go through the whole tail to find if
- // there are any.
- var _tailNode = renderState.tail;
- var _lastTailNode = null;
-
- while (_tailNode !== null) {
- if (_tailNode.alternate !== null) {
- _lastTailNode = _tailNode;
- }
-
- _tailNode = _tailNode.sibling;
- } // Next we're simply going to delete all insertions after the
- // last rendered item.
-
-
- if (_lastTailNode === null) {
- // All remaining items in the tail are insertions.
- if (!hasRenderedATailFallback && renderState.tail !== null) {
- // We suspended during the head. We want to show at least one
- // row at the tail. So we'll keep on and cut off the rest.
- renderState.tail.sibling = null;
- } else {
- renderState.tail = null;
- }
- } else {
- // Detach the insertion after the last node that was already
- // inserted.
- _lastTailNode.sibling = null;
- }
-
- break;
- }
- }
-}
-
-function completeWork(current, workInProgress, renderLanes) {
- var newProps = workInProgress.pendingProps;
-
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- case LazyComponent:
- case SimpleMemoComponent:
- case FunctionComponent:
- case ForwardRef:
- case Fragment:
- case Mode:
- case Profiler:
- case ContextConsumer:
- case MemoComponent:
- return null;
-
- case ClassComponent:
- {
- var Component = workInProgress.type;
-
- if (isContextProvider(Component)) {
- popContext(workInProgress);
- }
-
- return null;
- }
-
- case HostRoot:
- {
- popHostContainer(workInProgress);
- popTopLevelContextObject(workInProgress);
- resetWorkInProgressVersions();
- var fiberRoot = workInProgress.stateNode;
-
- if (fiberRoot.pendingContext) {
- fiberRoot.context = fiberRoot.pendingContext;
- fiberRoot.pendingContext = null;
- }
-
- if (current === null || current.child === null) {
- // If we hydrated, pop so that we can delete any remaining children
- // that weren't hydrated.
- var wasHydrated = popHydrationState(workInProgress);
-
- if (wasHydrated) {
- // If we hydrated, then we'll need to schedule an update for
- // the commit side-effects on the root.
- markUpdate(workInProgress);
- } else if (!fiberRoot.hydrate) {
- // Schedule an effect to clear this container at the start of the next commit.
- // This handles the case of React rendering into a container with previous children.
- // It's also safe to do for updates too, because current.child would only be null
- // if the previous render was null (so the the container would already be empty).
- workInProgress.flags |= Snapshot;
- }
- }
-
- updateHostContainer(workInProgress);
- return null;
- }
-
- case HostComponent:
- {
- popHostContext(workInProgress);
- var rootContainerInstance = getRootHostContainer();
- var type = workInProgress.type;
-
- if (current !== null && workInProgress.stateNode != null) {
- updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);
-
- if (current.ref !== workInProgress.ref) {
- markRef$1(workInProgress);
- }
- } else {
- if (!newProps) {
- if (!(workInProgress.stateNode !== null)) {
- {
- throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // This can happen when we abort work.
-
-
- return null;
- }
-
- var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
- // "stack" as the parent. Then append children as we go in beginWork
- // or completeWork depending on whether we want to add them top->down or
- // bottom->up. Top->down is faster in IE11.
-
- var _wasHydrated = popHydrationState(workInProgress);
-
- if (_wasHydrated) {
- // TODO: Move this and createInstance step into the beginPhase
- // to consolidate.
- if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
- // If changes to the hydrated node need to be applied at the
- // commit-phase we mark this as such.
- markUpdate(workInProgress);
- }
- } else {
- var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
- appendAllChildren(instance, workInProgress, false, false);
- workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
- // (eg DOM renderer supports auto-focus for certain elements).
- // Make sure such renderers get scheduled for later work.
-
- if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
- markUpdate(workInProgress);
- }
- }
-
- if (workInProgress.ref !== null) {
- // If there is a ref on a host node we need to schedule a callback
- markRef$1(workInProgress);
- }
- }
-
- return null;
- }
-
- case HostText:
- {
- var newText = newProps;
-
- if (current && workInProgress.stateNode != null) {
- var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
- // to schedule a side-effect to do the updates.
-
- updateHostText$1(current, workInProgress, oldText, newText);
- } else {
- if (typeof newText !== 'string') {
- if (!(workInProgress.stateNode !== null)) {
- {
- throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // This can happen when we abort work.
-
- }
-
- var _rootContainerInstance = getRootHostContainer();
-
- var _currentHostContext = getHostContext();
-
- var _wasHydrated2 = popHydrationState(workInProgress);
-
- if (_wasHydrated2) {
- if (prepareToHydrateHostTextInstance(workInProgress)) {
- markUpdate(workInProgress);
- }
- } else {
- workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
- }
- }
-
- return null;
- }
-
- case SuspenseComponent:
- {
- popSuspenseContext(workInProgress);
- var nextState = workInProgress.memoizedState;
-
- if ((workInProgress.flags & DidCapture) !== NoFlags) {
- // Something suspended. Re-render with the fallback children.
- workInProgress.lanes = renderLanes; // Do not reset the effect list.
-
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
- transferActualDuration(workInProgress);
- }
-
- return workInProgress;
- }
-
- var nextDidTimeout = nextState !== null;
- var prevDidTimeout = false;
-
- if (current === null) {
- if (workInProgress.memoizedProps.fallback !== undefined) {
- popHydrationState(workInProgress);
- }
- } else {
- var prevState = current.memoizedState;
- prevDidTimeout = prevState !== null;
- }
-
- if (nextDidTimeout && !prevDidTimeout) {
- // If this subtreee is running in blocking mode we can suspend,
- // otherwise we won't suspend.
- // TODO: This will still suspend a synchronous tree if anything
- // in the concurrent tree already suspended during this render.
- // This is a known bug.
- if ((workInProgress.mode & BlockingMode) !== NoMode) {
- // TODO: Move this back to throwException because this is too late
- // if this is a large tree which is common for initial loads. We
- // don't know if we should restart a render or not until we get
- // this marker, and this is too late.
- // If this render already had a ping or lower pri updates,
- // and this is the first time we know we're going to suspend we
- // should be able to immediately restart from within throwException.
- var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;
-
- if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
- // If this was in an invisible tree or a new render, then showing
- // this boundary is ok.
- renderDidSuspend();
- } else {
- // Otherwise, we're going to have to hide content so we should
- // suspend for longer if possible.
- renderDidSuspendDelayIfPossible();
- }
- }
- }
-
- {
- // TODO: Only schedule updates if these values are non equal, i.e. it changed.
- if (nextDidTimeout || prevDidTimeout) {
- // If this boundary just timed out, schedule an effect to attach a
- // retry listener to the promise. This flag is also used to hide the
- // primary children. In mutation mode, we also need the flag to
- // *unhide* children that were previously hidden, so check if this
- // is currently timed out, too.
- workInProgress.flags |= Update;
- }
- }
-
- return null;
- }
-
- case HostPortal:
- popHostContainer(workInProgress);
- updateHostContainer(workInProgress);
-
- if (current === null) {
- preparePortalMount(workInProgress.stateNode.containerInfo);
- }
-
- return null;
-
- case ContextProvider:
- // Pop provider fiber
- popProvider(workInProgress);
- return null;
-
- case IncompleteClassComponent:
- {
- // Same as class component case. I put it down here so that the tags are
- // sequential to ensure this switch is compiled to a jump table.
- var _Component = workInProgress.type;
-
- if (isContextProvider(_Component)) {
- popContext(workInProgress);
- }
-
- return null;
- }
-
- case SuspenseListComponent:
- {
- popSuspenseContext(workInProgress);
- var renderState = workInProgress.memoizedState;
-
- if (renderState === null) {
- // We're running in the default, "independent" mode.
- // We don't do anything in this mode.
- return null;
- }
-
- var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;
- var renderedTail = renderState.rendering;
-
- if (renderedTail === null) {
- // We just rendered the head.
- if (!didSuspendAlready) {
- // This is the first pass. We need to figure out if anything is still
- // suspended in the rendered set.
- // If new content unsuspended, but there's still some content that
- // didn't. Then we need to do a second pass that forces everything
- // to keep showing their fallbacks.
- // We might be suspended if something in this render pass suspended, or
- // something in the previous committed pass suspended. Otherwise,
- // there's no chance so we can skip the expensive call to
- // findFirstSuspended.
- var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);
-
- if (!cannotBeSuspended) {
- var row = workInProgress.child;
-
- while (row !== null) {
- var suspended = findFirstSuspended(row);
-
- if (suspended !== null) {
- didSuspendAlready = true;
- workInProgress.flags |= DidCapture;
- cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
- // part of the second pass. In that case nothing will subscribe to
- // its thennables. Instead, we'll transfer its thennables to the
- // SuspenseList so that it can retry if they resolve.
- // There might be multiple of these in the list but since we're
- // going to wait for all of them anyway, it doesn't really matter
- // which ones gets to ping. In theory we could get clever and keep
- // track of how many dependencies remain but it gets tricky because
- // in the meantime, we can add/remove/change items and dependencies.
- // We might bail out of the loop before finding any but that
- // doesn't matter since that means that the other boundaries that
- // we did find already has their listeners attached.
-
- var newThennables = suspended.updateQueue;
-
- if (newThennables !== null) {
- workInProgress.updateQueue = newThennables;
- workInProgress.flags |= Update;
- } // Rerender the whole list, but this time, we'll force fallbacks
- // to stay in place.
- // Reset the effect list before doing the second pass since that's now invalid.
-
-
- if (renderState.lastEffect === null) {
- workInProgress.firstEffect = null;
- }
-
- workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.
-
- resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately
- // rerender the children.
-
- pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
- return workInProgress.child;
- }
-
- row = row.sibling;
- }
- }
-
- if (renderState.tail !== null && now() > getRenderTargetTime()) {
- // We have already passed our CPU deadline but we still have rows
- // left in the tail. We'll just give up further attempts to render
- // the main content and only render fallbacks.
- workInProgress.flags |= DidCapture;
- didSuspendAlready = true;
- cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
- // to get it started back up to attempt the next item. While in terms
- // of priority this work has the same priority as this current render,
- // it's not part of the same transition once the transition has
- // committed. If it's sync, we still want to yield so that it can be
- // painted. Conceptually, this is really the same as pinging.
- // We can use any RetryLane even if it's the one currently rendering
- // since we're leaving it behind on this node.
-
- workInProgress.lanes = SomeRetryLane;
-
- {
- markSpawnedWork(SomeRetryLane);
- }
- }
- } else {
- cutOffTailIfNeeded(renderState, false);
- } // Next we're going to render the tail.
-
- } else {
- // Append the rendered row to the child list.
- if (!didSuspendAlready) {
- var _suspended = findFirstSuspended(renderedTail);
-
- if (_suspended !== null) {
- workInProgress.flags |= DidCapture;
- didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
- // get lost if this row ends up dropped during a second pass.
-
- var _newThennables = _suspended.updateQueue;
-
- if (_newThennables !== null) {
- workInProgress.updateQueue = _newThennables;
- workInProgress.flags |= Update;
- }
-
- cutOffTailIfNeeded(renderState, true); // This might have been modified.
-
- if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.
- ) {
- // We need to delete the row we just rendered.
- // Reset the effect list to what it was before we rendered this
- // child. The nested children have already appended themselves.
- var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
-
- if (lastEffect !== null) {
- lastEffect.nextEffect = null;
- } // We're done.
-
-
- return null;
- }
- } else if ( // The time it took to render last row is greater than the remaining
- // time we have to render. So rendering one more row would likely
- // exceed it.
- now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {
- // We have now passed our CPU deadline and we'll just give up further
- // attempts to render the main content and only render fallbacks.
- // The assumption is that this is usually faster.
- workInProgress.flags |= DidCapture;
- didSuspendAlready = true;
- cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
- // to get it started back up to attempt the next item. While in terms
- // of priority this work has the same priority as this current render,
- // it's not part of the same transition once the transition has
- // committed. If it's sync, we still want to yield so that it can be
- // painted. Conceptually, this is really the same as pinging.
- // We can use any RetryLane even if it's the one currently rendering
- // since we're leaving it behind on this node.
-
- workInProgress.lanes = SomeRetryLane;
-
- {
- markSpawnedWork(SomeRetryLane);
- }
- }
- }
-
- if (renderState.isBackwards) {
- // The effect list of the backwards tail will have been added
- // to the end. This breaks the guarantee that life-cycles fire in
- // sibling order but that isn't a strong guarantee promised by React.
- // Especially since these might also just pop in during future commits.
- // Append to the beginning of the list.
- renderedTail.sibling = workInProgress.child;
- workInProgress.child = renderedTail;
- } else {
- var previousSibling = renderState.last;
-
- if (previousSibling !== null) {
- previousSibling.sibling = renderedTail;
- } else {
- workInProgress.child = renderedTail;
- }
-
- renderState.last = renderedTail;
- }
- }
-
- if (renderState.tail !== null) {
- // We still have tail rows to render.
- // Pop a row.
- var next = renderState.tail;
- renderState.rendering = next;
- renderState.tail = next.sibling;
- renderState.lastEffect = workInProgress.lastEffect;
- renderState.renderingStartTime = now();
- next.sibling = null; // Restore the context.
- // TODO: We can probably just avoid popping it instead and only
- // setting it the first time we go from not suspended to suspended.
-
- var suspenseContext = suspenseStackCursor.current;
-
- if (didSuspendAlready) {
- suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- } else {
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- }
-
- pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.
-
- return next;
- }
-
- return null;
- }
-
- case FundamentalComponent:
- {
-
- break;
- }
-
- case ScopeComponent:
- {
-
- break;
- }
-
- case Block:
-
- break;
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- {
- popRenderLanes(workInProgress);
-
- if (current !== null) {
- var _nextState = workInProgress.memoizedState;
- var _prevState = current.memoizedState;
- var prevIsHidden = _prevState !== null;
- var nextIsHidden = _nextState !== null;
-
- if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {
- workInProgress.flags |= Update;
- }
- }
-
- return null;
- }
- }
-
- {
- {
- throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-}
-
-function unwindWork(workInProgress, renderLanes) {
- switch (workInProgress.tag) {
- case ClassComponent:
- {
- var Component = workInProgress.type;
-
- if (isContextProvider(Component)) {
- popContext(workInProgress);
- }
-
- var flags = workInProgress.flags;
-
- if (flags & ShouldCapture) {
- workInProgress.flags = flags & ~ShouldCapture | DidCapture;
-
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
- transferActualDuration(workInProgress);
- }
-
- return workInProgress;
- }
-
- return null;
- }
-
- case HostRoot:
- {
- popHostContainer(workInProgress);
- popTopLevelContextObject(workInProgress);
- resetWorkInProgressVersions();
- var _flags = workInProgress.flags;
-
- if (!((_flags & DidCapture) === NoFlags)) {
- {
- throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
- }
- }
-
- workInProgress.flags = _flags & ~ShouldCapture | DidCapture;
- return workInProgress;
- }
-
- case HostComponent:
- {
- // TODO: popHydrationState
- popHostContext(workInProgress);
- return null;
- }
-
- case SuspenseComponent:
- {
- popSuspenseContext(workInProgress);
-
- var _flags2 = workInProgress.flags;
-
- if (_flags2 & ShouldCapture) {
- workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
-
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
- transferActualDuration(workInProgress);
- }
-
- return workInProgress;
- }
-
- return null;
- }
-
- case SuspenseListComponent:
- {
- popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
- // caught by a nested boundary. If not, it should bubble through.
-
- return null;
- }
-
- case HostPortal:
- popHostContainer(workInProgress);
- return null;
-
- case ContextProvider:
- popProvider(workInProgress);
- return null;
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- popRenderLanes(workInProgress);
- return null;
-
- default:
- return null;
- }
-}
-
-function unwindInterruptedWork(interruptedWork) {
- switch (interruptedWork.tag) {
- case ClassComponent:
- {
- var childContextTypes = interruptedWork.type.childContextTypes;
-
- if (childContextTypes !== null && childContextTypes !== undefined) {
- popContext(interruptedWork);
- }
-
- break;
- }
-
- case HostRoot:
- {
- popHostContainer(interruptedWork);
- popTopLevelContextObject(interruptedWork);
- resetWorkInProgressVersions();
- break;
- }
-
- case HostComponent:
- {
- popHostContext(interruptedWork);
- break;
- }
-
- case HostPortal:
- popHostContainer(interruptedWork);
- break;
-
- case SuspenseComponent:
- popSuspenseContext(interruptedWork);
- break;
-
- case SuspenseListComponent:
- popSuspenseContext(interruptedWork);
- break;
-
- case ContextProvider:
- popProvider(interruptedWork);
- break;
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- popRenderLanes(interruptedWork);
- break;
- }
-}
-
-function createCapturedValue(value, source) {
- // If the value is an error, call this function immediately after it is thrown
- // so the stack is accurate.
- return {
- value: value,
- source: source,
- stack: getStackByFiberInDevAndProd(source)
- };
-}
-
-// This module is forked in different environments.
-// By default, return `true` to log errors to the console.
-// Forks can return `false` if this isn't desirable.
-function showErrorDialog(boundary, errorInfo) {
- return true;
-}
-
-function logCapturedError(boundary, errorInfo) {
- try {
- var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.
- // This enables renderers like ReactNative to better manage redbox behavior.
-
- if (logError === false) {
- return;
- }
-
- var error = errorInfo.value;
-
- if (true) {
- var source = errorInfo.source;
- var stack = errorInfo.stack;
- var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling
- // `preventDefault()` in window `error` handler.
- // We record this information as an expando on the error.
-
- if (error != null && error._suppressLogging) {
- if (boundary.tag === ClassComponent) {
- // The error is recoverable and was silenced.
- // Ignore it and don't print the stack addendum.
- // This is handy for testing error boundaries without noise.
- return;
- } // The error is fatal. Since the silencing might have
- // been accidental, we'll surface it anyway.
- // However, the browser would have silenced the original error
- // so we'll print it first, and then print the stack addendum.
-
-
- console['error'](error); // Don't transform to our wrapper
- // For a more detailed description of this block, see:
- // https://github.com/facebook/react/pull/13384
- }
-
- var componentName = source ? getComponentName(source.type) : null;
- var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
- var errorBoundaryMessage;
- var errorBoundaryName = getComponentName(boundary.type);
-
- if (errorBoundaryName) {
- errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
- } else {
- errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
- }
-
- var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
- // We don't include the original error message and JS stack because the browser
- // has already printed it. Even if the application swallows the error, it is still
- // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
-
- console['error'](combinedMessage); // Don't transform to our wrapper
- } else {
- // In production, we print the error directly.
- // This will include the message, the JS stack, and anything the browser wants to show.
- // We pass the error object instead of custom message so that the browser displays the error natively.
- console['error'](error); // Don't transform to our wrapper
- }
- } catch (e) {
- // This method must not throw, or React internal state will get messed up.
- // If console.error is overridden, or logCapturedError() shows a dialog that throws,
- // we want to report this error outside of the normal stack as a last resort.
- // https://github.com/facebook/react/issues/13188
- setTimeout(function () {
- throw e;
- });
- }
-}
-
-var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
-
-function createRootErrorUpdate(fiber, errorInfo, lane) {
- var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.
-
- update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
- // being called "element".
-
- update.payload = {
- element: null
- };
- var error = errorInfo.value;
-
- update.callback = function () {
- onUncaughtError(error);
- logCapturedError(fiber, errorInfo);
- };
-
- return update;
-}
-
-function createClassErrorUpdate(fiber, errorInfo, lane) {
- var update = createUpdate(NoTimestamp, lane);
- update.tag = CaptureUpdate;
- var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
-
- if (typeof getDerivedStateFromError === 'function') {
- var error$1 = errorInfo.value;
-
- update.payload = function () {
- logCapturedError(fiber, errorInfo);
- return getDerivedStateFromError(error$1);
- };
- }
-
- var inst = fiber.stateNode;
-
- if (inst !== null && typeof inst.componentDidCatch === 'function') {
- update.callback = function callback() {
- {
- markFailedErrorBoundaryForHotReloading(fiber);
- }
-
- if (typeof getDerivedStateFromError !== 'function') {
- // To preserve the preexisting retry behavior of error boundaries,
- // we keep track of which ones already failed during this batch.
- // This gets reset before we yield back to the browser.
- // TODO: Warn in strict mode if getDerivedStateFromError is
- // not defined.
- markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
-
- logCapturedError(fiber, errorInfo);
- }
-
- var error$1 = errorInfo.value;
- var stack = errorInfo.stack;
- this.componentDidCatch(error$1, {
- componentStack: stack !== null ? stack : ''
- });
-
- {
- if (typeof getDerivedStateFromError !== 'function') {
- // If componentDidCatch is the only error boundary method defined,
- // then it needs to call setState to recover from errors.
- // If no state update is scheduled then the boundary will swallow the error.
- if (!includesSomeLane(fiber.lanes, SyncLane)) {
- error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
- }
- }
- }
- };
- } else {
- update.callback = function () {
- markFailedErrorBoundaryForHotReloading(fiber);
- };
- }
-
- return update;
-}
-
-function attachPingListener(root, wakeable, lanes) {
- // Attach a listener to the promise to "ping" the root and retry. But only if
- // one does not already exist for the lanes we're currently rendering (which
- // acts like a "thread ID" here).
- var pingCache = root.pingCache;
- var threadIDs;
-
- if (pingCache === null) {
- pingCache = root.pingCache = new PossiblyWeakMap$1();
- threadIDs = new Set();
- pingCache.set(wakeable, threadIDs);
- } else {
- threadIDs = pingCache.get(wakeable);
-
- if (threadIDs === undefined) {
- threadIDs = new Set();
- pingCache.set(wakeable, threadIDs);
- }
- }
-
- if (!threadIDs.has(lanes)) {
- // Memoize using the thread ID to prevent redundant listeners.
- threadIDs.add(lanes);
- var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
- wakeable.then(ping, ping);
- }
-}
-
-function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
- // The source fiber did not complete.
- sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.
-
- sourceFiber.firstEffect = sourceFiber.lastEffect = null;
-
- if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
- // This is a wakeable.
- var wakeable = value;
-
- if ((sourceFiber.mode & BlockingMode) === NoMode) {
- // Reset the memoizedState to what it was before we attempted
- // to render it.
- var currentSource = sourceFiber.alternate;
-
- if (currentSource) {
- sourceFiber.updateQueue = currentSource.updateQueue;
- sourceFiber.memoizedState = currentSource.memoizedState;
- sourceFiber.lanes = currentSource.lanes;
- } else {
- sourceFiber.updateQueue = null;
- sourceFiber.memoizedState = null;
- }
- }
-
- var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
-
- var _workInProgress = returnFiber;
-
- do {
- if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
- // Found the nearest boundary.
- // Stash the promise on the boundary fiber. If the boundary times out, we'll
- // attach another listener to flip the boundary back to its normal state.
- var wakeables = _workInProgress.updateQueue;
-
- if (wakeables === null) {
- var updateQueue = new Set();
- updateQueue.add(wakeable);
- _workInProgress.updateQueue = updateQueue;
- } else {
- wakeables.add(wakeable);
- } // If the boundary is outside of blocking mode, we should *not*
- // suspend the commit. Pretend as if the suspended component rendered
- // null and keep rendering. In the commit phase, we'll schedule a
- // subsequent synchronous update to re-render the Suspense.
- //
- // Note: It doesn't matter whether the component that suspended was
- // inside a blocking mode tree. If the Suspense is outside of it, we
- // should *not* suspend the commit.
-
-
- if ((_workInProgress.mode & BlockingMode) === NoMode) {
- _workInProgress.flags |= DidCapture;
- sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.
- // But we shouldn't call any lifecycle methods or callbacks. Remove
- // all lifecycle effect tags.
-
- sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);
-
- if (sourceFiber.tag === ClassComponent) {
- var currentSourceFiber = sourceFiber.alternate;
-
- if (currentSourceFiber === null) {
- // This is a new mount. Change the tag so it's not mistaken for a
- // completed class component. For example, we should not call
- // componentWillUnmount if it is deleted.
- sourceFiber.tag = IncompleteClassComponent;
- } else {
- // When we try rendering again, we should not reuse the current fiber,
- // since it's known to be in an inconsistent state. Use a force update to
- // prevent a bail out.
- var update = createUpdate(NoTimestamp, SyncLane);
- update.tag = ForceUpdate;
- enqueueUpdate(sourceFiber, update);
- }
- } // The source fiber did not complete. Mark it with Sync priority to
- // indicate that it still has pending work.
-
-
- sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.
-
- return;
- } // Confirmed that the boundary is in a concurrent mode tree. Continue
- // with the normal suspend path.
- //
- // After this we'll use a set of heuristics to determine whether this
- // render pass will run to completion or restart or "suspend" the commit.
- // The actual logic for this is spread out in different places.
- //
- // This first principle is that if we're going to suspend when we complete
- // a root, then we should also restart if we get an update or ping that
- // might unsuspend it, and vice versa. The only reason to suspend is
- // because you think you might want to restart before committing. However,
- // it doesn't make sense to restart only while in the period we're suspended.
- //
- // Restarting too aggressively is also not good because it starves out any
- // intermediate loading state. So we use heuristics to determine when.
- // Suspense Heuristics
- //
- // If nothing threw a Promise or all the same fallbacks are already showing,
- // then don't suspend/restart.
- //
- // If this is an initial render of a new tree of Suspense boundaries and
- // those trigger a fallback, then don't suspend/restart. We want to ensure
- // that we can show the initial loading state as quickly as possible.
- //
- // If we hit a "Delayed" case, such as when we'd switch from content back into
- // a fallback, then we should always suspend/restart. Transitions apply
- // to this case. If none is defined, JND is used instead.
- //
- // If we're already showing a fallback and it gets "retried", allowing us to show
- // another level, but there's still an inner boundary that would show a fallback,
- // then we suspend/restart for 500ms since the last time we showed a fallback
- // anywhere in the tree. This effectively throttles progressive loading into a
- // consistent train of commits. This also gives us an opportunity to restart to
- // get to the completed state slightly earlier.
- //
- // If there's ambiguity due to batching it's resolved in preference of:
- // 1) "delayed", 2) "initial render", 3) "retry".
- //
- // We want to ensure that a "busy" state doesn't get force committed. We want to
- // ensure that new initial loading states can commit as soon as possible.
-
-
- attachPingListener(root, wakeable, rootRenderLanes);
- _workInProgress.flags |= ShouldCapture;
- _workInProgress.lanes = rootRenderLanes;
- return;
- } // This boundary already captured during this render. Continue to the next
- // boundary.
-
-
- _workInProgress = _workInProgress.return;
- } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
- // TODO: Use invariant so the message is stripped in prod?
-
-
- value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.');
- } // We didn't find a boundary that could handle this type of exception. Start
- // over and traverse parent path again, this time treating the exception
- // as an error.
-
-
- renderDidError();
- value = createCapturedValue(value, sourceFiber);
- var workInProgress = returnFiber;
-
- do {
- switch (workInProgress.tag) {
- case HostRoot:
- {
- var _errorInfo = value;
- workInProgress.flags |= ShouldCapture;
- var lane = pickArbitraryLane(rootRenderLanes);
- workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);
-
- var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);
-
- enqueueCapturedUpdate(workInProgress, _update);
- return;
- }
-
- case ClassComponent:
- // Capture and retry
- var errorInfo = value;
- var ctor = workInProgress.type;
- var instance = workInProgress.stateNode;
-
- if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
- workInProgress.flags |= ShouldCapture;
-
- var _lane = pickArbitraryLane(rootRenderLanes);
-
- workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state
-
- var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);
-
- enqueueCapturedUpdate(workInProgress, _update2);
- return;
- }
-
- break;
- }
-
- workInProgress = workInProgress.return;
- } while (workInProgress !== null);
-}
-
-var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
-
-{
- didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
-}
-
-var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
-
-var callComponentWillUnmountWithTimer = function (current, instance) {
- instance.props = current.memoizedProps;
- instance.state = current.memoizedState;
-
- {
- instance.componentWillUnmount();
- }
-}; // Capture errors so they don't interrupt unmounting.
-
-
-function safelyCallComponentWillUnmount(current, instance) {
- {
- invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);
-
- if (hasCaughtError()) {
- var unmountError = clearCaughtError();
- captureCommitPhaseError(current, unmountError);
- }
- }
-}
-
-function safelyDetachRef(current) {
- var ref = current.ref;
-
- if (ref !== null) {
- if (typeof ref === 'function') {
- {
- invokeGuardedCallback(null, ref, null, null);
-
- if (hasCaughtError()) {
- var refError = clearCaughtError();
- captureCommitPhaseError(current, refError);
- }
- }
- } else {
- ref.current = null;
- }
- }
-}
-
-function safelyCallDestroy(current, destroy) {
- {
- invokeGuardedCallback(null, destroy, null);
-
- if (hasCaughtError()) {
- var error = clearCaughtError();
- captureCommitPhaseError(current, error);
- }
- }
-}
-
-function commitBeforeMutationLifeCycles(current, finishedWork) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- return;
- }
-
- case ClassComponent:
- {
- if (finishedWork.flags & Snapshot) {
- if (current !== null) {
- var prevProps = current.memoizedProps;
- var prevState = current.memoizedState;
- var instance = finishedWork.stateNode; // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
-
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
-
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
-
- var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
-
- {
- var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
-
- if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
- didWarnSet.add(finishedWork.type);
-
- error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
- }
- }
-
- instance.__reactInternalSnapshotBeforeUpdate = snapshot;
- }
- }
-
- return;
- }
-
- case HostRoot:
- {
- {
- if (finishedWork.flags & Snapshot) {
- var root = finishedWork.stateNode;
- clearContainer(root.containerInfo);
- }
- }
-
- return;
- }
-
- case HostComponent:
- case HostText:
- case HostPortal:
- case IncompleteClassComponent:
- // Nothing to do for these component types
- return;
- }
-
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-}
-
-function commitHookEffectListUnmount(tag, finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
-
- do {
- if ((effect.tag & tag) === tag) {
- // Unmount
- var destroy = effect.destroy;
- effect.destroy = undefined;
-
- if (destroy !== undefined) {
- destroy();
- }
- }
-
- effect = effect.next;
- } while (effect !== firstEffect);
- }
-}
-
-function commitHookEffectListMount(tag, finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
-
- do {
- if ((effect.tag & tag) === tag) {
- // Mount
- var create = effect.create;
- effect.destroy = create();
-
- {
- var destroy = effect.destroy;
-
- if (destroy !== undefined && typeof destroy !== 'function') {
- var addendum = void 0;
-
- if (destroy === null) {
- addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
- } else if (typeof destroy.then === 'function') {
- addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
- } else {
- addendum = ' You returned: ' + destroy;
- }
-
- error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);
- }
- }
- }
-
- effect = effect.next;
- } while (effect !== firstEffect);
- }
-}
-
-function schedulePassiveEffects(finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
-
- do {
- var _effect = effect,
- next = _effect.next,
- tag = _effect.tag;
-
- if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {
- enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);
- enqueuePendingPassiveHookEffectMount(finishedWork, effect);
- }
-
- effect = next;
- } while (effect !== firstEffect);
- }
-}
-
-function commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- // At this point layout effects have already been destroyed (during mutation phase).
- // This is done to prevent sibling component effects from interfering with each other,
- // e.g. a destroy function in one component should never override a ref set
- // by a create function in another component during the same commit.
- {
- commitHookEffectListMount(Layout | HasEffect, finishedWork);
- }
-
- schedulePassiveEffects(finishedWork);
- return;
- }
-
- case ClassComponent:
- {
- var instance = finishedWork.stateNode;
-
- if (finishedWork.flags & Update) {
- if (current === null) {
- // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
-
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
-
- {
- instance.componentDidMount();
- }
- } else {
- var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
- var prevState = current.memoizedState; // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
-
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
-
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
-
- {
- instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
- }
- }
- } // TODO: I think this is now always non-null by the time it reaches the
- // commit phase. Consider removing the type check.
-
-
- var updateQueue = finishedWork.updateQueue;
-
- if (updateQueue !== null) {
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
-
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- } // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
-
-
- commitUpdateQueue(finishedWork, updateQueue, instance);
- }
-
- return;
- }
-
- case HostRoot:
- {
- // TODO: I think this is now always non-null by the time it reaches the
- // commit phase. Consider removing the type check.
- var _updateQueue = finishedWork.updateQueue;
-
- if (_updateQueue !== null) {
- var _instance = null;
-
- if (finishedWork.child !== null) {
- switch (finishedWork.child.tag) {
- case HostComponent:
- _instance = getPublicInstance(finishedWork.child.stateNode);
- break;
-
- case ClassComponent:
- _instance = finishedWork.child.stateNode;
- break;
- }
- }
-
- commitUpdateQueue(finishedWork, _updateQueue, _instance);
- }
-
- return;
- }
-
- case HostComponent:
- {
- var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
- // (eg DOM renderer may schedule auto-focus for inputs and form controls).
- // These effects should only be committed when components are first mounted,
- // aka when there is no current/alternate.
-
- if (current === null && finishedWork.flags & Update) {
- var type = finishedWork.type;
- var props = finishedWork.memoizedProps;
- commitMount(_instance2, type, props);
- }
-
- return;
- }
-
- case HostText:
- {
- // We have no life-cycles associated with text.
- return;
- }
-
- case HostPortal:
- {
- // We have no life-cycles associated with portals.
- return;
- }
-
- case Profiler:
- {
- {
- var _finishedWork$memoize2 = finishedWork.memoizedProps,
- onCommit = _finishedWork$memoize2.onCommit,
- onRender = _finishedWork$memoize2.onRender;
- var effectDuration = finishedWork.stateNode.effectDuration;
- var commitTime = getCommitTime();
-
- if (typeof onRender === 'function') {
- {
- onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);
- }
- }
- }
-
- return;
- }
-
- case SuspenseComponent:
- {
- commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
- return;
- }
-
- case SuspenseListComponent:
- case IncompleteClassComponent:
- case FundamentalComponent:
- case ScopeComponent:
- case OffscreenComponent:
- case LegacyHiddenComponent:
- return;
- }
-
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-}
-
-function hideOrUnhideAllChildren(finishedWork, isHidden) {
- {
- // We only have the top Fiber that was inserted but we need to recurse down its
- // children to find all the terminal nodes.
- var node = finishedWork;
-
- while (true) {
- if (node.tag === HostComponent) {
- var instance = node.stateNode;
-
- if (isHidden) {
- hideInstance(instance);
- } else {
- unhideInstance(node.stateNode, node.memoizedProps);
- }
- } else if (node.tag === HostText) {
- var _instance3 = node.stateNode;
-
- if (isHidden) {
- hideTextInstance(_instance3);
- } else {
- unhideTextInstance(_instance3, node.memoizedProps);
- }
- } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === finishedWork) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === finishedWork) {
- return;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-}
-
-function commitAttachRef(finishedWork) {
- var ref = finishedWork.ref;
-
- if (ref !== null) {
- var instance = finishedWork.stateNode;
- var instanceToUse;
-
- switch (finishedWork.tag) {
- case HostComponent:
- instanceToUse = getPublicInstance(instance);
- break;
-
- default:
- instanceToUse = instance;
- } // Moved outside to ensure DCE works with this flag
-
- if (typeof ref === 'function') {
- ref(instanceToUse);
- } else {
- {
- if (!ref.hasOwnProperty('current')) {
- error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));
- }
- }
-
- ref.current = instanceToUse;
- }
- }
-}
-
-function commitDetachRef(current) {
- var currentRef = current.ref;
-
- if (currentRef !== null) {
- if (typeof currentRef === 'function') {
- currentRef(null);
- } else {
- currentRef.current = null;
- }
- }
-} // User-originating errors (lifecycles and refs) should not interrupt
-// deletion, so don't let them throw. Host-originating errors should
-// interrupt deletion, so it's okay
-
-
-function commitUnmount(finishedRoot, current, renderPriorityLevel) {
- onCommitUnmount(current);
-
- switch (current.tag) {
- case FunctionComponent:
- case ForwardRef:
- case MemoComponent:
- case SimpleMemoComponent:
- case Block:
- {
- var updateQueue = current.updateQueue;
-
- if (updateQueue !== null) {
- var lastEffect = updateQueue.lastEffect;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
-
- do {
- var _effect2 = effect,
- destroy = _effect2.destroy,
- tag = _effect2.tag;
-
- if (destroy !== undefined) {
- if ((tag & Passive$1) !== NoFlags$1) {
- enqueuePendingPassiveHookEffectUnmount(current, effect);
- } else {
- {
- safelyCallDestroy(current, destroy);
- }
- }
- }
-
- effect = effect.next;
- } while (effect !== firstEffect);
- }
- }
-
- return;
- }
-
- case ClassComponent:
- {
- safelyDetachRef(current);
- var instance = current.stateNode;
-
- if (typeof instance.componentWillUnmount === 'function') {
- safelyCallComponentWillUnmount(current, instance);
- }
-
- return;
- }
-
- case HostComponent:
- {
- safelyDetachRef(current);
- return;
- }
-
- case HostPortal:
- {
- // TODO: this is recursive.
- // We are also not using this parent because
- // the portal will get pushed immediately.
- {
- unmountHostComponents(finishedRoot, current);
- }
-
- return;
- }
-
- case FundamentalComponent:
- {
-
- return;
- }
-
- case DehydratedFragment:
- {
-
- return;
- }
-
- case ScopeComponent:
- {
-
- return;
- }
- }
-}
-
-function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
- // While we're inside a removed host node we don't want to call
- // removeChild on the inner nodes because they're removed by the top
- // call anyway. We also want to call componentWillUnmount on all
- // composites before this host node is removed from the tree. Therefore
- // we do an inner loop while we're still inside the host node.
- var node = root;
-
- while (true) {
- commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.
- // Skip portals because commitUnmount() currently visits them recursively.
-
- if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
- // If we don't use mutation we drill down into portals here instead.
- node.tag !== HostPortal)) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === root) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === root) {
- return;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
-}
-
-function detachFiberMutation(fiber) {
- // Cut off the return pointers to disconnect it from the tree. Ideally, we
- // should clear the child pointer of the parent alternate to let this
- // get GC:ed but we don't know which for sure which parent is the current
- // one so we'll settle for GC:ing the subtree of this child. This child
- // itself will be GC:ed when the parent updates the next time.
- // Note: we cannot null out sibling here, otherwise it can cause issues
- // with findDOMNode and how it requires the sibling field to carry out
- // traversal in a later effect. See PR #16820. We now clear the sibling
- // field after effects, see: detachFiberAfterEffects.
- //
- // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.
- // It may be required if the current component is an error boundary,
- // and one of its descendants throws while unmounting a passive effect.
- fiber.alternate = null;
- fiber.child = null;
- fiber.dependencies = null;
- fiber.firstEffect = null;
- fiber.lastEffect = null;
- fiber.memoizedProps = null;
- fiber.memoizedState = null;
- fiber.pendingProps = null;
- fiber.return = null;
- fiber.updateQueue = null;
-
- {
- fiber._debugOwner = null;
- }
-}
-
-function getHostParentFiber(fiber) {
- var parent = fiber.return;
-
- while (parent !== null) {
- if (isHostParent(parent)) {
- return parent;
- }
-
- parent = parent.return;
- }
-
- {
- {
- throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-}
-
-function isHostParent(fiber) {
- return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
-}
-
-function getHostSibling(fiber) {
- // We're going to search forward into the tree until we find a sibling host
- // node. Unfortunately, if multiple insertions are done in a row we have to
- // search past them. This leads to exponential search for the next sibling.
- // TODO: Find a more efficient way to do this.
- var node = fiber;
-
- siblings: while (true) {
- // If we didn't find anything, let's try the next sibling.
- while (node.sibling === null) {
- if (node.return === null || isHostParent(node.return)) {
- // If we pop out of the root or hit the parent the fiber we are the
- // last sibling.
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
-
- while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
- // If it is not host node and, we might have a host node inside it.
- // Try to search down until we find one.
- if (node.flags & Placement) {
- // If we don't have a child, try the siblings instead.
- continue siblings;
- } // If we don't have a child, try the siblings instead.
- // We also skip portals because they are not part of this host tree.
-
-
- if (node.child === null || node.tag === HostPortal) {
- continue siblings;
- } else {
- node.child.return = node;
- node = node.child;
- }
- } // Check if this host node is stable or about to be placed.
-
-
- if (!(node.flags & Placement)) {
- // Found it!
- return node.stateNode;
- }
- }
-}
-
-function commitPlacement(finishedWork) {
-
-
- var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.
-
- var parent;
- var isContainer;
- var parentStateNode = parentFiber.stateNode;
-
- switch (parentFiber.tag) {
- case HostComponent:
- parent = parentStateNode;
- isContainer = false;
- break;
-
- case HostRoot:
- parent = parentStateNode.containerInfo;
- isContainer = true;
- break;
-
- case HostPortal:
- parent = parentStateNode.containerInfo;
- isContainer = true;
- break;
-
- case FundamentalComponent:
-
- // eslint-disable-next-line-no-fallthrough
-
- default:
- {
- {
- throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- }
-
- if (parentFiber.flags & ContentReset) {
- // Reset the text content of the parent before doing any insertions
- resetTextContent(parent); // Clear ContentReset from the effect tag
-
- parentFiber.flags &= ~ContentReset;
- }
-
- var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
- // children to find all the terminal nodes.
-
- if (isContainer) {
- insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);
- } else {
- insertOrAppendPlacementNode(finishedWork, before, parent);
- }
-}
-
-function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
- var tag = node.tag;
- var isHost = tag === HostComponent || tag === HostText;
-
- if (isHost || enableFundamentalAPI ) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
-
- if (before) {
- insertInContainerBefore(parent, stateNode, before);
- } else {
- appendChildToContainer(parent, stateNode);
- }
- } else if (tag === HostPortal) ; else {
- var child = node.child;
-
- if (child !== null) {
- insertOrAppendPlacementNodeIntoContainer(child, before, parent);
- var sibling = child.sibling;
-
- while (sibling !== null) {
- insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
- sibling = sibling.sibling;
- }
- }
- }
-}
-
-function insertOrAppendPlacementNode(node, before, parent) {
- var tag = node.tag;
- var isHost = tag === HostComponent || tag === HostText;
-
- if (isHost || enableFundamentalAPI ) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
-
- if (before) {
- insertBefore(parent, stateNode, before);
- } else {
- appendChild(parent, stateNode);
- }
- } else if (tag === HostPortal) ; else {
- var child = node.child;
-
- if (child !== null) {
- insertOrAppendPlacementNode(child, before, parent);
- var sibling = child.sibling;
-
- while (sibling !== null) {
- insertOrAppendPlacementNode(sibling, before, parent);
- sibling = sibling.sibling;
- }
- }
- }
-}
-
-function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
- // We only have the top Fiber that was deleted but we need to recurse down its
- // children to find all the terminal nodes.
- var node = current; // Each iteration, currentParent is populated with node's host parent if not
- // currentParentIsValid.
-
- var currentParentIsValid = false; // Note: these two variables *must* always be updated together.
-
- var currentParent;
- var currentParentIsContainer;
-
- while (true) {
- if (!currentParentIsValid) {
- var parent = node.return;
-
- findParent: while (true) {
- if (!(parent !== null)) {
- {
- throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var parentStateNode = parent.stateNode;
-
- switch (parent.tag) {
- case HostComponent:
- currentParent = parentStateNode;
- currentParentIsContainer = false;
- break findParent;
-
- case HostRoot:
- currentParent = parentStateNode.containerInfo;
- currentParentIsContainer = true;
- break findParent;
-
- case HostPortal:
- currentParent = parentStateNode.containerInfo;
- currentParentIsContainer = true;
- break findParent;
-
- }
-
- parent = parent.return;
- }
-
- currentParentIsValid = true;
- }
-
- if (node.tag === HostComponent || node.tag === HostText) {
- commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the
- // node from the tree.
-
- if (currentParentIsContainer) {
- removeChildFromContainer(currentParent, node.stateNode);
- } else {
- removeChild(currentParent, node.stateNode);
- } // Don't visit children because we already visited them.
-
- } else if (node.tag === HostPortal) {
- if (node.child !== null) {
- // When we go into a portal, it becomes the parent to remove from.
- // We will reassign it back when we pop the portal on the way up.
- currentParent = node.stateNode.containerInfo;
- currentParentIsContainer = true; // Visit children because portals might contain host components.
-
- node.child.return = node;
- node = node.child;
- continue;
- }
- } else {
- commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.
-
- if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- }
-
- if (node === current) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === current) {
- return;
- }
-
- node = node.return;
-
- if (node.tag === HostPortal) {
- // When we go out of the portal, we need to restore the parent.
- // Since we don't keep a stack of them, we will search for it.
- currentParentIsValid = false;
- }
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
-}
-
-function commitDeletion(finishedRoot, current, renderPriorityLevel) {
- {
- // Recursively delete all host nodes from the parent.
- // Detach refs and call componentWillUnmount() on the whole subtree.
- unmountHostComponents(finishedRoot, current);
- }
-
- var alternate = current.alternate;
- detachFiberMutation(current);
-
- if (alternate !== null) {
- detachFiberMutation(alternate);
- }
-}
-
-function commitWork(current, finishedWork) {
-
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case MemoComponent:
- case SimpleMemoComponent:
- case Block:
- {
- // Layout effects are destroyed during the mutation phase so that all
- // destroy functions for all fibers are called before any create functions.
- // This prevents sibling component effects from interfering with each other,
- // e.g. a destroy function in one component should never override a ref set
- // by a create function in another component during the same commit.
- {
- commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
- }
-
- return;
- }
-
- case ClassComponent:
- {
- return;
- }
-
- case HostComponent:
- {
- var instance = finishedWork.stateNode;
-
- if (instance != null) {
- // Commit the work prepared earlier.
- var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
- // as the newProps. The updatePayload will contain the real change in
- // this case.
-
- var oldProps = current !== null ? current.memoizedProps : newProps;
- var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.
-
- var updatePayload = finishedWork.updateQueue;
- finishedWork.updateQueue = null;
-
- if (updatePayload !== null) {
- commitUpdate(instance, updatePayload, type, oldProps, newProps);
- }
- }
-
- return;
- }
-
- case HostText:
- {
- if (!(finishedWork.stateNode !== null)) {
- {
- throw Error( "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var textInstance = finishedWork.stateNode;
- var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
- // as the newProps. The updatePayload will contain the real change in
- // this case.
-
- var oldText = current !== null ? current.memoizedProps : newText;
- commitTextUpdate(textInstance, oldText, newText);
- return;
- }
-
- case HostRoot:
- {
- {
- var _root = finishedWork.stateNode;
-
- if (_root.hydrate) {
- // We've just hydrated. No need to hydrate again.
- _root.hydrate = false;
- commitHydratedContainer(_root.containerInfo);
- }
- }
-
- return;
- }
-
- case Profiler:
- {
- return;
- }
-
- case SuspenseComponent:
- {
- commitSuspenseComponent(finishedWork);
- attachSuspenseRetryListeners(finishedWork);
- return;
- }
-
- case SuspenseListComponent:
- {
- attachSuspenseRetryListeners(finishedWork);
- return;
- }
-
- case IncompleteClassComponent:
- {
- return;
- }
-
- case FundamentalComponent:
- {
-
- break;
- }
-
- case ScopeComponent:
- {
-
- break;
- }
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- {
- var newState = finishedWork.memoizedState;
- var isHidden = newState !== null;
- hideOrUnhideAllChildren(finishedWork, isHidden);
- return;
- }
- }
-
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-}
-
-function commitSuspenseComponent(finishedWork) {
- var newState = finishedWork.memoizedState;
-
- if (newState !== null) {
- markCommitTimeOfFallback();
-
- {
- // Hide the Offscreen component that contains the primary children. TODO:
- // Ideally, this effect would have been scheduled on the Offscreen fiber
- // itself. That's how unhiding works: the Offscreen component schedules an
- // effect on itself. However, in this case, the component didn't complete,
- // so the fiber was never added to the effect list in the normal path. We
- // could have appended it to the effect list in the Suspense component's
- // second pass, but doing it this way is less complicated. This would be
- // simpler if we got rid of the effect list and traversed the tree, like
- // we're planning to do.
- var primaryChildParent = finishedWork.child;
- hideOrUnhideAllChildren(primaryChildParent, true);
- }
- }
-}
-
-function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
-
- var newState = finishedWork.memoizedState;
-
- if (newState === null) {
- var current = finishedWork.alternate;
-
- if (current !== null) {
- var prevState = current.memoizedState;
-
- if (prevState !== null) {
- var suspenseInstance = prevState.dehydrated;
-
- if (suspenseInstance !== null) {
- commitHydratedSuspenseInstance(suspenseInstance);
- }
- }
- }
- }
-}
-
-function attachSuspenseRetryListeners(finishedWork) {
- // If this boundary just timed out, then it will have a set of wakeables.
- // For each wakeable, attach a listener so that when it resolves, React
- // attempts to re-render the boundary in the primary (pre-timeout) state.
- var wakeables = finishedWork.updateQueue;
-
- if (wakeables !== null) {
- finishedWork.updateQueue = null;
- var retryCache = finishedWork.stateNode;
-
- if (retryCache === null) {
- retryCache = finishedWork.stateNode = new PossiblyWeakSet();
- }
-
- wakeables.forEach(function (wakeable) {
- // Memoize using the boundary fiber to prevent redundant listeners.
- var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
-
- if (!retryCache.has(wakeable)) {
- {
- if (wakeable.__reactDoNotTraceInteractions !== true) {
- retry = tracing.unstable_wrap(retry);
- }
- }
-
- retryCache.add(wakeable);
- wakeable.then(retry, retry);
- }
- });
- }
-} // This function detects when a Suspense boundary goes from visible to hidden.
-// It returns false if the boundary is already hidden.
-// TODO: Use an effect tag.
-
-
-function isSuspenseBoundaryBeingHidden(current, finishedWork) {
- if (current !== null) {
- var oldState = current.memoizedState;
-
- if (oldState === null || oldState.dehydrated !== null) {
- var newState = finishedWork.memoizedState;
- return newState !== null && newState.dehydrated === null;
- }
- }
-
- return false;
-}
-
-function commitResetTextContent(current) {
-
- resetTextContent(current.stateNode);
-}
-
-var COMPONENT_TYPE = 0;
-var HAS_PSEUDO_CLASS_TYPE = 1;
-var ROLE_TYPE = 2;
-var TEST_NAME_TYPE = 3;
-var TEXT_TYPE = 4;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor$1 = Symbol.for;
- COMPONENT_TYPE = symbolFor$1('selector.component');
- HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');
- ROLE_TYPE = symbolFor$1('selector.role');
- TEST_NAME_TYPE = symbolFor$1('selector.test_id');
- TEXT_TYPE = symbolFor$1('selector.text');
-}
-var commitHooks = [];
-function onCommitRoot$1() {
- {
- commitHooks.forEach(function (commitHook) {
- return commitHook();
- });
- }
-}
-
-var ceil = Math.ceil;
-var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
- ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
- IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
-var NoContext =
-/* */
-0;
-var BatchedContext =
-/* */
-1;
-var EventContext =
-/* */
-2;
-var DiscreteEventContext =
-/* */
-4;
-var LegacyUnbatchedContext =
-/* */
-8;
-var RenderContext =
-/* */
-16;
-var CommitContext =
-/* */
-32;
-var RetryAfterError =
-/* */
-64;
-var RootIncomplete = 0;
-var RootFatalErrored = 1;
-var RootErrored = 2;
-var RootSuspended = 3;
-var RootSuspendedWithDelay = 4;
-var RootCompleted = 5; // Describes where we are in the React execution stack
-
-var executionContext = NoContext; // The root we're working on
-
-var workInProgressRoot = null; // The fiber we're working on
-
-var workInProgress = null; // The lanes we're rendering
-
-var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree
-// This is a superset of the lanes we started working on at the root. The only
-// case where it's different from `workInProgressRootRenderLanes` is when we
-// enter a subtree that is hidden and needs to be unhidden: Suspense and
-// Offscreen component.
-//
-// Most things in the work loop should deal with workInProgressRootRenderLanes.
-// Most things in begin/complete phases should deal with subtreeRenderLanes.
-
-var subtreeRenderLanes = NoLanes;
-var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.
-
-var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown
-
-var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's
-// slightly different than `renderLanes` because `renderLanes` can change as you
-// enter and exit an Offscreen tree. This value is the combination of all render
-// lanes for the entire render phase.
-
-var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only
-// includes unprocessed updates, not work in bailed out children.
-
-var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.
-
-var workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.
-
-var workInProgressRootPingedLanes = NoLanes;
-var mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train
-// model where we don't commit new loading states in too quick succession.
-
-var globalMostRecentFallbackTime = 0;
-var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering
-// more and prefer CPU suspense heuristics instead.
-
-var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU
-// suspense heuristics and opt out of rendering more content.
-
-var RENDER_TIMEOUT_MS = 500;
-
-function resetRenderTimer() {
- workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;
-}
-
-function getRenderTargetTime() {
- return workInProgressRootRenderTargetTime;
-}
-var nextEffect = null;
-var hasUncaughtError = false;
-var firstUncaughtError = null;
-var legacyErrorBoundariesThatAlreadyFailed = null;
-var rootDoesHavePassiveEffects = false;
-var rootWithPendingPassiveEffects = null;
-var pendingPassiveEffectsRenderPriority = NoPriority$1;
-var pendingPassiveEffectsLanes = NoLanes;
-var pendingPassiveHookEffectsMount = [];
-var pendingPassiveHookEffectsUnmount = [];
-var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates
-
-var NESTED_UPDATE_LIMIT = 50;
-var nestedUpdateCount = 0;
-var rootWithNestedUpdates = null;
-var NESTED_PASSIVE_UPDATE_LIMIT = 50;
-var nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes
-// during the commit phase. This enables them to be traced across components
-// that spawn new work during render. E.g. hidden boundaries, suspended SSR
-// hydration or SuspenseList.
-// TODO: Can use a bitmask instead of an array
-
-var spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their
-// event times as simultaneous, even if the actual clock time has advanced
-// between the first and second call.
-
-var currentEventTime = NoTimestamp;
-var currentEventWipLanes = NoLanes;
-var currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
-// We warn about state updates for unmounted components differently in this case.
-
-var isFlushingPassiveEffects = false;
-var focusedInstanceHandle = null;
-var shouldFireAfterActiveInstanceBlur = false;
-function getWorkInProgressRoot() {
- return workInProgressRoot;
-}
-function requestEventTime() {
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
- // We're inside React, so it's fine to read the actual time.
- return now();
- } // We're not inside React, so we may be in the middle of a browser event.
-
-
- if (currentEventTime !== NoTimestamp) {
- // Use the same start time for all updates until we enter React again.
- return currentEventTime;
- } // This is the first update since React yielded. Compute a new start time.
-
-
- currentEventTime = now();
- return currentEventTime;
-}
-function requestUpdateLane(fiber) {
- // Special cases
- var mode = fiber.mode;
-
- if ((mode & BlockingMode) === NoMode) {
- return SyncLane;
- } else if ((mode & ConcurrentMode) === NoMode) {
- return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
- } // The algorithm for assigning an update to a lane should be stable for all
- // updates at the same priority within the same event. To do this, the inputs
- // to the algorithm must be the same. For example, we use the `renderLanes`
- // to avoid choosing a lane that is already in the middle of rendering.
- //
- // However, the "included" lanes could be mutated in between updates in the
- // same event, like if you perform an update inside `flushSync`. Or any other
- // code path that might call `prepareFreshStack`.
- //
- // The trick we use is to cache the first of each of these inputs within an
- // event. Then reset the cached values once we can be sure the event is over.
- // Our heuristic for that is whenever we enter a concurrent work loop.
- //
- // We'll do the same for `currentEventPendingLanes` below.
-
-
- if (currentEventWipLanes === NoLanes) {
- currentEventWipLanes = workInProgressRootIncludedLanes;
- }
-
- var isTransition = requestCurrentTransition() !== NoTransition;
-
- if (isTransition) {
- if (currentEventPendingLanes !== NoLanes) {
- currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;
- }
-
- return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);
- } // TODO: Remove this dependency on the Scheduler priority.
- // To do that, we're replacing it with an update lane priority.
-
-
- var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.
- // This couples React to the Scheduler internals, so we're replacing it
- // with the currentUpdateLanePriority above. As an example of how this
- // could be problematic, if we're not inside `Scheduler.runWithPriority`,
- // then we'll get the priority of the current running Scheduler task,
- // which is probably not what we want.
-
- var lane;
-
- if ( // TODO: Temporary. We're removing the concept of discrete updates.
- (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {
- lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);
- } else {
- var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);
-
- lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);
- }
-
- return lane;
-}
-
-function requestRetryLane(fiber) {
- // This is a fork of `requestUpdateLane` designed specifically for Suspense
- // "retries" — a special update that attempts to flip a Suspense boundary
- // from its placeholder state to its primary/resolved state.
- // Special cases
- var mode = fiber.mode;
-
- if ((mode & BlockingMode) === NoMode) {
- return SyncLane;
- } else if ((mode & ConcurrentMode) === NoMode) {
- return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
- } // See `requestUpdateLane` for explanation of `currentEventWipLanes`
-
-
- if (currentEventWipLanes === NoLanes) {
- currentEventWipLanes = workInProgressRootIncludedLanes;
- }
-
- return findRetryLane(currentEventWipLanes);
-}
-
-function scheduleUpdateOnFiber(fiber, lane, eventTime) {
- checkForNestedUpdates();
- warnAboutRenderPhaseUpdatesInDEV(fiber);
- var root = markUpdateLaneFromFiberToRoot(fiber, lane);
-
- if (root === null) {
- warnAboutUpdateOnUnmountedFiberInDEV(fiber);
- return null;
- } // Mark that the root has a pending update.
-
-
- markRootUpdated(root, lane, eventTime);
-
- if (root === workInProgressRoot) {
- // Received an update to a tree that's in the middle of rendering. Mark
- // that there was an interleaved update work on this root. Unless the
- // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
- // phase update. In that case, we don't treat render phase updates as if
- // they were interleaved, for backwards compat reasons.
- {
- workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);
- }
-
- if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
- // The root already suspended with a delay, which means this render
- // definitely won't finish. Since we have a new update, let's mark it as
- // suspended now, right before marking the incoming update. This has the
- // effect of interrupting the current render and switching to the update.
- // TODO: Make sure this doesn't override pings that happen while we've
- // already started rendering.
- markRootSuspended$1(root, workInProgressRootRenderLanes);
- }
- } // TODO: requestUpdateLanePriority also reads the priority. Pass the
- // priority as an argument to that function and this one.
-
-
- var priorityLevel = getCurrentPriorityLevel();
-
- if (lane === SyncLane) {
- if ( // Check if we're inside unbatchedUpdates
- (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
- (executionContext & (RenderContext | CommitContext)) === NoContext) {
- // Register pending interactions on the root to avoid losing traced interaction data.
- schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
- // root inside of batchedUpdates should be synchronous, but layout updates
- // should be deferred until the end of the batch.
-
- performSyncWorkOnRoot(root);
- } else {
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, lane);
-
- if (executionContext === NoContext) {
- // Flush the synchronous work now, unless we're already working or inside
- // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
- // scheduleCallbackForFiber to preserve the ability to schedule a callback
- // without immediately flushing it. We only do this for user-initiated
- // updates, to preserve historical behavior of legacy mode.
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
- } else {
- // Schedule a discrete update but only if it's not Sync.
- if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
- // discrete, even inside a discrete event.
- priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {
- // This is the result of a discrete event. Track the lowest priority
- // discrete update per root so we can flush them early, if needed.
- if (rootsWithPendingDiscreteUpdates === null) {
- rootsWithPendingDiscreteUpdates = new Set([root]);
- } else {
- rootsWithPendingDiscreteUpdates.add(root);
- }
- } // Schedule other updates after in case the callback is sync.
-
-
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, lane);
- } // We use this when assigning a lane for a transition inside
- // `requestUpdateLane`. We assume it's the same as the root being updated,
- // since in the common case of a single root app it probably is. If it's not
- // the same root, then it's not a huge deal, we just might batch more stuff
- // together more than necessary.
-
-
- mostRecentlyUpdatedRoot = root;
-} // This is split into a separate function so we can mark a fiber with pending
-// work without treating it as a typical update that originates from an event;
-// e.g. retrying a Suspense boundary isn't an update, but it does schedule work
-// on a fiber.
-
-function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
- // Update the source fiber's lanes
- sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
- var alternate = sourceFiber.alternate;
-
- if (alternate !== null) {
- alternate.lanes = mergeLanes(alternate.lanes, lane);
- }
-
- {
- if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
- warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
- }
- } // Walk the parent path to the root and update the child expiration time.
-
-
- var node = sourceFiber;
- var parent = sourceFiber.return;
-
- while (parent !== null) {
- parent.childLanes = mergeLanes(parent.childLanes, lane);
- alternate = parent.alternate;
-
- if (alternate !== null) {
- alternate.childLanes = mergeLanes(alternate.childLanes, lane);
- } else {
- {
- if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
- warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
- }
- }
- }
-
- node = parent;
- parent = parent.return;
- }
-
- if (node.tag === HostRoot) {
- var root = node.stateNode;
- return root;
- } else {
- return null;
- }
-} // Use this function to schedule a task for a root. There's only one task per
-// root; if a task was already scheduled, we'll check to make sure the priority
-// of the existing task is the same as the priority of the next level that the
-// root has work on. This function is called on every update, and right before
-// exiting a task.
-
-
-function ensureRootIsScheduled(root, currentTime) {
- var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as
- // expired so we know to work on those next.
-
- markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.
-
- var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.
-
- var newCallbackPriority = returnNextLanesPriority();
-
- if (nextLanes === NoLanes) {
- // Special case: There's nothing to work on.
- if (existingCallbackNode !== null) {
- cancelCallback(existingCallbackNode);
- root.callbackNode = null;
- root.callbackPriority = NoLanePriority;
- }
-
- return;
- } // Check if there's an existing task. We may be able to reuse it.
-
-
- if (existingCallbackNode !== null) {
- var existingCallbackPriority = root.callbackPriority;
-
- if (existingCallbackPriority === newCallbackPriority) {
- // The priority hasn't changed. We can reuse the existing task. Exit.
- return;
- } // The priority changed. Cancel the existing callback. We'll schedule a new
- // one below.
-
-
- cancelCallback(existingCallbackNode);
- } // Schedule a new callback.
-
-
- var newCallbackNode;
-
- if (newCallbackPriority === SyncLanePriority) {
- // Special case: Sync React callbacks are scheduled on a special
- // internal queue
- newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
- } else if (newCallbackPriority === SyncBatchedLanePriority) {
- newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));
- } else {
- var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);
- newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));
- }
-
- root.callbackPriority = newCallbackPriority;
- root.callbackNode = newCallbackNode;
-} // This is the entry point for every concurrent task, i.e. anything that
-// goes through Scheduler.
-
-
-function performConcurrentWorkOnRoot(root) {
- // Since we know we're in a React event, we can clear the current
- // event time. The next update will compute a new event time.
- currentEventTime = NoTimestamp;
- currentEventWipLanes = NoLanes;
- currentEventPendingLanes = NoLanes;
-
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- } // Flush any pending passive effects before deciding which lanes to work on,
- // in case they schedule additional work.
-
-
- var originalCallbackNode = root.callbackNode;
- var didFlushPassiveEffects = flushPassiveEffects();
-
- if (didFlushPassiveEffects) {
- // Something in the passive effect phase may have canceled the current task.
- // Check if the task node for this root was changed.
- if (root.callbackNode !== originalCallbackNode) {
- // The current task was canceled. Exit. We don't need to call
- // `ensureRootIsScheduled` because the check above implies either that
- // there's a new task, or that there's no remaining work on this root.
- return null;
- }
- } // Determine the next expiration time to work on, using the fields stored
- // on the root.
-
-
- var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
-
- if (lanes === NoLanes) {
- // Defensive coding. This is never expected to happen.
- return null;
- }
-
- var exitStatus = renderRootConcurrent(root, lanes);
-
- if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
- // The render included lanes that were updated during the render phase.
- // For example, when unhiding a hidden tree, we include all the lanes
- // that were previously skipped when the tree was hidden. That set of
- // lanes is a superset of the lanes we started rendering with.
- //
- // So we'll throw out the current work and restart.
- prepareFreshStack(root, NoLanes);
- } else if (exitStatus !== RootIncomplete) {
- if (exitStatus === RootErrored) {
- executionContext |= RetryAfterError; // If an error occurred during hydration,
- // discard server response and fall back to client side render.
-
- if (root.hydrate) {
- root.hydrate = false;
- clearContainer(root.containerInfo);
- } // If something threw an error, try rendering one more time. We'll render
- // synchronously to block concurrent data mutations, and we'll includes
- // all pending updates are included. If it still fails after the second
- // attempt, we'll give up and commit the resulting tree.
-
-
- lanes = getLanesToRetrySynchronouslyOnError(root);
-
- if (lanes !== NoLanes) {
- exitStatus = renderRootSync(root, lanes);
- }
- }
-
- if (exitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- prepareFreshStack(root, NoLanes);
- markRootSuspended$1(root, lanes);
- ensureRootIsScheduled(root, now());
- throw fatalError;
- } // We now have a consistent tree. The next step is either to commit it,
- // or, if something suspended, wait to commit it after a timeout.
-
-
- var finishedWork = root.current.alternate;
- root.finishedWork = finishedWork;
- root.finishedLanes = lanes;
- finishConcurrentRender(root, exitStatus, lanes);
- }
-
- ensureRootIsScheduled(root, now());
-
- if (root.callbackNode === originalCallbackNode) {
- // The task node scheduled for this root is the same one that's
- // currently executed. Need to return a continuation.
- return performConcurrentWorkOnRoot.bind(null, root);
- }
-
- return null;
-}
-
-function finishConcurrentRender(root, exitStatus, lanes) {
- switch (exitStatus) {
- case RootIncomplete:
- case RootFatalErrored:
- {
- {
- {
- throw Error( "Root did not complete. This is a bug in React." );
- }
- }
- }
- // Flow knows about invariant, so it complains if I add a break
- // statement, but eslint doesn't know about invariant, so it complains
- // if I do. eslint-disable-next-line no-fallthrough
-
- case RootErrored:
- {
- // We should have already attempted to retry this tree. If we reached
- // this point, it errored again. Commit it.
- commitRoot(root);
- break;
- }
-
- case RootSuspended:
- {
- markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we
- // should immediately commit it or wait a bit.
-
- if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
- !shouldForceFlushFallbacksInDEV()) {
- // This render only included retries, no updates. Throttle committing
- // retries so that we don't show too many loading states too quickly.
- var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
-
- if (msUntilTimeout > 10) {
- var nextLanes = getNextLanes(root, NoLanes);
-
- if (nextLanes !== NoLanes) {
- // There's additional work on this root.
- break;
- }
-
- var suspendedLanes = root.suspendedLanes;
-
- if (!isSubsetOfLanes(suspendedLanes, lanes)) {
- // We should prefer to render the fallback of at the last
- // suspended level. Ping the last suspended level to try
- // rendering it again.
- // FIXME: What if the suspended lanes are Idle? Should not restart.
- var eventTime = requestEventTime();
- markRootPinged(root, suspendedLanes);
- break;
- } // The render is suspended, it hasn't timed out, and there's no
- // lower priority work to do. Instead of committing the fallback
- // immediately, wait for more data to arrive.
-
-
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);
- break;
- }
- } // The work expired. Commit immediately.
-
-
- commitRoot(root);
- break;
- }
-
- case RootSuspendedWithDelay:
- {
- markRootSuspended$1(root, lanes);
-
- if (includesOnlyTransitions(lanes)) {
- // This is a transition, so we should exit without committing a
- // placeholder and without scheduling a timeout. Delay indefinitely
- // until we receive more data.
- break;
- }
-
- if (!shouldForceFlushFallbacksInDEV()) {
- // This is not a transition, but we did trigger an avoided state.
- // Schedule a placeholder to display after a short delay, using the Just
- // Noticeable Difference.
- // TODO: Is the JND optimization worth the added complexity? If this is
- // the only reason we track the event time, then probably not.
- // Consider removing.
- var mostRecentEventTime = getMostRecentEventTime(root, lanes);
- var eventTimeMs = mostRecentEventTime;
- var timeElapsedMs = now() - eventTimeMs;
-
- var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.
-
-
- if (_msUntilTimeout > 10) {
- // Instead of committing the fallback immediately, wait for more data
- // to arrive.
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
- break;
- }
- } // Commit the placeholder.
-
-
- commitRoot(root);
- break;
- }
-
- case RootCompleted:
- {
- // The work completed. Ready to commit.
- commitRoot(root);
- break;
- }
-
- default:
- {
- {
- {
- throw Error( "Unknown root exit status." );
- }
- }
- }
- }
-}
-
-function markRootSuspended$1(root, suspendedLanes) {
- // When suspending, we should always exclude lanes that were pinged or (more
- // rarely, since we try to avoid it) updated during the render phase.
- // TODO: Lol maybe there's a better way to factor this besides this
- // obnoxiously named function :)
- suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
- suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);
- markRootSuspended(root, suspendedLanes);
-} // This is the entry point for synchronous tasks that don't go
-// through Scheduler
-
-
-function performSyncWorkOnRoot(root) {
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
-
- flushPassiveEffects();
- var lanes;
- var exitStatus;
-
- if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {
- // There's a partial tree, and at least one of its lanes has expired. Finish
- // rendering it before rendering the rest of the expired work.
- lanes = workInProgressRootRenderLanes;
- exitStatus = renderRootSync(root, lanes);
-
- if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
- // The render included lanes that were updated during the render phase.
- // For example, when unhiding a hidden tree, we include all the lanes
- // that were previously skipped when the tree was hidden. That set of
- // lanes is a superset of the lanes we started rendering with.
- //
- // Note that this only happens when part of the tree is rendered
- // concurrently. If the whole tree is rendered synchronously, then there
- // are no interleaved events.
- lanes = getNextLanes(root, lanes);
- exitStatus = renderRootSync(root, lanes);
- }
- } else {
- lanes = getNextLanes(root, NoLanes);
- exitStatus = renderRootSync(root, lanes);
- }
-
- if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
- executionContext |= RetryAfterError; // If an error occurred during hydration,
- // discard server response and fall back to client side render.
-
- if (root.hydrate) {
- root.hydrate = false;
- clearContainer(root.containerInfo);
- } // If something threw an error, try rendering one more time. We'll render
- // synchronously to block concurrent data mutations, and we'll includes
- // all pending updates are included. If it still fails after the second
- // attempt, we'll give up and commit the resulting tree.
-
-
- lanes = getLanesToRetrySynchronouslyOnError(root);
-
- if (lanes !== NoLanes) {
- exitStatus = renderRootSync(root, lanes);
- }
- }
-
- if (exitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- prepareFreshStack(root, NoLanes);
- markRootSuspended$1(root, lanes);
- ensureRootIsScheduled(root, now());
- throw fatalError;
- } // We now have a consistent tree. Because this is a sync render, we
- // will commit it even if something suspended.
-
-
- var finishedWork = root.current.alternate;
- root.finishedWork = finishedWork;
- root.finishedLanes = lanes;
- commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next
- // pending level.
-
- ensureRootIsScheduled(root, now());
- return null;
-}
-function flushDiscreteUpdates() {
- // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
- // However, `act` uses `batchedUpdates`, so there's no way to distinguish
- // those two cases. Need to fix this before exposing flushDiscreteUpdates
- // as a public API.
- if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {
- {
- if ((executionContext & RenderContext) !== NoContext) {
- error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');
- }
- } // We're already rendering, so we can't synchronously flush pending work.
- // This is probably a nested event dispatch triggered by a lifecycle/effect,
- // like `el.focus()`. Exit.
-
-
- return;
- }
-
- flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that
- // they fire before the next serial event.
-
- flushPassiveEffects();
-}
-
-function flushPendingDiscreteUpdates() {
- if (rootsWithPendingDiscreteUpdates !== null) {
- // For each root with pending discrete updates, schedule a callback to
- // immediately flush them.
- var roots = rootsWithPendingDiscreteUpdates;
- rootsWithPendingDiscreteUpdates = null;
- roots.forEach(function (root) {
- markDiscreteUpdatesExpired(root);
- ensureRootIsScheduled(root, now());
- });
- } // Now flush the immediate queue.
-
-
- flushSyncCallbackQueue();
-}
-
-function batchedUpdates$1(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext |= BatchedContext;
-
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
-
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
-}
-function batchedEventUpdates$1(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext |= EventContext;
-
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
-
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
-}
-function discreteUpdates$1(fn, a, b, c, d) {
- var prevExecutionContext = executionContext;
- executionContext |= DiscreteEventContext;
-
- {
- try {
- return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));
- } finally {
- executionContext = prevExecutionContext;
-
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
- }
-}
-function unbatchedUpdates(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext &= ~BatchedContext;
- executionContext |= LegacyUnbatchedContext;
-
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
-
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
-}
-function flushSync(fn, a) {
- var prevExecutionContext = executionContext;
-
- if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {
- {
- error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
- }
-
- return fn(a);
- }
-
- executionContext |= BatchedContext;
-
- {
- try {
- if (fn) {
- return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));
- } else {
- return undefined;
- }
- } finally {
- executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
- // Note that this will happen even if batchedUpdates is higher up
- // the stack.
-
- flushSyncCallbackQueue();
- }
- }
-}
-function pushRenderLanes(fiber, lanes) {
- push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
- subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
- workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
-}
-function popRenderLanes(fiber) {
- subtreeRenderLanes = subtreeRenderLanesCursor.current;
- pop(subtreeRenderLanesCursor, fiber);
-}
-
-function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = NoLanes;
- var timeoutHandle = root.timeoutHandle;
-
- if (timeoutHandle !== noTimeout) {
- // The root previous suspended and scheduled a timeout to commit a fallback
- // state. Now that we have additional work, cancel the timeout.
- root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
-
- cancelTimeout(timeoutHandle);
- }
-
- if (workInProgress !== null) {
- var interruptedWork = workInProgress.return;
-
- while (interruptedWork !== null) {
- unwindInterruptedWork(interruptedWork);
- interruptedWork = interruptedWork.return;
- }
- }
-
- workInProgressRoot = root;
- workInProgress = createWorkInProgress(root.current, null);
- workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
- workInProgressRootExitStatus = RootIncomplete;
- workInProgressRootFatalError = null;
- workInProgressRootSkippedLanes = NoLanes;
- workInProgressRootUpdatedLanes = NoLanes;
- workInProgressRootPingedLanes = NoLanes;
-
- {
- spawnedWorkDuringRender = null;
- }
-
- {
- ReactStrictModeWarnings.discardPendingWarnings();
- }
-}
-
-function handleError(root, thrownValue) {
- do {
- var erroredWork = workInProgress;
-
- try {
- // Reset module-level state that was set during the render phase.
- resetContextDependencies();
- resetHooksAfterThrow();
- resetCurrentFiber(); // TODO: I found and added this missing line while investigating a
- // separate issue. Write a regression test using string refs.
-
- ReactCurrentOwner$2.current = null;
-
- if (erroredWork === null || erroredWork.return === null) {
- // Expected to be working on a non-root fiber. This is a fatal error
- // because there's no ancestor that can handle it; the root is
- // supposed to capture all errors that weren't caught by an error
- // boundary.
- workInProgressRootExitStatus = RootFatalErrored;
- workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
- // sibling, or the parent if there are no siblings. But since the root
- // has no siblings nor a parent, we set it to null. Usually this is
- // handled by `completeUnitOfWork` or `unwindWork`, but since we're
- // intentionally not calling those, we need set it here.
- // TODO: Consider calling `unwindWork` to pop the contexts.
-
- workInProgress = null;
- return;
- }
-
- if (enableProfilerTimer && erroredWork.mode & ProfileMode) {
- // Record the time spent rendering before an error was thrown. This
- // avoids inaccurate Profiler durations in the case of a
- // suspended render.
- stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);
- }
-
- throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
- completeUnitOfWork(erroredWork);
- } catch (yetAnotherThrownValue) {
- // Something in the return path also threw.
- thrownValue = yetAnotherThrownValue;
-
- if (workInProgress === erroredWork && erroredWork !== null) {
- // If this boundary has already errored, then we had trouble processing
- // the error. Bubble it to the next boundary.
- erroredWork = erroredWork.return;
- workInProgress = erroredWork;
- } else {
- erroredWork = workInProgress;
- }
-
- continue;
- } // Return to the normal work loop.
-
-
- return;
- } while (true);
-}
-
-function pushDispatcher() {
- var prevDispatcher = ReactCurrentDispatcher$2.current;
- ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;
-
- if (prevDispatcher === null) {
- // The React isomorphic package does not include a default dispatcher.
- // Instead the first renderer will lazily attach one, in order to give
- // nicer error messages.
- return ContextOnlyDispatcher;
- } else {
- return prevDispatcher;
- }
-}
-
-function popDispatcher(prevDispatcher) {
- ReactCurrentDispatcher$2.current = prevDispatcher;
-}
-
-function pushInteractions(root) {
- {
- var prevInteractions = tracing.__interactionsRef.current;
- tracing.__interactionsRef.current = root.memoizedInteractions;
- return prevInteractions;
- }
-}
-
-function popInteractions(prevInteractions) {
- {
- tracing.__interactionsRef.current = prevInteractions;
- }
-}
-
-function markCommitTimeOfFallback() {
- globalMostRecentFallbackTime = now();
-}
-function markSkippedUpdateLanes(lane) {
- workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
-}
-function renderDidSuspend() {
- if (workInProgressRootExitStatus === RootIncomplete) {
- workInProgressRootExitStatus = RootSuspended;
- }
-}
-function renderDidSuspendDelayIfPossible() {
- if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
- workInProgressRootExitStatus = RootSuspendedWithDelay;
- } // Check if there are updates that we skipped tree that might have unblocked
- // this render.
-
-
- if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {
- // Mark the current render as suspended so that we switch to working on
- // the updates that were skipped. Usually we only suspend at the end of
- // the render phase.
- // TODO: We should probably always mark the root as suspended immediately
- // (inside this function), since by suspending at the end of the render
- // phase introduces a potential mistake where we suspend lanes that were
- // pinged or updated while we were rendering.
- markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
- }
-}
-function renderDidError() {
- if (workInProgressRootExitStatus !== RootCompleted) {
- workInProgressRootExitStatus = RootErrored;
- }
-} // Called during render to determine if anything has suspended.
-// Returns false if we're not sure.
-
-function renderHasNotSuspendedYet() {
- // If something errored or completed, we can't really be sure,
- // so those are false.
- return workInProgressRootExitStatus === RootIncomplete;
-}
-
-function renderRootSync(root, lanes) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
-
- if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
- prepareFreshStack(root, lanes);
- startWorkOnPendingInteractions(root, lanes);
- }
-
- var prevInteractions = pushInteractions(root);
-
- do {
- try {
- workLoopSync();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
-
- resetContextDependencies();
-
- {
- popInteractions(prevInteractions);
- }
-
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
-
- if (workInProgress !== null) {
- // This is a sync render, so we should have finished the whole tree.
- {
- {
- throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-
-
- workInProgressRoot = null;
- workInProgressRootRenderLanes = NoLanes;
- return workInProgressRootExitStatus;
-} // The work loop is an extremely hot path. Tell Closure not to inline it.
-
-/** @noinline */
-
-
-function workLoopSync() {
- // Already timed out, so perform work without checking if we need to yield.
- while (workInProgress !== null) {
- performUnitOfWork(workInProgress);
- }
-}
-
-function renderRootConcurrent(root, lanes) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
-
- if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
- resetRenderTimer();
- prepareFreshStack(root, lanes);
- startWorkOnPendingInteractions(root, lanes);
- }
-
- var prevInteractions = pushInteractions(root);
-
- do {
- try {
- workLoopConcurrent();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
-
- resetContextDependencies();
-
- {
- popInteractions(prevInteractions);
- }
-
- popDispatcher(prevDispatcher);
- executionContext = prevExecutionContext;
-
-
- if (workInProgress !== null) {
-
- return RootIncomplete;
- } else {
-
-
- workInProgressRoot = null;
- workInProgressRootRenderLanes = NoLanes; // Return the final exit status.
-
- return workInProgressRootExitStatus;
- }
-}
-/** @noinline */
-
-
-function workLoopConcurrent() {
- // Perform work until Scheduler asks us to yield
- while (workInProgress !== null && !shouldYield()) {
- performUnitOfWork(workInProgress);
- }
-}
-
-function performUnitOfWork(unitOfWork) {
- // The current, flushed, state of this fiber is the alternate. Ideally
- // nothing should rely on this, but relying on it here means that we don't
- // need an additional field on the work in progress.
- var current = unitOfWork.alternate;
- setCurrentFiber(unitOfWork);
- var next;
-
- if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
- startProfilerTimer(unitOfWork);
- next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
- stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
- } else {
- next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
- }
-
- resetCurrentFiber();
- unitOfWork.memoizedProps = unitOfWork.pendingProps;
-
- if (next === null) {
- // If this doesn't spawn new work, complete the current work.
- completeUnitOfWork(unitOfWork);
- } else {
- workInProgress = next;
- }
-
- ReactCurrentOwner$2.current = null;
-}
-
-function completeUnitOfWork(unitOfWork) {
- // Attempt to complete the current unit of work, then move to the next
- // sibling. If there are no more siblings, return to the parent fiber.
- var completedWork = unitOfWork;
-
- do {
- // The current, flushed, state of this fiber is the alternate. Ideally
- // nothing should rely on this, but relying on it here means that we don't
- // need an additional field on the work in progress.
- var current = completedWork.alternate;
- var returnFiber = completedWork.return; // Check if the work completed or if something threw.
-
- if ((completedWork.flags & Incomplete) === NoFlags) {
- setCurrentFiber(completedWork);
- var next = void 0;
-
- if ( (completedWork.mode & ProfileMode) === NoMode) {
- next = completeWork(current, completedWork, subtreeRenderLanes);
- } else {
- startProfilerTimer(completedWork);
- next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.
-
- stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
- }
-
- resetCurrentFiber();
-
- if (next !== null) {
- // Completing this fiber spawned new work. Work on that next.
- workInProgress = next;
- return;
- }
-
- resetChildLanes(completedWork);
-
- if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
- (returnFiber.flags & Incomplete) === NoFlags) {
- // Append all the effects of the subtree and this fiber onto the effect
- // list of the parent. The completion order of the children affects the
- // side-effect order.
- if (returnFiber.firstEffect === null) {
- returnFiber.firstEffect = completedWork.firstEffect;
- }
-
- if (completedWork.lastEffect !== null) {
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = completedWork.firstEffect;
- }
-
- returnFiber.lastEffect = completedWork.lastEffect;
- } // If this fiber had side-effects, we append it AFTER the children's
- // side-effects. We can perform certain side-effects earlier if needed,
- // by doing multiple passes over the effect list. We don't want to
- // schedule our own side-effect on our own list because if end up
- // reusing children we'll schedule this effect onto itself since we're
- // at the end.
-
-
- var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect
- // list. PerformedWork effect is read by React DevTools but shouldn't be
- // committed.
-
- if (flags > PerformedWork) {
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = completedWork;
- } else {
- returnFiber.firstEffect = completedWork;
- }
-
- returnFiber.lastEffect = completedWork;
- }
- }
- } else {
- // This fiber did not complete because something threw. Pop values off
- // the stack without entering the complete phase. If this is a boundary,
- // capture values if possible.
- var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time.
-
-
- if (_next !== null) {
- // If completing this work spawned new work, do that next. We'll come
- // back here again.
- // Since we're restarting, remove anything that is not a host effect
- // from the effect tag.
- _next.flags &= HostEffectMask;
- workInProgress = _next;
- return;
- }
-
- if ( (completedWork.mode & ProfileMode) !== NoMode) {
- // Record the render duration for the fiber that errored.
- stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.
-
- var actualDuration = completedWork.actualDuration;
- var child = completedWork.child;
-
- while (child !== null) {
- actualDuration += child.actualDuration;
- child = child.sibling;
- }
-
- completedWork.actualDuration = actualDuration;
- }
-
- if (returnFiber !== null) {
- // Mark the parent fiber as incomplete and clear its effect list.
- returnFiber.firstEffect = returnFiber.lastEffect = null;
- returnFiber.flags |= Incomplete;
- }
- }
-
- var siblingFiber = completedWork.sibling;
-
- if (siblingFiber !== null) {
- // If there is more work to do in this returnFiber, do that next.
- workInProgress = siblingFiber;
- return;
- } // Otherwise, return to the parent
-
-
- completedWork = returnFiber; // Update the next thing we're working on in case something throws.
-
- workInProgress = completedWork;
- } while (completedWork !== null); // We've reached the root.
-
-
- if (workInProgressRootExitStatus === RootIncomplete) {
- workInProgressRootExitStatus = RootCompleted;
- }
-}
-
-function resetChildLanes(completedWork) {
- if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`
- // to switch statement in `completeWork`.
- (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {
- // The children of this component are hidden. Don't bubble their
- // expiration times.
- return;
- }
-
- var newChildLanes = NoLanes; // Bubble up the earliest expiration time.
-
- if ( (completedWork.mode & ProfileMode) !== NoMode) {
- // In profiling mode, resetChildExpirationTime is also used to reset
- // profiler durations.
- var actualDuration = completedWork.actualDuration;
- var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will
- // only be updated if work is done on the fiber (i.e. it doesn't bailout).
- // When work is done, it should bubble to the parent's actualDuration. If
- // the fiber has not been cloned though, (meaning no work was done), then
- // this value will reflect the amount of time spent working on a previous
- // render. In that case it should not bubble. We determine whether it was
- // cloned by comparing the child pointer.
-
- var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;
- var child = completedWork.child;
-
- while (child !== null) {
- newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));
-
- if (shouldBubbleActualDurations) {
- actualDuration += child.actualDuration;
- }
-
- treeBaseDuration += child.treeBaseDuration;
- child = child.sibling;
- }
-
- var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;
-
- if (isTimedOutSuspense) {
- // Don't count time spent in a timed out Suspense subtree as part of the base duration.
- var primaryChildFragment = completedWork.child;
-
- if (primaryChildFragment !== null) {
- treeBaseDuration -= primaryChildFragment.treeBaseDuration;
- }
- }
-
- completedWork.actualDuration = actualDuration;
- completedWork.treeBaseDuration = treeBaseDuration;
- } else {
- var _child = completedWork.child;
-
- while (_child !== null) {
- newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
- _child = _child.sibling;
- }
- }
-
- completedWork.childLanes = newChildLanes;
-}
-
-function commitRoot(root) {
- var renderPriorityLevel = getCurrentPriorityLevel();
- runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));
- return null;
-}
-
-function commitRootImpl(root, renderPriorityLevel) {
- do {
- // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
- // means `flushPassiveEffects` will sometimes result in additional
- // passive effects. So we need to keep flushing in a loop until there are
- // no more pending effects.
- // TODO: Might be better if `flushPassiveEffects` did not automatically
- // flush synchronous work at the end, to avoid factoring hazards like this.
- flushPassiveEffects();
- } while (rootWithPendingPassiveEffects !== null);
-
- flushRenderPhaseStrictModeWarningsInDEV();
-
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
-
- var finishedWork = root.finishedWork;
- var lanes = root.finishedLanes;
-
- if (finishedWork === null) {
-
- return null;
- }
-
- root.finishedWork = null;
- root.finishedLanes = NoLanes;
-
- if (!(finishedWork !== root.current)) {
- {
- throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // commitRoot never returns a continuation; it always finishes synchronously.
- // So we can clear these now to allow a new callback to be scheduled.
-
-
- root.callbackNode = null; // Update the first and last pending times on this root. The new first
- // pending time is whatever is left on the root fiber.
-
- var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
- markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of
- // `flushDiscreteUpdates` starts a useless render pass which may cancels
- // a scheduled timeout.
-
- if (rootsWithPendingDiscreteUpdates !== null) {
- if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {
- rootsWithPendingDiscreteUpdates.delete(root);
- }
- }
-
- if (root === workInProgressRoot) {
- // We can reset these now that they are finished.
- workInProgressRoot = null;
- workInProgress = null;
- workInProgressRootRenderLanes = NoLanes;
- } // Get the list of effects.
-
-
- var firstEffect;
-
- if (finishedWork.flags > PerformedWork) {
- // A fiber's effect list consists only of its children, not itself. So if
- // the root has an effect, we need to add it to the end of the list. The
- // resulting list is the set that would belong to the root's parent, if it
- // had one; that is, all the effects in the tree including the root.
- if (finishedWork.lastEffect !== null) {
- finishedWork.lastEffect.nextEffect = finishedWork;
- firstEffect = finishedWork.firstEffect;
- } else {
- firstEffect = finishedWork;
- }
- } else {
- // There is no effect on the root.
- firstEffect = finishedWork.firstEffect;
- }
-
- if (firstEffect !== null) {
-
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles
-
- ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass
- // of the effect list for each phase: all mutation effects come before all
- // layout effects, and so on.
- // The first phase a "before mutation" phase. We use this phase to read the
- // state of the host tree right before we mutate it. This is where
- // getSnapshotBeforeUpdate is called.
-
- focusedInstanceHandle = prepareForCommit(root.containerInfo);
- shouldFireAfterActiveInstanceBlur = false;
- nextEffect = firstEffect;
-
- do {
- {
- invokeGuardedCallback(null, commitBeforeMutationEffects, null);
-
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var error = clearCaughtError();
- captureCommitPhaseError(nextEffect, error);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null); // We no longer need to track the active instance fiber
-
-
- focusedInstanceHandle = null;
-
- {
- // Mark the current commit time to be shared by all Profilers in this
- // batch. This enables them to be grouped later.
- recordCommitTime();
- } // The next phase is the mutation phase, where we mutate the host tree.
-
-
- nextEffect = firstEffect;
-
- do {
- {
- invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);
-
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var _error = clearCaughtError();
-
- captureCommitPhaseError(nextEffect, _error);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null);
-
- resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
- // the mutation phase, so that the previous tree is still current during
- // componentWillUnmount, but before the layout phase, so that the finished
- // work is current during componentDidMount/Update.
-
- root.current = finishedWork; // The next phase is the layout phase, where we call effects that read
- // the host tree after it's been mutated. The idiomatic use case for this is
- // layout, but class component lifecycles also fire here for legacy reasons.
-
- nextEffect = firstEffect;
-
- do {
- {
- invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);
-
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var _error2 = clearCaughtError();
-
- captureCommitPhaseError(nextEffect, _error2);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null);
-
- nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
- // opportunity to paint.
-
- requestPaint();
-
- {
- popInteractions(prevInteractions);
- }
-
- executionContext = prevExecutionContext;
- } else {
- // No effects.
- root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
- // no effects.
- // TODO: Maybe there's a better way to report this.
-
- {
- recordCommitTime();
- }
- }
-
- var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
-
- if (rootDoesHavePassiveEffects) {
- // This commit has passive effects. Stash a reference to them. But don't
- // schedule a callback until after flushing layout work.
- rootDoesHavePassiveEffects = false;
- rootWithPendingPassiveEffects = root;
- pendingPassiveEffectsLanes = lanes;
- pendingPassiveEffectsRenderPriority = renderPriorityLevel;
- } else {
- // We are done with the effect chain at this point so let's clear the
- // nextEffect pointers to assist with GC. If we have passive effects, we'll
- // clear this in flushPassiveEffects.
- nextEffect = firstEffect;
-
- while (nextEffect !== null) {
- var nextNextEffect = nextEffect.nextEffect;
- nextEffect.nextEffect = null;
-
- if (nextEffect.flags & Deletion) {
- detachFiberAfterEffects(nextEffect);
- }
-
- nextEffect = nextNextEffect;
- }
- } // Read this again, since an effect might have updated it
-
-
- remainingLanes = root.pendingLanes; // Check if there's remaining work on this root
-
- if (remainingLanes !== NoLanes) {
- {
- if (spawnedWorkDuringRender !== null) {
- var expirationTimes = spawnedWorkDuringRender;
- spawnedWorkDuringRender = null;
-
- for (var i = 0; i < expirationTimes.length; i++) {
- scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);
- }
- }
-
- schedulePendingInteractions(root, remainingLanes);
- }
- } else {
- // If there's no remaining work, we can clear the set of already failed
- // error boundaries.
- legacyErrorBoundariesThatAlreadyFailed = null;
- }
-
- {
- if (!rootDidHavePassiveEffects) {
- // If there are no passive effects, then we can complete the pending interactions.
- // Otherwise, we'll wait until after the passive effects are flushed.
- // Wait to do this until after remaining work has been scheduled,
- // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
- finishPendingInteractions(root, lanes);
- }
- }
-
- if (remainingLanes === SyncLane) {
- // Count the number of times the root synchronously re-renders without
- // finishing. If there are too many, it indicates an infinite update loop.
- if (root === rootWithNestedUpdates) {
- nestedUpdateCount++;
- } else {
- nestedUpdateCount = 0;
- rootWithNestedUpdates = root;
- }
- } else {
- nestedUpdateCount = 0;
- }
-
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
-
- {
- onCommitRoot$1();
- } // Always call this before exiting `commitRoot`, to ensure that any
- // additional work on this root is scheduled.
-
-
- ensureRootIsScheduled(root, now());
-
- if (hasUncaughtError) {
- hasUncaughtError = false;
- var _error3 = firstUncaughtError;
- firstUncaughtError = null;
- throw _error3;
- }
-
- if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
- // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
- // synchronously, but layout updates should be deferred until the end
- // of the batch.
-
-
- return null;
- } // If layout work was scheduled, flush it now.
-
-
- flushSyncCallbackQueue();
-
- return null;
-}
-
-function commitBeforeMutationEffects() {
- while (nextEffect !== null) {
- var current = nextEffect.alternate;
-
- if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {
- if ((nextEffect.flags & Deletion) !== NoFlags) {
- if (doesFiberContain(nextEffect, focusedInstanceHandle)) {
- shouldFireAfterActiveInstanceBlur = true;
- }
- } else {
- // TODO: Move this out of the hot path using a dedicated effect tag.
- if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {
- shouldFireAfterActiveInstanceBlur = true;
- }
- }
- }
-
- var flags = nextEffect.flags;
-
- if ((flags & Snapshot) !== NoFlags) {
- setCurrentFiber(nextEffect);
- commitBeforeMutationLifeCycles(current, nextEffect);
- resetCurrentFiber();
- }
-
- if ((flags & Passive) !== NoFlags) {
- // If there are passive effects, schedule a callback to flush at
- // the earliest opportunity.
- if (!rootDoesHavePassiveEffects) {
- rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects();
- return null;
- });
- }
- }
-
- nextEffect = nextEffect.nextEffect;
- }
-}
-
-function commitMutationEffects(root, renderPriorityLevel) {
- // TODO: Should probably move the bulk of this function to commitWork.
- while (nextEffect !== null) {
- setCurrentFiber(nextEffect);
- var flags = nextEffect.flags;
-
- if (flags & ContentReset) {
- commitResetTextContent(nextEffect);
- }
-
- if (flags & Ref) {
- var current = nextEffect.alternate;
-
- if (current !== null) {
- commitDetachRef(current);
- }
- } // The following switch statement is only concerned about placement,
- // updates, and deletions. To avoid needing to add a case for every possible
- // bitmap value, we remove the secondary effects from the effect tag and
- // switch on that value.
-
-
- var primaryFlags = flags & (Placement | Update | Deletion | Hydrating);
-
- switch (primaryFlags) {
- case Placement:
- {
- commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
- // inserted, before any life-cycles like componentDidMount gets called.
- // TODO: findDOMNode doesn't rely on this any more but isMounted does
- // and isMounted is deprecated anyway so we should be able to kill this.
-
- nextEffect.flags &= ~Placement;
- break;
- }
-
- case PlacementAndUpdate:
- {
- // Placement
- commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
- // inserted, before any life-cycles like componentDidMount gets called.
-
- nextEffect.flags &= ~Placement; // Update
-
- var _current = nextEffect.alternate;
- commitWork(_current, nextEffect);
- break;
- }
-
- case Hydrating:
- {
- nextEffect.flags &= ~Hydrating;
- break;
- }
-
- case HydratingAndUpdate:
- {
- nextEffect.flags &= ~Hydrating; // Update
-
- var _current2 = nextEffect.alternate;
- commitWork(_current2, nextEffect);
- break;
- }
-
- case Update:
- {
- var _current3 = nextEffect.alternate;
- commitWork(_current3, nextEffect);
- break;
- }
-
- case Deletion:
- {
- commitDeletion(root, nextEffect);
- break;
- }
- }
-
- resetCurrentFiber();
- nextEffect = nextEffect.nextEffect;
- }
-}
-
-function commitLayoutEffects(root, committedLanes) {
-
-
- while (nextEffect !== null) {
- setCurrentFiber(nextEffect);
- var flags = nextEffect.flags;
-
- if (flags & (Update | Callback)) {
- var current = nextEffect.alternate;
- commitLifeCycles(root, current, nextEffect);
- }
-
- {
- if (flags & Ref) {
- commitAttachRef(nextEffect);
- }
- }
-
- resetCurrentFiber();
- nextEffect = nextEffect.nextEffect;
- }
-}
-
-function flushPassiveEffects() {
- // Returns whether passive effects were flushed.
- if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {
- var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;
- pendingPassiveEffectsRenderPriority = NoPriority$1;
-
- {
- return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
- }
- }
-
- return false;
-}
-function enqueuePendingPassiveHookEffectMount(fiber, effect) {
- pendingPassiveHookEffectsMount.push(effect, fiber);
-
- if (!rootDoesHavePassiveEffects) {
- rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects();
- return null;
- });
- }
-}
-function enqueuePendingPassiveHookEffectUnmount(fiber, effect) {
- pendingPassiveHookEffectsUnmount.push(effect, fiber);
-
- {
- fiber.flags |= PassiveUnmountPendingDev;
- var alternate = fiber.alternate;
-
- if (alternate !== null) {
- alternate.flags |= PassiveUnmountPendingDev;
- }
- }
-
- if (!rootDoesHavePassiveEffects) {
- rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects();
- return null;
- });
- }
-}
-
-function invokePassiveEffectCreate(effect) {
- var create = effect.create;
- effect.destroy = create();
-}
-
-function flushPassiveEffectsImpl() {
- if (rootWithPendingPassiveEffects === null) {
- return false;
- }
-
- var root = rootWithPendingPassiveEffects;
- var lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = NoLanes;
-
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Cannot flush passive effects while already rendering." );
- }
- }
-
- {
- isFlushingPassiveEffects = true;
- }
-
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called
- // before ANY passive effect create functions are called.
- // Otherwise effects in sibling components might interfere with each other.
- // e.g. a destroy function in one component may unintentionally override a ref
- // value set by a create function in another component.
- // Layout effects have the same constraint.
- // First pass: Destroy stale passive effects.
-
- var unmountEffects = pendingPassiveHookEffectsUnmount;
- pendingPassiveHookEffectsUnmount = [];
-
- for (var i = 0; i < unmountEffects.length; i += 2) {
- var _effect = unmountEffects[i];
- var fiber = unmountEffects[i + 1];
- var destroy = _effect.destroy;
- _effect.destroy = undefined;
-
- {
- fiber.flags &= ~PassiveUnmountPendingDev;
- var alternate = fiber.alternate;
-
- if (alternate !== null) {
- alternate.flags &= ~PassiveUnmountPendingDev;
- }
- }
-
- if (typeof destroy === 'function') {
- {
- setCurrentFiber(fiber);
-
- {
- invokeGuardedCallback(null, destroy, null);
- }
-
- if (hasCaughtError()) {
- if (!(fiber !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var error = clearCaughtError();
- captureCommitPhaseError(fiber, error);
- }
-
- resetCurrentFiber();
- }
- }
- } // Second pass: Create new passive effects.
-
-
- var mountEffects = pendingPassiveHookEffectsMount;
- pendingPassiveHookEffectsMount = [];
-
- for (var _i = 0; _i < mountEffects.length; _i += 2) {
- var _effect2 = mountEffects[_i];
- var _fiber = mountEffects[_i + 1];
-
- {
- setCurrentFiber(_fiber);
-
- {
- invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);
- }
-
- if (hasCaughtError()) {
- if (!(_fiber !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var _error4 = clearCaughtError();
-
- captureCommitPhaseError(_fiber, _error4);
- }
-
- resetCurrentFiber();
- }
- } // Note: This currently assumes there are no passive effects on the root fiber
- // because the root is not part of its own effect list.
- // This could change in the future.
-
-
- var effect = root.current.firstEffect;
-
- while (effect !== null) {
- var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC
-
- effect.nextEffect = null;
-
- if (effect.flags & Deletion) {
- detachFiberAfterEffects(effect);
- }
-
- effect = nextNextEffect;
- }
-
- {
- popInteractions(prevInteractions);
- finishPendingInteractions(root, lanes);
- }
-
- {
- isFlushingPassiveEffects = false;
- }
-
- executionContext = prevExecutionContext;
- flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this
- // exceeds the limit, we'll fire a warning.
-
- nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;
- return true;
-}
-
-function isAlreadyFailedLegacyErrorBoundary(instance) {
- return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
-}
-function markLegacyErrorBoundaryAsFailed(instance) {
- if (legacyErrorBoundariesThatAlreadyFailed === null) {
- legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
- } else {
- legacyErrorBoundariesThatAlreadyFailed.add(instance);
- }
-}
-
-function prepareToThrowUncaughtError(error) {
- if (!hasUncaughtError) {
- hasUncaughtError = true;
- firstUncaughtError = error;
- }
-}
-
-var onUncaughtError = prepareToThrowUncaughtError;
-
-function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
- var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
- enqueueUpdate(rootFiber, update);
- var eventTime = requestEventTime();
- var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);
-
- if (root !== null) {
- markRootUpdated(root, SyncLane, eventTime);
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, SyncLane);
- }
-}
-
-function captureCommitPhaseError(sourceFiber, error) {
- if (sourceFiber.tag === HostRoot) {
- // Error was thrown at the root. There is no parent, so the root
- // itself should capture it.
- captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
- return;
- }
-
- var fiber = sourceFiber.return;
-
- while (fiber !== null) {
- if (fiber.tag === HostRoot) {
- captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
- return;
- } else if (fiber.tag === ClassComponent) {
- var ctor = fiber.type;
- var instance = fiber.stateNode;
-
- if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
- var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
- enqueueUpdate(fiber, update);
- var eventTime = requestEventTime();
- var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);
-
- if (root !== null) {
- markRootUpdated(root, SyncLane, eventTime);
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, SyncLane);
- } else {
- // This component has already been unmounted.
- // We can't schedule any follow up work for the root because the fiber is already unmounted,
- // but we can still call the log-only boundary so the error isn't swallowed.
- //
- // TODO This is only a temporary bandaid for the old reconciler fork.
- // We can delete this special case once the new fork is merged.
- if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
- try {
- instance.componentDidCatch(error, errorInfo);
- } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?
- // This is kind of an edge case.
- }
- }
- }
-
- return;
- }
- }
-
- fiber = fiber.return;
- }
-}
-function pingSuspendedRoot(root, wakeable, pingedLanes) {
- var pingCache = root.pingCache;
-
- if (pingCache !== null) {
- // The wakeable resolved, so we no longer need to memoize, because it will
- // never be thrown again.
- pingCache.delete(wakeable);
- }
-
- var eventTime = requestEventTime();
- markRootPinged(root, pingedLanes);
-
- if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
- // Received a ping at the same priority level at which we're currently
- // rendering. We might want to restart this render. This should mirror
- // the logic of whether or not a root suspends once it completes.
- // TODO: If we're rendering sync either due to Sync, Batched or expired,
- // we should probably never restart.
- // If we're suspended with delay, or if it's a retry, we'll always suspend
- // so we can always restart.
- if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
- // Restart from the root.
- prepareFreshStack(root, NoLanes);
- } else {
- // Even though we can't restart right now, we might get an
- // opportunity later. So we mark this render as having a ping.
- workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
- }
- }
-
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, pingedLanes);
-}
-
-function retryTimedOutBoundary(boundaryFiber, retryLane) {
- // The boundary fiber (a Suspense component or SuspenseList component)
- // previously was rendered in its fallback state. One of the promises that
- // suspended it has resolved, which means at least part of the tree was
- // likely unblocked. Try rendering again, at a new expiration time.
- if (retryLane === NoLane) {
- retryLane = requestRetryLane(boundaryFiber);
- } // TODO: Special case idle priority?
-
-
- var eventTime = requestEventTime();
- var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);
-
- if (root !== null) {
- markRootUpdated(root, retryLane, eventTime);
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, retryLane);
- }
-}
-function resolveRetryWakeable(boundaryFiber, wakeable) {
- var retryLane = NoLane; // Default
-
- var retryCache;
-
- {
- retryCache = boundaryFiber.stateNode;
- }
-
- if (retryCache !== null) {
- // The wakeable resolved, so we no longer need to memoize, because it will
- // never be thrown again.
- retryCache.delete(wakeable);
- }
-
- retryTimedOutBoundary(boundaryFiber, retryLane);
-} // Computes the next Just Noticeable Difference (JND) boundary.
-// The theory is that a person can't tell the difference between small differences in time.
-// Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
-// difference in the experience. However, waiting for longer might mean that we can avoid
-// showing an intermediate loading state. The longer we have already waited, the harder it
-// is to tell small differences in time. Therefore, the longer we've already waited,
-// the longer we can wait additionally. At some point we have to give up though.
-// We pick a train model where the next boundary commits at a consistent schedule.
-// These particular numbers are vague estimates. We expect to adjust them based on research.
-
-function jnd(timeElapsed) {
- return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
-}
-
-function checkForNestedUpdates() {
- if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
- nestedUpdateCount = 0;
- rootWithNestedUpdates = null;
-
- {
- {
- throw Error( "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." );
- }
- }
- }
-
- {
- if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
- nestedPassiveUpdateCount = 0;
-
- error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
- }
- }
-}
-
-function flushRenderPhaseStrictModeWarningsInDEV() {
- {
- ReactStrictModeWarnings.flushLegacyContextWarning();
-
- {
- ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
- }
- }
-}
-
-var didWarnStateUpdateForNotYetMountedComponent = null;
-
-function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
- {
- if ((executionContext & RenderContext) !== NoContext) {
- // We let the other warning about render phase updates deal with this one.
- return;
- }
-
- if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {
- return;
- }
-
- var tag = fiber.tag;
-
- if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
- // Only warn for user-defined components, not internal ones like Suspense.
- return;
- } // We show the whole stack but dedupe on the top component's name because
- // the problematic code almost always lies inside that component.
-
-
- var componentName = getComponentName(fiber.type) || 'ReactComponent';
-
- if (didWarnStateUpdateForNotYetMountedComponent !== null) {
- if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
- return;
- }
-
- didWarnStateUpdateForNotYetMountedComponent.add(componentName);
- } else {
- didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);
- }
-
- var previousFiber = current;
-
- try {
- setCurrentFiber(fiber);
-
- error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');
- } finally {
- if (previousFiber) {
- setCurrentFiber(fiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
-}
-
-var didWarnStateUpdateForUnmountedComponent = null;
-
-function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
- {
- var tag = fiber.tag;
-
- if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
- // Only warn for user-defined components, not internal ones like Suspense.
- return;
- } // If there are pending passive effects unmounts for this Fiber,
- // we can assume that they would have prevented this update.
-
-
- if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {
- return;
- } // We show the whole stack but dedupe on the top component's name because
- // the problematic code almost always lies inside that component.
-
-
- var componentName = getComponentName(fiber.type) || 'ReactComponent';
-
- if (didWarnStateUpdateForUnmountedComponent !== null) {
- if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
- return;
- }
-
- didWarnStateUpdateForUnmountedComponent.add(componentName);
- } else {
- didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
- }
-
- if (isFlushingPassiveEffects) ; else {
- var previousFiber = current;
-
- try {
- setCurrentFiber(fiber);
-
- error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function');
- } finally {
- if (previousFiber) {
- setCurrentFiber(fiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
-}
-
-var beginWork$1;
-
-{
- var dummyFiber = null;
-
- beginWork$1 = function (current, unitOfWork, lanes) {
- // If a component throws an error, we replay it again in a synchronously
- // dispatched event, so that the debugger will treat it as an uncaught
- // error See ReactErrorUtils for more information.
- // Before entering the begin phase, copy the work-in-progress onto a dummy
- // fiber. If beginWork throws, we'll use this to reset the state.
- var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
-
- try {
- return beginWork(current, unitOfWork, lanes);
- } catch (originalError) {
- if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
- // Don't replay promises. Treat everything else like an error.
- throw originalError;
- } // Keep this code in sync with handleError; any changes here must have
- // corresponding changes there.
-
-
- resetContextDependencies();
- resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
- // same fiber again.
- // Unwind the failed stack frame
-
- unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.
-
- assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);
-
- if ( unitOfWork.mode & ProfileMode) {
- // Reset the profiler timer.
- startProfilerTimer(unitOfWork);
- } // Run beginWork again.
-
-
- invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);
-
- if (hasCaughtError()) {
- var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
- // Rethrow this error instead of the original one.
-
- throw replayError;
- } else {
- // This branch is reachable if the render phase is impure.
- throw originalError;
- }
- }
- };
-}
-
-var didWarnAboutUpdateInRender = false;
-var didWarnAboutUpdateInRenderForAnotherComponent;
-
-{
- didWarnAboutUpdateInRenderForAnotherComponent = new Set();
-}
-
-function warnAboutRenderPhaseUpdatesInDEV(fiber) {
- {
- if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
- switch (fiber.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- {
- var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.
-
- var dedupeKey = renderingComponentName;
-
- if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
- didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
- var setStateComponentName = getComponentName(fiber.type) || 'Unknown';
-
- error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
- }
-
- break;
- }
-
- case ClassComponent:
- {
- if (!didWarnAboutUpdateInRender) {
- error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');
-
- didWarnAboutUpdateInRender = true;
- }
-
- break;
- }
- }
- }
- }
-} // a 'shared' variable that changes when act() opens/closes in tests.
-
-
-var IsThisRendererActing = {
- current: false
-};
-function warnIfNotScopedWithMatchingAct(fiber) {
- {
- if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
- var previousFiber = current;
-
- try {
- setCurrentFiber(fiber);
-
- error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
- 'import {act} fr' + "om 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
- 'import TestRenderer fr' + "om react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);');
- } finally {
- if (previousFiber) {
- setCurrentFiber(fiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
-}
-function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
- {
- if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
- }
- }
-}
-
-function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
- {
- if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- var previousFiber = current;
-
- try {
- setCurrentFiber(fiber);
-
- error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
- } finally {
- if (previousFiber) {
- setCurrentFiber(fiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
-}
-
-var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.
-
-var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked
-// scheduler is the actual recommendation. The alternative could be a testing build,
-// a new lib, or whatever; we dunno just yet. This message is for early adopters
-// to get their tests right.
-
-function warnIfUnmockedScheduler(fiber) {
- {
- if (didWarnAboutUnmockedScheduler === false && Scheduler.unstable_flushAllWithoutAsserting === undefined) {
- if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
- didWarnAboutUnmockedScheduler = true;
-
- error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + // Break up requires to avoid accidentally parsing them as dependencies.
- "jest.mock('scheduler', () => require" + "('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://reactjs.org/link/mock-scheduler');
- }
- }
- }
-}
-
-function computeThreadID(root, lane) {
- // Interaction threads are unique per root and expiration time.
- // NOTE: Intentionally unsound cast. All that matters is that it's a number
- // and it represents a batch of work. Could make a helper function instead,
- // but meh this is fine for now.
- return lane * 1000 + root.interactionThreadID;
-}
-
-function markSpawnedWork(lane) {
-
- if (spawnedWorkDuringRender === null) {
- spawnedWorkDuringRender = [lane];
- } else {
- spawnedWorkDuringRender.push(lane);
- }
-}
-
-function scheduleInteractions(root, lane, interactions) {
-
- if (interactions.size > 0) {
- var pendingInteractionMap = root.pendingInteractionMap;
- var pendingInteractions = pendingInteractionMap.get(lane);
-
- if (pendingInteractions != null) {
- interactions.forEach(function (interaction) {
- if (!pendingInteractions.has(interaction)) {
- // Update the pending async work count for previously unscheduled interaction.
- interaction.__count++;
- }
-
- pendingInteractions.add(interaction);
- });
- } else {
- pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.
-
- interactions.forEach(function (interaction) {
- interaction.__count++;
- });
- }
-
- var subscriber = tracing.__subscriberRef.current;
-
- if (subscriber !== null) {
- var threadID = computeThreadID(root, lane);
- subscriber.onWorkScheduled(interactions, threadID);
- }
- }
-}
-
-function schedulePendingInteractions(root, lane) {
-
- scheduleInteractions(root, lane, tracing.__interactionsRef.current);
-}
-
-function startWorkOnPendingInteractions(root, lanes) {
- // we can accurately attribute time spent working on it, And so that cascading
- // work triggered during the render phase will be associated with it.
-
-
- var interactions = new Set();
- root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {
- if (includesSomeLane(lanes, scheduledLane)) {
- scheduledInteractions.forEach(function (interaction) {
- return interactions.add(interaction);
- });
- }
- }); // Store the current set of interactions on the FiberRoot for a few reasons:
- // We can re-use it in hot functions like performConcurrentWorkOnRoot()
- // without having to recalculate it. We will also use it in commitWork() to
- // pass to any Profiler onRender() hooks. This also provides DevTools with a
- // way to access it when the onCommitRoot() hook is called.
-
- root.memoizedInteractions = interactions;
-
- if (interactions.size > 0) {
- var subscriber = tracing.__subscriberRef.current;
-
- if (subscriber !== null) {
- var threadID = computeThreadID(root, lanes);
-
- try {
- subscriber.onWorkStarted(interactions, threadID);
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority$1, function () {
- throw error;
- });
- }
- }
- }
-}
-
-function finishPendingInteractions(root, committedLanes) {
-
- var remainingLanesAfterCommit = root.pendingLanes;
- var subscriber;
-
- try {
- subscriber = tracing.__subscriberRef.current;
-
- if (subscriber !== null && root.memoizedInteractions.size > 0) {
- // FIXME: More than one lane can finish in a single commit.
- var threadID = computeThreadID(root, committedLanes);
- subscriber.onWorkStopped(root.memoizedInteractions, threadID);
- }
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority$1, function () {
- throw error;
- });
- } finally {
- // Clear completed interactions from the pending Map.
- // Unless the render was suspended or cascading work was scheduled,
- // In which case– leave pending interactions until the subsequent render.
- var pendingInteractionMap = root.pendingInteractionMap;
- pendingInteractionMap.forEach(function (scheduledInteractions, lane) {
- // Only decrement the pending interaction count if we're done.
- // If there's still work at the current priority,
- // That indicates that we are waiting for suspense data.
- if (!includesSomeLane(remainingLanesAfterCommit, lane)) {
- pendingInteractionMap.delete(lane);
- scheduledInteractions.forEach(function (interaction) {
- interaction.__count--;
-
- if (subscriber !== null && interaction.__count === 0) {
- try {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority$1, function () {
- throw error;
- });
- }
- }
- });
- }
- });
- }
-} // `act` testing API
-
-function shouldForceFlushFallbacksInDEV() {
- // Never force flush in production. This function should get stripped out.
- return actingUpdatesScopeDepth > 0;
-}
-// so we can tell if any async act() calls try to run in parallel.
-
-
-var actingUpdatesScopeDepth = 0;
-
-function detachFiberAfterEffects(fiber) {
- fiber.sibling = null;
- fiber.stateNode = null;
-}
-
-var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
-
-var failedBoundaries = null;
-var setRefreshHandler = function (handler) {
- {
- resolveFamily = handler;
- }
-};
-function resolveFunctionForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
-
- var family = resolveFamily(type);
-
- if (family === undefined) {
- return type;
- } // Use the latest known implementation.
-
-
- return family.current;
- }
-}
-function resolveClassForHotReloading(type) {
- // No implementation differences.
- return resolveFunctionForHotReloading(type);
-}
-function resolveForwardRefForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
-
- var family = resolveFamily(type);
-
- if (family === undefined) {
- // Check if we're dealing with a real forwardRef. Don't want to crash early.
- if (type !== null && type !== undefined && typeof type.render === 'function') {
- // ForwardRef is special because its resolved .type is an object,
- // but it's possible that we only have its inner render function in the map.
- // If that inner render function is different, we'll build a new forwardRef type.
- var currentRender = resolveFunctionForHotReloading(type.render);
-
- if (type.render !== currentRender) {
- var syntheticType = {
- $$typeof: REACT_FORWARD_REF_TYPE,
- render: currentRender
- };
-
- if (type.displayName !== undefined) {
- syntheticType.displayName = type.displayName;
- }
-
- return syntheticType;
- }
- }
-
- return type;
- } // Use the latest known implementation.
-
-
- return family.current;
- }
-}
-function isCompatibleFamilyForHotReloading(fiber, element) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return false;
- }
-
- var prevType = fiber.elementType;
- var nextType = element.type; // If we got here, we know types aren't === equal.
-
- var needsCompareFamilies = false;
- var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
-
- switch (fiber.tag) {
- case ClassComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case FunctionComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- // We don't know the inner type yet.
- // We're going to assume that the lazy inner type is stable,
- // and so it is sufficient to avoid reconciling it away.
- // We're not going to unwrap or actually use the new lazy type.
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case ForwardRef:
- {
- if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case MemoComponent:
- case SimpleMemoComponent:
- {
- if ($$typeofNextType === REACT_MEMO_TYPE) {
- // TODO: if it was but can no longer be simple,
- // we shouldn't set this.
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- default:
- return false;
- } // Check if both types have a family and it's the same one.
-
-
- if (needsCompareFamilies) {
- // Note: memo() and forwardRef() we'll compare outer rather than inner type.
- // This means both of them need to be registered to preserve state.
- // If we unwrapped and compared the inner types for wrappers instead,
- // then we would risk falsely saying two separate memo(Foo)
- // calls are equivalent because they wrap the same Foo function.
- var prevFamily = resolveFamily(prevType);
-
- if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
- return true;
- }
- }
-
- return false;
- }
-}
-function markFailedErrorBoundaryForHotReloading(fiber) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
-
- if (typeof WeakSet !== 'function') {
- return;
- }
-
- if (failedBoundaries === null) {
- failedBoundaries = new WeakSet();
- }
-
- failedBoundaries.add(fiber);
- }
-}
-var scheduleRefresh = function (root, update) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
-
- var staleFamilies = update.staleFamilies,
- updatedFamilies = update.updatedFamilies;
- flushPassiveEffects();
- flushSync(function () {
- scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
- });
- }
-};
-var scheduleRoot = function (root, element) {
- {
- if (root.context !== emptyContextObject) {
- // Super edge case: root has a legacy _renderSubtree context
- // but we don't know the parentComponent so we can't pass it.
- // Just ignore. We'll delete this with _renderSubtree code path later.
- return;
- }
-
- flushPassiveEffects();
- flushSync(function () {
- updateContainer(element, root, null, null);
- });
- }
-};
-
-function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
- {
- var alternate = fiber.alternate,
- child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
-
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
-
- case ForwardRef:
- candidateType = type.render;
- break;
- }
-
- if (resolveFamily === null) {
- throw new Error('Expected resolveFamily to be set during hot reload.');
- }
-
- var needsRender = false;
- var needsRemount = false;
-
- if (candidateType !== null) {
- var family = resolveFamily(candidateType);
-
- if (family !== undefined) {
- if (staleFamilies.has(family)) {
- needsRemount = true;
- } else if (updatedFamilies.has(family)) {
- if (tag === ClassComponent) {
- needsRemount = true;
- } else {
- needsRender = true;
- }
- }
- }
- }
-
- if (failedBoundaries !== null) {
- if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
- needsRemount = true;
- }
- }
-
- if (needsRemount) {
- fiber._debugNeedsRemount = true;
- }
-
- if (needsRemount || needsRender) {
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- }
-
- if (child !== null && !needsRemount) {
- scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
- }
-
- if (sibling !== null) {
- scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
- }
- }
-}
-
-var findHostInstancesForRefresh = function (root, families) {
- {
- var hostInstances = new Set();
- var types = new Set(families.map(function (family) {
- return family.current;
- }));
- findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
- return hostInstances;
- }
-};
-
-function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
- {
- var child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
-
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
-
- case ForwardRef:
- candidateType = type.render;
- break;
- }
-
- var didMatch = false;
-
- if (candidateType !== null) {
- if (types.has(candidateType)) {
- didMatch = true;
- }
- }
-
- if (didMatch) {
- // We have a match. This only drills down to the closest host components.
- // There's no need to search deeper because for the purpose of giving
- // visual feedback, "flashing" outermost parent rectangles is sufficient.
- findHostInstancesForFiberShallowly(fiber, hostInstances);
- } else {
- // If there's no match, maybe there will be one further down in the child tree.
- if (child !== null) {
- findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
- }
- }
-
- if (sibling !== null) {
- findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
- }
- }
-}
-
-function findHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
-
- if (foundHostInstances) {
- return;
- } // If we didn't find any host children, fallback to closest host parent.
-
-
- var node = fiber;
-
- while (true) {
- switch (node.tag) {
- case HostComponent:
- hostInstances.add(node.stateNode);
- return;
-
- case HostPortal:
- hostInstances.add(node.stateNode.containerInfo);
- return;
-
- case HostRoot:
- hostInstances.add(node.stateNode.containerInfo);
- return;
- }
-
- if (node.return === null) {
- throw new Error('Expected to reach root first.');
- }
-
- node = node.return;
- }
- }
-}
-
-function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var node = fiber;
- var foundHostInstances = false;
-
- while (true) {
- if (node.tag === HostComponent) {
- // We got a match.
- foundHostInstances = true;
- hostInstances.add(node.stateNode); // There may still be more, so keep searching.
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === fiber) {
- return foundHostInstances;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === fiber) {
- return foundHostInstances;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-
- return false;
-}
-
-var hasBadMapPolyfill;
-
-{
- hasBadMapPolyfill = false;
-
- try {
- var nonExtensibleObject = Object.preventExtensions({});
- /* eslint-disable no-new */
-
- new Map([[nonExtensibleObject, null]]);
- new Set([nonExtensibleObject]);
- /* eslint-enable no-new */
- } catch (e) {
- // TODO: Consider warning about bad polyfills
- hasBadMapPolyfill = true;
- }
-}
-
-var debugCounter = 1;
-
-function FiberNode(tag, pendingProps, key, mode) {
- // Instance
- this.tag = tag;
- this.key = key;
- this.elementType = null;
- this.type = null;
- this.stateNode = null; // Fiber
-
- this.return = null;
- this.child = null;
- this.sibling = null;
- this.index = 0;
- this.ref = null;
- this.pendingProps = pendingProps;
- this.memoizedProps = null;
- this.updateQueue = null;
- this.memoizedState = null;
- this.dependencies = null;
- this.mode = mode; // Effects
-
- this.flags = NoFlags;
- this.nextEffect = null;
- this.firstEffect = null;
- this.lastEffect = null;
- this.lanes = NoLanes;
- this.childLanes = NoLanes;
- this.alternate = null;
-
- {
- // Note: The following is done to avoid a v8 performance cliff.
- //
- // Initializing the fields below to smis and later updating them with
- // double values will cause Fibers to end up having separate shapes.
- // This behavior/bug has something to do with Object.preventExtension().
- // Fortunately this only impacts DEV builds.
- // Unfortunately it makes React unusably slow for some applications.
- // To work around this, initialize the fields below with doubles.
- //
- // Learn more about this here:
- // https://github.com/facebook/react/issues/14365
- // https://bugs.chromium.org/p/v8/issues/detail?id=8538
- this.actualDuration = Number.NaN;
- this.actualStartTime = Number.NaN;
- this.selfBaseDuration = Number.NaN;
- this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.
- // This won't trigger the performance cliff mentioned above,
- // and it simplifies other profiler code (including DevTools).
-
- this.actualDuration = 0;
- this.actualStartTime = -1;
- this.selfBaseDuration = 0;
- this.treeBaseDuration = 0;
- }
-
- {
- // This isn't directly used but is handy for debugging internals:
- this._debugID = debugCounter++;
- this._debugSource = null;
- this._debugOwner = null;
- this._debugNeedsRemount = false;
- this._debugHookTypes = null;
-
- if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
- Object.preventExtensions(this);
- }
- }
-} // This is a constructor function, rather than a POJO constructor, still
-// please ensure we do the following:
-// 1) Nobody should add any instance methods on this. Instance methods can be
-// more difficult to predict when they get optimized and they are almost
-// never inlined properly in static compilers.
-// 2) Nobody should rely on `instanceof Fiber` for type testing. We should
-// always know when it is a fiber.
-// 3) We might want to experiment with using numeric keys since they are easier
-// to optimize in a non-JIT environment.
-// 4) We can easily go from a constructor to a createFiber object literal if that
-// is faster.
-// 5) It should be easy to port this to a C struct and keep a C implementation
-// compatible.
-
-
-var createFiber = function (tag, pendingProps, key, mode) {
- // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
- return new FiberNode(tag, pendingProps, key, mode);
-};
-
-function shouldConstruct$1(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
-}
-
-function isSimpleFunctionComponent(type) {
- return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;
-}
-function resolveLazyComponentTag(Component) {
- if (typeof Component === 'function') {
- return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;
- } else if (Component !== undefined && Component !== null) {
- var $$typeof = Component.$$typeof;
-
- if ($$typeof === REACT_FORWARD_REF_TYPE) {
- return ForwardRef;
- }
-
- if ($$typeof === REACT_MEMO_TYPE) {
- return MemoComponent;
- }
- }
-
- return IndeterminateComponent;
-} // This is used to create an alternate fiber to do work on.
-
-function createWorkInProgress(current, pendingProps) {
- var workInProgress = current.alternate;
-
- if (workInProgress === null) {
- // We use a double buffering pooling technique because we know that we'll
- // only ever need at most two versions of a tree. We pool the "other" unused
- // node that we're free to reuse. This is lazily created to avoid allocating
- // extra objects for things that are never updated. It also allow us to
- // reclaim the extra memory if needed.
- workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
- workInProgress.elementType = current.elementType;
- workInProgress.type = current.type;
- workInProgress.stateNode = current.stateNode;
-
- {
- // DEV-only fields
- workInProgress._debugID = current._debugID;
- workInProgress._debugSource = current._debugSource;
- workInProgress._debugOwner = current._debugOwner;
- workInProgress._debugHookTypes = current._debugHookTypes;
- }
-
- workInProgress.alternate = current;
- current.alternate = workInProgress;
- } else {
- workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.
-
- workInProgress.type = current.type; // We already have an alternate.
- // Reset the effect tag.
-
- workInProgress.flags = NoFlags; // The effect list is no longer valid.
-
- workInProgress.nextEffect = null;
- workInProgress.firstEffect = null;
- workInProgress.lastEffect = null;
-
- {
- // We intentionally reset, rather than copy, actualDuration & actualStartTime.
- // This prevents time from endlessly accumulating in new commits.
- // This has the downside of resetting values for different priority renders,
- // But works for yielding (the common case) and should support resuming.
- workInProgress.actualDuration = 0;
- workInProgress.actualStartTime = -1;
- }
- }
-
- workInProgress.childLanes = current.childLanes;
- workInProgress.lanes = current.lanes;
- workInProgress.child = current.child;
- workInProgress.memoizedProps = current.memoizedProps;
- workInProgress.memoizedState = current.memoizedState;
- workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
- // it cannot be shared with the current fiber.
-
- var currentDependencies = current.dependencies;
- workInProgress.dependencies = currentDependencies === null ? null : {
- lanes: currentDependencies.lanes,
- firstContext: currentDependencies.firstContext
- }; // These will be overridden during the parent's reconciliation
-
- workInProgress.sibling = current.sibling;
- workInProgress.index = current.index;
- workInProgress.ref = current.ref;
-
- {
- workInProgress.selfBaseDuration = current.selfBaseDuration;
- workInProgress.treeBaseDuration = current.treeBaseDuration;
- }
-
- {
- workInProgress._debugNeedsRemount = current._debugNeedsRemount;
-
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- case FunctionComponent:
- case SimpleMemoComponent:
- workInProgress.type = resolveFunctionForHotReloading(current.type);
- break;
-
- case ClassComponent:
- workInProgress.type = resolveClassForHotReloading(current.type);
- break;
-
- case ForwardRef:
- workInProgress.type = resolveForwardRefForHotReloading(current.type);
- break;
- }
- }
-
- return workInProgress;
-} // Used to reuse a Fiber for a second pass.
-
-function resetWorkInProgress(workInProgress, renderLanes) {
- // This resets the Fiber to what createFiber or createWorkInProgress would
- // have set the values to before during the first pass. Ideally this wouldn't
- // be necessary but unfortunately many code paths reads from the workInProgress
- // when they should be reading from current and writing to workInProgress.
- // We assume pendingProps, index, key, ref, return are still untouched to
- // avoid doing another reconciliation.
- // Reset the effect tag but keep any Placement tags, since that's something
- // that child fiber is setting, not the reconciliation.
- workInProgress.flags &= Placement; // The effect list is no longer valid.
-
- workInProgress.nextEffect = null;
- workInProgress.firstEffect = null;
- workInProgress.lastEffect = null;
- var current = workInProgress.alternate;
-
- if (current === null) {
- // Reset to createFiber's initial values.
- workInProgress.childLanes = NoLanes;
- workInProgress.lanes = renderLanes;
- workInProgress.child = null;
- workInProgress.memoizedProps = null;
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null;
- workInProgress.dependencies = null;
- workInProgress.stateNode = null;
-
- {
- // Note: We don't reset the actualTime counts. It's useful to accumulate
- // actual time across multiple render passes.
- workInProgress.selfBaseDuration = 0;
- workInProgress.treeBaseDuration = 0;
- }
- } else {
- // Reset to the cloned values that createWorkInProgress would've.
- workInProgress.childLanes = current.childLanes;
- workInProgress.lanes = current.lanes;
- workInProgress.child = current.child;
- workInProgress.memoizedProps = current.memoizedProps;
- workInProgress.memoizedState = current.memoizedState;
- workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.
-
- workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so
- // it cannot be shared with the current fiber.
-
- var currentDependencies = current.dependencies;
- workInProgress.dependencies = currentDependencies === null ? null : {
- lanes: currentDependencies.lanes,
- firstContext: currentDependencies.firstContext
- };
-
- {
- // Note: We don't reset the actualTime counts. It's useful to accumulate
- // actual time across multiple render passes.
- workInProgress.selfBaseDuration = current.selfBaseDuration;
- workInProgress.treeBaseDuration = current.treeBaseDuration;
- }
- }
-
- return workInProgress;
-}
-function createHostRootFiber(tag) {
- var mode;
-
- if (tag === ConcurrentRoot) {
- mode = ConcurrentMode | BlockingMode | StrictMode;
- } else if (tag === BlockingRoot) {
- mode = BlockingMode | StrictMode;
- } else {
- mode = NoMode;
- }
-
- if ( isDevToolsPresent) {
- // Always collect profile timings when DevTools are present.
- // This enables DevTools to start capturing timing at any point–
- // Without some nodes in the tree having empty base times.
- mode |= ProfileMode;
- }
-
- return createFiber(HostRoot, null, null, mode);
-}
-function createFiberFromTypeAndProps(type, // React$ElementType
-key, pendingProps, owner, mode, lanes) {
- var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
-
- var resolvedType = type;
-
- if (typeof type === 'function') {
- if (shouldConstruct$1(type)) {
- fiberTag = ClassComponent;
-
- {
- resolvedType = resolveClassForHotReloading(resolvedType);
- }
- } else {
- {
- resolvedType = resolveFunctionForHotReloading(resolvedType);
- }
- }
- } else if (typeof type === 'string') {
- fiberTag = HostComponent;
- } else {
- getTag: switch (type) {
- case REACT_FRAGMENT_TYPE:
- return createFiberFromFragment(pendingProps.children, mode, lanes, key);
-
- case REACT_DEBUG_TRACING_MODE_TYPE:
- fiberTag = Mode;
- mode |= DebugTracingMode;
- break;
-
- case REACT_STRICT_MODE_TYPE:
- fiberTag = Mode;
- mode |= StrictMode;
- break;
-
- case REACT_PROFILER_TYPE:
- return createFiberFromProfiler(pendingProps, mode, lanes, key);
-
- case REACT_SUSPENSE_TYPE:
- return createFiberFromSuspense(pendingProps, mode, lanes, key);
-
- case REACT_SUSPENSE_LIST_TYPE:
- return createFiberFromSuspenseList(pendingProps, mode, lanes, key);
-
- case REACT_OFFSCREEN_TYPE:
- return createFiberFromOffscreen(pendingProps, mode, lanes, key);
-
- case REACT_LEGACY_HIDDEN_TYPE:
- return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);
-
- case REACT_SCOPE_TYPE:
-
- // eslint-disable-next-line no-fallthrough
-
- default:
- {
- if (typeof type === 'object' && type !== null) {
- switch (type.$$typeof) {
- case REACT_PROVIDER_TYPE:
- fiberTag = ContextProvider;
- break getTag;
-
- case REACT_CONTEXT_TYPE:
- // This is a consumer
- fiberTag = ContextConsumer;
- break getTag;
-
- case REACT_FORWARD_REF_TYPE:
- fiberTag = ForwardRef;
-
- {
- resolvedType = resolveForwardRefForHotReloading(resolvedType);
- }
-
- break getTag;
-
- case REACT_MEMO_TYPE:
- fiberTag = MemoComponent;
- break getTag;
-
- case REACT_LAZY_TYPE:
- fiberTag = LazyComponent;
- resolvedType = null;
- break getTag;
-
- case REACT_BLOCK_TYPE:
- fiberTag = Block;
- break getTag;
- }
- }
-
- var info = '';
-
- {
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
- }
-
- var ownerName = owner ? getComponentName(owner.type) : null;
-
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
- }
-
- {
- {
- throw 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 );
- }
- }
- }
- }
- }
-
- var fiber = createFiber(fiberTag, pendingProps, key, mode);
- fiber.elementType = type;
- fiber.type = resolvedType;
- fiber.lanes = lanes;
-
- {
- fiber._debugOwner = owner;
- }
-
- return fiber;
-}
-function createFiberFromElement(element, mode, lanes) {
- var owner = null;
-
- {
- owner = element._owner;
- }
-
- var type = element.type;
- var key = element.key;
- var pendingProps = element.props;
- var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);
-
- {
- fiber._debugSource = element._source;
- fiber._debugOwner = element._owner;
- }
-
- return fiber;
-}
-function createFiberFromFragment(elements, mode, lanes, key) {
- var fiber = createFiber(Fragment, elements, key, mode);
- fiber.lanes = lanes;
- return fiber;
-}
-
-function createFiberFromProfiler(pendingProps, mode, lanes, key) {
- {
- if (typeof pendingProps.id !== 'string') {
- error('Profiler must specify an "id" as a prop');
- }
- }
-
- var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.
-
- fiber.elementType = REACT_PROFILER_TYPE;
- fiber.type = REACT_PROFILER_TYPE;
- fiber.lanes = lanes;
-
- {
- fiber.stateNode = {
- effectDuration: 0,
- passiveEffectDuration: 0
- };
- }
-
- return fiber;
-}
-
-function createFiberFromSuspense(pendingProps, mode, lanes, key) {
- var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
-
- fiber.type = REACT_SUSPENSE_TYPE;
- fiber.elementType = REACT_SUSPENSE_TYPE;
- fiber.lanes = lanes;
- return fiber;
-}
-function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
- var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
-
- {
- // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
- fiber.type = REACT_SUSPENSE_LIST_TYPE;
- }
-
- fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
- fiber.lanes = lanes;
- return fiber;
-}
-function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
- var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
-
- {
- fiber.type = REACT_OFFSCREEN_TYPE;
- }
-
- fiber.elementType = REACT_OFFSCREEN_TYPE;
- fiber.lanes = lanes;
- return fiber;
-}
-function createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {
- var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
-
- {
- fiber.type = REACT_LEGACY_HIDDEN_TYPE;
- }
-
- fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
- fiber.lanes = lanes;
- return fiber;
-}
-function createFiberFromText(content, mode, lanes) {
- var fiber = createFiber(HostText, content, null, mode);
- fiber.lanes = lanes;
- return fiber;
-}
-function createFiberFromHostInstanceForDeletion() {
- var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.
-
- fiber.elementType = 'DELETED';
- fiber.type = 'DELETED';
- return fiber;
-}
-function createFiberFromPortal(portal, mode, lanes) {
- var pendingProps = portal.children !== null ? portal.children : [];
- var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
- fiber.lanes = lanes;
- fiber.stateNode = {
- containerInfo: portal.containerInfo,
- pendingChildren: null,
- // Used by persistent updates
- implementation: portal.implementation
- };
- return fiber;
-} // Used for stashing WIP properties to replay failed work in DEV.
-
-function assignFiberPropertiesInDEV(target, source) {
- if (target === null) {
- // This Fiber's initial properties will always be overwritten.
- // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
- target = createFiber(IndeterminateComponent, null, null, NoMode);
- } // This is intentionally written as a list of all properties.
- // We tried to use Object.assign() instead but this is called in
- // the hottest path, and Object.assign() was too slow:
- // https://github.com/facebook/react/issues/12502
- // This code is DEV-only so size is not a concern.
-
-
- target.tag = source.tag;
- target.key = source.key;
- target.elementType = source.elementType;
- target.type = source.type;
- target.stateNode = source.stateNode;
- target.return = source.return;
- target.child = source.child;
- target.sibling = source.sibling;
- target.index = source.index;
- target.ref = source.ref;
- target.pendingProps = source.pendingProps;
- target.memoizedProps = source.memoizedProps;
- target.updateQueue = source.updateQueue;
- target.memoizedState = source.memoizedState;
- target.dependencies = source.dependencies;
- target.mode = source.mode;
- target.flags = source.flags;
- target.nextEffect = source.nextEffect;
- target.firstEffect = source.firstEffect;
- target.lastEffect = source.lastEffect;
- target.lanes = source.lanes;
- target.childLanes = source.childLanes;
- target.alternate = source.alternate;
-
- {
- target.actualDuration = source.actualDuration;
- target.actualStartTime = source.actualStartTime;
- target.selfBaseDuration = source.selfBaseDuration;
- target.treeBaseDuration = source.treeBaseDuration;
- }
-
- target._debugID = source._debugID;
- target._debugSource = source._debugSource;
- target._debugOwner = source._debugOwner;
- target._debugNeedsRemount = source._debugNeedsRemount;
- target._debugHookTypes = source._debugHookTypes;
- return target;
-}
-
-function FiberRootNode(containerInfo, tag, hydrate) {
- this.tag = tag;
- this.containerInfo = containerInfo;
- this.pendingChildren = null;
- this.current = null;
- this.pingCache = null;
- this.finishedWork = null;
- this.timeoutHandle = noTimeout;
- this.context = null;
- this.pendingContext = null;
- this.hydrate = hydrate;
- this.callbackNode = null;
- this.callbackPriority = NoLanePriority;
- this.eventTimes = createLaneMap(NoLanes);
- this.expirationTimes = createLaneMap(NoTimestamp);
- this.pendingLanes = NoLanes;
- this.suspendedLanes = NoLanes;
- this.pingedLanes = NoLanes;
- this.expiredLanes = NoLanes;
- this.mutableReadLanes = NoLanes;
- this.finishedLanes = NoLanes;
- this.entangledLanes = NoLanes;
- this.entanglements = createLaneMap(NoLanes);
-
- {
- this.mutableSourceEagerHydrationData = null;
- }
-
- {
- this.interactionThreadID = tracing.unstable_getThreadID();
- this.memoizedInteractions = new Set();
- this.pendingInteractionMap = new Map();
- }
-
- {
- switch (tag) {
- case BlockingRoot:
- this._debugRootType = 'createBlockingRoot()';
- break;
-
- case ConcurrentRoot:
- this._debugRootType = 'createRoot()';
- break;
-
- case LegacyRoot:
- this._debugRootType = 'createLegacyRoot()';
- break;
- }
- }
-}
-
-function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
- var root = new FiberRootNode(containerInfo, tag, hydrate);
- // stateNode is any.
-
-
- var uninitializedFiber = createHostRootFiber(tag);
- root.current = uninitializedFiber;
- uninitializedFiber.stateNode = root;
- initializeUpdateQueue(uninitializedFiber);
- return root;
-}
-
-// This ensures that the version used for server rendering matches the one
-// that is eventually read during hydration.
-// If they don't match there's a potential tear and a full deopt render is required.
-
-function registerMutableSourceForHydration(root, mutableSource) {
- var getVersion = mutableSource._getVersion;
- var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
- // Retaining it forever may interfere with GC.
-
- if (root.mutableSourceEagerHydrationData == null) {
- root.mutableSourceEagerHydrationData = [mutableSource, version];
- } else {
- root.mutableSourceEagerHydrationData.push(mutableSource, version);
- }
-}
-
-function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
-implementation) {
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
- return {
- // This tag allow us to uniquely identify this as a React Portal
- $$typeof: REACT_PORTAL_TYPE,
- key: key == null ? null : '' + key,
- children: children,
- containerInfo: containerInfo,
- implementation: implementation
- };
-}
-
-var didWarnAboutNestedUpdates;
-var didWarnAboutFindNodeInStrictMode;
-
-{
- didWarnAboutNestedUpdates = false;
- didWarnAboutFindNodeInStrictMode = {};
-}
-
-function getContextForSubtree(parentComponent) {
- if (!parentComponent) {
- return emptyContextObject;
- }
-
- var fiber = get(parentComponent);
- var parentContext = findCurrentUnmaskedContext(fiber);
-
- if (fiber.tag === ClassComponent) {
- var Component = fiber.type;
-
- if (isContextProvider(Component)) {
- return processChildContext(fiber, Component, parentContext);
- }
- }
-
- return parentContext;
-}
-
-function findHostInstanceWithWarning(component, methodName) {
- {
- var fiber = get(component);
-
- if (fiber === undefined) {
- if (typeof component.render === 'function') {
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- } else {
- {
- {
- throw Error( "Argument appears to not be a ReactComponent. Keys: " + Object.keys(component) );
- }
- }
- }
- }
-
- var hostFiber = findCurrentHostFiber(fiber);
-
- if (hostFiber === null) {
- return null;
- }
-
- if (hostFiber.mode & StrictMode) {
- var componentName = getComponentName(fiber.type) || 'Component';
-
- if (!didWarnAboutFindNodeInStrictMode[componentName]) {
- didWarnAboutFindNodeInStrictMode[componentName] = true;
- var previousFiber = current;
-
- try {
- setCurrentFiber(hostFiber);
-
- if (fiber.mode & StrictMode) {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
- } else {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
- }
- } finally {
- // Ideally this should reset to previous but this shouldn't be called in
- // render and there's another warning for that anyway.
- if (previousFiber) {
- setCurrentFiber(previousFiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
-
- return hostFiber.stateNode;
- }
-}
-
-function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {
- return createFiberRoot(containerInfo, tag, hydrate);
-}
-function updateContainer(element, container, parentComponent, callback) {
- {
- onScheduleRoot(container, element);
- }
-
- var current$1 = container.current;
- var eventTime = requestEventTime();
-
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfUnmockedScheduler(current$1);
- warnIfNotScopedWithMatchingAct(current$1);
- }
- }
-
- var lane = requestUpdateLane(current$1);
-
- var context = getContextForSubtree(parentComponent);
-
- if (container.context === null) {
- container.context = context;
- } else {
- container.pendingContext = context;
- }
-
- {
- if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
- didWarnAboutNestedUpdates = true;
-
- error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
- }
- }
-
- var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property
- // being called "element".
-
- update.payload = {
- element: element
- };
- callback = callback === undefined ? null : callback;
-
- if (callback !== null) {
- {
- if (typeof callback !== 'function') {
- error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
- }
- }
-
- update.callback = callback;
- }
-
- enqueueUpdate(current$1, update);
- scheduleUpdateOnFiber(current$1, lane, eventTime);
- return lane;
-}
-function getPublicRootInstance(container) {
- var containerFiber = container.current;
-
- if (!containerFiber.child) {
- return null;
- }
-
- switch (containerFiber.child.tag) {
- case HostComponent:
- return getPublicInstance(containerFiber.child.stateNode);
-
- default:
- return containerFiber.child.stateNode;
- }
-}
-
-function markRetryLaneImpl(fiber, retryLane) {
- var suspenseState = fiber.memoizedState;
-
- if (suspenseState !== null && suspenseState.dehydrated !== null) {
- suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
- }
-} // Increases the priority of thennables when they resolve within this boundary.
-
-
-function markRetryLaneIfNotHydrated(fiber, retryLane) {
- markRetryLaneImpl(fiber, retryLane);
- var alternate = fiber.alternate;
-
- if (alternate) {
- markRetryLaneImpl(alternate, retryLane);
- }
-}
-
-function attemptUserBlockingHydration$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority and they should not suspend on I/O,
- // since you have to wrap anything that might suspend in
- // Suspense.
- return;
- }
-
- var eventTime = requestEventTime();
- var lane = InputDiscreteHydrationLane;
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- markRetryLaneIfNotHydrated(fiber, lane);
-}
-function attemptContinuousHydration$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority and they should not suspend on I/O,
- // since you have to wrap anything that might suspend in
- // Suspense.
- return;
- }
-
- var eventTime = requestEventTime();
- var lane = SelectiveHydrationLane;
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- markRetryLaneIfNotHydrated(fiber, lane);
-}
-function attemptHydrationAtCurrentPriority$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority other than synchronously flush it.
- return;
- }
-
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- markRetryLaneIfNotHydrated(fiber, lane);
-}
-function runWithPriority$2(priority, fn) {
-
- try {
- setCurrentUpdateLanePriority(priority);
- return fn();
- } finally {
- }
-}
-function findHostInstanceWithNoPortals(fiber) {
- var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
-
- if (hostFiber === null) {
- return null;
- }
-
- if (hostFiber.tag === FundamentalComponent) {
- return hostFiber.stateNode.instance;
- }
-
- return hostFiber.stateNode;
-}
-
-var shouldSuspendImpl = function (fiber) {
- return false;
-};
-
-function shouldSuspend(fiber) {
- return shouldSuspendImpl(fiber);
-}
-var overrideHookState = null;
-var overrideHookStateDeletePath = null;
-var overrideHookStateRenamePath = null;
-var overrideProps = null;
-var overridePropsDeletePath = null;
-var overridePropsRenamePath = null;
-var scheduleUpdate = null;
-var setSuspenseHandler = null;
-
-{
- var copyWithDeleteImpl = function (obj, path, index) {
- var key = path[index];
- var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
-
- if (index + 1 === path.length) {
- if (Array.isArray(updated)) {
- updated.splice(key, 1);
- } else {
- delete updated[key];
- }
-
- return updated;
- } // $FlowFixMe number or string is fine here
-
-
- updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
- return updated;
- };
-
- var copyWithDelete = function (obj, path) {
- return copyWithDeleteImpl(obj, path, 0);
- };
-
- var copyWithRenameImpl = function (obj, oldPath, newPath, index) {
- var oldKey = oldPath[index];
- var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
-
- if (index + 1 === oldPath.length) {
- var newKey = newPath[index]; // $FlowFixMe number or string is fine here
-
- updated[newKey] = updated[oldKey];
-
- if (Array.isArray(updated)) {
- updated.splice(oldKey, 1);
- } else {
- delete updated[oldKey];
- }
- } else {
- // $FlowFixMe number or string is fine here
- updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here
- obj[oldKey], oldPath, newPath, index + 1);
- }
-
- return updated;
- };
-
- var copyWithRename = function (obj, oldPath, newPath) {
- if (oldPath.length !== newPath.length) {
- warn('copyWithRename() expects paths of the same length');
-
- return;
- } else {
- for (var i = 0; i < newPath.length - 1; i++) {
- if (oldPath[i] !== newPath[i]) {
- warn('copyWithRename() expects paths to be the same except for the deepest key');
-
- return;
- }
- }
- }
-
- return copyWithRenameImpl(obj, oldPath, newPath, 0);
- };
-
- var copyWithSetImpl = function (obj, path, index, value) {
- if (index >= path.length) {
- return value;
- }
-
- var key = path[index];
- var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here
-
- updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
- return updated;
- };
-
- var copyWithSet = function (obj, path, value) {
- return copyWithSetImpl(obj, path, 0, value);
- };
-
- var findHook = function (fiber, id) {
- // For now, the "id" of stateful hooks is just the stateful hook index.
- // This may change in the future with e.g. nested hooks.
- var currentHook = fiber.memoizedState;
-
- while (currentHook !== null && id > 0) {
- currentHook = currentHook.next;
- id--;
- }
-
- return currentHook;
- }; // Support DevTools editable values for useState and useReducer.
-
-
- overrideHookState = function (fiber, id, path, value) {
- var hook = findHook(fiber, id);
-
- if (hook !== null) {
- var newState = copyWithSet(hook.memoizedState, path, value);
- hook.memoizedState = newState;
- hook.baseState = newState; // We aren't actually adding an update to the queue,
- // because there is no update we can add for useReducer hooks that won't trigger an error.
- // (There's no appropriate action type for DevTools overrides.)
- // As a result though, React will see the scheduled update as a noop and bailout.
- // Shallow cloning props works as a workaround for now to bypass the bailout check.
-
- fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- }
- };
-
- overrideHookStateDeletePath = function (fiber, id, path) {
- var hook = findHook(fiber, id);
-
- if (hook !== null) {
- var newState = copyWithDelete(hook.memoizedState, path);
- hook.memoizedState = newState;
- hook.baseState = newState; // We aren't actually adding an update to the queue,
- // because there is no update we can add for useReducer hooks that won't trigger an error.
- // (There's no appropriate action type for DevTools overrides.)
- // As a result though, React will see the scheduled update as a noop and bailout.
- // Shallow cloning props works as a workaround for now to bypass the bailout check.
-
- fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- }
- };
-
- overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
- var hook = findHook(fiber, id);
-
- if (hook !== null) {
- var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
- hook.memoizedState = newState;
- hook.baseState = newState; // We aren't actually adding an update to the queue,
- // because there is no update we can add for useReducer hooks that won't trigger an error.
- // (There's no appropriate action type for DevTools overrides.)
- // As a result though, React will see the scheduled update as a noop and bailout.
- // Shallow cloning props works as a workaround for now to bypass the bailout check.
-
- fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- }
- }; // Support DevTools props for function components, forwardRef, memo, host components, etc.
-
-
- overrideProps = function (fiber, path, value) {
- fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
-
- if (fiber.alternate) {
- fiber.alternate.pendingProps = fiber.pendingProps;
- }
-
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- };
-
- overridePropsDeletePath = function (fiber, path) {
- fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);
-
- if (fiber.alternate) {
- fiber.alternate.pendingProps = fiber.pendingProps;
- }
-
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- };
-
- overridePropsRenamePath = function (fiber, oldPath, newPath) {
- fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
-
- if (fiber.alternate) {
- fiber.alternate.pendingProps = fiber.pendingProps;
- }
-
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- };
-
- scheduleUpdate = function (fiber) {
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- };
-
- setSuspenseHandler = function (newShouldSuspendImpl) {
- shouldSuspendImpl = newShouldSuspendImpl;
- };
-}
-
-function findHostInstanceByFiber(fiber) {
- var hostFiber = findCurrentHostFiber(fiber);
-
- if (hostFiber === null) {
- return null;
- }
-
- return hostFiber.stateNode;
-}
-
-function emptyFindFiberByHostInstance(instance) {
- return null;
-}
-
-function getCurrentFiberForDevTools() {
- return current;
-}
-
-function injectIntoDevTools(devToolsConfig) {
- var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
- return injectInternals({
- bundleType: devToolsConfig.bundleType,
- version: devToolsConfig.version,
- rendererPackageName: devToolsConfig.rendererPackageName,
- rendererConfig: devToolsConfig.rendererConfig,
- overrideHookState: overrideHookState,
- overrideHookStateDeletePath: overrideHookStateDeletePath,
- overrideHookStateRenamePath: overrideHookStateRenamePath,
- overrideProps: overrideProps,
- overridePropsDeletePath: overridePropsDeletePath,
- overridePropsRenamePath: overridePropsRenamePath,
- setSuspenseHandler: setSuspenseHandler,
- scheduleUpdate: scheduleUpdate,
- currentDispatcherRef: ReactCurrentDispatcher,
- findHostInstanceByFiber: findHostInstanceByFiber,
- findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
- // React Refresh
- findHostInstancesForRefresh: findHostInstancesForRefresh ,
- scheduleRefresh: scheduleRefresh ,
- scheduleRoot: scheduleRoot ,
- setRefreshHandler: setRefreshHandler ,
- // Enables DevTools to append owner stacks to error messages in DEV mode.
- getCurrentFiber: getCurrentFiberForDevTools
- });
-}
-
-function ReactDOMRoot(container, options) {
- this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
-}
-
-function ReactDOMBlockingRoot(container, tag, options) {
- this._internalRoot = createRootImpl(container, tag, options);
-}
-
-ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {
- var root = this._internalRoot;
-
- {
- if (typeof arguments[1] === 'function') {
- error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
- }
-
- var container = root.containerInfo;
-
- if (container.nodeType !== COMMENT_NODE) {
- var hostInstance = findHostInstanceWithNoPortals(root.current);
-
- if (hostInstance) {
- if (hostInstance.parentNode !== container) {
- error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
- }
- }
- }
- }
-
- updateContainer(children, root, null, null);
-};
-
-ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {
- {
- if (typeof arguments[0] === 'function') {
- error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
- }
- }
-
- var root = this._internalRoot;
- var container = root.containerInfo;
- updateContainer(null, root, null, function () {
- unmarkContainerAsRoot(container);
- });
-};
-
-function createRootImpl(container, tag, options) {
- // Tag is either LegacyRoot or Concurrent Root
- var hydrate = options != null && options.hydrate === true;
- var hydrationCallbacks = options != null && options.hydrationOptions || null;
- var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;
- var root = createContainer(container, tag, hydrate);
- markContainerAsRoot(root.current, container);
- var containerNodeType = container.nodeType;
-
- {
- var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
- listenToAllSupportedEvents(rootContainerElement);
- }
-
- if (mutableSources) {
- for (var i = 0; i < mutableSources.length; i++) {
- var mutableSource = mutableSources[i];
- registerMutableSourceForHydration(root, mutableSource);
- }
- }
-
- return root;
-}
-function createLegacyRoot(container, options) {
- return new ReactDOMBlockingRoot(container, LegacyRoot, options);
-}
-function isValidContainer(node) {
- return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
-}
-
-var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
-var topLevelUpdateWarnings;
-var warnedAboutHydrateAPI = false;
-
-{
- topLevelUpdateWarnings = function (container) {
- if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
- var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);
-
- if (hostInstance) {
- if (hostInstance.parentNode !== container) {
- error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');
- }
- }
- }
-
- var isRootRenderedBySomeReact = !!container._reactRootContainer;
- var rootEl = getReactRootElementInContainer(container);
- var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));
-
- if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
- error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
- }
-
- if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
- error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');
- }
- };
-}
-
-function getReactRootElementInContainer(container) {
- if (!container) {
- return null;
- }
-
- if (container.nodeType === DOCUMENT_NODE) {
- return container.documentElement;
- } else {
- return container.firstChild;
- }
-}
-
-function shouldHydrateDueToLegacyHeuristic(container) {
- var rootElement = getReactRootElementInContainer(container);
- return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));
-}
-
-function legacyCreateRootFromDOMContainer(container, forceHydrate) {
- var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.
-
- if (!shouldHydrate) {
- var warned = false;
- var rootSibling;
-
- while (rootSibling = container.lastChild) {
- {
- if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
- warned = true;
-
- error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
- }
- }
-
- container.removeChild(rootSibling);
- }
- }
-
- {
- if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
- warnedAboutHydrateAPI = true;
-
- warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v18. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
- }
- }
-
- return createLegacyRoot(container, shouldHydrate ? {
- hydrate: true
- } : undefined);
-}
-
-function warnOnInvalidCallback$1(callback, callerName) {
- {
- if (callback !== null && typeof callback !== 'function') {
- error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
- }
- }
-}
-
-function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
- {
- topLevelUpdateWarnings(container);
- warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');
- } // TODO: Without `any` type, Flow says "Property cannot be accessed on any
- // member of intersection type." Whyyyyyy.
-
-
- var root = container._reactRootContainer;
- var fiberRoot;
-
- if (!root) {
- // Initial mount
- root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);
- fiberRoot = root._internalRoot;
-
- if (typeof callback === 'function') {
- var originalCallback = callback;
-
- callback = function () {
- var instance = getPublicRootInstance(fiberRoot);
- originalCallback.call(instance);
- };
- } // Initial mount should not be batched.
-
-
- unbatchedUpdates(function () {
- updateContainer(children, fiberRoot, parentComponent, callback);
- });
- } else {
- fiberRoot = root._internalRoot;
-
- if (typeof callback === 'function') {
- var _originalCallback = callback;
-
- callback = function () {
- var instance = getPublicRootInstance(fiberRoot);
-
- _originalCallback.call(instance);
- };
- } // Update
-
-
- updateContainer(children, fiberRoot, parentComponent, callback);
- }
-
- return getPublicRootInstance(fiberRoot);
-}
-
-function findDOMNode(componentOrElement) {
- {
- var owner = ReactCurrentOwner$3.current;
-
- if (owner !== null && owner.stateNode !== null) {
- var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
-
- if (!warnedAboutRefsInRender) {
- error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component');
- }
-
- owner.stateNode._warnedAboutRefsInRender = true;
- }
- }
-
- if (componentOrElement == null) {
- return null;
- }
-
- if (componentOrElement.nodeType === ELEMENT_NODE) {
- return componentOrElement;
- }
-
- {
- return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
- }
-}
-function hydrate(element, container, callback) {
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
-
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
-
- if (isModernRoot) {
- error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');
- }
- } // TODO: throw or warn if we couldn't hydrate?
-
-
- return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
-}
-function render(element, container, callback) {
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
-
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
-
- if (isModernRoot) {
- error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
- }
- }
-
- return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
-}
-function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
- if (!isValidContainer(containerNode)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
-
- if (!(parentComponent != null && has(parentComponent))) {
- {
- throw Error( "parentComponent must be a valid React Component" );
- }
- }
-
- return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
-}
-function unmountComponentAtNode(container) {
- if (!isValidContainer(container)) {
- {
- throw Error( "unmountComponentAtNode(...): Target container is not a DOM element." );
- }
- }
-
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
-
- if (isModernRoot) {
- error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');
- }
- }
-
- if (container._reactRootContainer) {
- {
- var rootEl = getReactRootElementInContainer(container);
- var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);
-
- if (renderedByDifferentReact) {
- error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
- }
- } // Unmount should not be batched.
-
-
- unbatchedUpdates(function () {
- legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
- // $FlowFixMe This should probably use `delete container._reactRootContainer`
- container._reactRootContainer = null;
- unmarkContainerAsRoot(container);
- });
- }); // If you call unmountComponentAtNode twice in quick succession, you'll
- // get `true` twice. That's probably fine?
-
- return true;
- } else {
- {
- var _rootEl = getReactRootElementInContainer(container);
-
- var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.
-
- var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
-
- if (hasNonRootReactChild) {
- error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');
- }
- }
-
- return false;
- }
-}
-
-setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
-setAttemptContinuousHydration(attemptContinuousHydration$1);
-setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
-setAttemptHydrationAtPriority(runWithPriority$2);
-var didWarnAboutUnstableCreatePortal = false;
-
-{
- if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
- Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
- Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
- error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
- }
-}
-
-setRestoreImplementation(restoreControlledState$3);
-setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);
-
-function createPortal$1(children, container) {
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
-
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- } // TODO: pass ReactDOM portal implementation as third argument
- // $FlowFixMe The Flow type is opaque but there's no way to actually create it.
-
-
- return createPortal(children, container, null, key);
-}
-
-function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
-
- return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
-}
-
-function unstable_createPortal(children, container) {
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
-
- {
- if (!didWarnAboutUnstableCreatePortal) {
- didWarnAboutUnstableCreatePortal = true;
-
- warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 18+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
- }
- }
-
- return createPortal$1(children, container, key);
-}
-
-var Internals = {
- // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.
- // This is an array for better minification.
- Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?
- IsThisRendererActing]
-};
-var foundDevTools = injectIntoDevTools({
- findFiberByHostInstance: getClosestInstanceFromNode,
- bundleType: 1 ,
- version: ReactVersion,
- rendererPackageName: 'react-dom'
-});
-
-{
- if (!foundDevTools && canUseDOM && window.top === window.self) {
- // If we're in Chrome or Firefox, provide a download link if not installed.
- if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
- var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.
-
- if (/^(https?|file):$/.test(protocol)) {
- // eslint-disable-next-line react-internal/no-production-logging
- console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');
- }
- }
- }
-}
-
-exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
-exports.createPortal = createPortal$1;
-exports.findDOMNode = findDOMNode;
-exports.flushSync = flushSync;
-exports.hydrate = hydrate;
-exports.render = render;
-exports.unmountComponentAtNode = unmountComponentAtNode;
-exports.unstable_batchedUpdates = batchedUpdates$1;
-exports.unstable_createPortal = unstable_createPortal;
-exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
-exports.version = ReactVersion;
- })();
-}
diff --git a/node_modules/react-dom/cjs/react-dom.production.min.js b/node_modules/react-dom/cjs/react-dom.production.min.js
deleted file mode 100644
index a87fb5d..0000000
--- a/node_modules/react-dom/cjs/react-dom.production.min.js
+++ /dev/null
@@ -1,297 +0,0 @@
-/** @license React v17.0.2
- * react-dom.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-/*
- Modernizr 3.0.0pre (Custom Build) | MIT
-*/
-'use strict';var aa=require("react"),m=require("object-assign"),r=require("scheduler");function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(y(227));var ba=new Set,ca={};function da(a,b){ea(a,b);ea(a+"Capture",b)}
-function ea(a,b){ca[a]=b;for(a=0;a<b.length;a++)ba.add(b[a])}
-var fa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ha=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ia=Object.prototype.hasOwnProperty,
-ja={},ka={};function la(a){if(ia.call(ka,a))return!0;if(ia.call(ja,a))return!1;if(ha.test(a))return ka[a]=!0;ja[a]=!0;return!1}function ma(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
-function na(a,b,c,d){if(null===b||"undefined"===typeof b||ma(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function B(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var D={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1,!1)});var oa=/[\-:]([a-z])/g;function pa(a){return a[1].toUpperCase()}
-"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".split(" ").forEach(function(a){var b=a.replace(oa,
-pa);D[b]=new B(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(oa,pa);D[b]=new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1,!1)});
-D.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0,!0)});
-function qa(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(na(b,c,e,d)&&(c=null),d||null===e?la(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
-var ra=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sa=60103,ta=60106,ua=60107,wa=60108,xa=60114,ya=60109,za=60110,Aa=60112,Ba=60113,Ca=60120,Da=60115,Ea=60116,Fa=60121,Ga=60128,Ha=60129,Ia=60130,Ja=60131;
-if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;sa=E("react.element");ta=E("react.portal");ua=E("react.fragment");wa=E("react.strict_mode");xa=E("react.profiler");ya=E("react.provider");za=E("react.context");Aa=E("react.forward_ref");Ba=E("react.suspense");Ca=E("react.suspense_list");Da=E("react.memo");Ea=E("react.lazy");Fa=E("react.block");E("react.scope");Ga=E("react.opaque.id");Ha=E("react.debug_trace_mode");Ia=E("react.offscreen");Ja=E("react.legacy_hidden")}
-var Ka="function"===typeof Symbol&&Symbol.iterator;function La(a){if(null===a||"object"!==typeof a)return null;a=Ka&&a[Ka]||a["@@iterator"];return"function"===typeof a?a:null}var Ma;function Na(a){if(void 0===Ma)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);Ma=b&&b[1]||""}return"\n"+Ma+a}var Oa=!1;
-function Pa(a,b){if(!a||Oa)return"";Oa=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();}catch(k){d=k}a()}}catch(k){if(k&&d&&"string"===typeof k.stack){for(var e=k.stack.split("\n"),
-f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return"\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Oa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Na(a):""}
-function Qa(a){switch(a.tag){case 5:return Na(a.type);case 16:return Na("Lazy");case 13:return Na("Suspense");case 19:return Na("SuspenseList");case 0:case 2:case 15:return a=Pa(a.type,!1),a;case 11:return a=Pa(a.type.render,!1),a;case 22:return a=Pa(a.type._render,!1),a;case 1:return a=Pa(a.type,!0),a;default:return""}}
-function Ra(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ua:return"Fragment";case ta:return"Portal";case xa:return"Profiler";case wa:return"StrictMode";case Ba:return"Suspense";case Ca:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case za:return(a.displayName||"Context")+".Consumer";case ya:return(a._context.displayName||"Context")+".Provider";case Aa:var b=a.render;b=b.displayName||b.name||"";
-return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Da:return Ra(a.type);case Fa:return Ra(a._render);case Ea:b=a._payload;a=a._init;try{return Ra(a(b))}catch(c){}}return null}function Sa(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function Ta(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
-function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
-null;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}
-function Ya(a,b){var c=b.checked;return m({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function $a(a,b){b=b.checked;null!=b&&qa(a,"checked",b,!1)}
-function ab(a,b){$a(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?bb(a,b.type,c):b.hasOwnProperty("defaultValue")&&bb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
-function cb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
-function bb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function db(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function eb(a,b){a=m({children:void 0},b);if(b=db(b.children))a.children=b;return a}
-function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+Sa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
-function gb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(y(91));return m({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function hb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(y(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(y(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Sa(c)}}
-function ib(a,b){var c=Sa(b.value),d=Sa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function jb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var kb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
-function lb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function mb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?lb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
-var nb,ob=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==kb.svg||"innerHTML"in a)a.innerHTML=b;else{nb=nb||document.createElement("div");nb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=nb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
-function pb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}
-var qb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
-floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},rb=["Webkit","ms","Moz","O"];Object.keys(qb).forEach(function(a){rb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);qb[b]=qb[a]})});function sb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||qb.hasOwnProperty(a)&&qb[a]?(""+b).trim():b+"px"}
-function tb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=sb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var ub=m({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
-function vb(a,b){if(b){if(ub[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(y(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(y(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(y(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(y(62));}}
-function wb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;
-function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(y(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a<b.length;a++)Bb(b[a])}}function Gb(a,b){return a(b)}function Hb(a,b,c,d,e){return a(b,c,d,e)}function Ib(){}var Jb=Gb,Kb=!1,Lb=!1;function Mb(){if(null!==zb||null!==Ab)Ib(),Fb()}
-function Nb(a,b,c){if(Lb)return a(b,c);Lb=!0;try{return Jb(a,b,c)}finally{Lb=!1,Mb()}}
-function Ob(a,b){var c=a.stateNode;if(null===c)return null;var d=Db(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==
-typeof c)throw Error(y(231,b,typeof c));return c}var Pb=!1;if(fa)try{var Qb={};Object.defineProperty(Qb,"passive",{get:function(){Pb=!0}});window.addEventListener("test",Qb,Qb);window.removeEventListener("test",Qb,Qb)}catch(a){Pb=!1}function Rb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(n){this.onError(n)}}var Sb=!1,Tb=null,Ub=!1,Vb=null,Wb={onError:function(a){Sb=!0;Tb=a}};function Xb(a,b,c,d,e,f,g,h,k){Sb=!1;Tb=null;Rb.apply(Wb,arguments)}
-function Yb(a,b,c,d,e,f,g,h,k){Xb.apply(this,arguments);if(Sb){if(Sb){var l=Tb;Sb=!1;Tb=null}else throw Error(y(198));Ub||(Ub=!0,Vb=l)}}function Zb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function $b(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function ac(a){if(Zb(a)!==a)throw Error(y(188));}
-function bc(a){var b=a.alternate;if(!b){b=Zb(a);if(null===b)throw Error(y(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return ac(e),a;if(f===d)return ac(e),b;f=f.sibling}throw Error(y(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
-c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(y(189));}}if(c.alternate!==d)throw Error(y(190));}if(3!==c.tag)throw Error(y(188));return c.stateNode.current===c?a:b}function cc(a){a=bc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
-function dc(a,b){for(var c=a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}var ec,fc,gc,hc,ic=!1,jc=[],kc=null,lc=null,mc=null,nc=new Map,oc=new Map,pc=[],qc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
-function rc(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function sc(a,b){switch(a){case "focusin":case "focusout":kc=null;break;case "dragenter":case "dragleave":lc=null;break;case "mouseover":case "mouseout":mc=null;break;case "pointerover":case "pointerout":nc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":oc.delete(b.pointerId)}}
-function tc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=rc(b,c,d,e,f),null!==b&&(b=Cb(b),null!==b&&fc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}
-function uc(a,b,c,d,e){switch(b){case "focusin":return kc=tc(kc,a,b,c,d,e),!0;case "dragenter":return lc=tc(lc,a,b,c,d,e),!0;case "mouseover":return mc=tc(mc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;nc.set(f,tc(nc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,oc.set(f,tc(oc.get(f)||null,a,b,c,d,e)),!0}return!1}
-function vc(a){var b=wc(a.target);if(null!==b){var c=Zb(b);if(null!==c)if(b=c.tag,13===b){if(b=$b(c),null!==b){a.blockedOn=b;hc(a.lanePriority,function(){r.unstable_runWithPriority(a.priority,function(){gc(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}
-function xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c)return b=Cb(c),null!==b&&fc(b),a.blockedOn=c,!1;b.shift()}return!0}function zc(a,b,c){xc(a)&&c.delete(b)}
-function Ac(){for(ic=!1;0<jc.length;){var a=jc[0];if(null!==a.blockedOn){a=Cb(a.blockedOn);null!==a&&ec(a);break}for(var b=a.targetContainers;0<b.length;){var c=yc(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&jc.shift()}null!==kc&&xc(kc)&&(kc=null);null!==lc&&xc(lc)&&(lc=null);null!==mc&&xc(mc)&&(mc=null);nc.forEach(zc);oc.forEach(zc)}
-function Bc(a,b){a.blockedOn===b&&(a.blockedOn=null,ic||(ic=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Ac)))}
-function Cc(a){function b(b){return Bc(b,a)}if(0<jc.length){Bc(jc[0],a);for(var c=1;c<jc.length;c++){var d=jc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==kc&&Bc(kc,a);null!==lc&&Bc(lc,a);null!==mc&&Bc(mc,a);nc.forEach(b);oc.forEach(b);for(c=0;c<pc.length;c++)d=pc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<pc.length&&(c=pc[0],null===c.blockedOn);)vc(c),null===c.blockedOn&&pc.shift()}
-function Dc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Ec={animationend:Dc("Animation","AnimationEnd"),animationiteration:Dc("Animation","AnimationIteration"),animationstart:Dc("Animation","AnimationStart"),transitionend:Dc("Transition","TransitionEnd")},Fc={},Gc={};
-fa&&(Gc=document.createElement("div").style,"AnimationEvent"in window||(delete Ec.animationend.animation,delete Ec.animationiteration.animation,delete Ec.animationstart.animation),"TransitionEvent"in window||delete Ec.transitionend.transition);function Hc(a){if(Fc[a])return Fc[a];if(!Ec[a])return a;var b=Ec[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Gc)return Fc[a]=b[c];return a}
-var Ic=Hc("animationend"),Jc=Hc("animationiteration"),Kc=Hc("animationstart"),Lc=Hc("transitionend"),Mc=new Map,Nc=new Map,Oc=["abort","abort",Ic,"animationEnd",Jc,"animationIteration",Kc,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart",
-"lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Lc,"transitionEnd","waiting","waiting"];function Pc(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e="on"+(e[0].toUpperCase()+e.slice(1));Nc.set(d,b);Mc.set(d,e);da(e,[d])}}var Qc=r.unstable_now;Qc();var F=8;
-function Rc(a){if(0!==(1&a))return F=15,1;if(0!==(2&a))return F=14,2;if(0!==(4&a))return F=13,4;var b=24&a;if(0!==b)return F=12,b;if(0!==(a&32))return F=11,32;b=192&a;if(0!==b)return F=10,b;if(0!==(a&256))return F=9,256;b=3584&a;if(0!==b)return F=8,b;if(0!==(a&4096))return F=7,4096;b=4186112&a;if(0!==b)return F=6,b;b=62914560&a;if(0!==b)return F=5,b;if(a&67108864)return F=4,67108864;if(0!==(a&134217728))return F=3,134217728;b=805306368&a;if(0!==b)return F=2,b;if(0!==(1073741824&a))return F=1,1073741824;
-F=8;return a}function Sc(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Tc(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(y(358,a));}}
-function Uc(a,b){var c=a.pendingLanes;if(0===c)return F=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=F=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=Rc(k),e=F):(h&=f,0!==h&&(d=Rc(h),e=F))}else f=c&~g,0!==f?(d=Rc(f),e=F):0!==h&&(d=Rc(h),e=F);if(0===d)return 0;d=31-Vc(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){Rc(b);if(e<=F)return b;F=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Vc(b),e=1<<c,d|=a[c],b&=~e;return d}
-function Wc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Xc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=Yc(24&~b),0===a?Xc(10,b):a;case 10:return a=Yc(192&~b),0===a?Xc(8,b):a;case 8:return a=Yc(3584&~b),0===a&&(a=Yc(4186112&~b),0===a&&(a=512)),a;case 2:return b=Yc(805306368&~b),0===b&&(b=268435456),b}throw Error(y(358,a));}function Yc(a){return a&-a}function Zc(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}
-function $c(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Vc(b);a[b]=c}var Vc=Math.clz32?Math.clz32:ad,bd=Math.log,cd=Math.LN2;function ad(a){return 0===a?32:31-(bd(a)/cd|0)|0}var dd=r.unstable_UserBlockingPriority,ed=r.unstable_runWithPriority,fd=!0;function gd(a,b,c,d){Kb||Ib();var e=hd,f=Kb;Kb=!0;try{Hb(e,a,b,c,d)}finally{(Kb=f)||Mb()}}function id(a,b,c,d){ed(dd,hd.bind(null,a,b,c,d))}
-function hd(a,b,c,d){if(fd){var e;if((e=0===(b&4))&&0<jc.length&&-1<qc.indexOf(a))a=rc(null,a,b,c,d),jc.push(a);else{var f=yc(a,b,c,d);if(null===f)e&&sc(a,d);else{if(e){if(-1<qc.indexOf(a)){a=rc(f,a,b,c,d);jc.push(a);return}if(uc(f,a,b,c,d))return;sc(a,d)}jd(a,b,d,null,c)}}}}
-function yc(a,b,c,d){var e=xb(d);e=wc(e);if(null!==e){var f=Zb(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=$b(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==e&&(e=null)}}jd(a,b,d,e,c);return null}var kd=null,ld=null,md=null;
-function nd(){if(md)return md;var a,b=ld,c=b.length,d,e="value"in kd?kd.value:kd.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return md=e.slice(a,1<d?1-d:void 0)}function od(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function pd(){return!0}function qd(){return!1}
-function rd(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?pd:qd;this.isPropagationStopped=qd;return this}m(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&
-(a.returnValue=!1),this.isDefaultPrevented=pd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=pd)},persist:function(){},isPersistent:pd});return b}
-var sd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},td=rd(sd),ud=m({},sd,{view:0,detail:0}),vd=rd(ud),wd,xd,yd,Ad=m({},ud,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in
-a)return a.movementX;a!==yd&&(yd&&"mousemove"===a.type?(wd=a.screenX-yd.screenX,xd=a.screenY-yd.screenY):xd=wd=0,yd=a);return wd},movementY:function(a){return"movementY"in a?a.movementY:xd}}),Bd=rd(Ad),Cd=m({},Ad,{dataTransfer:0}),Dd=rd(Cd),Ed=m({},ud,{relatedTarget:0}),Fd=rd(Ed),Gd=m({},sd,{animationName:0,elapsedTime:0,pseudoElement:0}),Hd=rd(Gd),Id=m({},sd,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Jd=rd(Id),Kd=m({},sd,{data:0}),Ld=rd(Kd),Md={Esc:"Escape",
-Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",
-119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Od={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Pd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Od[a])?!!b[a]:!1}function zd(){return Pd}
-var Qd=m({},ud,{key:function(a){if(a.key){var b=Md[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=od(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Nd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zd,charCode:function(a){return"keypress"===a.type?od(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
-a.type?od(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Rd=rd(Qd),Sd=m({},Ad,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Td=rd(Sd),Ud=m({},ud,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zd}),Vd=rd(Ud),Wd=m({},sd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Xd=rd(Wd),Yd=m({},Ad,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},
-deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Zd=rd(Yd),$d=[9,13,27,32],ae=fa&&"CompositionEvent"in window,be=null;fa&&"documentMode"in document&&(be=document.documentMode);var ce=fa&&"TextEvent"in window&&!be,de=fa&&(!ae||be&&8<be&&11>=be),ee=String.fromCharCode(32),fe=!1;
-function ge(a,b){switch(a){case "keyup":return-1!==$d.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function he(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case "compositionend":return he(b);case "keypress":if(32!==b.which)return null;fe=!0;return ee;case "textInput":return a=b.data,a===ee&&fe?null:a;default:return null}}
-function ke(a,b){if(ie)return"compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return de&&"ko"!==b.locale?null:b.data;default:return null}}
-var le={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function me(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!le[a.type]:"textarea"===b?!0:!1}function ne(a,b,c,d){Eb(d);b=oe(b,"onChange");0<b.length&&(c=new td("onChange","change",null,c,d),a.push({event:c,listeners:b}))}var pe=null,qe=null;function re(a){se(a,0)}function te(a){var b=ue(a);if(Wa(b))return a}
-function ve(a,b){if("change"===a)return b}var we=!1;if(fa){var xe;if(fa){var ye="oninput"in document;if(!ye){var ze=document.createElement("div");ze.setAttribute("oninput","return;");ye="function"===typeof ze.oninput}xe=ye}else xe=!1;we=xe&&(!document.documentMode||9<document.documentMode)}function Ae(){pe&&(pe.detachEvent("onpropertychange",Be),qe=pe=null)}function Be(a){if("value"===a.propertyName&&te(qe)){var b=[];ne(b,qe,a,xb(a));a=re;if(Kb)a(b);else{Kb=!0;try{Gb(a,b)}finally{Kb=!1,Mb()}}}}
-function Ce(a,b,c){"focusin"===a?(Ae(),pe=b,qe=c,pe.attachEvent("onpropertychange",Be)):"focusout"===a&&Ae()}function De(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return te(qe)}function Ee(a,b){if("click"===a)return te(b)}function Fe(a,b){if("input"===a||"change"===a)return te(b)}function Ge(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var He="function"===typeof Object.is?Object.is:Ge,Ie=Object.prototype.hasOwnProperty;
-function Je(a,b){if(He(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Ie.call(b,c[d])||!He(a[c[d]],b[c[d]]))return!1;return!0}function Ke(a){for(;a&&a.firstChild;)a=a.firstChild;return a}
-function Le(a,b){var c=Ke(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Ke(c)}}function Me(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Me(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}
-function Ne(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}
-var Pe=fa&&"documentMode"in document&&11>=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;
-function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Oe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Je(Se,d)||(Se=d,d=oe(Re,"onSelect"),0<d.length&&(b=new td("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Qe)))}
-Pc("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
-0);Pc("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Pc(Oc,2);for(var Ve="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),We=0;We<Ve.length;We++)Nc.set(Ve[We],0);ea("onMouseEnter",["mouseout","mouseover"]);
-ea("onMouseLeave",["mouseout","mouseover"]);ea("onPointerEnter",["pointerout","pointerover"]);ea("onPointerLeave",["pointerout","pointerover"]);da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));da("onBeforeInput",["compositionend","keypress","textInput","paste"]);da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));
-da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Xe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new Set("cancel close invalid load scroll toggle".split(" ").concat(Xe));
-function Ze(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;Yb(d,b,void 0,a);a.currentTarget=null}
-function se(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Ze(e,h,l);f=k}}}if(Ub)throw a=Vb,Ub=!1,Vb=null,a;}
-function G(a,b){var c=$e(b),d=a+"__bubble";c.has(d)||(af(b,a,2,!1),c.add(d))}var bf="_reactListening"+Math.random().toString(36).slice(2);function cf(a){a[bf]||(a[bf]=!0,ba.forEach(function(b){Ye.has(b)||df(b,!1,a,null);df(b,!0,a,null)}))}
-function df(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;"selectionchange"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Ye.has(a)){if("scroll"!==a)return;e|=2;f=d}var g=$e(f),h=a+"__"+(b?"capture":"bubble");g.has(h)||(b&&(e|=4),af(f,a,e,b),g.add(h))}
-function af(a,b,c,d){var e=Nc.get(b);switch(void 0===e?2:e){case 0:e=gd;break;case 1:e=id;break;default:e=hd}c=e.bind(null,b,c,a);e=void 0;!Pb||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}
-function jd(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=wc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Nb(function(){var d=f,e=xb(c),g=[];
-a:{var h=Mc.get(a);if(void 0!==h){var k=td,x=a;switch(a){case "keypress":if(0===od(c))break a;case "keydown":case "keyup":k=Rd;break;case "focusin":x="focus";k=Fd;break;case "focusout":x="blur";k=Fd;break;case "beforeblur":case "afterblur":k=Fd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Bd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=
-Dd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Vd;break;case Ic:case Jc:case Kc:k=Hd;break;case Lc:k=Xd;break;case "scroll":k=vd;break;case "wheel":k=Zd;break;case "copy":case "cut":case "paste":k=Jd;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Td}var w=0!==(b&4),z=!w&&"scroll"===a,u=w?null!==h?h+"Capture":null:h;w=[];for(var t=d,q;null!==
-t;){q=t;var v=q.stateNode;5===q.tag&&null!==v&&(q=v,null!==u&&(v=Ob(t,u),null!=v&&w.push(ef(t,v,q))));if(z)break;t=t.return}0<w.length&&(h=new k(h,x,null,c,e),g.push({event:h,listeners:w}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&0===(b&16)&&(x=c.relatedTarget||c.fromElement)&&(wc(x)||x[ff]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(x=c.relatedTarget||c.toElement,k=d,x=x?wc(x):null,null!==
-x&&(z=Zb(x),x!==z||5!==x.tag&&6!==x.tag))x=null}else k=null,x=d;if(k!==x){w=Bd;v="onMouseLeave";u="onMouseEnter";t="mouse";if("pointerout"===a||"pointerover"===a)w=Td,v="onPointerLeave",u="onPointerEnter",t="pointer";z=null==k?h:ue(k);q=null==x?h:ue(x);h=new w(v,t+"leave",k,c,e);h.target=z;h.relatedTarget=q;v=null;wc(e)===d&&(w=new w(u,t+"enter",x,c,e),w.target=q,w.relatedTarget=z,v=w);z=v;if(k&&x)b:{w=k;u=x;t=0;for(q=w;q;q=gf(q))t++;q=0;for(v=u;v;v=gf(v))q++;for(;0<t-q;)w=gf(w),t--;for(;0<q-t;)u=
-gf(u),q--;for(;t--;){if(w===u||null!==u&&w===u.alternate)break b;w=gf(w);u=gf(u)}w=null}else w=null;null!==k&&hf(g,h,k,w,!1);null!==x&&null!==z&&hf(g,z,x,w,!0)}}}a:{h=d?ue(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var J=ve;else if(me(h))if(we)J=Fe;else{J=De;var K=Ce}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(J=Ee);if(J&&(J=J(a,d))){ne(g,J,c,e);break a}K&&K(a,h,d);"focusout"===a&&(K=h._wrapperState)&&
-K.controlled&&"number"===h.type&&bb(h,"number",h.value)}K=d?ue(d):window;switch(a){case "focusin":if(me(K)||"true"===K.contentEditable)Qe=K,Re=d,Se=null;break;case "focusout":Se=Re=Qe=null;break;case "mousedown":Te=!0;break;case "contextmenu":case "mouseup":case "dragend":Te=!1;Ue(g,c,e);break;case "selectionchange":if(Pe)break;case "keydown":case "keyup":Ue(g,c,e)}var Q;if(ae)b:{switch(a){case "compositionstart":var L="onCompositionStart";break b;case "compositionend":L="onCompositionEnd";break b;
-case "compositionupdate":L="onCompositionUpdate";break b}L=void 0}else ie?ge(a,c)&&(L="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(L="onCompositionStart");L&&(de&&"ko"!==c.locale&&(ie||"onCompositionStart"!==L?"onCompositionEnd"===L&&ie&&(Q=nd()):(kd=e,ld="value"in kd?kd.value:kd.textContent,ie=!0)),K=oe(d,L),0<K.length&&(L=new Ld(L,a,null,c,e),g.push({event:L,listeners:K}),Q?L.data=Q:(Q=he(c),null!==Q&&(L.data=Q))));if(Q=ce?je(a,c):ke(a,c))d=oe(d,"onBeforeInput"),0<d.length&&(e=new Ld("onBeforeInput",
-"beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=Q)}se(g,b)})}function ef(a,b,c){return{instance:a,listener:b,currentTarget:c}}function oe(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Ob(a,c),null!=f&&d.unshift(ef(a,f,e)),f=Ob(a,b),null!=f&&d.push(ef(a,f,e)));a=a.return}return d}function gf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}
-function hf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Ob(c,f),null!=k&&g.unshift(ef(c,k,h))):e||(k=Ob(c,f),null!=k&&g.push(ef(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function jf(){}var kf=null,lf=null;function mf(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
-function nf(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var of="function"===typeof setTimeout?setTimeout:void 0,pf="function"===typeof clearTimeout?clearTimeout:void 0;function qf(a){1===a.nodeType?a.textContent="":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=""))}
-function rf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function sf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}var tf=0;function uf(a){return{$$typeof:Ga,toString:a,valueOf:a}}var vf=Math.random().toString(36).slice(2),wf="__reactFiber$"+vf,xf="__reactProps$"+vf,ff="__reactContainer$"+vf,yf="__reactEvents$"+vf;
-function wc(a){var b=a[wf];if(b)return b;for(var c=a.parentNode;c;){if(b=c[ff]||c[wf]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=sf(a);null!==a;){if(c=a[wf])return c;a=sf(a)}return b}a=c;c=a.parentNode}return null}function Cb(a){a=a[wf]||a[ff];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function ue(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(y(33));}function Db(a){return a[xf]||null}
-function $e(a){var b=a[yf];void 0===b&&(b=a[yf]=new Set);return b}var zf=[],Af=-1;function Bf(a){return{current:a}}function H(a){0>Af||(a.current=zf[Af],zf[Af]=null,Af--)}function I(a,b){Af++;zf[Af]=a.current;a.current=b}var Cf={},M=Bf(Cf),N=Bf(!1),Df=Cf;
-function Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function Ff(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Gf(){H(N);H(M)}function Hf(a,b,c){if(M.current!==Cf)throw Error(y(168));I(M,b);I(N,c)}
-function If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(y(108,Ra(b)||"Unknown",e));return m({},c,d)}function Jf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Cf;Df=M.current;I(M,a);I(N,N.current);return!0}function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(y(169));c?(a=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=a,H(N),H(M),I(M,a)):H(N);I(N,c)}
-var Lf=null,Mf=null,Nf=r.unstable_runWithPriority,Of=r.unstable_scheduleCallback,Pf=r.unstable_cancelCallback,Qf=r.unstable_shouldYield,Rf=r.unstable_requestPaint,Sf=r.unstable_now,Tf=r.unstable_getCurrentPriorityLevel,Uf=r.unstable_ImmediatePriority,Vf=r.unstable_UserBlockingPriority,Wf=r.unstable_NormalPriority,Xf=r.unstable_LowPriority,Yf=r.unstable_IdlePriority,Zf={},$f=void 0!==Rf?Rf:function(){},ag=null,bg=null,cg=!1,dg=Sf(),O=1E4>dg?Sf:function(){return Sf()-dg};
-function eg(){switch(Tf()){case Uf:return 99;case Vf:return 98;case Wf:return 97;case Xf:return 96;case Yf:return 95;default:throw Error(y(332));}}function fg(a){switch(a){case 99:return Uf;case 98:return Vf;case 97:return Wf;case 96:return Xf;case 95:return Yf;default:throw Error(y(332));}}function gg(a,b){a=fg(a);return Nf(a,b)}function hg(a,b,c){a=fg(a);return Of(a,b,c)}function ig(){if(null!==bg){var a=bg;bg=null;Pf(a)}jg()}
-function jg(){if(!cg&&null!==ag){cg=!0;var a=0;try{var b=ag;gg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});ag=null}catch(c){throw null!==ag&&(ag=ag.slice(a+1)),Of(Uf,ig),c;}finally{cg=!1}}}var kg=ra.ReactCurrentBatchConfig;function lg(a,b){if(a&&a.defaultProps){b=m({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var mg=Bf(null),ng=null,og=null,pg=null;function qg(){pg=og=ng=null}
-function rg(a){var b=mg.current;H(mg);a.type._context._currentValue=b}function sg(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function tg(a,b){ng=a;pg=og=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ug=!0),a.firstContext=null)}
-function vg(a,b){if(pg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)pg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===og){if(null===ng)throw Error(y(308));og=b;ng.dependencies={lanes:0,firstContext:b,responders:null}}else og=og.next=b}return a._currentValue}var wg=!1;function xg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}
-function yg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function zg(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}function Ag(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}
-function Bg(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=
-b;c.lastBaseUpdate=b}
-function Cg(a,b,c,d){var e=a.updateQueue;wg=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var n=a.alternate;if(null!==n){n=n.updateQueue;var A=n.lastBaseUpdate;A!==g&&(null===A?n.firstBaseUpdate=l:A.next=l,n.lastBaseUpdate=k)}}if(null!==f){A=e.baseState;g=0;n=l=k=null;do{h=f.lane;var p=f.eventTime;if((d&h)===h){null!==n&&(n=n.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,
-next:null});a:{var C=a,x=f;h=b;p=c;switch(x.tag){case 1:C=x.payload;if("function"===typeof C){A=C.call(p,A,h);break a}A=C;break a;case 3:C.flags=C.flags&-4097|64;case 0:C=x.payload;h="function"===typeof C?C.call(p,A,h):C;if(null===h||void 0===h)break a;A=m({},A,h);break a;case 2:wg=!0}}null!==f.callback&&(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else p={eventTime:p,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===n?(l=n=p,k=A):n=n.next=p,g|=h;f=f.next;if(null===
-f)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===n&&(k=A);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=n;Dg|=g;a.lanes=g;a.memoizedState=A}}function Eg(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(y(191,e));e.call(d)}}}var Fg=(new aa.Component).refs;
-function Gg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:m({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}
-var Kg={isMounted:function(a){return(a=a._reactInternals)?Zb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Hg(),e=Ig(a),f=zg(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ag(a,f);Jg(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Hg(),d=Ig(a),e=zg(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=
-b);Ag(a,e);Jg(a,d,c)}};function Lg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Je(c,d)||!Je(e,f):!0}
-function Mg(a,b,c){var d=!1,e=Cf;var f=b.contextType;"object"===typeof f&&null!==f?f=vg(f):(e=Ff(b)?Df:M.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Ef(a,e):Cf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Kg;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
-function Ng(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Kg.enqueueReplaceState(b,b.state,null)}
-function Og(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Fg;xg(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=vg(f):(f=Ff(b)?Df:M.current,e.context=Ef(a,f));Cg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Gg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||
-(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Kg.enqueueReplaceState(e,e.state,null),Cg(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4)}var Pg=Array.isArray;
-function Qg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(y(309));var d=c.stateNode}if(!d)throw Error(y(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Fg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(y(284));if(!c._owner)throw Error(y(290,a));}return a}
-function Rg(a,b){if("textarea"!==a.type)throw Error(y(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b));}
-function Sg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Tg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=2,
-c):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Ug(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Qg(a,b,c),d.return=a,d;d=Vg(c.type,c.key,c.props,null,a.mode,d);d.ref=Qg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
-Wg(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function n(a,b,c,d,f){if(null===b||7!==b.tag)return b=Xg(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function A(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Ug(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case sa:return c=Vg(b.type,b.key,b.props,null,a.mode,c),c.ref=Qg(a,null,b),c.return=a,c;case ta:return b=Wg(b,a.mode,c),b.return=a,b}if(Pg(b)||La(b))return b=Xg(b,
-a.mode,c,null),b.return=a,b;Rg(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case sa:return c.key===e?c.type===ua?n(a,b,c.props.children,d,e):k(a,b,c,d):null;case ta:return c.key===e?l(a,b,c,d):null}if(Pg(c)||La(c))return null!==e?null:n(a,b,c,d,null);Rg(a,c)}return null}function C(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||
-null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case sa:return a=a.get(null===d.key?c:d.key)||null,d.type===ua?n(b,a,d.props.children,e,d.key):k(b,a,d,e);case ta:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Pg(d)||La(d))return a=a.get(c)||null,n(b,a,d,e,null);Rg(b,d)}return null}function x(e,g,h,k){for(var l=null,t=null,u=g,z=g=0,q=null;null!==u&&z<h.length;z++){u.index>z?(q=u,u=null):q=u.sibling;var n=p(e,u,h[z],k);if(null===n){null===u&&(u=q);break}a&&u&&null===
-n.alternate&&b(e,u);g=f(n,g,z);null===t?l=n:t.sibling=n;t=n;u=q}if(z===h.length)return c(e,u),l;if(null===u){for(;z<h.length;z++)u=A(e,h[z],k),null!==u&&(g=f(u,g,z),null===t?l=u:t.sibling=u,t=u);return l}for(u=d(e,u);z<h.length;z++)q=C(u,e,z,h[z],k),null!==q&&(a&&null!==q.alternate&&u.delete(null===q.key?z:q.key),g=f(q,g,z),null===t?l=q:t.sibling=q,t=q);a&&u.forEach(function(a){return b(e,a)});return l}function w(e,g,h,k){var l=La(h);if("function"!==typeof l)throw Error(y(150));h=l.call(h);if(null==
-h)throw Error(y(151));for(var t=l=null,u=g,z=g=0,q=null,n=h.next();null!==u&&!n.done;z++,n=h.next()){u.index>z?(q=u,u=null):q=u.sibling;var w=p(e,u,n.value,k);if(null===w){null===u&&(u=q);break}a&&u&&null===w.alternate&&b(e,u);g=f(w,g,z);null===t?l=w:t.sibling=w;t=w;u=q}if(n.done)return c(e,u),l;if(null===u){for(;!n.done;z++,n=h.next())n=A(e,n.value,k),null!==n&&(g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);return l}for(u=d(e,u);!n.done;z++,n=h.next())n=C(u,e,z,n.value,k),null!==n&&(a&&null!==n.alternate&&
-u.delete(null===n.key?z:n.key),g=f(n,g,z),null===t?l=n:t.sibling=n,t=n);a&&u.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===ua&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case sa:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===ua){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);
-d=e(k,f.props);d.ref=Qg(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===ua?(d=Xg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Vg(f.type,f.key,f.props,null,a.mode,h),h.ref=Qg(a,d,f),h.return=a,a=h)}return g(a);case ta:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=
-Wg(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ug(f,a.mode,h),d.return=a,a=d),g(a);if(Pg(f))return x(a,d,f,h);if(La(f))return w(a,d,f,h);l&&Rg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(y(152,Ra(a.type)||"Component"));}return c(a,d)}}var Yg=Sg(!0),Zg=Sg(!1),$g={},ah=Bf($g),bh=Bf($g),ch=Bf($g);
-function dh(a){if(a===$g)throw Error(y(174));return a}function eh(a,b){I(ch,b);I(bh,a);I(ah,$g);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:mb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=mb(b,a)}H(ah);I(ah,b)}function fh(){H(ah);H(bh);H(ch)}function gh(a){dh(ch.current);var b=dh(ah.current);var c=mb(b,a.type);b!==c&&(I(bh,a),I(ah,c))}function hh(a){bh.current===a&&(H(ah),H(bh))}var P=Bf(0);
-function ih(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var jh=null,kh=null,lh=!1;
-function mh(a,b){var c=nh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function oh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
-function ph(a){if(lh){var b=kh;if(b){var c=b;if(!oh(a,b)){b=rf(c.nextSibling);if(!b||!oh(a,b)){a.flags=a.flags&-1025|2;lh=!1;jh=a;return}mh(jh,c)}jh=a;kh=rf(b.firstChild)}else a.flags=a.flags&-1025|2,lh=!1,jh=a}}function qh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;jh=a}
-function rh(a){if(a!==jh)return!1;if(!lh)return qh(a),lh=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!nf(b,a.memoizedProps))for(b=kh;b;)mh(a,b),b=rf(b.nextSibling);qh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(y(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){kh=rf(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}kh=null}}else kh=jh?rf(a.stateNode.nextSibling):null;return!0}
-function sh(){kh=jh=null;lh=!1}var th=[];function uh(){for(var a=0;a<th.length;a++)th[a]._workInProgressVersionPrimary=null;th.length=0}var vh=ra.ReactCurrentDispatcher,wh=ra.ReactCurrentBatchConfig,xh=0,R=null,S=null,T=null,yh=!1,zh=!1;function Ah(){throw Error(y(321));}function Bh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!He(a[c],b[c]))return!1;return!0}
-function Ch(a,b,c,d,e,f){xh=f;R=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;vh.current=null===a||null===a.memoizedState?Dh:Eh;a=c(d,e);if(zh){f=0;do{zh=!1;if(!(25>f))throw Error(y(301));f+=1;T=S=null;b.updateQueue=null;vh.current=Fh;a=c(d,e)}while(zh)}vh.current=Gh;b=null!==S&&null!==S.next;xh=0;T=S=R=null;yh=!1;if(b)throw Error(y(300));return a}function Hh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}
-function Ih(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(y(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Jh(a,b){return"function"===typeof b?b(a):b}
-function Kh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((xh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,
-eagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;R.lanes|=l;Dg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;He(d,b.memoizedState)||(ug=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}
-function Lh(a){var b=Ih(),c=b.queue;if(null===c)throw Error(y(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);He(f,b.memoizedState)||(ug=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}
-function Mh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(xh&a)===a)b._workInProgressVersionPrimary=d,th.push(b);if(a)return c(b._source);th.push(b);throw Error(y(350));}
-function Nh(a,b,c,d){var e=U;if(null===e)throw Error(y(349));var f=b._getVersion,g=f(b._source),h=vh.current,k=h.useState(function(){return Mh(e,b,c)}),l=k[1],n=k[0];k=T;var A=a.memoizedState,p=A.refs,C=p.getSnapshot,x=A.source;A=A.subscribe;var w=R;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=l;var a=f(b._source);if(!He(g,a)){a=c(b._source);He(n,a)||(l(a),a=Ig(w),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=
-e.entanglements,h=a;0<h;){var k=31-Vc(h),v=1<<k;d[k]|=a;h&=~v}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=p.getSnapshot,c=p.setSnapshot;try{c(a(b._source));var d=Ig(w);e.mutableReadLanes|=d&e.pendingLanes}catch(q){c(function(){throw q;})}})},[b,d]);He(C,c)&&He(x,b)&&He(A,d)||(a={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:n},a.dispatch=l=Oh.bind(null,R,a),k.queue=a,k.baseQueue=null,n=Mh(e,b,c),k.memoizedState=k.baseState=n);return n}
-function Ph(a,b,c){var d=Ih();return Nh(d,a,b,c)}function Qh(a){var b=Hh();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Jh,lastRenderedState:a};a=a.dispatch=Oh.bind(null,R,a);return[b.memoizedState,a]}
-function Rh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=R.updateQueue;null===b?(b={lastEffect:null},R.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Sh(a){var b=Hh();a={current:a};return b.memoizedState=a}function Th(){return Ih().memoizedState}function Uh(a,b,c,d){var e=Hh();R.flags|=a;e.memoizedState=Rh(1|b,c,void 0,void 0===d?null:d)}
-function Vh(a,b,c,d){var e=Ih();d=void 0===d?null:d;var f=void 0;if(null!==S){var g=S.memoizedState;f=g.destroy;if(null!==d&&Bh(d,g.deps)){Rh(b,c,f,d);return}}R.flags|=a;e.memoizedState=Rh(1|b,c,f,d)}function Wh(a,b){return Uh(516,4,a,b)}function Xh(a,b){return Vh(516,4,a,b)}function Yh(a,b){return Vh(4,2,a,b)}function Zh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}
-function $h(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Vh(4,2,Zh.bind(null,b,a),c)}function ai(){}function bi(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function ci(a,b){var c=Ih();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Bh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}
-function di(a,b){var c=eg();gg(98>c?98:c,function(){a(!0)});gg(97<c?97:c,function(){var c=wh.transition;wh.transition=1;try{a(!1),b()}finally{wh.transition=c}})}
-function Oh(a,b,c){var d=Hg(),e=Ig(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);b.pending=f;g=a.alternate;if(a===R||null!==g&&g===R)zh=yh=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(He(k,h))return}catch(l){}finally{}Jg(a,e,d)}}
-var Gh={readContext:vg,useCallback:Ah,useContext:Ah,useEffect:Ah,useImperativeHandle:Ah,useLayoutEffect:Ah,useMemo:Ah,useReducer:Ah,useRef:Ah,useState:Ah,useDebugValue:Ah,useDeferredValue:Ah,useTransition:Ah,useMutableSource:Ah,useOpaqueIdentifier:Ah,unstable_isNewReconciler:!1},Dh={readContext:vg,useCallback:function(a,b){Hh().memoizedState=[a,void 0===b?null:b];return a},useContext:vg,useEffect:Wh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Uh(4,2,Zh.bind(null,
-b,a),c)},useLayoutEffect:function(a,b){return Uh(4,2,a,b)},useMemo:function(a,b){var c=Hh();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Hh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Oh.bind(null,R,a);return[d.memoizedState,a]},useRef:Sh,useState:Qh,useDebugValue:ai,useDeferredValue:function(a){var b=Qh(a),c=b[0],d=b[1];Wh(function(){var b=wh.transition;
-wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Qh(!1),b=a[0];a=di.bind(null,a[1]);Sh(a);return[a,b]},useMutableSource:function(a,b,c){var d=Hh();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Nh(d,a,b,c)},useOpaqueIdentifier:function(){if(lh){var a=!1,b=uf(function(){a||(a=!0,c("r:"+(tf++).toString(36)));throw Error(y(355));}),c=Qh(b)[1];0===(R.mode&2)&&(R.flags|=516,Rh(5,function(){c("r:"+(tf++).toString(36))},
-void 0,null));return b}b="r:"+(tf++).toString(36);Qh(b);return b},unstable_isNewReconciler:!1},Eh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Kh,useRef:Th,useState:function(){return Kh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Kh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Kh(Jh)[0];return[Th().current,
-a]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Kh(Jh)[0]},unstable_isNewReconciler:!1},Fh={readContext:vg,useCallback:bi,useContext:vg,useEffect:Xh,useImperativeHandle:$h,useLayoutEffect:Yh,useMemo:ci,useReducer:Lh,useRef:Th,useState:function(){return Lh(Jh)},useDebugValue:ai,useDeferredValue:function(a){var b=Lh(Jh),c=b[0],d=b[1];Xh(function(){var b=wh.transition;wh.transition=1;try{d(a)}finally{wh.transition=b}},[a]);return c},useTransition:function(){var a=Lh(Jh)[0];return[Th().current,
-a]},useMutableSource:Ph,useOpaqueIdentifier:function(){return Lh(Jh)[0]},unstable_isNewReconciler:!1},ei=ra.ReactCurrentOwner,ug=!1;function fi(a,b,c,d){b.child=null===a?Zg(b,null,c,d):Yg(b,a.child,c,d)}function gi(a,b,c,d,e){c=c.render;var f=b.ref;tg(b,e);d=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,d,e);return b.child}
-function ii(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!ji(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ki(a,b,g,d,e,f);a=Vg(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Je,c(e,d)&&a.ref===b.ref))return hi(a,b,f);b.flags|=1;a=Tg(g,d);a.ref=b.ref;a.return=b;return b.child=a}
-function ki(a,b,c,d,e,f){if(null!==a&&Je(a.memoizedProps,d)&&a.ref===b.ref)if(ug=!1,0!==(f&e))0!==(a.flags&16384)&&(ug=!0);else return b.lanes=a.lanes,hi(a,b,f);return li(a,b,c,d,f)}
-function mi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode||"unstable-defer-without-hiding"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},ni(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},ni(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},ni(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,ni(b,d);fi(a,b,e,c);return b.child}
-function oi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function li(a,b,c,d,e){var f=Ff(c)?Df:M.current;f=Ef(b,f);tg(b,e);c=Ch(a,b,c,d,f,e);if(null!==a&&!ug)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,hi(a,b,e);b.flags|=1;fi(a,b,c,e);return b.child}
-function pi(a,b,c,d,e){if(Ff(c)){var f=!0;Jf(b)}else f=!1;tg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),Mg(b,c,d),Og(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=vg(l):(l=Ff(c)?Df:M.current,l=Ef(b,l));var n=c.getDerivedStateFromProps,A="function"===typeof n||"function"===typeof g.getSnapshotBeforeUpdate;A||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
-"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Ng(b,g,d,l);wg=!1;var p=b.memoizedState;g.state=p;Cg(b,d,g,e);k=b.memoizedState;h!==d||p!==k||N.current||wg?("function"===typeof n&&(Gg(b,c,n,d),k=b.memoizedState),(h=wg||Lg(b,c,h,d,p,k,l))?(A||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===
-typeof g.componentDidMount&&(b.flags|=4)):("function"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;yg(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:lg(b.type,h);g.props=l;A=b.pendingProps;p=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=vg(k):(k=Ff(c)?Df:M.current,k=Ef(b,k));var C=c.getDerivedStateFromProps;(n="function"===typeof C||
-"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==A||p!==k)&&Ng(b,g,d,k);wg=!1;p=b.memoizedState;g.state=p;Cg(b,d,g,e);var x=b.memoizedState;h!==A||p!==x||N.current||wg?("function"===typeof C&&(Gg(b,c,C,d),x=b.memoizedState),(l=wg||Lg(b,c,l,d,p,x,k))?(n||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,
-x,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||
-h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),d=!1)}return qi(a,b,c,d,f,e)}
-function qi(a,b,c,d,e,f){oi(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Kf(b,c,!1),hi(a,b,f);d=b.stateNode;ei.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Yg(b,a.child,null,f),b.child=Yg(b,null,h,f)):fi(a,b,h,f);b.memoizedState=d.state;e&&Kf(b,c,!0);return b.child}function ri(a){var b=a.stateNode;b.pendingContext?Hf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Hf(a,b.context,!1);eh(a,b.containerInfo)}
-var si={dehydrated:null,retryLane:0};
-function ti(a,b,c){var d=b.pendingProps,e=P.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);I(P,e&1);if(null===a){void 0!==d.fallback&&ph(b);a=d.children;e=d.fallback;if(f)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=si,a;if("number"===typeof d.unstable_expectedLoadTime)return a=ui(b,a,e,c),b.child.memoizedState={baseLanes:c},
-b.memoizedState=si,b.lanes=33554432,a;c=vi({mode:"visible",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=wi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:
-{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=si,d;c=xi(a,b,d.children,c);b.memoizedState=null;return c}function ui(a,b,c,d){var e=a.mode,f=a.child;b={mode:"hidden",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b):f=vi(b,e,0,null);c=Xg(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}
-function xi(a,b,c,d){var e=a.child;a=e.sibling;c=Tg(e,{mode:"visible",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}
-function wi(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:"hidden",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Tg(g,h);null!==a?d=Tg(a,d):(d=Xg(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function yi(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);sg(a.return,b)}
-function zi(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}
-function Ai(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;fi(a,b,d.children,c);d=P.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&yi(a,c);else if(19===a.tag)yi(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(P,d);if(0===(b.mode&2))b.memoizedState=
-null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===ih(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);zi(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===ih(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}zi(b,!0,c,null,f,b.lastEffect);break;case "together":zi(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
-function hi(a,b,c){null!==a&&(b.dependencies=a.dependencies);Dg|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(y(153));if(null!==b.child){a=b.child;c=Tg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Tg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}var Bi,Ci,Di,Ei;
-Bi=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Ci=function(){};
-Di=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;dh(ah.current);var f=null;switch(c){case "input":e=Ya(a,e);d=Ya(a,d);f=[];break;case "option":e=eb(a,e);d=eb(a,d);f=[];break;case "select":e=m({},e,{value:void 0});d=m({},d,{value:void 0});f=[];break;case "textarea":e=gb(a,e);d=gb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=jf)}vb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===
-l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(ca.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||
-(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(ca.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&G("scroll",a),f||h===k||(f=[])):"object"===typeof k&&null!==k&&k.$$typeof===Ga?k.toString():(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",
-c);var l=f;if(b.updateQueue=l)b.flags|=4}};Ei=function(a,b,c,d){c!==d&&(b.flags|=4)};function Fi(a,b){if(!lh)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
-function Gi(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return Ff(b.type)&&Gf(),null;case 3:fh();H(N);H(M);uh();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)rh(b)?b.flags|=4:d.hydrate||(b.flags|=256);Ci(b);return null;case 5:hh(b);var e=dh(ch.current);c=b.type;if(null!==a&&null!=b.stateNode)Di(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===
-b.stateNode)throw Error(y(166));return null}a=dh(ah.current);if(rh(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[wf]=b;d[xf]=f;switch(c){case "dialog":G("cancel",d);G("close",d);break;case "iframe":case "object":case "embed":G("load",d);break;case "video":case "audio":for(a=0;a<Xe.length;a++)G(Xe[a],d);break;case "source":G("error",d);break;case "img":case "image":case "link":G("error",d);G("load",d);break;case "details":G("toggle",d);break;case "input":Za(d,f);G("invalid",d);break;case "select":d._wrapperState=
-{wasMultiple:!!f.multiple};G("invalid",d);break;case "textarea":hb(d,f),G("invalid",d)}vb(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],"children"===g?"string"===typeof e?d.textContent!==e&&(a=["children",e]):"number"===typeof e&&d.textContent!==""+e&&(a=["children",""+e]):ca.hasOwnProperty(g)&&null!=e&&"onScroll"===g&&G("scroll",d));switch(c){case "input":Va(d);cb(d,f,!0);break;case "textarea":Va(d);jb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=
-jf)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;a===kb.html&&(a=lb(c));a===kb.html?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[wf]=b;a[xf]=d;Bi(a,b,!1,!1);b.stateNode=a;g=wb(c,d);switch(c){case "dialog":G("cancel",a);G("close",a);
-e=d;break;case "iframe":case "object":case "embed":G("load",a);e=d;break;case "video":case "audio":for(e=0;e<Xe.length;e++)G(Xe[e],a);e=d;break;case "source":G("error",a);e=d;break;case "img":case "image":case "link":G("error",a);G("load",a);e=d;break;case "details":G("toggle",a);e=d;break;case "input":Za(a,d);e=Ya(a,d);G("invalid",a);break;case "option":e=eb(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=m({},d,{value:void 0});G("invalid",a);break;case "textarea":hb(a,d);e=
-gb(a,d);G("invalid",a);break;default:e=d}vb(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?tb(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&ob(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&pb(a,k):"number"===typeof k&&pb(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(ca.hasOwnProperty(f)?null!=k&&"onScroll"===f&&G("scroll",a):null!=k&&qa(a,f,k,g))}switch(c){case "input":Va(a);cb(a,d,!1);
-break;case "textarea":Va(a);jb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Sa(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?fb(a,!!d.multiple,f,!1):null!=d.defaultValue&&fb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=jf)}mf(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Ei(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(y(166));
-c=dh(ch.current);dh(ah.current);rh(b)?(d=b.stateNode,c=b.memoizedProps,d[wf]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[wf]=b,b.stateNode=d)}return null;case 13:H(P);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&rh(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(P.current&1))0===V&&(V=3);else{if(0===V||3===V)V=
-4;null===U||0===(Dg&134217727)&&0===(Hi&134217727)||Ii(U,W)}if(d||c)b.flags|=4;return null;case 4:return fh(),Ci(b),null===a&&cf(b.stateNode.containerInfo),null;case 10:return rg(b),null;case 17:return Ff(b.type)&&Gf(),null;case 19:H(P);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)Fi(d,!1);else{if(0!==V||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=ih(a);if(null!==g){b.flags|=64;Fi(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);
-null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,
-f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;I(P,P.current&1|2);return b.child}a=a.sibling}null!==d.tail&&O()>Ji&&(b.flags|=64,f=!0,Fi(d,!1),b.lanes=33554432)}else{if(!f)if(a=ih(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Fi(d,!0),null===d.tail&&"hidden"===d.tailMode&&!g.alternate&&!lh)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*O()-d.renderingStartTime>Ji&&1073741824!==c&&(b.flags|=
-64,f=!0,Fi(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=O(),c.sibling=null,b=P.current,I(P,f?b&1|2:b&1),c):null;case 23:case 24:return Ki(),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(y(156,b.tag));}
-function Li(a){switch(a.tag){case 1:Ff(a.type)&&Gf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,a):null;case 3:fh();H(N);H(M);uh();b=a.flags;if(0!==(b&64))throw Error(y(285));a.flags=b&-4097|64;return a;case 5:return hh(a),null;case 13:return H(P),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return H(P),null;case 4:return fh(),null;case 10:return rg(a),null;case 23:case 24:return Ki(),null;default:return null}}
-function Mi(a,b){try{var c="",d=b;do c+=Qa(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e}}function Ni(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Oi="function"===typeof WeakMap?WeakMap:Map;function Pi(a,b,c){c=zg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Qi||(Qi=!0,Ri=d);Ni(a,b)};return c}
-function Si(a,b,c){c=zg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ni(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===Ti?Ti=new Set([this]):Ti.add(this),Ni(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}var Ui="function"===typeof WeakSet?WeakSet:Set;
-function Vi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Wi(a,c)}else b.current=null}function Xi(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:lg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&qf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(y(163));}
-function Yi(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Zi(c,a),$i(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:lg(c.type,b.memoizedProps),a.componentDidUpdate(d,
-b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Eg(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Eg(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&mf(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Cc(c))));
-return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(y(163));}
-function aj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=sb("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===
-a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}
-function bj(a,b){if(Mf&&"function"===typeof Mf.onCommitFiberUnmount)try{Mf.onCommitFiberUnmount(Lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Zi(b,c);else{d=b;try{e()}catch(f){Wi(d,f)}}c=c.next}while(c!==a)}break;case 1:Vi(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Wi(b,
-f)}break;case 5:Vi(b);break;case 4:cj(a,b)}}function dj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function ej(a){return 5===a.tag||3===a.tag||4===a.tag}
-function fj(a){a:{for(var b=a.return;null!==b;){if(ej(b))break a;b=b.return}throw Error(y(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(y(161));}c.flags&16&&(pb(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||ej(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===
-c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?gj(a,c,b):hj(a,c,b)}
-function gj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=jf));else if(4!==d&&(a=a.child,null!==a))for(gj(a,b,c),a=a.sibling;null!==a;)gj(a,b,c),a=a.sibling}
-function hj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(hj(a,b,c),a=a.sibling;null!==a;)hj(a,b,c),a=a.sibling}
-function cj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(y(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(bj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,
-8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(bj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}
-function ij(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[xf]=d;"input"===a&&"radio"===d.type&&null!=d.name&&$a(c,d);wb(a,e);b=wb(a,d);for(e=0;e<f.length;e+=
-2){var g=f[e],h=f[e+1];"style"===g?tb(c,h):"dangerouslySetInnerHTML"===g?ob(c,h):"children"===g?pb(c,h):qa(c,g,h,b)}switch(a){case "input":ab(c,d);break;case "textarea":ib(c,d);break;case "select":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?fb(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?fb(c,!!d.multiple,d.defaultValue,!0):fb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(y(162));b.stateNode.nodeValue=
-b.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,Cc(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(jj=O(),aj(b.child,!0));kj(b);return;case 19:kj(b);return;case 17:return;case 23:case 24:aj(b,null!==b.memoizedState);return}throw Error(y(163));}function kj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ui);b.forEach(function(b){var d=lj.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}
-function mj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}var nj=Math.ceil,oj=ra.ReactCurrentDispatcher,pj=ra.ReactCurrentOwner,X=0,U=null,Y=null,W=0,qj=0,rj=Bf(0),V=0,sj=null,tj=0,Dg=0,Hi=0,uj=0,vj=null,jj=0,Ji=Infinity;function wj(){Ji=O()+500}var Z=null,Qi=!1,Ri=null,Ti=null,xj=!1,yj=null,zj=90,Aj=[],Bj=[],Cj=null,Dj=0,Ej=null,Fj=-1,Gj=0,Hj=0,Ij=null,Jj=!1;function Hg(){return 0!==(X&48)?O():-1!==Fj?Fj:Fj=O()}
-function Ig(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===eg()?1:2;0===Gj&&(Gj=tj);if(0!==kg.transition){0!==Hj&&(Hj=null!==vj?vj.pendingLanes:0);a=Gj;var b=4186112&~Hj;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=eg();0!==(X&4)&&98===a?a=Xc(12,Gj):(a=Sc(a),a=Xc(a,Gj));return a}
-function Jg(a,b,c){if(50<Dj)throw Dj=0,Ej=null,Error(y(185));a=Kj(a,b);if(null===a)return null;$c(a,b,c);a===U&&(Hi|=b,4===V&&Ii(a,W));var d=eg();1===b?0!==(X&8)&&0===(X&48)?Lj(a):(Mj(a,c),0===X&&(wj(),ig())):(0===(X&4)||98!==d&&99!==d||(null===Cj?Cj=new Set([a]):Cj.add(a)),Mj(a,c));vj=a}function Kj(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}
-function Mj(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Vc(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;Rc(k);var n=F;f[h]=10<=n?l+250:6<=n?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Uc(a,a===U?W:0);b=F;if(0===d)null!==c&&(c!==Zf&&Pf(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==Zf&&Pf(c)}15===b?(c=Lj.bind(null,a),null===ag?(ag=[c],bg=Of(Uf,jg)):ag.push(c),
-c=Zf):14===b?c=hg(99,Lj.bind(null,a)):(c=Tc(b),c=hg(c,Nj.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}
-function Nj(a){Fj=-1;Hj=Gj=0;if(0!==(X&48))throw Error(y(327));var b=a.callbackNode;if(Oj()&&a.callbackNode!==b)return null;var c=Uc(a,a===U?W:0);if(0===c)return null;var d=c;var e=X;X|=16;var f=Pj();if(U!==a||W!==d)wj(),Qj(a,d);do try{Rj();break}catch(h){Sj(a,h)}while(1);qg();oj.current=f;X=e;null!==Y?d=0:(U=null,W=0,d=V);if(0!==(tj&Hi))Qj(a,0);else if(0!==d){2===d&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),c=Wc(a),0!==c&&(d=Tj(a,c)));if(1===d)throw b=sj,Qj(a,0),Ii(a,c),Mj(a,O()),b;a.finishedWork=
-a.current.alternate;a.finishedLanes=c;switch(d){case 0:case 1:throw Error(y(345));case 2:Uj(a);break;case 3:Ii(a,c);if((c&62914560)===c&&(d=jj+500-O(),10<d)){if(0!==Uc(a,0))break;e=a.suspendedLanes;if((e&c)!==c){Hg();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=of(Uj.bind(null,a),d);break}Uj(a);break;case 4:Ii(a,c);if((c&4186112)===c)break;d=a.eventTimes;for(e=-1;0<c;){var g=31-Vc(c);f=1<<g;g=d[g];g>e&&(e=g);c&=~f}c=e;c=O()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>
-c?4320:1960*nj(c/1960))-c;if(10<c){a.timeoutHandle=of(Uj.bind(null,a),c);break}Uj(a);break;case 5:Uj(a);break;default:throw Error(y(329));}}Mj(a,O());return a.callbackNode===b?Nj.bind(null,a):null}function Ii(a,b){b&=~uj;b&=~Hi;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Vc(b),d=1<<c;a[c]=-1;b&=~d}}
-function Lj(a){if(0!==(X&48))throw Error(y(327));Oj();if(a===U&&0!==(a.expiredLanes&W)){var b=W;var c=Tj(a,b);0!==(tj&Hi)&&(b=Uc(a,b),c=Tj(a,b))}else b=Uc(a,0),c=Tj(a,b);0!==a.tag&&2===c&&(X|=64,a.hydrate&&(a.hydrate=!1,qf(a.containerInfo)),b=Wc(a),0!==b&&(c=Tj(a,b)));if(1===c)throw c=sj,Qj(a,0),Ii(a,b),Mj(a,O()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;Uj(a);Mj(a,O());return null}
-function Vj(){if(null!==Cj){var a=Cj;Cj=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;Mj(a,O())})}ig()}function Wj(a,b){var c=X;X|=1;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function Xj(a,b){var c=X;X&=-2;X|=8;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}}function ni(a,b){I(rj,qj);qj|=b;tj|=b}function Ki(){qj=rj.current;H(rj)}
-function Qj(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,pf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Gf();break;case 3:fh();H(N);H(M);uh();break;case 5:hh(d);break;case 4:fh();break;case 13:H(P);break;case 19:H(P);break;case 10:rg(d);break;case 23:case 24:Ki()}c=c.return}U=a;Y=Tg(a.current,null);W=qj=tj=b;V=0;sj=null;uj=Hi=Dg=0}
-function Sj(a,b){do{var c=Y;try{qg();vh.current=Gh;if(yh){for(var d=R.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}yh=!1}xh=0;T=S=R=null;zh=!1;pj.current=null;if(null===c||null===c.return){V=1;sj=b;Y=null;break}a:{var f=a,g=c.return,h=c,k=b;b=W;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k;if(0===(h.mode&2)){var n=h.alternate;n?(h.updateQueue=n.updateQueue,h.memoizedState=n.memoizedState,h.lanes=n.lanes):
-(h.updateQueue=null,h.memoizedState=null)}var A=0!==(P.current&1),p=g;do{var C;if(C=13===p.tag){var x=p.memoizedState;if(null!==x)C=null!==x.dehydrated?!0:!1;else{var w=p.memoizedProps;C=void 0===w.fallback?!1:!0!==w.unstable_avoidThisFallback?!0:A?!1:!0}}if(C){var z=p.updateQueue;if(null===z){var u=new Set;u.add(l);p.updateQueue=u}else z.add(l);if(0===(p.mode&2)){p.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var t=zg(-1,1);t.tag=2;Ag(h,t)}h.lanes|=1;break a}k=
-void 0;h=b;var q=f.pingCache;null===q?(q=f.pingCache=new Oi,k=new Set,q.set(l,k)):(k=q.get(l),void 0===k&&(k=new Set,q.set(l,k)));if(!k.has(h)){k.add(h);var v=Yj.bind(null,f,l,h);l.then(v,v)}p.flags|=4096;p.lanes=b;break a}p=p.return}while(null!==p);k=Error((Ra(h.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==V&&(V=2);k=Mi(k,h);p=
-g;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var J=Pi(p,f,b);Bg(p,J);break a;case 1:f=k;var K=p.type,Q=p.stateNode;if(0===(p.flags&64)&&("function"===typeof K.getDerivedStateFromError||null!==Q&&"function"===typeof Q.componentDidCatch&&(null===Ti||!Ti.has(Q)))){p.flags|=4096;b&=-b;p.lanes|=b;var L=Si(p,f,b);Bg(p,L);break a}}p=p.return}while(null!==p)}Zj(c)}catch(va){b=va;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}
-function Pj(){var a=oj.current;oj.current=Gh;return null===a?Gh:a}function Tj(a,b){var c=X;X|=16;var d=Pj();U===a&&W===b||Qj(a,b);do try{ak();break}catch(e){Sj(a,e)}while(1);qg();X=c;oj.current=d;if(null!==Y)throw Error(y(261));U=null;W=0;return V}function ak(){for(;null!==Y;)bk(Y)}function Rj(){for(;null!==Y&&!Qf();)bk(Y)}function bk(a){var b=ck(a.alternate,a,qj);a.memoizedProps=a.pendingProps;null===b?Zj(a):Y=b;pj.current=null}
-function Zj(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=Gi(c,b,qj);if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(qj&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==
-a.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=Li(b);if(null!==c){c.flags&=2047;Y=c;return}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===V&&(V=5)}function Uj(a){var b=eg();gg(99,dk.bind(null,a,b));return null}
-function dk(a,b){do Oj();while(null!==yj);if(0!==(X&48))throw Error(y(327));var c=a.finishedWork;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(y(177));a.callbackNode=null;var d=c.lanes|c.childLanes,e=d,f=a.pendingLanes&~e;a.pendingLanes=e;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=e;a.mutableReadLanes&=e;a.entangledLanes&=e;e=a.entanglements;for(var g=a.eventTimes,h=a.expirationTimes;0<f;){var k=31-Vc(f),l=1<<k;e[k]=0;g[k]=-1;h[k]=-1;f&=~l}null!==
-Cj&&0===(d&24)&&Cj.has(a)&&Cj.delete(a);a===U&&(Y=U=null,W=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,d=c.firstEffect):d=c:d=c.firstEffect;if(null!==d){e=X;X|=32;pj.current=null;kf=fd;g=Ne();if(Oe(g)){if("selectionStart"in g)h={start:g.selectionStart,end:g.selectionEnd};else a:if(h=(h=g.ownerDocument)&&h.defaultView||window,(l=h.getSelection&&h.getSelection())&&0!==l.rangeCount){h=l.anchorNode;f=l.anchorOffset;k=l.focusNode;l=l.focusOffset;try{h.nodeType,k.nodeType}catch(va){h=null;
-break a}var n=0,A=-1,p=-1,C=0,x=0,w=g,z=null;b:for(;;){for(var u;;){w!==h||0!==f&&3!==w.nodeType||(A=n+f);w!==k||0!==l&&3!==w.nodeType||(p=n+l);3===w.nodeType&&(n+=w.nodeValue.length);if(null===(u=w.firstChild))break;z=w;w=u}for(;;){if(w===g)break b;z===h&&++C===f&&(A=n);z===k&&++x===l&&(p=n);if(null!==(u=w.nextSibling))break;w=z;z=w.parentNode}w=u}h=-1===A||-1===p?null:{start:A,end:p}}else h=null;h=h||{start:0,end:0}}else h=null;lf={focusedElem:g,selectionRange:h};fd=!1;Ij=null;Jj=!1;Z=d;do try{ek()}catch(va){if(null===
-Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Ij=null;Z=d;do try{for(g=a;null!==Z;){var t=Z.flags;t&16&&pb(Z.stateNode,"");if(t&128){var q=Z.alternate;if(null!==q){var v=q.ref;null!==v&&("function"===typeof v?v(null):v.current=null)}}switch(t&1038){case 2:fj(Z);Z.flags&=-3;break;case 6:fj(Z);Z.flags&=-3;ij(Z.alternate,Z);break;case 1024:Z.flags&=-1025;break;case 1028:Z.flags&=-1025;ij(Z.alternate,Z);break;case 4:ij(Z.alternate,Z);break;case 8:h=Z;cj(g,h);var J=h.alternate;dj(h);null!==
-J&&dj(J)}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);v=lf;q=Ne();t=v.focusedElem;g=v.selectionRange;if(q!==t&&t&&t.ownerDocument&&Me(t.ownerDocument.documentElement,t)){null!==g&&Oe(t)&&(q=g.start,v=g.end,void 0===v&&(v=q),"selectionStart"in t?(t.selectionStart=q,t.selectionEnd=Math.min(v,t.value.length)):(v=(q=t.ownerDocument||document)&&q.defaultView||window,v.getSelection&&(v=v.getSelection(),h=t.textContent.length,J=Math.min(g.start,h),g=void 0===
-g.end?J:Math.min(g.end,h),!v.extend&&J>g&&(h=g,g=J,J=h),h=Le(t,J),f=Le(t,g),h&&f&&(1!==v.rangeCount||v.anchorNode!==h.node||v.anchorOffset!==h.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),v.removeAllRanges(),J>g?(v.addRange(q),v.extend(f.node,f.offset)):(q.setEnd(f.node,f.offset),v.addRange(q))))));q=[];for(v=t;v=v.parentNode;)1===v.nodeType&&q.push({element:v,left:v.scrollLeft,top:v.scrollTop});"function"===typeof t.focus&&t.focus();for(t=
-0;t<q.length;t++)v=q[t],v.element.scrollLeft=v.left,v.element.scrollTop=v.top}fd=!!kf;lf=kf=null;a.current=c;Z=d;do try{for(t=a;null!==Z;){var K=Z.flags;K&36&&Yi(t,Z.alternate,Z);if(K&128){q=void 0;var Q=Z.ref;if(null!==Q){var L=Z.stateNode;switch(Z.tag){case 5:q=L;break;default:q=L}"function"===typeof Q?Q(q):Q.current=q}}Z=Z.nextEffect}}catch(va){if(null===Z)throw Error(y(330));Wi(Z,va);Z=Z.nextEffect}while(null!==Z);Z=null;$f();X=e}else a.current=c;if(xj)xj=!1,yj=a,zj=b;else for(Z=d;null!==Z;)b=
-Z.nextEffect,Z.nextEffect=null,Z.flags&8&&(K=Z,K.sibling=null,K.stateNode=null),Z=b;d=a.pendingLanes;0===d&&(Ti=null);1===d?a===Ej?Dj++:(Dj=0,Ej=a):Dj=0;c=c.stateNode;if(Mf&&"function"===typeof Mf.onCommitFiberRoot)try{Mf.onCommitFiberRoot(Lf,c,void 0,64===(c.current.flags&64))}catch(va){}Mj(a,O());if(Qi)throw Qi=!1,a=Ri,Ri=null,a;if(0!==(X&8))return null;ig();return null}
-function ek(){for(;null!==Z;){var a=Z.alternate;Jj||null===Ij||(0!==(Z.flags&8)?dc(Z,Ij)&&(Jj=!0):13===Z.tag&&mj(a,Z)&&dc(Z,Ij)&&(Jj=!0));var b=Z.flags;0!==(b&256)&&Xi(a,Z);0===(b&512)||xj||(xj=!0,hg(97,function(){Oj();return null}));Z=Z.nextEffect}}function Oj(){if(90!==zj){var a=97<zj?97:zj;zj=90;return gg(a,fk)}return!1}function $i(a,b){Aj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}function Zi(a,b){Bj.push(b,a);xj||(xj=!0,hg(97,function(){Oj();return null}))}
-function fk(){if(null===yj)return!1;var a=yj;yj=null;if(0!==(X&48))throw Error(y(331));var b=X;X|=32;var c=Bj;Bj=[];for(var d=0;d<c.length;d+=2){var e=c[d],f=c[d+1],g=e.destroy;e.destroy=void 0;if("function"===typeof g)try{g()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}c=Aj;Aj=[];for(d=0;d<c.length;d+=2){e=c[d];f=c[d+1];try{var h=e.create;e.destroy=h()}catch(k){if(null===f)throw Error(y(330));Wi(f,k)}}for(h=a.current.firstEffect;null!==h;)a=h.nextEffect,h.nextEffect=null,h.flags&8&&(h.sibling=
-null,h.stateNode=null),h=a;X=b;ig();return!0}function gk(a,b,c){b=Mi(c,b);b=Pi(a,b,1);Ag(a,b);b=Hg();a=Kj(a,1);null!==a&&($c(a,1,b),Mj(a,b))}
-function Wi(a,b){if(3===a.tag)gk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){gk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d))){a=Mi(b,a);var e=Si(c,a,1);Ag(c,e);e=Hg();c=Kj(c,1);if(null!==c)$c(c,1,e),Mj(c,e);else if("function"===typeof d.componentDidCatch&&(null===Ti||!Ti.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}
-function Yj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Hg();a.pingedLanes|=a.suspendedLanes&c;U===a&&(W&c)===c&&(4===V||3===V&&(W&62914560)===W&&500>O()-jj?Qj(a,0):uj|=c);Mj(a,b)}function lj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===eg()?1:2:(0===Gj&&(Gj=tj),b=Yc(62914560&~Gj),0===b&&(b=4194304)));c=Hg();a=Kj(a,b);null!==a&&($c(a,b,c),Mj(a,c))}var ck;
-ck=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||N.current)ug=!0;else if(0!==(c&d))ug=0!==(a.flags&16384)?!0:!1;else{ug=!1;switch(b.tag){case 3:ri(b);sh();break;case 5:gh(b);break;case 1:Ff(b.type)&&Jf(b);break;case 4:eh(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;I(mg,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return ti(a,b,c);I(P,P.current&1);b=hi(a,b,c);return null!==
-b?b.sibling:null}I(P,P.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ai(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);I(P,P.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,mi(a,b,c)}return hi(a,b,c)}else ug=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Ef(b,M.current);tg(b,c);e=Ch(null,b,d,a,e,c);b.flags|=1;if("object"===
-typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(Ff(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;xg(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Gg(b,d,g,a);e.updater=Kg;b.stateNode=e;e._reactInternals=b;Og(b,d,a,c);b=qi(null,b,d,!0,f,c)}else b.tag=0,fi(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);
-a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=hk(e);a=lg(e,a);switch(f){case 0:b=li(null,b,e,a,c);break a;case 1:b=pi(null,b,e,a,c);break a;case 11:b=gi(null,b,e,a,c);break a;case 14:b=ii(null,b,e,lg(e.type,a),d,c);break a}throw Error(y(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),li(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),pi(a,b,d,e,c);case 3:ri(b);d=b.updateQueue;if(null===a||null===d)throw Error(y(282));
-d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;yg(a,b);Cg(b,d,null,c);d=b.memoizedState.element;if(d===e)sh(),b=hi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)kh=rf(b.stateNode.containerInfo.firstChild),jh=b,f=lh=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],th.push(f);c=Zg(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else fi(a,b,d,c),sh();b=b.child}return b;case 5:return gh(b),null===a&&
-ph(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,nf(d,e)?g=null:null!==f&&nf(d,f)&&(b.flags|=16),oi(a,b),fi(a,b,g,c),b.child;case 6:return null===a&&ph(b),null;case 13:return ti(a,b,c);case 4:return eh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Yg(b,null,d,c):fi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),gi(a,b,d,e,c);case 7:return fi(a,b,b.pendingProps,c),b.child;case 8:return fi(a,b,b.pendingProps.children,
-c),b.child;case 12:return fi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;I(mg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=He(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!N.current){b=hi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=
-k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=zg(-1,c&-c),l.tag=2,Ag(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);sg(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}fi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,tg(b,c),e=vg(e,
-f.unstable_observedBits),d=d(e),b.flags|=1,fi(a,b,d,c),b.child;case 14:return e=b.type,f=lg(e,b.pendingProps),f=lg(e.type,f),ii(a,b,e,f,d,c);case 15:return ki(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:lg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),b.tag=1,Ff(d)?(a=!0,Jf(b)):a=!1,tg(b,c),Mg(b,d,e),Og(b,d,e,c),qi(null,b,d,!0,a,c);case 19:return Ai(a,b,c);case 23:return mi(a,b,c);case 24:return mi(a,b,c)}throw Error(y(156,b.tag));
-};function ik(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null}function nh(a,b,c,d){return new ik(a,b,c,d)}function ji(a){a=a.prototype;return!(!a||!a.isReactComponent)}
-function hk(a){if("function"===typeof a)return ji(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Aa)return 11;if(a===Da)return 14}return 2}
-function Tg(a,b){var c=a.alternate;null===c?(c=nh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};
-c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}
-function Vg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)ji(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ua:return Xg(c.children,e,f,b);case Ha:g=8;e|=16;break;case wa:g=8;e|=1;break;case xa:return a=nh(12,c,b,e|8),a.elementType=xa,a.type=xa,a.lanes=f,a;case Ba:return a=nh(13,c,b,e),a.type=Ba,a.elementType=Ba,a.lanes=f,a;case Ca:return a=nh(19,c,b,e),a.elementType=Ca,a.lanes=f,a;case Ia:return vi(c,e,f,b);case Ja:return a=nh(24,c,b,e),a.elementType=Ja,a.lanes=f,a;default:if("object"===
-typeof a&&null!==a)switch(a.$$typeof){case ya:g=10;break a;case za:g=9;break a;case Aa:g=11;break a;case Da:g=14;break a;case Ea:g=16;d=null;break a;case Fa:g=22;break a}throw Error(y(130,null==a?a:typeof a,""));}b=nh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Xg(a,b,c,d){a=nh(7,a,d,b);a.lanes=c;return a}function vi(a,b,c,d){a=nh(23,a,d,b);a.elementType=Ia;a.lanes=c;return a}function Ug(a,b,c){a=nh(6,a,null,b);a.lanes=c;return a}
-function Wg(a,b,c){b=nh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
-function jk(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=Zc(0);this.expirationTimes=Zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Zc(0);this.mutableSourceEagerHydrationData=null}
-function kk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ta,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
-function lk(a,b,c,d){var e=b.current,f=Hg(),g=Ig(e);a:if(c){c=c._reactInternals;b:{if(Zb(c)!==c||1!==c.tag)throw Error(y(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(Ff(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(y(171));}if(1===c.tag){var k=c.type;if(Ff(k)){c=If(c,k,h);break a}}c=h}else c=Cf;null===b.context?b.context=c:b.pendingContext=c;b=zg(f,g);b.payload={element:a};d=void 0===d?null:d;null!==
-d&&(b.callback=d);Ag(e,b);Jg(e,g,f);return g}function mk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function nk(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function ok(a,b){nk(a,b);(a=a.alternate)&&nk(a,b)}function pk(){return null}
-function qk(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new jk(a,b,null!=c&&!0===c.hydrate);b=nh(3,null,null,2===b?7:1===b?3:0);c.current=b;b.stateNode=c;xg(b);a[ff]=c.current;cf(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}
-qk.prototype.render=function(a){lk(a,this._internalRoot,null,null)};qk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;lk(null,a,null,function(){b[ff]=null})};function rk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}
-function sk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new qk(a,0,b?{hydrate:!0}:void 0)}
-function tk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=mk(g);h.call(a)}}lk(b,g,a,e)}else{f=c._reactRootContainer=sk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=mk(g);k.call(a)}}Xj(function(){lk(b,g,a,e)})}return mk(g)}ec=function(a){if(13===a.tag){var b=Hg();Jg(a,4,b);ok(a,4)}};fc=function(a){if(13===a.tag){var b=Hg();Jg(a,67108864,b);ok(a,67108864)}};
-gc=function(a){if(13===a.tag){var b=Hg(),c=Ig(a);Jg(a,c,b);ok(a,c)}};hc=function(a,b){return b()};
-yb=function(a,b,c){switch(b){case "input":ab(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Db(d);if(!e)throw Error(y(90));Wa(d);ab(d,e)}}}break;case "textarea":ib(a,c);break;case "select":b=c.value,null!=b&&fb(a,!!c.multiple,b,!1)}};Gb=Wj;
-Hb=function(a,b,c,d,e){var f=X;X|=4;try{return gg(98,a.bind(null,b,c,d,e))}finally{X=f,0===X&&(wj(),ig())}};Ib=function(){0===(X&49)&&(Vj(),Oj())};Jb=function(a,b){var c=X;X|=2;try{return a(b)}finally{X=c,0===X&&(wj(),ig())}};function uk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!rk(b))throw Error(y(200));return kk(a,b,null,c)}var vk={Events:[Cb,ue,Db,Eb,Fb,Oj,{current:!1}]},wk={findFiberByHostInstance:wc,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"};
-var xk={bundleType:wk.bundleType,version:wk.version,rendererPackageName:wk.rendererPackageName,rendererConfig:wk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:ra.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=cc(a);return null===a?null:a.stateNode},findFiberByHostInstance:wk.findFiberByHostInstance||
-pk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var yk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yk.isDisabled&&yk.supportsFiber)try{Lf=yk.inject(xk),Mf=yk}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;exports.createPortal=uk;
-exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(y(188));throw Error(y(268,Object.keys(a)));}a=cc(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a,b){var c=X;if(0!==(c&48))return a(b);X|=1;try{if(a)return gg(99,a.bind(null,b))}finally{X=c,ig()}};exports.hydrate=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!0,c)};
-exports.render=function(a,b,c){if(!rk(b))throw Error(y(200));return tk(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!rk(a))throw Error(y(40));return a._reactRootContainer?(Xj(function(){tk(null,null,a,!1,function(){a._reactRootContainer=null;a[ff]=null})}),!0):!1};exports.unstable_batchedUpdates=Wj;exports.unstable_createPortal=function(a,b){return uk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
-exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!rk(c))throw Error(y(200));if(null==a||void 0===a._reactInternals)throw Error(y(38));return tk(a,b,c,!1,d)};exports.version="17.0.2";
diff --git a/node_modules/react-dom/cjs/react-dom.profiling.min.js b/node_modules/react-dom/cjs/react-dom.profiling.min.js
deleted file mode 100644
index 2c017a2..0000000
--- a/node_modules/react-dom/cjs/react-dom.profiling.min.js
+++ /dev/null
@@ -1,310 +0,0 @@
-/** @license React v17.0.2
- * react-dom.profiling.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-/*
- Modernizr 3.0.0pre (Custom Build) | MIT
-*/
-'use strict';var aa=require("react"),n=require("object-assign"),r=require("scheduler"),x=require("scheduler/tracing");function E(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(E(227));var ba=new Set,ca={};
-function da(a,b){ea(a,b);ea(a+"Capture",b)}function ea(a,b){ca[a]=b;for(a=0;a<b.length;a++)ba.add(b[a])}
-var fa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),ha=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ia=Object.prototype.hasOwnProperty,
-ja={},ka={};function la(a){if(ia.call(ka,a))return!0;if(ia.call(ja,a))return!1;if(ha.test(a))return ka[a]=!0;ja[a]=!0;return!1}function ma(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
-function na(a,b,c,d){if(null===b||"undefined"===typeof b||ma(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function F(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var G={};
-"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){G[a]=new F(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];G[b]=new F(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){G[a]=new F(a,2,!1,a.toLowerCase(),null,!1,!1)});
-["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){G[a]=new F(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){G[a]=new F(a,3,!1,a.toLowerCase(),null,!1,!1)});
-["checked","multiple","muted","selected"].forEach(function(a){G[a]=new F(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){G[a]=new F(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){G[a]=new F(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){G[a]=new F(a,5,!1,a.toLowerCase(),null,!1,!1)});var pa=/[\-:]([a-z])/g;function qa(a){return a[1].toUpperCase()}
-"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".split(" ").forEach(function(a){var b=a.replace(pa,
-qa);G[b]=new F(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(pa,qa);G[b]=new F(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(pa,qa);G[b]=new F(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){G[a]=new F(a,1,!1,a.toLowerCase(),null,!1,!1)});
-G.xlinkHref=new F("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){G[a]=new F(a,1,!1,a.toLowerCase(),null,!0,!0)});
-function ra(a,b,c,d){var e=G.hasOwnProperty(b)?G[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(na(b,c,e,d)&&(c=null),d||null===e?la(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
-var sa=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ta=60103,ua=60106,va=60107,wa=60108,ya=60114,za=60109,Aa=60110,Ba=60112,Ca=60113,Da=60120,Ea=60115,Fa=60116,Ga=60121,Ha=60128,Ia=60129,Ja=60130,Ka=60131;
-if("function"===typeof Symbol&&Symbol.for){var H=Symbol.for;ta=H("react.element");ua=H("react.portal");va=H("react.fragment");wa=H("react.strict_mode");ya=H("react.profiler");za=H("react.provider");Aa=H("react.context");Ba=H("react.forward_ref");Ca=H("react.suspense");Da=H("react.suspense_list");Ea=H("react.memo");Fa=H("react.lazy");Ga=H("react.block");H("react.scope");Ha=H("react.opaque.id");Ia=H("react.debug_trace_mode");Ja=H("react.offscreen");Ka=H("react.legacy_hidden")}
-var La="function"===typeof Symbol&&Symbol.iterator;function Ma(a){if(null===a||"object"!==typeof a)return null;a=La&&a[La]||a["@@iterator"];return"function"===typeof a?a:null}var Na;function Oa(a){if(void 0===Na)try{throw Error();}catch(c){var b=c.stack.trim().match(/\n( *(at )?)/);Na=b&&b[1]||""}return"\n"+Na+a}var Pa=!1;
-function Qa(a,b){if(!a||Pa)return"";Pa=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();}catch(k){d=k}a()}}catch(k){if(k&&d&&"string"===typeof k.stack){for(var e=k.stack.split("\n"),
-f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return"\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Pa=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Oa(a):""}
-function Ra(a){switch(a.tag){case 5:return Oa(a.type);case 16:return Oa("Lazy");case 13:return Oa("Suspense");case 19:return Oa("SuspenseList");case 0:case 2:case 15:return a=Qa(a.type,!1),a;case 11:return a=Qa(a.type.render,!1),a;case 22:return a=Qa(a.type._render,!1),a;case 1:return a=Qa(a.type,!0),a;default:return""}}
-function Sa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case va:return"Fragment";case ua:return"Portal";case ya:return"Profiler";case wa:return"StrictMode";case Ca:return"Suspense";case Da:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Aa:return(a.displayName||"Context")+".Consumer";case za:return(a._context.displayName||"Context")+".Provider";case Ba:var b=a.render;b=b.displayName||b.name||"";
-return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Ea:return Sa(a.type);case Ga:return Sa(a._render);case Fa:b=a._payload;a=a._init;try{return Sa(a(b))}catch(c){}}return null}function Ta(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}function Ua(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
-function Va(a){var b=Ua(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
-null;delete a[b]}}}}function Wa(a){a._valueTracker||(a._valueTracker=Va(a))}function Xa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ua(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Ya(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}
-function Za(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function $a(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Ta(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ra(a,"checked",b,!1)}
-function bb(a,b){ab(a,b);var c=Ta(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Ta(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
-function db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
-function cb(a,b,c){if("number"!==b||Ya(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function eb(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function fb(a,b){a=n({children:void 0},b);if(b=eb(b.children))a.children=b;return a}
-function gb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+Ta(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
-function hb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(E(91));return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function jb(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(E(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(E(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Ta(c)}}
-function kb(a,b){var c=Ta(b.value),d=Ta(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function lb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var mb={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
-function nb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ob(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?nb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
-var pb,qb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==mb.svg||"innerHTML"in a)a.innerHTML=b;else{pb=pb||document.createElement("div");pb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=pb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
-function rb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}
-var sb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
-floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tb=["Webkit","ms","Moz","O"];Object.keys(sb).forEach(function(a){tb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);sb[b]=sb[a]})});function ub(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||sb.hasOwnProperty(a)&&sb[a]?(""+b).trim():b+"px"}
-function vb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=ub(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var wb=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
-function xb(a,b){if(b){if(wb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(E(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(E(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(E(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(E(62));}}
-function yb(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function zb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var Ab=null,Bb=null,Cb=null;
-function Db(a){if(a=Eb(a)){if("function"!==typeof Ab)throw Error(E(280));var b=a.stateNode;b&&(b=Fb(b),Ab(a.stateNode,a.type,b))}}function Gb(a){Bb?Cb?Cb.push(a):Cb=[a]:Bb=a}function Hb(){if(Bb){var a=Bb,b=Cb;Cb=Bb=null;Db(a);if(b)for(a=0;a<b.length;a++)Db(b[a])}}function Ib(a,b){return a(b)}function Jb(a,b,c,d,e){return a(b,c,d,e)}function Kb(){}var Lb=Ib,Mb=!1,Nb=!1;function Ob(){if(null!==Bb||null!==Cb)Kb(),Hb()}
-function Pb(a,b,c){if(Nb)return a(b,c);Nb=!0;try{return Lb(a,b,c)}finally{Nb=!1,Ob()}}
-function Qb(a,b){var c=a.stateNode;if(null===c)return null;var d=Fb(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==
-typeof c)throw Error(E(231,b,typeof c));return c}var Rb=!1;if(fa)try{var Sb={};Object.defineProperty(Sb,"passive",{get:function(){Rb=!0}});window.addEventListener("test",Sb,Sb);window.removeEventListener("test",Sb,Sb)}catch(a){Rb=!1}function Tb(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(p){this.onError(p)}}var Ub=!1,Vb=null,Wb=!1,Xb=null,Yb={onError:function(a){Ub=!0;Vb=a}};function Zb(a,b,c,d,e,f,g,h,k){Ub=!1;Vb=null;Tb.apply(Yb,arguments)}
-function $b(a,b,c,d,e,f,g,h,k){Zb.apply(this,arguments);if(Ub){if(Ub){var l=Vb;Ub=!1;Vb=null}else throw Error(E(198));Wb||(Wb=!0,Xb=l)}}function ac(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function bc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function cc(a){if(ac(a)!==a)throw Error(E(188));}
-function dc(a){var b=a.alternate;if(!b){b=ac(a);if(null===b)throw Error(E(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return cc(e),a;if(f===d)return cc(e),b;f=f.sibling}throw Error(E(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
-c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(E(189));}}if(c.alternate!==d)throw Error(E(190));}if(3!==c.tag)throw Error(E(188));return c.stateNode.current===c?a:b}function ec(a){a=dc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
-function fc(a,b){for(var c=a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}var gc,hc,ic,jc,kc=!1,lc=[],mc=null,nc=null,oc=null,pc=new Map,qc=new Map,rc=[],sc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
-function tc(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function uc(a,b){switch(a){case "focusin":case "focusout":mc=null;break;case "dragenter":case "dragleave":nc=null;break;case "mouseover":case "mouseout":oc=null;break;case "pointerover":case "pointerout":pc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":qc.delete(b.pointerId)}}
-function vc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=tc(b,c,d,e,f),null!==b&&(b=Eb(b),null!==b&&hc(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}
-function wc(a,b,c,d,e){switch(b){case "focusin":return mc=vc(mc,a,b,c,d,e),!0;case "dragenter":return nc=vc(nc,a,b,c,d,e),!0;case "mouseover":return oc=vc(oc,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;pc.set(f,vc(pc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,qc.set(f,vc(qc.get(f)||null,a,b,c,d,e)),!0}return!1}
-function xc(a){var b=yc(a.target);if(null!==b){var c=ac(b);if(null!==c)if(b=c.tag,13===b){if(b=bc(c),null!==b){a.blockedOn=b;jc(a.lanePriority,function(){r.unstable_runWithPriority(a.priority,function(){ic(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}
-function zc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=Ac(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c)return b=Eb(c),null!==b&&hc(b),a.blockedOn=c,!1;b.shift()}return!0}function Bc(a,b,c){zc(a)&&c.delete(b)}
-function Cc(){for(kc=!1;0<lc.length;){var a=lc[0];if(null!==a.blockedOn){a=Eb(a.blockedOn);null!==a&&gc(a);break}for(var b=a.targetContainers;0<b.length;){var c=Ac(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&lc.shift()}null!==mc&&zc(mc)&&(mc=null);null!==nc&&zc(nc)&&(nc=null);null!==oc&&zc(oc)&&(oc=null);pc.forEach(Bc);qc.forEach(Bc)}
-function Dc(a,b){a.blockedOn===b&&(a.blockedOn=null,kc||(kc=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Cc)))}
-function Ec(a){function b(b){return Dc(b,a)}if(0<lc.length){Dc(lc[0],a);for(var c=1;c<lc.length;c++){var d=lc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==mc&&Dc(mc,a);null!==nc&&Dc(nc,a);null!==oc&&Dc(oc,a);pc.forEach(b);qc.forEach(b);for(c=0;c<rc.length;c++)d=rc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<rc.length&&(c=rc[0],null===c.blockedOn);)xc(c),null===c.blockedOn&&rc.shift()}
-function Fc(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Gc={animationend:Fc("Animation","AnimationEnd"),animationiteration:Fc("Animation","AnimationIteration"),animationstart:Fc("Animation","AnimationStart"),transitionend:Fc("Transition","TransitionEnd")},Hc={},Ic={};
-fa&&(Ic=document.createElement("div").style,"AnimationEvent"in window||(delete Gc.animationend.animation,delete Gc.animationiteration.animation,delete Gc.animationstart.animation),"TransitionEvent"in window||delete Gc.transitionend.transition);function Jc(a){if(Hc[a])return Hc[a];if(!Gc[a])return a;var b=Gc[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Ic)return Hc[a]=b[c];return a}
-var Kc=Jc("animationend"),Lc=Jc("animationiteration"),Mc=Jc("animationstart"),Nc=Jc("transitionend"),Oc=new Map,Pc=new Map,Qc=["abort","abort",Kc,"animationEnd",Lc,"animationIteration",Mc,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart",
-"lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Nc,"transitionEnd","waiting","waiting"];function Rc(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e="on"+(e[0].toUpperCase()+e.slice(1));Pc.set(d,b);Oc.set(d,e);da(e,[d])}}var Sc=r.unstable_now;if(null==x.__interactionsRef||null==x.__interactionsRef.current)throw Error(E(302));Sc();var I=8;
-function Tc(a){if(0!==(1&a))return I=15,1;if(0!==(2&a))return I=14,2;if(0!==(4&a))return I=13,4;var b=24&a;if(0!==b)return I=12,b;if(0!==(a&32))return I=11,32;b=192&a;if(0!==b)return I=10,b;if(0!==(a&256))return I=9,256;b=3584&a;if(0!==b)return I=8,b;if(0!==(a&4096))return I=7,4096;b=4186112&a;if(0!==b)return I=6,b;b=62914560&a;if(0!==b)return I=5,b;if(a&67108864)return I=4,67108864;if(0!==(a&134217728))return I=3,134217728;b=805306368&a;if(0!==b)return I=2,b;if(0!==(1073741824&a))return I=1,1073741824;
-I=8;return a}function Uc(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}function Vc(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(E(358,a));}}
-function Wc(a,b){var c=a.pendingLanes;if(0===c)return I=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=I=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=Tc(k),e=I):(h&=f,0!==h&&(d=Tc(h),e=I))}else f=c&~g,0!==f?(d=Tc(f),e=I):0!==h&&(d=Tc(h),e=I);if(0===d)return 0;d=31-Xc(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){Tc(b);if(e<=I)return b;I=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Xc(b),e=1<<c,d|=a[c],b&=~e;return d}
-function Yc(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Zc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=$c(24&~b),0===a?Zc(10,b):a;case 10:return a=$c(192&~b),0===a?Zc(8,b):a;case 8:return a=$c(3584&~b),0===a&&(a=$c(4186112&~b),0===a&&(a=512)),a;case 2:return b=$c(805306368&~b),0===b&&(b=268435456),b}throw Error(E(358,a));}function $c(a){return a&-a}function ad(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}
-function bd(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Xc(b);a[b]=c}var Xc=Math.clz32?Math.clz32:cd,dd=Math.log,ed=Math.LN2;function cd(a){return 0===a?32:31-(dd(a)/ed|0)|0}var fd=r.unstable_UserBlockingPriority,gd=r.unstable_runWithPriority,hd=!0;function id(a,b,c,d){Mb||Kb();var e=jd,f=Mb;Mb=!0;try{Jb(e,a,b,c,d)}finally{(Mb=f)||Ob()}}function kd(a,b,c,d){gd(fd,jd.bind(null,a,b,c,d))}
-function jd(a,b,c,d){if(hd){var e;if((e=0===(b&4))&&0<lc.length&&-1<sc.indexOf(a))a=tc(null,a,b,c,d),lc.push(a);else{var f=Ac(a,b,c,d);if(null===f)e&&uc(a,d);else{if(e){if(-1<sc.indexOf(a)){a=tc(f,a,b,c,d);lc.push(a);return}if(wc(f,a,b,c,d))return;uc(a,d)}ld(a,b,d,null,c)}}}}
-function Ac(a,b,c,d){var e=zb(d);e=yc(e);if(null!==e){var f=ac(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=bc(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==e&&(e=null)}}ld(a,b,d,e,c);return null}var md=null,nd=null,od=null;
-function pd(){if(od)return od;var a,b=nd,c=b.length,d,e="value"in md?md.value:md.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return od=e.slice(a,1<d?1-d:void 0)}function qd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function rd(){return!0}function sd(){return!1}
-function td(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?rd:sd;this.isPropagationStopped=sd;return this}n(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&
-(a.returnValue=!1),this.isDefaultPrevented=rd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=rd)},persist:function(){},isPersistent:rd});return b}
-var ud={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vd=td(ud),wd=n({},ud,{view:0,detail:0}),xd=td(wd),yd,zd,Ad,Cd=n({},wd,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bd,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in
-a)return a.movementX;a!==Ad&&(Ad&&"mousemove"===a.type?(yd=a.screenX-Ad.screenX,zd=a.screenY-Ad.screenY):zd=yd=0,Ad=a);return yd},movementY:function(a){return"movementY"in a?a.movementY:zd}}),Dd=td(Cd),Ed=n({},Cd,{dataTransfer:0}),Fd=td(Ed),Gd=n({},wd,{relatedTarget:0}),Hd=td(Gd),Id=n({},ud,{animationName:0,elapsedTime:0,pseudoElement:0}),Jd=td(Id),Kd=n({},ud,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Ld=td(Kd),Md=n({},ud,{data:0}),Nd=td(Md),Od={Esc:"Escape",
-Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",
-119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Qd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Qd[a])?!!b[a]:!1}function Bd(){return Rd}
-var Sd=n({},wd,{key:function(a){if(a.key){var b=Od[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=qd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Pd[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bd,charCode:function(a){return"keypress"===a.type?qd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
-a.type?qd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Td=td(Sd),Ud=n({},Cd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vd=td(Ud),Wd=n({},wd,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bd}),Xd=td(Wd),Yd=n({},ud,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zd=td(Yd),$d=n({},Cd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},
-deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),ae=td($d),be=[9,13,27,32],ce=fa&&"CompositionEvent"in window,de=null;fa&&"documentMode"in document&&(de=document.documentMode);var ee=fa&&"TextEvent"in window&&!de,fe=fa&&(!ce||de&&8<de&&11>=de),ge=String.fromCharCode(32),he=!1;
-function ie(a,b){switch(a){case "keyup":return-1!==be.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function je(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var ke=!1;function le(a,b){switch(a){case "compositionend":return je(b);case "keypress":if(32!==b.which)return null;he=!0;return ge;case "textInput":return a=b.data,a===ge&&he?null:a;default:return null}}
-function me(a,b){if(ke)return"compositionend"===a||!ce&&ie(a,b)?(a=pd(),od=nd=md=null,ke=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return fe&&"ko"!==b.locale?null:b.data;default:return null}}
-var ne={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!ne[a.type]:"textarea"===b?!0:!1}function pe(a,b,c,d){Gb(d);b=qe(b,"onChange");0<b.length&&(c=new vd("onChange","change",null,c,d),a.push({event:c,listeners:b}))}var re=null,se=null;function te(a){ue(a,0)}function ve(a){var b=we(a);if(Xa(b))return a}
-function xe(a,b){if("change"===a)return b}var ye=!1;if(fa){var ze;if(fa){var Ae="oninput"in document;if(!Ae){var Be=document.createElement("div");Be.setAttribute("oninput","return;");Ae="function"===typeof Be.oninput}ze=Ae}else ze=!1;ye=ze&&(!document.documentMode||9<document.documentMode)}function Ce(){re&&(re.detachEvent("onpropertychange",De),se=re=null)}function De(a){if("value"===a.propertyName&&ve(se)){var b=[];pe(b,se,a,zb(a));a=te;if(Mb)a(b);else{Mb=!0;try{Ib(a,b)}finally{Mb=!1,Ob()}}}}
-function Ee(a,b,c){"focusin"===a?(Ce(),re=b,se=c,re.attachEvent("onpropertychange",De)):"focusout"===a&&Ce()}function Fe(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return ve(se)}function Ge(a,b){if("click"===a)return ve(b)}function He(a,b){if("input"===a||"change"===a)return ve(b)}function Ie(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var Je="function"===typeof Object.is?Object.is:Ie,Ke=Object.prototype.hasOwnProperty;
-function Le(a,b){if(Je(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!Ke.call(b,c[d])||!Je(a[c[d]],b[c[d]]))return!1;return!0}function Me(a){for(;a&&a.firstChild;)a=a.firstChild;return a}
-function Ne(a,b){var c=Me(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Me(c)}}function Oe(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Oe(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}
-function Pe(){for(var a=window,b=Ya();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Ya(a.document)}return b}function Qe(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}
-var Re=fa&&"documentMode"in document&&11>=document.documentMode,Se=null,Te=null,Ue=null,Ve=!1;
-function We(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Ve||null==Se||Se!==Ya(d)||(d=Se,"selectionStart"in d&&Qe(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Ue&&Le(Ue,d)||(Ue=d,d=qe(Te,"onSelect"),0<d.length&&(b=new vd("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Se)))}
-Rc("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
-0);Rc("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);Rc(Qc,2);for(var Xe="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Ye=0;Ye<Xe.length;Ye++)Pc.set(Xe[Ye],0);ea("onMouseEnter",["mouseout","mouseover"]);
-ea("onMouseLeave",["mouseout","mouseover"]);ea("onPointerEnter",["pointerout","pointerover"]);ea("onPointerLeave",["pointerout","pointerover"]);da("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));da("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));da("onBeforeInput",["compositionend","keypress","textInput","paste"]);da("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));
-da("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));da("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ze="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),$e=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ze));
-function af(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;$b(d,b,void 0,a);a.currentTarget=null}
-function ue(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;af(e,h,l);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;l=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;af(e,h,l);f=k}}}if(Wb)throw a=Xb,Wb=!1,Xb=null,a;}
-function K(a,b){var c=bf(b),d=a+"__bubble";c.has(d)||(cf(b,a,2,!1),c.add(d))}var df="_reactListening"+Math.random().toString(36).slice(2);function ef(a){a[df]||(a[df]=!0,ba.forEach(function(b){$e.has(b)||ff(b,!1,a,null);ff(b,!0,a,null)}))}
-function ff(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;"selectionchange"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&$e.has(a)){if("scroll"!==a)return;e|=2;f=d}var g=bf(f),h=a+"__"+(b?"capture":"bubble");g.has(h)||(b&&(e|=4),cf(f,a,e,b),g.add(h))}
-function cf(a,b,c,d){var e=Pc.get(b);switch(void 0===e?2:e){case 0:e=id;break;case 1:e=kd;break;default:e=jd}c=e.bind(null,b,c,a);e=void 0;!Rb||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}
-function ld(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=yc(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Pb(function(){var d=f,e=zb(c),g=[];
-a:{var h=Oc.get(a);if(void 0!==h){var k=vd,t=a;switch(a){case "keypress":if(0===qd(c))break a;case "keydown":case "keyup":k=Td;break;case "focusin":t="focus";k=Hd;break;case "focusout":t="blur";k=Hd;break;case "beforeblur":case "afterblur":k=Hd;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=Dd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=
-Fd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Xd;break;case Kc:case Lc:case Mc:k=Jd;break;case Nc:k=Zd;break;case "scroll":k=xd;break;case "wheel":k=ae;break;case "copy":case "cut":case "paste":k=Ld;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=Vd}var z=0!==(b&4),B=!z&&"scroll"===a,u=z?null!==h?h+"Capture":null:h;z=[];for(var v=d,C;null!==
-v;){C=v;var w=C.stateNode;5===C.tag&&null!==w&&(C=w,null!==u&&(w=Qb(v,u),null!=w&&z.push(gf(v,w,C))));if(B)break;v=v.return}0<z.length&&(h=new k(h,t,null,c,e),g.push({event:h,listeners:z}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&0===(b&16)&&(t=c.relatedTarget||c.fromElement)&&(yc(t)||t[hf]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(t=c.relatedTarget||c.toElement,k=d,t=t?yc(t):null,null!==
-t&&(B=ac(t),t!==B||5!==t.tag&&6!==t.tag))t=null}else k=null,t=d;if(k!==t){z=Dd;w="onMouseLeave";u="onMouseEnter";v="mouse";if("pointerout"===a||"pointerover"===a)z=Vd,w="onPointerLeave",u="onPointerEnter",v="pointer";B=null==k?h:we(k);C=null==t?h:we(t);h=new z(w,v+"leave",k,c,e);h.target=B;h.relatedTarget=C;w=null;yc(e)===d&&(z=new z(u,v+"enter",t,c,e),z.target=C,z.relatedTarget=B,w=z);B=w;if(k&&t)b:{z=k;u=t;v=0;for(C=z;C;C=jf(C))v++;C=0;for(w=u;w;w=jf(w))C++;for(;0<v-C;)z=jf(z),v--;for(;0<C-v;)u=
-jf(u),C--;for(;v--;){if(z===u||null!==u&&z===u.alternate)break b;z=jf(z);u=jf(u)}z=null}else z=null;null!==k&&kf(g,h,k,z,!1);null!==t&&null!==B&&kf(g,B,t,z,!0)}}}a:{h=d?we(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var A=xe;else if(oe(h))if(ye)A=He;else{A=Fe;var m=Ee}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(A=Ge);if(A&&(A=A(a,d))){pe(g,A,c,e);break a}m&&m(a,h,d);"focusout"===a&&(m=h._wrapperState)&&
-m.controlled&&"number"===h.type&&cb(h,"number",h.value)}m=d?we(d):window;switch(a){case "focusin":if(oe(m)||"true"===m.contentEditable)Se=m,Te=d,Ue=null;break;case "focusout":Ue=Te=Se=null;break;case "mousedown":Ve=!0;break;case "contextmenu":case "mouseup":case "dragend":Ve=!1;We(g,c,e);break;case "selectionchange":if(Re)break;case "keydown":case "keyup":We(g,c,e)}var J;if(ce)b:{switch(a){case "compositionstart":var M="onCompositionStart";break b;case "compositionend":M="onCompositionEnd";break b;
-case "compositionupdate":M="onCompositionUpdate";break b}M=void 0}else ke?ie(a,c)&&(M="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(M="onCompositionStart");M&&(fe&&"ko"!==c.locale&&(ke||"onCompositionStart"!==M?"onCompositionEnd"===M&&ke&&(J=pd()):(md=e,nd="value"in md?md.value:md.textContent,ke=!0)),m=qe(d,M),0<m.length&&(M=new Nd(M,a,null,c,e),g.push({event:M,listeners:m}),J?M.data=J:(J=je(c),null!==J&&(M.data=J))));if(J=ee?le(a,c):me(a,c))d=qe(d,"onBeforeInput"),0<d.length&&(e=new Nd("onBeforeInput",
-"beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=J)}ue(g,b)})}function gf(a,b,c){return{instance:a,listener:b,currentTarget:c}}function qe(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Qb(a,c),null!=f&&d.unshift(gf(a,f,e)),f=Qb(a,b),null!=f&&d.push(gf(a,f,e)));a=a.return}return d}function jf(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}
-function kf(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,l=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==l&&(h=l,e?(k=Qb(c,f),null!=k&&g.unshift(gf(c,k,h))):e||(k=Qb(c,f),null!=k&&g.push(gf(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function lf(){}var mf=null,nf=null;function of(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
-function pf(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var qf="function"===typeof setTimeout?setTimeout:void 0,rf="function"===typeof clearTimeout?clearTimeout:void 0;function sf(a){1===a.nodeType?a.textContent="":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=""))}
-function tf(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function uf(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}var vf=0;function wf(a){return{$$typeof:Ha,toString:a,valueOf:a}}var xf=Math.random().toString(36).slice(2),yf="__reactFiber$"+xf,zf="__reactProps$"+xf,hf="__reactContainer$"+xf,Af="__reactEvents$"+xf;
-function yc(a){var b=a[yf];if(b)return b;for(var c=a.parentNode;c;){if(b=c[hf]||c[yf]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=uf(a);null!==a;){if(c=a[yf])return c;a=uf(a)}return b}a=c;c=a.parentNode}return null}function Eb(a){a=a[yf]||a[hf];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function we(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(E(33));}function Fb(a){return a[zf]||null}
-function bf(a){var b=a[Af];void 0===b&&(b=a[Af]=new Set);return b}var Bf=[],Cf=-1;function Df(a){return{current:a}}function L(a){0>Cf||(a.current=Bf[Cf],Bf[Cf]=null,Cf--)}function N(a,b){Cf++;Bf[Cf]=a.current;a.current=b}var Ef={},O=Df(Ef),Ff=Df(!1),Gf=Ef;
-function Hf(a,b){var c=a.type.contextTypes;if(!c)return Ef;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function If(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Jf(){L(Ff);L(O)}function Kf(a,b,c){if(O.current!==Ef)throw Error(E(168));N(O,b);N(Ff,c)}
-function Lf(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(E(108,Sa(b)||"Unknown",e));return n({},c,d)}function Mf(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ef;Gf=O.current;N(O,a);N(Ff,Ff.current);return!0}
-function Nf(a,b,c){var d=a.stateNode;if(!d)throw Error(E(169));c?(a=Lf(a,b,Gf),d.__reactInternalMemoizedMergedChildContext=a,L(Ff),L(O),N(O,a)):L(Ff);N(Ff,c)}
-var Of=null,Pf=null,Qf="undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__,Rf=r.unstable_runWithPriority,Sf=r.unstable_scheduleCallback,Tf=r.unstable_cancelCallback,Uf=r.unstable_shouldYield,Vf=r.unstable_requestPaint,Wf=r.unstable_now,Xf=r.unstable_getCurrentPriorityLevel,Yf=r.unstable_ImmediatePriority,Zf=r.unstable_UserBlockingPriority,$f=r.unstable_NormalPriority,ag=r.unstable_LowPriority,bg=r.unstable_IdlePriority;
-if(null==x.__interactionsRef||null==x.__interactionsRef.current)throw Error(E(302));var cg={},dg=void 0!==Vf?Vf:function(){},eg=null,fg=null,gg=!1,hg=Wf(),P=1E4>hg?Wf:function(){return Wf()-hg};function ig(){switch(Xf()){case Yf:return 99;case Zf:return 98;case $f:return 97;case ag:return 96;case bg:return 95;default:throw Error(E(332));}}function jg(a){switch(a){case 99:return Yf;case 98:return Zf;case 97:return $f;case 96:return ag;case 95:return bg;default:throw Error(E(332));}}
-function kg(a,b){a=jg(a);return Rf(a,b)}function lg(a,b,c){a=jg(a);return Sf(a,b,c)}function mg(){if(null!==fg){var a=fg;fg=null;Tf(a)}ng()}function ng(){if(!gg&&null!==eg){gg=!0;var a=0;try{var b=eg;kg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});eg=null}catch(c){throw null!==eg&&(eg=eg.slice(a+1)),Sf(Yf,mg),c;}finally{gg=!1}}}var og=sa.ReactCurrentBatchConfig;
-function pg(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}var qg=Df(null),rg=null,sg=null,tg=null;function ug(){tg=sg=rg=null}function vg(a){var b=qg.current;L(qg);a.type._context._currentValue=b}function wg(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}
-function xg(a,b){rg=a;tg=sg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(yg=!0),a.firstContext=null)}function zg(a,b){if(tg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)tg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===sg){if(null===rg)throw Error(E(308));sg=b;rg.dependencies={lanes:0,firstContext:b,responders:null}}else sg=sg.next=b}return a._currentValue}var Ag=!1;
-function Bg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function Cg(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Dg(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}
-function Eg(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}
-function Fg(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=
-b;c.lastBaseUpdate=b}
-function Gg(a,b,c,d){var e=a.updateQueue;Ag=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var p=a.alternate;if(null!==p){p=p.updateQueue;var y=p.lastBaseUpdate;y!==g&&(null===y?p.firstBaseUpdate=l:y.next=l,p.lastBaseUpdate=k)}}if(null!==f){y=e.baseState;g=0;p=l=k=null;do{h=f.lane;var q=f.eventTime;if((d&h)===h){null!==p&&(p=p.next={eventTime:q,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,
-next:null});a:{var D=a,t=f;h=b;q=c;switch(t.tag){case 1:D=t.payload;if("function"===typeof D){y=D.call(q,y,h);break a}y=D;break a;case 3:D.flags=D.flags&-4097|64;case 0:D=t.payload;h="function"===typeof D?D.call(q,y,h):D;if(null===h||void 0===h)break a;y=n({},y,h);break a;case 2:Ag=!0}}null!==f.callback&&(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else q={eventTime:q,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===p?(l=p=q,k=y):p=p.next=q,g|=h;f=f.next;if(null===
-f)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===p&&(k=y);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=p;Hg|=g;a.lanes=g;a.memoizedState=y}}function Ig(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(E(191,e));e.call(d)}}}var Jg=(new aa.Component).refs;
-function Kg(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}
-var Og={isMounted:function(a){return(a=a._reactInternals)?ac(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Lg(),e=Mg(a),f=Dg(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Eg(a,f);Ng(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Lg(),e=Mg(a),f=Dg(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Eg(a,f);Ng(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=Lg(),d=Mg(a),e=Dg(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=
-b);Eg(a,e);Ng(a,d,c)}};function Pg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Le(c,d)||!Le(e,f):!0}
-function Qg(a,b,c){var d=!1,e=Ef;var f=b.contextType;"object"===typeof f&&null!==f?f=zg(f):(e=If(b)?Gf:O.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Hf(a,e):Ef);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Og;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
-function Rg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Og.enqueueReplaceState(b,b.state,null)}
-function Sg(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Jg;Bg(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=zg(f):(f=If(b)?Gf:O.current,e.context=Hf(a,f));Gg(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(Kg(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||
-(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Og.enqueueReplaceState(e,e.state,null),Gg(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4)}var Tg=Array.isArray;
-function Ug(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(E(309));var d=c.stateNode}if(!d)throw Error(E(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Jg&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(E(284));if(!c._owner)throw Error(E(290,a));}return a}
-function Vg(a,b){if("textarea"!==a.type)throw Error(E(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b));}
-function Wg(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Xg(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=2,
-c):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Yg(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=Ug(a,b,c),d.return=a,d;d=Zg(c.type,c.key,c.props,null,a.mode,d);d.ref=Ug(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
-$g(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function p(a,b,c,d,f){if(null===b||7!==b.tag)return b=ah(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function y(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Yg(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case ta:return c=Zg(b.type,b.key,b.props,null,a.mode,c),c.ref=Ug(a,null,b),c.return=a,c;case ua:return b=$g(b,a.mode,c),b.return=a,b}if(Tg(b)||Ma(b))return b=ah(b,
-a.mode,c,null),b.return=a,b;Vg(a,b)}return null}function q(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case ta:return c.key===e?c.type===va?p(a,b,c.props.children,d,e):k(a,b,c,d):null;case ua:return c.key===e?l(a,b,c,d):null}if(Tg(c)||Ma(c))return null!==e?null:p(a,b,c,d,null);Vg(a,c)}return null}function D(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||
-null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case ta:return a=a.get(null===d.key?c:d.key)||null,d.type===va?p(b,a,d.props.children,e,d.key):k(b,a,d,e);case ua:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Tg(d)||Ma(d))return a=a.get(c)||null,p(b,a,d,e,null);Vg(b,d)}return null}function t(e,g,h,k){for(var l=null,u=null,m=g,v=g=0,B=null;null!==m&&v<h.length;v++){m.index>v?(B=m,m=null):B=m.sibling;var p=q(e,m,h[v],k);if(null===p){null===m&&(m=B);break}a&&m&&null===
-p.alternate&&b(e,m);g=f(p,g,v);null===u?l=p:u.sibling=p;u=p;m=B}if(v===h.length)return c(e,m),l;if(null===m){for(;v<h.length;v++)m=y(e,h[v],k),null!==m&&(g=f(m,g,v),null===u?l=m:u.sibling=m,u=m);return l}for(m=d(e,m);v<h.length;v++)B=D(m,e,v,h[v],k),null!==B&&(a&&null!==B.alternate&&m.delete(null===B.key?v:B.key),g=f(B,g,v),null===u?l=B:u.sibling=B,u=B);a&&m.forEach(function(a){return b(e,a)});return l}function z(e,g,h,k){var l=Ma(h);if("function"!==typeof l)throw Error(E(150));h=l.call(h);if(null==
-h)throw Error(E(151));for(var u=l=null,m=g,v=g=0,B=null,p=h.next();null!==m&&!p.done;v++,p=h.next()){m.index>v?(B=m,m=null):B=m.sibling;var t=q(e,m,p.value,k);if(null===t){null===m&&(m=B);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,v);null===u?l=t:u.sibling=t;u=t;m=B}if(p.done)return c(e,m),l;if(null===m){for(;!p.done;v++,p=h.next())p=y(e,p.value,k),null!==p&&(g=f(p,g,v),null===u?l=p:u.sibling=p,u=p);return l}for(m=d(e,m);!p.done;v++,p=h.next())p=D(m,e,v,p.value,k),null!==p&&(a&&null!==p.alternate&&
-m.delete(null===p.key?v:p.key),g=f(p,g,v),null===u?l=p:u.sibling=p,u=p);a&&m.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===va&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case ta:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===va){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);
-d=e(k,f.props);d.ref=Ug(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===va?(d=ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Zg(f.type,f.key,f.props,null,a.mode,h),h.ref=Ug(a,d,f),h.return=a,a=h)}return g(a);case ua:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=
-$g(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Yg(f,a.mode,h),d.return=a,a=d),g(a);if(Tg(f))return t(a,d,f,h);if(Ma(f))return z(a,d,f,h);l&&Vg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(E(152,Sa(a.type)||"Component"));}return c(a,d)}}var bh=Wg(!0),ch=Wg(!1),dh={},eh=Df(dh),fh=Df(dh),gh=Df(dh);
-function hh(a){if(a===dh)throw Error(E(174));return a}function ih(a,b){N(gh,b);N(fh,a);N(eh,dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:ob(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=ob(b,a)}L(eh);N(eh,b)}function jh(){L(eh);L(fh);L(gh)}function kh(a){hh(gh.current);var b=hh(eh.current);var c=ob(b,a.type);b!==c&&(N(fh,a),N(eh,c))}function lh(a){fh.current===a&&(L(eh),L(fh))}var Q=Df(0);
-function mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var nh=null,oh=null,ph=!1;
-function qh(a,b){var c=rh(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}function sh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
-function th(a){if(ph){var b=oh;if(b){var c=b;if(!sh(a,b)){b=tf(c.nextSibling);if(!b||!sh(a,b)){a.flags=a.flags&-1025|2;ph=!1;nh=a;return}qh(nh,c)}nh=a;oh=tf(b.firstChild)}else a.flags=a.flags&-1025|2,ph=!1,nh=a}}function uh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;nh=a}
-function vh(a){if(a!==nh)return!1;if(!ph)return uh(a),ph=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!pf(b,a.memoizedProps))for(b=oh;b;)qh(a,b),b=tf(b.nextSibling);uh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(E(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){oh=tf(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}oh=null}}else oh=nh?tf(a.stateNode.nextSibling):null;return!0}
-function wh(){oh=nh=null;ph=!1}var xh=[];function yh(){for(var a=0;a<xh.length;a++)xh[a]._workInProgressVersionPrimary=null;xh.length=0}var zh=sa.ReactCurrentDispatcher,Ah=sa.ReactCurrentBatchConfig,Bh=0,R=null,S=null,T=null,Ch=!1,Dh=!1;function Eh(){throw Error(E(321));}function Fh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!Je(a[c],b[c]))return!1;return!0}
-function Gh(a,b,c,d,e,f){Bh=f;R=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;zh.current=null===a||null===a.memoizedState?Hh:Ih;a=c(d,e);if(Dh){f=0;do{Dh=!1;if(!(25>f))throw Error(E(301));f+=1;T=S=null;b.updateQueue=null;zh.current=Jh;a=c(d,e)}while(Dh)}zh.current=Kh;b=null!==S&&null!==S.next;Bh=0;T=S=R=null;Ch=!1;if(b)throw Error(E(300));return a}function Lh(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===T?R.memoizedState=T=a:T=T.next=a;return T}
-function Mh(){if(null===S){var a=R.alternate;a=null!==a?a.memoizedState:null}else a=S.next;var b=null===T?R.memoizedState:T.next;if(null!==b)T=b,S=a;else{if(null===a)throw Error(E(310));S=a;a={memoizedState:S.memoizedState,baseState:S.baseState,baseQueue:S.baseQueue,queue:S.queue,next:null};null===T?R.memoizedState=T=a:T=T.next=a}return T}function Nh(a,b){return"function"===typeof b?b(a):b}
-function Oh(a){var b=Mh(),c=b.queue;if(null===c)throw Error(E(311));c.lastRenderedReducer=a;var d=S,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;var h=g=f=null,k=e;do{var l=k.lane;if((Bh&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var p={lane:l,action:k.action,eagerReducer:k.eagerReducer,
-eagerState:k.eagerState,next:null};null===h?(g=h=p,f=d):h=h.next=p;R.lanes|=l;Hg|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;Je(d,b.memoizedState)||(yg=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=d}return[b.memoizedState,c.dispatch]}
-function Ph(a){var b=Mh(),c=b.queue;if(null===c)throw Error(E(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);Je(f,b.memoizedState)||(yg=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}
-function Qh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,a=(Bh&a)===a)b._workInProgressVersionPrimary=d,xh.push(b);if(a)return c(b._source);xh.push(b);throw Error(E(350));}
-function Rh(a,b,c,d){var e=U;if(null===e)throw Error(E(349));var f=b._getVersion,g=f(b._source),h=zh.current,k=h.useState(function(){return Qh(e,b,c)}),l=k[1],p=k[0];k=T;var y=a.memoizedState,q=y.refs,D=q.getSnapshot,t=y.source;y=y.subscribe;var z=R;a.memoizedState={refs:q,source:b,subscribe:d};h.useEffect(function(){q.getSnapshot=c;q.setSnapshot=l;var a=f(b._source);if(!Je(g,a)){a=c(b._source);Je(p,a)||(l(a),a=Mg(z),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=
-e.entanglements,h=a;0<h;){var k=31-Xc(h),t=1<<k;d[k]|=a;h&=~t}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=q.getSnapshot,c=q.setSnapshot;try{c(a(b._source));var d=Mg(z);e.mutableReadLanes|=d&e.pendingLanes}catch(C){c(function(){throw C;})}})},[b,d]);Je(D,c)&&Je(t,b)&&Je(y,d)||(a={pending:null,dispatch:null,lastRenderedReducer:Nh,lastRenderedState:p},a.dispatch=l=Sh.bind(null,R,a),k.queue=a,k.baseQueue=null,p=Qh(e,b,c),k.memoizedState=k.baseState=p);return p}
-function Th(a,b,c){var d=Mh();return Rh(d,a,b,c)}function Uh(a){var b=Lh();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:Nh,lastRenderedState:a};a=a.dispatch=Sh.bind(null,R,a);return[b.memoizedState,a]}
-function Vh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=R.updateQueue;null===b?(b={lastEffect:null},R.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Wh(a){var b=Lh();a={current:a};return b.memoizedState=a}function Xh(){return Mh().memoizedState}function Yh(a,b,c,d){var e=Lh();R.flags|=a;e.memoizedState=Vh(1|b,c,void 0,void 0===d?null:d)}
-function Zh(a,b,c,d){var e=Mh();d=void 0===d?null:d;var f=void 0;if(null!==S){var g=S.memoizedState;f=g.destroy;if(null!==d&&Fh(d,g.deps)){Vh(b,c,f,d);return}}R.flags|=a;e.memoizedState=Vh(1|b,c,f,d)}function $h(a,b){return Yh(516,4,a,b)}function ai(a,b){return Zh(516,4,a,b)}function bi(a,b){return Zh(4,2,a,b)}function ci(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}
-function di(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Zh(4,2,ci.bind(null,b,a),c)}function ei(){}function fi(a,b){var c=Mh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Fh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function gi(a,b){var c=Mh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Fh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}
-function hi(a,b){var c=ig();kg(98>c?98:c,function(){a(!0)});kg(97<c?97:c,function(){var c=Ah.transition;Ah.transition=1;try{a(!1),b()}finally{Ah.transition=c}})}
-function Sh(a,b,c){var d=Lg(),e=Mg(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);b.pending=f;g=a.alternate;if(a===R||null!==g&&g===R)Dh=Ch=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(Je(k,h))return}catch(l){}finally{}Ng(a,e,d)}}
-var Kh={readContext:zg,useCallback:Eh,useContext:Eh,useEffect:Eh,useImperativeHandle:Eh,useLayoutEffect:Eh,useMemo:Eh,useReducer:Eh,useRef:Eh,useState:Eh,useDebugValue:Eh,useDeferredValue:Eh,useTransition:Eh,useMutableSource:Eh,useOpaqueIdentifier:Eh,unstable_isNewReconciler:!1},Hh={readContext:zg,useCallback:function(a,b){Lh().memoizedState=[a,void 0===b?null:b];return a},useContext:zg,useEffect:$h,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Yh(4,2,ci.bind(null,
-b,a),c)},useLayoutEffect:function(a,b){return Yh(4,2,a,b)},useMemo:function(a,b){var c=Lh();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Lh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Sh.bind(null,R,a);return[d.memoizedState,a]},useRef:Wh,useState:Uh,useDebugValue:ei,useDeferredValue:function(a){var b=Uh(a),c=b[0],d=b[1];$h(function(){var b=Ah.transition;
-Ah.transition=1;try{d(a)}finally{Ah.transition=b}},[a]);return c},useTransition:function(){var a=Uh(!1),b=a[0];a=hi.bind(null,a[1]);Wh(a);return[a,b]},useMutableSource:function(a,b,c){var d=Lh();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Rh(d,a,b,c)},useOpaqueIdentifier:function(){if(ph){var a=!1,b=wf(function(){a||(a=!0,c("r:"+(vf++).toString(36)));throw Error(E(355));}),c=Uh(b)[1];0===(R.mode&2)&&(R.flags|=516,Vh(5,function(){c("r:"+(vf++).toString(36))},
-void 0,null));return b}b="r:"+(vf++).toString(36);Uh(b);return b},unstable_isNewReconciler:!1},Ih={readContext:zg,useCallback:fi,useContext:zg,useEffect:ai,useImperativeHandle:di,useLayoutEffect:bi,useMemo:gi,useReducer:Oh,useRef:Xh,useState:function(){return Oh(Nh)},useDebugValue:ei,useDeferredValue:function(a){var b=Oh(Nh),c=b[0],d=b[1];ai(function(){var b=Ah.transition;Ah.transition=1;try{d(a)}finally{Ah.transition=b}},[a]);return c},useTransition:function(){var a=Oh(Nh)[0];return[Xh().current,
-a]},useMutableSource:Th,useOpaqueIdentifier:function(){return Oh(Nh)[0]},unstable_isNewReconciler:!1},Jh={readContext:zg,useCallback:fi,useContext:zg,useEffect:ai,useImperativeHandle:di,useLayoutEffect:bi,useMemo:gi,useReducer:Ph,useRef:Xh,useState:function(){return Ph(Nh)},useDebugValue:ei,useDeferredValue:function(a){var b=Ph(Nh),c=b[0],d=b[1];ai(function(){var b=Ah.transition;Ah.transition=1;try{d(a)}finally{Ah.transition=b}},[a]);return c},useTransition:function(){var a=Ph(Nh)[0];return[Xh().current,
-a]},useMutableSource:Th,useOpaqueIdentifier:function(){return Ph(Nh)[0]},unstable_isNewReconciler:!1},ii=r.unstable_now,ji=0,ki=-1;function li(a,b){if(0<=ki){var c=ii()-ki;a.actualDuration+=c;b&&(a.selfBaseDuration=c);ki=-1}}function mi(a){for(var b=a.child;b;)a.actualDuration+=b.actualDuration,b=b.sibling}var ni=sa.ReactCurrentOwner,yg=!1;function oi(a,b,c,d){b.child=null===a?ch(b,null,c,d):bh(b,a.child,c,d)}
-function pi(a,b,c,d,e){c=c.render;var f=b.ref;xg(b,e);d=Gh(a,b,c,d,f,e);if(null!==a&&!yg)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,qi(a,b,e);b.flags|=1;oi(a,b,d,e);return b.child}
-function ri(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!si(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ti(a,b,g,d,e,f);a=Zg(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Le,c(e,d)&&a.ref===b.ref))return qi(a,b,f);b.flags|=1;a=Xg(g,d);a.ref=b.ref;a.return=b;return b.child=a}
-function ti(a,b,c,d,e,f){if(null!==a&&Le(a.memoizedProps,d)&&a.ref===b.ref)if(yg=!1,0!==(f&e))0!==(a.flags&16384)&&(yg=!0);else return b.lanes=a.lanes,qi(a,b,f);return ui(a,b,c,d,f)}
-function vi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode||"unstable-defer-without-hiding"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},wi(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},wi(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,xi(1073741824),b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},wi(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,wi(b,d);oi(a,b,e,c);return b.child}
-function yi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function ui(a,b,c,d,e){var f=If(c)?Gf:O.current;f=Hf(b,f);xg(b,e);c=Gh(a,b,c,d,f,e);if(null!==a&&!yg)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,qi(a,b,e);b.flags|=1;oi(a,b,c,e);return b.child}
-function zi(a,b,c,d,e){if(If(c)){var f=!0;Mf(b)}else f=!1;xg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),Qg(b,c,d),Sg(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=zg(l):(l=If(c)?Gf:O.current,l=Hf(b,l));var p=c.getDerivedStateFromProps,y="function"===typeof p||"function"===typeof g.getSnapshotBeforeUpdate;y||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
-"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Rg(b,g,d,l);Ag=!1;var q=b.memoizedState;g.state=q;Gg(b,d,g,e);k=b.memoizedState;h!==d||q!==k||Ff.current||Ag?("function"===typeof p&&(Kg(b,c,p,d),k=b.memoizedState),(h=Ag||Pg(b,c,h,d,q,k,l))?(y||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===
-typeof g.componentDidMount&&(b.flags|=4)):("function"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;Cg(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:pg(b.type,h);g.props=l;y=b.pendingProps;q=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=zg(k):(k=If(c)?Gf:O.current,k=Hf(b,k));var D=c.getDerivedStateFromProps;(p="function"===typeof D||
-"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==y||q!==k)&&Rg(b,g,d,k);Ag=!1;q=b.memoizedState;g.state=q;Gg(b,d,g,e);var t=b.memoizedState;h!==y||q!==t||Ff.current||Ag?("function"===typeof D&&(Kg(b,c,D,d),t=b.memoizedState),(l=Ag||Pg(b,c,l,d,q,t,k))?(p||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&
-g.componentWillUpdate(d,t,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,t,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&q===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&q===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=t),g.props=d,g.state=t,g.context=
-k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&q===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&q===a.memoizedState||(b.flags|=256),d=!1)}return Ai(a,b,c,d,f,e)}
-function Ai(a,b,c,d,e,f){yi(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Nf(b,c,!1),qi(a,b,f);d=b.stateNode;ni.current=b;if(g&&"function"!==typeof c.getDerivedStateFromError){var h=null;ki=-1}else h=d.render();b.flags|=1;null!==a&&g?(g=h,b.child=bh(b,a.child,null,f),b.child=bh(b,null,g,f)):oi(a,b,h,f);b.memoizedState=d.state;e&&Nf(b,c,!0);return b.child}
-function Bi(a){var b=a.stateNode;b.pendingContext?Kf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Kf(a,b.context,!1);ih(a,b.containerInfo)}var Ci={dehydrated:null,retryLane:0};
-function Di(a,b,c){var d=b.pendingProps,e=Q.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);N(Q,e&1);if(null===a){void 0!==d.fallback&&th(b);a=d.children;e=d.fallback;if(f)return a=Ei(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=Ci,a;if("number"===typeof d.unstable_expectedLoadTime)return a=Ei(b,a,e,c),b.child.memoizedState={baseLanes:c},
-b.memoizedState=Ci,b.lanes=33554432,xi(33554432),a;c=Fi({mode:"visible",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=Gi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=Ci,d;c=Hi(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=Gi(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===
-e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=Ci,d;c=Hi(a,b,d.children,c);b.memoizedState=null;return c}function Ei(a,b,c,d){var e=a.mode,f=a.child;b={mode:"hidden",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b,a.mode&8&&(f.actualDuration=0,f.actualStartTime=-1,f.selfBaseDuration=0,f.treeBaseDuration=0)):f=Fi(b,e,0,null);c=ah(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}
-function Hi(a,b,c,d){var e=a.child;a=e.sibling;c=Xg(e,{mode:"visible",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}
-function Gi(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:"hidden",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,b.mode&8&&(c.actualDuration=0,c.actualStartTime=-1,c.selfBaseDuration=g.selfBaseDuration,c.treeBaseDuration=g.treeBaseDuration),g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Xg(g,h);null!==a?d=Xg(a,d):(d=ah(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=
-c;return d}function Ii(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);wg(a.return,b)}function Ji(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}
-function Ki(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;oi(a,b,d.children,c);d=Q.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&Ii(a,c);else if(19===a.tag)Ii(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}N(Q,d);if(0===(b.mode&2))b.memoizedState=
-null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===mh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ji(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===mh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ji(b,!0,c,null,f,b.lastEffect);break;case "together":Ji(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
-function qi(a,b,c){null!==a&&(b.dependencies=a.dependencies);ki=-1;Hg|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(E(153));if(null!==b.child){a=b.child;c=Xg(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Xg(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}var Li,Mi,Ni,Oi;
-Li=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Mi=function(){};
-Ni=function(a,b,c,d){var e=a.memoizedProps;if(e!==d){a=b.stateNode;hh(eh.current);var f=null;switch(c){case "input":e=Za(a,e);d=Za(a,d);f=[];break;case "option":e=fb(a,e);d=fb(a,d);f=[];break;case "select":e=n({},e,{value:void 0});d=n({},d,{value:void 0});f=[];break;case "textarea":e=hb(a,e);d=hb(a,d);f=[];break;default:"function"!==typeof e.onClick&&"function"===typeof d.onClick&&(a.onclick=lf)}xb(c,d);var g;c=null;for(l in e)if(!d.hasOwnProperty(l)&&e.hasOwnProperty(l)&&null!=e[l])if("style"===
-l){var h=e[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(ca.hasOwnProperty(l)?f||(f=[]):(f=f||[]).push(l,null));for(l in d){var k=d[l];h=null!=e?e[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||
-(c={}),c[g]=k[g])}else c||(f||(f=[]),f.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(f=f||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(f=f||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(ca.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&K("scroll",a),f||h===k||(f=[])):"object"===typeof k&&null!==k&&k.$$typeof===Ha?k.toString():(f=f||[]).push(l,k))}c&&(f=f||[]).push("style",
-c);var l=f;if(b.updateQueue=l)b.flags|=4}};Oi=function(a,b,c,d){c!==d&&(b.flags|=4)};function Pi(a,b){if(!ph)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
-function Qi(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return If(b.type)&&Jf(),null;case 3:jh();L(Ff);L(O);yh();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)vh(b)?b.flags|=4:d.hydrate||(b.flags|=256);Mi(b);return null;case 5:lh(b);var e=hh(gh.current);c=b.type;if(null!==a&&null!=b.stateNode)Ni(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===
-b.stateNode)throw Error(E(166));return null}a=hh(eh.current);if(vh(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[yf]=b;d[zf]=f;switch(c){case "dialog":K("cancel",d);K("close",d);break;case "iframe":case "object":case "embed":K("load",d);break;case "video":case "audio":for(a=0;a<Ze.length;a++)K(Ze[a],d);break;case "source":K("error",d);break;case "img":case "image":case "link":K("error",d);K("load",d);break;case "details":K("toggle",d);break;case "input":$a(d,f);K("invalid",d);break;case "select":d._wrapperState=
-{wasMultiple:!!f.multiple};K("invalid",d);break;case "textarea":jb(d,f),K("invalid",d)}xb(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],"children"===g?"string"===typeof e?d.textContent!==e&&(a=["children",e]):"number"===typeof e&&d.textContent!==""+e&&(a=["children",""+e]):ca.hasOwnProperty(g)&&null!=e&&"onScroll"===g&&K("scroll",d));switch(c){case "input":Wa(d);db(d,f,!0);break;case "textarea":Wa(d);lb(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=
-lf)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;a===mb.html&&(a=nb(c));a===mb.html?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[yf]=b;a[zf]=d;Li(a,b,!1,!1);b.stateNode=a;g=yb(c,d);switch(c){case "dialog":K("cancel",a);K("close",a);
-e=d;break;case "iframe":case "object":case "embed":K("load",a);e=d;break;case "video":case "audio":for(e=0;e<Ze.length;e++)K(Ze[e],a);e=d;break;case "source":K("error",a);e=d;break;case "img":case "image":case "link":K("error",a);K("load",a);e=d;break;case "details":K("toggle",a);e=d;break;case "input":$a(a,d);e=Za(a,d);K("invalid",a);break;case "option":e=fb(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=n({},d,{value:void 0});K("invalid",a);break;case "textarea":jb(a,d);e=
-hb(a,d);K("invalid",a);break;default:e=d}xb(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?vb(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&qb(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&rb(a,k):"number"===typeof k&&rb(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(ca.hasOwnProperty(f)?null!=k&&"onScroll"===f&&K("scroll",a):null!=k&&ra(a,f,k,g))}switch(c){case "input":Wa(a);db(a,d,!1);
-break;case "textarea":Wa(a);lb(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Ta(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?gb(a,!!d.multiple,f,!1):null!=d.defaultValue&&gb(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=lf)}of(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Oi(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(E(166));
-c=hh(gh.current);hh(eh.current);vh(b)?(d=b.stateNode,c=b.memoizedProps,d[yf]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[yf]=b,b.stateNode=d)}return null;case 13:L(Q);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,0!==(b.mode&8)&&mi(b),b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&vh(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(Q.current&1))0===V&&(V=3);
-else{if(0===V||3===V)V=4;null===U||0===(Hg&134217727)&&0===(Ri&134217727)||Si(U,W)}if(d||c)b.flags|=4;return null;case 4:return jh(),Mi(b),null===a&&ef(b.stateNode.containerInfo),null;case 10:return vg(b),null;case 17:return If(b.type)&&Jf(),null;case 19:L(Q);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)Pi(d,!1);else{if(0!==V||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=mh(a);if(null!==g){b.flags|=64;Pi(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=
-f,b.flags|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,g=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,a=f.alternate,null===a?(f.childLanes=0,f.lanes=g,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null,f.selfBaseDuration=0,f.treeBaseDuration=0):(f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,
-f.updateQueue=a.updateQueue,f.type=a.type,g=a.dependencies,f.dependencies=null===g?null:{lanes:g.lanes,firstContext:g.firstContext},f.selfBaseDuration=a.selfBaseDuration,f.treeBaseDuration=a.treeBaseDuration),c=c.sibling;N(Q,Q.current&1|2);return b.child}a=a.sibling}null!==d.tail&&P()>Ti&&(b.flags|=64,f=!0,Pi(d,!1),b.lanes=33554432,xi(33554432))}else{if(!f)if(a=mh(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Pi(d,!0),null===d.tail&&"hidden"===d.tailMode&&
-!g.alternate&&!ph)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*P()-d.renderingStartTime>Ti&&1073741824!==c&&(b.flags|=64,f=!0,Pi(d,!1),b.lanes=33554432,xi(33554432));d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=P(),c.sibling=null,b=Q.current,N(Q,f?b&1|2:b&1),c):null;case 23:case 24:return Ui(),null!==a&&null!==
-a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(E(156,b.tag));}
-function Vi(a){switch(a.tag){case 1:If(a.type)&&Jf();var b=a.flags;return b&4096?(a.flags=b&-4097|64,0!==(a.mode&8)&&mi(a),a):null;case 3:jh();L(Ff);L(O);yh();b=a.flags;if(0!==(b&64))throw Error(E(285));a.flags=b&-4097|64;return a;case 5:return lh(a),null;case 13:return L(Q),b=a.flags,b&4096?(a.flags=b&-4097|64,0!==(a.mode&8)&&mi(a),a):null;case 19:return L(Q),null;case 4:return jh(),null;case 10:return vg(a),null;case 23:case 24:return Ui(),null;default:return null}}
-function Wi(a,b){try{var c="",d=b;do c+=Ra(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e}}function Xi(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}var Yi="function"===typeof WeakMap?WeakMap:Map;function Zi(a,b,c){c=Dg(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){$i||($i=!0,aj=d);Xi(a,b)};return c}
-function bj(a,b,c){c=Dg(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Xi(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===cj?cj=new Set([this]):cj.add(this),Xi(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}var dj="function"===typeof WeakSet?WeakSet:Set;
-function ej(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){fj(a,c)}else b.current=null}function gj(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:pg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&sf(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(E(163));}
-function hj(a,b,c){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{if(3===(a.tag&3)){var d=a.create;a.destroy=d()}a=a.next}while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(ij(c,a),jj(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:pg(c.type,b.memoizedProps),a.componentDidUpdate(d,
-b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&Ig(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}Ig(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&of(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:d=c.memoizedProps.onRender;e=ji;"function"===typeof d&&d(c.memoizedProps.id,null===b?"mount":"update",c.actualDuration,c.treeBaseDuration,
-c.actualStartTime,e,a.memoizedInteractions);return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&Ec(c))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(E(163));}
-function kj(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=ub("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===
-a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}
-function lj(a,b){if(Pf&&"function"===typeof Pf.onCommitFiberUnmount)try{Pf.onCommitFiberUnmount(Of,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))ij(b,c);else{d=b;try{e()}catch(f){fj(d,f)}}c=c.next}while(c!==a)}break;case 1:ej(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){fj(b,
-f)}break;case 5:ej(b);break;case 4:mj(a,b)}}function nj(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function oj(a){return 5===a.tag||3===a.tag||4===a.tag}
-function pj(a){a:{for(var b=a.return;null!==b;){if(oj(b))break a;b=b.return}throw Error(E(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(E(161));}c.flags&16&&(rb(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||oj(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===
-c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?qj(a,c,b):rj(a,c,b)}
-function qj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=lf));else if(4!==d&&(a=a.child,null!==a))for(qj(a,b,c),a=a.sibling;null!==a;)qj(a,b,c),a=a.sibling}
-function rj(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(rj(a,b,c),a=a.sibling;null!==a;)rj(a,b,c),a=a.sibling}
-function mj(a,b){for(var c=b,d=!1,e,f;;){if(!d){d=c.return;a:for(;;){if(null===d)throw Error(E(160));e=d.stateNode;switch(d.tag){case 5:f=!1;break a;case 3:e=e.containerInfo;f=!0;break a;case 4:e=e.containerInfo;f=!0;break a}d=d.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(lj(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,
-8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(lj(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}
-function sj(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[zf]=d;"input"===a&&"radio"===d.type&&null!=d.name&&ab(c,d);yb(a,e);b=yb(a,d);for(e=0;e<f.length;e+=
-2){var g=f[e],h=f[e+1];"style"===g?vb(c,h):"dangerouslySetInnerHTML"===g?qb(c,h):"children"===g?rb(c,h):ra(c,g,h,b)}switch(a){case "input":bb(c,d);break;case "textarea":kb(c,d);break;case "select":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?gb(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?gb(c,!!d.multiple,d.defaultValue,!0):gb(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(E(162));b.stateNode.nodeValue=
-b.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,Ec(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(tj=P(),kj(b.child,!0));uj(b);return;case 19:uj(b);return;case 17:return;case 23:case 24:kj(b,null!==b.memoizedState);return}throw Error(E(163));}
-function uj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new dj);b.forEach(function(b){var d=vj.bind(null,a,b);c.has(b)||(!0!==b.__reactDoNotTraceInteractions&&(d=x.unstable_wrap(d)),c.add(b),b.then(d,d))})}}function wj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}
-var xj=Math.ceil,yj=sa.ReactCurrentDispatcher,zj=sa.ReactCurrentOwner,X=0,U=null,Y=null,W=0,Aj=0,Bj=Df(0),V=0,Cj=null,Dj=0,Hg=0,Ri=0,Ej=0,Fj=null,tj=0,Ti=Infinity;function Gj(){Ti=P()+500}var Z=null,$i=!1,aj=null,cj=null,Hj=!1,Ij=null,Jj=90,Kj=0,Lj=[],Mj=[],Nj=null,Oj=0,Pj=null,Qj=null,Rj=-1,Sj=0,Tj=0,Uj=null,Vj=!1;function Lg(){return 0!==(X&48)?P():-1!==Rj?Rj:Rj=P()}
-function Mg(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===ig()?1:2;0===Sj&&(Sj=Dj);if(0!==og.transition){0!==Tj&&(Tj=null!==Fj?Fj.pendingLanes:0);a=Sj;var b=4186112&~Tj;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=ig();0!==(X&4)&&98===a?a=Zc(12,Sj):(a=Uc(a),a=Zc(a,Sj));return a}
-function Ng(a,b,c){if(50<Oj)throw Oj=0,Pj=null,Error(E(185));a=Wj(a,b);if(null===a)return null;bd(a,b,c);a===U&&(Ri|=b,4===V&&Si(a,W));var d=ig();1===b?0!==(X&8)&&0===(X&48)?(Xj(a,b),Yj(a)):(Zj(a,c),Xj(a,b),0===X&&(Gj(),mg())):(0===(X&4)||98!==d&&99!==d||(null===Nj?Nj=new Set([a]):Nj.add(a)),Zj(a,c),Xj(a,b));Fj=a}
-function Wj(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}
-function Zj(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Xc(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;Tc(k);var p=I;f[h]=10<=p?l+250:6<=p?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Wc(a,a===U?W:0);b=I;if(0===d)null!==c&&(c!==cg&&Tf(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==cg&&Tf(c)}15===b?(c=Yj.bind(null,a),null===eg?(eg=[c],fg=Sf(Yf,ng)):eg.push(c),
-c=cg):14===b?c=lg(99,Yj.bind(null,a)):(c=Vc(b),c=lg(c,ak.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}
-function ak(a){Rj=-1;Tj=Sj=0;if(0!==(X&48))throw Error(E(327));var b=a.callbackNode;if(bk()&&a.callbackNode!==b)return null;var c=Wc(a,a===U?W:0);if(0===c)return null;var d=c;var e=X;X|=16;var f=ck();if(U!==a||W!==d)Gj(),dk(a,d),ek(a,d);d=fk(a);do try{gk();break}catch(h){hk(a,h)}while(1);ug();x.__interactionsRef.current=d;yj.current=f;X=e;null!==Y?e=0:(U=null,W=0,e=V);if(0!==(Dj&Ri))dk(a,0);else if(0!==e){2===e&&(X|=64,a.hydrate&&(a.hydrate=!1,sf(a.containerInfo)),c=Yc(a),0!==c&&(e=ik(a,c)));if(1===
-e)throw b=Cj,dk(a,0),Si(a,c),Zj(a,P()),b;a.finishedWork=a.current.alternate;a.finishedLanes=c;switch(e){case 0:case 1:throw Error(E(345));case 2:jk(a);break;case 3:Si(a,c);if((c&62914560)===c&&(e=tj+500-P(),10<e)){if(0!==Wc(a,0))break;f=a.suspendedLanes;if((f&c)!==c){Lg();a.pingedLanes|=a.suspendedLanes&f;break}a.timeoutHandle=qf(jk.bind(null,a),e);break}jk(a);break;case 4:Si(a,c);if((c&4186112)===c)break;e=a.eventTimes;for(f=-1;0<c;){var g=31-Xc(c);d=1<<g;g=e[g];g>f&&(f=g);c&=~d}c=f;c=P()-c;c=(120>
-c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>c?4320:1960*xj(c/1960))-c;if(10<c){a.timeoutHandle=qf(jk.bind(null,a),c);break}jk(a);break;case 5:jk(a);break;default:throw Error(E(329));}}Zj(a,P());return a.callbackNode===b?ak.bind(null,a):null}function Si(a,b){b&=~Ej;b&=~Ri;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Xc(b),d=1<<c;a[c]=-1;b&=~d}}
-function Yj(a){if(0!==(X&48))throw Error(E(327));bk();if(a===U&&0!==(a.expiredLanes&W)){var b=W;var c=ik(a,b);0!==(Dj&Ri)&&(b=Wc(a,b),c=ik(a,b))}else b=Wc(a,0),c=ik(a,b);0!==a.tag&&2===c&&(X|=64,a.hydrate&&(a.hydrate=!1,sf(a.containerInfo)),b=Yc(a),0!==b&&(c=ik(a,b)));if(1===c)throw c=Cj,dk(a,0),Si(a,b),Zj(a,P()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;jk(a);Zj(a,P());return null}
-function kk(){if(null!==Nj){var a=Nj;Nj=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;Zj(a,P())})}mg()}function lk(a,b){var c=X;X|=1;try{return a(b)}finally{X=c,0===X&&(Gj(),mg())}}function mk(a,b){var c=X;X&=-2;X|=8;try{return a(b)}finally{X=c,0===X&&(Gj(),mg())}}function wi(a,b){N(Bj,Aj);Aj|=b;Dj|=b}function Ui(){Aj=Bj.current;L(Bj)}
-function dk(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,rf(c));if(null!==Y)for(c=Y.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&Jf();break;case 3:jh();L(Ff);L(O);yh();break;case 5:lh(d);break;case 4:jh();break;case 13:L(Q);break;case 19:L(Q);break;case 10:vg(d);break;case 23:case 24:Ui()}c=c.return}U=a;Y=Xg(a.current,null);W=Aj=Dj=b;V=0;Cj=null;Ej=Ri=Hg=0;Qj=null}
-function hk(a,b){do{var c=Y;try{ug();zh.current=Kh;if(Ch){for(var d=R.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}Ch=!1}Bh=0;T=S=R=null;Dh=!1;zj.current=null;if(null===c||null===c.return){V=1;Cj=b;Y=null;break}c.mode&8&&li(c,!0);a:{var f=a,g=c.return,h=c,k=b;b=W;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k;if(0===(h.mode&2)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,
-h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var y=0!==(Q.current&1),q=g;do{var D;if(D=13===q.tag){var t=q.memoizedState;if(null!==t)D=null!==t.dehydrated?!0:!1;else{var z=q.memoizedProps;D=void 0===z.fallback?!1:!0!==z.unstable_avoidThisFallback?!0:y?!1:!0}}if(D){var B=q.updateQueue;if(null===B){var u=new Set;u.add(l);q.updateQueue=u}else B.add(l);if(0===(q.mode&2)){q.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var v=Dg(-1,1);v.tag=2;Eg(h,
-v)}h.lanes|=1;break a}k=void 0;h=b;var C=f.pingCache;null===C?(C=f.pingCache=new Yi,k=new Set,C.set(l,k)):(k=C.get(l),void 0===k&&(k=new Set,C.set(l,k)));if(!k.has(h)){k.add(h);var w=nk.bind(null,f,l,h);l.then(w,w)}q.flags|=4096;q.lanes=b;break a}q=q.return}while(null!==q);k=Error((Sa(h.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==
-V&&(V=2);k=Wi(k,h);q=g;do{switch(q.tag){case 3:f=k;q.flags|=4096;b&=-b;q.lanes|=b;var A=Zi(q,f,b);Fg(q,A);break a;case 1:f=k;var m=q.type,J=q.stateNode;if(0===(q.flags&64)&&("function"===typeof m.getDerivedStateFromError||null!==J&&"function"===typeof J.componentDidCatch&&(null===cj||!cj.has(J)))){q.flags|=4096;b&=-b;q.lanes|=b;var M=bj(q,f,b);Fg(q,M);break a}}q=q.return}while(null!==q)}ok(c)}catch(oa){b=oa;Y===c&&null!==c&&(Y=c=c.return);continue}break}while(1)}
-function ck(){var a=yj.current;yj.current=Kh;return null===a?Kh:a}function fk(a){var b=x.__interactionsRef.current;x.__interactionsRef.current=a.memoizedInteractions;return b}function ik(a,b){var c=X;X|=16;var d=ck();if(U!==a||W!==b)dk(a,b),ek(a,b);b=fk(a);do try{pk();break}catch(e){hk(a,e)}while(1);ug();x.__interactionsRef.current=b;X=c;yj.current=d;if(null!==Y)throw Error(E(261));U=null;W=0;return V}function pk(){for(;null!==Y;)qk(Y)}function gk(){for(;null!==Y&&!Uf();)qk(Y)}
-function qk(a){var b=a.alternate;0!==(a.mode&8)?(ki=ii(),0>a.actualStartTime&&(a.actualStartTime=ii()),b=rk(b,a,Aj),li(a,!0)):b=rk(b,a,Aj);a.memoizedProps=a.pendingProps;null===b?ok(a):Y=b;zj.current=null}
-function ok(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){if(0===(b.mode&8))c=Qi(c,b,Aj);else{var d=b;ki=ii();0>d.actualStartTime&&(d.actualStartTime=ii());c=Qi(c,b,Aj);li(b,!1)}if(null!==c){Y=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(Aj&1073741824)||0===(c.mode&4)){d=0;if(0!==(c.mode&8)){for(var e=c.actualDuration,f=c.selfBaseDuration,g=null===c.alternate||c.child!==c.alternate.child,h=c.child;null!==h;)d|=h.lanes|h.childLanes,g&&(e+=h.actualDuration),
-f+=h.treeBaseDuration,h=h.sibling;13===c.tag&&null!==c.memoizedState&&(g=c.child,null!==g&&(f-=g.treeBaseDuration));c.actualDuration=e;c.treeBaseDuration=f}else for(e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==a.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=
-b,a.lastEffect=b))}else{c=Vi(b);if(null!==c){c.flags&=2047;Y=c;return}if(0!==(b.mode&8)){li(b,!1);c=b.actualDuration;for(d=b.child;null!==d;)c+=d.actualDuration,d=d.sibling;b.actualDuration=c}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){Y=b;return}Y=b=a}while(null!==b);0===V&&(V=5)}function jk(a){var b=ig();kg(99,sk.bind(null,a,b));return null}
-function sk(a,b){do bk();while(null!==Ij);if(0!==(X&48))throw Error(E(327));var c=a.finishedWork,d=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(E(177));a.callbackNode=null;var e=c.lanes|c.childLanes,f=e,g=a.pendingLanes&~f;a.pendingLanes=f;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=f;a.mutableReadLanes&=f;a.entangledLanes&=f;f=a.entanglements;for(var h=a.eventTimes,k=a.expirationTimes;0<g;){var l=31-Xc(g),p=1<<l;f[l]=0;h[l]=-1;
-k[l]=-1;g&=~p}null!==Nj&&0===(e&24)&&Nj.has(a)&&Nj.delete(a);a===U&&(Y=U=null,W=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){f=X;X|=32;h=fk(a);zj.current=null;mf=hd;k=Pe();if(Qe(k)){if("selectionStart"in k)g={start:k.selectionStart,end:k.selectionEnd};else a:{g=(g=k.ownerDocument)&&g.defaultView||window;var y=g.getSelection&&g.getSelection();if(y&&0!==y.rangeCount){g=y.anchorNode;l=y.anchorOffset;p=y.focusNode;y=y.focusOffset;try{g.nodeType,
-p.nodeType}catch(ib){g=null;break a}var q=0,D=-1,t=-1,z=0,B=0,u=k,v=null;b:for(;;){for(var C;;){u!==g||0!==l&&3!==u.nodeType||(D=q+l);u!==p||0!==y&&3!==u.nodeType||(t=q+y);3===u.nodeType&&(q+=u.nodeValue.length);if(null===(C=u.firstChild))break;v=u;u=C}for(;;){if(u===k)break b;v===g&&++z===l&&(D=q);v===p&&++B===y&&(t=q);if(null!==(C=u.nextSibling))break;u=v;v=u.parentNode}u=C}g=-1===D||-1===t?null:{start:D,end:t}}else g=null}g=g||{start:0,end:0}}else g=null;nf={focusedElem:k,selectionRange:g};hd=
-!1;Uj=null;Vj=!1;Z=e;do try{tk()}catch(ib){if(null===Z)throw Error(E(330));fj(Z,ib);Z=Z.nextEffect}while(null!==Z);Uj=null;ji=ii();Z=e;do try{for(k=a;null!==Z;){var w=Z.flags;w&16&&rb(Z.stateNode,"");if(w&128){var A=Z.alternate;if(null!==A){var m=A.ref;null!==m&&("function"===typeof m?m(null):m.current=null)}}switch(w&1038){case 2:pj(Z);Z.flags&=-3;break;case 6:pj(Z);Z.flags&=-3;sj(Z.alternate,Z);break;case 1024:Z.flags&=-1025;break;case 1028:Z.flags&=-1025;sj(Z.alternate,Z);break;case 4:sj(Z.alternate,
-Z);break;case 8:g=Z;mj(k,g);var J=g.alternate;nj(g);null!==J&&nj(J)}Z=Z.nextEffect}}catch(ib){if(null===Z)throw Error(E(330));fj(Z,ib);Z=Z.nextEffect}while(null!==Z);m=nf;A=Pe();w=m.focusedElem;k=m.selectionRange;if(A!==w&&w&&w.ownerDocument&&Oe(w.ownerDocument.documentElement,w)){null!==k&&Qe(w)&&(A=k.start,m=k.end,void 0===m&&(m=A),"selectionStart"in w?(w.selectionStart=A,w.selectionEnd=Math.min(m,w.value.length)):(m=(A=w.ownerDocument||document)&&A.defaultView||window,m.getSelection&&(m=m.getSelection(),
-g=w.textContent.length,J=Math.min(k.start,g),k=void 0===k.end?J:Math.min(k.end,g),!m.extend&&J>k&&(g=k,k=J,J=g),g=Ne(w,J),l=Ne(w,k),g&&l&&(1!==m.rangeCount||m.anchorNode!==g.node||m.anchorOffset!==g.offset||m.focusNode!==l.node||m.focusOffset!==l.offset)&&(A=A.createRange(),A.setStart(g.node,g.offset),m.removeAllRanges(),J>k?(m.addRange(A),m.extend(l.node,l.offset)):(A.setEnd(l.node,l.offset),m.addRange(A))))));A=[];for(m=w;m=m.parentNode;)1===m.nodeType&&A.push({element:m,left:m.scrollLeft,top:m.scrollTop});
-"function"===typeof w.focus&&w.focus();for(w=0;w<A.length;w++)m=A[w],m.element.scrollLeft=m.left,m.element.scrollTop=m.top}hd=!!mf;nf=mf=null;a.current=c;Z=e;do try{for(w=a;null!==Z;){var M=Z.flags;M&36&&hj(w,Z.alternate,Z);if(M&128){A=void 0;var oa=Z.ref;if(null!==oa){var xa=Z.stateNode;switch(Z.tag){case 5:A=xa;break;default:A=xa}"function"===typeof oa?oa(A):oa.current=A}}Z=Z.nextEffect}}catch(ib){if(null===Z)throw Error(E(330));fj(Z,ib);Z=Z.nextEffect}while(null!==Z);Z=null;dg();x.__interactionsRef.current=
-h;X=f}else a.current=c,ji=ii();if(M=Hj)Hj=!1,Ij=a,Kj=d,Jj=b;else for(Z=e;null!==Z;)oa=Z.nextEffect,Z.nextEffect=null,Z.flags&8&&(xa=Z,xa.sibling=null,xa.stateNode=null),Z=oa;e=a.pendingLanes;if(0!==e){if(null!==Qj)for(oa=Qj,Qj=null,xa=0;xa<oa.length;xa++)uk(a,oa[xa],a.memoizedInteractions);Xj(a,e)}else cj=null;M||vk(a,d);1===e?a===Pj?Oj++:(Oj=0,Pj=a):Oj=0;c=c.stateNode;if(Pf&&"function"===typeof Pf.onCommitFiberRoot)try{Pf.onCommitFiberRoot(Of,c,b,64===(c.current.flags&64))}catch(ib){}Zj(a,P());if($i)throw $i=
-!1,a=aj,aj=null,a;if(0!==(X&8))return null;mg();return null}function tk(){for(;null!==Z;){var a=Z.alternate;Vj||null===Uj||(0!==(Z.flags&8)?fc(Z,Uj)&&(Vj=!0):13===Z.tag&&wj(a,Z)&&fc(Z,Uj)&&(Vj=!0));var b=Z.flags;0!==(b&256)&&gj(a,Z);0===(b&512)||Hj||(Hj=!0,lg(97,function(){bk();return null}));Z=Z.nextEffect}}function bk(){if(90!==Jj){var a=97<Jj?97:Jj;Jj=90;return kg(a,wk)}return!1}function jj(a,b){Lj.push(b,a);Hj||(Hj=!0,lg(97,function(){bk();return null}))}
-function ij(a,b){Mj.push(b,a);Hj||(Hj=!0,lg(97,function(){bk();return null}))}
-function wk(){if(null===Ij)return!1;var a=Ij,b=Kj;Ij=null;Kj=0;if(0!==(X&48))throw Error(E(331));var c=X;X|=32;var d=fk(a),e=Mj;Mj=[];for(var f=0;f<e.length;f+=2){var g=e[f],h=e[f+1],k=g.destroy;g.destroy=void 0;if("function"===typeof k)try{k()}catch(p){if(null===h)throw Error(E(330));fj(h,p)}}e=Lj;Lj=[];for(f=0;f<e.length;f+=2){g=e[f];h=e[f+1];try{var l=g.create;g.destroy=l()}catch(p){if(null===h)throw Error(E(330));fj(h,p)}}for(e=a.current.firstEffect;null!==e;)l=e.nextEffect,e.nextEffect=null,
-e.flags&8&&(e.sibling=null,e.stateNode=null),e=l;x.__interactionsRef.current=d;vk(a,b);X=c;mg();return!0}function xk(a,b,c){b=Wi(c,b);b=Zi(a,b,1);Eg(a,b);b=Lg();a=Wj(a,1);null!==a&&(bd(a,1,b),Zj(a,b),Xj(a,1))}
-function fj(a,b){if(3===a.tag)xk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){xk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===cj||!cj.has(d))){a=Wi(b,a);var e=bj(c,a,1);Eg(c,e);e=Lg();c=Wj(c,1);if(null!==c)bd(c,1,e),Zj(c,e),Xj(c,1);else if("function"===typeof d.componentDidCatch&&(null===cj||!cj.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}
-function nk(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Lg();a.pingedLanes|=a.suspendedLanes&c;U===a&&(W&c)===c&&(4===V||3===V&&(W&62914560)===W&&500>P()-tj?dk(a,0):Ej|=c);Zj(a,b);Xj(a,c)}function vj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===ig()?1:2:(0===Sj&&(Sj=Dj),b=$c(62914560&~Sj),0===b&&(b=4194304)));c=Lg();a=Wj(a,b);null!==a&&(bd(a,b,c),Zj(a,c),Xj(a,b))}var rk;
-rk=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||Ff.current)yg=!0;else if(0!==(c&d))yg=0!==(a.flags&16384)?!0:!1;else{yg=!1;switch(b.tag){case 3:Bi(b);wh();break;case 5:kh(b);break;case 1:If(b.type)&&Mf(b);break;case 4:ih(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;N(qg,e._currentValue);e._currentValue=d;break;case 12:0!==(c&b.childLanes)&&(b.flags|=4);d=b.stateNode;d.effectDuration=0;d.passiveEffectDuration=0;break;case 13:if(null!==
-b.memoizedState){if(0!==(c&b.child.childLanes))return Di(a,b,c);N(Q,Q.current&1);b=qi(a,b,c);return null!==b?b.sibling:null}N(Q,Q.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Ki(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);N(Q,Q.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,vi(a,b,c)}return qi(a,b,c)}else yg=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=
-null,b.flags|=2);a=b.pendingProps;e=Hf(b,O.current);xg(b,c);e=Gh(null,b,d,a,e,c);b.flags|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(If(d)){var f=!0;Mf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;Bg(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&Kg(b,d,g,a);e.updater=Og;b.stateNode=e;e._reactInternals=b;Sg(b,d,a,c);b=Ai(null,b,d,!0,f,c)}else b.tag=0,oi(null,b,e,
-c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=yk(e);a=pg(e,a);switch(f){case 0:b=ui(null,b,e,a,c);break a;case 1:b=zi(null,b,e,a,c);break a;case 11:b=pi(null,b,e,a,c);break a;case 14:b=ri(null,b,e,pg(e.type,a),d,c);break a}throw Error(E(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:pg(d,e),ui(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,
-e=b.elementType===d?e:pg(d,e),zi(a,b,d,e,c);case 3:Bi(b);d=b.updateQueue;if(null===a||null===d)throw Error(E(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;Cg(a,b);Gg(b,d,null,c);d=b.memoizedState.element;if(d===e)wh(),b=qi(a,b,c);else{e=b.stateNode;if(f=e.hydrate)oh=tf(b.stateNode.containerInfo.firstChild),nh=b,f=ph=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],xh.push(f);c=ch(b,null,d,c);for(b.child=
-c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else oi(a,b,d,c),wh();b=b.child}return b;case 5:return kh(b),null===a&&th(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,pf(d,e)?g=null:null!==f&&pf(d,f)&&(b.flags|=16),yi(a,b),oi(a,b,g,c),b.child;case 6:return null===a&&th(b),null;case 13:return Di(a,b,c);case 4:return ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=bh(b,null,d,c):oi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?
-e:pg(d,e),pi(a,b,d,e,c);case 7:return oi(a,b,b.pendingProps,c),b.child;case 8:return oi(a,b,b.pendingProps.children,c),b.child;case 12:return b.flags|=4,d=b.stateNode,d.effectDuration=0,d.passiveEffectDuration=0,oi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;N(qg,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=Je(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):
-1073741823)|0,0===f){if(g.children===e.children&&!Ff.current){b=qi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Dg(-1,c&-c),l.tag=2,Eg(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);wg(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=
-null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}oi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,xg(b,c),e=zg(e,f.unstable_observedBits),d=d(e),b.flags|=1,oi(a,b,d,c),b.child;case 14:return e=b.type,f=pg(e,b.pendingProps),f=pg(e.type,f),ri(a,b,e,f,d,c);case 15:return ti(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:pg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=
-2),b.tag=1,If(d)?(a=!0,Mf(b)):a=!1,xg(b,c),Qg(b,d,e),Sg(b,d,e,c),Ai(null,b,d,!0,a,c);case 19:return Ki(a,b,c);case 23:return vi(a,b,c);case 24:return vi(a,b,c)}throw Error(E(156,b.tag));};function xi(a){null===Qj?Qj=[a]:Qj.push(a)}
-function uk(a,b,c){if(0<c.size){var d=a.pendingInteractionMap,e=d.get(b);null!=e?c.forEach(function(a){e.has(a)||a.__count++;e.add(a)}):(d.set(b,new Set(c)),c.forEach(function(a){a.__count++}));d=x.__subscriberRef.current;if(null!==d)d.onWorkScheduled(c,1E3*b+a.interactionThreadID)}}function Xj(a,b){uk(a,b,x.__interactionsRef.current)}
-function ek(a,b){var c=new Set;a.pendingInteractionMap.forEach(function(a,d){0!==(b&d)&&a.forEach(function(a){return c.add(a)})});a.memoizedInteractions=c;if(0<c.size){var d=x.__subscriberRef.current;if(null!==d){a=1E3*b+a.interactionThreadID;try{d.onWorkStarted(c,a)}catch(e){lg(99,function(){throw e;})}}}}
-function vk(a,b){var c=a.pendingLanes;try{var d=x.__subscriberRef.current;if(null!==d&&0<a.memoizedInteractions.size)d.onWorkStopped(a.memoizedInteractions,1E3*b+a.interactionThreadID)}catch(f){lg(99,function(){throw f;})}finally{var e=a.pendingInteractionMap;e.forEach(function(a,b){0===(c&b)&&(e.delete(b),a.forEach(function(a){a.__count--;if(null!==d&&0===a.__count)try{d.onInteractionScheduledWorkCompleted(a)}catch(k){lg(99,function(){throw k;})}}))})}}
-function zk(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null;this.actualDuration=0;this.actualStartTime=-1;this.treeBaseDuration=this.selfBaseDuration=0}
-function rh(a,b,c,d){return new zk(a,b,c,d)}function si(a){a=a.prototype;return!(!a||!a.isReactComponent)}function yk(a){if("function"===typeof a)return si(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Ba)return 11;if(a===Ea)return 14}return 2}
-function Xg(a,b){var c=a.alternate;null===c?(c=rh(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null,c.actualDuration=0,c.actualStartTime=-1);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:
-{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;c.selfBaseDuration=a.selfBaseDuration;c.treeBaseDuration=a.treeBaseDuration;return c}
-function Zg(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)si(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case va:return ah(c.children,e,f,b);case Ia:g=8;e|=16;break;case wa:g=8;e|=1;break;case ya:return a=rh(12,c,b,e|8),a.elementType=ya,a.type=ya,a.lanes=f,a.stateNode={effectDuration:0,passiveEffectDuration:0},a;case Ca:return a=rh(13,c,b,e),a.type=Ca,a.elementType=Ca,a.lanes=f,a;case Da:return a=rh(19,c,b,e),a.elementType=Da,a.lanes=f,a;case Ja:return Fi(c,e,f,b);case Ka:return a=
-rh(24,c,b,e),a.elementType=Ka,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case za:g=10;break a;case Aa:g=9;break a;case Ba:g=11;break a;case Ea:g=14;break a;case Fa:g=16;d=null;break a;case Ga:g=22;break a}throw Error(E(130,null==a?a:typeof a,""));}b=rh(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function ah(a,b,c,d){a=rh(7,a,d,b);a.lanes=c;return a}function Fi(a,b,c,d){a=rh(23,a,d,b);a.elementType=Ja;a.lanes=c;return a}
-function Yg(a,b,c){a=rh(6,a,null,b);a.lanes=c;return a}function $g(a,b,c){b=rh(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
-function Ak(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=ad(0);this.expirationTimes=ad(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=ad(0);this.mutableSourceEagerHydrationData=null;this.interactionThreadID=
-x.unstable_getThreadID();this.memoizedInteractions=new Set;this.pendingInteractionMap=new Map}function Bk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:ua,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
-function Ck(a,b,c,d){var e=b.current,f=Lg(),g=Mg(e);a:if(c){c=c._reactInternals;b:{if(ac(c)!==c||1!==c.tag)throw Error(E(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(If(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(E(171));}if(1===c.tag){var k=c.type;if(If(k)){c=Lf(c,k,h);break a}}c=h}else c=Ef;null===b.context?b.context=c:b.pendingContext=c;b=Dg(f,g);b.payload={element:a};d=void 0===d?null:d;null!==
-d&&(b.callback=d);Eg(e,b);Ng(e,g,f);return g}function Dk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Ek(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function Fk(a,b){Ek(a,b);(a=a.alternate)&&Ek(a,b)}function Gk(){return null}
-function Hk(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new Ak(a,b,null!=c&&!0===c.hydrate);b=2===b?7:1===b?3:0;Qf&&(b|=8);b=rh(3,null,null,b);c.current=b;b.stateNode=c;Bg(b);a[hf]=c.current;ef(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}
-Hk.prototype.render=function(a){Ck(a,this._internalRoot,null,null)};Hk.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;Ck(null,a,null,function(){b[hf]=null})};function Ik(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}
-function Jk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new Hk(a,0,b?{hydrate:!0}:void 0)}
-function Kk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=Dk(g);h.call(a)}}Ck(b,g,a,e)}else{f=c._reactRootContainer=Jk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=Dk(g);k.call(a)}}mk(function(){Ck(b,g,a,e)})}return Dk(g)}gc=function(a){if(13===a.tag){var b=Lg();Ng(a,4,b);Fk(a,4)}};hc=function(a){if(13===a.tag){var b=Lg();Ng(a,67108864,b);Fk(a,67108864)}};
-ic=function(a){if(13===a.tag){var b=Lg(),c=Mg(a);Ng(a,c,b);Fk(a,c)}};jc=function(a,b){return b()};
-Ab=function(a,b,c){switch(b){case "input":bb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Fb(d);if(!e)throw Error(E(90));Xa(d);bb(d,e)}}}break;case "textarea":kb(a,c);break;case "select":b=c.value,null!=b&&gb(a,!!c.multiple,b,!1)}};Ib=lk;
-Jb=function(a,b,c,d,e){var f=X;X|=4;try{return kg(98,a.bind(null,b,c,d,e))}finally{X=f,0===X&&(Gj(),mg())}};Kb=function(){0===(X&49)&&(kk(),bk())};Lb=function(a,b){var c=X;X|=2;try{return a(b)}finally{X=c,0===X&&(Gj(),mg())}};function Lk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Ik(b))throw Error(E(200));return Bk(a,b,null,c)}var Mk={Events:[Eb,we,Fb,Gb,Hb,bk,{current:!1}]},Nk={findFiberByHostInstance:yc,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"};
-var Ok={bundleType:Nk.bundleType,version:Nk.version,rendererPackageName:Nk.rendererPackageName,rendererConfig:Nk.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:sa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=ec(a);return null===a?null:a.stateNode},findFiberByHostInstance:Nk.findFiberByHostInstance||
-Gk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Pk=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pk.isDisabled&&Pk.supportsFiber)try{Of=Pk.inject(Ok),Pf=Pk}catch(a){}}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Mk;exports.createPortal=Lk;
-exports.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(E(188));throw Error(E(268,Object.keys(a)));}a=ec(b);a=null===a?null:a.stateNode;return a};exports.flushSync=function(a,b){var c=X;if(0!==(c&48))return a(b);X|=1;try{if(a)return kg(99,a.bind(null,b))}finally{X=c,mg()}};exports.hydrate=function(a,b,c){if(!Ik(b))throw Error(E(200));return Kk(null,a,b,!0,c)};
-exports.render=function(a,b,c){if(!Ik(b))throw Error(E(200));return Kk(null,a,b,!1,c)};exports.unmountComponentAtNode=function(a){if(!Ik(a))throw Error(E(40));return a._reactRootContainer?(mk(function(){Kk(null,null,a,!1,function(){a._reactRootContainer=null;a[hf]=null})}),!0):!1};exports.unstable_batchedUpdates=lk;exports.unstable_createPortal=function(a,b){return Lk(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
-exports.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Ik(c))throw Error(E(200));if(null==a||void 0===a._reactInternals)throw Error(E(38));return Kk(a,b,c,!1,d)};exports.version="17.0.2";
diff --git a/node_modules/react-dom/index.js b/node_modules/react-dom/index.js
deleted file mode 100644
index 0eb376e..0000000
--- a/node_modules/react-dom/index.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-function checkDCE() {
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
- if (
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
- ) {
- return;
- }
- if (process.env.NODE_ENV !== 'production') {
- // This branch is unreachable because this function is only called
- // in production, but the condition is true only in development.
- // Therefore if the branch is still here, dead code elimination wasn't
- // properly applied.
- // Don't change the message. React DevTools relies on it. Also make sure
- // this message doesn't occur elsewhere in this function, or it will cause
- // a false positive.
- throw new Error('^_^');
- }
- try {
- // Verify that the code above has been dead code eliminated (DCE'd).
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
- } catch (err) {
- // DevTools shouldn't crash React, no matter what.
- // We should still report in case we break this code.
- console.error(err);
- }
-}
-
-if (process.env.NODE_ENV === 'production') {
- // DCE check should happen before ReactDOM bundle executes so that
- // DevTools can report bad minification during injection.
- checkDCE();
- module.exports = require('./cjs/react-dom.production.min.js');
-} else {
- module.exports = require('./cjs/react-dom.development.js');
-}
diff --git a/node_modules/react-dom/package.json b/node_modules/react-dom/package.json
deleted file mode 100644
index c23d7cd..0000000
--- a/node_modules/react-dom/package.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "name": "react-dom",
- "version": "17.0.2",
- "description": "React package for working with the DOM.",
- "main": "index.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/facebook/react.git",
- "directory": "packages/react-dom"
- },
- "keywords": [
- "react"
- ],
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/facebook/react/issues"
- },
- "homepage": "https://reactjs.org/",
- "dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1",
- "scheduler": "^0.20.2"
- },
- "peerDependencies": {
- "react": "17.0.2"
- },
- "files": [
- "LICENSE",
- "README.md",
- "build-info.json",
- "index.js",
- "profiling.js",
- "server.js",
- "server.browser.js",
- "server.node.js",
- "test-utils.js",
- "cjs/",
- "umd/"
- ],
- "browser": {
- "./server.js": "./server.browser.js",
- "./unstable-fizz.js": "./unstable-fizz.browser.js"
- },
- "browserify": {
- "transform": [
- "loose-envify"
- ]
- }
-}
diff --git a/node_modules/react-dom/profiling.js b/node_modules/react-dom/profiling.js
deleted file mode 100644
index 91f89f0..0000000
--- a/node_modules/react-dom/profiling.js
+++ /dev/null
@@ -1,38 +0,0 @@
-'use strict';
-
-function checkDCE() {
- /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
- if (
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
- typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
- ) {
- return;
- }
- if (process.env.NODE_ENV !== 'production') {
- // This branch is unreachable because this function is only called
- // in production, but the condition is true only in development.
- // Therefore if the branch is still here, dead code elimination wasn't
- // properly applied.
- // Don't change the message. React DevTools relies on it. Also make sure
- // this message doesn't occur elsewhere in this function, or it will cause
- // a false positive.
- throw new Error('^_^');
- }
- try {
- // Verify that the code above has been dead code eliminated (DCE'd).
- __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
- } catch (err) {
- // DevTools shouldn't crash React, no matter what.
- // We should still report in case we break this code.
- console.error(err);
- }
-}
-
-if (process.env.NODE_ENV === 'production') {
- // DCE check should happen before ReactDOM bundle executes so that
- // DevTools can report bad minification during injection.
- checkDCE();
- module.exports = require('./cjs/react-dom.profiling.min.js');
-} else {
- module.exports = require('./cjs/react-dom.development.js');
-}
diff --git a/node_modules/react-dom/server.browser.js b/node_modules/react-dom/server.browser.js
deleted file mode 100644
index 32b4953..0000000
--- a/node_modules/react-dom/server.browser.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-dom-server.browser.production.min.js');
-} else {
- module.exports = require('./cjs/react-dom-server.browser.development.js');
-}
diff --git a/node_modules/react-dom/server.js b/node_modules/react-dom/server.js
deleted file mode 100644
index 02f1553..0000000
--- a/node_modules/react-dom/server.js
+++ /dev/null
@@ -1,3 +0,0 @@
-'use strict';
-
-module.exports = require('./server.node');
diff --git a/node_modules/react-dom/server.node.js b/node_modules/react-dom/server.node.js
deleted file mode 100644
index c45c37a..0000000
--- a/node_modules/react-dom/server.node.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-dom-server.node.production.min.js');
-} else {
- module.exports = require('./cjs/react-dom-server.node.development.js');
-}
diff --git a/node_modules/react-dom/test-utils.js b/node_modules/react-dom/test-utils.js
deleted file mode 100644
index bc23ebe..0000000
--- a/node_modules/react-dom/test-utils.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-dom-test-utils.production.min.js');
-} else {
- module.exports = require('./cjs/react-dom-test-utils.development.js');
-}
diff --git a/node_modules/react-dom/umd/react-dom-server.browser.development.js b/node_modules/react-dom/umd/react-dom-server.browser.development.js
deleted file mode 100644
index 4dd5d34..0000000
--- a/node_modules/react-dom/umd/react-dom-server.browser.development.js
+++ /dev/null
@@ -1,4341 +0,0 @@
-/** @license React v17.0.2
- * react-dom-server.browser.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function (global, factory) {
- 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));
-}(this, (function (exports, React) { 'use strict';
-
- // Do not require this module directly! Use normal `invariant` calls with
- // template literal strings. The messages will be replaced with error codes
- // during build.
- function formatProdErrorMessage(code) {
- var url = 'https://reactjs.org/docs/error-decoder.html?invariant=' + code;
-
- for (var i = 1; i < arguments.length; i++) {
- url += '&args[]=' + encodeURIComponent(arguments[i]);
- }
-
- return "Minified React error #" + code + "; visit " + url + " for the full message or " + 'use the non-minified dev environment for full errors and additional ' + 'helpful warnings.';
- }
-
- // TODO: this is special because it gets imported during build.
- var ReactVersion = '17.0.2';
-
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
- // by calls to these methods by a Babel plugin.
- //
- // In PROD (or in packages without access to React internals),
- // they are left as they are instead.
-
- function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
- }
- function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
- }
-
- function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
- }
-
- var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _assign = ReactInternals.assign;
-
- // ATTENTION
- // When adding new symbols to this file,
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var REACT_ELEMENT_TYPE = 0xeac7;
- var REACT_PORTAL_TYPE = 0xeaca;
- var REACT_FRAGMENT_TYPE = 0xeacb;
- var REACT_STRICT_MODE_TYPE = 0xeacc;
- var REACT_PROFILER_TYPE = 0xead2;
- var REACT_PROVIDER_TYPE = 0xeacd;
- var REACT_CONTEXT_TYPE = 0xeace;
- var REACT_FORWARD_REF_TYPE = 0xead0;
- var REACT_SUSPENSE_TYPE = 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
- var REACT_MEMO_TYPE = 0xead3;
- var REACT_LAZY_TYPE = 0xead4;
- var REACT_BLOCK_TYPE = 0xead9;
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
- var REACT_SCOPE_TYPE = 0xead7;
- var REACT_OPAQUE_ID_TYPE = 0xeae0;
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
- var REACT_OFFSCREEN_TYPE = 0xeae2;
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
- if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
- }
-
- function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
- }
-
- function getContextName(type) {
- return type.displayName || 'Context';
- }
-
- function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case REACT_PROFILER_TYPE:
- return 'Profiler';
-
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
-
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
- }
-
- // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
- var enableSuspenseServerRenderer = false;
-
- // Helpers to patch console.logs to avoid logging during side-effect free
- // replaying on render function. This currently only patches the object
- // lazily which won't cover if the log function was extracted eagerly.
- // We could also eagerly patch the method.
- var disabledDepth = 0;
- var prevLog;
- var prevInfo;
- var prevWarn;
- var prevError;
- var prevGroup;
- var prevGroupCollapsed;
- var prevGroupEnd;
-
- function disabledLog() {}
-
- disabledLog.__reactDisabledLog = true;
- function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
- }
- function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: _assign({}, props, {
- value: prevLog
- }),
- info: _assign({}, props, {
- value: prevInfo
- }),
- warn: _assign({}, props, {
- value: prevWarn
- }),
- error: _assign({}, props, {
- value: prevError
- }),
- group: _assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: _assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: _assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
- }
-
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
- var prefix;
- function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
- }
- var reentry = false;
- var componentFrameCache;
-
- {
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
- }
-
- function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
- }
- function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
- }
-
- function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
- }
-
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case REACT_SUSPENSE_TYPE:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
- }
-
- var loggedTypeFailures = {};
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
-
- function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame.setExtraStackFrame(null);
- }
- }
- }
-
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
- }
-
- var didWarnAboutInvalidateContextType;
-
- {
- didWarnAboutInvalidateContextType = new Set();
- }
-
- var emptyObject = {};
-
- {
- Object.freeze(emptyObject);
- }
-
- function maskContext(type, context) {
- var contextTypes = type.contextTypes;
-
- if (!contextTypes) {
- return emptyObject;
- }
-
- var maskedContext = {};
-
- for (var contextName in contextTypes) {
- maskedContext[contextName] = context[contextName];
- }
-
- return maskedContext;
- }
-
- function checkContextTypes(typeSpecs, values, location) {
- {
- checkPropTypes(typeSpecs, values, location, 'Component');
- }
- }
-
- function validateContextBounds(context, threadID) {
- // If we don't have enough slots in this context to store this threadID,
- // fill it in without leaving any holes to ensure that the VM optimizes
- // this as non-holey index properties.
- // (Note: If `react` package is < 16.6, _threadCount is undefined.)
- for (var i = context._threadCount | 0; i <= threadID; i++) {
- // We assume that this is the same as the defaultValue which might not be
- // true if we're rendering inside a secondary renderer but they are
- // secondary because these use cases are very rare.
- context[i] = context._currentValue2;
- context._threadCount = i + 1;
- }
- }
- function processContext(type, context, threadID, isClass) {
- if (isClass) {
- var contextType = type.contextType;
-
- {
- if ('contextType' in type) {
- var isValid = // Allow null for conditional declaration
- contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
-
- if (!isValid && !didWarnAboutInvalidateContextType.has(type)) {
- didWarnAboutInvalidateContextType.add(type);
- var addendum = '';
-
- if (contextType === undefined) {
- 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.';
- } else if (typeof contextType !== 'object') {
- addendum = ' However, it is set to a ' + typeof contextType + '.';
- } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
- addendum = ' Did you accidentally pass the Context.Provider instead?';
- } else if (contextType._context !== undefined) {
- // <Context.Consumer>
- addendum = ' Did you accidentally pass the Context.Consumer instead?';
- } else {
- addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
- }
-
- error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(type) || 'Component', addendum);
- }
- }
- }
-
- if (typeof contextType === 'object' && contextType !== null) {
- validateContextBounds(contextType, threadID);
- return contextType[threadID];
- }
-
- {
- var maskedContext = maskContext(type, context);
-
- {
- if (type.contextTypes) {
- checkContextTypes(type.contextTypes, maskedContext, 'context');
- }
- }
-
- return maskedContext;
- }
- } else {
- {
- var _maskedContext = maskContext(type, context);
-
- {
- if (type.contextTypes) {
- checkContextTypes(type.contextTypes, _maskedContext, 'context');
- }
- }
-
- return _maskedContext;
- }
- }
- }
-
- var nextAvailableThreadIDs = new Uint16Array(16);
-
- for (var i = 0; i < 15; i++) {
- nextAvailableThreadIDs[i] = i + 1;
- }
-
- nextAvailableThreadIDs[15] = 0;
-
- function growThreadCountAndReturnNextAvailable() {
- var oldArray = nextAvailableThreadIDs;
- var oldSize = oldArray.length;
- var newSize = oldSize * 2;
-
- if (!(newSize <= 0x10000)) {
- {
- throw Error( "Maximum number of concurrent React renderers exceeded. This can happen if you are not properly destroying the Readable provided by React. Ensure that you call .destroy() on it if you no longer want to read from it, and did not read to the end. If you use .pipe() this should be automatic." );
- }
- }
-
- var newArray = new Uint16Array(newSize);
- newArray.set(oldArray);
- nextAvailableThreadIDs = newArray;
- nextAvailableThreadIDs[0] = oldSize + 1;
-
- for (var _i = oldSize; _i < newSize - 1; _i++) {
- nextAvailableThreadIDs[_i] = _i + 1;
- }
-
- nextAvailableThreadIDs[newSize - 1] = 0;
- return oldSize;
- }
-
- function allocThreadID() {
- var nextID = nextAvailableThreadIDs[0];
-
- if (nextID === 0) {
- return growThreadCountAndReturnNextAvailable();
- }
-
- nextAvailableThreadIDs[0] = nextAvailableThreadIDs[nextID];
- return nextID;
- }
- function freeThreadID(id) {
- nextAvailableThreadIDs[id] = nextAvailableThreadIDs[0];
- nextAvailableThreadIDs[0] = id;
- }
-
- // A reserved attribute.
- // It is handled by React separately and shouldn't be written to the DOM.
- var RESERVED = 0; // A simple string attribute.
- // Attributes that aren't in the filter are presumed to have this type.
-
- var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
- // "enumerated" attributes with "true" and "false" as possible values.
- // When true, it should be set to a "true" string.
- // When false, it should be set to a "false" string.
-
- var BOOLEANISH_STRING = 2; // A real boolean attribute.
- // When true, it should be present (set either to an empty string or its name).
- // When false, it should be omitted.
-
- var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
- // When true, it should be present (set either to an empty string or its name).
- // When false, it should be omitted.
- // For any other value, should be present with that value.
-
- var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
- // When falsy, it should be removed.
-
- var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
- // When falsy, it should be removed.
-
- var POSITIVE_NUMERIC = 6;
-
- /* eslint-disable max-len */
- 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";
- /* eslint-enable max-len */
-
- var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
- var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
- var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var illegalAttributeNameCache = {};
- var validatedAttributeNameCache = {};
- function isAttributeNameSafe(attributeName) {
- if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
- return true;
- }
-
- if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
- return false;
- }
-
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
- validatedAttributeNameCache[attributeName] = true;
- return true;
- }
-
- illegalAttributeNameCache[attributeName] = true;
-
- {
- error('Invalid attribute name: `%s`', attributeName);
- }
-
- return false;
- }
- function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null) {
- return propertyInfo.type === RESERVED;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
- return true;
- }
-
- return false;
- }
- function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null && propertyInfo.type === RESERVED) {
- return false;
- }
-
- switch (typeof value) {
- case 'function': // $FlowIssue symbol is perfectly valid here
-
- case 'symbol':
- // eslint-disable-line
- return true;
-
- case 'boolean':
- {
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
- return !propertyInfo.acceptsBooleans;
- } else {
- var prefix = name.toLowerCase().slice(0, 5);
- return prefix !== 'data-' && prefix !== 'aria-';
- }
- }
-
- default:
- return false;
- }
- }
- function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
- if (value === null || typeof value === 'undefined') {
- return true;
- }
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
- return true;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
-
- switch (propertyInfo.type) {
- case BOOLEAN:
- return !value;
-
- case OVERLOADED_BOOLEAN:
- return value === false;
-
- case NUMERIC:
- return isNaN(value);
-
- case POSITIVE_NUMERIC:
- return isNaN(value) || value < 1;
- }
- }
-
- return false;
- }
- function getPropertyInfo(name) {
- return properties.hasOwnProperty(name) ? properties[name] : null;
- }
-
- function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
- this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
- this.attributeName = attributeName;
- this.attributeNamespace = attributeNamespace;
- this.mustUseProperty = mustUseProperty;
- this.propertyName = name;
- this.type = type;
- this.sanitizeURL = sanitizeURL;
- this.removeEmptyString = removeEmptyString;
- } // When adding attributes to this list, be sure to also add them to
- // the `possibleStandardNames` module to ensure casing and incorrect
- // name warnings.
-
-
- var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
-
- var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
- // elements (not just inputs). Now that ReactDOMInput assigns to the
- // defaultValue property -- do we need this?
- 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
- reservedProps.forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // A few React string attributes have a different name.
- // This is a mapping from React prop names to the attribute names.
-
- [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
- var name = _ref[0],
- attributeName = _ref[1];
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are "enumerated" HTML attributes that accept "true" and "false".
- // In React, we let users pass `true` and `false` even though technically
- // these aren't boolean attributes (they are coerced to strings).
-
- ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are "enumerated" SVG attributes that accept "true" and "false".
- // In React, we let users pass `true` and `false` even though technically
- // these aren't boolean attributes (they are coerced to strings).
- // Since these are SVG attributes, their attribute names are case-sensitive.
-
- ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are HTML boolean attributes.
-
- ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
- // on the client side because the browsers are inconsistent. Instead we call focus().
- 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
- 'itemScope'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are the few React props that we set as DOM properties
- // rather than attributes. These are all booleans.
-
- ['checked', // Note: `option.selected` is not updated if `select.multiple` is
- // disabled with `removeAttribute`. We have special logic for handling this.
- 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are HTML attributes that are "overloaded booleans": they behave like
- // booleans, but can also accept a string value.
-
- ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are HTML attributes that must be positive numbers.
-
- ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are HTML attributes that must be numbers.
-
- ['rowSpan', 'start'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- });
- var CAMELIZE = /[\-\:]([a-z])/g;
-
- var capitalize = function (token) {
- return token[1].toUpperCase();
- }; // This is a list of all SVG attributes that need special casing, namespacing,
- // or boolean value assignment. Regular attributes that just accept strings
- // and have the same names are omitted, just like in the HTML attribute filter.
- // Some of these attributes can be hard to find. This list was created by
- // scraping the MDN documentation.
-
-
- ['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' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // String SVG attributes with the xlink namespace.
-
- ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
- false);
- }); // String SVG attributes with the xml namespace.
-
- ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
- false);
- }); // These attribute exists both in HTML and SVG.
- // The attribute name is case-sensitive in SVG so we can't just use
- // the React name like we do for attributes that exist only in HTML.
-
- ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These attributes accept URLs. These must not allow javascript: URLS.
- // These will also need to accept Trusted Types object in the future.
-
- var xlinkHref = 'xlinkHref';
- properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
- 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
- false);
- ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- true, // sanitizeURL
- true);
- });
-
- // and any newline or tab are filtered out as if they're not part of the URL.
- // https://url.spec.whatwg.org/#url-parsing
- // Tab or newline are defined as \r\n\t:
- // https://infra.spec.whatwg.org/#ascii-tab-or-newline
- // A C0 control is a code point in the range \u0000 NULL to \u001F
- // INFORMATION SEPARATOR ONE, inclusive:
- // https://infra.spec.whatwg.org/#c0-control-or-space
-
- /* eslint-disable max-len */
-
- 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;
- var didWarn = false;
-
- function sanitizeURL(url) {
- {
- if (!didWarn && isJavaScriptProtocol.test(url)) {
- didWarn = true;
-
- 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));
- }
- }
- }
-
- // code copied and modified from escape-html
-
- /**
- * Module variables.
- * @private
- */
- var matchHtmlRegExp = /["'&<>]/;
- /**
- * Escapes special characters and HTML entities in a given html string.
- *
- * @param {string} string HTML string to escape for later insertion
- * @return {string}
- * @public
- */
-
- function escapeHtml(string) {
- var str = '' + string;
- var match = matchHtmlRegExp.exec(str);
-
- if (!match) {
- return str;
- }
-
- var escape;
- var html = '';
- var index;
- var lastIndex = 0;
-
- for (index = match.index; index < str.length; index++) {
- switch (str.charCodeAt(index)) {
- case 34:
- // "
- escape = '&quot;';
- break;
-
- case 38:
- // &
- escape = '&amp;';
- break;
-
- case 39:
- // '
- escape = '&#x27;'; // modified from escape-html; used to be '&#39'
-
- break;
-
- case 60:
- // <
- escape = '&lt;';
- break;
-
- case 62:
- // >
- escape = '&gt;';
- break;
-
- default:
- continue;
- }
-
- if (lastIndex !== index) {
- html += str.substring(lastIndex, index);
- }
-
- lastIndex = index + 1;
- html += escape;
- }
-
- return lastIndex !== index ? html + str.substring(lastIndex, index) : html;
- } // end code copied and modified from escape-html
-
- /**
- * Escapes text to prevent scripting attacks.
- *
- * @param {*} text Text value to escape.
- * @return {string} An escaped string.
- */
-
-
- function escapeTextForBrowser(text) {
- if (typeof text === 'boolean' || typeof text === 'number') {
- // this shortcircuit helps perf for types that we know will never have
- // special characters, especially given that this function is used often
- // for numeric dom ids.
- return '' + text;
- }
-
- return escapeHtml(text);
- }
-
- /**
- * Escapes attribute value to prevent scripting attacks.
- *
- * @param {*} value Value to escape.
- * @return {string} An escaped string.
- */
-
- function quoteAttributeValueForBrowser(value) {
- return '"' + escapeTextForBrowser(value) + '"';
- }
-
- function createMarkupForRoot() {
- return ROOT_ATTRIBUTE_NAME + '=""';
- }
- /**
- * Creates markup for a property.
- *
- * @param {string} name
- * @param {*} value
- * @return {?string} Markup string, or null if the property was invalid.
- */
-
- function createMarkupForProperty(name, value) {
- var propertyInfo = getPropertyInfo(name);
-
- if (name !== 'style' && shouldIgnoreAttribute(name, propertyInfo, false)) {
- return '';
- }
-
- if (shouldRemoveAttribute(name, value, propertyInfo, false)) {
- return '';
- }
-
- if (propertyInfo !== null) {
- var attributeName = propertyInfo.attributeName;
- var type = propertyInfo.type;
-
- if (type === BOOLEAN || type === OVERLOADED_BOOLEAN && value === true) {
- return attributeName + '=""';
- } else {
- if (propertyInfo.sanitizeURL) {
- value = '' + value;
- sanitizeURL(value);
- }
-
- return attributeName + '=' + quoteAttributeValueForBrowser(value);
- }
- } else if (isAttributeNameSafe(name)) {
- return name + '=' + quoteAttributeValueForBrowser(value);
- }
-
- return '';
- }
- /**
- * Creates markup for a custom property.
- *
- * @param {string} name
- * @param {*} value
- * @return {string} Markup string, or empty string if the property was invalid.
- */
-
- function createMarkupForCustomAttribute(name, value) {
- if (!isAttributeNameSafe(name) || value == null) {
- return '';
- }
-
- return name + '=' + quoteAttributeValueForBrowser(value);
- }
-
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
- ;
- }
-
- var objectIs = typeof Object.is === 'function' ? Object.is : is;
-
- var currentlyRenderingComponent = null;
- var firstWorkInProgressHook = null;
- var workInProgressHook = null; // Whether the work-in-progress hook is a re-rendered hook
-
- var isReRender = false; // Whether an update was scheduled during the currently executing render pass.
-
- var didScheduleRenderPhaseUpdate = false; // Lazily created map of render-phase updates
-
- var renderPhaseUpdates = null; // Counter to prevent infinite loops.
-
- var numberOfReRenders = 0;
- var RE_RENDER_LIMIT = 25;
- var isInHookUserCodeInDev = false; // In DEV, this is the name of the currently executing primitive hook
-
- var currentHookNameInDev;
-
- function resolveCurrentlyRenderingComponent() {
- if (!(currentlyRenderingComponent !== null)) {
- {
- throw 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
-
- {
- if (isInHookUserCodeInDev) {
- 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');
- }
- }
-
- return currentlyRenderingComponent;
- }
-
- function areHookInputsEqual(nextDeps, prevDeps) {
- if (prevDeps === null) {
- {
- 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);
- }
-
- return false;
- }
-
- {
- // Don't bother comparing lengths in prod because these arrays should be
- // passed inline.
- if (nextDeps.length !== prevDeps.length) {
- 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(', ') + "]");
- }
- }
-
- for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
- if (objectIs(nextDeps[i], prevDeps[i])) {
- continue;
- }
-
- return false;
- }
-
- return true;
- }
-
- function createHook() {
- if (numberOfReRenders > 0) {
- {
- {
- throw Error( "Rendered more hooks than during the previous render" );
- }
- }
- }
-
- return {
- memoizedState: null,
- queue: null,
- next: null
- };
- }
-
- function createWorkInProgressHook() {
- if (workInProgressHook === null) {
- // This is the first hook in the list
- if (firstWorkInProgressHook === null) {
- isReRender = false;
- firstWorkInProgressHook = workInProgressHook = createHook();
- } else {
- // There's already a work-in-progress. Reuse it.
- isReRender = true;
- workInProgressHook = firstWorkInProgressHook;
- }
- } else {
- if (workInProgressHook.next === null) {
- isReRender = false; // Append to the end of the list
-
- workInProgressHook = workInProgressHook.next = createHook();
- } else {
- // There's already a work-in-progress. Reuse it.
- isReRender = true;
- workInProgressHook = workInProgressHook.next;
- }
- }
-
- return workInProgressHook;
- }
-
- function prepareToUseHooks(componentIdentity) {
- currentlyRenderingComponent = componentIdentity;
-
- {
- isInHookUserCodeInDev = false;
- } // The following should have already been reset
- // didScheduleRenderPhaseUpdate = false;
- // firstWorkInProgressHook = null;
- // numberOfReRenders = 0;
- // renderPhaseUpdates = null;
- // workInProgressHook = null;
-
- }
- function finishHooks(Component, props, children, refOrContext) {
- // This must be called after every function component to prevent hooks from
- // being used in classes.
- while (didScheduleRenderPhaseUpdate) {
- // Updates were scheduled during the render phase. They are stored in
- // the `renderPhaseUpdates` map. Call the component again, reusing the
- // work-in-progress hooks and applying the additional updates on top. Keep
- // restarting until no more updates are scheduled.
- didScheduleRenderPhaseUpdate = false;
- numberOfReRenders += 1; // Start over from the beginning of the list
-
- workInProgressHook = null;
- children = Component(props, refOrContext);
- }
-
- resetHooksState();
- return children;
- } // Reset the internal hooks state if an error occurs while rendering a component
-
- function resetHooksState() {
- {
- isInHookUserCodeInDev = false;
- }
-
- currentlyRenderingComponent = null;
- didScheduleRenderPhaseUpdate = false;
- firstWorkInProgressHook = null;
- numberOfReRenders = 0;
- renderPhaseUpdates = null;
- workInProgressHook = null;
- }
-
- function readContext(context, observedBits) {
- var threadID = currentPartialRenderer.threadID;
- validateContextBounds(context, threadID);
-
- {
- if (isInHookUserCodeInDev) {
- 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().');
- }
- }
-
- return context[threadID];
- }
-
- function useContext(context, observedBits) {
- {
- currentHookNameInDev = 'useContext';
- }
-
- resolveCurrentlyRenderingComponent();
- var threadID = currentPartialRenderer.threadID;
- validateContextBounds(context, threadID);
- return context[threadID];
- }
-
- function basicStateReducer(state, action) {
- // $FlowFixMe: Flow doesn't like mixed types
- return typeof action === 'function' ? action(state) : action;
- }
-
- function useState(initialState) {
- {
- currentHookNameInDev = 'useState';
- }
-
- return useReducer(basicStateReducer, // useReducer has a special case to support lazy useState initializers
- initialState);
- }
- function useReducer(reducer, initialArg, init) {
- {
- if (reducer !== basicStateReducer) {
- currentHookNameInDev = 'useReducer';
- }
- }
-
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
-
- if (isReRender) {
- // This is a re-render. Apply the new render phase updates to the previous
- // current hook.
- var queue = workInProgressHook.queue;
- var dispatch = queue.dispatch;
-
- if (renderPhaseUpdates !== null) {
- // Render phase updates are stored in a map of queue -> linked list
- var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
-
- if (firstRenderPhaseUpdate !== undefined) {
- renderPhaseUpdates.delete(queue);
- var newState = workInProgressHook.memoizedState;
- var update = firstRenderPhaseUpdate;
-
- do {
- // Process this render phase update. We don't have to check the
- // priority because it will always be the same as the current
- // render's.
- var action = update.action;
-
- {
- isInHookUserCodeInDev = true;
- }
-
- newState = reducer(newState, action);
-
- {
- isInHookUserCodeInDev = false;
- }
-
- update = update.next;
- } while (update !== null);
-
- workInProgressHook.memoizedState = newState;
- return [newState, dispatch];
- }
- }
-
- return [workInProgressHook.memoizedState, dispatch];
- } else {
- {
- isInHookUserCodeInDev = true;
- }
-
- var initialState;
-
- if (reducer === basicStateReducer) {
- // Special case for `useState`.
- initialState = typeof initialArg === 'function' ? initialArg() : initialArg;
- } else {
- initialState = init !== undefined ? init(initialArg) : initialArg;
- }
-
- {
- isInHookUserCodeInDev = false;
- }
-
- workInProgressHook.memoizedState = initialState;
-
- var _queue = workInProgressHook.queue = {
- last: null,
- dispatch: null
- };
-
- var _dispatch = _queue.dispatch = dispatchAction.bind(null, currentlyRenderingComponent, _queue);
-
- return [workInProgressHook.memoizedState, _dispatch];
- }
- }
-
- function useMemo(nextCreate, deps) {
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
-
- if (workInProgressHook !== null) {
- var prevState = workInProgressHook.memoizedState;
-
- if (prevState !== null) {
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
- }
-
- {
- isInHookUserCodeInDev = true;
- }
-
- var nextValue = nextCreate();
-
- {
- isInHookUserCodeInDev = false;
- }
-
- workInProgressHook.memoizedState = [nextValue, nextDeps];
- return nextValue;
- }
-
- function useRef(initialValue) {
- currentlyRenderingComponent = resolveCurrentlyRenderingComponent();
- workInProgressHook = createWorkInProgressHook();
- var previousRef = workInProgressHook.memoizedState;
-
- if (previousRef === null) {
- var ref = {
- current: initialValue
- };
-
- {
- Object.seal(ref);
- }
-
- workInProgressHook.memoizedState = ref;
- return ref;
- } else {
- return previousRef;
- }
- }
-
- function useLayoutEffect(create, inputs) {
- {
- currentHookNameInDev = 'useLayoutEffect';
-
- 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.');
- }
- }
-
- function dispatchAction(componentIdentity, queue, action) {
- if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
- {
- throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
- }
- }
-
- if (componentIdentity === currentlyRenderingComponent) {
- // This is a render phase update. Stash it in a lazily-created map of
- // queue -> linked list of updates. After this render pass, we'll restart
- // and apply the stashed updates on top of the work-in-progress hook.
- didScheduleRenderPhaseUpdate = true;
- var update = {
- action: action,
- next: null
- };
-
- if (renderPhaseUpdates === null) {
- renderPhaseUpdates = new Map();
- }
-
- var firstRenderPhaseUpdate = renderPhaseUpdates.get(queue);
-
- if (firstRenderPhaseUpdate === undefined) {
- renderPhaseUpdates.set(queue, update);
- } else {
- // Append the update to the end of the list.
- var lastRenderPhaseUpdate = firstRenderPhaseUpdate;
-
- while (lastRenderPhaseUpdate.next !== null) {
- lastRenderPhaseUpdate = lastRenderPhaseUpdate.next;
- }
-
- lastRenderPhaseUpdate.next = update;
- }
- }
- }
-
- function useCallback(callback, deps) {
- return useMemo(function () {
- return callback;
- }, deps);
- } // TODO Decide on how to implement this hook for server rendering.
- // If a mutation occurs during render, consider triggering a Suspense boundary
- // and falling back to client rendering.
-
- function useMutableSource(source, getSnapshot, subscribe) {
- resolveCurrentlyRenderingComponent();
- return getSnapshot(source._source);
- }
-
- function useDeferredValue(value) {
- resolveCurrentlyRenderingComponent();
- return value;
- }
-
- function useTransition() {
- resolveCurrentlyRenderingComponent();
-
- var startTransition = function (callback) {
- callback();
- };
-
- return [startTransition, false];
- }
-
- function useOpaqueIdentifier() {
- return (currentPartialRenderer.identifierPrefix || '') + 'R:' + (currentPartialRenderer.uniqueID++).toString(36);
- }
-
- function noop() {}
-
- var currentPartialRenderer = null;
- function setCurrentPartialRenderer(renderer) {
- currentPartialRenderer = renderer;
- }
- var Dispatcher = {
- readContext: readContext,
- useContext: useContext,
- useMemo: useMemo,
- useReducer: useReducer,
- useRef: useRef,
- useState: useState,
- useLayoutEffect: useLayoutEffect,
- useCallback: useCallback,
- // useImperativeHandle is not run in the server environment
- useImperativeHandle: noop,
- // Effects are not run in the server environment.
- useEffect: noop,
- // Debugging effect
- useDebugValue: noop,
- useDeferredValue: useDeferredValue,
- useTransition: useTransition,
- useOpaqueIdentifier: useOpaqueIdentifier,
- // Subscriptions are not setup in a server environment.
- useMutableSource: useMutableSource
- };
-
- var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
- var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
- var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
- var Namespaces = {
- html: HTML_NAMESPACE,
- mathml: MATH_NAMESPACE,
- svg: SVG_NAMESPACE
- }; // Assumes there is no parent namespace.
-
- function getIntrinsicNamespace(type) {
- switch (type) {
- case 'svg':
- return SVG_NAMESPACE;
-
- case 'math':
- return MATH_NAMESPACE;
-
- default:
- return HTML_NAMESPACE;
- }
- }
- function getChildNamespace(parentNamespace, type) {
- if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
- // No (or default) parent namespace: potential entry point.
- return getIntrinsicNamespace(type);
- }
-
- if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
- // We're leaving SVG.
- return HTML_NAMESPACE;
- } // By default, pass namespace below.
-
-
- return parentNamespace;
- }
-
- var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
- };
- function checkControlledValueProps(tagName, props) {
- {
- if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
- 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`.');
- }
-
- if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
- 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`.');
- }
- }
- }
-
- // For HTML, certain tags should omit their close tag. We keep a list for
- // those special-case tags.
- var omittedCloseTags = {
- area: true,
- base: true,
- br: true,
- col: true,
- embed: true,
- hr: true,
- img: true,
- input: true,
- keygen: true,
- link: true,
- meta: true,
- param: true,
- source: true,
- track: true,
- wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
-
- };
-
- // `omittedCloseTags` except that `menuitem` should still have its closing tag.
-
- var voidElementTags = _assign({
- menuitem: true
- }, omittedCloseTags);
-
- var HTML = '__html';
-
- function assertValidProps(tag, props) {
- if (!props) {
- return;
- } // Note the use of `==` which checks for null or undefined.
-
-
- if (voidElementTags[tag]) {
- if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
- }
- }
- }
-
- if (props.dangerouslySetInnerHTML != null) {
- if (!(props.children == null)) {
- {
- throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
- }
- }
-
- if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
- {
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
- }
- }
- }
-
- {
- if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
- 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.');
- }
- }
-
- if (!(props.style == null || typeof props.style === 'object')) {
- {
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
- }
- }
- }
-
- /**
- * CSS properties which accept numbers but are not in units of "px".
- */
- var isUnitlessNumber = {
- animationIterationCount: true,
- borderImageOutset: true,
- borderImageSlice: true,
- borderImageWidth: true,
- boxFlex: true,
- boxFlexGroup: true,
- boxOrdinalGroup: true,
- columnCount: true,
- columns: true,
- flex: true,
- flexGrow: true,
- flexPositive: true,
- flexShrink: true,
- flexNegative: true,
- flexOrder: true,
- gridArea: true,
- gridRow: true,
- gridRowEnd: true,
- gridRowSpan: true,
- gridRowStart: true,
- gridColumn: true,
- gridColumnEnd: true,
- gridColumnSpan: true,
- gridColumnStart: true,
- fontWeight: true,
- lineClamp: true,
- lineHeight: true,
- opacity: true,
- order: true,
- orphans: true,
- tabSize: true,
- widows: true,
- zIndex: true,
- zoom: true,
- // SVG-related properties
- fillOpacity: true,
- floodOpacity: true,
- stopOpacity: true,
- strokeDasharray: true,
- strokeDashoffset: true,
- strokeMiterlimit: true,
- strokeOpacity: true,
- strokeWidth: true
- };
- /**
- * @param {string} prefix vendor-specific prefix, eg: Webkit
- * @param {string} key style name, eg: transitionDuration
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
- * WebkitTransitionDuration
- */
-
- function prefixKey(prefix, key) {
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
- }
- /**
- * Support style names that may come passed in prefixed by adding permutations
- * of vendor prefixes.
- */
-
-
- var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
- // infinite loop, because it iterates over the newly added props too.
-
- Object.keys(isUnitlessNumber).forEach(function (prop) {
- prefixes.forEach(function (prefix) {
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
- });
- });
-
- /**
- * Convert a value into the proper css writable value. The style name `name`
- * should be logical (no hyphens), as specified
- * in `CSSProperty.isUnitlessNumber`.
- *
- * @param {string} name CSS property name such as `topMargin`.
- * @param {*} value CSS property value such as `10px`.
- * @return {string} Normalized style value with dimensions applied.
- */
-
- function dangerousStyleValue(name, value, isCustomProperty) {
- // Note that we've removed escapeTextForBrowser() calls here since the
- // whole string will be escaped when the attribute is injected into
- // the markup. If you provide unsafe user data here they can inject
- // arbitrary CSS which may be problematic (I couldn't repro this):
- // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
- // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
- // This is not an XSS hole but instead a potential CSS injection issue
- // which has lead to a greater discussion about how we're going to
- // trust URLs moving forward. See #2115901
- var isEmpty = value == null || typeof value === 'boolean' || value === '';
-
- if (isEmpty) {
- return '';
- }
-
- if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
- return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
- }
-
- return ('' + value).trim();
- }
-
- var uppercasePattern = /([A-Z])/g;
- var msPattern = /^ms-/;
- /**
- * Hyphenates a camelcased CSS property name, for example:
- *
- * > hyphenateStyleName('backgroundColor')
- * < "background-color"
- * > hyphenateStyleName('MozTransition')
- * < "-moz-transition"
- * > hyphenateStyleName('msTransition')
- * < "-ms-transition"
- *
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
- * is converted to `-ms-`.
- */
-
- function hyphenateStyleName(name) {
- return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
- }
-
- function isCustomComponent(tagName, props) {
- if (tagName.indexOf('-') === -1) {
- return typeof props.is === 'string';
- }
-
- switch (tagName) {
- // These are reserved SVG and MathML elements.
- // We don't mind this list too much because we expect it to never grow.
- // The alternative is to track the namespace in a few places which is convoluted.
- // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
- case 'annotation-xml':
- case 'color-profile':
- case 'font-face':
- case 'font-face-src':
- case 'font-face-uri':
- case 'font-face-format':
- case 'font-face-name':
- case 'missing-glyph':
- return false;
-
- default:
- return true;
- }
- }
-
- var warnValidStyle = function () {};
-
- {
- // 'msTransform' is correct, but the other prefixes should be capitalized
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
- var msPattern$1 = /^-ms-/;
- var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
-
- var badStyleValueWithSemicolonPattern = /;\s*$/;
- var warnedStyleNames = {};
- var warnedStyleValues = {};
- var warnedForNaNValue = false;
- var warnedForInfinityValue = false;
-
- var camelize = function (string) {
- return string.replace(hyphenPattern, function (_, character) {
- return character.toUpperCase();
- });
- };
-
- var warnHyphenatedStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
- // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
- // is converted to lowercase `ms`.
- camelize(name.replace(msPattern$1, 'ms-')));
- };
-
- var warnBadVendoredStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
- };
-
- var warnStyleValueWithSemicolon = function (name, value) {
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
- return;
- }
-
- warnedStyleValues[value] = true;
-
- error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
- };
-
- var warnStyleValueIsNaN = function (name, value) {
- if (warnedForNaNValue) {
- return;
- }
-
- warnedForNaNValue = true;
-
- error('`NaN` is an invalid value for the `%s` css style property.', name);
- };
-
- var warnStyleValueIsInfinity = function (name, value) {
- if (warnedForInfinityValue) {
- return;
- }
-
- warnedForInfinityValue = true;
-
- error('`Infinity` is an invalid value for the `%s` css style property.', name);
- };
-
- warnValidStyle = function (name, value) {
- if (name.indexOf('-') > -1) {
- warnHyphenatedStyleName(name);
- } else if (badVendoredStyleNamePattern.test(name)) {
- warnBadVendoredStyleName(name);
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
- warnStyleValueWithSemicolon(name, value);
- }
-
- if (typeof value === 'number') {
- if (isNaN(value)) {
- warnStyleValueIsNaN(name, value);
- } else if (!isFinite(value)) {
- warnStyleValueIsInfinity(name, value);
- }
- }
- };
- }
-
- var warnValidStyle$1 = warnValidStyle;
-
- var ariaProperties = {
- 'aria-current': 0,
- // state
- 'aria-details': 0,
- 'aria-disabled': 0,
- // state
- 'aria-hidden': 0,
- // state
- 'aria-invalid': 0,
- // state
- 'aria-keyshortcuts': 0,
- 'aria-label': 0,
- 'aria-roledescription': 0,
- // Widget Attributes
- 'aria-autocomplete': 0,
- 'aria-checked': 0,
- 'aria-expanded': 0,
- 'aria-haspopup': 0,
- 'aria-level': 0,
- 'aria-modal': 0,
- 'aria-multiline': 0,
- 'aria-multiselectable': 0,
- 'aria-orientation': 0,
- 'aria-placeholder': 0,
- 'aria-pressed': 0,
- 'aria-readonly': 0,
- 'aria-required': 0,
- 'aria-selected': 0,
- 'aria-sort': 0,
- 'aria-valuemax': 0,
- 'aria-valuemin': 0,
- 'aria-valuenow': 0,
- 'aria-valuetext': 0,
- // Live Region Attributes
- 'aria-atomic': 0,
- 'aria-busy': 0,
- 'aria-live': 0,
- 'aria-relevant': 0,
- // Drag-and-Drop Attributes
- 'aria-dropeffect': 0,
- 'aria-grabbed': 0,
- // Relationship Attributes
- 'aria-activedescendant': 0,
- 'aria-colcount': 0,
- 'aria-colindex': 0,
- 'aria-colspan': 0,
- 'aria-controls': 0,
- 'aria-describedby': 0,
- 'aria-errormessage': 0,
- 'aria-flowto': 0,
- 'aria-labelledby': 0,
- 'aria-owns': 0,
- 'aria-posinset': 0,
- 'aria-rowcount': 0,
- 'aria-rowindex': 0,
- 'aria-rowspan': 0,
- 'aria-setsize': 0
- };
-
- var warnedProperties = {};
- var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
-
- function validateProperty(tagName, name) {
- {
- if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
- return true;
- }
-
- if (rARIACamel.test(name)) {
- var ariaName = 'aria-' + name.slice(4).toLowerCase();
- var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (correctName == null) {
- error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
-
- warnedProperties[name] = true;
- return true;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== correctName) {
- error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
-
- if (rARIA.test(name)) {
- var lowerCasedName = name.toLowerCase();
- var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (standardName == null) {
- warnedProperties[name] = true;
- return false;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== standardName) {
- error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
- }
-
- return true;
- }
-
- function warnInvalidARIAProps(type, props) {
- {
- var invalidProps = [];
-
- for (var key in props) {
- var isValid = validateProperty(type, key);
-
- if (!isValid) {
- invalidProps.push(key);
- }
- }
-
- var unknownPropString = invalidProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- } else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- }
- }
- }
-
- function validateProperties(type, props) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnInvalidARIAProps(type, props);
- }
-
- var didWarnValueNull = false;
- function validateProperties$1(type, props) {
- {
- if (type !== 'input' && type !== 'textarea' && type !== 'select') {
- return;
- }
-
- if (props != null && props.value === null && !didWarnValueNull) {
- didWarnValueNull = true;
-
- if (type === 'select' && props.multiple) {
- 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);
- } else {
- error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
- }
- }
- }
- }
-
- // When adding attributes to the HTML or SVG allowed attribute list, be sure to
- // also add them to this module to ensure casing and incorrect name
- // warnings.
- var possibleStandardNames = {
- // HTML
- accept: 'accept',
- acceptcharset: 'acceptCharset',
- 'accept-charset': 'acceptCharset',
- accesskey: 'accessKey',
- action: 'action',
- allowfullscreen: 'allowFullScreen',
- alt: 'alt',
- as: 'as',
- async: 'async',
- autocapitalize: 'autoCapitalize',
- autocomplete: 'autoComplete',
- autocorrect: 'autoCorrect',
- autofocus: 'autoFocus',
- autoplay: 'autoPlay',
- autosave: 'autoSave',
- capture: 'capture',
- cellpadding: 'cellPadding',
- cellspacing: 'cellSpacing',
- challenge: 'challenge',
- charset: 'charSet',
- checked: 'checked',
- children: 'children',
- cite: 'cite',
- class: 'className',
- classid: 'classID',
- classname: 'className',
- cols: 'cols',
- colspan: 'colSpan',
- content: 'content',
- contenteditable: 'contentEditable',
- contextmenu: 'contextMenu',
- controls: 'controls',
- controlslist: 'controlsList',
- coords: 'coords',
- crossorigin: 'crossOrigin',
- dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
- data: 'data',
- datetime: 'dateTime',
- default: 'default',
- defaultchecked: 'defaultChecked',
- defaultvalue: 'defaultValue',
- defer: 'defer',
- dir: 'dir',
- disabled: 'disabled',
- disablepictureinpicture: 'disablePictureInPicture',
- disableremoteplayback: 'disableRemotePlayback',
- download: 'download',
- draggable: 'draggable',
- enctype: 'encType',
- enterkeyhint: 'enterKeyHint',
- for: 'htmlFor',
- form: 'form',
- formmethod: 'formMethod',
- formaction: 'formAction',
- formenctype: 'formEncType',
- formnovalidate: 'formNoValidate',
- formtarget: 'formTarget',
- frameborder: 'frameBorder',
- headers: 'headers',
- height: 'height',
- hidden: 'hidden',
- high: 'high',
- href: 'href',
- hreflang: 'hrefLang',
- htmlfor: 'htmlFor',
- httpequiv: 'httpEquiv',
- 'http-equiv': 'httpEquiv',
- icon: 'icon',
- id: 'id',
- innerhtml: 'innerHTML',
- inputmode: 'inputMode',
- integrity: 'integrity',
- is: 'is',
- itemid: 'itemID',
- itemprop: 'itemProp',
- itemref: 'itemRef',
- itemscope: 'itemScope',
- itemtype: 'itemType',
- keyparams: 'keyParams',
- keytype: 'keyType',
- kind: 'kind',
- label: 'label',
- lang: 'lang',
- list: 'list',
- loop: 'loop',
- low: 'low',
- manifest: 'manifest',
- marginwidth: 'marginWidth',
- marginheight: 'marginHeight',
- max: 'max',
- maxlength: 'maxLength',
- media: 'media',
- mediagroup: 'mediaGroup',
- method: 'method',
- min: 'min',
- minlength: 'minLength',
- multiple: 'multiple',
- muted: 'muted',
- name: 'name',
- nomodule: 'noModule',
- nonce: 'nonce',
- novalidate: 'noValidate',
- open: 'open',
- optimum: 'optimum',
- pattern: 'pattern',
- placeholder: 'placeholder',
- playsinline: 'playsInline',
- poster: 'poster',
- preload: 'preload',
- profile: 'profile',
- radiogroup: 'radioGroup',
- readonly: 'readOnly',
- referrerpolicy: 'referrerPolicy',
- rel: 'rel',
- required: 'required',
- reversed: 'reversed',
- role: 'role',
- rows: 'rows',
- rowspan: 'rowSpan',
- sandbox: 'sandbox',
- scope: 'scope',
- scoped: 'scoped',
- scrolling: 'scrolling',
- seamless: 'seamless',
- selected: 'selected',
- shape: 'shape',
- size: 'size',
- sizes: 'sizes',
- span: 'span',
- spellcheck: 'spellCheck',
- src: 'src',
- srcdoc: 'srcDoc',
- srclang: 'srcLang',
- srcset: 'srcSet',
- start: 'start',
- step: 'step',
- style: 'style',
- summary: 'summary',
- tabindex: 'tabIndex',
- target: 'target',
- title: 'title',
- type: 'type',
- usemap: 'useMap',
- value: 'value',
- width: 'width',
- wmode: 'wmode',
- wrap: 'wrap',
- // SVG
- about: 'about',
- accentheight: 'accentHeight',
- 'accent-height': 'accentHeight',
- accumulate: 'accumulate',
- additive: 'additive',
- alignmentbaseline: 'alignmentBaseline',
- 'alignment-baseline': 'alignmentBaseline',
- allowreorder: 'allowReorder',
- alphabetic: 'alphabetic',
- amplitude: 'amplitude',
- arabicform: 'arabicForm',
- 'arabic-form': 'arabicForm',
- ascent: 'ascent',
- attributename: 'attributeName',
- attributetype: 'attributeType',
- autoreverse: 'autoReverse',
- azimuth: 'azimuth',
- basefrequency: 'baseFrequency',
- baselineshift: 'baselineShift',
- 'baseline-shift': 'baselineShift',
- baseprofile: 'baseProfile',
- bbox: 'bbox',
- begin: 'begin',
- bias: 'bias',
- by: 'by',
- calcmode: 'calcMode',
- capheight: 'capHeight',
- 'cap-height': 'capHeight',
- clip: 'clip',
- clippath: 'clipPath',
- 'clip-path': 'clipPath',
- clippathunits: 'clipPathUnits',
- cliprule: 'clipRule',
- 'clip-rule': 'clipRule',
- color: 'color',
- colorinterpolation: 'colorInterpolation',
- 'color-interpolation': 'colorInterpolation',
- colorinterpolationfilters: 'colorInterpolationFilters',
- 'color-interpolation-filters': 'colorInterpolationFilters',
- colorprofile: 'colorProfile',
- 'color-profile': 'colorProfile',
- colorrendering: 'colorRendering',
- 'color-rendering': 'colorRendering',
- contentscripttype: 'contentScriptType',
- contentstyletype: 'contentStyleType',
- cursor: 'cursor',
- cx: 'cx',
- cy: 'cy',
- d: 'd',
- datatype: 'datatype',
- decelerate: 'decelerate',
- descent: 'descent',
- diffuseconstant: 'diffuseConstant',
- direction: 'direction',
- display: 'display',
- divisor: 'divisor',
- dominantbaseline: 'dominantBaseline',
- 'dominant-baseline': 'dominantBaseline',
- dur: 'dur',
- dx: 'dx',
- dy: 'dy',
- edgemode: 'edgeMode',
- elevation: 'elevation',
- enablebackground: 'enableBackground',
- 'enable-background': 'enableBackground',
- end: 'end',
- exponent: 'exponent',
- externalresourcesrequired: 'externalResourcesRequired',
- fill: 'fill',
- fillopacity: 'fillOpacity',
- 'fill-opacity': 'fillOpacity',
- fillrule: 'fillRule',
- 'fill-rule': 'fillRule',
- filter: 'filter',
- filterres: 'filterRes',
- filterunits: 'filterUnits',
- floodopacity: 'floodOpacity',
- 'flood-opacity': 'floodOpacity',
- floodcolor: 'floodColor',
- 'flood-color': 'floodColor',
- focusable: 'focusable',
- fontfamily: 'fontFamily',
- 'font-family': 'fontFamily',
- fontsize: 'fontSize',
- 'font-size': 'fontSize',
- fontsizeadjust: 'fontSizeAdjust',
- 'font-size-adjust': 'fontSizeAdjust',
- fontstretch: 'fontStretch',
- 'font-stretch': 'fontStretch',
- fontstyle: 'fontStyle',
- 'font-style': 'fontStyle',
- fontvariant: 'fontVariant',
- 'font-variant': 'fontVariant',
- fontweight: 'fontWeight',
- 'font-weight': 'fontWeight',
- format: 'format',
- from: 'from',
- fx: 'fx',
- fy: 'fy',
- g1: 'g1',
- g2: 'g2',
- glyphname: 'glyphName',
- 'glyph-name': 'glyphName',
- glyphorientationhorizontal: 'glyphOrientationHorizontal',
- 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
- glyphorientationvertical: 'glyphOrientationVertical',
- 'glyph-orientation-vertical': 'glyphOrientationVertical',
- glyphref: 'glyphRef',
- gradienttransform: 'gradientTransform',
- gradientunits: 'gradientUnits',
- hanging: 'hanging',
- horizadvx: 'horizAdvX',
- 'horiz-adv-x': 'horizAdvX',
- horizoriginx: 'horizOriginX',
- 'horiz-origin-x': 'horizOriginX',
- ideographic: 'ideographic',
- imagerendering: 'imageRendering',
- 'image-rendering': 'imageRendering',
- in2: 'in2',
- in: 'in',
- inlist: 'inlist',
- intercept: 'intercept',
- k1: 'k1',
- k2: 'k2',
- k3: 'k3',
- k4: 'k4',
- k: 'k',
- kernelmatrix: 'kernelMatrix',
- kernelunitlength: 'kernelUnitLength',
- kerning: 'kerning',
- keypoints: 'keyPoints',
- keysplines: 'keySplines',
- keytimes: 'keyTimes',
- lengthadjust: 'lengthAdjust',
- letterspacing: 'letterSpacing',
- 'letter-spacing': 'letterSpacing',
- lightingcolor: 'lightingColor',
- 'lighting-color': 'lightingColor',
- limitingconeangle: 'limitingConeAngle',
- local: 'local',
- markerend: 'markerEnd',
- 'marker-end': 'markerEnd',
- markerheight: 'markerHeight',
- markermid: 'markerMid',
- 'marker-mid': 'markerMid',
- markerstart: 'markerStart',
- 'marker-start': 'markerStart',
- markerunits: 'markerUnits',
- markerwidth: 'markerWidth',
- mask: 'mask',
- maskcontentunits: 'maskContentUnits',
- maskunits: 'maskUnits',
- mathematical: 'mathematical',
- mode: 'mode',
- numoctaves: 'numOctaves',
- offset: 'offset',
- opacity: 'opacity',
- operator: 'operator',
- order: 'order',
- orient: 'orient',
- orientation: 'orientation',
- origin: 'origin',
- overflow: 'overflow',
- overlineposition: 'overlinePosition',
- 'overline-position': 'overlinePosition',
- overlinethickness: 'overlineThickness',
- 'overline-thickness': 'overlineThickness',
- paintorder: 'paintOrder',
- 'paint-order': 'paintOrder',
- panose1: 'panose1',
- 'panose-1': 'panose1',
- pathlength: 'pathLength',
- patterncontentunits: 'patternContentUnits',
- patterntransform: 'patternTransform',
- patternunits: 'patternUnits',
- pointerevents: 'pointerEvents',
- 'pointer-events': 'pointerEvents',
- points: 'points',
- pointsatx: 'pointsAtX',
- pointsaty: 'pointsAtY',
- pointsatz: 'pointsAtZ',
- prefix: 'prefix',
- preservealpha: 'preserveAlpha',
- preserveaspectratio: 'preserveAspectRatio',
- primitiveunits: 'primitiveUnits',
- property: 'property',
- r: 'r',
- radius: 'radius',
- refx: 'refX',
- refy: 'refY',
- renderingintent: 'renderingIntent',
- 'rendering-intent': 'renderingIntent',
- repeatcount: 'repeatCount',
- repeatdur: 'repeatDur',
- requiredextensions: 'requiredExtensions',
- requiredfeatures: 'requiredFeatures',
- resource: 'resource',
- restart: 'restart',
- result: 'result',
- results: 'results',
- rotate: 'rotate',
- rx: 'rx',
- ry: 'ry',
- scale: 'scale',
- security: 'security',
- seed: 'seed',
- shaperendering: 'shapeRendering',
- 'shape-rendering': 'shapeRendering',
- slope: 'slope',
- spacing: 'spacing',
- specularconstant: 'specularConstant',
- specularexponent: 'specularExponent',
- speed: 'speed',
- spreadmethod: 'spreadMethod',
- startoffset: 'startOffset',
- stddeviation: 'stdDeviation',
- stemh: 'stemh',
- stemv: 'stemv',
- stitchtiles: 'stitchTiles',
- stopcolor: 'stopColor',
- 'stop-color': 'stopColor',
- stopopacity: 'stopOpacity',
- 'stop-opacity': 'stopOpacity',
- strikethroughposition: 'strikethroughPosition',
- 'strikethrough-position': 'strikethroughPosition',
- strikethroughthickness: 'strikethroughThickness',
- 'strikethrough-thickness': 'strikethroughThickness',
- string: 'string',
- stroke: 'stroke',
- strokedasharray: 'strokeDasharray',
- 'stroke-dasharray': 'strokeDasharray',
- strokedashoffset: 'strokeDashoffset',
- 'stroke-dashoffset': 'strokeDashoffset',
- strokelinecap: 'strokeLinecap',
- 'stroke-linecap': 'strokeLinecap',
- strokelinejoin: 'strokeLinejoin',
- 'stroke-linejoin': 'strokeLinejoin',
- strokemiterlimit: 'strokeMiterlimit',
- 'stroke-miterlimit': 'strokeMiterlimit',
- strokewidth: 'strokeWidth',
- 'stroke-width': 'strokeWidth',
- strokeopacity: 'strokeOpacity',
- 'stroke-opacity': 'strokeOpacity',
- suppresscontenteditablewarning: 'suppressContentEditableWarning',
- suppresshydrationwarning: 'suppressHydrationWarning',
- surfacescale: 'surfaceScale',
- systemlanguage: 'systemLanguage',
- tablevalues: 'tableValues',
- targetx: 'targetX',
- targety: 'targetY',
- textanchor: 'textAnchor',
- 'text-anchor': 'textAnchor',
- textdecoration: 'textDecoration',
- 'text-decoration': 'textDecoration',
- textlength: 'textLength',
- textrendering: 'textRendering',
- 'text-rendering': 'textRendering',
- to: 'to',
- transform: 'transform',
- typeof: 'typeof',
- u1: 'u1',
- u2: 'u2',
- underlineposition: 'underlinePosition',
- 'underline-position': 'underlinePosition',
- underlinethickness: 'underlineThickness',
- 'underline-thickness': 'underlineThickness',
- unicode: 'unicode',
- unicodebidi: 'unicodeBidi',
- 'unicode-bidi': 'unicodeBidi',
- unicoderange: 'unicodeRange',
- 'unicode-range': 'unicodeRange',
- unitsperem: 'unitsPerEm',
- 'units-per-em': 'unitsPerEm',
- unselectable: 'unselectable',
- valphabetic: 'vAlphabetic',
- 'v-alphabetic': 'vAlphabetic',
- values: 'values',
- vectoreffect: 'vectorEffect',
- 'vector-effect': 'vectorEffect',
- version: 'version',
- vertadvy: 'vertAdvY',
- 'vert-adv-y': 'vertAdvY',
- vertoriginx: 'vertOriginX',
- 'vert-origin-x': 'vertOriginX',
- vertoriginy: 'vertOriginY',
- 'vert-origin-y': 'vertOriginY',
- vhanging: 'vHanging',
- 'v-hanging': 'vHanging',
- videographic: 'vIdeographic',
- 'v-ideographic': 'vIdeographic',
- viewbox: 'viewBox',
- viewtarget: 'viewTarget',
- visibility: 'visibility',
- vmathematical: 'vMathematical',
- 'v-mathematical': 'vMathematical',
- vocab: 'vocab',
- widths: 'widths',
- wordspacing: 'wordSpacing',
- 'word-spacing': 'wordSpacing',
- writingmode: 'writingMode',
- 'writing-mode': 'writingMode',
- x1: 'x1',
- x2: 'x2',
- x: 'x',
- xchannelselector: 'xChannelSelector',
- xheight: 'xHeight',
- 'x-height': 'xHeight',
- xlinkactuate: 'xlinkActuate',
- 'xlink:actuate': 'xlinkActuate',
- xlinkarcrole: 'xlinkArcrole',
- 'xlink:arcrole': 'xlinkArcrole',
- xlinkhref: 'xlinkHref',
- 'xlink:href': 'xlinkHref',
- xlinkrole: 'xlinkRole',
- 'xlink:role': 'xlinkRole',
- xlinkshow: 'xlinkShow',
- 'xlink:show': 'xlinkShow',
- xlinktitle: 'xlinkTitle',
- 'xlink:title': 'xlinkTitle',
- xlinktype: 'xlinkType',
- 'xlink:type': 'xlinkType',
- xmlbase: 'xmlBase',
- 'xml:base': 'xmlBase',
- xmllang: 'xmlLang',
- 'xml:lang': 'xmlLang',
- xmlns: 'xmlns',
- 'xml:space': 'xmlSpace',
- xmlnsxlink: 'xmlnsXlink',
- 'xmlns:xlink': 'xmlnsXlink',
- xmlspace: 'xmlSpace',
- y1: 'y1',
- y2: 'y2',
- y: 'y',
- ychannelselector: 'yChannelSelector',
- z: 'z',
- zoomandpan: 'zoomAndPan'
- };
-
- var validateProperty$1 = function () {};
-
- {
- var warnedProperties$1 = {};
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
- var EVENT_NAME_REGEX = /^on./;
- var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
- var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
-
- validateProperty$1 = function (tagName, name, value, eventRegistry) {
- if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
- return true;
- }
-
- var lowerCasedName = name.toLowerCase();
-
- if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
- 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.');
-
- warnedProperties$1[name] = true;
- return true;
- } // We can't rely on the event system being injected on the server.
-
-
- if (eventRegistry != null) {
- var registrationNameDependencies = eventRegistry.registrationNameDependencies,
- possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
-
- if (registrationNameDependencies.hasOwnProperty(name)) {
- return true;
- }
-
- var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
-
- if (registrationName != null) {
- error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (EVENT_NAME_REGEX.test(name)) {
- error('Unknown event handler property `%s`. It will be ignored.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (EVENT_NAME_REGEX.test(name)) {
- // If no event plugins have been injected, we are in a server environment.
- // So we can't tell if the event name is correct for sure, but we can filter
- // out known bad ones like `onclick`. We can't suggest a specific replacement though.
- if (INVALID_EVENT_NAME_REGEX.test(name)) {
- error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Let the ARIA attribute hook validate ARIA attributes
-
-
- if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
- return true;
- }
-
- if (lowerCasedName === 'innerhtml') {
- error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'aria') {
- error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
- error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'number' && isNaN(value)) {
- error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- var propertyInfo = getPropertyInfo(name);
- var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
-
- if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- var standardName = possibleStandardNames[lowerCasedName];
-
- if (standardName !== name) {
- error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (!isReserved && name !== lowerCasedName) {
- // Unknown attributes should have lowercase casing since that's how they
- // will be cased anyway with server rendering.
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- if (value) {
- 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);
- } else {
- 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);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Now that we've validated casing, do not validate
- // data types for reserved props
-
-
- if (isReserved) {
- return true;
- } // Warn when a known attribute is a bad type
-
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- warnedProperties$1[name] = true;
- return false;
- } // Warn when passing the strings 'false' or 'true' into a boolean prop
-
-
- if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- return true;
- };
- }
-
- var warnUnknownProperties = function (type, props, eventRegistry) {
- {
- var unknownProps = [];
-
- for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], eventRegistry);
-
- if (!isValid) {
- unknownProps.push(key);
- }
- }
-
- var unknownPropString = unknownProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (unknownProps.length === 1) {
- 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);
- } else if (unknownProps.length > 1) {
- 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);
- }
- }
- };
-
- function validateProperties$2(type, props, eventRegistry) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnUnknownProperties(type, props, eventRegistry);
- }
-
- var toArray = React.Children.toArray; // This is only used in DEV.
- // Each entry is `this.stack` from a currently executing renderer instance.
- // (There may be more than one because ReactDOMServer is reentrant).
- // Each stack is an array of frames which may contain nested stacks of elements.
-
- var currentDebugStacks = [];
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
- var ReactDebugCurrentFrame$1;
- var prevGetCurrentStackImpl = null;
-
- var getCurrentServerStackImpl = function () {
- return '';
- };
-
- var describeStackFrame = function (element) {
- return '';
- };
-
- var validatePropertiesInDevelopment = function (type, props) {};
-
- var pushCurrentDebugStack = function (stack) {};
-
- var pushElementToDebugStack = function (element) {};
-
- var popCurrentDebugStack = function () {};
-
- var hasWarnedAboutUsingContextAsConsumer = false;
-
- {
- ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
- validatePropertiesInDevelopment = function (type, props) {
- validateProperties(type, props);
- validateProperties$1(type, props);
- validateProperties$2(type, props, null);
- };
-
- describeStackFrame = function (element) {
- return describeUnknownElementTypeFrameInDEV(element.type, element._source, null);
- };
-
- pushCurrentDebugStack = function (stack) {
- currentDebugStacks.push(stack);
-
- if (currentDebugStacks.length === 1) {
- // We are entering a server renderer.
- // Remember the previous (e.g. client) global stack implementation.
- prevGetCurrentStackImpl = ReactDebugCurrentFrame$1.getCurrentStack;
- ReactDebugCurrentFrame$1.getCurrentStack = getCurrentServerStackImpl;
- }
- };
-
- pushElementToDebugStack = function (element) {
- // For the innermost executing ReactDOMServer call,
- var stack = currentDebugStacks[currentDebugStacks.length - 1]; // Take the innermost executing frame (e.g. <Foo>),
-
- var frame = stack[stack.length - 1]; // and record that it has one more element associated with it.
-
- frame.debugElementStack.push(element); // We only need this because we tail-optimize single-element
- // children and directly handle them in an inner loop instead of
- // creating separate frames for them.
- };
-
- popCurrentDebugStack = function () {
- currentDebugStacks.pop();
-
- if (currentDebugStacks.length === 0) {
- // We are exiting the server renderer.
- // Restore the previous (e.g. client) global stack implementation.
- ReactDebugCurrentFrame$1.getCurrentStack = prevGetCurrentStackImpl;
- prevGetCurrentStackImpl = null;
- }
- };
-
- getCurrentServerStackImpl = function () {
- if (currentDebugStacks.length === 0) {
- // Nothing is currently rendering.
- return '';
- } // ReactDOMServer is reentrant so there may be multiple calls at the same time.
- // Take the frames from the innermost call which is the last in the array.
-
-
- var frames = currentDebugStacks[currentDebugStacks.length - 1];
- var stack = ''; // Go through every frame in the stack from the innermost one.
-
- for (var i = frames.length - 1; i >= 0; i--) {
- var frame = frames[i]; // Every frame might have more than one debug element stack entry associated with it.
- // This is because single-child nesting doesn't create materialized frames.
- // Instead it would push them through `pushElementToDebugStack()`.
-
- var debugElementStack = frame.debugElementStack;
-
- for (var ii = debugElementStack.length - 1; ii >= 0; ii--) {
- stack += describeStackFrame(debugElementStack[ii]);
- }
- }
-
- return stack;
- };
- }
-
- var didWarnDefaultInputValue = false;
- var didWarnDefaultChecked = false;
- var didWarnDefaultSelectValue = false;
- var didWarnDefaultTextareaValue = false;
- var didWarnInvalidOptionChildren = false;
- var didWarnAboutNoopUpdateForComponent = {};
- var didWarnAboutBadClass = {};
- var didWarnAboutModulePatternComponent = {};
- var didWarnAboutDeprecatedWillMount = {};
- var didWarnAboutUndefinedDerivedState = {};
- var didWarnAboutUninitializedState = {};
- var valuePropNames = ['value', 'defaultValue'];
- var newlineEatingTags = {
- listing: true,
- pre: true,
- textarea: true
- }; // We accept any tag to be rendered but since this gets injected into arbitrary
- // HTML, we want to make sure that it's a safe tag.
- // http://www.w3.org/TR/REC-xml/#NT-Name
-
- var VALID_TAG_REGEX = /^[a-zA-Z][a-zA-Z:_\.\-\d]*$/; // Simplified subset
-
- var validatedTagCache = {};
-
- function validateDangerousTag(tag) {
- if (!validatedTagCache.hasOwnProperty(tag)) {
- if (!VALID_TAG_REGEX.test(tag)) {
- {
- throw Error( "Invalid tag: " + tag );
- }
- }
-
- validatedTagCache[tag] = true;
- }
- }
-
- var styleNameCache = {};
-
- var processStyleName = function (styleName) {
- if (styleNameCache.hasOwnProperty(styleName)) {
- return styleNameCache[styleName];
- }
-
- var result = hyphenateStyleName(styleName);
- styleNameCache[styleName] = result;
- return result;
- };
-
- function createMarkupForStyles(styles) {
- var serialized = '';
- var delimiter = '';
-
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
-
- var isCustomProperty = styleName.indexOf('--') === 0;
- var styleValue = styles[styleName];
-
- {
- if (!isCustomProperty) {
- warnValidStyle$1(styleName, styleValue);
- }
- }
-
- if (styleValue != null) {
- serialized += delimiter + (isCustomProperty ? styleName : processStyleName(styleName)) + ':';
- serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
- delimiter = ';';
- }
- }
-
- return serialized || null;
- }
-
- function warnNoop(publicInstance, callerName) {
- {
- var _constructor = publicInstance.constructor;
- var componentName = _constructor && getComponentName(_constructor) || 'ReactClass';
- var warningKey = componentName + '.' + callerName;
-
- if (didWarnAboutNoopUpdateForComponent[warningKey]) {
- return;
- }
-
- 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);
-
- didWarnAboutNoopUpdateForComponent[warningKey] = true;
- }
- }
-
- function shouldConstruct$1(Component) {
- return Component.prototype && Component.prototype.isReactComponent;
- }
-
- function getNonChildrenInnerMarkup(props) {
- var innerHTML = props.dangerouslySetInnerHTML;
-
- if (innerHTML != null) {
- if (innerHTML.__html != null) {
- return innerHTML.__html;
- }
- } else {
- var content = props.children;
-
- if (typeof content === 'string' || typeof content === 'number') {
- return escapeTextForBrowser(content);
- }
- }
-
- return null;
- }
-
- function flattenTopLevelChildren(children) {
- if (!React.isValidElement(children)) {
- return toArray(children);
- }
-
- var element = children;
-
- if (element.type !== REACT_FRAGMENT_TYPE) {
- return [element];
- }
-
- var fragmentChildren = element.props.children;
-
- if (!React.isValidElement(fragmentChildren)) {
- return toArray(fragmentChildren);
- }
-
- var fragmentChildElement = fragmentChildren;
- return [fragmentChildElement];
- }
-
- function flattenOptionChildren(children) {
- if (children === undefined || children === null) {
- return children;
- }
-
- var content = ''; // Flatten children and warn if they aren't strings or numbers;
- // invalid types are ignored.
-
- React.Children.forEach(children, function (child) {
- if (child == null) {
- return;
- }
-
- content += child;
-
- {
- if (!didWarnInvalidOptionChildren && typeof child !== 'string' && typeof child !== 'number') {
- didWarnInvalidOptionChildren = true;
-
- error('Only strings and numbers are supported as <option> children.');
- }
- }
- });
- return content;
- }
-
- var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
- var STYLE = 'style';
- var RESERVED_PROPS = {
- children: null,
- dangerouslySetInnerHTML: null,
- suppressContentEditableWarning: null,
- suppressHydrationWarning: null
- };
-
- function createOpenTagMarkup(tagVerbatim, tagLowercase, props, namespace, makeStaticMarkup, isRootElement) {
- var ret = '<' + tagVerbatim;
- var isCustomComponent$1 = isCustomComponent(tagLowercase, props);
-
- for (var propKey in props) {
- if (!hasOwnProperty$2.call(props, propKey)) {
- continue;
- }
-
- var propValue = props[propKey];
-
- if (propValue == null) {
- continue;
- }
-
- if (propKey === STYLE) {
- propValue = createMarkupForStyles(propValue);
- }
-
- var markup = null;
-
- if (isCustomComponent$1) {
- if (!RESERVED_PROPS.hasOwnProperty(propKey)) {
- markup = createMarkupForCustomAttribute(propKey, propValue);
- }
- } else {
- markup = createMarkupForProperty(propKey, propValue);
- }
-
- if (markup) {
- ret += ' ' + markup;
- }
- } // For static pages, no need to put React ID and checksum. Saves lots of
- // bytes.
-
-
- if (makeStaticMarkup) {
- return ret;
- }
-
- if (isRootElement) {
- ret += ' ' + createMarkupForRoot();
- }
-
- return ret;
- }
-
- function validateRenderResult(child, type) {
- if (child === undefined) {
- {
- {
- throw Error( (getComponentName(type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
- }
- }
- }
- }
-
- function resolve(child, context, threadID) {
- while (React.isValidElement(child)) {
- // Safe because we just checked it's an element.
- var element = child;
- var Component = element.type;
-
- {
- pushElementToDebugStack(element);
- }
-
- if (typeof Component !== 'function') {
- break;
- }
-
- processChild(element, Component);
- } // Extra closure so queue and replace can be captured properly
-
-
- function processChild(element, Component) {
- var isClass = shouldConstruct$1(Component);
- var publicContext = processContext(Component, context, threadID, isClass);
- var queue = [];
- var replace = false;
- var updater = {
- isMounted: function (publicInstance) {
- return false;
- },
- enqueueForceUpdate: function (publicInstance) {
- if (queue === null) {
- warnNoop(publicInstance, 'forceUpdate');
- return null;
- }
- },
- enqueueReplaceState: function (publicInstance, completeState) {
- replace = true;
- queue = [completeState];
- },
- enqueueSetState: function (publicInstance, currentPartialState) {
- if (queue === null) {
- warnNoop(publicInstance, 'setState');
- return null;
- }
-
- queue.push(currentPartialState);
- }
- };
- var inst;
-
- if (isClass) {
- inst = new Component(element.props, publicContext, updater);
-
- if (typeof Component.getDerivedStateFromProps === 'function') {
- {
- if (inst.state === null || inst.state === undefined) {
- var componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutUninitializedState[componentName]) {
- 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, inst.state === null ? 'null' : 'undefined', componentName);
-
- didWarnAboutUninitializedState[componentName] = true;
- }
- }
- }
-
- var partialState = Component.getDerivedStateFromProps.call(null, element.props, inst.state);
-
- {
- if (partialState === undefined) {
- var _componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutUndefinedDerivedState[_componentName]) {
- error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', _componentName);
-
- didWarnAboutUndefinedDerivedState[_componentName] = true;
- }
- }
- }
-
- if (partialState != null) {
- inst.state = _assign({}, inst.state, partialState);
- }
- }
- } else {
- {
- if (Component.prototype && typeof Component.prototype.render === 'function') {
- var _componentName2 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutBadClass[_componentName2]) {
- 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.', _componentName2, _componentName2);
-
- didWarnAboutBadClass[_componentName2] = true;
- }
- }
- }
-
- var componentIdentity = {};
- prepareToUseHooks(componentIdentity);
- inst = Component(element.props, publicContext, updater);
- inst = finishHooks(Component, element.props, inst, publicContext);
-
- {
- // Support for module components is deprecated and is removed behind a flag.
- // Whether or not it would crash later, we want to show a good message in DEV first.
- if (inst != null && inst.render != null) {
- var _componentName3 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutModulePatternComponent[_componentName3]) {
- 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.', _componentName3, _componentName3, _componentName3);
-
- didWarnAboutModulePatternComponent[_componentName3] = true;
- }
- }
- } // If the flag is on, everything is assumed to be a function component.
- // Otherwise, we also do the unfortunate dynamic checks.
-
-
- if ( inst == null || inst.render == null) {
- child = inst;
- validateRenderResult(child, Component);
- return;
- }
- }
-
- inst.props = element.props;
- inst.context = publicContext;
- inst.updater = updater;
- var initialState = inst.state;
-
- if (initialState === undefined) {
- inst.state = initialState = null;
- }
-
- if (typeof inst.UNSAFE_componentWillMount === 'function' || typeof inst.componentWillMount === 'function') {
- if (typeof inst.componentWillMount === 'function') {
- {
- if ( inst.componentWillMount.__suppressDeprecationWarning !== true) {
- var _componentName4 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutDeprecatedWillMount[_componentName4]) {
- warn( // keep this warning in sync with ReactStrictModeWarning.js
- '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', _componentName4);
-
- didWarnAboutDeprecatedWillMount[_componentName4] = true;
- }
- }
- } // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
-
-
- if (typeof Component.getDerivedStateFromProps !== 'function') {
- inst.componentWillMount();
- }
- }
-
- if (typeof inst.UNSAFE_componentWillMount === 'function' && typeof Component.getDerivedStateFromProps !== 'function') {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for any component with the new gDSFP.
- inst.UNSAFE_componentWillMount();
- }
-
- if (queue.length) {
- var oldQueue = queue;
- var oldReplace = replace;
- queue = null;
- replace = false;
-
- if (oldReplace && oldQueue.length === 1) {
- inst.state = oldQueue[0];
- } else {
- var nextState = oldReplace ? oldQueue[0] : inst.state;
- var dontMutate = true;
-
- for (var i = oldReplace ? 1 : 0; i < oldQueue.length; i++) {
- var partial = oldQueue[i];
-
- var _partialState = typeof partial === 'function' ? partial.call(inst, nextState, element.props, publicContext) : partial;
-
- if (_partialState != null) {
- if (dontMutate) {
- dontMutate = false;
- nextState = _assign({}, nextState, _partialState);
- } else {
- _assign(nextState, _partialState);
- }
- }
- }
-
- inst.state = nextState;
- }
- } else {
- queue = null;
- }
- }
-
- child = inst.render();
-
- {
- if (child === undefined && inst.render._isMockFunction) {
- // This is probably bad practice. Consider warning here and
- // deprecating this convenience.
- child = null;
- }
- }
-
- validateRenderResult(child, Component);
- var childContext;
-
- {
- if (typeof inst.getChildContext === 'function') {
- var _childContextTypes = Component.childContextTypes;
-
- if (typeof _childContextTypes === 'object') {
- childContext = inst.getChildContext();
-
- for (var contextKey in childContext) {
- if (!(contextKey in _childContextTypes)) {
- {
- throw Error( (getComponentName(Component) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
- }
- }
- }
- } else {
- {
- error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', getComponentName(Component) || 'Unknown');
- }
- }
- }
-
- if (childContext) {
- context = _assign({}, context, childContext);
- }
- }
- }
-
- return {
- child: child,
- context: context
- };
- }
-
- var ReactDOMServerRenderer = /*#__PURE__*/function () {
- // TODO: type this more strictly:
- // DEV-only
- function ReactDOMServerRenderer(children, makeStaticMarkup, options) {
- var flatChildren = flattenTopLevelChildren(children);
- var topFrame = {
- type: null,
- // Assume all trees start in the HTML namespace (not totally true, but
- // this is what we did historically)
- domNamespace: Namespaces.html,
- children: flatChildren,
- childIndex: 0,
- context: emptyObject,
- footer: ''
- };
-
- {
- topFrame.debugElementStack = [];
- }
-
- this.threadID = allocThreadID();
- this.stack = [topFrame];
- this.exhausted = false;
- this.currentSelectValue = null;
- this.previousWasTextNode = false;
- this.makeStaticMarkup = makeStaticMarkup;
- this.suspenseDepth = 0; // Context (new API)
-
- this.contextIndex = -1;
- this.contextStack = [];
- this.contextValueStack = []; // useOpaqueIdentifier ID
-
- this.uniqueID = 0;
- this.identifierPrefix = options && options.identifierPrefix || '';
-
- {
- this.contextProviderStack = [];
- }
- }
-
- var _proto = ReactDOMServerRenderer.prototype;
-
- _proto.destroy = function destroy() {
- if (!this.exhausted) {
- this.exhausted = true;
- this.clearProviders();
- freeThreadID(this.threadID);
- }
- }
- /**
- * Note: We use just two stacks regardless of how many context providers you have.
- * Providers are always popped in the reverse order to how they were pushed
- * so we always know on the way down which provider you'll encounter next on the way up.
- * On the way down, we push the current provider, and its context value *before*
- * we mutated it, onto the stacks. Therefore, on the way up, we always know which
- * provider needs to be "restored" to which value.
- * https://github.com/facebook/react/pull/12985#issuecomment-396301248
- */
- ;
-
- _proto.pushProvider = function pushProvider(provider) {
- var index = ++this.contextIndex;
- var context = provider.type._context;
- var threadID = this.threadID;
- validateContextBounds(context, threadID);
- var previousValue = context[threadID]; // Remember which value to restore this context to on our way up.
-
- this.contextStack[index] = context;
- this.contextValueStack[index] = previousValue;
-
- {
- // Only used for push/pop mismatch warnings.
- this.contextProviderStack[index] = provider;
- } // Mutate the current value.
-
-
- context[threadID] = provider.props.value;
- };
-
- _proto.popProvider = function popProvider(provider) {
- var index = this.contextIndex;
-
- {
- if (index < 0 || provider !== this.contextProviderStack[index]) {
- error('Unexpected pop.');
- }
- }
-
- var context = this.contextStack[index];
- var previousValue = this.contextValueStack[index]; // "Hide" these null assignments from Flow by using `any`
- // because conceptually they are deletions--as long as we
- // promise to never access values beyond `this.contextIndex`.
-
- this.contextStack[index] = null;
- this.contextValueStack[index] = null;
-
- {
- this.contextProviderStack[index] = null;
- }
-
- this.contextIndex--; // Restore to the previous value we stored as we were walking down.
- // We've already verified that this context has been expanded to accommodate
- // this thread id, so we don't need to do it again.
-
- context[this.threadID] = previousValue;
- };
-
- _proto.clearProviders = function clearProviders() {
- // Restore any remaining providers on the stack to previous values
- for (var index = this.contextIndex; index >= 0; index--) {
- var context = this.contextStack[index];
- var previousValue = this.contextValueStack[index];
- context[this.threadID] = previousValue;
- }
- };
-
- _proto.read = function read(bytes) {
- if (this.exhausted) {
- return null;
- }
-
- var prevPartialRenderer = currentPartialRenderer;
- setCurrentPartialRenderer(this);
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = Dispatcher;
-
- try {
- // Markup generated within <Suspense> ends up buffered until we know
- // nothing in that boundary suspended
- var out = [''];
- var suspended = false;
-
- while (out[0].length < bytes) {
- if (this.stack.length === 0) {
- this.exhausted = true;
- freeThreadID(this.threadID);
- break;
- }
-
- var frame = this.stack[this.stack.length - 1];
-
- if (suspended || frame.childIndex >= frame.children.length) {
- var footer = frame.footer;
-
- if (footer !== '') {
- this.previousWasTextNode = false;
- }
-
- this.stack.pop();
-
- if (frame.type === 'select') {
- this.currentSelectValue = null;
- } else if (frame.type != null && frame.type.type != null && frame.type.type.$$typeof === REACT_PROVIDER_TYPE) {
- var provider = frame.type;
- this.popProvider(provider);
- } else if (frame.type === REACT_SUSPENSE_TYPE) {
- this.suspenseDepth--;
- var buffered = out.pop();
-
- if (suspended) {
- suspended = false; // If rendering was suspended at this boundary, render the fallbackFrame
-
- var fallbackFrame = frame.fallbackFrame;
-
- if (!fallbackFrame) {
- {
- throw Error(true ? "ReactDOMServer did not find an internal fallback frame for Suspense. This is a bug in React. Please file an issue." : formatProdErrorMessage(303));
- }
- }
-
- this.stack.push(fallbackFrame);
- out[this.suspenseDepth] += '<!--$!-->'; // Skip flushing output since we're switching to the fallback
-
- continue;
- } else {
- out[this.suspenseDepth] += buffered;
- }
- } // Flush output
-
-
- out[this.suspenseDepth] += footer;
- continue;
- }
-
- var child = frame.children[frame.childIndex++];
- var outBuffer = '';
-
- if (true) {
- pushCurrentDebugStack(this.stack); // We're starting work on this frame, so reset its inner stack.
-
- frame.debugElementStack.length = 0;
- }
-
- try {
- outBuffer += this.render(child, frame.context, frame.domNamespace);
- } catch (err) {
- if (err != null && typeof err.then === 'function') {
- if (enableSuspenseServerRenderer) {
- if (!(this.suspenseDepth > 0)) {
- {
- throw Error(true ? "A React component suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display." : formatProdErrorMessage(342));
- }
- }
-
- suspended = true;
- } else {
- if (!false) {
- {
- throw Error(true ? "ReactDOMServer does not yet support Suspense." : formatProdErrorMessage(294));
- }
- }
- }
- } else {
- throw err;
- }
- } finally {
- if (true) {
- popCurrentDebugStack();
- }
- }
-
- if (out.length <= this.suspenseDepth) {
- out.push('');
- }
-
- out[this.suspenseDepth] += outBuffer;
- }
-
- return out[0];
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- setCurrentPartialRenderer(prevPartialRenderer);
- resetHooksState();
- }
- };
-
- _proto.render = function render(child, context, parentNamespace) {
- if (typeof child === 'string' || typeof child === 'number') {
- var text = '' + child;
-
- if (text === '') {
- return '';
- }
-
- if (this.makeStaticMarkup) {
- return escapeTextForBrowser(text);
- }
-
- if (this.previousWasTextNode) {
- return '<!-- -->' + escapeTextForBrowser(text);
- }
-
- this.previousWasTextNode = true;
- return escapeTextForBrowser(text);
- } else {
- var nextChild;
-
- var _resolve = resolve(child, context, this.threadID);
-
- nextChild = _resolve.child;
- context = _resolve.context;
-
- if (nextChild === null || nextChild === false) {
- return '';
- } else if (!React.isValidElement(nextChild)) {
- if (nextChild != null && nextChild.$$typeof != null) {
- // Catch unexpected special types early.
- var $$typeof = nextChild.$$typeof;
-
- if (!($$typeof !== REACT_PORTAL_TYPE)) {
- {
- throw Error( "Portals are not currently supported by the server renderer. Render them conditionally so that they only appear on the client render." );
- }
- } // Catch-all to prevent an infinite loop if React.Children.toArray() supports some new type.
-
-
- {
- {
- throw Error( "Unknown element-like object type: " + $$typeof.toString() + ". This is likely a bug in React. Please file an issue." );
- }
- }
- }
-
- var nextChildren = toArray(nextChild);
- var frame = {
- type: null,
- domNamespace: parentNamespace,
- children: nextChildren,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- frame.debugElementStack = [];
- }
-
- this.stack.push(frame);
- return '';
- } // Safe because we just checked it's an element.
-
-
- var nextElement = nextChild;
- var elementType = nextElement.type;
-
- if (typeof elementType === 'string') {
- return this.renderDOM(nextElement, context, parentNamespace);
- }
-
- switch (elementType) {
- // TODO: LegacyHidden acts the same as a fragment. This only works
- // because we currently assume that every instance of LegacyHidden is
- // accompanied by a host component wrapper. In the hidden mode, the host
- // component is given a `hidden` attribute, which ensures that the
- // initial HTML is not visible. To support the use of LegacyHidden as a
- // true fragment, without an extra DOM node, we would have to hide the
- // initial HTML in some other way.
- case REACT_LEGACY_HIDDEN_TYPE:
- case REACT_DEBUG_TRACING_MODE_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_SUSPENSE_LIST_TYPE:
- case REACT_FRAGMENT_TYPE:
- {
- var _nextChildren = toArray(nextChild.props.children);
-
- var _frame = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame.debugElementStack = [];
- }
-
- this.stack.push(_frame);
- return '';
- }
-
- case REACT_SUSPENSE_TYPE:
- {
- {
- {
- {
- throw Error( "ReactDOMServer does not yet support Suspense." );
- }
- }
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_SCOPE_TYPE:
- {
-
- {
- {
- throw Error( "ReactDOMServer does not yet support scope components." );
- }
- }
- }
- }
-
- if (typeof elementType === 'object' && elementType !== null) {
- switch (elementType.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- {
- var element = nextChild;
-
- var _nextChildren5;
-
- var componentIdentity = {};
- prepareToUseHooks(componentIdentity);
- _nextChildren5 = elementType.render(element.props, element.ref);
- _nextChildren5 = finishHooks(elementType.render, element.props, _nextChildren5, element.ref);
- _nextChildren5 = toArray(_nextChildren5);
- var _frame5 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren5,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame5.debugElementStack = [];
- }
-
- this.stack.push(_frame5);
- return '';
- }
-
- case REACT_MEMO_TYPE:
- {
- var _element = nextChild;
- var _nextChildren6 = [React.createElement(elementType.type, _assign({
- ref: _element.ref
- }, _element.props))];
- var _frame6 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren6,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame6.debugElementStack = [];
- }
-
- this.stack.push(_frame6);
- return '';
- }
-
- case REACT_PROVIDER_TYPE:
- {
- var provider = nextChild;
- var nextProps = provider.props;
-
- var _nextChildren7 = toArray(nextProps.children);
-
- var _frame7 = {
- type: provider,
- domNamespace: parentNamespace,
- children: _nextChildren7,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame7.debugElementStack = [];
- }
-
- this.pushProvider(provider);
- this.stack.push(_frame7);
- return '';
- }
-
- case REACT_CONTEXT_TYPE:
- {
- var reactContext = nextChild.type; // The logic below for Context differs depending on PROD or DEV mode. In
- // DEV mode, we create a separate object for Context.Consumer that acts
- // like a proxy to Context. This proxy object adds unnecessary code in PROD
- // so we use the old behaviour (Context.Consumer references Context) to
- // reduce size and overhead. The separate object references context via
- // a property called "_context", which also gives us the ability to check
- // in DEV mode if this property exists or not and warn if it does not.
-
- {
- if (reactContext._context === undefined) {
- // This may be because it's a Context (rather than a Consumer).
- // Or it may be because it's older React where they're the same thing.
- // We only want to warn if we're sure it's a new React.
- if (reactContext !== reactContext.Consumer) {
- if (!hasWarnedAboutUsingContextAsConsumer) {
- hasWarnedAboutUsingContextAsConsumer = true;
-
- error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
- }
- } else {
- reactContext = reactContext._context;
- }
- }
-
- var _nextProps = nextChild.props;
- var threadID = this.threadID;
- validateContextBounds(reactContext, threadID);
- var nextValue = reactContext[threadID];
-
- var _nextChildren8 = toArray(_nextProps.children(nextValue));
-
- var _frame8 = {
- type: nextChild,
- domNamespace: parentNamespace,
- children: _nextChildren8,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame8.debugElementStack = [];
- }
-
- this.stack.push(_frame8);
- return '';
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_FUNDAMENTAL_TYPE:
- {
-
- {
- {
- throw Error( "ReactDOMServer does not yet support the fundamental API." );
- }
- }
- }
- // eslint-disable-next-line-no-fallthrough
-
- case REACT_LAZY_TYPE:
- {
- var _element2 = nextChild;
- var lazyComponent = nextChild.type; // Attempt to initialize lazy component regardless of whether the
- // suspense server-side renderer is enabled so synchronously
- // resolved constructors are supported.
-
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
- var result = init(payload);
- var _nextChildren10 = [React.createElement(result, _assign({
- ref: _element2.ref
- }, _element2.props))];
- var _frame10 = {
- type: null,
- domNamespace: parentNamespace,
- children: _nextChildren10,
- childIndex: 0,
- context: context,
- footer: ''
- };
-
- {
- _frame10.debugElementStack = [];
- }
-
- this.stack.push(_frame10);
- return '';
- }
- }
- }
-
- var info = '';
-
- {
- var owner = nextElement._owner;
-
- if (elementType === undefined || typeof elementType === 'object' && elementType !== null && Object.keys(elementType).length === 0) {
- 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.';
- }
-
- var ownerName = owner ? getComponentName(owner) : null;
-
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
- }
-
- {
- {
- throw Error( "Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: " + (elementType == null ? elementType : typeof elementType) + "." + info );
- }
- }
- }
- };
-
- _proto.renderDOM = function renderDOM(element, context, parentNamespace) {
- var tag = element.type.toLowerCase();
- var namespace = parentNamespace;
-
- if (parentNamespace === Namespaces.html) {
- namespace = getIntrinsicNamespace(tag);
- }
-
- {
- if (namespace === Namespaces.html) {
- // Should this check be gated by parent namespace? Not sure we want to
- // allow <SVG> or <mATH>.
- if (tag !== element.type) {
- error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', element.type);
- }
- }
- }
-
- validateDangerousTag(tag);
- var props = element.props;
-
- if (tag === 'input') {
- {
- checkControlledValueProps('input', props);
-
- if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnDefaultChecked) {
- 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);
-
- didWarnDefaultChecked = true;
- }
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultInputValue) {
- 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);
-
- didWarnDefaultInputValue = true;
- }
- }
-
- props = _assign({
- type: undefined
- }, props, {
- defaultChecked: undefined,
- defaultValue: undefined,
- value: props.value != null ? props.value : props.defaultValue,
- checked: props.checked != null ? props.checked : props.defaultChecked
- });
- } else if (tag === 'textarea') {
- {
- checkControlledValueProps('textarea', props);
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultTextareaValue) {
- 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');
-
- didWarnDefaultTextareaValue = true;
- }
- }
-
- var initialValue = props.value;
-
- if (initialValue == null) {
- var defaultValue = props.defaultValue; // TODO (yungsters): Remove support for children content in <textarea>.
-
- var textareaChildren = props.children;
-
- if (textareaChildren != null) {
- {
- error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
- }
-
- if (!(defaultValue == null)) {
- {
- throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
- }
- }
-
- if (Array.isArray(textareaChildren)) {
- if (!(textareaChildren.length <= 1)) {
- {
- throw Error( "<textarea> can only have at most one child." );
- }
- }
-
- textareaChildren = textareaChildren[0];
- }
-
- defaultValue = '' + textareaChildren;
- }
-
- if (defaultValue == null) {
- defaultValue = '';
- }
-
- initialValue = defaultValue;
- }
-
- props = _assign({}, props, {
- value: undefined,
- children: '' + initialValue
- });
- } else if (tag === 'select') {
- {
- checkControlledValueProps('select', props);
-
- for (var i = 0; i < valuePropNames.length; i++) {
- var propName = valuePropNames[i];
-
- if (props[propName] == null) {
- continue;
- }
-
- var isArray = Array.isArray(props[propName]);
-
- if (props.multiple && !isArray) {
- error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.', propName);
- } else if (!props.multiple && isArray) {
- error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.', propName);
- }
- }
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnDefaultSelectValue) {
- 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');
-
- didWarnDefaultSelectValue = true;
- }
- }
-
- this.currentSelectValue = props.value != null ? props.value : props.defaultValue;
- props = _assign({}, props, {
- value: undefined
- });
- } else if (tag === 'option') {
- var selected = null;
- var selectValue = this.currentSelectValue;
- var optionChildren = flattenOptionChildren(props.children);
-
- if (selectValue != null) {
- var value;
-
- if (props.value != null) {
- value = props.value + '';
- } else {
- value = optionChildren;
- }
-
- selected = false;
-
- if (Array.isArray(selectValue)) {
- // multiple
- for (var j = 0; j < selectValue.length; j++) {
- if ('' + selectValue[j] === value) {
- selected = true;
- break;
- }
- }
- } else {
- selected = '' + selectValue === value;
- }
-
- props = _assign({
- selected: undefined,
- children: undefined
- }, props, {
- selected: selected,
- children: optionChildren
- });
- }
- }
-
- {
- validatePropertiesInDevelopment(tag, props);
- }
-
- assertValidProps(tag, props);
- var out = createOpenTagMarkup(element.type, tag, props, namespace, this.makeStaticMarkup, this.stack.length === 1);
- var footer = '';
-
- if (omittedCloseTags.hasOwnProperty(tag)) {
- out += '/>';
- } else {
- out += '>';
- footer = '</' + element.type + '>';
- }
-
- var children;
- var innerMarkup = getNonChildrenInnerMarkup(props);
-
- if (innerMarkup != null) {
- children = [];
-
- if (newlineEatingTags.hasOwnProperty(tag) && innerMarkup.charAt(0) === '\n') {
- // text/html ignores the first character in these tags if it's a newline
- // Prefer to break application/xml over text/html (for now) by adding
- // a newline specifically to get eaten by the parser. (Alternately for
- // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
- // \r is normalized out by HTMLTextAreaElement#value.)
- // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
- // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
- // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
- // See: Parsing of "textarea" "listing" and "pre" elements
- // from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
- out += '\n';
- }
-
- out += innerMarkup;
- } else {
- children = toArray(props.children);
- }
-
- var frame = {
- domNamespace: getChildNamespace(parentNamespace, element.type),
- type: tag,
- children: children,
- childIndex: 0,
- context: context,
- footer: footer
- };
-
- {
- frame.debugElementStack = [];
- }
-
- this.stack.push(frame);
- this.previousWasTextNode = false;
- return out;
- };
-
- return ReactDOMServerRenderer;
- }();
-
- /**
- * Render a ReactElement to its initial HTML. This should only be used on the
- * server.
- * See https://reactjs.org/docs/react-dom-server.html#rendertostring
- */
-
- function renderToString(element, options) {
- var renderer = new ReactDOMServerRenderer(element, false, options);
-
- try {
- var markup = renderer.read(Infinity);
- return markup;
- } finally {
- renderer.destroy();
- }
- }
- /**
- * Similar to renderToString, except this doesn't create extra DOM attributes
- * such as data-react-id that React uses internally.
- * See https://reactjs.org/docs/react-dom-server.html#rendertostaticmarkup
- */
-
- function renderToStaticMarkup(element, options) {
- var renderer = new ReactDOMServerRenderer(element, true, options);
-
- try {
- var markup = renderer.read(Infinity);
- return markup;
- } finally {
- renderer.destroy();
- }
- }
-
- function renderToNodeStream() {
- {
- {
- throw Error( "ReactDOMServer.renderToNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToString() instead." );
- }
- }
- }
-
- function renderToStaticNodeStream() {
- {
- {
- throw Error( "ReactDOMServer.renderToStaticNodeStream(): The streaming API is not available in the browser. Use ReactDOMServer.renderToStaticMarkup() instead." );
- }
- }
- }
-
- exports.renderToNodeStream = renderToNodeStream;
- exports.renderToStaticMarkup = renderToStaticMarkup;
- exports.renderToStaticNodeStream = renderToStaticNodeStream;
- exports.renderToString = renderToString;
- exports.version = ReactVersion;
-
-})));
diff --git a/node_modules/react-dom/umd/react-dom-server.browser.production.min.js b/node_modules/react-dom/umd/react-dom-server.browser.production.min.js
deleted file mode 100644
index 79e9a22..0000000
--- a/node_modules/react-dom/umd/react-dom-server.browser.production.min.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/** @license React v17.0.2
- * react-dom-server.browser.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function(){'use strict';(function(x,r){"object"===typeof exports&&"undefined"!==typeof module?r(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],r):(x=x||self,r(x.ReactDOMServer={},x.React))})(this,function(x,r){function t(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-function E(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case I:return"Fragment";case P:return"Portal";case Q:return"Profiler";case R:return"StrictMode";case J:return"Suspense";case S:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case T:return(a.displayName||"Context")+".Consumer";case K:return(a._context.displayName||"Context")+".Provider";case U:var b=a.render;b=b.displayName||b.name||"";return a.displayName||
-(""!==b?"ForwardRef("+b+")":"ForwardRef");case V:return E(a.type);case ea:return E(a._render);case W:b=a._payload;a=a._init;try{return E(a(b))}catch(c){}}return null}function F(a,b){for(var c=a._threadCount|0;c<=b;c++)a[c]=a._currentValue2,a._threadCount=c+1}function Aa(a,b,c,d){if(d&&(d=a.contextType,"object"===typeof d&&null!==d))return F(d,c),d[c];if(a=a.contextTypes){c={};for(var f in a)c[f]=b[f];b=c}else b=fa;return b}function ha(a){if(ia.call(ja,a))return!0;if(ia.call(ka,a))return!1;if(Ba.test(a))return ja[a]=
-!0;ka[a]=!0;return!1}function Ca(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function Da(a,b,c,d){if(null===b||"undefined"===typeof b||Ca(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function q(a,
-b,c,d,f,k,w){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=f;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=k;this.removeEmptyString=w}function C(a){if("boolean"===typeof a||"number"===typeof a)return""+a;a=""+a;var b=Ea.exec(a);if(b){var c="",d,f=0;for(d=b.index;d<a.length;d++){switch(a.charCodeAt(d)){case 34:b="&quot;";break;case 38:b="&amp;";break;case 39:b="&#x27;";break;case 60:b="&lt;";break;case 62:b="&gt;";break;default:continue}f!==
-d&&(c+=a.substring(f,d));f=d+1;c+=b}a=f!==d?c+a.substring(f,d):c}return a}function Fa(a,b){var c=m.hasOwnProperty(a)?m[a]:null;var d;if(d="style"!==a)d=null!==c?0===c.type:!(2<a.length)||"o"!==a[0]&&"O"!==a[0]||"n"!==a[1]&&"N"!==a[1]?!1:!0;if(d||Da(a,b,c,!1))return"";if(null!==c){a=c.attributeName;d=c.type;if(3===d||4===d&&!0===b)return a+'=""';c.sanitizeURL&&(b=""+b);return a+'="'+(C(b)+'"')}return ha(a)?a+'="'+(C(b)+'"'):""}function Ga(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function A(){if(null===
-u)throw Error(t(321));return u}function la(){if(0<L)throw Error(t(312));return{memoizedState:null,queue:null,next:null}}function X(){null===g?null===M?(G=!1,M=g=la()):(G=!0,g=M):null===g.next?(G=!1,g=g.next=la()):(G=!0,g=g.next);return g}function ma(a,b,c,d){for(;N;)N=!1,L+=1,g=null,c=a(b,d);na();return c}function na(){u=null;N=!1;M=null;L=0;g=v=null}function oa(a,b){return"function"===typeof b?b(a):b}function pa(a,b,c){u=A();g=X();if(G){var d=g.queue;b=d.dispatch;if(null!==v&&(c=v.get(d),void 0!==
-c)){v.delete(d);d=g.memoizedState;do d=a(d,c.action),c=c.next;while(null!==c);g.memoizedState=d;return[d,b]}return[g.memoizedState,b]}a=a===oa?"function"===typeof b?b():b:void 0!==c?c(b):b;g.memoizedState=a;a=g.queue={last:null,dispatch:null};a=a.dispatch=Ha.bind(null,u,a);return[g.memoizedState,a]}function qa(a,b){u=A();g=X();b=void 0===b?null:b;if(null!==g){var c=g.memoizedState;if(null!==c&&null!==b){var d=c[1];a:if(null===d)d=!1;else{for(var f=0;f<d.length&&f<b.length;f++)if(!Ia(b[f],d[f])){d=
-!1;break a}d=!0}if(d)return c[0]}}a=a();g.memoizedState=[a,b];return a}function Ha(a,b,c){if(!(25>L))throw Error(t(301));if(a===u)if(N=!0,a={action:c,next:null},null===v&&(v=new Map),c=v.get(b),void 0===c)v.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}}function Y(){}function ra(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Ja(a){if(void 0===a||null===a)return a;var b=
-"";r.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function sa(a,b){if(void 0===a)throw Error(t(152,E(b)||"Component"));}function Ka(a,b,c){function d(d,k){var e=k.prototype&&k.prototype.isReactComponent,f=Aa(k,b,c,e),w=[],h=!1,g={isMounted:function(a){return!1},enqueueForceUpdate:function(a){if(null===w)return null},enqueueReplaceState:function(a,c){h=!0;w=[c]},enqueueSetState:function(a,c){if(null===w)return null;w.push(c)}};if(e){if(e=new k(d.props,f,g),"function"===typeof k.getDerivedStateFromProps){var p=
-k.getDerivedStateFromProps.call(null,d.props,e.state);null!=p&&(e.state=z({},e.state,p))}}else if(u={},e=k(d.props,f,g),e=ma(k,d.props,e,f),null==e||null==e.render){a=e;sa(a,k);return}e.props=d.props;e.context=f;e.updater=g;g=e.state;void 0===g&&(e.state=g=null);if("function"===typeof e.UNSAFE_componentWillMount||"function"===typeof e.componentWillMount)if("function"===typeof e.componentWillMount&&"function"!==typeof k.getDerivedStateFromProps&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&
-"function"!==typeof k.getDerivedStateFromProps&&e.UNSAFE_componentWillMount(),w.length){g=w;var l=h;w=null;h=!1;if(l&&1===g.length)e.state=g[0];else{p=l?g[0]:e.state;var m=!0;for(l=l?1:0;l<g.length;l++){var n=g[l];n="function"===typeof n?n.call(e,p,d.props,f):n;null!=n&&(m?(m=!1,p=z({},p,n)):z(p,n))}e.state=p}}else w=null;a=e.render();sa(a,k);if("function"===typeof e.getChildContext&&(d=k.childContextTypes,"object"===typeof d)){var q=e.getChildContext();for(var r in q)if(!(r in d))throw Error(t(108,
-E(k)||"Unknown",r));}q&&(b=z({},b,q))}for(;r.isValidElement(a);){var f=a,k=f.type;if("function"!==typeof k)break;d(f,k)}return{child:a,context:b}}var z=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,P=60106,I=60107,R=60108,Q=60114,K=60109,T=60110,U=60112,J=60113,S=60120,V=60115,W=60116,ea=60121,ta=60117,ua=60119,va=60129,wa=60131;if("function"===typeof Symbol&&Symbol.for){var l=Symbol.for;P=l("react.portal");I=l("react.fragment");R=l("react.strict_mode");Q=l("react.profiler");K=l("react.provider");
-T=l("react.context");U=l("react.forward_ref");J=l("react.suspense");S=l("react.suspense_list");V=l("react.memo");W=l("react.lazy");ea=l("react.block");ta=l("react.fundamental");ua=l("react.scope");va=l("react.debug_trace_mode");wa=l("react.legacy_hidden")}l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;for(var fa={},n=new Uint16Array(16),O=0;15>O;O++)n[O]=O+1;n[15]=0;var Ba=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
-ia=Object.prototype.hasOwnProperty,ka={},ja={},m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){m[a]=new q(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];m[b]=new q(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){m[a]=
-new q(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){m[a]=new q(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){m[a]=new q(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple",
-"muted","selected"].forEach(function(a){m[a]=new q(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){m[a]=new q(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){m[a]=new q(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){m[a]=new q(a,5,!1,a.toLowerCase(),null,!1,!1)});var aa=/[\-:]([a-z])/g,ba=function(a){return a[1].toUpperCase()};"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".split(" ").forEach(function(a){var b=
-a.replace(aa,ba);m[b]=new q(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(aa,ba);m[b]=new q(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(aa,ba);m[b]=new q(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){m[a]=new q(a,1,!1,a.toLowerCase(),null,!1,!1)});m.xlinkHref=new q("xlinkHref",
-1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){m[a]=new q(a,1,!1,a.toLowerCase(),null,!0,!0)});var Ea=/["'&<>]/,Ia="function"===typeof Object.is?Object.is:Ga,u=null,M=null,g=null,G=!1,N=!1,v=null,L=0,D=null,La={readContext:function(a,b){b=D.threadID;F(a,b);return a[b]},useContext:function(a,b){A();b=D.threadID;F(a,b);return a[b]},useMemo:qa,useReducer:pa,useRef:function(a){u=A();g=X();var b=g.memoizedState;return null===b?(a={current:a},
-g.memoizedState=a):b},useState:function(a){return pa(oa,a)},useLayoutEffect:function(a,b){},useCallback:function(a,b){return qa(function(){return a},b)},useImperativeHandle:Y,useEffect:Y,useDebugValue:Y,useDeferredValue:function(a){A();return a},useTransition:function(){A();return[function(a){a()},!1]},useOpaqueIdentifier:function(){return(D.identifierPrefix||"")+"R:"+(D.uniqueID++).toString(36)},useMutableSource:function(a,b,c){A();return b(a._source)}},xa={area:!0,base:!0,br:!0,col:!0,embed:!0,
-hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},Ma=z({menuitem:!0},xa),H={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,
-lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Na=["Webkit","ms","Moz","O"];Object.keys(H).forEach(function(a){Na.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);H[b]=H[a]})});var Oa=/([A-Z])/g,Pa=/^ms-/,B=r.Children.toArray,ca=l.ReactCurrentDispatcher,Qa={listing:!0,pre:!0,textarea:!0},Ra=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,
-ya={},da={},Sa=Object.prototype.hasOwnProperty,Ta={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null,suppressHydrationWarning:null},za=function(){function a(a,b,f){r.isValidElement(a)?a.type!==I?a=[a]:(a=a.props.children,a=r.isValidElement(a)?[a]:B(a)):a=B(a);a={type:null,domNamespace:"http://www.w3.org/1999/xhtml",children:a,childIndex:0,context:fa,footer:""};var c=n[0];if(0===c){var d=n;c=d.length;var h=2*c;if(!(65536>=h))throw Error(t(304));var e=new Uint16Array(h);
-e.set(d);n=e;n[0]=c+1;for(d=c;d<h-1;d++)n[d]=d+1;n[h-1]=0}else n[0]=n[c];this.threadID=c;this.stack=[a];this.exhausted=!1;this.currentSelectValue=null;this.previousWasTextNode=!1;this.makeStaticMarkup=b;this.suspenseDepth=0;this.contextIndex=-1;this.contextStack=[];this.contextValueStack=[];this.uniqueID=0;this.identifierPrefix=f&&f.identifierPrefix||""}var b=a.prototype;b.destroy=function(){if(!this.exhausted){this.exhausted=!0;this.clearProviders();var a=this.threadID;n[a]=n[0];n[0]=a}};b.pushProvider=
-function(a){var b=++this.contextIndex,c=a.type._context,k=this.threadID;F(c,k);var w=c[k];this.contextStack[b]=c;this.contextValueStack[b]=w;c[k]=a.props.value};b.popProvider=function(a){a=this.contextIndex;var b=this.contextStack[a],c=this.contextValueStack[a];this.contextStack[a]=null;this.contextValueStack[a]=null;this.contextIndex--;b[this.threadID]=c};b.clearProviders=function(){for(var a=this.contextIndex;0<=a;a--)this.contextStack[a][this.threadID]=this.contextValueStack[a]};b.read=function(a){if(this.exhausted)return null;
-var b=D;D=this;var c=ca.current;ca.current=La;try{for(var k=[""],w=!1;k[0].length<a;){if(0===this.stack.length){this.exhausted=!0;var h=this.threadID;n[h]=n[0];n[0]=h;break}var e=this.stack[this.stack.length-1];if(w||e.childIndex>=e.children.length){var g=e.footer;""!==g&&(this.previousWasTextNode=!1);this.stack.pop();if("select"===e.type)this.currentSelectValue=null;else if(null!=e.type&&null!=e.type.type&&e.type.type.$$typeof===K)this.popProvider(e.type);else if(e.type===J){this.suspenseDepth--;
-var l=k.pop();if(w){w=!1;var m=e.fallbackFrame;if(!m)throw Error(t(303));this.stack.push(m);k[this.suspenseDepth]+="\x3c!--$!--\x3e";continue}else k[this.suspenseDepth]+=l}k[this.suspenseDepth]+=g}else{var q=e.children[e.childIndex++],p="";try{p+=this.render(q,e.context,e.domNamespace)}catch(Z){if(null!=Z&&"function"===typeof Z.then)throw Error(t(294));throw Z;}finally{}k.length<=this.suspenseDepth&&k.push("");k[this.suspenseDepth]+=p}}return k[0]}finally{ca.current=c,D=b,na()}};b.render=function(a,
-b,f){if("string"===typeof a||"number"===typeof a){f=""+a;if(""===f)return"";if(this.makeStaticMarkup)return C(f);if(this.previousWasTextNode)return"\x3c!-- --\x3e"+C(f);this.previousWasTextNode=!0;return C(f)}b=Ka(a,b,this.threadID);a=b.child;b=b.context;if(null===a||!1===a)return"";if(!r.isValidElement(a)){if(null!=a&&null!=a.$$typeof){f=a.$$typeof;if(f===P)throw Error(t(257));throw Error(t(258,f.toString()));}a=B(a);this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""});
-return""}var c=a.type;if("string"===typeof c)return this.renderDOM(a,b,f);switch(c){case wa:case va:case R:case Q:case S:case I:return a=B(a.props.children),this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case J:throw Error(t(294));case ua:throw Error(t(343));}if("object"===typeof c&&null!==c)switch(c.$$typeof){case U:u={};var d=c.render(a.props,a.ref);d=ma(c.render,a.props,d,a.ref);d=B(d);this.stack.push({type:null,domNamespace:f,children:d,childIndex:0,
-context:b,footer:""});return"";case V:return a=[r.createElement(c.type,z({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),"";case K:return c=B(a.props.children),f={type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""},this.pushProvider(a),this.stack.push(f),"";case T:c=a.type;d=a.props;var h=this.threadID;F(c,h);c=B(d.children(c[h]));this.stack.push({type:a,domNamespace:f,children:c,childIndex:0,context:b,footer:""});return"";
-case ta:throw Error(t(338));case W:return c=a.type,d=c._init,c=d(c._payload),a=[r.createElement(c,z({ref:a.ref},a.props))],this.stack.push({type:null,domNamespace:f,children:a,childIndex:0,context:b,footer:""}),""}throw Error(t(130,null==c?c:typeof c,""));};b.renderDOM=function(a,b,f){var c=a.type.toLowerCase();"http://www.w3.org/1999/xhtml"===f&&ra(c);if(!ya.hasOwnProperty(c)){if(!Ra.test(c))throw Error(t(65,c));ya[c]=!0}var d=a.props;if("input"===c)d=z({type:void 0},d,{defaultChecked:void 0,defaultValue:void 0,
-value:null!=d.value?d.value:d.defaultValue,checked:null!=d.checked?d.checked:d.defaultChecked});else if("textarea"===c){var h=d.value;if(null==h){h=d.defaultValue;var e=d.children;if(null!=e){if(null!=h)throw Error(t(92));if(Array.isArray(e)){if(!(1>=e.length))throw Error(t(93));e=e[0]}h=""+e}null==h&&(h="")}d=z({},d,{value:void 0,children:""+h})}else if("select"===c)this.currentSelectValue=null!=d.value?d.value:d.defaultValue,d=z({},d,{value:void 0});else if("option"===c){e=this.currentSelectValue;
-var g=Ja(d.children);if(null!=e){var l=null!=d.value?d.value+"":g;h=!1;if(Array.isArray(e))for(var n=0;n<e.length;n++){if(""+e[n]===l){h=!0;break}}else h=""+e===l;d=z({selected:void 0,children:void 0},d,{selected:h,children:g})}}if(h=d){if(Ma[c]&&(null!=h.children||null!=h.dangerouslySetInnerHTML))throw Error(t(137,c));if(null!=h.dangerouslySetInnerHTML){if(null!=h.children)throw Error(t(60));if(!("object"===typeof h.dangerouslySetInnerHTML&&"__html"in h.dangerouslySetInnerHTML))throw Error(t(61));
-}if(null!=h.style&&"object"!==typeof h.style)throw Error(t(62));}h=d;e=this.makeStaticMarkup;g=1===this.stack.length;l="<"+a.type;b:if(-1===c.indexOf("-"))n="string"===typeof h.is;else switch(c){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":n=!1;break b;default:n=!0}for(y in h)if(Sa.call(h,y)){var m=h[y];if(null!=m){if("style"===y){var p=void 0,q="",r="";for(p in m)if(m.hasOwnProperty(p)){var x=
-0===p.indexOf("--"),u=m[p];if(null!=u){if(x)var v=p;else if(v=p,da.hasOwnProperty(v))v=da[v];else{var A=v.replace(Oa,"-$1").toLowerCase().replace(Pa,"-ms-");v=da[v]=A}q+=r+v+":";r=p;x=null==u||"boolean"===typeof u||""===u?"":x||"number"!==typeof u||0===u||H.hasOwnProperty(r)&&H[r]?(""+u).trim():u+"px";q+=x;r=";"}}m=q||null}p=null;n?Ta.hasOwnProperty(y)||(p=y,p=ha(p)&&null!=m?p+'="'+(C(m)+'"'):""):p=Fa(y,m);p&&(l+=" "+p)}}e||g&&(l+=' data-reactroot=""');var y=l;h="";xa.hasOwnProperty(c)?y+="/>":(y+=
-">",h="</"+a.type+">");a:{e=d.dangerouslySetInnerHTML;if(null!=e){if(null!=e.__html){e=e.__html;break a}}else if(e=d.children,"string"===typeof e||"number"===typeof e){e=C(e);break a}e=null}null!=e?(d=[],Qa.hasOwnProperty(c)&&"\n"===e.charAt(0)&&(y+="\n"),y+=e):d=B(d.children);a=a.type;f=null==f||"http://www.w3.org/1999/xhtml"===f?ra(a):"http://www.w3.org/2000/svg"===f&&"foreignObject"===a?"http://www.w3.org/1999/xhtml":f;this.stack.push({domNamespace:f,type:c,children:d,childIndex:0,context:b,footer:h});
-this.previousWasTextNode=!1;return y};return a}();x.renderToNodeStream=function(){throw Error(t(207));};x.renderToStaticMarkup=function(a,b){a=new za(a,!0,b);try{return a.read(Infinity)}finally{a.destroy()}};x.renderToStaticNodeStream=function(){throw Error(t(208));};x.renderToString=function(a,b){a=new za(a,!1,b);try{return a.read(Infinity)}finally{a.destroy()}};x.version="17.0.2"});
-})();
diff --git a/node_modules/react-dom/umd/react-dom-test-utils.development.js b/node_modules/react-dom/umd/react-dom-test-utils.development.js
deleted file mode 100644
index 59e1032..0000000
--- a/node_modules/react-dom/umd/react-dom-test-utils.development.js
+++ /dev/null
@@ -1,2136 +0,0 @@
-/** @license React v17.0.2
- * react-dom-test-utils.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('react-dom')) :
- typeof define === 'function' && define.amd ? define(['exports', 'react', 'react-dom'], factory) :
- (global = global || self, factory(global.ReactTestUtils = {}, global.React, global.ReactDOM));
-}(this, (function (exports, React, ReactDOM) { 'use strict';
-
- var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _assign = ReactInternals.assign;
-
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
- // by calls to these methods by a Babel plugin.
- //
- // In PROD (or in packages without access to React internals),
- // they are left as they are instead.
-
- function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
- }
- function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
- }
-
- function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
- }
-
- /**
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
- * instance (key) and the internal representation (value). This allows public
- * methods to accept the user facing instance as an argument and map them back
- * to internal methods.
- *
- * Note that this module is currently shared and assumed to be stateless.
- * If this becomes an actual Map, that will break.
- */
- function get(key) {
- return key._reactInternals;
- }
-
- // ATTENTION
- // When adding new symbols to this file,
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var REACT_ELEMENT_TYPE = 0xeac7;
- var REACT_PORTAL_TYPE = 0xeaca;
- var REACT_FRAGMENT_TYPE = 0xeacb;
- var REACT_STRICT_MODE_TYPE = 0xeacc;
- var REACT_PROFILER_TYPE = 0xead2;
- var REACT_PROVIDER_TYPE = 0xeacd;
- var REACT_CONTEXT_TYPE = 0xeace;
- var REACT_FORWARD_REF_TYPE = 0xead0;
- var REACT_SUSPENSE_TYPE = 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
- var REACT_MEMO_TYPE = 0xead3;
- var REACT_LAZY_TYPE = 0xead4;
- var REACT_BLOCK_TYPE = 0xead9;
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
- var REACT_SCOPE_TYPE = 0xead7;
- var REACT_OPAQUE_ID_TYPE = 0xeae0;
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
- var REACT_OFFSCREEN_TYPE = 0xeae2;
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
- if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
- }
-
- var FunctionComponent = 0;
- var ClassComponent = 1;
-
- var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
-
- var HostComponent = 5;
- var HostText = 6;
-
- // Don't change these two values. They're used by React Dev Tools.
- var NoFlags =
- /* */
- 0;
-
- var Placement =
- /* */
- 2;
- var Hydrating =
- /* */
- 1024;
-
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
- function getNearestMountedFiber(fiber) {
- var node = fiber;
- var nearestMounted = fiber;
-
- if (!fiber.alternate) {
- // If there is no alternate, this might be a new tree that isn't inserted
- // yet. If it is, then it will have a pending insertion effect on it.
- var nextNode = node;
-
- do {
- node = nextNode;
-
- if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
- // This is an insertion or in-progress hydration. The nearest possible
- // mounted fiber is the parent but we need to continue to figure out
- // if that one is still mounted.
- nearestMounted = node.return;
- }
-
- nextNode = node.return;
- } while (nextNode);
- } else {
- while (node.return) {
- node = node.return;
- }
- }
-
- if (node.tag === HostRoot) {
- // TODO: Check if this was a nested HostRoot when used with
- // renderContainerIntoSubtree.
- return nearestMounted;
- } // If we didn't hit the root, that means that we're in an disconnected tree
- // that has been unmounted.
-
-
- return null;
- }
-
- function assertIsMounted(fiber) {
- if (!(getNearestMountedFiber(fiber) === fiber)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- function findCurrentFiberUsingSlowPath(fiber) {
- var alternate = fiber.alternate;
-
- if (!alternate) {
- // If there is no alternate, then we only need to check if it is mounted.
- var nearestMounted = getNearestMountedFiber(fiber);
-
- if (!(nearestMounted !== null)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (nearestMounted !== fiber) {
- return null;
- }
-
- return fiber;
- } // If we have two possible branches, we'll walk backwards up to the root
- // to see what path the root points to. On the way we may hit one of the
- // special cases and we'll deal with them.
-
-
- var a = fiber;
- var b = alternate;
-
- while (true) {
- var parentA = a.return;
-
- if (parentA === null) {
- // We're at the root.
- break;
- }
-
- var parentB = parentA.alternate;
-
- if (parentB === null) {
- // There is no alternate. This is an unusual case. Currently, it only
- // happens when a Suspense component is hidden. An extra fragment fiber
- // is inserted in between the Suspense fiber and its children. Skip
- // over this extra fragment fiber and proceed to the next parent.
- var nextParent = parentA.return;
-
- if (nextParent !== null) {
- a = b = nextParent;
- continue;
- } // If there's no parent, we're at the root.
-
-
- break;
- } // If both copies of the parent fiber point to the same child, we can
- // assume that the child is current. This happens when we bailout on low
- // priority: the bailed out fiber's child reuses the current child.
-
-
- if (parentA.child === parentB.child) {
- var child = parentA.child;
-
- while (child) {
- if (child === a) {
- // We've determined that A is the current branch.
- assertIsMounted(parentA);
- return fiber;
- }
-
- if (child === b) {
- // We've determined that B is the current branch.
- assertIsMounted(parentA);
- return alternate;
- }
-
- child = child.sibling;
- } // We should never have an alternate for any mounting node. So the only
- // way this could possibly happen is if this was unmounted, if at all.
-
-
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- if (a.return !== b.return) {
- // The return pointer of A and the return pointer of B point to different
- // fibers. We assume that return pointers never criss-cross, so A must
- // belong to the child set of A.return, and B must belong to the child
- // set of B.return.
- a = parentA;
- b = parentB;
- } else {
- // The return pointers point to the same fiber. We'll have to use the
- // default, slow path: scan the child sets of each parent alternate to see
- // which child belongs to which set.
- //
- // Search parent A's child set
- var didFindChild = false;
- var _child = parentA.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentA;
- b = parentB;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentA;
- a = parentB;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- // Search parent B's child set
- _child = parentB.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentB;
- b = parentA;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentB;
- a = parentA;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- {
- throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
- }
- }
- }
- }
-
- if (!(a.alternate === b)) {
- {
- throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } // If the root is not a host container, we're in a disconnected tree. I.e.
- // unmounted.
-
-
- if (!(a.tag === HostRoot)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (a.stateNode.current === a) {
- // We've determined that A is the current branch.
- return fiber;
- } // Otherwise B has to be current branch.
-
-
- return alternate;
- }
-
- /**
- * `charCode` represents the actual "character code" and is safe to use with
- * `String.fromCharCode`. As such, only keys that correspond to printable
- * characters produce a valid `charCode`, the only exception to this is Enter.
- * The Tab-key is considered non-printable and does not have a `charCode`,
- * presumably because it does not produce a tab-character in browsers.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {number} Normalized `charCode` property.
- */
- function getEventCharCode(nativeEvent) {
- var charCode;
- var keyCode = nativeEvent.keyCode;
-
- if ('charCode' in nativeEvent) {
- charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
-
- if (charCode === 0 && keyCode === 13) {
- charCode = 13;
- }
- } else {
- // IE8 does not implement `charCode`, but `keyCode` has the correct value.
- charCode = keyCode;
- } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
- // report Enter as charCode 10 when ctrl is pressed.
-
-
- if (charCode === 10) {
- charCode = 13;
- } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
- // Must not discard the (non-)printable Enter-key.
-
-
- if (charCode >= 32 || charCode === 13) {
- return charCode;
- }
-
- return 0;
- }
-
- function functionThatReturnsTrue() {
- return true;
- }
-
- function functionThatReturnsFalse() {
- return false;
- } // This is intentionally a factory so that we have different returned constructors.
- // If we had a single constructor, it would be megamorphic and engines would deopt.
-
-
- function createSyntheticEvent(Interface) {
- /**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- */
- function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
- this._reactName = reactName;
- this._targetInst = targetInst;
- this.type = reactEventType;
- this.nativeEvent = nativeEvent;
- this.target = nativeEventTarget;
- this.currentTarget = null;
-
- for (var _propName in Interface) {
- if (!Interface.hasOwnProperty(_propName)) {
- continue;
- }
-
- var normalize = Interface[_propName];
-
- if (normalize) {
- this[_propName] = normalize(nativeEvent);
- } else {
- this[_propName] = nativeEvent[_propName];
- }
- }
-
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
-
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
-
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
- }
-
- _assign(SyntheticBaseEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.preventDefault) {
- event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
-
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.stopPropagation) {
- event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
-
- this.isPropagationStopped = functionThatReturnsTrue;
- },
-
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {// Modern event system doesn't use pooling.
- },
-
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsTrue
- });
-
- return SyntheticBaseEvent;
- }
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
- var EventInterface = {
- eventPhase: 0,
- bubbles: 0,
- cancelable: 0,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: 0,
- isTrusted: 0
- };
- var SyntheticEvent = createSyntheticEvent(EventInterface);
-
- var UIEventInterface = _assign({}, EventInterface, {
- view: 0,
- detail: 0
- });
-
- var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
- var lastMovementX;
- var lastMovementY;
- var lastMouseEvent;
-
- function updateMouseMovementPolyfillState(event) {
- if (event !== lastMouseEvent) {
- if (lastMouseEvent && event.type === 'mousemove') {
- lastMovementX = event.screenX - lastMouseEvent.screenX;
- lastMovementY = event.screenY - lastMouseEvent.screenY;
- } else {
- lastMovementX = 0;
- lastMovementY = 0;
- }
-
- lastMouseEvent = event;
- }
- }
- /**
- * @interface MouseEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
- var MouseEventInterface = _assign({}, UIEventInterface, {
- screenX: 0,
- screenY: 0,
- clientX: 0,
- clientY: 0,
- pageX: 0,
- pageY: 0,
- ctrlKey: 0,
- shiftKey: 0,
- altKey: 0,
- metaKey: 0,
- getModifierState: getEventModifierState,
- button: 0,
- buttons: 0,
- relatedTarget: function (event) {
- if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
- return event.relatedTarget;
- },
- movementX: function (event) {
- if ('movementX' in event) {
- return event.movementX;
- }
-
- updateMouseMovementPolyfillState(event);
- return lastMovementX;
- },
- movementY: function (event) {
- if ('movementY' in event) {
- return event.movementY;
- } // Don't need to call updateMouseMovementPolyfillState() here
- // because it's guaranteed to have already run when movementX
- // was copied.
-
-
- return lastMovementY;
- }
- });
-
- var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
- /**
- * @interface DragEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var DragEventInterface = _assign({}, MouseEventInterface, {
- dataTransfer: 0
- });
-
- var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
- /**
- * @interface FocusEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var FocusEventInterface = _assign({}, UIEventInterface, {
- relatedTarget: 0
- });
-
- var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
- */
-
- var AnimationEventInterface = _assign({}, EventInterface, {
- animationName: 0,
- elapsedTime: 0,
- pseudoElement: 0
- });
-
- var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/clipboard-apis/
- */
-
- var ClipboardEventInterface = _assign({}, EventInterface, {
- clipboardData: function (event) {
- return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
- }
- });
-
- var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
- */
-
- var CompositionEventInterface = _assign({}, EventInterface, {
- data: 0
- });
-
- var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
- /**
- * Normalization of deprecated HTML5 `key` values
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
- var normalizeKey = {
- Esc: 'Escape',
- Spacebar: ' ',
- Left: 'ArrowLeft',
- Up: 'ArrowUp',
- Right: 'ArrowRight',
- Down: 'ArrowDown',
- Del: 'Delete',
- Win: 'OS',
- Menu: 'ContextMenu',
- Apps: 'ContextMenu',
- Scroll: 'ScrollLock',
- MozPrintableKey: 'Unidentified'
- };
- /**
- * Translation from legacy `keyCode` to HTML5 `key`
- * Only special keys supported, all others depend on keyboard layout or browser
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
- var translateToKey = {
- '8': 'Backspace',
- '9': 'Tab',
- '12': 'Clear',
- '13': 'Enter',
- '16': 'Shift',
- '17': 'Control',
- '18': 'Alt',
- '19': 'Pause',
- '20': 'CapsLock',
- '27': 'Escape',
- '32': ' ',
- '33': 'PageUp',
- '34': 'PageDown',
- '35': 'End',
- '36': 'Home',
- '37': 'ArrowLeft',
- '38': 'ArrowUp',
- '39': 'ArrowRight',
- '40': 'ArrowDown',
- '45': 'Insert',
- '46': 'Delete',
- '112': 'F1',
- '113': 'F2',
- '114': 'F3',
- '115': 'F4',
- '116': 'F5',
- '117': 'F6',
- '118': 'F7',
- '119': 'F8',
- '120': 'F9',
- '121': 'F10',
- '122': 'F11',
- '123': 'F12',
- '144': 'NumLock',
- '145': 'ScrollLock',
- '224': 'Meta'
- };
- /**
- * @param {object} nativeEvent Native browser event.
- * @return {string} Normalized `key` property.
- */
-
- function getEventKey(nativeEvent) {
- if (nativeEvent.key) {
- // Normalize inconsistent values reported by browsers due to
- // implementations of a working draft specification.
- // FireFox implements `key` but returns `MozPrintableKey` for all
- // printable characters (normalized to `Unidentified`), ignore it.
- var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
-
- if (key !== 'Unidentified') {
- return key;
- }
- } // Browser does not implement `key`, polyfill as much of it as we can.
-
-
- if (nativeEvent.type === 'keypress') {
- var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
- // thus be captured by `keypress`, no other non-printable key should.
-
- return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
- }
-
- if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
- // While user keyboard layout determines the actual meaning of each
- // `keyCode` value, almost all function keys have a universal value.
- return translateToKey[nativeEvent.keyCode] || 'Unidentified';
- }
-
- return '';
- }
- /**
- * Translation from modifier key to the associated property in the event.
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
- */
-
-
- var modifierKeyToProp = {
- Alt: 'altKey',
- Control: 'ctrlKey',
- Meta: 'metaKey',
- Shift: 'shiftKey'
- }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
- // getModifierState. If getModifierState is not supported, we map it to a set of
- // modifier keys exposed by the event. In this case, Lock-keys are not supported.
-
- function modifierStateGetter(keyArg) {
- var syntheticEvent = this;
- var nativeEvent = syntheticEvent.nativeEvent;
-
- if (nativeEvent.getModifierState) {
- return nativeEvent.getModifierState(keyArg);
- }
-
- var keyProp = modifierKeyToProp[keyArg];
- return keyProp ? !!nativeEvent[keyProp] : false;
- }
-
- function getEventModifierState(nativeEvent) {
- return modifierStateGetter;
- }
- /**
- * @interface KeyboardEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
- var KeyboardEventInterface = _assign({}, UIEventInterface, {
- key: getEventKey,
- code: 0,
- location: 0,
- ctrlKey: 0,
- shiftKey: 0,
- altKey: 0,
- metaKey: 0,
- repeat: 0,
- locale: 0,
- getModifierState: getEventModifierState,
- // Legacy Interface
- charCode: function (event) {
- // `charCode` is the result of a KeyPress event and represents the value of
- // the actual printable character.
- // KeyPress is deprecated, but its replacement is not yet final and not
- // implemented in any major browser. Only KeyPress has charCode.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- return 0;
- },
- keyCode: function (event) {
- // `keyCode` is the result of a KeyDown/Up event and represents the value of
- // physical keyboard key.
- // The actual meaning of the value depends on the users' keyboard layout
- // which cannot be detected. Assuming that it is a US keyboard layout
- // provides a surprisingly accurate mapping for US and European users.
- // Due to this, it is left to the user to implement at this time.
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- },
- which: function (event) {
- // `which` is an alias for either `keyCode` or `charCode` depending on the
- // type of the event.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- }
- });
-
- var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
- /**
- * @interface PointerEvent
- * @see http://www.w3.org/TR/pointerevents/
- */
-
- var PointerEventInterface = _assign({}, MouseEventInterface, {
- pointerId: 0,
- width: 0,
- height: 0,
- pressure: 0,
- tangentialPressure: 0,
- tiltX: 0,
- tiltY: 0,
- twist: 0,
- pointerType: 0,
- isPrimary: 0
- });
-
- var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
- /**
- * @interface TouchEvent
- * @see http://www.w3.org/TR/touch-events/
- */
-
- var TouchEventInterface = _assign({}, UIEventInterface, {
- touches: 0,
- targetTouches: 0,
- changedTouches: 0,
- altKey: 0,
- metaKey: 0,
- ctrlKey: 0,
- shiftKey: 0,
- getModifierState: getEventModifierState
- });
-
- var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
- */
-
- var TransitionEventInterface = _assign({}, EventInterface, {
- propertyName: 0,
- elapsedTime: 0,
- pseudoElement: 0
- });
-
- var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
- /**
- * @interface WheelEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var WheelEventInterface = _assign({}, MouseEventInterface, {
- deltaX: function (event) {
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
- },
- deltaY: function (event) {
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
- 'wheelDelta' in event ? -event.wheelDelta : 0;
- },
- deltaZ: 0,
- // Browsers without "deltaMode" is reporting in raw wheel delta where one
- // notch on the scroll is always +/- 120, roughly equivalent to pixels.
- // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
- // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
- deltaMode: 0
- });
-
- var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
-
- /**
- * HTML nodeType values that represent the type of the node
- */
- var ELEMENT_NODE = 1;
-
- var didWarnAboutMessageChannel = false;
- var enqueueTaskImpl = null;
- function enqueueTask(task) {
- if (enqueueTaskImpl === null) {
- try {
- // read require off the module object to get around the bundlers.
- // we don't want them to detect a require and bundle a Node polyfill.
- var requireString = ('require' + Math.random()).slice(0, 7);
- var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
- // version of setImmediate, bypassing fake timers if any.
-
- enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
- } catch (_err) {
- // we're in a browser
- // we can't use regular timers because they may still be faked
- // so we try MessageChannel+postMessage instead
- enqueueTaskImpl = function (callback) {
- {
- if (didWarnAboutMessageChannel === false) {
- didWarnAboutMessageChannel = true;
-
- if (typeof MessageChannel === 'undefined') {
- error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
- }
- }
- }
-
- var channel = new MessageChannel();
- channel.port1.onmessage = callback;
- channel.port2.postMessage(undefined);
- };
- }
- }
-
- return enqueueTaskImpl(task);
- }
-
- var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _ReactInternals$Sched = ReactInternals$1.Scheduler,
- unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback,
- unstable_now = _ReactInternals$Sched.unstable_now,
- unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback,
- unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield,
- unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint,
- unstable_getFirstCallbackNode = _ReactInternals$Sched.unstable_getFirstCallbackNode,
- unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority,
- unstable_next = _ReactInternals$Sched.unstable_next,
- unstable_continueExecution = _ReactInternals$Sched.unstable_continueExecution,
- unstable_pauseExecution = _ReactInternals$Sched.unstable_pauseExecution,
- unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel,
- unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority,
- unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority,
- unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority,
- unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority,
- unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority,
- unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate,
- unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting;
-
- var EventInternals = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
- // const getNodeFromInstance = EventInternals[1];
- // const getFiberCurrentPropsFromNode = EventInternals[2];
- // const enqueueStateRestore = EventInternals[3];
- // const restoreStateIfNeeded = EventInternals[4];
-
- var flushPassiveEffects = EventInternals[5];
- var IsThisRendererActing = EventInternals[6];
- var batchedUpdates = ReactDOM.unstable_batchedUpdates;
- var IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing; // This is the public version of `ReactTestUtils.act`. It is implemented in
- // "userspace" (i.e. not the reconciler), so that it doesn't add to the
- // production bundle size.
- // TODO: Remove this implementation of `act` in favor of the one exported by
- // the reconciler. To do this, we must first drop support for `act` in
- // production mode.
- // TODO: Remove support for the mock scheduler build, which was only added for
- // the purposes of internal testing. Internal tests should use
- // `unstable_concurrentAct` instead.
-
- var isSchedulerMocked = typeof unstable_flushAllWithoutAsserting === 'function';
-
- var flushWork = unstable_flushAllWithoutAsserting || function () {
- var didFlushWork = false;
-
- while (flushPassiveEffects()) {
- didFlushWork = true;
- }
-
- return didFlushWork;
- };
-
- function flushWorkAndMicroTasks(onDone) {
- try {
- flushWork();
- enqueueTask(function () {
- if (flushWork()) {
- flushWorkAndMicroTasks(onDone);
- } else {
- onDone();
- }
- });
- } catch (err) {
- onDone(err);
- }
- } // we track the 'depth' of the act() calls with this counter,
- // so we can tell if any async act() calls try to run in parallel.
-
-
- var actingUpdatesScopeDepth = 0;
- function act(callback) {
-
- var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth;
- actingUpdatesScopeDepth++;
- var previousIsSomeRendererActing = IsSomeRendererActing.current;
- var previousIsThisRendererActing = IsThisRendererActing.current;
- IsSomeRendererActing.current = true;
- IsThisRendererActing.current = true;
-
- function onDone() {
- actingUpdatesScopeDepth--;
- IsSomeRendererActing.current = previousIsSomeRendererActing;
- IsThisRendererActing.current = previousIsThisRendererActing;
-
- {
- if (actingUpdatesScopeDepth > previousActingUpdatesScopeDepth) {
- // if it's _less than_ previousActingUpdatesScopeDepth, then we can assume the 'other' one has warned
- error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
- }
- }
- }
-
- var result;
-
- try {
- result = batchedUpdates(callback);
- } catch (error) {
- // on sync errors, we still want to 'cleanup' and decrement actingUpdatesScopeDepth
- onDone();
- throw error;
- }
-
- if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
- // setup a boolean that gets set to true only
- // once this act() call is await-ed
- var called = false;
-
- {
- if (typeof Promise !== 'undefined') {
- //eslint-disable-next-line no-undef
- Promise.resolve().then(function () {}).then(function () {
- if (called === false) {
- error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, interleaving multiple act ' + 'calls and mixing their scopes. You should - await act(async () => ...);');
- }
- });
- }
- } // in the async case, the returned thenable runs the callback, flushes
- // effects and microtasks in a loop until flushPassiveEffects() === false,
- // and cleans up
-
-
- return {
- then: function (resolve, reject) {
- called = true;
- result.then(function () {
- if (actingUpdatesScopeDepth > 1 || isSchedulerMocked === true && previousIsSomeRendererActing === true) {
- onDone();
- resolve();
- return;
- } // we're about to exit the act() scope,
- // now's the time to flush tasks/effects
-
-
- flushWorkAndMicroTasks(function (err) {
- onDone();
-
- if (err) {
- reject(err);
- } else {
- resolve();
- }
- });
- }, function (err) {
- onDone();
- reject(err);
- });
- }
- };
- } else {
- {
- if (result !== undefined) {
- error('The callback passed to act(...) function ' + 'must return undefined, or a Promise. You returned %s', result);
- }
- } // flush effects until none remain, and cleanup
-
-
- try {
- if (actingUpdatesScopeDepth === 1 && (isSchedulerMocked === false || previousIsSomeRendererActing === false)) {
- // we're about to exit the act() scope,
- // now's the time to flush effects
- flushWork();
- }
-
- onDone();
- } catch (err) {
- onDone();
- throw err;
- } // in the sync case, the returned thenable only warns *if* await-ed
-
-
- return {
- then: function (resolve) {
- {
- error('Do not await the result of calling act(...) with sync logic, it is not a Promise.');
- }
-
- resolve();
- }
- };
- }
- }
-
- var EventInternals$1 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events; // const getInstanceFromNode = EventInternals[0];
- // const getNodeFromInstance = EventInternals[1];
- // const getFiberCurrentPropsFromNode = EventInternals[2];
- // const enqueueStateRestore = EventInternals[3];
- // const restoreStateIfNeeded = EventInternals[4];
- // const flushPassiveEffects = EventInternals[5];
-
- var IsThisRendererActing$1 = EventInternals$1[6];
- var batchedUpdates$1 = ReactDOM.unstable_batchedUpdates;
- var IsSomeRendererActing$1 = ReactSharedInternals.IsSomeRendererActing; // This version of `act` is only used by our tests. Unlike the public version
- // of `act`, it's designed to work identically in both production and
- // development. It may have slightly different behavior from the public
- // version, too, since our constraints in our test suite are not the same as
- // those of developers using React — we're testing React itself, as opposed to
- // building an app with React.
-
- var actingUpdatesScopeDepth$1 = 0;
- function unstable_concurrentAct(scope) {
- if (unstable_flushAllWithoutAsserting === undefined) {
- throw Error('This version of `act` requires a special mock build of Scheduler.');
- }
-
- if (setTimeout._isMockFunction !== true) {
- throw Error("This version of `act` requires Jest's timer mocks " + '(i.e. jest.useFakeTimers).');
- }
-
- var previousActingUpdatesScopeDepth = actingUpdatesScopeDepth$1;
- var previousIsSomeRendererActing = IsSomeRendererActing$1.current;
- var previousIsThisRendererActing = IsThisRendererActing$1.current;
- IsSomeRendererActing$1.current = true;
- IsThisRendererActing$1.current = true;
- actingUpdatesScopeDepth$1++;
-
- var unwind = function () {
- actingUpdatesScopeDepth$1--;
- IsSomeRendererActing$1.current = previousIsSomeRendererActing;
- IsThisRendererActing$1.current = previousIsThisRendererActing;
-
- {
- if (actingUpdatesScopeDepth$1 > previousActingUpdatesScopeDepth) {
- // if it's _less than_ previousActingUpdatesScopeDepth, then we can
- // assume the 'other' one has warned
- error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
- }
- }
- }; // TODO: This would be way simpler if 1) we required a promise to be
- // returned and 2) we could use async/await. Since it's only our used in
- // our test suite, we should be able to.
-
-
- try {
- var thenable = batchedUpdates$1(scope);
-
- if (typeof thenable === 'object' && thenable !== null && typeof thenable.then === 'function') {
- return {
- then: function (resolve, reject) {
- thenable.then(function () {
- flushActWork(function () {
- unwind();
- resolve();
- }, function (error) {
- unwind();
- reject(error);
- });
- }, function (error) {
- unwind();
- reject(error);
- });
- }
- };
- } else {
- try {
- // TODO: Let's not support non-async scopes at all in our tests. Need to
- // migrate existing tests.
- var didFlushWork;
-
- do {
- didFlushWork = unstable_flushAllWithoutAsserting();
- } while (didFlushWork);
- } finally {
- unwind();
- }
- }
- } catch (error) {
- unwind();
- throw error;
- }
- }
-
- function flushActWork(resolve, reject) {
- // Flush suspended fallbacks
- // $FlowFixMe: Flow doesn't know about global Jest object
- jest.runOnlyPendingTimers();
- enqueueTask(function () {
- try {
- var didFlushWork = unstable_flushAllWithoutAsserting();
-
- if (didFlushWork) {
- flushActWork(resolve, reject);
- } else {
- resolve();
- }
- } catch (error) {
- reject(error);
- }
- });
- }
-
- function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- try {
- func.apply(context, funcArgs);
- } catch (error) {
- this.onError(error);
- }
- }
-
- var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
-
- {
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
-
- invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
- // If document doesn't exist we know for sure we will crash in this method
- // when we call document.createEvent(). However this can cause confusing
- // errors: https://github.com/facebookincubator/create-react-app/issues/3482
- // So we preemptively throw with a better message instead.
- if (!(typeof document !== 'undefined')) {
- {
- throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
- }
- }
-
- var evt = document.createEvent('Event');
- var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
- // set this to true at the beginning, then set it to false right after
- // calling the function. If the function errors, `didError` will never be
- // set to false. This strategy works even if the browser is flaky and
- // fails to call our global error handler, because it doesn't rely on
- // the error event at all.
-
- var didError = true; // Keeps track of the value of window.event so that we can reset it
- // during the callback to let user code access window.event in the
- // browsers that support it.
-
- var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
- // dispatching: https://github.com/facebook/react/issues/13688
-
- var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
-
- function restoreAfterDispatch() {
- // We immediately remove the callback from event listeners so that
- // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
- // nested call would trigger the fake event handlers of any call higher
- // in the stack.
- fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
- // window.event assignment in both IE <= 10 as they throw an error
- // "Member not found" in strict mode, and in Firefox which does not
- // support window.event.
-
- if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
- window.event = windowEvent;
- }
- } // Create an event handler for our fake event. We will synchronously
- // dispatch our fake event using `dispatchEvent`. Inside the handler, we
- // call the user-provided callback.
-
-
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- function callCallback() {
- didCall = true;
- restoreAfterDispatch();
- func.apply(context, funcArgs);
- didError = false;
- } // Create a global error event handler. We use this to capture the value
- // that was thrown. It's possible that this error handler will fire more
- // than once; for example, if non-React code also calls `dispatchEvent`
- // and a handler for that event throws. We should be resilient to most of
- // those cases. Even if our error event handler fires more than once, the
- // last error event is always used. If the callback actually does error,
- // we know that the last error event is the correct one, because it's not
- // possible for anything else to have happened in between our callback
- // erroring and the code that follows the `dispatchEvent` call below. If
- // the callback doesn't error, but the error event was fired, we know to
- // ignore it because `didError` will be false, as described above.
-
-
- var error; // Use this to track whether the error event is ever called.
-
- var didSetError = false;
- var isCrossOriginError = false;
-
- function handleWindowError(event) {
- error = event.error;
- didSetError = true;
-
- if (error === null && event.colno === 0 && event.lineno === 0) {
- isCrossOriginError = true;
- }
-
- if (event.defaultPrevented) {
- // Some other error handler has prevented default.
- // Browsers silence the error report if this happens.
- // We'll remember this to later decide whether to log it or not.
- if (error != null && typeof error === 'object') {
- try {
- error._suppressLogging = true;
- } catch (inner) {// Ignore.
- }
- }
- }
- } // Create a fake event type.
-
-
- var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
-
- window.addEventListener('error', handleWindowError);
- fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
- // errors, it will trigger our global error handler.
-
- evt.initEvent(evtType, false, false);
- fakeNode.dispatchEvent(evt);
-
- if (windowEventDescriptor) {
- Object.defineProperty(window, 'event', windowEventDescriptor);
- }
-
- if (didCall && didError) {
- if (!didSetError) {
- // The callback errored, but the error event never fired.
- error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
- } else if (isCrossOriginError) {
- error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
- }
-
- this.onError(error);
- } // Remove our event listeners
-
-
- window.removeEventListener('error', handleWindowError);
-
- if (!didCall) {
- // Something went really wrong, and our event was not dispatched.
- // https://github.com/facebook/react/issues/16734
- // https://github.com/facebook/react/issues/16585
- // Fall back to the production implementation.
- restoreAfterDispatch();
- return invokeGuardedCallbackProd.apply(this, arguments);
- }
- };
- }
- }
-
- var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
-
- var hasError = false;
- var caughtError = null; // Used by event system to capture/rethrow the first error.
-
- var hasRethrowError = false;
- var rethrowError = null;
- var reporter = {
- onError: function (error) {
- hasError = true;
- caughtError = error;
- }
- };
- /**
- * Call a function while guarding against errors that happens within it.
- * Returns an error if it throws, otherwise null.
- *
- * In production, this is implemented using a try-catch. The reason we don't
- * use a try-catch directly is so that we can swap out a different
- * implementation in DEV mode.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
- function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
- hasError = false;
- caughtError = null;
- invokeGuardedCallbackImpl$1.apply(reporter, arguments);
- }
- /**
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
- * TODO: See if caughtError and rethrowError can be unified.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
- function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
- invokeGuardedCallback.apply(this, arguments);
-
- if (hasError) {
- var error = clearCaughtError();
-
- if (!hasRethrowError) {
- hasRethrowError = true;
- rethrowError = error;
- }
- }
- }
- /**
- * During execution of guarded functions we will capture the first error which
- * we will rethrow to be handled by the top level error handler.
- */
-
- function rethrowCaughtError() {
- if (hasRethrowError) {
- var error = rethrowError;
- hasRethrowError = false;
- rethrowError = null;
- throw error;
- }
- }
- function clearCaughtError() {
- if (hasError) {
- var error = caughtError;
- hasError = false;
- caughtError = null;
- return error;
- } else {
- {
- {
- throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- }
-
- var EventInternals$2 = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;
- var getInstanceFromNode = EventInternals$2[0];
- var getNodeFromInstance = EventInternals$2[1];
- var getFiberCurrentPropsFromNode = EventInternals$2[2];
- var enqueueStateRestore = EventInternals$2[3];
- var restoreStateIfNeeded = EventInternals$2[4]; // const flushPassiveEffects = EventInternals[5];
- // TODO: This is related to `act`, not events. Move to separate key?
- // const IsThisRendererActing = EventInternals[6];
-
- function Event(suffix) {}
-
- var hasWarnedAboutDeprecatedMockComponent = false;
- /**
- * @class ReactTestUtils
- */
-
- function findAllInRenderedFiberTreeInternal(fiber, test) {
- if (!fiber) {
- return [];
- }
-
- var currentParent = findCurrentFiberUsingSlowPath(fiber);
-
- if (!currentParent) {
- return [];
- }
-
- var node = currentParent;
- var ret = [];
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText || node.tag === ClassComponent || node.tag === FunctionComponent) {
- var publicInst = node.stateNode;
-
- if (test(publicInst)) {
- ret.push(publicInst);
- }
- }
-
- if (node.child) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return ret;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return ret;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-
- function validateClassInstance(inst, methodName) {
- if (!inst) {
- // This is probably too relaxed but it's existing behavior.
- return;
- }
-
- if (get(inst)) {
- // This is a public instance indeed.
- return;
- }
-
- var received;
- var stringified = '' + inst;
-
- if (Array.isArray(inst)) {
- received = 'an array';
- } else if (inst && inst.nodeType === ELEMENT_NODE && inst.tagName) {
- received = 'a DOM node';
- } else if (stringified === '[object Object]') {
- received = 'object with keys {' + Object.keys(inst).join(', ') + '}';
- } else {
- received = stringified;
- }
-
- {
- {
- throw Error( methodName + "(...): the first argument must be a React class instance. Instead received: " + received + "." );
- }
- }
- }
- /**
- * Utilities for making it easy to test React components.
- *
- * See https://reactjs.org/docs/test-utils.html
- *
- * Todo: Support the entire DOM.scry query syntax. For now, these simple
- * utilities will suffice for testing purposes.
- * @lends ReactTestUtils
- */
-
-
- function renderIntoDocument(element) {
- var div = document.createElement('div'); // None of our tests actually require attaching the container to the
- // DOM, and doing so creates a mess that we rely on test isolation to
- // clean up, so we're going to stop honoring the name of this method
- // (and probably rename it eventually) if no problems arise.
- // document.documentElement.appendChild(div);
-
- return ReactDOM.render(element, div);
- }
-
- function isElement(element) {
- return React.isValidElement(element);
- }
-
- function isElementOfType(inst, convenienceConstructor) {
- return React.isValidElement(inst) && inst.type === convenienceConstructor;
- }
-
- function isDOMComponent(inst) {
- return !!(inst && inst.nodeType === ELEMENT_NODE && inst.tagName);
- }
-
- function isDOMComponentElement(inst) {
- return !!(inst && React.isValidElement(inst) && !!inst.tagName);
- }
-
- function isCompositeComponent(inst) {
- if (isDOMComponent(inst)) {
- // Accessing inst.setState warns; just return false as that'll be what
- // this returns when we have DOM nodes as refs directly
- return false;
- }
-
- return inst != null && typeof inst.render === 'function' && typeof inst.setState === 'function';
- }
-
- function isCompositeComponentWithType(inst, type) {
- if (!isCompositeComponent(inst)) {
- return false;
- }
-
- var internalInstance = get(inst);
- var constructor = internalInstance.type;
- return constructor === type;
- }
-
- function findAllInRenderedTree(inst, test) {
- validateClassInstance(inst, 'findAllInRenderedTree');
-
- if (!inst) {
- return [];
- }
-
- var internalInstance = get(inst);
- return findAllInRenderedFiberTreeInternal(internalInstance, test);
- }
- /**
- * Finds all instance of components in the rendered tree that are DOM
- * components with the class name matching `className`.
- * @return {array} an array of all the matches.
- */
-
-
- function scryRenderedDOMComponentsWithClass(root, classNames) {
- validateClassInstance(root, 'scryRenderedDOMComponentsWithClass');
- return findAllInRenderedTree(root, function (inst) {
- if (isDOMComponent(inst)) {
- var className = inst.className;
-
- if (typeof className !== 'string') {
- // SVG, probably.
- className = inst.getAttribute('class') || '';
- }
-
- var classList = className.split(/\s+/);
-
- if (!Array.isArray(classNames)) {
- if (!(classNames !== undefined)) {
- {
- throw Error( "TestUtils.scryRenderedDOMComponentsWithClass expects a className as a second argument." );
- }
- }
-
- classNames = classNames.split(/\s+/);
- }
-
- return classNames.every(function (name) {
- return classList.indexOf(name) !== -1;
- });
- }
-
- return false;
- });
- }
- /**
- * Like scryRenderedDOMComponentsWithClass but expects there to be one result,
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactDOMComponent} The one match.
- */
-
-
- function findRenderedDOMComponentWithClass(root, className) {
- validateClassInstance(root, 'findRenderedDOMComponentWithClass');
- var all = scryRenderedDOMComponentsWithClass(root, className);
-
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for class:' + className);
- }
-
- return all[0];
- }
- /**
- * Finds all instance of components in the rendered tree that are DOM
- * components with the tag name matching `tagName`.
- * @return {array} an array of all the matches.
- */
-
-
- function scryRenderedDOMComponentsWithTag(root, tagName) {
- validateClassInstance(root, 'scryRenderedDOMComponentsWithTag');
- return findAllInRenderedTree(root, function (inst) {
- return isDOMComponent(inst) && inst.tagName.toUpperCase() === tagName.toUpperCase();
- });
- }
- /**
- * Like scryRenderedDOMComponentsWithTag but expects there to be one result,
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactDOMComponent} The one match.
- */
-
-
- function findRenderedDOMComponentWithTag(root, tagName) {
- validateClassInstance(root, 'findRenderedDOMComponentWithTag');
- var all = scryRenderedDOMComponentsWithTag(root, tagName);
-
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for tag:' + tagName);
- }
-
- return all[0];
- }
- /**
- * Finds all instances of components with type equal to `componentType`.
- * @return {array} an array of all the matches.
- */
-
-
- function scryRenderedComponentsWithType(root, componentType) {
- validateClassInstance(root, 'scryRenderedComponentsWithType');
- return findAllInRenderedTree(root, function (inst) {
- return isCompositeComponentWithType(inst, componentType);
- });
- }
- /**
- * Same as `scryRenderedComponentsWithType` but expects there to be one result
- * and returns that one result, or throws exception if there is any other
- * number of matches besides one.
- * @return {!ReactComponent} The one match.
- */
-
-
- function findRenderedComponentWithType(root, componentType) {
- validateClassInstance(root, 'findRenderedComponentWithType');
- var all = scryRenderedComponentsWithType(root, componentType);
-
- if (all.length !== 1) {
- throw new Error('Did not find exactly one match (found: ' + all.length + ') ' + 'for componentType:' + componentType);
- }
-
- return all[0];
- }
- /**
- * Pass a mocked component module to this method to augment it with
- * useful methods that allow it to be used as a dummy React component.
- * Instead of rendering as usual, the component will become a simple
- * <div> containing any provided children.
- *
- * @param {object} module the mock function object exported from a
- * module that defines the component to be mocked
- * @param {?string} mockTagName optional dummy root tag name to return
- * from render method (overrides
- * module.mockTagName if provided)
- * @return {object} the ReactTestUtils object (for chaining)
- */
-
-
- function mockComponent(module, mockTagName) {
- {
- if (!hasWarnedAboutDeprecatedMockComponent) {
- hasWarnedAboutDeprecatedMockComponent = true;
-
- warn('ReactTestUtils.mockComponent() is deprecated. ' + 'Use shallow rendering or jest.mock() instead.\n\n' + 'See https://reactjs.org/link/test-utils-mock-component for more information.');
- }
- }
-
- mockTagName = mockTagName || module.mockTagName || 'div';
- module.prototype.render.mockImplementation(function () {
- return React.createElement(mockTagName, null, this.props.children);
- });
- return this;
- }
-
- function nativeTouchData(x, y) {
- return {
- touches: [{
- pageX: x,
- pageY: y
- }]
- };
- } // Start of inline: the below functions were inlined from
- // EventPropagator.js, as they deviated from ReactDOM's newer
- // implementations.
-
- /**
- * Dispatch the event to the listener.
- * @param {SyntheticEvent} event SyntheticEvent to handle
- * @param {function} listener Application-level callback
- * @param {*} inst Internal component instance
- */
-
-
- function executeDispatch(event, listener, inst) {
- var type = event.type || 'unknown-event';
- event.currentTarget = getNodeFromInstance(inst);
- invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
- event.currentTarget = null;
- }
- /**
- * Standard/simple iteration through an event's collected dispatches.
- */
-
-
- function executeDispatchesInOrder(event) {
- var dispatchListeners = event._dispatchListeners;
- var dispatchInstances = event._dispatchInstances;
-
- if (Array.isArray(dispatchListeners)) {
- for (var i = 0; i < dispatchListeners.length; i++) {
- if (event.isPropagationStopped()) {
- break;
- } // Listeners and Instances are two parallel arrays that are always in sync.
-
-
- executeDispatch(event, dispatchListeners[i], dispatchInstances[i]);
- }
- } else if (dispatchListeners) {
- executeDispatch(event, dispatchListeners, dispatchInstances);
- }
-
- event._dispatchListeners = null;
- event._dispatchInstances = null;
- }
- /**
- * Dispatches an event and releases it back into the pool, unless persistent.
- *
- * @param {?object} event Synthetic event to be dispatched.
- * @private
- */
-
-
- var executeDispatchesAndRelease = function (event) {
- if (event) {
- executeDispatchesInOrder(event);
-
- if (!event.isPersistent()) {
- event.constructor.release(event);
- }
- }
- };
-
- function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
- }
-
- function getParent(inst) {
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
-
- if (inst) {
- return inst;
- }
-
- return null;
- }
- /**
- * Simulates the traversal of a two-phase, capture/bubble event dispatch.
- */
-
-
- function traverseTwoPhase(inst, fn, arg) {
- var path = [];
-
- while (inst) {
- path.push(inst);
- inst = getParent(inst);
- }
-
- var i;
-
- for (i = path.length; i-- > 0;) {
- fn(path[i], 'captured', arg);
- }
-
- for (i = 0; i < path.length; i++) {
- fn(path[i], 'bubbled', arg);
- }
- }
-
- function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
-
- default:
- return false;
- }
- }
- /**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
-
-
- function getListener(inst, registrationName) {
- // TODO: shouldPreventMouseEvent is DOM-specific and definitely should not
- // live here; needs to be moved to a better place soon
- var stateNode = inst.stateNode;
-
- if (!stateNode) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
-
- var props = getFiberCurrentPropsFromNode(stateNode);
-
- if (!props) {
- // Work in progress.
- return null;
- }
-
- var listener = props[registrationName];
-
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
-
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
-
- return listener;
- }
-
- function listenerAtPhase(inst, event, propagationPhase) {
- var registrationName = event._reactName;
-
- if (propagationPhase === 'captured') {
- registrationName += 'Capture';
- }
-
- return getListener(inst, registrationName);
- }
-
- function accumulateDispatches(inst, ignoredDirection, event) {
- if (inst && event && event._reactName) {
- var registrationName = event._reactName;
- var listener = getListener(inst, registrationName);
-
- if (listener) {
- if (event._dispatchListeners == null) {
- event._dispatchListeners = [];
- }
-
- if (event._dispatchInstances == null) {
- event._dispatchInstances = [];
- }
-
- event._dispatchListeners.push(listener);
-
- event._dispatchInstances.push(inst);
- }
- }
- }
-
- function accumulateDirectionalDispatches(inst, phase, event) {
- {
- if (!inst) {
- error('Dispatching inst must not be null');
- }
- }
-
- var listener = listenerAtPhase(inst, event, phase);
-
- if (listener) {
- if (event._dispatchListeners == null) {
- event._dispatchListeners = [];
- }
-
- if (event._dispatchInstances == null) {
- event._dispatchInstances = [];
- }
-
- event._dispatchListeners.push(listener);
-
- event._dispatchInstances.push(inst);
- }
- }
-
- function accumulateDirectDispatchesSingle(event) {
- if (event && event._reactName) {
- accumulateDispatches(event._targetInst, null, event);
- }
- }
-
- function accumulateTwoPhaseDispatchesSingle(event) {
- if (event && event._reactName) {
- traverseTwoPhase(event._targetInst, accumulateDirectionalDispatches, event);
- }
- } // End of inline
-
-
- var Simulate = {};
- var directDispatchEventTypes = new Set(['mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave']);
- /**
- * Exports:
- *
- * - `Simulate.click(Element)`
- * - `Simulate.mouseMove(Element)`
- * - `Simulate.change(Element)`
- * - ... (All keys from event plugin `eventTypes` objects)
- */
-
- function makeSimulator(eventType) {
- return function (domNode, eventData) {
- if (!!React.isValidElement(domNode)) {
- {
- throw Error( "TestUtils.Simulate expected a DOM node as the first argument but received a React element. Pass the DOM node you wish to simulate the event on instead. Note that TestUtils.Simulate will not work if you are using shallow rendering." );
- }
- }
-
- if (!!isCompositeComponent(domNode)) {
- {
- throw Error( "TestUtils.Simulate expected a DOM node as the first argument but received a component instance. Pass the DOM node you wish to simulate the event on instead." );
- }
- }
-
- var reactName = 'on' + eventType[0].toUpperCase() + eventType.slice(1);
- var fakeNativeEvent = new Event();
- fakeNativeEvent.target = domNode;
- fakeNativeEvent.type = eventType.toLowerCase();
- var targetInst = getInstanceFromNode(domNode);
- var event = new SyntheticEvent(reactName, fakeNativeEvent.type, targetInst, fakeNativeEvent, domNode); // Since we aren't using pooling, always persist the event. This will make
- // sure it's marked and won't warn when setting additional properties.
-
- event.persist();
-
- _assign(event, eventData);
-
- if (directDispatchEventTypes.has(eventType)) {
- accumulateDirectDispatchesSingle(event);
- } else {
- accumulateTwoPhaseDispatchesSingle(event);
- }
-
- ReactDOM.unstable_batchedUpdates(function () {
- // Normally extractEvent enqueues a state restore, but we'll just always
- // do that since we're by-passing it here.
- enqueueStateRestore(domNode);
- executeDispatchesAndRelease(event);
- rethrowCaughtError();
- });
- restoreStateIfNeeded();
- };
- } // A one-time snapshot with no plans to update. We'll probably want to deprecate Simulate API.
-
-
- var simulatedEventTypes = ['blur', 'cancel', 'click', 'close', 'contextMenu', 'copy', 'cut', 'auxClick', 'doubleClick', 'dragEnd', 'dragStart', 'drop', 'focus', 'input', 'invalid', 'keyDown', 'keyPress', 'keyUp', 'mouseDown', 'mouseUp', 'paste', 'pause', 'play', 'pointerCancel', 'pointerDown', 'pointerUp', 'rateChange', 'reset', 'seeked', 'submit', 'touchCancel', 'touchEnd', 'touchStart', 'volumeChange', 'drag', 'dragEnter', 'dragExit', 'dragLeave', 'dragOver', 'mouseMove', 'mouseOut', 'mouseOver', 'pointerMove', 'pointerOut', 'pointerOver', 'scroll', 'toggle', 'touchMove', 'wheel', 'abort', 'animationEnd', 'animationIteration', 'animationStart', 'canPlay', 'canPlayThrough', 'durationChange', 'emptied', 'encrypted', 'ended', 'error', 'gotPointerCapture', 'load', 'loadedData', 'loadedMetadata', 'loadStart', 'lostPointerCapture', 'playing', 'progress', 'seeking', 'stalled', 'suspend', 'timeUpdate', 'transitionEnd', 'waiting', 'mouseEnter', 'mouseLeave', 'pointerEnter', 'pointerLeave', 'change', 'select', 'beforeInput', 'compositionEnd', 'compositionStart', 'compositionUpdate'];
-
- function buildSimulators() {
- simulatedEventTypes.forEach(function (eventType) {
- Simulate[eventType] = makeSimulator(eventType);
- });
- }
-
- buildSimulators();
-
- exports.Simulate = Simulate;
- exports.act = act;
- exports.findAllInRenderedTree = findAllInRenderedTree;
- exports.findRenderedComponentWithType = findRenderedComponentWithType;
- exports.findRenderedDOMComponentWithClass = findRenderedDOMComponentWithClass;
- exports.findRenderedDOMComponentWithTag = findRenderedDOMComponentWithTag;
- exports.isCompositeComponent = isCompositeComponent;
- exports.isCompositeComponentWithType = isCompositeComponentWithType;
- exports.isDOMComponent = isDOMComponent;
- exports.isDOMComponentElement = isDOMComponentElement;
- exports.isElement = isElement;
- exports.isElementOfType = isElementOfType;
- exports.mockComponent = mockComponent;
- exports.nativeTouchData = nativeTouchData;
- exports.renderIntoDocument = renderIntoDocument;
- exports.scryRenderedComponentsWithType = scryRenderedComponentsWithType;
- exports.scryRenderedDOMComponentsWithClass = scryRenderedDOMComponentsWithClass;
- exports.scryRenderedDOMComponentsWithTag = scryRenderedDOMComponentsWithTag;
- exports.traverseTwoPhase = traverseTwoPhase;
- exports.unstable_concurrentAct = unstable_concurrentAct;
-
-})));
diff --git a/node_modules/react-dom/umd/react-dom-test-utils.production.min.js b/node_modules/react-dom/umd/react-dom-test-utils.production.min.js
deleted file mode 100644
index 4637aa3..0000000
--- a/node_modules/react-dom/umd/react-dom-test-utils.production.min.js
+++ /dev/null
@@ -1,35 +0,0 @@
-/** @license React v17.0.2
- * react-dom-test-utils.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function(){'use strict';(function(h,p){"object"===typeof exports&&"undefined"!==typeof module?p(exports,require("react"),require("react-dom")):"function"===typeof define&&define.amd?define(["exports","react","react-dom"],p):(h=h||self,p(h.ReactTestUtils={},h.React,h.ReactDOM))})(this,function(h,p,v){function q(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-function T(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function U(a){if(T(a)!==a)throw Error(q(188));}function ka(a){var b=a.alternate;if(!b){b=T(a);if(null===b)throw Error(q(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var g=e.alternate;if(null===g){d=e.return;if(null!==d){c=d;continue}break}if(e.child===g.child){for(g=e.child;g;){if(g===c)return U(e),a;if(g===
-d)return U(e),b;g=g.sibling}throw Error(q(188));}if(c.return!==d.return)c=e,d=g;else{for(var f=!1,l=e.child;l;){if(l===c){f=!0;c=e;d=g;break}if(l===d){f=!0;d=e;c=g;break}l=l.sibling}if(!f){for(l=g.child;l;){if(l===c){f=!0;c=g;d=e;break}if(l===d){f=!0;d=g;c=e;break}l=l.sibling}if(!f)throw Error(q(189));}}if(c.alternate!==d)throw Error(q(190));}if(3!==c.tag)throw Error(q(188));return c.stateNode.current===c?a:b}function I(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===
-a&&(a=13);return 32<=a||13===a?a:0}function B(){return!0}function V(){return!1}function m(a){function b(c,b,e,g,f){this._reactName=c;this._targetInst=e;this.type=b;this.nativeEvent=g;this.target=f;this.currentTarget=null;for(var d in a)a.hasOwnProperty(d)&&(c=a[d],this[d]=c?c(g):g[d]);this.isDefaultPrevented=(null!=g.defaultPrevented?g.defaultPrevented:!1===g.returnValue)?B:V;this.isPropagationStopped=V;return this}k(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;
-a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=B)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=B)},persist:function(){},isPersistent:B});return b}function la(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=ma[a])?!!b[a]:!1}function J(a){return la}function W(a){if(null===C)try{var b=
-("require"+Math.random()).slice(0,7);C=(module&&module[b]).call(module,"timers").setImmediate}catch(c){C=function(a){var b=new MessageChannel;b.port1.onmessage=a;b.port2.postMessage(void 0)}}return C(a)}function X(a){try{K(),W(function(){K()?X(a):a()})}catch(b){a(b)}}function Y(a,b){jest.runOnlyPendingTimers();W(function(){try{y()?Y(a,b):a()}catch(c){b(c)}})}function na(a,b,c,d,e,g,f,l,h){z=!1;D=null;oa.apply(pa,arguments)}function qa(a,b,c,d,e,g,f,l,h){na.apply(this,arguments);if(z){if(z){var k=
-D;z=!1;D=null}else throw Error(q(198));E||(E=!0,L=k)}}function ra(a){}function sa(a,b){if(!a)return[];a=ka(a);if(!a)return[];for(var c=a,d=[];;){if(5===c.tag||6===c.tag||1===c.tag||0===c.tag){var e=c.stateNode;b(e)&&d.push(e)}if(c.child)c.child.return=c,c=c.child;else{if(c===a)return d;for(;!c.sibling;){if(!c.return||c.return===a)return d;c=c.return}c.sibling.return=c.return;c=c.sibling}}}function w(a,b){if(a&&!a._reactInternals){var c=""+a;a=Array.isArray(a)?"an array":a&&1===a.nodeType&&a.tagName?
-"a DOM node":"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c;throw Error(q(286,b,a));}}function F(a){return!(!a||1!==a.nodeType||!a.tagName)}function M(a){return F(a)?!1:null!=a&&"function"===typeof a.render&&"function"===typeof a.setState}function Z(a,b){return M(a)?a._reactInternals.type===b:!1}function G(a,b){w(a,"findAllInRenderedTree");return a?sa(a._reactInternals,b):[]}function aa(a,b){w(a,"scryRenderedDOMComponentsWithClass");return G(a,function(a){if(F(a)){var c=
-a.className;"string"!==typeof c&&(c=a.getAttribute("class")||"");var e=c.split(/\s+/);if(!Array.isArray(b)){if(void 0===b)throw Error(q(11));b=b.split(/\s+/)}return b.every(function(a){return-1!==e.indexOf(a)})}return!1})}function ba(a,b){w(a,"scryRenderedDOMComponentsWithTag");return G(a,function(a){return F(a)&&a.tagName.toUpperCase()===b.toUpperCase()})}function ca(a,b){w(a,"scryRenderedComponentsWithType");return G(a,function(a){return Z(a,b)})}function da(a,b,c){var d=a.type||"unknown-event";
-a.currentTarget=ta(c);qa(d,b,void 0,a);a.currentTarget=null}function ea(a,b,c){for(var d=[];a;){d.push(a);do a=a.return;while(a&&5!==a.tag);a=a?a:null}for(a=d.length;0<a--;)b(d[a],"captured",c);for(a=0;a<d.length;a++)b(d[a],"bubbled",c)}function fa(a,b){var c=a.stateNode;if(!c)return null;var d=ua(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=
-!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(q(231,b,typeof c));return c}function va(a,b,c){a&&c&&c._reactName&&(b=fa(a,c._reactName))&&(null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a))}function wa(a,b,c){var d=c._reactName;"captured"===b&&(d+="Capture");if(b=
-fa(a,d))null==c._dispatchListeners&&(c._dispatchListeners=[]),null==c._dispatchInstances&&(c._dispatchInstances=[]),c._dispatchListeners.push(b),c._dispatchInstances.push(a)}function xa(a){return function(b,c){if(p.isValidElement(b))throw Error(q(228));if(M(b))throw Error(q(229));var d="on"+a[0].toUpperCase()+a.slice(1),e=new ra;e.target=b;e.type=a.toLowerCase();var g=ya(b),f=new za(d,e.type,g,e,b);f.persist();k(f,c);Aa.has(a)?f&&f._reactName&&va(f._targetInst,null,f):f&&f._reactName&&ea(f._targetInst,
-wa,f);v.unstable_batchedUpdates(function(){Ba(b);if(f){var a=f._dispatchListeners,c=f._dispatchInstances;if(Array.isArray(a))for(var d=0;d<a.length&&!f.isPropagationStopped();d++)da(f,a[d],c[d]);else a&&da(f,a,c);f._dispatchListeners=null;f._dispatchInstances=null;f.isPersistent()||f.constructor.release(f)}if(E)throw a=L,E=!1,L=null,a;});Ca()}}var k=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,t=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,u={eventPhase:0,bubbles:0,cancelable:0,
-timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},za=m(u),x=k({},u,{view:0,detail:0});m(x);var N,O,A,r=k({},x,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:J,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==A&&(A&&"mousemove"===a.type?
-(N=a.screenX-A.screenX,O=a.screenY-A.screenY):O=N=0,A=a);return N},movementY:function(a){return"movementY"in a?a.movementY:O}});m(r);var n=k({},r,{dataTransfer:0});m(n);n=k({},x,{relatedTarget:0});m(n);n=k({},u,{animationName:0,elapsedTime:0,pseudoElement:0});m(n);n=k({},u,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});m(n);n=k({},u,{data:0});m(n);var Da={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",
-Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ea={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},
-ma={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};n=k({},x,{key:function(a){if(a.key){var b=Da[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=I(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Ea[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:J,charCode:function(a){return"keypress"===a.type?I(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===
-a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?I(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});m(n);n=k({},r,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0});m(n);x=k({},x,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:J});m(x);u=k({},u,{propertyName:0,elapsedTime:0,pseudoElement:0});m(u);r=k({},r,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in
-a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0});m(r);var C=null,y=p.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_flushAllWithoutAsserting;r=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;var Fa=r[5],P=r[6],Ga=v.unstable_batchedUpdates,Q=t.IsSomeRendererActing,ha="function"===typeof y,K=y||function(){for(var a=!1;Fa();)a=!0;return a},H=0,ia=!1,R=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events[6],
-Ha=v.unstable_batchedUpdates,S=t.IsSomeRendererActing,oa=function(a,b,c,d,e,g,f,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(Ia){this.onError(Ia)}},z=!1,D=null,E=!1,L=null,pa={onError:function(a){z=!0;D=a}};t=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Events;var ya=t[0],ta=t[1],ua=t[2],Ba=t[3],Ca=t[4],ja={},Aa=new Set(["mouseEnter","mouseLeave","pointerEnter","pointerLeave"]),Ja="blur cancel click close contextMenu copy cut auxClick doubleClick dragEnd dragStart drop focus input invalid keyDown keyPress keyUp mouseDown mouseUp paste pause play pointerCancel pointerDown pointerUp rateChange reset seeked submit touchCancel touchEnd touchStart volumeChange drag dragEnter dragExit dragLeave dragOver mouseMove mouseOut mouseOver pointerMove pointerOut pointerOver scroll toggle touchMove wheel abort animationEnd animationIteration animationStart canPlay canPlayThrough durationChange emptied encrypted ended error gotPointerCapture load loadedData loadedMetadata loadStart lostPointerCapture playing progress seeking stalled suspend timeUpdate transitionEnd waiting mouseEnter mouseLeave pointerEnter pointerLeave change select beforeInput compositionEnd compositionStart compositionUpdate".split(" ");
-(function(){Ja.forEach(function(a){ja[a]=xa(a)})})();h.Simulate=ja;h.act=function(a){function b(){H--;Q.current=c;P.current=d}!1===ia&&(ia=!0,console.error("act(...) is not supported in production builds of React, and might not behave as expected."));H++;var c=Q.current,d=P.current;Q.current=!0;P.current=!0;try{var e=Ga(a)}catch(g){throw b(),g;}if(null!==e&&"object"===typeof e&&"function"===typeof e.then)return{then:function(a,d){e.then(function(){1<H||!0===ha&&!0===c?(b(),a()):X(function(c){b();
-c?d(c):a()})},function(a){b();d(a)})}};try{1!==H||!1!==ha&&!1!==c||K(),b()}catch(g){throw b(),g;}return{then:function(a){a()}}};h.findAllInRenderedTree=G;h.findRenderedComponentWithType=function(a,b){w(a,"findRenderedComponentWithType");a=ca(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for componentType:"+b);return a[0]};h.findRenderedDOMComponentWithClass=function(a,b){w(a,"findRenderedDOMComponentWithClass");a=aa(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+
-a.length+") for class:"+b);return a[0]};h.findRenderedDOMComponentWithTag=function(a,b){w(a,"findRenderedDOMComponentWithTag");a=ba(a,b);if(1!==a.length)throw Error("Did not find exactly one match (found: "+a.length+") for tag:"+b);return a[0]};h.isCompositeComponent=M;h.isCompositeComponentWithType=Z;h.isDOMComponent=F;h.isDOMComponentElement=function(a){return!!(a&&p.isValidElement(a)&&a.tagName)};h.isElement=function(a){return p.isValidElement(a)};h.isElementOfType=function(a,b){return p.isValidElement(a)&&
-a.type===b};h.mockComponent=function(a,b){b=b||a.mockTagName||"div";a.prototype.render.mockImplementation(function(){return p.createElement(b,null,this.props.children)});return this};h.nativeTouchData=function(a,b){return{touches:[{pageX:a,pageY:b}]}};h.renderIntoDocument=function(a){var b=document.createElement("div");return v.render(a,b)};h.scryRenderedComponentsWithType=ca;h.scryRenderedDOMComponentsWithClass=aa;h.scryRenderedDOMComponentsWithTag=ba;h.traverseTwoPhase=ea;h.unstable_concurrentAct=
-function(a){if(void 0===y)throw Error("This version of `act` requires a special mock build of Scheduler.");if(!0!==setTimeout._isMockFunction)throw Error("This version of `act` requires Jest's timer mocks (i.e. jest.useFakeTimers).");var b=S.current,c=R.current;S.current=!0;R.current=!0;var d=function(){S.current=b;R.current=c};try{var e=Ha(a);if("object"===typeof e&&null!==e&&"function"===typeof e.then)return{then:function(a,b){e.then(function(){Y(function(){d();a()},function(a){d();b(a)})},function(a){d();
-b(a)})}};try{do var g=y();while(g)}finally{d()}}catch(f){throw d(),f;}}});
-})();
diff --git a/node_modules/react-dom/umd/react-dom.development.js b/node_modules/react-dom/umd/react-dom.development.js
deleted file mode 100644
index 45db5aa..0000000
--- a/node_modules/react-dom/umd/react-dom.development.js
+++ /dev/null
@@ -1,26292 +0,0 @@
-/** @license React v17.0.2
- * react-dom.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :
- typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :
- (global = global || self, factory(global.ReactDOM = {}, global.React));
-}(this, (function (exports, React) { 'use strict';
-
- var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
- // by calls to these methods by a Babel plugin.
- //
- // In PROD (or in packages without access to React internals),
- // they are left as they are instead.
-
- function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
- }
- function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
- }
-
- function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
- }
-
- if (!React) {
- {
- throw Error( "ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM." );
- }
- }
-
- var FunctionComponent = 0;
- var ClassComponent = 1;
- var IndeterminateComponent = 2; // Before we know whether it is function or class
-
- var HostRoot = 3; // Root of a host tree. Could be nested inside another node.
-
- var HostPortal = 4; // A subtree. Could be an entry point to a different renderer.
-
- var HostComponent = 5;
- var HostText = 6;
- var Fragment = 7;
- var Mode = 8;
- var ContextConsumer = 9;
- var ContextProvider = 10;
- var ForwardRef = 11;
- var Profiler = 12;
- var SuspenseComponent = 13;
- var MemoComponent = 14;
- var SimpleMemoComponent = 15;
- var LazyComponent = 16;
- var IncompleteClassComponent = 17;
- var DehydratedFragment = 18;
- var SuspenseListComponent = 19;
- var FundamentalComponent = 20;
- var ScopeComponent = 21;
- var Block = 22;
- var OffscreenComponent = 23;
- var LegacyHiddenComponent = 24;
-
- // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
- var enableProfilerTimer = true; // Record durations for commit and passive effects phases.
-
- var enableFundamentalAPI = false; // Experimental Scope support.
- var enableNewReconciler = false; // Errors that are thrown while unmounting (or after in the case of passive effects)
- var warnAboutStringRefs = false;
-
- var allNativeEvents = new Set();
- /**
- * Mapping from registration name to event name
- */
-
-
- var registrationNameDependencies = {};
- /**
- * Mapping from lowercase registration names to the properly cased version,
- * used to warn in the case of missing event handlers. Available
- * only in true.
- * @type {Object}
- */
-
- var possibleRegistrationNames = {} ; // Trust the developer to only use possibleRegistrationNames in true
-
- function registerTwoPhaseEvent(registrationName, dependencies) {
- registerDirectEvent(registrationName, dependencies);
- registerDirectEvent(registrationName + 'Capture', dependencies);
- }
- function registerDirectEvent(registrationName, dependencies) {
- {
- if (registrationNameDependencies[registrationName]) {
- error('EventRegistry: More than one plugin attempted to publish the same ' + 'registration name, `%s`.', registrationName);
- }
- }
-
- registrationNameDependencies[registrationName] = dependencies;
-
- {
- var lowerCasedName = registrationName.toLowerCase();
- possibleRegistrationNames[lowerCasedName] = registrationName;
-
- if (registrationName === 'onDoubleClick') {
- possibleRegistrationNames.ondblclick = registrationName;
- }
- }
-
- for (var i = 0; i < dependencies.length; i++) {
- allNativeEvents.add(dependencies[i]);
- }
- }
-
- var canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');
-
- // A reserved attribute.
- // It is handled by React separately and shouldn't be written to the DOM.
- var RESERVED = 0; // A simple string attribute.
- // Attributes that aren't in the filter are presumed to have this type.
-
- var STRING = 1; // A string attribute that accepts booleans in React. In HTML, these are called
- // "enumerated" attributes with "true" and "false" as possible values.
- // When true, it should be set to a "true" string.
- // When false, it should be set to a "false" string.
-
- var BOOLEANISH_STRING = 2; // A real boolean attribute.
- // When true, it should be present (set either to an empty string or its name).
- // When false, it should be omitted.
-
- var BOOLEAN = 3; // An attribute that can be used as a flag as well as with a value.
- // When true, it should be present (set either to an empty string or its name).
- // When false, it should be omitted.
- // For any other value, should be present with that value.
-
- var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a numeric.
- // When falsy, it should be removed.
-
- var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric.
- // When falsy, it should be removed.
-
- var POSITIVE_NUMERIC = 6;
-
- /* eslint-disable max-len */
- 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";
- /* eslint-enable max-len */
-
- var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
- var ROOT_ATTRIBUTE_NAME = 'data-reactroot';
- var VALID_ATTRIBUTE_NAME_REGEX = new RegExp('^[' + ATTRIBUTE_NAME_START_CHAR + '][' + ATTRIBUTE_NAME_CHAR + ']*$');
- var hasOwnProperty = Object.prototype.hasOwnProperty;
- var illegalAttributeNameCache = {};
- var validatedAttributeNameCache = {};
- function isAttributeNameSafe(attributeName) {
- if (hasOwnProperty.call(validatedAttributeNameCache, attributeName)) {
- return true;
- }
-
- if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) {
- return false;
- }
-
- if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
- validatedAttributeNameCache[attributeName] = true;
- return true;
- }
-
- illegalAttributeNameCache[attributeName] = true;
-
- {
- error('Invalid attribute name: `%s`', attributeName);
- }
-
- return false;
- }
- function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null) {
- return propertyInfo.type === RESERVED;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (name.length > 2 && (name[0] === 'o' || name[0] === 'O') && (name[1] === 'n' || name[1] === 'N')) {
- return true;
- }
-
- return false;
- }
- function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
- if (propertyInfo !== null && propertyInfo.type === RESERVED) {
- return false;
- }
-
- switch (typeof value) {
- case 'function': // $FlowIssue symbol is perfectly valid here
-
- case 'symbol':
- // eslint-disable-line
- return true;
-
- case 'boolean':
- {
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
- return !propertyInfo.acceptsBooleans;
- } else {
- var prefix = name.toLowerCase().slice(0, 5);
- return prefix !== 'data-' && prefix !== 'aria-';
- }
- }
-
- default:
- return false;
- }
- }
- function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
- if (value === null || typeof value === 'undefined') {
- return true;
- }
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
- return true;
- }
-
- if (isCustomComponentTag) {
- return false;
- }
-
- if (propertyInfo !== null) {
-
- switch (propertyInfo.type) {
- case BOOLEAN:
- return !value;
-
- case OVERLOADED_BOOLEAN:
- return value === false;
-
- case NUMERIC:
- return isNaN(value);
-
- case POSITIVE_NUMERIC:
- return isNaN(value) || value < 1;
- }
- }
-
- return false;
- }
- function getPropertyInfo(name) {
- return properties.hasOwnProperty(name) ? properties[name] : null;
- }
-
- function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL, removeEmptyString) {
- this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
- this.attributeName = attributeName;
- this.attributeNamespace = attributeNamespace;
- this.mustUseProperty = mustUseProperty;
- this.propertyName = name;
- this.type = type;
- this.sanitizeURL = sanitizeURL;
- this.removeEmptyString = removeEmptyString;
- } // When adding attributes to this list, be sure to also add them to
- // the `possibleStandardNames` module to ensure casing and incorrect
- // name warnings.
-
-
- var properties = {}; // These props are reserved by React. They shouldn't be written to the DOM.
-
- var reservedProps = ['children', 'dangerouslySetInnerHTML', // TODO: This prevents the assignment of defaultValue to regular
- // elements (not just inputs). Now that ReactDOMInput assigns to the
- // defaultValue property -- do we need this?
- 'defaultValue', 'defaultChecked', 'innerHTML', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'style'];
- reservedProps.forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, RESERVED, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // A few React string attributes have a different name.
- // This is a mapping from React prop names to the attribute names.
-
- [['acceptCharset', 'accept-charset'], ['className', 'class'], ['htmlFor', 'for'], ['httpEquiv', 'http-equiv']].forEach(function (_ref) {
- var name = _ref[0],
- attributeName = _ref[1];
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are "enumerated" HTML attributes that accept "true" and "false".
- // In React, we let users pass `true` and `false` even though technically
- // these aren't boolean attributes (they are coerced to strings).
-
- ['contentEditable', 'draggable', 'spellCheck', 'value'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are "enumerated" SVG attributes that accept "true" and "false".
- // In React, we let users pass `true` and `false` even though technically
- // these aren't boolean attributes (they are coerced to strings).
- // Since these are SVG attributes, their attribute names are case-sensitive.
-
- ['autoReverse', 'externalResourcesRequired', 'focusable', 'preserveAlpha'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEANISH_STRING, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are HTML boolean attributes.
-
- ['allowFullScreen', 'async', // Note: there is a special case that prevents it from being written to the DOM
- // on the client side because the browsers are inconsistent. Instead we call focus().
- 'autoFocus', 'autoPlay', 'controls', 'default', 'defer', 'disabled', 'disablePictureInPicture', 'disableRemotePlayback', 'formNoValidate', 'hidden', 'loop', 'noModule', 'noValidate', 'open', 'playsInline', 'readOnly', 'required', 'reversed', 'scoped', 'seamless', // Microdata
- 'itemScope'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are the few React props that we set as DOM properties
- // rather than attributes. These are all booleans.
-
- ['checked', // Note: `option.selected` is not updated if `select.multiple` is
- // disabled with `removeAttribute`. We have special logic for handling this.
- 'multiple', 'muted', 'selected' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, BOOLEAN, true, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are HTML attributes that are "overloaded booleans": they behave like
- // booleans, but can also accept a string value.
-
- ['capture', 'download' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, OVERLOADED_BOOLEAN, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are HTML attributes that must be positive numbers.
-
- ['cols', 'rows', 'size', 'span' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, POSITIVE_NUMERIC, false, // mustUseProperty
- name, // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These are HTML attributes that must be numbers.
-
- ['rowSpan', 'start'].forEach(function (name) {
- properties[name] = new PropertyInfoRecord(name, NUMERIC, false, // mustUseProperty
- name.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- });
- var CAMELIZE = /[\-\:]([a-z])/g;
-
- var capitalize = function (token) {
- return token[1].toUpperCase();
- }; // This is a list of all SVG attributes that need special casing, namespacing,
- // or boolean value assignment. Regular attributes that just accept strings
- // and have the same names are omitted, just like in the HTML attribute filter.
- // Some of these attributes can be hard to find. This list was created by
- // scraping the MDN documentation.
-
-
- ['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' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // String SVG attributes with the xlink namespace.
-
- ['xlink:actuate', 'xlink:arcrole', 'xlink:role', 'xlink:show', 'xlink:title', 'xlink:type' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/1999/xlink', false, // sanitizeURL
- false);
- }); // String SVG attributes with the xml namespace.
-
- ['xml:base', 'xml:lang', 'xml:space' // NOTE: if you add a camelCased prop to this list,
- // you'll need to set attributeName to name.toLowerCase()
- // instead in the assignment below.
- ].forEach(function (attributeName) {
- var name = attributeName.replace(CAMELIZE, capitalize);
- properties[name] = new PropertyInfoRecord(name, STRING, false, // mustUseProperty
- attributeName, 'http://www.w3.org/XML/1998/namespace', false, // sanitizeURL
- false);
- }); // These attribute exists both in HTML and SVG.
- // The attribute name is case-sensitive in SVG so we can't just use
- // the React name like we do for attributes that exist only in HTML.
-
- ['tabIndex', 'crossOrigin'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- false, // sanitizeURL
- false);
- }); // These attributes accept URLs. These must not allow javascript: URLS.
- // These will also need to accept Trusted Types object in the future.
-
- var xlinkHref = 'xlinkHref';
- properties[xlinkHref] = new PropertyInfoRecord('xlinkHref', STRING, false, // mustUseProperty
- 'xlink:href', 'http://www.w3.org/1999/xlink', true, // sanitizeURL
- false);
- ['src', 'href', 'action', 'formAction'].forEach(function (attributeName) {
- properties[attributeName] = new PropertyInfoRecord(attributeName, STRING, false, // mustUseProperty
- attributeName.toLowerCase(), // attributeName
- null, // attributeNamespace
- true, // sanitizeURL
- true);
- });
-
- // and any newline or tab are filtered out as if they're not part of the URL.
- // https://url.spec.whatwg.org/#url-parsing
- // Tab or newline are defined as \r\n\t:
- // https://infra.spec.whatwg.org/#ascii-tab-or-newline
- // A C0 control is a code point in the range \u0000 NULL to \u001F
- // INFORMATION SEPARATOR ONE, inclusive:
- // https://infra.spec.whatwg.org/#c0-control-or-space
-
- /* eslint-disable max-len */
-
- 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;
- var didWarn = false;
-
- function sanitizeURL(url) {
- {
- if (!didWarn && isJavaScriptProtocol.test(url)) {
- didWarn = true;
-
- 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));
- }
- }
- }
-
- /**
- * Get the value for a property on a node. Only used in DEV for SSR validation.
- * The "expected" argument is used as a hint of what the expected value is.
- * Some properties have multiple equivalent values.
- */
- function getValueForProperty(node, name, expected, propertyInfo) {
- {
- if (propertyInfo.mustUseProperty) {
- var propertyName = propertyInfo.propertyName;
- return node[propertyName];
- } else {
- if ( propertyInfo.sanitizeURL) {
- // If we haven't fully disabled javascript: URLs, and if
- // the hydration is successful of a javascript: URL, we
- // still want to warn on the client.
- sanitizeURL('' + expected);
- }
-
- var attributeName = propertyInfo.attributeName;
- var stringValue = null;
-
- if (propertyInfo.type === OVERLOADED_BOOLEAN) {
- if (node.hasAttribute(attributeName)) {
- var value = node.getAttribute(attributeName);
-
- if (value === '') {
- return true;
- }
-
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- return value;
- }
-
- if (value === '' + expected) {
- return expected;
- }
-
- return value;
- }
- } else if (node.hasAttribute(attributeName)) {
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- // We had an attribute but shouldn't have had one, so read it
- // for the error message.
- return node.getAttribute(attributeName);
- }
-
- if (propertyInfo.type === BOOLEAN) {
- // If this was a boolean, it doesn't matter what the value is
- // the fact that we have it is the same as the expected.
- return expected;
- } // Even if this property uses a namespace we use getAttribute
- // because we assume its namespaced name is the same as our config.
- // To use getAttributeNS we need the local name which we don't have
- // in our config atm.
-
-
- stringValue = node.getAttribute(attributeName);
- }
-
- if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
- return stringValue === null ? expected : stringValue;
- } else if (stringValue === '' + expected) {
- return expected;
- } else {
- return stringValue;
- }
- }
- }
- }
- /**
- * Get the value for a attribute on a node. Only used in DEV for SSR validation.
- * The third argument is used as a hint of what the expected value is. Some
- * attributes have multiple equivalent values.
- */
-
- function getValueForAttribute(node, name, expected) {
- {
- if (!isAttributeNameSafe(name)) {
- return;
- } // If the object is an opaque reference ID, it's expected that
- // the next prop is different than the server value, so just return
- // expected
-
-
- if (isOpaqueHydratingObject(expected)) {
- return expected;
- }
-
- if (!node.hasAttribute(name)) {
- return expected === undefined ? undefined : null;
- }
-
- var value = node.getAttribute(name);
-
- if (value === '' + expected) {
- return expected;
- }
-
- return value;
- }
- }
- /**
- * Sets the value for a property on a node.
- *
- * @param {DOMElement} node
- * @param {string} name
- * @param {*} value
- */
-
- function setValueForProperty(node, name, value, isCustomComponentTag) {
- var propertyInfo = getPropertyInfo(name);
-
- if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
- return;
- }
-
- if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
- value = null;
- } // If the prop isn't in the special list, treat it as a simple attribute.
-
-
- if (isCustomComponentTag || propertyInfo === null) {
- if (isAttributeNameSafe(name)) {
- var _attributeName = name;
-
- if (value === null) {
- node.removeAttribute(_attributeName);
- } else {
- node.setAttribute(_attributeName, '' + value);
- }
- }
-
- return;
- }
-
- var mustUseProperty = propertyInfo.mustUseProperty;
-
- if (mustUseProperty) {
- var propertyName = propertyInfo.propertyName;
-
- if (value === null) {
- var type = propertyInfo.type;
- node[propertyName] = type === BOOLEAN ? false : '';
- } else {
- // Contrary to `setAttribute`, object properties are properly
- // `toString`ed by IE8/9.
- node[propertyName] = value;
- }
-
- return;
- } // The rest are treated as attributes with special cases.
-
-
- var attributeName = propertyInfo.attributeName,
- attributeNamespace = propertyInfo.attributeNamespace;
-
- if (value === null) {
- node.removeAttribute(attributeName);
- } else {
- var _type = propertyInfo.type;
- var attributeValue;
-
- if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
- // If attribute type is boolean, we know for sure it won't be an execution sink
- // and we won't require Trusted Type here.
- attributeValue = '';
- } else {
- // `setAttribute` with objects becomes only `[object]` in IE8/9,
- // ('' + value) makes it output the correct toString()-value.
- {
- attributeValue = '' + value;
- }
-
- if (propertyInfo.sanitizeURL) {
- sanitizeURL(attributeValue.toString());
- }
- }
-
- if (attributeNamespace) {
- node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
- } else {
- node.setAttribute(attributeName, attributeValue);
- }
- }
- }
-
- var ReactInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _assign = ReactInternals.assign;
-
- // ATTENTION
- // When adding new symbols to this file,
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var REACT_ELEMENT_TYPE = 0xeac7;
- var REACT_PORTAL_TYPE = 0xeaca;
- var REACT_FRAGMENT_TYPE = 0xeacb;
- var REACT_STRICT_MODE_TYPE = 0xeacc;
- var REACT_PROFILER_TYPE = 0xead2;
- var REACT_PROVIDER_TYPE = 0xeacd;
- var REACT_CONTEXT_TYPE = 0xeace;
- var REACT_FORWARD_REF_TYPE = 0xead0;
- var REACT_SUSPENSE_TYPE = 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
- var REACT_MEMO_TYPE = 0xead3;
- var REACT_LAZY_TYPE = 0xead4;
- var REACT_BLOCK_TYPE = 0xead9;
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
- var REACT_SCOPE_TYPE = 0xead7;
- var REACT_OPAQUE_ID_TYPE = 0xeae0;
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
- var REACT_OFFSCREEN_TYPE = 0xeae2;
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
- if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
- }
-
- var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
- function getIteratorFn(maybeIterable) {
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
- return null;
- }
-
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
-
- if (typeof maybeIterator === 'function') {
- return maybeIterator;
- }
-
- return null;
- }
-
- // Helpers to patch console.logs to avoid logging during side-effect free
- // replaying on render function. This currently only patches the object
- // lazily which won't cover if the log function was extracted eagerly.
- // We could also eagerly patch the method.
- var disabledDepth = 0;
- var prevLog;
- var prevInfo;
- var prevWarn;
- var prevError;
- var prevGroup;
- var prevGroupCollapsed;
- var prevGroupEnd;
-
- function disabledLog() {}
-
- disabledLog.__reactDisabledLog = true;
- function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
- }
- function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: _assign({}, props, {
- value: prevLog
- }),
- info: _assign({}, props, {
- value: prevInfo
- }),
- warn: _assign({}, props, {
- value: prevWarn
- }),
- error: _assign({}, props, {
- value: prevError
- }),
- group: _assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: _assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: _assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
- }
-
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
- var prefix;
- function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
- }
- var reentry = false;
- var componentFrameCache;
-
- {
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
- }
-
- function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
- }
-
- function describeClassComponentFrame(ctor, source, ownerFn) {
- {
- return describeNativeComponentFrame(ctor, true);
- }
- }
- function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
- }
-
- function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
- }
-
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case REACT_SUSPENSE_TYPE:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
- }
-
- function describeFiber(fiber) {
- var owner = fiber._debugOwner ? fiber._debugOwner.type : null ;
- var source = fiber._debugSource ;
-
- switch (fiber.tag) {
- case HostComponent:
- return describeBuiltInComponentFrame(fiber.type);
-
- case LazyComponent:
- return describeBuiltInComponentFrame('Lazy');
-
- case SuspenseComponent:
- return describeBuiltInComponentFrame('Suspense');
-
- case SuspenseListComponent:
- return describeBuiltInComponentFrame('SuspenseList');
-
- case FunctionComponent:
- case IndeterminateComponent:
- case SimpleMemoComponent:
- return describeFunctionComponentFrame(fiber.type);
-
- case ForwardRef:
- return describeFunctionComponentFrame(fiber.type.render);
-
- case Block:
- return describeFunctionComponentFrame(fiber.type._render);
-
- case ClassComponent:
- return describeClassComponentFrame(fiber.type);
-
- default:
- return '';
- }
- }
-
- function getStackByFiberInDevAndProd(workInProgress) {
- try {
- var info = '';
- var node = workInProgress;
-
- do {
- info += describeFiber(node);
- node = node.return;
- } while (node);
-
- return info;
- } catch (x) {
- return '\nError generating stack: ' + x.message + '\n' + x.stack;
- }
- }
-
- function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
- }
-
- function getContextName(type) {
- return type.displayName || 'Context';
- }
-
- function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case REACT_PROFILER_TYPE:
- return 'Profiler';
-
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
-
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
- }
-
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var current = null;
- var isRendering = false;
- function getCurrentFiberOwnerNameInDevOrNull() {
- {
- if (current === null) {
- return null;
- }
-
- var owner = current._debugOwner;
-
- if (owner !== null && typeof owner !== 'undefined') {
- return getComponentName(owner.type);
- }
- }
-
- return null;
- }
-
- function getCurrentFiberStackInDev() {
- {
- if (current === null) {
- return '';
- } // Safe because if current fiber exists, we are reconciling,
- // and it is guaranteed to be the work-in-progress version.
-
-
- return getStackByFiberInDevAndProd(current);
- }
- }
-
- function resetCurrentFiber() {
- {
- ReactDebugCurrentFrame.getCurrentStack = null;
- current = null;
- isRendering = false;
- }
- }
- function setCurrentFiber(fiber) {
- {
- ReactDebugCurrentFrame.getCurrentStack = getCurrentFiberStackInDev;
- current = fiber;
- isRendering = false;
- }
- }
- function setIsRendering(rendering) {
- {
- isRendering = rendering;
- }
- }
- function getIsRendering() {
- {
- return isRendering;
- }
- }
-
- // Flow does not allow string concatenation of most non-string types. To work
- // around this limitation, we use an opaque type that can only be obtained by
- // passing the value through getToStringValue first.
- function toString(value) {
- return '' + value;
- }
- function getToStringValue(value) {
- switch (typeof value) {
- case 'boolean':
- case 'number':
- case 'object':
- case 'string':
- case 'undefined':
- return value;
-
- default:
- // function, symbol are assigned as empty strings
- return '';
- }
- }
-
- var hasReadOnlyValue = {
- button: true,
- checkbox: true,
- image: true,
- hidden: true,
- radio: true,
- reset: true,
- submit: true
- };
- function checkControlledValueProps(tagName, props) {
- {
- if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
- 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`.');
- }
-
- if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
- 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`.');
- }
- }
- }
-
- function isCheckable(elem) {
- var type = elem.type;
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (type === 'checkbox' || type === 'radio');
- }
-
- function getTracker(node) {
- return node._valueTracker;
- }
-
- function detachTracker(node) {
- node._valueTracker = null;
- }
-
- function getValueFromNode(node) {
- var value = '';
-
- if (!node) {
- return value;
- }
-
- if (isCheckable(node)) {
- value = node.checked ? 'true' : 'false';
- } else {
- value = node.value;
- }
-
- return value;
- }
-
- function trackValueOnNode(node) {
- var valueField = isCheckable(node) ? 'checked' : 'value';
- var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
- var currentValue = '' + node[valueField]; // if someone has already defined a value or Safari, then bail
- // and don't track value will cause over reporting of changes,
- // but it's better then a hard failure
- // (needed for certain tests that spyOn input values and Safari)
-
- if (node.hasOwnProperty(valueField) || typeof descriptor === 'undefined' || typeof descriptor.get !== 'function' || typeof descriptor.set !== 'function') {
- return;
- }
-
- var get = descriptor.get,
- set = descriptor.set;
- Object.defineProperty(node, valueField, {
- configurable: true,
- get: function () {
- return get.call(this);
- },
- set: function (value) {
- currentValue = '' + value;
- set.call(this, value);
- }
- }); // We could've passed this the first time
- // but it triggers a bug in IE11 and Edge 14/15.
- // Calling defineProperty() again should be equivalent.
- // https://github.com/facebook/react/issues/11768
-
- Object.defineProperty(node, valueField, {
- enumerable: descriptor.enumerable
- });
- var tracker = {
- getValue: function () {
- return currentValue;
- },
- setValue: function (value) {
- currentValue = '' + value;
- },
- stopTracking: function () {
- detachTracker(node);
- delete node[valueField];
- }
- };
- return tracker;
- }
-
- function track(node) {
- if (getTracker(node)) {
- return;
- } // TODO: Once it's just Fiber we can move this to node._wrapperState
-
-
- node._valueTracker = trackValueOnNode(node);
- }
- function updateValueIfChanged(node) {
- if (!node) {
- return false;
- }
-
- var tracker = getTracker(node); // if there is no tracker at this point it's unlikely
- // that trying again will succeed
-
- if (!tracker) {
- return true;
- }
-
- var lastValue = tracker.getValue();
- var nextValue = getValueFromNode(node);
-
- if (nextValue !== lastValue) {
- tracker.setValue(nextValue);
- return true;
- }
-
- return false;
- }
-
- function getActiveElement(doc) {
- doc = doc || (typeof document !== 'undefined' ? document : undefined);
-
- if (typeof doc === 'undefined') {
- return null;
- }
-
- try {
- return doc.activeElement || doc.body;
- } catch (e) {
- return doc.body;
- }
- }
-
- var didWarnValueDefaultValue = false;
- var didWarnCheckedDefaultChecked = false;
- var didWarnControlledToUncontrolled = false;
- var didWarnUncontrolledToControlled = false;
-
- function isControlled(props) {
- var usesChecked = props.type === 'checkbox' || props.type === 'radio';
- return usesChecked ? props.checked != null : props.value != null;
- }
- /**
- * Implements an <input> host component that allows setting these optional
- * props: `checked`, `value`, `defaultChecked`, and `defaultValue`.
- *
- * If `checked` or `value` are not supplied (or null/undefined), user actions
- * that affect the checked state or value will trigger updates to the element.
- *
- * If they are supplied (and not null/undefined), the rendered element will not
- * trigger updates to the element. Instead, the props must change in order for
- * the rendered element to be updated.
- *
- * The rendered element will be initialized as unchecked (or `defaultChecked`)
- * with an empty value (or `defaultValue`).
- *
- * See http://www.w3.org/TR/2012/WD-html5-20121025/the-input-element.html
- */
-
-
- function getHostProps(element, props) {
- var node = element;
- var checked = props.checked;
-
- var hostProps = _assign({}, props, {
- defaultChecked: undefined,
- defaultValue: undefined,
- value: undefined,
- checked: checked != null ? checked : node._wrapperState.initialChecked
- });
-
- return hostProps;
- }
- function initWrapperState(element, props) {
- {
- checkControlledValueProps('input', props);
-
- if (props.checked !== undefined && props.defaultChecked !== undefined && !didWarnCheckedDefaultChecked) {
- 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', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
-
- didWarnCheckedDefaultChecked = true;
- }
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue) {
- 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', getCurrentFiberOwnerNameInDevOrNull() || 'A component', props.type);
-
- didWarnValueDefaultValue = true;
- }
- }
-
- var node = element;
- var defaultValue = props.defaultValue == null ? '' : props.defaultValue;
- node._wrapperState = {
- initialChecked: props.checked != null ? props.checked : props.defaultChecked,
- initialValue: getToStringValue(props.value != null ? props.value : defaultValue),
- controlled: isControlled(props)
- };
- }
- function updateChecked(element, props) {
- var node = element;
- var checked = props.checked;
-
- if (checked != null) {
- setValueForProperty(node, 'checked', checked, false);
- }
- }
- function updateWrapper(element, props) {
- var node = element;
-
- {
- var controlled = isControlled(props);
-
- if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
- error('A component is changing an uncontrolled input to be controlled. ' + 'This is likely caused by the value changing from undefined to ' + 'a defined value, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
-
- didWarnUncontrolledToControlled = true;
- }
-
- if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
- error('A component is changing a controlled input to be uncontrolled. ' + 'This is likely caused by the value changing from a defined to ' + 'undefined, which should not happen. ' + 'Decide between using a controlled or uncontrolled input ' + 'element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components');
-
- didWarnControlledToUncontrolled = true;
- }
- }
-
- updateChecked(element, props);
- var value = getToStringValue(props.value);
- var type = props.type;
-
- if (value != null) {
- if (type === 'number') {
- if (value === 0 && node.value === '' || // We explicitly want to coerce to number here if possible.
- // eslint-disable-next-line
- node.value != value) {
- node.value = toString(value);
- }
- } else if (node.value !== toString(value)) {
- node.value = toString(value);
- }
- } else if (type === 'submit' || type === 'reset') {
- // Submit/reset inputs need the attribute removed completely to avoid
- // blank-text buttons.
- node.removeAttribute('value');
- return;
- }
-
- {
- // When syncing the value attribute, the value comes from a cascade of
- // properties:
- // 1. The value React property
- // 2. The defaultValue React property
- // 3. Otherwise there should be no change
- if (props.hasOwnProperty('value')) {
- setDefaultValue(node, props.type, value);
- } else if (props.hasOwnProperty('defaultValue')) {
- setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
- }
- }
-
- {
- // When syncing the checked attribute, it only changes when it needs
- // to be removed, such as transitioning from a checkbox into a text input
- if (props.checked == null && props.defaultChecked != null) {
- node.defaultChecked = !!props.defaultChecked;
- }
- }
- }
- function postMountWrapper(element, props, isHydrating) {
- var node = element; // Do not assign value if it is already set. This prevents user text input
- // from being lost during SSR hydration.
-
- if (props.hasOwnProperty('value') || props.hasOwnProperty('defaultValue')) {
- var type = props.type;
- var isButton = type === 'submit' || type === 'reset'; // Avoid setting value attribute on submit/reset inputs as it overrides the
- // default value provided by the browser. See: #12872
-
- if (isButton && (props.value === undefined || props.value === null)) {
- return;
- }
-
- var initialValue = toString(node._wrapperState.initialValue); // Do not assign value if it is already set. This prevents user text input
- // from being lost during SSR hydration.
-
- if (!isHydrating) {
- {
- // When syncing the value attribute, the value property should use
- // the wrapperState._initialValue property. This uses:
- //
- // 1. The value React property when present
- // 2. The defaultValue React property when present
- // 3. An empty string
- if (initialValue !== node.value) {
- node.value = initialValue;
- }
- }
- }
-
- {
- // Otherwise, the value attribute is synchronized to the property,
- // so we assign defaultValue to the same thing as the value property
- // assignment step above.
- node.defaultValue = initialValue;
- }
- } // Normally, we'd just do `node.checked = node.checked` upon initial mount, less this bug
- // this is needed to work around a chrome bug where setting defaultChecked
- // will sometimes influence the value of checked (even after detachment).
- // Reference: https://bugs.chromium.org/p/chromium/issues/detail?id=608416
- // We need to temporarily unset name to avoid disrupting radio button groups.
-
-
- var name = node.name;
-
- if (name !== '') {
- node.name = '';
- }
-
- {
- // When syncing the checked attribute, both the checked property and
- // attribute are assigned at the same time using defaultChecked. This uses:
- //
- // 1. The checked React property when present
- // 2. The defaultChecked React property when present
- // 3. Otherwise, false
- node.defaultChecked = !node.defaultChecked;
- node.defaultChecked = !!node._wrapperState.initialChecked;
- }
-
- if (name !== '') {
- node.name = name;
- }
- }
- function restoreControlledState(element, props) {
- var node = element;
- updateWrapper(node, props);
- updateNamedCousins(node, props);
- }
-
- function updateNamedCousins(rootNode, props) {
- var name = props.name;
-
- if (props.type === 'radio' && name != null) {
- var queryRoot = rootNode;
-
- while (queryRoot.parentNode) {
- queryRoot = queryRoot.parentNode;
- } // If `rootNode.form` was non-null, then we could try `form.elements`,
- // but that sometimes behaves strangely in IE8. We could also try using
- // `form.getElementsByName`, but that will only return direct children
- // and won't include inputs that use the HTML5 `form=` attribute. Since
- // the input might not even be in a form. It might not even be in the
- // document. Let's just use the local `querySelectorAll` to ensure we don't
- // miss anything.
-
-
- var group = queryRoot.querySelectorAll('input[name=' + JSON.stringify('' + name) + '][type="radio"]');
-
- for (var i = 0; i < group.length; i++) {
- var otherNode = group[i];
-
- if (otherNode === rootNode || otherNode.form !== rootNode.form) {
- continue;
- } // This will throw if radio buttons rendered by different copies of React
- // and the same name are rendered into the same form (same as #1939).
- // That's probably okay; we don't support it just as we don't support
- // mixing React radio buttons with non-React ones.
-
-
- var otherProps = getFiberCurrentPropsFromNode(otherNode);
-
- if (!otherProps) {
- {
- throw Error( "ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported." );
- }
- } // We need update the tracked value on the named cousin since the value
- // was changed but the input saw no event or value set
-
-
- updateValueIfChanged(otherNode); // If this is a controlled radio button group, forcing the input that
- // was previously checked to update will cause it to be come re-checked
- // as appropriate.
-
- updateWrapper(otherNode, otherProps);
- }
- }
- } // In Chrome, assigning defaultValue to certain input types triggers input validation.
- // For number inputs, the display value loses trailing decimal points. For email inputs,
- // Chrome raises "The specified value <x> is not a valid email address".
- //
- // Here we check to see if the defaultValue has actually changed, avoiding these problems
- // when the user is inputting text
- //
- // https://github.com/facebook/react/issues/7253
-
-
- function setDefaultValue(node, type, value) {
- if ( // Focused number inputs synchronize on blur. See ChangeEventPlugin.js
- type !== 'number' || getActiveElement(node.ownerDocument) !== node) {
- if (value == null) {
- node.defaultValue = toString(node._wrapperState.initialValue);
- } else if (node.defaultValue !== toString(value)) {
- node.defaultValue = toString(value);
- }
- }
- }
-
- var didWarnSelectedSetOnOption = false;
- var didWarnInvalidChild = false;
-
- function flattenChildren(children) {
- var content = ''; // Flatten children. We'll warn if they are invalid
- // during validateProps() which runs for hydration too.
- // Note that this would throw on non-element objects.
- // Elements are stringified (which is normally irrelevant
- // but matters for <fbt>).
-
- React.Children.forEach(children, function (child) {
- if (child == null) {
- return;
- }
-
- content += child; // Note: we don't warn about invalid children here.
- // Instead, this is done separately below so that
- // it happens during the hydration code path too.
- });
- return content;
- }
- /**
- * Implements an <option> host component that warns when `selected` is set.
- */
-
-
- function validateProps(element, props) {
- {
- // This mirrors the code path above, but runs for hydration too.
- // Warn about invalid children here so that client and hydration are consistent.
- // TODO: this seems like it could cause a DEV-only throw for hydration
- // if children contains a non-element object. We should try to avoid that.
- if (typeof props.children === 'object' && props.children !== null) {
- React.Children.forEach(props.children, function (child) {
- if (child == null) {
- return;
- }
-
- if (typeof child === 'string' || typeof child === 'number') {
- return;
- }
-
- if (typeof child.type !== 'string') {
- return;
- }
-
- if (!didWarnInvalidChild) {
- didWarnInvalidChild = true;
-
- error('Only strings and numbers are supported as <option> children.');
- }
- });
- } // TODO: Remove support for `selected` in <option>.
-
-
- if (props.selected != null && !didWarnSelectedSetOnOption) {
- error('Use the `defaultValue` or `value` props on <select> instead of ' + 'setting `selected` on <option>.');
-
- didWarnSelectedSetOnOption = true;
- }
- }
- }
- function postMountWrapper$1(element, props) {
- // value="" should make a value attribute (#6219)
- if (props.value != null) {
- element.setAttribute('value', toString(getToStringValue(props.value)));
- }
- }
- function getHostProps$1(element, props) {
- var hostProps = _assign({
- children: undefined
- }, props);
-
- var content = flattenChildren(props.children);
-
- if (content) {
- hostProps.children = content;
- }
-
- return hostProps;
- }
-
- var didWarnValueDefaultValue$1;
-
- {
- didWarnValueDefaultValue$1 = false;
- }
-
- function getDeclarationErrorAddendum() {
- var ownerName = getCurrentFiberOwnerNameInDevOrNull();
-
- if (ownerName) {
- return '\n\nCheck the render method of `' + ownerName + '`.';
- }
-
- return '';
- }
-
- var valuePropNames = ['value', 'defaultValue'];
- /**
- * Validation function for `value` and `defaultValue`.
- */
-
- function checkSelectPropTypes(props) {
- {
- checkControlledValueProps('select', props);
-
- for (var i = 0; i < valuePropNames.length; i++) {
- var propName = valuePropNames[i];
-
- if (props[propName] == null) {
- continue;
- }
-
- var isArray = Array.isArray(props[propName]);
-
- if (props.multiple && !isArray) {
- error('The `%s` prop supplied to <select> must be an array if ' + '`multiple` is true.%s', propName, getDeclarationErrorAddendum());
- } else if (!props.multiple && isArray) {
- error('The `%s` prop supplied to <select> must be a scalar ' + 'value if `multiple` is false.%s', propName, getDeclarationErrorAddendum());
- }
- }
- }
- }
-
- function updateOptions(node, multiple, propValue, setDefaultSelected) {
- var options = node.options;
-
- if (multiple) {
- var selectedValues = propValue;
- var selectedValue = {};
-
- for (var i = 0; i < selectedValues.length; i++) {
- // Prefix to avoid chaos with special keys.
- selectedValue['$' + selectedValues[i]] = true;
- }
-
- for (var _i = 0; _i < options.length; _i++) {
- var selected = selectedValue.hasOwnProperty('$' + options[_i].value);
-
- if (options[_i].selected !== selected) {
- options[_i].selected = selected;
- }
-
- if (selected && setDefaultSelected) {
- options[_i].defaultSelected = true;
- }
- }
- } else {
- // Do not set `select.value` as exact behavior isn't consistent across all
- // browsers for all cases.
- var _selectedValue = toString(getToStringValue(propValue));
-
- var defaultSelected = null;
-
- for (var _i2 = 0; _i2 < options.length; _i2++) {
- if (options[_i2].value === _selectedValue) {
- options[_i2].selected = true;
-
- if (setDefaultSelected) {
- options[_i2].defaultSelected = true;
- }
-
- return;
- }
-
- if (defaultSelected === null && !options[_i2].disabled) {
- defaultSelected = options[_i2];
- }
- }
-
- if (defaultSelected !== null) {
- defaultSelected.selected = true;
- }
- }
- }
- /**
- * Implements a <select> host component that allows optionally setting the
- * props `value` and `defaultValue`. If `multiple` is false, the prop must be a
- * stringable. If `multiple` is true, the prop must be an array of stringables.
- *
- * If `value` is not supplied (or null/undefined), user actions that change the
- * selected option will trigger updates to the rendered options.
- *
- * If it is supplied (and not null/undefined), the rendered options will not
- * update in response to user actions. Instead, the `value` prop must change in
- * order for the rendered options to update.
- *
- * If `defaultValue` is provided, any options with the supplied values will be
- * selected.
- */
-
-
- function getHostProps$2(element, props) {
- return _assign({}, props, {
- value: undefined
- });
- }
- function initWrapperState$1(element, props) {
- var node = element;
-
- {
- checkSelectPropTypes(props);
- }
-
- node._wrapperState = {
- wasMultiple: !!props.multiple
- };
-
- {
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValueDefaultValue$1) {
- 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');
-
- didWarnValueDefaultValue$1 = true;
- }
- }
- }
- function postMountWrapper$2(element, props) {
- var node = element;
- node.multiple = !!props.multiple;
- var value = props.value;
-
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- } else if (props.defaultValue != null) {
- updateOptions(node, !!props.multiple, props.defaultValue, true);
- }
- }
- function postUpdateWrapper(element, props) {
- var node = element;
- var wasMultiple = node._wrapperState.wasMultiple;
- node._wrapperState.wasMultiple = !!props.multiple;
- var value = props.value;
-
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- } else if (wasMultiple !== !!props.multiple) {
- // For simplicity, reapply `defaultValue` if `multiple` is toggled.
- if (props.defaultValue != null) {
- updateOptions(node, !!props.multiple, props.defaultValue, true);
- } else {
- // Revert the select back to its default unselected state.
- updateOptions(node, !!props.multiple, props.multiple ? [] : '', false);
- }
- }
- }
- function restoreControlledState$1(element, props) {
- var node = element;
- var value = props.value;
-
- if (value != null) {
- updateOptions(node, !!props.multiple, value, false);
- }
- }
-
- var didWarnValDefaultVal = false;
-
- /**
- * Implements a <textarea> host component that allows setting `value`, and
- * `defaultValue`. This differs from the traditional DOM API because value is
- * usually set as PCDATA children.
- *
- * If `value` is not supplied (or null/undefined), user actions that affect the
- * value will trigger updates to the element.
- *
- * If `value` is supplied (and not null/undefined), the rendered element will
- * not trigger updates to the element. Instead, the `value` prop must change in
- * order for the rendered element to be updated.
- *
- * The rendered element will be initialized with an empty value, the prop
- * `defaultValue` if specified, or the children content (deprecated).
- */
- function getHostProps$3(element, props) {
- var node = element;
-
- if (!(props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( "`dangerouslySetInnerHTML` does not make sense on <textarea>." );
- }
- } // Always set children to the same thing. In IE9, the selection range will
- // get reset if `textContent` is mutated. We could add a check in setTextContent
- // to only set the value if/when the value differs from the node value (which would
- // completely solve this IE9 bug), but Sebastian+Sophie seemed to like this
- // solution. The value can be a boolean or object so that's why it's forced
- // to be a string.
-
-
- var hostProps = _assign({}, props, {
- value: undefined,
- defaultValue: undefined,
- children: toString(node._wrapperState.initialValue)
- });
-
- return hostProps;
- }
- function initWrapperState$2(element, props) {
- var node = element;
-
- {
- checkControlledValueProps('textarea', props);
-
- if (props.value !== undefined && props.defaultValue !== undefined && !didWarnValDefaultVal) {
- error('%s contains a textarea with both value and defaultValue props. ' + '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', getCurrentFiberOwnerNameInDevOrNull() || 'A component');
-
- didWarnValDefaultVal = true;
- }
- }
-
- var initialValue = props.value; // Only bother fetching default value if we're going to use it
-
- if (initialValue == null) {
- var children = props.children,
- defaultValue = props.defaultValue;
-
- if (children != null) {
- {
- error('Use the `defaultValue` or `value` props instead of setting ' + 'children on <textarea>.');
- }
-
- {
- if (!(defaultValue == null)) {
- {
- throw Error( "If you supply `defaultValue` on a <textarea>, do not pass children." );
- }
- }
-
- if (Array.isArray(children)) {
- if (!(children.length <= 1)) {
- {
- throw Error( "<textarea> can only have at most one child." );
- }
- }
-
- children = children[0];
- }
-
- defaultValue = children;
- }
- }
-
- if (defaultValue == null) {
- defaultValue = '';
- }
-
- initialValue = defaultValue;
- }
-
- node._wrapperState = {
- initialValue: getToStringValue(initialValue)
- };
- }
- function updateWrapper$1(element, props) {
- var node = element;
- var value = getToStringValue(props.value);
- var defaultValue = getToStringValue(props.defaultValue);
-
- if (value != null) {
- // Cast `value` to a string to ensure the value is set correctly. While
- // browsers typically do this as necessary, jsdom doesn't.
- var newValue = toString(value); // To avoid side effects (such as losing text selection), only set value if changed
-
- if (newValue !== node.value) {
- node.value = newValue;
- }
-
- if (props.defaultValue == null && node.defaultValue !== newValue) {
- node.defaultValue = newValue;
- }
- }
-
- if (defaultValue != null) {
- node.defaultValue = toString(defaultValue);
- }
- }
- function postMountWrapper$3(element, props) {
- var node = element; // This is in postMount because we need access to the DOM node, which is not
- // available until after the component has mounted.
-
- var textContent = node.textContent; // Only set node.value if textContent is equal to the expected
- // initial value. In IE10/IE11 there is a bug where the placeholder attribute
- // will populate textContent as well.
- // https://developer.microsoft.com/microsoft-edge/platform/issues/101525/
-
- if (textContent === node._wrapperState.initialValue) {
- if (textContent !== '' && textContent !== null) {
- node.value = textContent;
- }
- }
- }
- function restoreControlledState$2(element, props) {
- // DOM component is still mounted; update
- updateWrapper$1(element, props);
- }
-
- var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';
- var MATH_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';
- var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
- var Namespaces = {
- html: HTML_NAMESPACE,
- mathml: MATH_NAMESPACE,
- svg: SVG_NAMESPACE
- }; // Assumes there is no parent namespace.
-
- function getIntrinsicNamespace(type) {
- switch (type) {
- case 'svg':
- return SVG_NAMESPACE;
-
- case 'math':
- return MATH_NAMESPACE;
-
- default:
- return HTML_NAMESPACE;
- }
- }
- function getChildNamespace(parentNamespace, type) {
- if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
- // No (or default) parent namespace: potential entry point.
- return getIntrinsicNamespace(type);
- }
-
- if (parentNamespace === SVG_NAMESPACE && type === 'foreignObject') {
- // We're leaving SVG.
- return HTML_NAMESPACE;
- } // By default, pass namespace below.
-
-
- return parentNamespace;
- }
-
- /* globals MSApp */
-
- /**
- * Create a function which has 'unsafe' privileges (required by windows8 apps)
- */
- var createMicrosoftUnsafeLocalFunction = function (func) {
- if (typeof MSApp !== 'undefined' && MSApp.execUnsafeLocalFunction) {
- return function (arg0, arg1, arg2, arg3) {
- MSApp.execUnsafeLocalFunction(function () {
- return func(arg0, arg1, arg2, arg3);
- });
- };
- } else {
- return func;
- }
- };
-
- var reusableSVGContainer;
- /**
- * Set the innerHTML property of a node
- *
- * @param {DOMElement} node
- * @param {string} html
- * @internal
- */
-
- var setInnerHTML = createMicrosoftUnsafeLocalFunction(function (node, html) {
- if (node.namespaceURI === Namespaces.svg) {
-
- if (!('innerHTML' in node)) {
- // IE does not have innerHTML for SVG nodes, so instead we inject the
- // new markup in a temp node and then move the child nodes across into
- // the target node
- reusableSVGContainer = reusableSVGContainer || document.createElement('div');
- reusableSVGContainer.innerHTML = '<svg>' + html.valueOf().toString() + '</svg>';
- var svgNode = reusableSVGContainer.firstChild;
-
- while (node.firstChild) {
- node.removeChild(node.firstChild);
- }
-
- while (svgNode.firstChild) {
- node.appendChild(svgNode.firstChild);
- }
-
- return;
- }
- }
-
- node.innerHTML = html;
- });
-
- /**
- * HTML nodeType values that represent the type of the node
- */
- var ELEMENT_NODE = 1;
- var TEXT_NODE = 3;
- var COMMENT_NODE = 8;
- var DOCUMENT_NODE = 9;
- var DOCUMENT_FRAGMENT_NODE = 11;
-
- /**
- * Set the textContent property of a node. For text updates, it's faster
- * to set the `nodeValue` of the Text node directly instead of using
- * `.textContent` which will remove the existing node and create a new one.
- *
- * @param {DOMElement} node
- * @param {string} text
- * @internal
- */
-
- var setTextContent = function (node, text) {
- if (text) {
- var firstChild = node.firstChild;
-
- if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
- firstChild.nodeValue = text;
- return;
- }
- }
-
- node.textContent = text;
- };
-
- // List derived from Gecko source code:
- // https://github.com/mozilla/gecko-dev/blob/4e638efc71/layout/style/test/property_database.js
- var shorthandToLonghand = {
- animation: ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimingFunction'],
- background: ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize'],
- backgroundPosition: ['backgroundPositionX', 'backgroundPositionY'],
- border: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTopColor', 'borderTopStyle', 'borderTopWidth'],
- borderBlockEnd: ['borderBlockEndColor', 'borderBlockEndStyle', 'borderBlockEndWidth'],
- borderBlockStart: ['borderBlockStartColor', 'borderBlockStartStyle', 'borderBlockStartWidth'],
- borderBottom: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth'],
- borderColor: ['borderBottomColor', 'borderLeftColor', 'borderRightColor', 'borderTopColor'],
- borderImage: ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth'],
- borderInlineEnd: ['borderInlineEndColor', 'borderInlineEndStyle', 'borderInlineEndWidth'],
- borderInlineStart: ['borderInlineStartColor', 'borderInlineStartStyle', 'borderInlineStartWidth'],
- borderLeft: ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth'],
- borderRadius: ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius'],
- borderRight: ['borderRightColor', 'borderRightStyle', 'borderRightWidth'],
- borderStyle: ['borderBottomStyle', 'borderLeftStyle', 'borderRightStyle', 'borderTopStyle'],
- borderTop: ['borderTopColor', 'borderTopStyle', 'borderTopWidth'],
- borderWidth: ['borderBottomWidth', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth'],
- columnRule: ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth'],
- columns: ['columnCount', 'columnWidth'],
- flex: ['flexBasis', 'flexGrow', 'flexShrink'],
- flexFlow: ['flexDirection', 'flexWrap'],
- font: ['fontFamily', 'fontFeatureSettings', 'fontKerning', 'fontLanguageOverride', 'fontSize', 'fontSizeAdjust', 'fontStretch', 'fontStyle', 'fontVariant', 'fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition', 'fontWeight', 'lineHeight'],
- fontVariant: ['fontVariantAlternates', 'fontVariantCaps', 'fontVariantEastAsian', 'fontVariantLigatures', 'fontVariantNumeric', 'fontVariantPosition'],
- gap: ['columnGap', 'rowGap'],
- grid: ['gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
- gridArea: ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart'],
- gridColumn: ['gridColumnEnd', 'gridColumnStart'],
- gridColumnGap: ['columnGap'],
- gridGap: ['columnGap', 'rowGap'],
- gridRow: ['gridRowEnd', 'gridRowStart'],
- gridRowGap: ['rowGap'],
- gridTemplate: ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows'],
- listStyle: ['listStyleImage', 'listStylePosition', 'listStyleType'],
- margin: ['marginBottom', 'marginLeft', 'marginRight', 'marginTop'],
- marker: ['markerEnd', 'markerMid', 'markerStart'],
- mask: ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPositionX', 'maskPositionY', 'maskRepeat', 'maskSize'],
- maskPosition: ['maskPositionX', 'maskPositionY'],
- outline: ['outlineColor', 'outlineStyle', 'outlineWidth'],
- overflow: ['overflowX', 'overflowY'],
- padding: ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop'],
- placeContent: ['alignContent', 'justifyContent'],
- placeItems: ['alignItems', 'justifyItems'],
- placeSelf: ['alignSelf', 'justifySelf'],
- textDecoration: ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle'],
- textEmphasis: ['textEmphasisColor', 'textEmphasisStyle'],
- transition: ['transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction'],
- wordWrap: ['overflowWrap']
- };
-
- /**
- * CSS properties which accept numbers but are not in units of "px".
- */
- var isUnitlessNumber = {
- animationIterationCount: true,
- borderImageOutset: true,
- borderImageSlice: true,
- borderImageWidth: true,
- boxFlex: true,
- boxFlexGroup: true,
- boxOrdinalGroup: true,
- columnCount: true,
- columns: true,
- flex: true,
- flexGrow: true,
- flexPositive: true,
- flexShrink: true,
- flexNegative: true,
- flexOrder: true,
- gridArea: true,
- gridRow: true,
- gridRowEnd: true,
- gridRowSpan: true,
- gridRowStart: true,
- gridColumn: true,
- gridColumnEnd: true,
- gridColumnSpan: true,
- gridColumnStart: true,
- fontWeight: true,
- lineClamp: true,
- lineHeight: true,
- opacity: true,
- order: true,
- orphans: true,
- tabSize: true,
- widows: true,
- zIndex: true,
- zoom: true,
- // SVG-related properties
- fillOpacity: true,
- floodOpacity: true,
- stopOpacity: true,
- strokeDasharray: true,
- strokeDashoffset: true,
- strokeMiterlimit: true,
- strokeOpacity: true,
- strokeWidth: true
- };
- /**
- * @param {string} prefix vendor-specific prefix, eg: Webkit
- * @param {string} key style name, eg: transitionDuration
- * @return {string} style name prefixed with `prefix`, properly camelCased, eg:
- * WebkitTransitionDuration
- */
-
- function prefixKey(prefix, key) {
- return prefix + key.charAt(0).toUpperCase() + key.substring(1);
- }
- /**
- * Support style names that may come passed in prefixed by adding permutations
- * of vendor prefixes.
- */
-
-
- var prefixes = ['Webkit', 'ms', 'Moz', 'O']; // Using Object.keys here, or else the vanilla for-in loop makes IE8 go into an
- // infinite loop, because it iterates over the newly added props too.
-
- Object.keys(isUnitlessNumber).forEach(function (prop) {
- prefixes.forEach(function (prefix) {
- isUnitlessNumber[prefixKey(prefix, prop)] = isUnitlessNumber[prop];
- });
- });
-
- /**
- * Convert a value into the proper css writable value. The style name `name`
- * should be logical (no hyphens), as specified
- * in `CSSProperty.isUnitlessNumber`.
- *
- * @param {string} name CSS property name such as `topMargin`.
- * @param {*} value CSS property value such as `10px`.
- * @return {string} Normalized style value with dimensions applied.
- */
-
- function dangerousStyleValue(name, value, isCustomProperty) {
- // Note that we've removed escapeTextForBrowser() calls here since the
- // whole string will be escaped when the attribute is injected into
- // the markup. If you provide unsafe user data here they can inject
- // arbitrary CSS which may be problematic (I couldn't repro this):
- // https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet
- // http://www.thespanner.co.uk/2007/11/26/ultimate-xss-css-injection/
- // This is not an XSS hole but instead a potential CSS injection issue
- // which has lead to a greater discussion about how we're going to
- // trust URLs moving forward. See #2115901
- var isEmpty = value == null || typeof value === 'boolean' || value === '';
-
- if (isEmpty) {
- return '';
- }
-
- if (!isCustomProperty && typeof value === 'number' && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
- return value + 'px'; // Presumes implicit 'px' suffix for unitless numbers
- }
-
- return ('' + value).trim();
- }
-
- var uppercasePattern = /([A-Z])/g;
- var msPattern = /^ms-/;
- /**
- * Hyphenates a camelcased CSS property name, for example:
- *
- * > hyphenateStyleName('backgroundColor')
- * < "background-color"
- * > hyphenateStyleName('MozTransition')
- * < "-moz-transition"
- * > hyphenateStyleName('msTransition')
- * < "-ms-transition"
- *
- * As Modernizr suggests (http://modernizr.com/docs/#prefixed), an `ms` prefix
- * is converted to `-ms-`.
- */
-
- function hyphenateStyleName(name) {
- return name.replace(uppercasePattern, '-$1').toLowerCase().replace(msPattern, '-ms-');
- }
-
- var warnValidStyle = function () {};
-
- {
- // 'msTransform' is correct, but the other prefixes should be capitalized
- var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
- var msPattern$1 = /^-ms-/;
- var hyphenPattern = /-(.)/g; // style values shouldn't contain a semicolon
-
- var badStyleValueWithSemicolonPattern = /;\s*$/;
- var warnedStyleNames = {};
- var warnedStyleValues = {};
- var warnedForNaNValue = false;
- var warnedForInfinityValue = false;
-
- var camelize = function (string) {
- return string.replace(hyphenPattern, function (_, character) {
- return character.toUpperCase();
- });
- };
-
- var warnHyphenatedStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported style property %s. Did you mean %s?', name, // As Andi Smith suggests
- // (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
- // is converted to lowercase `ms`.
- camelize(name.replace(msPattern$1, 'ms-')));
- };
-
- var warnBadVendoredStyleName = function (name) {
- if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
- return;
- }
-
- warnedStyleNames[name] = true;
-
- error('Unsupported vendor-prefixed style property %s. Did you mean %s?', name, name.charAt(0).toUpperCase() + name.slice(1));
- };
-
- var warnStyleValueWithSemicolon = function (name, value) {
- if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
- return;
- }
-
- warnedStyleValues[value] = true;
-
- error("Style property values shouldn't contain a semicolon. " + 'Try "%s: %s" instead.', name, value.replace(badStyleValueWithSemicolonPattern, ''));
- };
-
- var warnStyleValueIsNaN = function (name, value) {
- if (warnedForNaNValue) {
- return;
- }
-
- warnedForNaNValue = true;
-
- error('`NaN` is an invalid value for the `%s` css style property.', name);
- };
-
- var warnStyleValueIsInfinity = function (name, value) {
- if (warnedForInfinityValue) {
- return;
- }
-
- warnedForInfinityValue = true;
-
- error('`Infinity` is an invalid value for the `%s` css style property.', name);
- };
-
- warnValidStyle = function (name, value) {
- if (name.indexOf('-') > -1) {
- warnHyphenatedStyleName(name);
- } else if (badVendoredStyleNamePattern.test(name)) {
- warnBadVendoredStyleName(name);
- } else if (badStyleValueWithSemicolonPattern.test(value)) {
- warnStyleValueWithSemicolon(name, value);
- }
-
- if (typeof value === 'number') {
- if (isNaN(value)) {
- warnStyleValueIsNaN(name, value);
- } else if (!isFinite(value)) {
- warnStyleValueIsInfinity(name, value);
- }
- }
- };
- }
-
- var warnValidStyle$1 = warnValidStyle;
-
- /**
- * Operations for dealing with CSS properties.
- */
-
- /**
- * This creates a string that is expected to be equivalent to the style
- * attribute generated by server-side rendering. It by-passes warnings and
- * security checks so it's not safe to use this value for anything other than
- * comparison. It is only used in DEV for SSR validation.
- */
-
- function createDangerousStringForStyles(styles) {
- {
- var serialized = '';
- var delimiter = '';
-
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
-
- var styleValue = styles[styleName];
-
- if (styleValue != null) {
- var isCustomProperty = styleName.indexOf('--') === 0;
- serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ':';
- serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
- delimiter = ';';
- }
- }
-
- return serialized || null;
- }
- }
- /**
- * Sets the value for multiple styles on a node. If a value is specified as
- * '' (empty string), the corresponding style property will be unset.
- *
- * @param {DOMElement} node
- * @param {object} styles
- */
-
- function setValueForStyles(node, styles) {
- var style = node.style;
-
- for (var styleName in styles) {
- if (!styles.hasOwnProperty(styleName)) {
- continue;
- }
-
- var isCustomProperty = styleName.indexOf('--') === 0;
-
- {
- if (!isCustomProperty) {
- warnValidStyle$1(styleName, styles[styleName]);
- }
- }
-
- var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
-
- if (styleName === 'float') {
- styleName = 'cssFloat';
- }
-
- if (isCustomProperty) {
- style.setProperty(styleName, styleValue);
- } else {
- style[styleName] = styleValue;
- }
- }
- }
-
- function isValueEmpty(value) {
- return value == null || typeof value === 'boolean' || value === '';
- }
- /**
- * Given {color: 'red', overflow: 'hidden'} returns {
- * color: 'color',
- * overflowX: 'overflow',
- * overflowY: 'overflow',
- * }. This can be read as "the overflowY property was set by the overflow
- * shorthand". That is, the values are the property that each was derived from.
- */
-
-
- function expandShorthandMap(styles) {
- var expanded = {};
-
- for (var key in styles) {
- var longhands = shorthandToLonghand[key] || [key];
-
- for (var i = 0; i < longhands.length; i++) {
- expanded[longhands[i]] = key;
- }
- }
-
- return expanded;
- }
- /**
- * When mixing shorthand and longhand property names, we warn during updates if
- * we expect an incorrect result to occur. In particular, we warn for:
- *
- * Updating a shorthand property (longhand gets overwritten):
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'baz', fontVariant: 'bar'}
- * becomes .style.font = 'baz'
- * Removing a shorthand property (longhand gets lost too):
- * {font: 'foo', fontVariant: 'bar'} -> {fontVariant: 'bar'}
- * becomes .style.font = ''
- * Removing a longhand property (should revert to shorthand; doesn't):
- * {font: 'foo', fontVariant: 'bar'} -> {font: 'foo'}
- * becomes .style.fontVariant = ''
- */
-
-
- function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
- {
- if (!nextStyles) {
- return;
- }
-
- var expandedUpdates = expandShorthandMap(styleUpdates);
- var expandedStyles = expandShorthandMap(nextStyles);
- var warnedAbout = {};
-
- for (var key in expandedUpdates) {
- var originalKey = expandedUpdates[key];
- var correctOriginalKey = expandedStyles[key];
-
- if (correctOriginalKey && originalKey !== correctOriginalKey) {
- var warningKey = originalKey + ',' + correctOriginalKey;
-
- if (warnedAbout[warningKey]) {
- continue;
- }
-
- warnedAbout[warningKey] = true;
-
- error('%s a style property during rerender (%s) when a ' + 'conflicting property is set (%s) can lead to styling bugs. To ' + "avoid this, don't mix shorthand and non-shorthand properties " + 'for the same value; instead, replace the shorthand with ' + 'separate values.', isValueEmpty(styleUpdates[originalKey]) ? 'Removing' : 'Updating', originalKey, correctOriginalKey);
- }
- }
- }
- }
-
- // For HTML, certain tags should omit their close tag. We keep a list for
- // those special-case tags.
- var omittedCloseTags = {
- area: true,
- base: true,
- br: true,
- col: true,
- embed: true,
- hr: true,
- img: true,
- input: true,
- keygen: true,
- link: true,
- meta: true,
- param: true,
- source: true,
- track: true,
- wbr: true // NOTE: menuitem's close tag should be omitted, but that causes problems.
-
- };
-
- // `omittedCloseTags` except that `menuitem` should still have its closing tag.
-
- var voidElementTags = _assign({
- menuitem: true
- }, omittedCloseTags);
-
- var HTML = '__html';
-
- function assertValidProps(tag, props) {
- if (!props) {
- return;
- } // Note the use of `==` which checks for null or undefined.
-
-
- if (voidElementTags[tag]) {
- if (!(props.children == null && props.dangerouslySetInnerHTML == null)) {
- {
- throw Error( tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`." );
- }
- }
- }
-
- if (props.dangerouslySetInnerHTML != null) {
- if (!(props.children == null)) {
- {
- throw Error( "Can only set one of `children` or `props.dangerouslySetInnerHTML`." );
- }
- }
-
- if (!(typeof props.dangerouslySetInnerHTML === 'object' && HTML in props.dangerouslySetInnerHTML)) {
- {
- throw Error( "`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information." );
- }
- }
- }
-
- {
- if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
- 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.');
- }
- }
-
- if (!(props.style == null || typeof props.style === 'object')) {
- {
- throw Error( "The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX." );
- }
- }
- }
-
- function isCustomComponent(tagName, props) {
- if (tagName.indexOf('-') === -1) {
- return typeof props.is === 'string';
- }
-
- switch (tagName) {
- // These are reserved SVG and MathML elements.
- // We don't mind this list too much because we expect it to never grow.
- // The alternative is to track the namespace in a few places which is convoluted.
- // https://w3c.github.io/webcomponents/spec/custom/#custom-elements-core-concepts
- case 'annotation-xml':
- case 'color-profile':
- case 'font-face':
- case 'font-face-src':
- case 'font-face-uri':
- case 'font-face-format':
- case 'font-face-name':
- case 'missing-glyph':
- return false;
-
- default:
- return true;
- }
- }
-
- // When adding attributes to the HTML or SVG allowed attribute list, be sure to
- // also add them to this module to ensure casing and incorrect name
- // warnings.
- var possibleStandardNames = {
- // HTML
- accept: 'accept',
- acceptcharset: 'acceptCharset',
- 'accept-charset': 'acceptCharset',
- accesskey: 'accessKey',
- action: 'action',
- allowfullscreen: 'allowFullScreen',
- alt: 'alt',
- as: 'as',
- async: 'async',
- autocapitalize: 'autoCapitalize',
- autocomplete: 'autoComplete',
- autocorrect: 'autoCorrect',
- autofocus: 'autoFocus',
- autoplay: 'autoPlay',
- autosave: 'autoSave',
- capture: 'capture',
- cellpadding: 'cellPadding',
- cellspacing: 'cellSpacing',
- challenge: 'challenge',
- charset: 'charSet',
- checked: 'checked',
- children: 'children',
- cite: 'cite',
- class: 'className',
- classid: 'classID',
- classname: 'className',
- cols: 'cols',
- colspan: 'colSpan',
- content: 'content',
- contenteditable: 'contentEditable',
- contextmenu: 'contextMenu',
- controls: 'controls',
- controlslist: 'controlsList',
- coords: 'coords',
- crossorigin: 'crossOrigin',
- dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',
- data: 'data',
- datetime: 'dateTime',
- default: 'default',
- defaultchecked: 'defaultChecked',
- defaultvalue: 'defaultValue',
- defer: 'defer',
- dir: 'dir',
- disabled: 'disabled',
- disablepictureinpicture: 'disablePictureInPicture',
- disableremoteplayback: 'disableRemotePlayback',
- download: 'download',
- draggable: 'draggable',
- enctype: 'encType',
- enterkeyhint: 'enterKeyHint',
- for: 'htmlFor',
- form: 'form',
- formmethod: 'formMethod',
- formaction: 'formAction',
- formenctype: 'formEncType',
- formnovalidate: 'formNoValidate',
- formtarget: 'formTarget',
- frameborder: 'frameBorder',
- headers: 'headers',
- height: 'height',
- hidden: 'hidden',
- high: 'high',
- href: 'href',
- hreflang: 'hrefLang',
- htmlfor: 'htmlFor',
- httpequiv: 'httpEquiv',
- 'http-equiv': 'httpEquiv',
- icon: 'icon',
- id: 'id',
- innerhtml: 'innerHTML',
- inputmode: 'inputMode',
- integrity: 'integrity',
- is: 'is',
- itemid: 'itemID',
- itemprop: 'itemProp',
- itemref: 'itemRef',
- itemscope: 'itemScope',
- itemtype: 'itemType',
- keyparams: 'keyParams',
- keytype: 'keyType',
- kind: 'kind',
- label: 'label',
- lang: 'lang',
- list: 'list',
- loop: 'loop',
- low: 'low',
- manifest: 'manifest',
- marginwidth: 'marginWidth',
- marginheight: 'marginHeight',
- max: 'max',
- maxlength: 'maxLength',
- media: 'media',
- mediagroup: 'mediaGroup',
- method: 'method',
- min: 'min',
- minlength: 'minLength',
- multiple: 'multiple',
- muted: 'muted',
- name: 'name',
- nomodule: 'noModule',
- nonce: 'nonce',
- novalidate: 'noValidate',
- open: 'open',
- optimum: 'optimum',
- pattern: 'pattern',
- placeholder: 'placeholder',
- playsinline: 'playsInline',
- poster: 'poster',
- preload: 'preload',
- profile: 'profile',
- radiogroup: 'radioGroup',
- readonly: 'readOnly',
- referrerpolicy: 'referrerPolicy',
- rel: 'rel',
- required: 'required',
- reversed: 'reversed',
- role: 'role',
- rows: 'rows',
- rowspan: 'rowSpan',
- sandbox: 'sandbox',
- scope: 'scope',
- scoped: 'scoped',
- scrolling: 'scrolling',
- seamless: 'seamless',
- selected: 'selected',
- shape: 'shape',
- size: 'size',
- sizes: 'sizes',
- span: 'span',
- spellcheck: 'spellCheck',
- src: 'src',
- srcdoc: 'srcDoc',
- srclang: 'srcLang',
- srcset: 'srcSet',
- start: 'start',
- step: 'step',
- style: 'style',
- summary: 'summary',
- tabindex: 'tabIndex',
- target: 'target',
- title: 'title',
- type: 'type',
- usemap: 'useMap',
- value: 'value',
- width: 'width',
- wmode: 'wmode',
- wrap: 'wrap',
- // SVG
- about: 'about',
- accentheight: 'accentHeight',
- 'accent-height': 'accentHeight',
- accumulate: 'accumulate',
- additive: 'additive',
- alignmentbaseline: 'alignmentBaseline',
- 'alignment-baseline': 'alignmentBaseline',
- allowreorder: 'allowReorder',
- alphabetic: 'alphabetic',
- amplitude: 'amplitude',
- arabicform: 'arabicForm',
- 'arabic-form': 'arabicForm',
- ascent: 'ascent',
- attributename: 'attributeName',
- attributetype: 'attributeType',
- autoreverse: 'autoReverse',
- azimuth: 'azimuth',
- basefrequency: 'baseFrequency',
- baselineshift: 'baselineShift',
- 'baseline-shift': 'baselineShift',
- baseprofile: 'baseProfile',
- bbox: 'bbox',
- begin: 'begin',
- bias: 'bias',
- by: 'by',
- calcmode: 'calcMode',
- capheight: 'capHeight',
- 'cap-height': 'capHeight',
- clip: 'clip',
- clippath: 'clipPath',
- 'clip-path': 'clipPath',
- clippathunits: 'clipPathUnits',
- cliprule: 'clipRule',
- 'clip-rule': 'clipRule',
- color: 'color',
- colorinterpolation: 'colorInterpolation',
- 'color-interpolation': 'colorInterpolation',
- colorinterpolationfilters: 'colorInterpolationFilters',
- 'color-interpolation-filters': 'colorInterpolationFilters',
- colorprofile: 'colorProfile',
- 'color-profile': 'colorProfile',
- colorrendering: 'colorRendering',
- 'color-rendering': 'colorRendering',
- contentscripttype: 'contentScriptType',
- contentstyletype: 'contentStyleType',
- cursor: 'cursor',
- cx: 'cx',
- cy: 'cy',
- d: 'd',
- datatype: 'datatype',
- decelerate: 'decelerate',
- descent: 'descent',
- diffuseconstant: 'diffuseConstant',
- direction: 'direction',
- display: 'display',
- divisor: 'divisor',
- dominantbaseline: 'dominantBaseline',
- 'dominant-baseline': 'dominantBaseline',
- dur: 'dur',
- dx: 'dx',
- dy: 'dy',
- edgemode: 'edgeMode',
- elevation: 'elevation',
- enablebackground: 'enableBackground',
- 'enable-background': 'enableBackground',
- end: 'end',
- exponent: 'exponent',
- externalresourcesrequired: 'externalResourcesRequired',
- fill: 'fill',
- fillopacity: 'fillOpacity',
- 'fill-opacity': 'fillOpacity',
- fillrule: 'fillRule',
- 'fill-rule': 'fillRule',
- filter: 'filter',
- filterres: 'filterRes',
- filterunits: 'filterUnits',
- floodopacity: 'floodOpacity',
- 'flood-opacity': 'floodOpacity',
- floodcolor: 'floodColor',
- 'flood-color': 'floodColor',
- focusable: 'focusable',
- fontfamily: 'fontFamily',
- 'font-family': 'fontFamily',
- fontsize: 'fontSize',
- 'font-size': 'fontSize',
- fontsizeadjust: 'fontSizeAdjust',
- 'font-size-adjust': 'fontSizeAdjust',
- fontstretch: 'fontStretch',
- 'font-stretch': 'fontStretch',
- fontstyle: 'fontStyle',
- 'font-style': 'fontStyle',
- fontvariant: 'fontVariant',
- 'font-variant': 'fontVariant',
- fontweight: 'fontWeight',
- 'font-weight': 'fontWeight',
- format: 'format',
- from: 'from',
- fx: 'fx',
- fy: 'fy',
- g1: 'g1',
- g2: 'g2',
- glyphname: 'glyphName',
- 'glyph-name': 'glyphName',
- glyphorientationhorizontal: 'glyphOrientationHorizontal',
- 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',
- glyphorientationvertical: 'glyphOrientationVertical',
- 'glyph-orientation-vertical': 'glyphOrientationVertical',
- glyphref: 'glyphRef',
- gradienttransform: 'gradientTransform',
- gradientunits: 'gradientUnits',
- hanging: 'hanging',
- horizadvx: 'horizAdvX',
- 'horiz-adv-x': 'horizAdvX',
- horizoriginx: 'horizOriginX',
- 'horiz-origin-x': 'horizOriginX',
- ideographic: 'ideographic',
- imagerendering: 'imageRendering',
- 'image-rendering': 'imageRendering',
- in2: 'in2',
- in: 'in',
- inlist: 'inlist',
- intercept: 'intercept',
- k1: 'k1',
- k2: 'k2',
- k3: 'k3',
- k4: 'k4',
- k: 'k',
- kernelmatrix: 'kernelMatrix',
- kernelunitlength: 'kernelUnitLength',
- kerning: 'kerning',
- keypoints: 'keyPoints',
- keysplines: 'keySplines',
- keytimes: 'keyTimes',
- lengthadjust: 'lengthAdjust',
- letterspacing: 'letterSpacing',
- 'letter-spacing': 'letterSpacing',
- lightingcolor: 'lightingColor',
- 'lighting-color': 'lightingColor',
- limitingconeangle: 'limitingConeAngle',
- local: 'local',
- markerend: 'markerEnd',
- 'marker-end': 'markerEnd',
- markerheight: 'markerHeight',
- markermid: 'markerMid',
- 'marker-mid': 'markerMid',
- markerstart: 'markerStart',
- 'marker-start': 'markerStart',
- markerunits: 'markerUnits',
- markerwidth: 'markerWidth',
- mask: 'mask',
- maskcontentunits: 'maskContentUnits',
- maskunits: 'maskUnits',
- mathematical: 'mathematical',
- mode: 'mode',
- numoctaves: 'numOctaves',
- offset: 'offset',
- opacity: 'opacity',
- operator: 'operator',
- order: 'order',
- orient: 'orient',
- orientation: 'orientation',
- origin: 'origin',
- overflow: 'overflow',
- overlineposition: 'overlinePosition',
- 'overline-position': 'overlinePosition',
- overlinethickness: 'overlineThickness',
- 'overline-thickness': 'overlineThickness',
- paintorder: 'paintOrder',
- 'paint-order': 'paintOrder',
- panose1: 'panose1',
- 'panose-1': 'panose1',
- pathlength: 'pathLength',
- patterncontentunits: 'patternContentUnits',
- patterntransform: 'patternTransform',
- patternunits: 'patternUnits',
- pointerevents: 'pointerEvents',
- 'pointer-events': 'pointerEvents',
- points: 'points',
- pointsatx: 'pointsAtX',
- pointsaty: 'pointsAtY',
- pointsatz: 'pointsAtZ',
- prefix: 'prefix',
- preservealpha: 'preserveAlpha',
- preserveaspectratio: 'preserveAspectRatio',
- primitiveunits: 'primitiveUnits',
- property: 'property',
- r: 'r',
- radius: 'radius',
- refx: 'refX',
- refy: 'refY',
- renderingintent: 'renderingIntent',
- 'rendering-intent': 'renderingIntent',
- repeatcount: 'repeatCount',
- repeatdur: 'repeatDur',
- requiredextensions: 'requiredExtensions',
- requiredfeatures: 'requiredFeatures',
- resource: 'resource',
- restart: 'restart',
- result: 'result',
- results: 'results',
- rotate: 'rotate',
- rx: 'rx',
- ry: 'ry',
- scale: 'scale',
- security: 'security',
- seed: 'seed',
- shaperendering: 'shapeRendering',
- 'shape-rendering': 'shapeRendering',
- slope: 'slope',
- spacing: 'spacing',
- specularconstant: 'specularConstant',
- specularexponent: 'specularExponent',
- speed: 'speed',
- spreadmethod: 'spreadMethod',
- startoffset: 'startOffset',
- stddeviation: 'stdDeviation',
- stemh: 'stemh',
- stemv: 'stemv',
- stitchtiles: 'stitchTiles',
- stopcolor: 'stopColor',
- 'stop-color': 'stopColor',
- stopopacity: 'stopOpacity',
- 'stop-opacity': 'stopOpacity',
- strikethroughposition: 'strikethroughPosition',
- 'strikethrough-position': 'strikethroughPosition',
- strikethroughthickness: 'strikethroughThickness',
- 'strikethrough-thickness': 'strikethroughThickness',
- string: 'string',
- stroke: 'stroke',
- strokedasharray: 'strokeDasharray',
- 'stroke-dasharray': 'strokeDasharray',
- strokedashoffset: 'strokeDashoffset',
- 'stroke-dashoffset': 'strokeDashoffset',
- strokelinecap: 'strokeLinecap',
- 'stroke-linecap': 'strokeLinecap',
- strokelinejoin: 'strokeLinejoin',
- 'stroke-linejoin': 'strokeLinejoin',
- strokemiterlimit: 'strokeMiterlimit',
- 'stroke-miterlimit': 'strokeMiterlimit',
- strokewidth: 'strokeWidth',
- 'stroke-width': 'strokeWidth',
- strokeopacity: 'strokeOpacity',
- 'stroke-opacity': 'strokeOpacity',
- suppresscontenteditablewarning: 'suppressContentEditableWarning',
- suppresshydrationwarning: 'suppressHydrationWarning',
- surfacescale: 'surfaceScale',
- systemlanguage: 'systemLanguage',
- tablevalues: 'tableValues',
- targetx: 'targetX',
- targety: 'targetY',
- textanchor: 'textAnchor',
- 'text-anchor': 'textAnchor',
- textdecoration: 'textDecoration',
- 'text-decoration': 'textDecoration',
- textlength: 'textLength',
- textrendering: 'textRendering',
- 'text-rendering': 'textRendering',
- to: 'to',
- transform: 'transform',
- typeof: 'typeof',
- u1: 'u1',
- u2: 'u2',
- underlineposition: 'underlinePosition',
- 'underline-position': 'underlinePosition',
- underlinethickness: 'underlineThickness',
- 'underline-thickness': 'underlineThickness',
- unicode: 'unicode',
- unicodebidi: 'unicodeBidi',
- 'unicode-bidi': 'unicodeBidi',
- unicoderange: 'unicodeRange',
- 'unicode-range': 'unicodeRange',
- unitsperem: 'unitsPerEm',
- 'units-per-em': 'unitsPerEm',
- unselectable: 'unselectable',
- valphabetic: 'vAlphabetic',
- 'v-alphabetic': 'vAlphabetic',
- values: 'values',
- vectoreffect: 'vectorEffect',
- 'vector-effect': 'vectorEffect',
- version: 'version',
- vertadvy: 'vertAdvY',
- 'vert-adv-y': 'vertAdvY',
- vertoriginx: 'vertOriginX',
- 'vert-origin-x': 'vertOriginX',
- vertoriginy: 'vertOriginY',
- 'vert-origin-y': 'vertOriginY',
- vhanging: 'vHanging',
- 'v-hanging': 'vHanging',
- videographic: 'vIdeographic',
- 'v-ideographic': 'vIdeographic',
- viewbox: 'viewBox',
- viewtarget: 'viewTarget',
- visibility: 'visibility',
- vmathematical: 'vMathematical',
- 'v-mathematical': 'vMathematical',
- vocab: 'vocab',
- widths: 'widths',
- wordspacing: 'wordSpacing',
- 'word-spacing': 'wordSpacing',
- writingmode: 'writingMode',
- 'writing-mode': 'writingMode',
- x1: 'x1',
- x2: 'x2',
- x: 'x',
- xchannelselector: 'xChannelSelector',
- xheight: 'xHeight',
- 'x-height': 'xHeight',
- xlinkactuate: 'xlinkActuate',
- 'xlink:actuate': 'xlinkActuate',
- xlinkarcrole: 'xlinkArcrole',
- 'xlink:arcrole': 'xlinkArcrole',
- xlinkhref: 'xlinkHref',
- 'xlink:href': 'xlinkHref',
- xlinkrole: 'xlinkRole',
- 'xlink:role': 'xlinkRole',
- xlinkshow: 'xlinkShow',
- 'xlink:show': 'xlinkShow',
- xlinktitle: 'xlinkTitle',
- 'xlink:title': 'xlinkTitle',
- xlinktype: 'xlinkType',
- 'xlink:type': 'xlinkType',
- xmlbase: 'xmlBase',
- 'xml:base': 'xmlBase',
- xmllang: 'xmlLang',
- 'xml:lang': 'xmlLang',
- xmlns: 'xmlns',
- 'xml:space': 'xmlSpace',
- xmlnsxlink: 'xmlnsXlink',
- 'xmlns:xlink': 'xmlnsXlink',
- xmlspace: 'xmlSpace',
- y1: 'y1',
- y2: 'y2',
- y: 'y',
- ychannelselector: 'yChannelSelector',
- z: 'z',
- zoomandpan: 'zoomAndPan'
- };
-
- var ariaProperties = {
- 'aria-current': 0,
- // state
- 'aria-details': 0,
- 'aria-disabled': 0,
- // state
- 'aria-hidden': 0,
- // state
- 'aria-invalid': 0,
- // state
- 'aria-keyshortcuts': 0,
- 'aria-label': 0,
- 'aria-roledescription': 0,
- // Widget Attributes
- 'aria-autocomplete': 0,
- 'aria-checked': 0,
- 'aria-expanded': 0,
- 'aria-haspopup': 0,
- 'aria-level': 0,
- 'aria-modal': 0,
- 'aria-multiline': 0,
- 'aria-multiselectable': 0,
- 'aria-orientation': 0,
- 'aria-placeholder': 0,
- 'aria-pressed': 0,
- 'aria-readonly': 0,
- 'aria-required': 0,
- 'aria-selected': 0,
- 'aria-sort': 0,
- 'aria-valuemax': 0,
- 'aria-valuemin': 0,
- 'aria-valuenow': 0,
- 'aria-valuetext': 0,
- // Live Region Attributes
- 'aria-atomic': 0,
- 'aria-busy': 0,
- 'aria-live': 0,
- 'aria-relevant': 0,
- // Drag-and-Drop Attributes
- 'aria-dropeffect': 0,
- 'aria-grabbed': 0,
- // Relationship Attributes
- 'aria-activedescendant': 0,
- 'aria-colcount': 0,
- 'aria-colindex': 0,
- 'aria-colspan': 0,
- 'aria-controls': 0,
- 'aria-describedby': 0,
- 'aria-errormessage': 0,
- 'aria-flowto': 0,
- 'aria-labelledby': 0,
- 'aria-owns': 0,
- 'aria-posinset': 0,
- 'aria-rowcount': 0,
- 'aria-rowindex': 0,
- 'aria-rowspan': 0,
- 'aria-setsize': 0
- };
-
- var warnedProperties = {};
- var rARIA = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
-
- function validateProperty(tagName, name) {
- {
- if (hasOwnProperty$1.call(warnedProperties, name) && warnedProperties[name]) {
- return true;
- }
-
- if (rARIACamel.test(name)) {
- var ariaName = 'aria-' + name.slice(4).toLowerCase();
- var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (correctName == null) {
- error('Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.', name);
-
- warnedProperties[name] = true;
- return true;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== correctName) {
- error('Invalid ARIA attribute `%s`. Did you mean `%s`?', name, correctName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
-
- if (rARIA.test(name)) {
- var lowerCasedName = name.toLowerCase();
- var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null; // If this is an aria-* attribute, but is not listed in the known DOM
- // DOM properties, then it is an invalid aria-* attribute.
-
- if (standardName == null) {
- warnedProperties[name] = true;
- return false;
- } // aria-* attributes should be lowercase; suggest the lowercase version.
-
-
- if (name !== standardName) {
- error('Unknown ARIA attribute `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties[name] = true;
- return true;
- }
- }
- }
-
- return true;
- }
-
- function warnInvalidARIAProps(type, props) {
- {
- var invalidProps = [];
-
- for (var key in props) {
- var isValid = validateProperty(type, key);
-
- if (!isValid) {
- invalidProps.push(key);
- }
- }
-
- var unknownPropString = invalidProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (invalidProps.length === 1) {
- error('Invalid aria prop %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- } else if (invalidProps.length > 1) {
- error('Invalid aria props %s on <%s> tag. ' + 'For details, see https://reactjs.org/link/invalid-aria-props', unknownPropString, type);
- }
- }
- }
-
- function validateProperties(type, props) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnInvalidARIAProps(type, props);
- }
-
- var didWarnValueNull = false;
- function validateProperties$1(type, props) {
- {
- if (type !== 'input' && type !== 'textarea' && type !== 'select') {
- return;
- }
-
- if (props != null && props.value === null && !didWarnValueNull) {
- didWarnValueNull = true;
-
- if (type === 'select' && props.multiple) {
- 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);
- } else {
- error('`value` prop on `%s` should not be null. ' + 'Consider using an empty string to clear the component or `undefined` ' + 'for uncontrolled components.', type);
- }
- }
- }
- }
-
- var validateProperty$1 = function () {};
-
- {
- var warnedProperties$1 = {};
- var _hasOwnProperty = Object.prototype.hasOwnProperty;
- var EVENT_NAME_REGEX = /^on./;
- var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
- var rARIA$1 = new RegExp('^(aria)-[' + ATTRIBUTE_NAME_CHAR + ']*$');
- var rARIACamel$1 = new RegExp('^(aria)[A-Z][' + ATTRIBUTE_NAME_CHAR + ']*$');
-
- validateProperty$1 = function (tagName, name, value, eventRegistry) {
- if (_hasOwnProperty.call(warnedProperties$1, name) && warnedProperties$1[name]) {
- return true;
- }
-
- var lowerCasedName = name.toLowerCase();
-
- if (lowerCasedName === 'onfocusin' || lowerCasedName === 'onfocusout') {
- 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.');
-
- warnedProperties$1[name] = true;
- return true;
- } // We can't rely on the event system being injected on the server.
-
-
- if (eventRegistry != null) {
- var registrationNameDependencies = eventRegistry.registrationNameDependencies,
- possibleRegistrationNames = eventRegistry.possibleRegistrationNames;
-
- if (registrationNameDependencies.hasOwnProperty(name)) {
- return true;
- }
-
- var registrationName = possibleRegistrationNames.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames[lowerCasedName] : null;
-
- if (registrationName != null) {
- error('Invalid event handler property `%s`. Did you mean `%s`?', name, registrationName);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (EVENT_NAME_REGEX.test(name)) {
- error('Unknown event handler property `%s`. It will be ignored.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (EVENT_NAME_REGEX.test(name)) {
- // If no event plugins have been injected, we are in a server environment.
- // So we can't tell if the event name is correct for sure, but we can filter
- // out known bad ones like `onclick`. We can't suggest a specific replacement though.
- if (INVALID_EVENT_NAME_REGEX.test(name)) {
- error('Invalid event handler property `%s`. ' + 'React events use the camelCase naming convention, for example `onClick`.', name);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Let the ARIA attribute hook validate ARIA attributes
-
-
- if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
- return true;
- }
-
- if (lowerCasedName === 'innerhtml') {
- error('Directly setting property `innerHTML` is not permitted. ' + 'For more information, lookup documentation on `dangerouslySetInnerHTML`.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'aria') {
- error('The `aria` attribute is reserved for future use in React. ' + 'Pass individual `aria-` attributes instead.');
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (lowerCasedName === 'is' && value !== null && value !== undefined && typeof value !== 'string') {
- error('Received a `%s` for a string attribute `is`. If this is expected, cast ' + 'the value to a string.', typeof value);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'number' && isNaN(value)) {
- error('Received NaN for the `%s` attribute. If this is expected, cast ' + 'the value to a string.', name);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- var propertyInfo = getPropertyInfo(name);
- var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED; // Known attributes should match the casing specified in the property config.
-
- if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- var standardName = possibleStandardNames[lowerCasedName];
-
- if (standardName !== name) {
- error('Invalid DOM property `%s`. Did you mean `%s`?', name, standardName);
-
- warnedProperties$1[name] = true;
- return true;
- }
- } else if (!isReserved && name !== lowerCasedName) {
- // Unknown attributes should have lowercase casing since that's how they
- // will be cased anyway with server rendering.
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- if (typeof value === 'boolean' && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- if (value) {
- 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);
- } else {
- 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);
- }
-
- warnedProperties$1[name] = true;
- return true;
- } // Now that we've validated casing, do not validate
- // data types for reserved props
-
-
- if (isReserved) {
- return true;
- } // Warn when a known attribute is a bad type
-
-
- if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
- warnedProperties$1[name] = true;
- return false;
- } // Warn when passing the strings 'false' or 'true' into a boolean prop
-
-
- if ((value === 'false' || value === 'true') && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
- 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);
-
- warnedProperties$1[name] = true;
- return true;
- }
-
- return true;
- };
- }
-
- var warnUnknownProperties = function (type, props, eventRegistry) {
- {
- var unknownProps = [];
-
- for (var key in props) {
- var isValid = validateProperty$1(type, key, props[key], eventRegistry);
-
- if (!isValid) {
- unknownProps.push(key);
- }
- }
-
- var unknownPropString = unknownProps.map(function (prop) {
- return '`' + prop + '`';
- }).join(', ');
-
- if (unknownProps.length === 1) {
- 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);
- } else if (unknownProps.length > 1) {
- 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);
- }
- }
- };
-
- function validateProperties$2(type, props, eventRegistry) {
- if (isCustomComponent(type, props)) {
- return;
- }
-
- warnUnknownProperties(type, props, eventRegistry);
- }
-
- var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
- var IS_NON_DELEGATED = 1 << 1;
- var IS_CAPTURE_PHASE = 1 << 2;
- var IS_REPLAYED = 1 << 4;
- // set to LEGACY_FB_SUPPORT. LEGACY_FB_SUPPORT only gets set when
- // we call willDeferLaterForLegacyFBSupport, thus not bailing out
- // will result in endless cycles like an infinite loop.
- // We also don't want to defer during event replaying.
-
- var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;
-
- /**
- * Gets the target node from a native browser event by accounting for
- * inconsistencies in browser DOM APIs.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {DOMEventTarget} Target node.
- */
-
- function getEventTarget(nativeEvent) {
- // Fallback to nativeEvent.srcElement for IE9
- // https://github.com/facebook/react/issues/12506
- var target = nativeEvent.target || nativeEvent.srcElement || window; // Normalize SVG <use> element events #4963
-
- if (target.correspondingUseElement) {
- target = target.correspondingUseElement;
- } // Safari may fire events on text nodes (Node.TEXT_NODE is 3).
- // @see http://www.quirksmode.org/js/events_properties.html
-
-
- return target.nodeType === TEXT_NODE ? target.parentNode : target;
- }
-
- var restoreImpl = null;
- var restoreTarget = null;
- var restoreQueue = null;
-
- function restoreStateOfTarget(target) {
- // We perform this translation at the end of the event loop so that we
- // always receive the correct fiber here
- var internalInstance = getInstanceFromNode(target);
-
- if (!internalInstance) {
- // Unmounted
- return;
- }
-
- if (!(typeof restoreImpl === 'function')) {
- {
- throw Error( "setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var stateNode = internalInstance.stateNode; // Guard against Fiber being unmounted.
-
- if (stateNode) {
- var _props = getFiberCurrentPropsFromNode(stateNode);
-
- restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
- }
- }
-
- function setRestoreImplementation(impl) {
- restoreImpl = impl;
- }
- function enqueueStateRestore(target) {
- if (restoreTarget) {
- if (restoreQueue) {
- restoreQueue.push(target);
- } else {
- restoreQueue = [target];
- }
- } else {
- restoreTarget = target;
- }
- }
- function needsStateRestore() {
- return restoreTarget !== null || restoreQueue !== null;
- }
- function restoreStateIfNeeded() {
- if (!restoreTarget) {
- return;
- }
-
- var target = restoreTarget;
- var queuedTargets = restoreQueue;
- restoreTarget = null;
- restoreQueue = null;
- restoreStateOfTarget(target);
-
- if (queuedTargets) {
- for (var i = 0; i < queuedTargets.length; i++) {
- restoreStateOfTarget(queuedTargets[i]);
- }
- }
- }
-
- // the renderer. Such as when we're dispatching events or if third party
- // libraries need to call batchedUpdates. Eventually, this API will go away when
- // everything is batched by default. We'll then have a similar API to opt-out of
- // scheduled work and instead do synchronous work.
- // Defaults
-
- var batchedUpdatesImpl = function (fn, bookkeeping) {
- return fn(bookkeeping);
- };
-
- var discreteUpdatesImpl = function (fn, a, b, c, d) {
- return fn(a, b, c, d);
- };
-
- var flushDiscreteUpdatesImpl = function () {};
-
- var batchedEventUpdatesImpl = batchedUpdatesImpl;
- var isInsideEventHandler = false;
- var isBatchingEventUpdates = false;
-
- function finishEventHandler() {
- // Here we wait until all updates have propagated, which is important
- // when using controlled components within layers:
- // https://github.com/facebook/react/issues/1698
- // Then we restore state of any controlled component.
- var controlledComponentsHavePendingUpdates = needsStateRestore();
-
- if (controlledComponentsHavePendingUpdates) {
- // If a controlled event was fired, we may need to restore the state of
- // the DOM node back to the controlled value. This is necessary when React
- // bails out of the update without touching the DOM.
- flushDiscreteUpdatesImpl();
- restoreStateIfNeeded();
- }
- }
-
- function batchedUpdates(fn, bookkeeping) {
- if (isInsideEventHandler) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(bookkeeping);
- }
-
- isInsideEventHandler = true;
-
- try {
- return batchedUpdatesImpl(fn, bookkeeping);
- } finally {
- isInsideEventHandler = false;
- finishEventHandler();
- }
- }
- function batchedEventUpdates(fn, a, b) {
- if (isBatchingEventUpdates) {
- // If we are currently inside another batch, we need to wait until it
- // fully completes before restoring state.
- return fn(a, b);
- }
-
- isBatchingEventUpdates = true;
-
- try {
- return batchedEventUpdatesImpl(fn, a, b);
- } finally {
- isBatchingEventUpdates = false;
- finishEventHandler();
- }
- }
- function discreteUpdates(fn, a, b, c, d) {
- var prevIsInsideEventHandler = isInsideEventHandler;
- isInsideEventHandler = true;
-
- try {
- return discreteUpdatesImpl(fn, a, b, c, d);
- } finally {
- isInsideEventHandler = prevIsInsideEventHandler;
-
- if (!isInsideEventHandler) {
- finishEventHandler();
- }
- }
- }
- function flushDiscreteUpdatesIfNeeded(timeStamp) {
- {
- if (!isInsideEventHandler) {
- flushDiscreteUpdatesImpl();
- }
- }
- }
- function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushDiscreteUpdatesImpl, _batchedEventUpdatesImpl) {
- batchedUpdatesImpl = _batchedUpdatesImpl;
- discreteUpdatesImpl = _discreteUpdatesImpl;
- flushDiscreteUpdatesImpl = _flushDiscreteUpdatesImpl;
- batchedEventUpdatesImpl = _batchedEventUpdatesImpl;
- }
-
- function isInteractive(tag) {
- return tag === 'button' || tag === 'input' || tag === 'select' || tag === 'textarea';
- }
-
- function shouldPreventMouseEvent(name, type, props) {
- switch (name) {
- case 'onClick':
- case 'onClickCapture':
- case 'onDoubleClick':
- case 'onDoubleClickCapture':
- case 'onMouseDown':
- case 'onMouseDownCapture':
- case 'onMouseMove':
- case 'onMouseMoveCapture':
- case 'onMouseUp':
- case 'onMouseUpCapture':
- case 'onMouseEnter':
- return !!(props.disabled && isInteractive(type));
-
- default:
- return false;
- }
- }
- /**
- * @param {object} inst The instance, which is the source of events.
- * @param {string} registrationName Name of listener (e.g. `onClick`).
- * @return {?function} The stored callback.
- */
-
-
- function getListener(inst, registrationName) {
- var stateNode = inst.stateNode;
-
- if (stateNode === null) {
- // Work in progress (ex: onload events in incremental mode).
- return null;
- }
-
- var props = getFiberCurrentPropsFromNode(stateNode);
-
- if (props === null) {
- // Work in progress.
- return null;
- }
-
- var listener = props[registrationName];
-
- if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
- return null;
- }
-
- if (!(!listener || typeof listener === 'function')) {
- {
- throw Error( "Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type." );
- }
- }
-
- return listener;
- }
-
- var passiveBrowserEventsSupported = false; // Check if browser support events with passive listeners
- // https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support
-
- if (canUseDOM) {
- try {
- var options = {}; // $FlowFixMe: Ignore Flow complaining about needing a value
-
- Object.defineProperty(options, 'passive', {
- get: function () {
- passiveBrowserEventsSupported = true;
- }
- });
- window.addEventListener('test', options, options);
- window.removeEventListener('test', options, options);
- } catch (e) {
- passiveBrowserEventsSupported = false;
- }
- }
-
- function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- try {
- func.apply(context, funcArgs);
- } catch (error) {
- this.onError(error);
- }
- }
-
- var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
-
- {
- // In DEV mode, we swap out invokeGuardedCallback for a special version
- // that plays more nicely with the browser's DevTools. The idea is to preserve
- // "Pause on exceptions" behavior. Because React wraps all user-provided
- // functions in invokeGuardedCallback, and the production version of
- // invokeGuardedCallback uses a try-catch, all user exceptions are treated
- // like caught exceptions, and the DevTools won't pause unless the developer
- // takes the extra step of enabling pause on caught exceptions. This is
- // unintuitive, though, because even though React has caught the error, from
- // the developer's perspective, the error is uncaught.
- //
- // To preserve the expected "Pause on exceptions" behavior, we don't use a
- // try-catch in DEV. Instead, we synchronously dispatch a fake event to a fake
- // DOM node, and call the user-provided callback from inside an event handler
- // for that fake event. If the callback throws, the error is "captured" using
- // a global event handler. But because the error happens in a different
- // event loop context, it does not interrupt the normal program flow.
- // Effectively, this gives us try-catch behavior without actually using
- // try-catch. Neat!
- // Check that the browser supports the APIs we need to implement our special
- // DEV version of invokeGuardedCallback
- if (typeof window !== 'undefined' && typeof window.dispatchEvent === 'function' && typeof document !== 'undefined' && typeof document.createEvent === 'function') {
- var fakeNode = document.createElement('react');
-
- invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
- // If document doesn't exist we know for sure we will crash in this method
- // when we call document.createEvent(). However this can cause confusing
- // errors: https://github.com/facebookincubator/create-react-app/issues/3482
- // So we preemptively throw with a better message instead.
- if (!(typeof document !== 'undefined')) {
- {
- throw Error( "The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous." );
- }
- }
-
- var evt = document.createEvent('Event');
- var didCall = false; // Keeps track of whether the user-provided callback threw an error. We
- // set this to true at the beginning, then set it to false right after
- // calling the function. If the function errors, `didError` will never be
- // set to false. This strategy works even if the browser is flaky and
- // fails to call our global error handler, because it doesn't rely on
- // the error event at all.
-
- var didError = true; // Keeps track of the value of window.event so that we can reset it
- // during the callback to let user code access window.event in the
- // browsers that support it.
-
- var windowEvent = window.event; // Keeps track of the descriptor of window.event to restore it after event
- // dispatching: https://github.com/facebook/react/issues/13688
-
- var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, 'event');
-
- function restoreAfterDispatch() {
- // We immediately remove the callback from event listeners so that
- // nested `invokeGuardedCallback` calls do not clash. Otherwise, a
- // nested call would trigger the fake event handlers of any call higher
- // in the stack.
- fakeNode.removeEventListener(evtType, callCallback, false); // We check for window.hasOwnProperty('event') to prevent the
- // window.event assignment in both IE <= 10 as they throw an error
- // "Member not found" in strict mode, and in Firefox which does not
- // support window.event.
-
- if (typeof window.event !== 'undefined' && window.hasOwnProperty('event')) {
- window.event = windowEvent;
- }
- } // Create an event handler for our fake event. We will synchronously
- // dispatch our fake event using `dispatchEvent`. Inside the handler, we
- // call the user-provided callback.
-
-
- var funcArgs = Array.prototype.slice.call(arguments, 3);
-
- function callCallback() {
- didCall = true;
- restoreAfterDispatch();
- func.apply(context, funcArgs);
- didError = false;
- } // Create a global error event handler. We use this to capture the value
- // that was thrown. It's possible that this error handler will fire more
- // than once; for example, if non-React code also calls `dispatchEvent`
- // and a handler for that event throws. We should be resilient to most of
- // those cases. Even if our error event handler fires more than once, the
- // last error event is always used. If the callback actually does error,
- // we know that the last error event is the correct one, because it's not
- // possible for anything else to have happened in between our callback
- // erroring and the code that follows the `dispatchEvent` call below. If
- // the callback doesn't error, but the error event was fired, we know to
- // ignore it because `didError` will be false, as described above.
-
-
- var error; // Use this to track whether the error event is ever called.
-
- var didSetError = false;
- var isCrossOriginError = false;
-
- function handleWindowError(event) {
- error = event.error;
- didSetError = true;
-
- if (error === null && event.colno === 0 && event.lineno === 0) {
- isCrossOriginError = true;
- }
-
- if (event.defaultPrevented) {
- // Some other error handler has prevented default.
- // Browsers silence the error report if this happens.
- // We'll remember this to later decide whether to log it or not.
- if (error != null && typeof error === 'object') {
- try {
- error._suppressLogging = true;
- } catch (inner) {// Ignore.
- }
- }
- }
- } // Create a fake event type.
-
-
- var evtType = "react-" + (name ? name : 'invokeguardedcallback'); // Attach our event handlers
-
- window.addEventListener('error', handleWindowError);
- fakeNode.addEventListener(evtType, callCallback, false); // Synchronously dispatch our fake event. If the user-provided function
- // errors, it will trigger our global error handler.
-
- evt.initEvent(evtType, false, false);
- fakeNode.dispatchEvent(evt);
-
- if (windowEventDescriptor) {
- Object.defineProperty(window, 'event', windowEventDescriptor);
- }
-
- if (didCall && didError) {
- if (!didSetError) {
- // The callback errored, but the error event never fired.
- error = new Error('An error was thrown inside one of your components, but React ' + "doesn't know what it was. This is likely due to browser " + 'flakiness. React does its best to preserve the "Pause on ' + 'exceptions" behavior of the DevTools, which requires some ' + "DEV-mode only tricks. It's possible that these don't work in " + 'your browser. Try triggering the error in production mode, ' + 'or switching to a modern browser. If you suspect that this is ' + 'actually an issue with React, please file an issue.');
- } else if (isCrossOriginError) {
- error = new Error("A cross-origin error was thrown. React doesn't have access to " + 'the actual error object in development. ' + 'See https://reactjs.org/link/crossorigin-error for more information.');
- }
-
- this.onError(error);
- } // Remove our event listeners
-
-
- window.removeEventListener('error', handleWindowError);
-
- if (!didCall) {
- // Something went really wrong, and our event was not dispatched.
- // https://github.com/facebook/react/issues/16734
- // https://github.com/facebook/react/issues/16585
- // Fall back to the production implementation.
- restoreAfterDispatch();
- return invokeGuardedCallbackProd.apply(this, arguments);
- }
- };
- }
- }
-
- var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
-
- var hasError = false;
- var caughtError = null; // Used by event system to capture/rethrow the first error.
-
- var hasRethrowError = false;
- var rethrowError = null;
- var reporter = {
- onError: function (error) {
- hasError = true;
- caughtError = error;
- }
- };
- /**
- * Call a function while guarding against errors that happens within it.
- * Returns an error if it throws, otherwise null.
- *
- * In production, this is implemented using a try-catch. The reason we don't
- * use a try-catch directly is so that we can swap out a different
- * implementation in DEV mode.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
- function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
- hasError = false;
- caughtError = null;
- invokeGuardedCallbackImpl$1.apply(reporter, arguments);
- }
- /**
- * Same as invokeGuardedCallback, but instead of returning an error, it stores
- * it in a global so it can be rethrown by `rethrowCaughtError` later.
- * TODO: See if caughtError and rethrowError can be unified.
- *
- * @param {String} name of the guard to use for logging or debugging
- * @param {Function} func The function to invoke
- * @param {*} context The context to use when calling the function
- * @param {...*} args Arguments for function
- */
-
- function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
- invokeGuardedCallback.apply(this, arguments);
-
- if (hasError) {
- var error = clearCaughtError();
-
- if (!hasRethrowError) {
- hasRethrowError = true;
- rethrowError = error;
- }
- }
- }
- /**
- * During execution of guarded functions we will capture the first error which
- * we will rethrow to be handled by the top level error handler.
- */
-
- function rethrowCaughtError() {
- if (hasRethrowError) {
- var error = rethrowError;
- hasRethrowError = false;
- rethrowError = null;
- throw error;
- }
- }
- function hasCaughtError() {
- return hasError;
- }
- function clearCaughtError() {
- if (hasError) {
- var error = caughtError;
- hasError = false;
- caughtError = null;
- return error;
- } else {
- {
- {
- throw Error( "clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- }
-
- var ReactInternals$1 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _ReactInternals$Sched = ReactInternals$1.Scheduler,
- unstable_cancelCallback = _ReactInternals$Sched.unstable_cancelCallback,
- unstable_now = _ReactInternals$Sched.unstable_now,
- unstable_scheduleCallback = _ReactInternals$Sched.unstable_scheduleCallback,
- unstable_shouldYield = _ReactInternals$Sched.unstable_shouldYield,
- unstable_requestPaint = _ReactInternals$Sched.unstable_requestPaint,
- unstable_getFirstCallbackNode = _ReactInternals$Sched.unstable_getFirstCallbackNode,
- unstable_runWithPriority = _ReactInternals$Sched.unstable_runWithPriority,
- unstable_next = _ReactInternals$Sched.unstable_next,
- unstable_continueExecution = _ReactInternals$Sched.unstable_continueExecution,
- unstable_pauseExecution = _ReactInternals$Sched.unstable_pauseExecution,
- unstable_getCurrentPriorityLevel = _ReactInternals$Sched.unstable_getCurrentPriorityLevel,
- unstable_ImmediatePriority = _ReactInternals$Sched.unstable_ImmediatePriority,
- unstable_UserBlockingPriority = _ReactInternals$Sched.unstable_UserBlockingPriority,
- unstable_NormalPriority = _ReactInternals$Sched.unstable_NormalPriority,
- unstable_LowPriority = _ReactInternals$Sched.unstable_LowPriority,
- unstable_IdlePriority = _ReactInternals$Sched.unstable_IdlePriority,
- unstable_forceFrameRate = _ReactInternals$Sched.unstable_forceFrameRate,
- unstable_flushAllWithoutAsserting = _ReactInternals$Sched.unstable_flushAllWithoutAsserting;
-
- /**
- * `ReactInstanceMap` maintains a mapping from a public facing stateful
- * instance (key) and the internal representation (value). This allows public
- * methods to accept the user facing instance as an argument and map them back
- * to internal methods.
- *
- * Note that this module is currently shared and assumed to be stateless.
- * If this becomes an actual Map, that will break.
- */
- function get(key) {
- return key._reactInternals;
- }
- function has(key) {
- return key._reactInternals !== undefined;
- }
- function set(key, value) {
- key._reactInternals = value;
- }
-
- // Don't change these two values. They're used by React Dev Tools.
- var NoFlags =
- /* */
- 0;
- var PerformedWork =
- /* */
- 1; // You can change the rest (and add more).
-
- var Placement =
- /* */
- 2;
- var Update =
- /* */
- 4;
- var PlacementAndUpdate =
- /* */
- 6;
- var Deletion =
- /* */
- 8;
- var ContentReset =
- /* */
- 16;
- var Callback =
- /* */
- 32;
- var DidCapture =
- /* */
- 64;
- var Ref =
- /* */
- 128;
- var Snapshot =
- /* */
- 256;
- var Passive =
- /* */
- 512; // TODO (effects) Remove this bit once the new reconciler is synced to the old.
-
- var PassiveUnmountPendingDev =
- /* */
- 8192;
- var Hydrating =
- /* */
- 1024;
- var HydratingAndUpdate =
- /* */
- 1028; // Passive & Update & Callback & Ref & Snapshot
-
- var LifecycleEffectMask =
- /* */
- 932; // Union of all host effects
-
- var HostEffectMask =
- /* */
- 2047; // These are not really side effects, but we still reuse this field.
-
- var Incomplete =
- /* */
- 2048;
- var ShouldCapture =
- /* */
- 4096;
- var ForceUpdateForLegacySuspense =
- /* */
- 16384; // Static tags describe aspects of a fiber that are not specific to a render,
-
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
- function getNearestMountedFiber(fiber) {
- var node = fiber;
- var nearestMounted = fiber;
-
- if (!fiber.alternate) {
- // If there is no alternate, this might be a new tree that isn't inserted
- // yet. If it is, then it will have a pending insertion effect on it.
- var nextNode = node;
-
- do {
- node = nextNode;
-
- if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
- // This is an insertion or in-progress hydration. The nearest possible
- // mounted fiber is the parent but we need to continue to figure out
- // if that one is still mounted.
- nearestMounted = node.return;
- }
-
- nextNode = node.return;
- } while (nextNode);
- } else {
- while (node.return) {
- node = node.return;
- }
- }
-
- if (node.tag === HostRoot) {
- // TODO: Check if this was a nested HostRoot when used with
- // renderContainerIntoSubtree.
- return nearestMounted;
- } // If we didn't hit the root, that means that we're in an disconnected tree
- // that has been unmounted.
-
-
- return null;
- }
- function getSuspenseInstanceFromFiber(fiber) {
- if (fiber.tag === SuspenseComponent) {
- var suspenseState = fiber.memoizedState;
-
- if (suspenseState === null) {
- var current = fiber.alternate;
-
- if (current !== null) {
- suspenseState = current.memoizedState;
- }
- }
-
- if (suspenseState !== null) {
- return suspenseState.dehydrated;
- }
- }
-
- return null;
- }
- function getContainerFromFiber(fiber) {
- return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
- }
- function isFiberMounted(fiber) {
- return getNearestMountedFiber(fiber) === fiber;
- }
- function isMounted(component) {
- {
- var owner = ReactCurrentOwner.current;
-
- if (owner !== null && owner.tag === ClassComponent) {
- var ownerFiber = owner;
- var instance = ownerFiber.stateNode;
-
- if (!instance._warnedAboutRefsInRender) {
- error('%s is accessing isMounted inside its render() function. ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(ownerFiber.type) || 'A component');
- }
-
- instance._warnedAboutRefsInRender = true;
- }
- }
-
- var fiber = get(component);
-
- if (!fiber) {
- return false;
- }
-
- return getNearestMountedFiber(fiber) === fiber;
- }
-
- function assertIsMounted(fiber) {
- if (!(getNearestMountedFiber(fiber) === fiber)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- function findCurrentFiberUsingSlowPath(fiber) {
- var alternate = fiber.alternate;
-
- if (!alternate) {
- // If there is no alternate, then we only need to check if it is mounted.
- var nearestMounted = getNearestMountedFiber(fiber);
-
- if (!(nearestMounted !== null)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (nearestMounted !== fiber) {
- return null;
- }
-
- return fiber;
- } // If we have two possible branches, we'll walk backwards up to the root
- // to see what path the root points to. On the way we may hit one of the
- // special cases and we'll deal with them.
-
-
- var a = fiber;
- var b = alternate;
-
- while (true) {
- var parentA = a.return;
-
- if (parentA === null) {
- // We're at the root.
- break;
- }
-
- var parentB = parentA.alternate;
-
- if (parentB === null) {
- // There is no alternate. This is an unusual case. Currently, it only
- // happens when a Suspense component is hidden. An extra fragment fiber
- // is inserted in between the Suspense fiber and its children. Skip
- // over this extra fragment fiber and proceed to the next parent.
- var nextParent = parentA.return;
-
- if (nextParent !== null) {
- a = b = nextParent;
- continue;
- } // If there's no parent, we're at the root.
-
-
- break;
- } // If both copies of the parent fiber point to the same child, we can
- // assume that the child is current. This happens when we bailout on low
- // priority: the bailed out fiber's child reuses the current child.
-
-
- if (parentA.child === parentB.child) {
- var child = parentA.child;
-
- while (child) {
- if (child === a) {
- // We've determined that A is the current branch.
- assertIsMounted(parentA);
- return fiber;
- }
-
- if (child === b) {
- // We've determined that B is the current branch.
- assertIsMounted(parentA);
- return alternate;
- }
-
- child = child.sibling;
- } // We should never have an alternate for any mounting node. So the only
- // way this could possibly happen is if this was unmounted, if at all.
-
-
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- }
-
- if (a.return !== b.return) {
- // The return pointer of A and the return pointer of B point to different
- // fibers. We assume that return pointers never criss-cross, so A must
- // belong to the child set of A.return, and B must belong to the child
- // set of B.return.
- a = parentA;
- b = parentB;
- } else {
- // The return pointers point to the same fiber. We'll have to use the
- // default, slow path: scan the child sets of each parent alternate to see
- // which child belongs to which set.
- //
- // Search parent A's child set
- var didFindChild = false;
- var _child = parentA.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentA;
- b = parentB;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentA;
- a = parentB;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- // Search parent B's child set
- _child = parentB.child;
-
- while (_child) {
- if (_child === a) {
- didFindChild = true;
- a = parentB;
- b = parentA;
- break;
- }
-
- if (_child === b) {
- didFindChild = true;
- b = parentB;
- a = parentA;
- break;
- }
-
- _child = _child.sibling;
- }
-
- if (!didFindChild) {
- {
- throw Error( "Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue." );
- }
- }
- }
- }
-
- if (!(a.alternate === b)) {
- {
- throw Error( "Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- } // If the root is not a host container, we're in a disconnected tree. I.e.
- // unmounted.
-
-
- if (!(a.tag === HostRoot)) {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
-
- if (a.stateNode.current === a) {
- // We've determined that A is the current branch.
- return fiber;
- } // Otherwise B has to be current branch.
-
-
- return alternate;
- }
- function findCurrentHostFiber(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
-
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
-
-
- var node = currentParent;
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText) {
- return node;
- } else if (node.child) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return null;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
-
-
- return null;
- }
- function findCurrentHostFiberWithNoPortals(parent) {
- var currentParent = findCurrentFiberUsingSlowPath(parent);
-
- if (!currentParent) {
- return null;
- } // Next we'll drill down this component to find the first HostComponent/Text.
-
-
- var node = currentParent;
-
- while (true) {
- if (node.tag === HostComponent || node.tag === HostText || enableFundamentalAPI ) {
- return node;
- } else if (node.child && node.tag !== HostPortal) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === currentParent) {
- return null;
- }
-
- while (!node.sibling) {
- if (!node.return || node.return === currentParent) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- } // Flow needs the return null here, but ESLint complains about it.
- // eslint-disable-next-line no-unreachable
-
-
- return null;
- }
- function doesFiberContain(parentFiber, childFiber) {
- var node = childFiber;
- var parentFiberAlternate = parentFiber.alternate;
-
- while (node !== null) {
- if (node === parentFiber || node === parentFiberAlternate) {
- return true;
- }
-
- node = node.return;
- }
-
- return false;
- }
-
- var attemptUserBlockingHydration;
- function setAttemptUserBlockingHydration(fn) {
- attemptUserBlockingHydration = fn;
- }
- var attemptContinuousHydration;
- function setAttemptContinuousHydration(fn) {
- attemptContinuousHydration = fn;
- }
- var attemptHydrationAtCurrentPriority;
- function setAttemptHydrationAtCurrentPriority(fn) {
- attemptHydrationAtCurrentPriority = fn;
- }
- var attemptHydrationAtPriority;
- function setAttemptHydrationAtPriority(fn) {
- attemptHydrationAtPriority = fn;
- } // TODO: Upgrade this definition once we're on a newer version of Flow that
- var hasScheduledReplayAttempt = false; // The queue of discrete events to be replayed.
-
- var queuedDiscreteEvents = []; // Indicates if any continuous event targets are non-null for early bailout.
- // if the last target was dehydrated.
-
- var queuedFocus = null;
- var queuedDrag = null;
- var queuedMouse = null; // For pointer events there can be one latest event per pointerId.
-
- var queuedPointers = new Map();
- var queuedPointerCaptures = new Map(); // We could consider replaying selectionchange and touchmoves too.
-
- var queuedExplicitHydrationTargets = [];
- function hasQueuedDiscreteEvents() {
- return queuedDiscreteEvents.length > 0;
- }
- var discreteReplayableEvents = ['mousedown', 'mouseup', 'touchcancel', 'touchend', 'touchstart', 'auxclick', 'dblclick', 'pointercancel', 'pointerdown', 'pointerup', 'dragend', 'dragstart', 'drop', 'compositionend', 'compositionstart', 'keydown', 'keypress', 'keyup', 'input', 'textInput', // Intentionally camelCase
- 'copy', 'cut', 'paste', 'click', 'change', 'contextmenu', 'reset', 'submit'];
- function isReplayableDiscreteEvent(eventType) {
- return discreteReplayableEvents.indexOf(eventType) > -1;
- }
-
- function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- return {
- blockedOn: blockedOn,
- domEventName: domEventName,
- eventSystemFlags: eventSystemFlags | IS_REPLAYED,
- nativeEvent: nativeEvent,
- targetContainers: [targetContainer]
- };
- }
-
- function queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
- queuedDiscreteEvents.push(queuedEvent);
- } // Resets the replaying for this type of continuous event to no event.
-
- function clearIfContinuousEvent(domEventName, nativeEvent) {
- switch (domEventName) {
- case 'focusin':
- case 'focusout':
- queuedFocus = null;
- break;
-
- case 'dragenter':
- case 'dragleave':
- queuedDrag = null;
- break;
-
- case 'mouseover':
- case 'mouseout':
- queuedMouse = null;
- break;
-
- case 'pointerover':
- case 'pointerout':
- {
- var pointerId = nativeEvent.pointerId;
- queuedPointers.delete(pointerId);
- break;
- }
-
- case 'gotpointercapture':
- case 'lostpointercapture':
- {
- var _pointerId = nativeEvent.pointerId;
- queuedPointerCaptures.delete(_pointerId);
- break;
- }
- }
- }
-
- function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
- var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
-
- if (blockedOn !== null) {
- var _fiber2 = getInstanceFromNode(blockedOn);
-
- if (_fiber2 !== null) {
- // Attempt to increase the priority of this target.
- attemptContinuousHydration(_fiber2);
- }
- }
-
- return queuedEvent;
- } // If we have already queued this exact event, then it's because
- // the different event systems have different DOM event listeners.
- // We can accumulate the flags, and the targetContainers, and
- // store a single event to be replayed.
-
-
- existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
- var targetContainers = existingQueuedEvent.targetContainers;
-
- if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
- targetContainers.push(targetContainer);
- }
-
- return existingQueuedEvent;
- }
-
- function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- // These set relatedTarget to null because the replayed event will be treated as if we
- // moved from outside the window (no target) onto the target once it hydrates.
- // Instead of mutating we could clone the event.
- switch (domEventName) {
- case 'focusin':
- {
- var focusEvent = nativeEvent;
- queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
- return true;
- }
-
- case 'dragenter':
- {
- var dragEvent = nativeEvent;
- queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
- return true;
- }
-
- case 'mouseover':
- {
- var mouseEvent = nativeEvent;
- queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
- return true;
- }
-
- case 'pointerover':
- {
- var pointerEvent = nativeEvent;
- var pointerId = pointerEvent.pointerId;
- queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
- return true;
- }
-
- case 'gotpointercapture':
- {
- var _pointerEvent = nativeEvent;
- var _pointerId2 = _pointerEvent.pointerId;
- queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
- return true;
- }
- }
-
- return false;
- } // Check if this target is unblocked. Returns true if it's unblocked.
-
- function attemptExplicitHydrationTarget(queuedTarget) {
- // TODO: This function shares a lot of logic with attemptToDispatchEvent.
- // Try to unify them. It's a bit tricky since it would require two return
- // values.
- var targetInst = getClosestInstanceFromNode(queuedTarget.target);
-
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
-
- if (nearestMounted !== null) {
- var tag = nearestMounted.tag;
-
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
-
- if (instance !== null) {
- // We're blocked on hydrating this boundary.
- // Increase its priority.
- queuedTarget.blockedOn = instance;
- attemptHydrationAtPriority(queuedTarget.lanePriority, function () {
- unstable_runWithPriority(queuedTarget.priority, function () {
- attemptHydrationAtCurrentPriority(nearestMounted);
- });
- });
- return;
- }
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
-
- if (root.hydrate) {
- queuedTarget.blockedOn = getContainerFromFiber(nearestMounted); // We don't currently have a way to increase the priority of
- // a root other than sync.
-
- return;
- }
- }
- }
- }
-
- queuedTarget.blockedOn = null;
- }
-
- function attemptReplayContinuousQueuedEvent(queuedEvent) {
- if (queuedEvent.blockedOn !== null) {
- return false;
- }
-
- var targetContainers = queuedEvent.targetContainers;
-
- while (targetContainers.length > 0) {
- var targetContainer = targetContainers[0];
- var nextBlockedOn = attemptToDispatchEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);
-
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- var _fiber3 = getInstanceFromNode(nextBlockedOn);
-
- if (_fiber3 !== null) {
- attemptContinuousHydration(_fiber3);
- }
-
- queuedEvent.blockedOn = nextBlockedOn;
- return false;
- } // This target container was successfully dispatched. Try the next.
-
-
- targetContainers.shift();
- }
-
- return true;
- }
-
- function attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {
- if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
- map.delete(key);
- }
- }
-
- function replayUnblockedEvents() {
- hasScheduledReplayAttempt = false; // First replay discrete events.
-
- while (queuedDiscreteEvents.length > 0) {
- var nextDiscreteEvent = queuedDiscreteEvents[0];
-
- if (nextDiscreteEvent.blockedOn !== null) {
- // We're still blocked.
- // Increase the priority of this boundary to unblock
- // the next discrete event.
- var _fiber4 = getInstanceFromNode(nextDiscreteEvent.blockedOn);
-
- if (_fiber4 !== null) {
- attemptUserBlockingHydration(_fiber4);
- }
-
- break;
- }
-
- var targetContainers = nextDiscreteEvent.targetContainers;
-
- while (targetContainers.length > 0) {
- var targetContainer = targetContainers[0];
- var nextBlockedOn = attemptToDispatchEvent(nextDiscreteEvent.domEventName, nextDiscreteEvent.eventSystemFlags, targetContainer, nextDiscreteEvent.nativeEvent);
-
- if (nextBlockedOn !== null) {
- // We're still blocked. Try again later.
- nextDiscreteEvent.blockedOn = nextBlockedOn;
- break;
- } // This target container was successfully dispatched. Try the next.
-
-
- targetContainers.shift();
- }
-
- if (nextDiscreteEvent.blockedOn === null) {
- // We've successfully replayed the first event. Let's try the next one.
- queuedDiscreteEvents.shift();
- }
- } // Next replay any continuous events.
-
-
- if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
- queuedFocus = null;
- }
-
- if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
- queuedDrag = null;
- }
-
- if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
- queuedMouse = null;
- }
-
- queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
- queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
- }
-
- function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
-
- if (!hasScheduledReplayAttempt) {
- hasScheduledReplayAttempt = true; // Schedule a callback to attempt replaying as many events as are
- // now unblocked. This first might not actually be unblocked yet.
- // We could check it early to avoid scheduling an unnecessary callback.
-
- unstable_scheduleCallback(unstable_NormalPriority, replayUnblockedEvents);
- }
- }
- }
-
- function retryIfBlockedOn(unblocked) {
- // Mark anything that was blocked on this as no longer blocked
- // and eligible for a replay.
- if (queuedDiscreteEvents.length > 0) {
- scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked); // This is a exponential search for each boundary that commits. I think it's
- // worth it because we expect very few discrete events to queue up and once
- // we are actually fully unblocked it will be fast to replay them.
-
- for (var i = 1; i < queuedDiscreteEvents.length; i++) {
- var queuedEvent = queuedDiscreteEvents[i];
-
- if (queuedEvent.blockedOn === unblocked) {
- queuedEvent.blockedOn = null;
- }
- }
- }
-
- if (queuedFocus !== null) {
- scheduleCallbackIfUnblocked(queuedFocus, unblocked);
- }
-
- if (queuedDrag !== null) {
- scheduleCallbackIfUnblocked(queuedDrag, unblocked);
- }
-
- if (queuedMouse !== null) {
- scheduleCallbackIfUnblocked(queuedMouse, unblocked);
- }
-
- var unblock = function (queuedEvent) {
- return scheduleCallbackIfUnblocked(queuedEvent, unblocked);
- };
-
- queuedPointers.forEach(unblock);
- queuedPointerCaptures.forEach(unblock);
-
- for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
- var queuedTarget = queuedExplicitHydrationTargets[_i];
-
- if (queuedTarget.blockedOn === unblocked) {
- queuedTarget.blockedOn = null;
- }
- }
-
- while (queuedExplicitHydrationTargets.length > 0) {
- var nextExplicitTarget = queuedExplicitHydrationTargets[0];
-
- if (nextExplicitTarget.blockedOn !== null) {
- // We're still blocked.
- break;
- } else {
- attemptExplicitHydrationTarget(nextExplicitTarget);
-
- if (nextExplicitTarget.blockedOn === null) {
- // We're unblocked.
- queuedExplicitHydrationTargets.shift();
- }
- }
- }
- }
-
- var DiscreteEvent = 0;
- var UserBlockingEvent = 1;
- var ContinuousEvent = 2;
-
- /**
- * Generate a mapping of standard vendor prefixes using the defined style property and event name.
- *
- * @param {string} styleProp
- * @param {string} eventName
- * @returns {object}
- */
-
- function makePrefixMap(styleProp, eventName) {
- var prefixes = {};
- prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
- prefixes['Webkit' + styleProp] = 'webkit' + eventName;
- prefixes['Moz' + styleProp] = 'moz' + eventName;
- return prefixes;
- }
- /**
- * A list of event names to a configurable list of vendor prefixes.
- */
-
-
- var vendorPrefixes = {
- animationend: makePrefixMap('Animation', 'AnimationEnd'),
- animationiteration: makePrefixMap('Animation', 'AnimationIteration'),
- animationstart: makePrefixMap('Animation', 'AnimationStart'),
- transitionend: makePrefixMap('Transition', 'TransitionEnd')
- };
- /**
- * Event names that have already been detected and prefixed (if applicable).
- */
-
- var prefixedEventNames = {};
- /**
- * Element to check for prefixes on.
- */
-
- var style = {};
- /**
- * Bootstrap if a DOM exists.
- */
-
- if (canUseDOM) {
- style = document.createElement('div').style; // On some platforms, in particular some releases of Android 4.x,
- // the un-prefixed "animation" and "transition" properties are defined on the
- // style object but the events that fire will still be prefixed, so we need
- // to check if the un-prefixed events are usable, and if not remove them from the map.
-
- if (!('AnimationEvent' in window)) {
- delete vendorPrefixes.animationend.animation;
- delete vendorPrefixes.animationiteration.animation;
- delete vendorPrefixes.animationstart.animation;
- } // Same as above
-
-
- if (!('TransitionEvent' in window)) {
- delete vendorPrefixes.transitionend.transition;
- }
- }
- /**
- * Attempts to determine the correct vendor prefixed event name.
- *
- * @param {string} eventName
- * @returns {string}
- */
-
-
- function getVendorPrefixedEventName(eventName) {
- if (prefixedEventNames[eventName]) {
- return prefixedEventNames[eventName];
- } else if (!vendorPrefixes[eventName]) {
- return eventName;
- }
-
- var prefixMap = vendorPrefixes[eventName];
-
- for (var styleProp in prefixMap) {
- if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
- return prefixedEventNames[eventName] = prefixMap[styleProp];
- }
- }
-
- return eventName;
- }
-
- var ANIMATION_END = getVendorPrefixedEventName('animationend');
- var ANIMATION_ITERATION = getVendorPrefixedEventName('animationiteration');
- var ANIMATION_START = getVendorPrefixedEventName('animationstart');
- var TRANSITION_END = getVendorPrefixedEventName('transitionend');
-
- var topLevelEventsToReactNames = new Map();
- var eventPriorities = new Map(); // We store most of the events in this module in pairs of two strings so we can re-use
- // the code required to apply the same logic for event prioritization and that of the
- // SimpleEventPlugin. This complicates things slightly, but the aim is to reduce code
- // duplication (for which there would be quite a bit). For the events that are not needed
- // for the SimpleEventPlugin (otherDiscreteEvents) we process them separately as an
- // array of top level events.
- // Lastly, we ignore prettier so we can keep the formatting sane.
- // prettier-ignore
-
- var discreteEventPairsForSimpleEventPlugin = ['cancel', 'cancel', 'click', 'click', 'close', 'close', 'contextmenu', 'contextMenu', 'copy', 'copy', 'cut', 'cut', 'auxclick', 'auxClick', 'dblclick', 'doubleClick', // Careful!
- 'dragend', 'dragEnd', 'dragstart', 'dragStart', 'drop', 'drop', 'focusin', 'focus', // Careful!
- 'focusout', 'blur', // Careful!
- 'input', 'input', 'invalid', 'invalid', 'keydown', 'keyDown', 'keypress', 'keyPress', 'keyup', 'keyUp', 'mousedown', 'mouseDown', 'mouseup', 'mouseUp', 'paste', 'paste', 'pause', 'pause', 'play', 'play', 'pointercancel', 'pointerCancel', 'pointerdown', 'pointerDown', 'pointerup', 'pointerUp', 'ratechange', 'rateChange', 'reset', 'reset', 'seeked', 'seeked', 'submit', 'submit', 'touchcancel', 'touchCancel', 'touchend', 'touchEnd', 'touchstart', 'touchStart', 'volumechange', 'volumeChange'];
- var otherDiscreteEvents = ['change', 'selectionchange', 'textInput', 'compositionstart', 'compositionend', 'compositionupdate'];
-
-
- var userBlockingPairsForSimpleEventPlugin = ['drag', 'drag', 'dragenter', 'dragEnter', 'dragexit', 'dragExit', 'dragleave', 'dragLeave', 'dragover', 'dragOver', 'mousemove', 'mouseMove', 'mouseout', 'mouseOut', 'mouseover', 'mouseOver', 'pointermove', 'pointerMove', 'pointerout', 'pointerOut', 'pointerover', 'pointerOver', 'scroll', 'scroll', 'toggle', 'toggle', 'touchmove', 'touchMove', 'wheel', 'wheel']; // prettier-ignore
-
- var continuousPairsForSimpleEventPlugin = ['abort', 'abort', ANIMATION_END, 'animationEnd', ANIMATION_ITERATION, 'animationIteration', ANIMATION_START, 'animationStart', 'canplay', 'canPlay', 'canplaythrough', 'canPlayThrough', 'durationchange', 'durationChange', 'emptied', 'emptied', 'encrypted', 'encrypted', 'ended', 'ended', 'error', 'error', 'gotpointercapture', 'gotPointerCapture', 'load', 'load', 'loadeddata', 'loadedData', 'loadedmetadata', 'loadedMetadata', 'loadstart', 'loadStart', 'lostpointercapture', 'lostPointerCapture', 'playing', 'playing', 'progress', 'progress', 'seeking', 'seeking', 'stalled', 'stalled', 'suspend', 'suspend', 'timeupdate', 'timeUpdate', TRANSITION_END, 'transitionEnd', 'waiting', 'waiting'];
- /**
- * Turns
- * ['abort', ...]
- *
- * into
- *
- * topLevelEventsToReactNames = new Map([
- * ['abort', 'onAbort'],
- * ]);
- *
- * and registers them.
- */
-
- function registerSimplePluginEventsAndSetTheirPriorities(eventTypes, priority) {
- // As the event types are in pairs of two, we need to iterate
- // through in twos. The events are in pairs of two to save code
- // and improve init perf of processing this array, as it will
- // result in far fewer object allocations and property accesses
- // if we only use three arrays to process all the categories of
- // instead of tuples.
- for (var i = 0; i < eventTypes.length; i += 2) {
- var topEvent = eventTypes[i];
- var event = eventTypes[i + 1];
- var capitalizedEvent = event[0].toUpperCase() + event.slice(1);
- var reactName = 'on' + capitalizedEvent;
- eventPriorities.set(topEvent, priority);
- topLevelEventsToReactNames.set(topEvent, reactName);
- registerTwoPhaseEvent(reactName, [topEvent]);
- }
- }
-
- function setEventPriorities(eventTypes, priority) {
- for (var i = 0; i < eventTypes.length; i++) {
- eventPriorities.set(eventTypes[i], priority);
- }
- }
-
- function getEventPriorityForPluginSystem(domEventName) {
- var priority = eventPriorities.get(domEventName); // Default to a ContinuousEvent. Note: we might
- // want to warn if we can't detect the priority
- // for the event.
-
- return priority === undefined ? ContinuousEvent : priority;
- }
- function registerSimpleEvents() {
- registerSimplePluginEventsAndSetTheirPriorities(discreteEventPairsForSimpleEventPlugin, DiscreteEvent);
- registerSimplePluginEventsAndSetTheirPriorities(userBlockingPairsForSimpleEventPlugin, UserBlockingEvent);
- registerSimplePluginEventsAndSetTheirPriorities(continuousPairsForSimpleEventPlugin, ContinuousEvent);
- setEventPriorities(otherDiscreteEvents, DiscreteEvent);
- }
-
- var ReactInternals$2 = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
- var _ReactInternals$Sched$1 = ReactInternals$2.SchedulerTracing,
- __interactionsRef = _ReactInternals$Sched$1.__interactionsRef,
- __subscriberRef = _ReactInternals$Sched$1.__subscriberRef,
- unstable_clear = _ReactInternals$Sched$1.unstable_clear,
- unstable_getCurrent = _ReactInternals$Sched$1.unstable_getCurrent,
- unstable_getThreadID = _ReactInternals$Sched$1.unstable_getThreadID,
- unstable_subscribe = _ReactInternals$Sched$1.unstable_subscribe,
- unstable_trace = _ReactInternals$Sched$1.unstable_trace,
- unstable_unsubscribe = _ReactInternals$Sched$1.unstable_unsubscribe,
- unstable_wrap = _ReactInternals$Sched$1.unstable_wrap;
-
- var Scheduler_now = unstable_now;
-
- {
- // Provide explicit error message when production+profiling bundle of e.g.
- // react-dom is used with production (non-profiling) bundle of
- // scheduler/tracing
- if (!(__interactionsRef != null && __interactionsRef.current != null)) {
- {
- throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
- }
- }
- }
- // ascending numbers so we can compare them like numbers. They start at 90 to
- // avoid clashing with Scheduler's priorities.
-
- var ImmediatePriority = 99;
- var UserBlockingPriority = 98;
- var NormalPriority = 97;
- var LowPriority = 96;
- var IdlePriority = 95; // NoPriority is the absence of priority. Also React-only.
-
- var NoPriority = 90;
- var initialTimeMs = Scheduler_now(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
-
- var SyncLanePriority = 15;
- var SyncBatchedLanePriority = 14;
- var InputDiscreteHydrationLanePriority = 13;
- var InputDiscreteLanePriority = 12;
- var InputContinuousHydrationLanePriority = 11;
- var InputContinuousLanePriority = 10;
- var DefaultHydrationLanePriority = 9;
- var DefaultLanePriority = 8;
- var TransitionHydrationPriority = 7;
- var TransitionPriority = 6;
- var RetryLanePriority = 5;
- var SelectiveHydrationLanePriority = 4;
- var IdleHydrationLanePriority = 3;
- var IdleLanePriority = 2;
- var OffscreenLanePriority = 1;
- var NoLanePriority = 0;
- var TotalLanes = 31;
- var NoLanes =
- /* */
- 0;
- var NoLane =
- /* */
- 0;
- var SyncLane =
- /* */
- 1;
- var SyncBatchedLane =
- /* */
- 2;
- var InputDiscreteHydrationLane =
- /* */
- 4;
- var InputDiscreteLanes =
- /* */
- 24;
- var InputContinuousHydrationLane =
- /* */
- 32;
- var InputContinuousLanes =
- /* */
- 192;
- var DefaultHydrationLane =
- /* */
- 256;
- var DefaultLanes =
- /* */
- 3584;
- var TransitionHydrationLane =
- /* */
- 4096;
- var TransitionLanes =
- /* */
- 4186112;
- var RetryLanes =
- /* */
- 62914560;
- var SomeRetryLane =
- /* */
- 33554432;
- var SelectiveHydrationLane =
- /* */
- 67108864;
- var NonIdleLanes =
- /* */
- 134217727;
- var IdleHydrationLane =
- /* */
- 134217728;
- var IdleLanes =
- /* */
- 805306368;
- var OffscreenLane =
- /* */
- 1073741824;
- var NoTimestamp = -1;
- function setCurrentUpdateLanePriority(newLanePriority) {
- } // "Registers" used to "return" multiple values
- // Used by getHighestPriorityLanes and getNextLanes:
-
- var return_highestLanePriority = DefaultLanePriority;
-
- function getHighestPriorityLanes(lanes) {
- if ((SyncLane & lanes) !== NoLanes) {
- return_highestLanePriority = SyncLanePriority;
- return SyncLane;
- }
-
- if ((SyncBatchedLane & lanes) !== NoLanes) {
- return_highestLanePriority = SyncBatchedLanePriority;
- return SyncBatchedLane;
- }
-
- if ((InputDiscreteHydrationLane & lanes) !== NoLanes) {
- return_highestLanePriority = InputDiscreteHydrationLanePriority;
- return InputDiscreteHydrationLane;
- }
-
- var inputDiscreteLanes = InputDiscreteLanes & lanes;
-
- if (inputDiscreteLanes !== NoLanes) {
- return_highestLanePriority = InputDiscreteLanePriority;
- return inputDiscreteLanes;
- }
-
- if ((lanes & InputContinuousHydrationLane) !== NoLanes) {
- return_highestLanePriority = InputContinuousHydrationLanePriority;
- return InputContinuousHydrationLane;
- }
-
- var inputContinuousLanes = InputContinuousLanes & lanes;
-
- if (inputContinuousLanes !== NoLanes) {
- return_highestLanePriority = InputContinuousLanePriority;
- return inputContinuousLanes;
- }
-
- if ((lanes & DefaultHydrationLane) !== NoLanes) {
- return_highestLanePriority = DefaultHydrationLanePriority;
- return DefaultHydrationLane;
- }
-
- var defaultLanes = DefaultLanes & lanes;
-
- if (defaultLanes !== NoLanes) {
- return_highestLanePriority = DefaultLanePriority;
- return defaultLanes;
- }
-
- if ((lanes & TransitionHydrationLane) !== NoLanes) {
- return_highestLanePriority = TransitionHydrationPriority;
- return TransitionHydrationLane;
- }
-
- var transitionLanes = TransitionLanes & lanes;
-
- if (transitionLanes !== NoLanes) {
- return_highestLanePriority = TransitionPriority;
- return transitionLanes;
- }
-
- var retryLanes = RetryLanes & lanes;
-
- if (retryLanes !== NoLanes) {
- return_highestLanePriority = RetryLanePriority;
- return retryLanes;
- }
-
- if (lanes & SelectiveHydrationLane) {
- return_highestLanePriority = SelectiveHydrationLanePriority;
- return SelectiveHydrationLane;
- }
-
- if ((lanes & IdleHydrationLane) !== NoLanes) {
- return_highestLanePriority = IdleHydrationLanePriority;
- return IdleHydrationLane;
- }
-
- var idleLanes = IdleLanes & lanes;
-
- if (idleLanes !== NoLanes) {
- return_highestLanePriority = IdleLanePriority;
- return idleLanes;
- }
-
- if ((OffscreenLane & lanes) !== NoLanes) {
- return_highestLanePriority = OffscreenLanePriority;
- return OffscreenLane;
- }
-
- {
- error('Should have found matching lanes. This is a bug in React.');
- } // This shouldn't be reachable, but as a fallback, return the entire bitmask.
-
-
- return_highestLanePriority = DefaultLanePriority;
- return lanes;
- }
-
- function schedulerPriorityToLanePriority(schedulerPriorityLevel) {
- switch (schedulerPriorityLevel) {
- case ImmediatePriority:
- return SyncLanePriority;
-
- case UserBlockingPriority:
- return InputContinuousLanePriority;
-
- case NormalPriority:
- case LowPriority:
- // TODO: Handle LowSchedulerPriority, somehow. Maybe the same lane as hydration.
- return DefaultLanePriority;
-
- case IdlePriority:
- return IdleLanePriority;
-
- default:
- return NoLanePriority;
- }
- }
- function lanePriorityToSchedulerPriority(lanePriority) {
- switch (lanePriority) {
- case SyncLanePriority:
- case SyncBatchedLanePriority:
- return ImmediatePriority;
-
- case InputDiscreteHydrationLanePriority:
- case InputDiscreteLanePriority:
- case InputContinuousHydrationLanePriority:
- case InputContinuousLanePriority:
- return UserBlockingPriority;
-
- case DefaultHydrationLanePriority:
- case DefaultLanePriority:
- case TransitionHydrationPriority:
- case TransitionPriority:
- case SelectiveHydrationLanePriority:
- case RetryLanePriority:
- return NormalPriority;
-
- case IdleHydrationLanePriority:
- case IdleLanePriority:
- case OffscreenLanePriority:
- return IdlePriority;
-
- case NoLanePriority:
- return NoPriority;
-
- default:
- {
- {
- throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
- }
- }
-
- }
- }
- function getNextLanes(root, wipLanes) {
- // Early bailout if there's no pending work left.
- var pendingLanes = root.pendingLanes;
-
- if (pendingLanes === NoLanes) {
- return_highestLanePriority = NoLanePriority;
- return NoLanes;
- }
-
- var nextLanes = NoLanes;
- var nextLanePriority = NoLanePriority;
- var expiredLanes = root.expiredLanes;
- var suspendedLanes = root.suspendedLanes;
- var pingedLanes = root.pingedLanes; // Check if any work has expired.
-
- if (expiredLanes !== NoLanes) {
- nextLanes = expiredLanes;
- nextLanePriority = return_highestLanePriority = SyncLanePriority;
- } else {
- // Do not work on any idle work until all the non-idle work has finished,
- // even if the work is suspended.
- var nonIdlePendingLanes = pendingLanes & NonIdleLanes;
-
- if (nonIdlePendingLanes !== NoLanes) {
- var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;
-
- if (nonIdleUnblockedLanes !== NoLanes) {
- nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
- nextLanePriority = return_highestLanePriority;
- } else {
- var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;
-
- if (nonIdlePingedLanes !== NoLanes) {
- nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
- nextLanePriority = return_highestLanePriority;
- }
- }
- } else {
- // The only remaining work is Idle.
- var unblockedLanes = pendingLanes & ~suspendedLanes;
-
- if (unblockedLanes !== NoLanes) {
- nextLanes = getHighestPriorityLanes(unblockedLanes);
- nextLanePriority = return_highestLanePriority;
- } else {
- if (pingedLanes !== NoLanes) {
- nextLanes = getHighestPriorityLanes(pingedLanes);
- nextLanePriority = return_highestLanePriority;
- }
- }
- }
- }
-
- if (nextLanes === NoLanes) {
- // This should only be reachable if we're suspended
- // TODO: Consider warning in this path if a fallback timer is not scheduled.
- return NoLanes;
- } // If there are higher priority lanes, we'll include them even if they
- // are suspended.
-
-
- nextLanes = pendingLanes & getEqualOrHigherPriorityLanes(nextLanes); // If we're already in the middle of a render, switching lanes will interrupt
- // it and we'll lose our progress. We should only do this if the new lanes are
- // higher priority.
-
- if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
- // bother waiting until the root is complete.
- (wipLanes & suspendedLanes) === NoLanes) {
- getHighestPriorityLanes(wipLanes);
- var wipLanePriority = return_highestLanePriority;
-
- if (nextLanePriority <= wipLanePriority) {
- return wipLanes;
- } else {
- return_highestLanePriority = nextLanePriority;
- }
- } // Check for entangled lanes and add them to the batch.
- //
- // A lane is said to be entangled with another when it's not allowed to render
- // in a batch that does not also include the other lane. Typically we do this
- // when multiple updates have the same source, and we only want to respond to
- // the most recent event from that source.
- //
- // Note that we apply entanglements *after* checking for partial work above.
- // This means that if a lane is entangled during an interleaved event while
- // it's already rendering, we won't interrupt it. This is intentional, since
- // entanglement is usually "best effort": we'll try our best to render the
- // lanes in the same batch, but it's not worth throwing out partially
- // completed work in order to do it.
- //
- // For those exceptions where entanglement is semantically important, like
- // useMutableSource, we should ensure that there is no partial work at the
- // time we apply the entanglement.
-
-
- var entangledLanes = root.entangledLanes;
-
- if (entangledLanes !== NoLanes) {
- var entanglements = root.entanglements;
- var lanes = nextLanes & entangledLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- nextLanes |= entanglements[index];
- lanes &= ~lane;
- }
- }
-
- return nextLanes;
- }
- function getMostRecentEventTime(root, lanes) {
- var eventTimes = root.eventTimes;
- var mostRecentEventTime = NoTimestamp;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- var eventTime = eventTimes[index];
-
- if (eventTime > mostRecentEventTime) {
- mostRecentEventTime = eventTime;
- }
-
- lanes &= ~lane;
- }
-
- return mostRecentEventTime;
- }
-
- function computeExpirationTime(lane, currentTime) {
- // TODO: Expiration heuristic is constant per lane, so could use a map.
- getHighestPriorityLanes(lane);
- var priority = return_highestLanePriority;
-
- if (priority >= InputContinuousLanePriority) {
- // User interactions should expire slightly more quickly.
- //
- // NOTE: This is set to the corresponding constant as in Scheduler.js. When
- // we made it larger, a product metric in www regressed, suggesting there's
- // a user interaction that's being starved by a series of synchronous
- // updates. If that theory is correct, the proper solution is to fix the
- // starvation. However, this scenario supports the idea that expiration
- // times are an important safeguard when starvation does happen.
- //
- // Also note that, in the case of user input specifically, this will soon no
- // longer be an issue because we plan to make user input synchronous by
- // default (until you enter `startTransition`, of course.)
- //
- // If weren't planning to make these updates synchronous soon anyway, I
- // would probably make this number a configurable parameter.
- return currentTime + 250;
- } else if (priority >= TransitionPriority) {
- return currentTime + 5000;
- } else {
- // Anything idle priority or lower should never expire.
- return NoTimestamp;
- }
- }
-
- function markStarvedLanesAsExpired(root, currentTime) {
- // TODO: This gets called every time we yield. We can optimize by storing
- // the earliest expiration time on the root. Then use that to quickly bail out
- // of this function.
- var pendingLanes = root.pendingLanes;
- var suspendedLanes = root.suspendedLanes;
- var pingedLanes = root.pingedLanes;
- var expirationTimes = root.expirationTimes; // Iterate through the pending lanes and check if we've reached their
- // expiration time. If so, we'll assume the update is being starved and mark
- // it as expired to force it to finish.
-
- var lanes = pendingLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- var expirationTime = expirationTimes[index];
-
- if (expirationTime === NoTimestamp) {
- // Found a pending lane with no expiration time. If it's not suspended, or
- // if it's pinged, assume it's CPU-bound. Compute a new expiration time
- // using the current time.
- if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
- // Assumes timestamps are monotonically increasing.
- expirationTimes[index] = computeExpirationTime(lane, currentTime);
- }
- } else if (expirationTime <= currentTime) {
- // This lane expired
- root.expiredLanes |= lane;
- }
-
- lanes &= ~lane;
- }
- } // This returns the highest priority pending lanes regardless of whether they
- function getLanesToRetrySynchronouslyOnError(root) {
- var everythingButOffscreen = root.pendingLanes & ~OffscreenLane;
-
- if (everythingButOffscreen !== NoLanes) {
- return everythingButOffscreen;
- }
-
- if (everythingButOffscreen & OffscreenLane) {
- return OffscreenLane;
- }
-
- return NoLanes;
- }
- function returnNextLanesPriority() {
- return return_highestLanePriority;
- }
- function includesNonIdleWork(lanes) {
- return (lanes & NonIdleLanes) !== NoLanes;
- }
- function includesOnlyRetries(lanes) {
- return (lanes & RetryLanes) === lanes;
- }
- function includesOnlyTransitions(lanes) {
- return (lanes & TransitionLanes) === lanes;
- } // To ensure consistency across multiple updates in the same event, this should
- // be a pure function, so that it always returns the same lane for given inputs.
-
- function findUpdateLane(lanePriority, wipLanes) {
- switch (lanePriority) {
- case NoLanePriority:
- break;
-
- case SyncLanePriority:
- return SyncLane;
-
- case SyncBatchedLanePriority:
- return SyncBatchedLane;
-
- case InputDiscreteLanePriority:
- {
- var _lane = pickArbitraryLane(InputDiscreteLanes & ~wipLanes);
-
- if (_lane === NoLane) {
- // Shift to the next priority level
- return findUpdateLane(InputContinuousLanePriority, wipLanes);
- }
-
- return _lane;
- }
-
- case InputContinuousLanePriority:
- {
- var _lane2 = pickArbitraryLane(InputContinuousLanes & ~wipLanes);
-
- if (_lane2 === NoLane) {
- // Shift to the next priority level
- return findUpdateLane(DefaultLanePriority, wipLanes);
- }
-
- return _lane2;
- }
-
- case DefaultLanePriority:
- {
- var _lane3 = pickArbitraryLane(DefaultLanes & ~wipLanes);
-
- if (_lane3 === NoLane) {
- // If all the default lanes are already being worked on, look for a
- // lane in the transition range.
- _lane3 = pickArbitraryLane(TransitionLanes & ~wipLanes);
-
- if (_lane3 === NoLane) {
- // All the transition lanes are taken, too. This should be very
- // rare, but as a last resort, pick a default lane. This will have
- // the effect of interrupting the current work-in-progress render.
- _lane3 = pickArbitraryLane(DefaultLanes);
- }
- }
-
- return _lane3;
- }
-
- case TransitionPriority: // Should be handled by findTransitionLane instead
-
- case RetryLanePriority:
- // Should be handled by findRetryLane instead
- break;
-
- case IdleLanePriority:
- var lane = pickArbitraryLane(IdleLanes & ~wipLanes);
-
- if (lane === NoLane) {
- lane = pickArbitraryLane(IdleLanes);
- }
-
- return lane;
- }
-
- {
- {
- throw Error( "Invalid update priority: " + lanePriority + ". This is a bug in React." );
- }
- }
- } // To ensure consistency across multiple updates in the same event, this should
- // be pure function, so that it always returns the same lane for given inputs.
-
- function findTransitionLane(wipLanes, pendingLanes) {
- // First look for lanes that are completely unclaimed, i.e. have no
- // pending work.
- var lane = pickArbitraryLane(TransitionLanes & ~pendingLanes);
-
- if (lane === NoLane) {
- // If all lanes have pending work, look for a lane that isn't currently
- // being worked on.
- lane = pickArbitraryLane(TransitionLanes & ~wipLanes);
-
- if (lane === NoLane) {
- // If everything is being worked on, pick any lane. This has the
- // effect of interrupting the current work-in-progress.
- lane = pickArbitraryLane(TransitionLanes);
- }
- }
-
- return lane;
- } // To ensure consistency across multiple updates in the same event, this should
- // be pure function, so that it always returns the same lane for given inputs.
-
- function findRetryLane(wipLanes) {
- // This is a fork of `findUpdateLane` designed specifically for Suspense
- // "retries" — a special update that attempts to flip a Suspense boundary
- // from its placeholder state to its primary/resolved state.
- var lane = pickArbitraryLane(RetryLanes & ~wipLanes);
-
- if (lane === NoLane) {
- lane = pickArbitraryLane(RetryLanes);
- }
-
- return lane;
- }
-
- function getHighestPriorityLane(lanes) {
- return lanes & -lanes;
- }
-
- function getLowestPriorityLane(lanes) {
- // This finds the most significant non-zero bit.
- var index = 31 - clz32(lanes);
- return index < 0 ? NoLanes : 1 << index;
- }
-
- function getEqualOrHigherPriorityLanes(lanes) {
- return (getLowestPriorityLane(lanes) << 1) - 1;
- }
-
- function pickArbitraryLane(lanes) {
- // This wrapper function gets inlined. Only exists so to communicate that it
- // doesn't matter which bit is selected; you can pick any bit without
- // affecting the algorithms where its used. Here I'm using
- // getHighestPriorityLane because it requires the fewest operations.
- return getHighestPriorityLane(lanes);
- }
-
- function pickArbitraryLaneIndex(lanes) {
- return 31 - clz32(lanes);
- }
-
- function laneToIndex(lane) {
- return pickArbitraryLaneIndex(lane);
- }
-
- function includesSomeLane(a, b) {
- return (a & b) !== NoLanes;
- }
- function isSubsetOfLanes(set, subset) {
- return (set & subset) === subset;
- }
- function mergeLanes(a, b) {
- return a | b;
- }
- function removeLanes(set, subset) {
- return set & ~subset;
- } // Seems redundant, but it changes the type from a single lane (used for
- // updates) to a group of lanes (used for flushing work).
-
- function laneToLanes(lane) {
- return lane;
- }
- function higherPriorityLane(a, b) {
- // This works because the bit ranges decrease in priority as you go left.
- return a !== NoLane && a < b ? a : b;
- }
- function createLaneMap(initial) {
- // Intentionally pushing one by one.
- // https://v8.dev/blog/elements-kinds#avoid-creating-holes
- var laneMap = [];
-
- for (var i = 0; i < TotalLanes; i++) {
- laneMap.push(initial);
- }
-
- return laneMap;
- }
- function markRootUpdated(root, updateLane, eventTime) {
- root.pendingLanes |= updateLane; // TODO: Theoretically, any update to any lane can unblock any other lane. But
- // it's not practical to try every single possible combination. We need a
- // heuristic to decide which lanes to attempt to render, and in which batches.
- // For now, we use the same heuristic as in the old ExpirationTimes model:
- // retry any lane at equal or lower priority, but don't try updates at higher
- // priority without also including the lower priority updates. This works well
- // when considering updates across different priority levels, but isn't
- // sufficient for updates within the same priority, since we want to treat
- // those updates as parallel.
- // Unsuspend any update at equal or lower priority.
-
- var higherPriorityLanes = updateLane - 1; // Turns 0b1000 into 0b0111
-
- root.suspendedLanes &= higherPriorityLanes;
- root.pingedLanes &= higherPriorityLanes;
- var eventTimes = root.eventTimes;
- var index = laneToIndex(updateLane); // We can always overwrite an existing timestamp because we prefer the most
- // recent event, and we assume time is monotonically increasing.
-
- eventTimes[index] = eventTime;
- }
- function markRootSuspended(root, suspendedLanes) {
- root.suspendedLanes |= suspendedLanes;
- root.pingedLanes &= ~suspendedLanes; // The suspended lanes are no longer CPU-bound. Clear their expiration times.
-
- var expirationTimes = root.expirationTimes;
- var lanes = suspendedLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- expirationTimes[index] = NoTimestamp;
- lanes &= ~lane;
- }
- }
- function markRootPinged(root, pingedLanes, eventTime) {
- root.pingedLanes |= root.suspendedLanes & pingedLanes;
- }
- function markDiscreteUpdatesExpired(root) {
- root.expiredLanes |= InputDiscreteLanes & root.pendingLanes;
- }
- function hasDiscreteLanes(lanes) {
- return (lanes & InputDiscreteLanes) !== NoLanes;
- }
- function markRootMutableRead(root, updateLane) {
- root.mutableReadLanes |= updateLane & root.pendingLanes;
- }
- function markRootFinished(root, remainingLanes) {
- var noLongerPendingLanes = root.pendingLanes & ~remainingLanes;
- root.pendingLanes = remainingLanes; // Let's try everything again
-
- root.suspendedLanes = 0;
- root.pingedLanes = 0;
- root.expiredLanes &= remainingLanes;
- root.mutableReadLanes &= remainingLanes;
- root.entangledLanes &= remainingLanes;
- var entanglements = root.entanglements;
- var eventTimes = root.eventTimes;
- var expirationTimes = root.expirationTimes; // Clear the lanes that no longer have pending work
-
- var lanes = noLongerPendingLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- entanglements[index] = NoLanes;
- eventTimes[index] = NoTimestamp;
- expirationTimes[index] = NoTimestamp;
- lanes &= ~lane;
- }
- }
- function markRootEntangled(root, entangledLanes) {
- root.entangledLanes |= entangledLanes;
- var entanglements = root.entanglements;
- var lanes = entangledLanes;
-
- while (lanes > 0) {
- var index = pickArbitraryLaneIndex(lanes);
- var lane = 1 << index;
- entanglements[index] |= entangledLanes;
- lanes &= ~lane;
- }
- }
- var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback; // Count leading zeros. Only used on lanes, so assume input is an integer.
- // Based on:
- // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/clz32
-
- var log = Math.log;
- var LN2 = Math.LN2;
-
- function clz32Fallback(lanes) {
- if (lanes === 0) {
- return 32;
- }
-
- return 31 - (log(lanes) / LN2 | 0) | 0;
- }
-
- // Intentionally not named imports because Rollup would use dynamic dispatch for
- var UserBlockingPriority$1 = unstable_UserBlockingPriority,
- runWithPriority = unstable_runWithPriority; // TODO: can we stop exporting these?
-
- var _enabled = true; // This is exported in FB builds for use by legacy FB layer infra.
- // We'd like to remove this but it's not clear if this is safe.
-
- function setEnabled(enabled) {
- _enabled = !!enabled;
- }
- function isEnabled() {
- return _enabled;
- }
- function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
- var eventPriority = getEventPriorityForPluginSystem(domEventName);
- var listenerWrapper;
-
- switch (eventPriority) {
- case DiscreteEvent:
- listenerWrapper = dispatchDiscreteEvent;
- break;
-
- case UserBlockingEvent:
- listenerWrapper = dispatchUserBlockingUpdate;
- break;
-
- case ContinuousEvent:
- default:
- listenerWrapper = dispatchEvent;
- break;
- }
-
- return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
- }
-
- function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
- {
- flushDiscreteUpdatesIfNeeded(nativeEvent.timeStamp);
- }
-
- discreteUpdates(dispatchEvent, domEventName, eventSystemFlags, container, nativeEvent);
- }
-
- function dispatchUserBlockingUpdate(domEventName, eventSystemFlags, container, nativeEvent) {
- {
- runWithPriority(UserBlockingPriority$1, dispatchEvent.bind(null, domEventName, eventSystemFlags, container, nativeEvent));
- }
- }
-
- function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- if (!_enabled) {
- return;
- }
-
- var allowReplay = true;
-
- {
- // TODO: replaying capture phase events is currently broken
- // because we used to do it during top-level native bubble handlers
- // but now we use different bubble and capture handlers.
- // In eager mode, we attach capture listeners early, so we need
- // to filter them out until we fix the logic to handle them correctly.
- // This could've been outside the flag but I put it inside to reduce risk.
- allowReplay = (eventSystemFlags & IS_CAPTURE_PHASE) === 0;
- }
-
- if (allowReplay && hasQueuedDiscreteEvents() && isReplayableDiscreteEvent(domEventName)) {
- // If we already have a queue of discrete events, and this is another discrete
- // event, then we can't dispatch it regardless of its target, since they
- // need to dispatch in order.
- queueDiscreteEvent(null, // Flags that we're not actually blocked on anything as far as we know.
- domEventName, eventSystemFlags, targetContainer, nativeEvent);
- return;
- }
-
- var blockedOn = attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
-
- if (blockedOn === null) {
- // We successfully dispatched this event.
- if (allowReplay) {
- clearIfContinuousEvent(domEventName, nativeEvent);
- }
-
- return;
- }
-
- if (allowReplay) {
- if (isReplayableDiscreteEvent(domEventName)) {
- // This this to be replayed later once the target is available.
- queueDiscreteEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
- return;
- }
-
- if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
- return;
- } // We need to clear only if we didn't queue because
- // queueing is accummulative.
-
-
- clearIfContinuousEvent(domEventName, nativeEvent);
- } // This is not replayable so we'll invoke it but without a target,
- // in case the event system needs to trace it.
-
-
- dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
- } // Attempt dispatching an event. Returns a SuspenseInstance or Container if it's blocked.
-
- function attemptToDispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
- // TODO: Warn if _enabled is false.
- var nativeEventTarget = getEventTarget(nativeEvent);
- var targetInst = getClosestInstanceFromNode(nativeEventTarget);
-
- if (targetInst !== null) {
- var nearestMounted = getNearestMountedFiber(targetInst);
-
- if (nearestMounted === null) {
- // This tree has been unmounted already. Dispatch without a target.
- targetInst = null;
- } else {
- var tag = nearestMounted.tag;
-
- if (tag === SuspenseComponent) {
- var instance = getSuspenseInstanceFromFiber(nearestMounted);
-
- if (instance !== null) {
- // Queue the event to be replayed later. Abort dispatching since we
- // don't want this event dispatched twice through the event system.
- // TODO: If this is the first discrete event in the queue. Schedule an increased
- // priority for this boundary.
- return instance;
- } // This shouldn't happen, something went wrong but to avoid blocking
- // the whole system, dispatch the event without a target.
- // TODO: Warn.
-
-
- targetInst = null;
- } else if (tag === HostRoot) {
- var root = nearestMounted.stateNode;
-
- if (root.hydrate) {
- // If this happens during a replay something went wrong and it might block
- // the whole system.
- return getContainerFromFiber(nearestMounted);
- }
-
- targetInst = null;
- } else if (nearestMounted !== targetInst) {
- // If we get an event (ex: img onload) before committing that
- // component's mount, ignore it for now (that is, treat it as if it was an
- // event on a non-React tree). We might also consider queueing events and
- // dispatching them after the mount.
- targetInst = null;
- }
- }
- }
-
- dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer); // We're not blocked on anything.
-
- return null;
- }
-
- function addEventBubbleListener(target, eventType, listener) {
- target.addEventListener(eventType, listener, false);
- return listener;
- }
- function addEventCaptureListener(target, eventType, listener) {
- target.addEventListener(eventType, listener, true);
- return listener;
- }
- function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
- target.addEventListener(eventType, listener, {
- capture: true,
- passive: passive
- });
- return listener;
- }
- function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
- target.addEventListener(eventType, listener, {
- passive: passive
- });
- return listener;
- }
-
- /**
- * These variables store information about text content of a target node,
- * allowing comparison of content before and after a given event.
- *
- * Identify the node where selection currently begins, then observe
- * both its text content and its current position in the DOM. Since the
- * browser may natively replace the target node during composition, we can
- * use its position to find its replacement.
- *
- *
- */
- var root = null;
- var startText = null;
- var fallbackText = null;
- function initialize(nativeEventTarget) {
- root = nativeEventTarget;
- startText = getText();
- return true;
- }
- function reset() {
- root = null;
- startText = null;
- fallbackText = null;
- }
- function getData() {
- if (fallbackText) {
- return fallbackText;
- }
-
- var start;
- var startValue = startText;
- var startLength = startValue.length;
- var end;
- var endValue = getText();
- var endLength = endValue.length;
-
- for (start = 0; start < startLength; start++) {
- if (startValue[start] !== endValue[start]) {
- break;
- }
- }
-
- var minEnd = startLength - start;
-
- for (end = 1; end <= minEnd; end++) {
- if (startValue[startLength - end] !== endValue[endLength - end]) {
- break;
- }
- }
-
- var sliceTail = end > 1 ? 1 - end : undefined;
- fallbackText = endValue.slice(start, sliceTail);
- return fallbackText;
- }
- function getText() {
- if ('value' in root) {
- return root.value;
- }
-
- return root.textContent;
- }
-
- /**
- * `charCode` represents the actual "character code" and is safe to use with
- * `String.fromCharCode`. As such, only keys that correspond to printable
- * characters produce a valid `charCode`, the only exception to this is Enter.
- * The Tab-key is considered non-printable and does not have a `charCode`,
- * presumably because it does not produce a tab-character in browsers.
- *
- * @param {object} nativeEvent Native browser event.
- * @return {number} Normalized `charCode` property.
- */
- function getEventCharCode(nativeEvent) {
- var charCode;
- var keyCode = nativeEvent.keyCode;
-
- if ('charCode' in nativeEvent) {
- charCode = nativeEvent.charCode; // FF does not set `charCode` for the Enter-key, check against `keyCode`.
-
- if (charCode === 0 && keyCode === 13) {
- charCode = 13;
- }
- } else {
- // IE8 does not implement `charCode`, but `keyCode` has the correct value.
- charCode = keyCode;
- } // IE and Edge (on Windows) and Chrome / Safari (on Windows and Linux)
- // report Enter as charCode 10 when ctrl is pressed.
-
-
- if (charCode === 10) {
- charCode = 13;
- } // Some non-printable keys are reported in `charCode`/`keyCode`, discard them.
- // Must not discard the (non-)printable Enter-key.
-
-
- if (charCode >= 32 || charCode === 13) {
- return charCode;
- }
-
- return 0;
- }
-
- function functionThatReturnsTrue() {
- return true;
- }
-
- function functionThatReturnsFalse() {
- return false;
- } // This is intentionally a factory so that we have different returned constructors.
- // If we had a single constructor, it would be megamorphic and engines would deopt.
-
-
- function createSyntheticEvent(Interface) {
- /**
- * Synthetic events are dispatched by event plugins, typically in response to a
- * top-level event delegation handler.
- *
- * These systems should generally use pooling to reduce the frequency of garbage
- * collection. The system should check `isPersistent` to determine whether the
- * event should be released into the pool after being dispatched. Users that
- * need a persisted event should invoke `persist`.
- *
- * Synthetic events (and subclasses) implement the DOM Level 3 Events API by
- * normalizing browser quirks. Subclasses do not necessarily have to implement a
- * DOM interface; custom application-specific events can also subclass this.
- */
- function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
- this._reactName = reactName;
- this._targetInst = targetInst;
- this.type = reactEventType;
- this.nativeEvent = nativeEvent;
- this.target = nativeEventTarget;
- this.currentTarget = null;
-
- for (var _propName in Interface) {
- if (!Interface.hasOwnProperty(_propName)) {
- continue;
- }
-
- var normalize = Interface[_propName];
-
- if (normalize) {
- this[_propName] = normalize(nativeEvent);
- } else {
- this[_propName] = nativeEvent[_propName];
- }
- }
-
- var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
-
- if (defaultPrevented) {
- this.isDefaultPrevented = functionThatReturnsTrue;
- } else {
- this.isDefaultPrevented = functionThatReturnsFalse;
- }
-
- this.isPropagationStopped = functionThatReturnsFalse;
- return this;
- }
-
- _assign(SyntheticBaseEvent.prototype, {
- preventDefault: function () {
- this.defaultPrevented = true;
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.preventDefault) {
- event.preventDefault(); // $FlowFixMe - flow is not aware of `unknown` in IE
- } else if (typeof event.returnValue !== 'unknown') {
- event.returnValue = false;
- }
-
- this.isDefaultPrevented = functionThatReturnsTrue;
- },
- stopPropagation: function () {
- var event = this.nativeEvent;
-
- if (!event) {
- return;
- }
-
- if (event.stopPropagation) {
- event.stopPropagation(); // $FlowFixMe - flow is not aware of `unknown` in IE
- } else if (typeof event.cancelBubble !== 'unknown') {
- // The ChangeEventPlugin registers a "propertychange" event for
- // IE. This event does not support bubbling or cancelling, and
- // any references to cancelBubble throw "Member not found". A
- // typeof check of "unknown" circumvents this issue (and is also
- // IE specific).
- event.cancelBubble = true;
- }
-
- this.isPropagationStopped = functionThatReturnsTrue;
- },
-
- /**
- * We release all dispatched `SyntheticEvent`s after each event loop, adding
- * them back into the pool. This allows a way to hold onto a reference that
- * won't be added back into the pool.
- */
- persist: function () {// Modern event system doesn't use pooling.
- },
-
- /**
- * Checks if this event should be released back into the pool.
- *
- * @return {boolean} True if this should not be released, false otherwise.
- */
- isPersistent: functionThatReturnsTrue
- });
-
- return SyntheticBaseEvent;
- }
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
- var EventInterface = {
- eventPhase: 0,
- bubbles: 0,
- cancelable: 0,
- timeStamp: function (event) {
- return event.timeStamp || Date.now();
- },
- defaultPrevented: 0,
- isTrusted: 0
- };
- var SyntheticEvent = createSyntheticEvent(EventInterface);
-
- var UIEventInterface = _assign({}, EventInterface, {
- view: 0,
- detail: 0
- });
-
- var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
- var lastMovementX;
- var lastMovementY;
- var lastMouseEvent;
-
- function updateMouseMovementPolyfillState(event) {
- if (event !== lastMouseEvent) {
- if (lastMouseEvent && event.type === 'mousemove') {
- lastMovementX = event.screenX - lastMouseEvent.screenX;
- lastMovementY = event.screenY - lastMouseEvent.screenY;
- } else {
- lastMovementX = 0;
- lastMovementY = 0;
- }
-
- lastMouseEvent = event;
- }
- }
- /**
- * @interface MouseEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
- var MouseEventInterface = _assign({}, UIEventInterface, {
- screenX: 0,
- screenY: 0,
- clientX: 0,
- clientY: 0,
- pageX: 0,
- pageY: 0,
- ctrlKey: 0,
- shiftKey: 0,
- altKey: 0,
- metaKey: 0,
- getModifierState: getEventModifierState,
- button: 0,
- buttons: 0,
- relatedTarget: function (event) {
- if (event.relatedTarget === undefined) return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
- return event.relatedTarget;
- },
- movementX: function (event) {
- if ('movementX' in event) {
- return event.movementX;
- }
-
- updateMouseMovementPolyfillState(event);
- return lastMovementX;
- },
- movementY: function (event) {
- if ('movementY' in event) {
- return event.movementY;
- } // Don't need to call updateMouseMovementPolyfillState() here
- // because it's guaranteed to have already run when movementX
- // was copied.
-
-
- return lastMovementY;
- }
- });
-
- var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
- /**
- * @interface DragEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var DragEventInterface = _assign({}, MouseEventInterface, {
- dataTransfer: 0
- });
-
- var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
- /**
- * @interface FocusEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var FocusEventInterface = _assign({}, UIEventInterface, {
- relatedTarget: 0
- });
-
- var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/css3-animations/#AnimationEvent-interface
- * @see https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent
- */
-
- var AnimationEventInterface = _assign({}, EventInterface, {
- animationName: 0,
- elapsedTime: 0,
- pseudoElement: 0
- });
-
- var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/clipboard-apis/
- */
-
- var ClipboardEventInterface = _assign({}, EventInterface, {
- clipboardData: function (event) {
- return 'clipboardData' in event ? event.clipboardData : window.clipboardData;
- }
- });
-
- var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#events-compositionevents
- */
-
- var CompositionEventInterface = _assign({}, EventInterface, {
- data: 0
- });
-
- var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105
- * /#events-inputevents
- */
- // Happens to share the same list for now.
-
- var SyntheticInputEvent = SyntheticCompositionEvent;
- /**
- * Normalization of deprecated HTML5 `key` values
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
- var normalizeKey = {
- Esc: 'Escape',
- Spacebar: ' ',
- Left: 'ArrowLeft',
- Up: 'ArrowUp',
- Right: 'ArrowRight',
- Down: 'ArrowDown',
- Del: 'Delete',
- Win: 'OS',
- Menu: 'ContextMenu',
- Apps: 'ContextMenu',
- Scroll: 'ScrollLock',
- MozPrintableKey: 'Unidentified'
- };
- /**
- * Translation from legacy `keyCode` to HTML5 `key`
- * Only special keys supported, all others depend on keyboard layout or browser
- * @see https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Key_names
- */
-
- var translateToKey = {
- '8': 'Backspace',
- '9': 'Tab',
- '12': 'Clear',
- '13': 'Enter',
- '16': 'Shift',
- '17': 'Control',
- '18': 'Alt',
- '19': 'Pause',
- '20': 'CapsLock',
- '27': 'Escape',
- '32': ' ',
- '33': 'PageUp',
- '34': 'PageDown',
- '35': 'End',
- '36': 'Home',
- '37': 'ArrowLeft',
- '38': 'ArrowUp',
- '39': 'ArrowRight',
- '40': 'ArrowDown',
- '45': 'Insert',
- '46': 'Delete',
- '112': 'F1',
- '113': 'F2',
- '114': 'F3',
- '115': 'F4',
- '116': 'F5',
- '117': 'F6',
- '118': 'F7',
- '119': 'F8',
- '120': 'F9',
- '121': 'F10',
- '122': 'F11',
- '123': 'F12',
- '144': 'NumLock',
- '145': 'ScrollLock',
- '224': 'Meta'
- };
- /**
- * @param {object} nativeEvent Native browser event.
- * @return {string} Normalized `key` property.
- */
-
- function getEventKey(nativeEvent) {
- if (nativeEvent.key) {
- // Normalize inconsistent values reported by browsers due to
- // implementations of a working draft specification.
- // FireFox implements `key` but returns `MozPrintableKey` for all
- // printable characters (normalized to `Unidentified`), ignore it.
- var key = normalizeKey[nativeEvent.key] || nativeEvent.key;
-
- if (key !== 'Unidentified') {
- return key;
- }
- } // Browser does not implement `key`, polyfill as much of it as we can.
-
-
- if (nativeEvent.type === 'keypress') {
- var charCode = getEventCharCode(nativeEvent); // The enter-key is technically both printable and non-printable and can
- // thus be captured by `keypress`, no other non-printable key should.
-
- return charCode === 13 ? 'Enter' : String.fromCharCode(charCode);
- }
-
- if (nativeEvent.type === 'keydown' || nativeEvent.type === 'keyup') {
- // While user keyboard layout determines the actual meaning of each
- // `keyCode` value, almost all function keys have a universal value.
- return translateToKey[nativeEvent.keyCode] || 'Unidentified';
- }
-
- return '';
- }
- /**
- * Translation from modifier key to the associated property in the event.
- * @see http://www.w3.org/TR/DOM-Level-3-Events/#keys-Modifiers
- */
-
-
- var modifierKeyToProp = {
- Alt: 'altKey',
- Control: 'ctrlKey',
- Meta: 'metaKey',
- Shift: 'shiftKey'
- }; // Older browsers (Safari <= 10, iOS Safari <= 10.2) do not support
- // getModifierState. If getModifierState is not supported, we map it to a set of
- // modifier keys exposed by the event. In this case, Lock-keys are not supported.
-
- function modifierStateGetter(keyArg) {
- var syntheticEvent = this;
- var nativeEvent = syntheticEvent.nativeEvent;
-
- if (nativeEvent.getModifierState) {
- return nativeEvent.getModifierState(keyArg);
- }
-
- var keyProp = modifierKeyToProp[keyArg];
- return keyProp ? !!nativeEvent[keyProp] : false;
- }
-
- function getEventModifierState(nativeEvent) {
- return modifierStateGetter;
- }
- /**
- * @interface KeyboardEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
-
- var KeyboardEventInterface = _assign({}, UIEventInterface, {
- key: getEventKey,
- code: 0,
- location: 0,
- ctrlKey: 0,
- shiftKey: 0,
- altKey: 0,
- metaKey: 0,
- repeat: 0,
- locale: 0,
- getModifierState: getEventModifierState,
- // Legacy Interface
- charCode: function (event) {
- // `charCode` is the result of a KeyPress event and represents the value of
- // the actual printable character.
- // KeyPress is deprecated, but its replacement is not yet final and not
- // implemented in any major browser. Only KeyPress has charCode.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- return 0;
- },
- keyCode: function (event) {
- // `keyCode` is the result of a KeyDown/Up event and represents the value of
- // physical keyboard key.
- // The actual meaning of the value depends on the users' keyboard layout
- // which cannot be detected. Assuming that it is a US keyboard layout
- // provides a surprisingly accurate mapping for US and European users.
- // Due to this, it is left to the user to implement at this time.
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- },
- which: function (event) {
- // `which` is an alias for either `keyCode` or `charCode` depending on the
- // type of the event.
- if (event.type === 'keypress') {
- return getEventCharCode(event);
- }
-
- if (event.type === 'keydown' || event.type === 'keyup') {
- return event.keyCode;
- }
-
- return 0;
- }
- });
-
- var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
- /**
- * @interface PointerEvent
- * @see http://www.w3.org/TR/pointerevents/
- */
-
- var PointerEventInterface = _assign({}, MouseEventInterface, {
- pointerId: 0,
- width: 0,
- height: 0,
- pressure: 0,
- tangentialPressure: 0,
- tiltX: 0,
- tiltY: 0,
- twist: 0,
- pointerType: 0,
- isPrimary: 0
- });
-
- var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
- /**
- * @interface TouchEvent
- * @see http://www.w3.org/TR/touch-events/
- */
-
- var TouchEventInterface = _assign({}, UIEventInterface, {
- touches: 0,
- targetTouches: 0,
- changedTouches: 0,
- altKey: 0,
- metaKey: 0,
- ctrlKey: 0,
- shiftKey: 0,
- getModifierState: getEventModifierState
- });
-
- var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
- /**
- * @interface Event
- * @see http://www.w3.org/TR/2009/WD-css3-transitions-20090320/#transition-events-
- * @see https://developer.mozilla.org/en-US/docs/Web/API/TransitionEvent
- */
-
- var TransitionEventInterface = _assign({}, EventInterface, {
- propertyName: 0,
- elapsedTime: 0,
- pseudoElement: 0
- });
-
- var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
- /**
- * @interface WheelEvent
- * @see http://www.w3.org/TR/DOM-Level-3-Events/
- */
-
- var WheelEventInterface = _assign({}, MouseEventInterface, {
- deltaX: function (event) {
- return 'deltaX' in event ? event.deltaX : // Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
- 'wheelDeltaX' in event ? -event.wheelDeltaX : 0;
- },
- deltaY: function (event) {
- return 'deltaY' in event ? event.deltaY : // Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
- 'wheelDeltaY' in event ? -event.wheelDeltaY : // Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
- 'wheelDelta' in event ? -event.wheelDelta : 0;
- },
- deltaZ: 0,
- // Browsers without "deltaMode" is reporting in raw wheel delta where one
- // notch on the scroll is always +/- 120, roughly equivalent to pixels.
- // A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
- // ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
- deltaMode: 0
- });
-
- var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
-
- var END_KEYCODES = [9, 13, 27, 32]; // Tab, Return, Esc, Space
-
- var START_KEYCODE = 229;
- var canUseCompositionEvent = canUseDOM && 'CompositionEvent' in window;
- var documentMode = null;
-
- if (canUseDOM && 'documentMode' in document) {
- documentMode = document.documentMode;
- } // Webkit offers a very useful `textInput` event that can be used to
- // directly represent `beforeInput`. The IE `textinput` event is not as
- // useful, so we don't use it.
-
-
- var canUseTextInputEvent = canUseDOM && 'TextEvent' in window && !documentMode; // In IE9+, we have access to composition events, but the data supplied
- // by the native compositionend event may be incorrect. Japanese ideographic
- // spaces, for instance (\u3000) are not recorded correctly.
-
- var useFallbackCompositionData = canUseDOM && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
- var SPACEBAR_CODE = 32;
- var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
-
- function registerEvents() {
- registerTwoPhaseEvent('onBeforeInput', ['compositionend', 'keypress', 'textInput', 'paste']);
- registerTwoPhaseEvent('onCompositionEnd', ['compositionend', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
- registerTwoPhaseEvent('onCompositionStart', ['compositionstart', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
- registerTwoPhaseEvent('onCompositionUpdate', ['compositionupdate', 'focusout', 'keydown', 'keypress', 'keyup', 'mousedown']);
- } // Track whether we've ever handled a keypress on the space key.
-
-
- var hasSpaceKeypress = false;
- /**
- * Return whether a native keypress event is assumed to be a command.
- * This is required because Firefox fires `keypress` events for key commands
- * (cut, copy, select-all, etc.) even though no character is inserted.
- */
-
- function isKeypressCommand(nativeEvent) {
- return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
- !(nativeEvent.ctrlKey && nativeEvent.altKey);
- }
- /**
- * Translate native top level events into event types.
- */
-
-
- function getCompositionEventType(domEventName) {
- switch (domEventName) {
- case 'compositionstart':
- return 'onCompositionStart';
-
- case 'compositionend':
- return 'onCompositionEnd';
-
- case 'compositionupdate':
- return 'onCompositionUpdate';
- }
- }
- /**
- * Does our fallback best-guess model think this event signifies that
- * composition has begun?
- */
-
-
- function isFallbackCompositionStart(domEventName, nativeEvent) {
- return domEventName === 'keydown' && nativeEvent.keyCode === START_KEYCODE;
- }
- /**
- * Does our fallback mode think that this event is the end of composition?
- */
-
-
- function isFallbackCompositionEnd(domEventName, nativeEvent) {
- switch (domEventName) {
- case 'keyup':
- // Command keys insert or clear IME input.
- return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
-
- case 'keydown':
- // Expect IME keyCode on each keydown. If we get any other
- // code we must have exited earlier.
- return nativeEvent.keyCode !== START_KEYCODE;
-
- case 'keypress':
- case 'mousedown':
- case 'focusout':
- // Events are not possible without cancelling IME.
- return true;
-
- default:
- return false;
- }
- }
- /**
- * Google Input Tools provides composition data via a CustomEvent,
- * with the `data` property populated in the `detail` object. If this
- * is available on the event object, use it. If not, this is a plain
- * composition event and we have nothing special to extract.
- *
- * @param {object} nativeEvent
- * @return {?string}
- */
-
-
- function getDataFromCustomEvent(nativeEvent) {
- var detail = nativeEvent.detail;
-
- if (typeof detail === 'object' && 'data' in detail) {
- return detail.data;
- }
-
- return null;
- }
- /**
- * Check if a composition event was triggered by Korean IME.
- * Our fallback mode does not work well with IE's Korean IME,
- * so just use native composition events when Korean IME is used.
- * Although CompositionEvent.locale property is deprecated,
- * it is available in IE, where our fallback mode is enabled.
- *
- * @param {object} nativeEvent
- * @return {boolean}
- */
-
-
- function isUsingKoreanIME(nativeEvent) {
- return nativeEvent.locale === 'ko';
- } // Track the current IME composition status, if any.
-
-
- var isComposing = false;
- /**
- * @return {?object} A SyntheticCompositionEvent.
- */
-
- function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
- var eventType;
- var fallbackData;
-
- if (canUseCompositionEvent) {
- eventType = getCompositionEventType(domEventName);
- } else if (!isComposing) {
- if (isFallbackCompositionStart(domEventName, nativeEvent)) {
- eventType = 'onCompositionStart';
- }
- } else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
- eventType = 'onCompositionEnd';
- }
-
- if (!eventType) {
- return null;
- }
-
- if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
- // The current composition is stored statically and must not be
- // overwritten while composition continues.
- if (!isComposing && eventType === 'onCompositionStart') {
- isComposing = initialize(nativeEventTarget);
- } else if (eventType === 'onCompositionEnd') {
- if (isComposing) {
- fallbackData = getData();
- }
- }
- }
-
- var listeners = accumulateTwoPhaseListeners(targetInst, eventType);
-
- if (listeners.length > 0) {
- var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
-
- if (fallbackData) {
- // Inject data generated from fallback path into the synthetic event.
- // This matches the property of native CompositionEventInterface.
- event.data = fallbackData;
- } else {
- var customData = getDataFromCustomEvent(nativeEvent);
-
- if (customData !== null) {
- event.data = customData;
- }
- }
- }
- }
-
- function getNativeBeforeInputChars(domEventName, nativeEvent) {
- switch (domEventName) {
- case 'compositionend':
- return getDataFromCustomEvent(nativeEvent);
-
- case 'keypress':
- /**
- * If native `textInput` events are available, our goal is to make
- * use of them. However, there is a special case: the spacebar key.
- * In Webkit, preventing default on a spacebar `textInput` event
- * cancels character insertion, but it *also* causes the browser
- * to fall back to its default spacebar behavior of scrolling the
- * page.
- *
- * Tracking at:
- * https://code.google.com/p/chromium/issues/detail?id=355103
- *
- * To avoid this issue, use the keypress event as if no `textInput`
- * event is available.
- */
- var which = nativeEvent.which;
-
- if (which !== SPACEBAR_CODE) {
- return null;
- }
-
- hasSpaceKeypress = true;
- return SPACEBAR_CHAR;
-
- case 'textInput':
- // Record the characters to be added to the DOM.
- var chars = nativeEvent.data; // If it's a spacebar character, assume that we have already handled
- // it at the keypress level and bail immediately. Android Chrome
- // doesn't give us keycodes, so we need to ignore it.
-
- if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
- return null;
- }
-
- return chars;
-
- default:
- // For other native event types, do nothing.
- return null;
- }
- }
- /**
- * For browsers that do not provide the `textInput` event, extract the
- * appropriate string to use for SyntheticInputEvent.
- */
-
-
- function getFallbackBeforeInputChars(domEventName, nativeEvent) {
- // If we are currently composing (IME) and using a fallback to do so,
- // try to extract the composed characters from the fallback object.
- // If composition event is available, we extract a string only at
- // compositionevent, otherwise extract it at fallback events.
- if (isComposing) {
- if (domEventName === 'compositionend' || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
- var chars = getData();
- reset();
- isComposing = false;
- return chars;
- }
-
- return null;
- }
-
- switch (domEventName) {
- case 'paste':
- // If a paste event occurs after a keypress, throw out the input
- // chars. Paste events should not lead to BeforeInput events.
- return null;
-
- case 'keypress':
- /**
- * As of v27, Firefox may fire keypress events even when no character
- * will be inserted. A few possibilities:
- *
- * - `which` is `0`. Arrow keys, Esc key, etc.
- *
- * - `which` is the pressed key code, but no char is available.
- * Ex: 'AltGr + d` in Polish. There is no modified character for
- * this key combination and no character is inserted into the
- * document, but FF fires the keypress for char code `100` anyway.
- * No `input` event will occur.
- *
- * - `which` is the pressed key code, but a command combination is
- * being used. Ex: `Cmd+C`. No character is inserted, and no
- * `input` event will occur.
- */
- if (!isKeypressCommand(nativeEvent)) {
- // IE fires the `keypress` event when a user types an emoji via
- // Touch keyboard of Windows. In such a case, the `char` property
- // holds an emoji character like `\uD83D\uDE0A`. Because its length
- // is 2, the property `which` does not represent an emoji correctly.
- // In such a case, we directly return the `char` property instead of
- // using `which`.
- if (nativeEvent.char && nativeEvent.char.length > 1) {
- return nativeEvent.char;
- } else if (nativeEvent.which) {
- return String.fromCharCode(nativeEvent.which);
- }
- }
-
- return null;
-
- case 'compositionend':
- return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
-
- default:
- return null;
- }
- }
- /**
- * Extract a SyntheticInputEvent for `beforeInput`, based on either native
- * `textInput` or fallback behavior.
- *
- * @return {?object} A SyntheticInputEvent.
- */
-
-
- function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
- var chars;
-
- if (canUseTextInputEvent) {
- chars = getNativeBeforeInputChars(domEventName, nativeEvent);
- } else {
- chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
- } // If no characters are being inserted, no BeforeInput event should
- // be fired.
-
-
- if (!chars) {
- return null;
- }
-
- var listeners = accumulateTwoPhaseListeners(targetInst, 'onBeforeInput');
-
- if (listeners.length > 0) {
- var event = new SyntheticInputEvent('onBeforeInput', 'beforeinput', null, nativeEvent, nativeEventTarget);
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
- event.data = chars;
- }
- }
- /**
- * Create an `onBeforeInput` event to match
- * http://www.w3.org/TR/2013/WD-DOM-Level-3-Events-20131105/#events-inputevents.
- *
- * This event plugin is based on the native `textInput` event
- * available in Chrome, Safari, Opera, and IE. This event fires after
- * `onKeyPress` and `onCompositionEnd`, but before `onInput`.
- *
- * `beforeInput` is spec'd but not implemented in any browsers, and
- * the `input` event does not provide any useful information about what has
- * actually been added, contrary to the spec. Thus, `textInput` is the best
- * available event to identify the characters that have actually been inserted
- * into the target node.
- *
- * This plugin is also responsible for emitting `composition` events, thus
- * allowing us to share composition fallback code for both `beforeInput` and
- * `composition` event types.
- */
-
-
- function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- }
-
- /**
- * @see http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary
- */
- var supportedInputTypes = {
- color: true,
- date: true,
- datetime: true,
- 'datetime-local': true,
- email: true,
- month: true,
- number: true,
- password: true,
- range: true,
- search: true,
- tel: true,
- text: true,
- time: true,
- url: true,
- week: true
- };
-
- function isTextInputElement(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
-
- if (nodeName === 'input') {
- return !!supportedInputTypes[elem.type];
- }
-
- if (nodeName === 'textarea') {
- return true;
- }
-
- return false;
- }
-
- /**
- * Checks if an event is supported in the current execution environment.
- *
- * NOTE: This will not work correctly for non-generic events such as `change`,
- * `reset`, `load`, `error`, and `select`.
- *
- * Borrows from Modernizr.
- *
- * @param {string} eventNameSuffix Event name, e.g. "click".
- * @return {boolean} True if the event is supported.
- * @internal
- * @license Modernizr 3.0.0pre (Custom Build) | MIT
- */
-
- function isEventSupported(eventNameSuffix) {
- if (!canUseDOM) {
- return false;
- }
-
- var eventName = 'on' + eventNameSuffix;
- var isSupported = (eventName in document);
-
- if (!isSupported) {
- var element = document.createElement('div');
- element.setAttribute(eventName, 'return;');
- isSupported = typeof element[eventName] === 'function';
- }
-
- return isSupported;
- }
-
- function registerEvents$1() {
- registerTwoPhaseEvent('onChange', ['change', 'click', 'focusin', 'focusout', 'input', 'keydown', 'keyup', 'selectionchange']);
- }
-
- function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
- // Flag this event loop as needing state restore.
- enqueueStateRestore(target);
- var listeners = accumulateTwoPhaseListeners(inst, 'onChange');
-
- if (listeners.length > 0) {
- var event = new SyntheticEvent('onChange', 'change', null, nativeEvent, target);
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
- }
- }
- /**
- * For IE shims
- */
-
-
- var activeElement = null;
- var activeElementInst = null;
- /**
- * SECTION: handle `change` event
- */
-
- function shouldUseChangeEvent(elem) {
- var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName === 'select' || nodeName === 'input' && elem.type === 'file';
- }
-
- function manualDispatchChangeEvent(nativeEvent) {
- var dispatchQueue = [];
- createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent)); // If change and propertychange bubbled, we'd just bind to it like all the
- // other events and have it go through ReactBrowserEventEmitter. Since it
- // doesn't, we manually listen for the events and so we have to enqueue and
- // process the abstract event manually.
- //
- // Batching is necessary here in order to ensure that all event handlers run
- // before the next rerender (including event handlers attached to ancestor
- // elements instead of directly on the input). Without this, controlled
- // components don't work properly in conjunction with event bubbling because
- // the component is rerendered and the value reverted before all the event
- // handlers can run. See https://github.com/facebook/react/issues/708.
-
- batchedUpdates(runEventInBatch, dispatchQueue);
- }
-
- function runEventInBatch(dispatchQueue) {
- processDispatchQueue(dispatchQueue, 0);
- }
-
- function getInstIfValueChanged(targetInst) {
- var targetNode = getNodeFromInstance(targetInst);
-
- if (updateValueIfChanged(targetNode)) {
- return targetInst;
- }
- }
-
- function getTargetInstForChangeEvent(domEventName, targetInst) {
- if (domEventName === 'change') {
- return targetInst;
- }
- }
- /**
- * SECTION: handle `input` event
- */
-
-
- var isInputEventSupported = false;
-
- if (canUseDOM) {
- // IE9 claims to support the input event but fails to trigger it when
- // deleting text, so we ignore its input events.
- isInputEventSupported = isEventSupported('input') && (!document.documentMode || document.documentMode > 9);
- }
- /**
- * (For IE <=9) Starts tracking propertychange events on the passed-in element
- * and override the value property so that we can distinguish user events from
- * value changes in JS.
- */
-
-
- function startWatchingForValueChange(target, targetInst) {
- activeElement = target;
- activeElementInst = targetInst;
- activeElement.attachEvent('onpropertychange', handlePropertyChange);
- }
- /**
- * (For IE <=9) Removes the event listeners from the currently-tracked element,
- * if any exists.
- */
-
-
- function stopWatchingForValueChange() {
- if (!activeElement) {
- return;
- }
-
- activeElement.detachEvent('onpropertychange', handlePropertyChange);
- activeElement = null;
- activeElementInst = null;
- }
- /**
- * (For IE <=9) Handles a propertychange event, sending a `change` event if
- * the value of the active element has changed.
- */
-
-
- function handlePropertyChange(nativeEvent) {
- if (nativeEvent.propertyName !== 'value') {
- return;
- }
-
- if (getInstIfValueChanged(activeElementInst)) {
- manualDispatchChangeEvent(nativeEvent);
- }
- }
-
- function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
- if (domEventName === 'focusin') {
- // In IE9, propertychange fires for most input events but is buggy and
- // doesn't fire when text is deleted, but conveniently, selectionchange
- // appears to fire in all of the remaining cases so we catch those and
- // forward the event if the value has changed
- // In either case, we don't want to call the event handler if the value
- // is changed from JS so we redefine a setter for `.value` that updates
- // our activeElementValue variable, allowing us to ignore those changes
- //
- // stopWatching() should be a noop here but we call it just in case we
- // missed a blur event somehow.
- stopWatchingForValueChange();
- startWatchingForValueChange(target, targetInst);
- } else if (domEventName === 'focusout') {
- stopWatchingForValueChange();
- }
- } // For IE8 and IE9.
-
-
- function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
- if (domEventName === 'selectionchange' || domEventName === 'keyup' || domEventName === 'keydown') {
- // On the selectionchange event, the target is just document which isn't
- // helpful for us so just check activeElement instead.
- //
- // 99% of the time, keydown and keyup aren't necessary. IE8 fails to fire
- // propertychange on the first input event after setting `value` from a
- // script and fires only keydown, keypress, keyup. Catching keyup usually
- // gets it and catching keydown lets us fire an event for the first
- // keystroke if user does a key repeat (it'll be a little delayed: right
- // before the second keystroke). Other input methods (e.g., paste) seem to
- // fire selectionchange normally.
- return getInstIfValueChanged(activeElementInst);
- }
- }
- /**
- * SECTION: handle `click` event
- */
-
-
- function shouldUseClickEvent(elem) {
- // Use the `click` event to detect changes to checkbox and radio inputs.
- // This approach works across all browsers, whereas `change` does not fire
- // until `blur` in IE8.
- var nodeName = elem.nodeName;
- return nodeName && nodeName.toLowerCase() === 'input' && (elem.type === 'checkbox' || elem.type === 'radio');
- }
-
- function getTargetInstForClickEvent(domEventName, targetInst) {
- if (domEventName === 'click') {
- return getInstIfValueChanged(targetInst);
- }
- }
-
- function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
- if (domEventName === 'input' || domEventName === 'change') {
- return getInstIfValueChanged(targetInst);
- }
- }
-
- function handleControlledInputBlur(node) {
- var state = node._wrapperState;
-
- if (!state || !state.controlled || node.type !== 'number') {
- return;
- }
-
- {
- // If controlled, assign the value attribute to the current value on blur
- setDefaultValue(node, 'number', node.value);
- }
- }
- /**
- * This plugin creates an `onChange` event that normalizes change events
- * across form elements. This event fires at a time when it's possible to
- * change the element's value without seeing a flicker.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - select
- */
-
-
- function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
- var getTargetInstFunc, handleEventFunc;
-
- if (shouldUseChangeEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForChangeEvent;
- } else if (isTextInputElement(targetNode)) {
- if (isInputEventSupported) {
- getTargetInstFunc = getTargetInstForInputOrChangeEvent;
- } else {
- getTargetInstFunc = getTargetInstForInputEventPolyfill;
- handleEventFunc = handleEventsForInputEventPolyfill;
- }
- } else if (shouldUseClickEvent(targetNode)) {
- getTargetInstFunc = getTargetInstForClickEvent;
- }
-
- if (getTargetInstFunc) {
- var inst = getTargetInstFunc(domEventName, targetInst);
-
- if (inst) {
- createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
- return;
- }
- }
-
- if (handleEventFunc) {
- handleEventFunc(domEventName, targetNode, targetInst);
- } // When blurring, set the value attribute for number inputs
-
-
- if (domEventName === 'focusout') {
- handleControlledInputBlur(targetNode);
- }
- }
-
- function registerEvents$2() {
- registerDirectEvent('onMouseEnter', ['mouseout', 'mouseover']);
- registerDirectEvent('onMouseLeave', ['mouseout', 'mouseover']);
- registerDirectEvent('onPointerEnter', ['pointerout', 'pointerover']);
- registerDirectEvent('onPointerLeave', ['pointerout', 'pointerover']);
- }
- /**
- * For almost every interaction we care about, there will be both a top-level
- * `mouseover` and `mouseout` event that occurs. Only use `mouseout` so that
- * we do not extract duplicate events. However, moving the mouse into the
- * browser from outside will not fire a `mouseout` event. In this case, we use
- * the `mouseover` top-level event.
- */
-
-
- function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- var isOverEvent = domEventName === 'mouseover' || domEventName === 'pointerover';
- var isOutEvent = domEventName === 'mouseout' || domEventName === 'pointerout';
-
- if (isOverEvent && (eventSystemFlags & IS_REPLAYED) === 0) {
- // If this is an over event with a target, we might have already dispatched
- // the event in the out event of the other target. If this is replayed,
- // then it's because we couldn't dispatch against this target previously
- // so we have to do it now instead.
- var related = nativeEvent.relatedTarget || nativeEvent.fromElement;
-
- if (related) {
- // If the related node is managed by React, we can assume that we have
- // already dispatched the corresponding events during its mouseout.
- if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
- return;
- }
- }
- }
-
- if (!isOutEvent && !isOverEvent) {
- // Must not be a mouse or pointer in or out - ignoring.
- return;
- }
-
- var win; // TODO: why is this nullable in the types but we read from it?
-
- if (nativeEventTarget.window === nativeEventTarget) {
- // `nativeEventTarget` is probably a window object.
- win = nativeEventTarget;
- } else {
- // TODO: Figure out why `ownerDocument` is sometimes undefined in IE8.
- var doc = nativeEventTarget.ownerDocument;
-
- if (doc) {
- win = doc.defaultView || doc.parentWindow;
- } else {
- win = window;
- }
- }
-
- var from;
- var to;
-
- if (isOutEvent) {
- var _related = nativeEvent.relatedTarget || nativeEvent.toElement;
-
- from = targetInst;
- to = _related ? getClosestInstanceFromNode(_related) : null;
-
- if (to !== null) {
- var nearestMounted = getNearestMountedFiber(to);
-
- if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
- to = null;
- }
- }
- } else {
- // Moving to a node from outside the window.
- from = null;
- to = targetInst;
- }
-
- if (from === to) {
- // Nothing pertains to our managed components.
- return;
- }
-
- var SyntheticEventCtor = SyntheticMouseEvent;
- var leaveEventType = 'onMouseLeave';
- var enterEventType = 'onMouseEnter';
- var eventTypePrefix = 'mouse';
-
- if (domEventName === 'pointerout' || domEventName === 'pointerover') {
- SyntheticEventCtor = SyntheticPointerEvent;
- leaveEventType = 'onPointerLeave';
- enterEventType = 'onPointerEnter';
- eventTypePrefix = 'pointer';
- }
-
- var fromNode = from == null ? win : getNodeFromInstance(from);
- var toNode = to == null ? win : getNodeFromInstance(to);
- var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + 'leave', from, nativeEvent, nativeEventTarget);
- leave.target = fromNode;
- leave.relatedTarget = toNode;
- var enter = null; // We should only process this nativeEvent if we are processing
- // the first ancestor. Next time, we will ignore the event.
-
- var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);
-
- if (nativeTargetInst === targetInst) {
- var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + 'enter', to, nativeEvent, nativeEventTarget);
- enterEvent.target = toNode;
- enterEvent.relatedTarget = fromNode;
- enter = enterEvent;
- }
-
- accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
- }
-
- /**
- * inlined Object.is polyfill to avoid requiring consumers ship their own
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
- */
- function is(x, y) {
- return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare
- ;
- }
-
- var objectIs = typeof Object.is === 'function' ? Object.is : is;
-
- var hasOwnProperty$2 = Object.prototype.hasOwnProperty;
- /**
- * Performs equality by iterating through keys on an object and returning false
- * when any key has values which are not strictly equal between the arguments.
- * Returns true when the values of all keys are strictly equal.
- */
-
- function shallowEqual(objA, objB) {
- if (objectIs(objA, objB)) {
- return true;
- }
-
- if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
- return false;
- }
-
- var keysA = Object.keys(objA);
- var keysB = Object.keys(objB);
-
- if (keysA.length !== keysB.length) {
- return false;
- } // Test for A's keys different from B.
-
-
- for (var i = 0; i < keysA.length; i++) {
- if (!hasOwnProperty$2.call(objB, keysA[i]) || !objectIs(objA[keysA[i]], objB[keysA[i]])) {
- return false;
- }
- }
-
- return true;
- }
-
- /**
- * Given any node return the first leaf node without children.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {DOMElement|DOMTextNode}
- */
-
- function getLeafNode(node) {
- while (node && node.firstChild) {
- node = node.firstChild;
- }
-
- return node;
- }
- /**
- * Get the next sibling within a container. This will walk up the
- * DOM if a node's siblings have been exhausted.
- *
- * @param {DOMElement|DOMTextNode} node
- * @return {?DOMElement|DOMTextNode}
- */
-
-
- function getSiblingNode(node) {
- while (node) {
- if (node.nextSibling) {
- return node.nextSibling;
- }
-
- node = node.parentNode;
- }
- }
- /**
- * Get object describing the nodes which contain characters at offset.
- *
- * @param {DOMElement|DOMTextNode} root
- * @param {number} offset
- * @return {?object}
- */
-
-
- function getNodeForCharacterOffset(root, offset) {
- var node = getLeafNode(root);
- var nodeStart = 0;
- var nodeEnd = 0;
-
- while (node) {
- if (node.nodeType === TEXT_NODE) {
- nodeEnd = nodeStart + node.textContent.length;
-
- if (nodeStart <= offset && nodeEnd >= offset) {
- return {
- node: node,
- offset: offset - nodeStart
- };
- }
-
- nodeStart = nodeEnd;
- }
-
- node = getLeafNode(getSiblingNode(node));
- }
- }
-
- /**
- * @param {DOMElement} outerNode
- * @return {?object}
- */
-
- function getOffsets(outerNode) {
- var ownerDocument = outerNode.ownerDocument;
- var win = ownerDocument && ownerDocument.defaultView || window;
- var selection = win.getSelection && win.getSelection();
-
- if (!selection || selection.rangeCount === 0) {
- return null;
- }
-
- var anchorNode = selection.anchorNode,
- anchorOffset = selection.anchorOffset,
- focusNode = selection.focusNode,
- focusOffset = selection.focusOffset; // In Firefox, anchorNode and focusNode can be "anonymous divs", e.g. the
- // up/down buttons on an <input type="number">. Anonymous divs do not seem to
- // expose properties, triggering a "Permission denied error" if any of its
- // properties are accessed. The only seemingly possible way to avoid erroring
- // is to access a property that typically works for non-anonymous divs and
- // catch any error that may otherwise arise. See
- // https://bugzilla.mozilla.org/show_bug.cgi?id=208427
-
- try {
- /* eslint-disable no-unused-expressions */
- anchorNode.nodeType;
- focusNode.nodeType;
- /* eslint-enable no-unused-expressions */
- } catch (e) {
- return null;
- }
-
- return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
- }
- /**
- * Returns {start, end} where `start` is the character/codepoint index of
- * (anchorNode, anchorOffset) within the textContent of `outerNode`, and
- * `end` is the index of (focusNode, focusOffset).
- *
- * Returns null if you pass in garbage input but we should probably just crash.
- *
- * Exported only for testing.
- */
-
- function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
- var length = 0;
- var start = -1;
- var end = -1;
- var indexWithinAnchor = 0;
- var indexWithinFocus = 0;
- var node = outerNode;
- var parentNode = null;
-
- outer: while (true) {
- var next = null;
-
- while (true) {
- if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
- start = length + anchorOffset;
- }
-
- if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
- end = length + focusOffset;
- }
-
- if (node.nodeType === TEXT_NODE) {
- length += node.nodeValue.length;
- }
-
- if ((next = node.firstChild) === null) {
- break;
- } // Moving from `node` to its first child `next`.
-
-
- parentNode = node;
- node = next;
- }
-
- while (true) {
- if (node === outerNode) {
- // If `outerNode` has children, this is always the second time visiting
- // it. If it has no children, this is still the first loop, and the only
- // valid selection is anchorNode and focusNode both equal to this node
- // and both offsets 0, in which case we will have handled above.
- break outer;
- }
-
- if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
- start = length;
- }
-
- if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
- end = length;
- }
-
- if ((next = node.nextSibling) !== null) {
- break;
- }
-
- node = parentNode;
- parentNode = node.parentNode;
- } // Moving from `node` to its next sibling `next`.
-
-
- node = next;
- }
-
- if (start === -1 || end === -1) {
- // This should never happen. (Would happen if the anchor/focus nodes aren't
- // actually inside the passed-in node.)
- return null;
- }
-
- return {
- start: start,
- end: end
- };
- }
- /**
- * In modern non-IE browsers, we can support both forward and backward
- * selections.
- *
- * Note: IE10+ supports the Selection object, but it does not support
- * the `extend` method, which means that even in modern IE, it's not possible
- * to programmatically create a backward selection. Thus, for all IE
- * versions, we use the old IE API to create our selections.
- *
- * @param {DOMElement|DOMTextNode} node
- * @param {object} offsets
- */
-
- function setOffsets(node, offsets) {
- var doc = node.ownerDocument || document;
- var win = doc && doc.defaultView || window; // Edge fails with "Object expected" in some scenarios.
- // (For instance: TinyMCE editor used in a list component that supports pasting to add more,
- // fails when pasting 100+ items)
-
- if (!win.getSelection) {
- return;
- }
-
- var selection = win.getSelection();
- var length = node.textContent.length;
- var start = Math.min(offsets.start, length);
- var end = offsets.end === undefined ? start : Math.min(offsets.end, length); // IE 11 uses modern selection, but doesn't support the extend method.
- // Flip backward selections, so we can set with a single range.
-
- if (!selection.extend && start > end) {
- var temp = end;
- end = start;
- start = temp;
- }
-
- var startMarker = getNodeForCharacterOffset(node, start);
- var endMarker = getNodeForCharacterOffset(node, end);
-
- if (startMarker && endMarker) {
- if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
- return;
- }
-
- var range = doc.createRange();
- range.setStart(startMarker.node, startMarker.offset);
- selection.removeAllRanges();
-
- if (start > end) {
- selection.addRange(range);
- selection.extend(endMarker.node, endMarker.offset);
- } else {
- range.setEnd(endMarker.node, endMarker.offset);
- selection.addRange(range);
- }
- }
- }
-
- function isTextNode(node) {
- return node && node.nodeType === TEXT_NODE;
- }
-
- function containsNode(outerNode, innerNode) {
- if (!outerNode || !innerNode) {
- return false;
- } else if (outerNode === innerNode) {
- return true;
- } else if (isTextNode(outerNode)) {
- return false;
- } else if (isTextNode(innerNode)) {
- return containsNode(outerNode, innerNode.parentNode);
- } else if ('contains' in outerNode) {
- return outerNode.contains(innerNode);
- } else if (outerNode.compareDocumentPosition) {
- return !!(outerNode.compareDocumentPosition(innerNode) & 16);
- } else {
- return false;
- }
- }
-
- function isInDocument(node) {
- return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
- }
-
- function isSameOriginFrame(iframe) {
- try {
- // Accessing the contentDocument of a HTMLIframeElement can cause the browser
- // to throw, e.g. if it has a cross-origin src attribute.
- // Safari will show an error in the console when the access results in "Blocked a frame with origin". e.g:
- // iframe.contentDocument.defaultView;
- // A safety way is to access one of the cross origin properties: Window or Location
- // Which might result in "SecurityError" DOM Exception and it is compatible to Safari.
- // https://html.spec.whatwg.org/multipage/browsers.html#integration-with-idl
- return typeof iframe.contentWindow.location.href === 'string';
- } catch (err) {
- return false;
- }
- }
-
- function getActiveElementDeep() {
- var win = window;
- var element = getActiveElement();
-
- while (element instanceof win.HTMLIFrameElement) {
- if (isSameOriginFrame(element)) {
- win = element.contentWindow;
- } else {
- return element;
- }
-
- element = getActiveElement(win.document);
- }
-
- return element;
- }
- /**
- * @ReactInputSelection: React input selection module. Based on Selection.js,
- * but modified to be suitable for react and has a couple of bug fixes (doesn't
- * assume buttons have range selections allowed).
- * Input selection module for React.
- */
-
- /**
- * @hasSelectionCapabilities: we get the element types that support selection
- * from https://html.spec.whatwg.org/#do-not-apply, looking at `selectionStart`
- * and `selectionEnd` rows.
- */
-
-
- function hasSelectionCapabilities(elem) {
- var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
- return nodeName && (nodeName === 'input' && (elem.type === 'text' || elem.type === 'search' || elem.type === 'tel' || elem.type === 'url' || elem.type === 'password') || nodeName === 'textarea' || elem.contentEditable === 'true');
- }
- function getSelectionInformation() {
- var focusedElem = getActiveElementDeep();
- return {
- focusedElem: focusedElem,
- selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
- };
- }
- /**
- * @restoreSelection: If any selection information was potentially lost,
- * restore it. This is useful when performing operations that could remove dom
- * nodes and place them back in, resulting in focus being lost.
- */
-
- function restoreSelection(priorSelectionInformation) {
- var curFocusedElem = getActiveElementDeep();
- var priorFocusedElem = priorSelectionInformation.focusedElem;
- var priorSelectionRange = priorSelectionInformation.selectionRange;
-
- if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
- if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
- setSelection(priorFocusedElem, priorSelectionRange);
- } // Focusing a node can change the scroll position, which is undesirable
-
-
- var ancestors = [];
- var ancestor = priorFocusedElem;
-
- while (ancestor = ancestor.parentNode) {
- if (ancestor.nodeType === ELEMENT_NODE) {
- ancestors.push({
- element: ancestor,
- left: ancestor.scrollLeft,
- top: ancestor.scrollTop
- });
- }
- }
-
- if (typeof priorFocusedElem.focus === 'function') {
- priorFocusedElem.focus();
- }
-
- for (var i = 0; i < ancestors.length; i++) {
- var info = ancestors[i];
- info.element.scrollLeft = info.left;
- info.element.scrollTop = info.top;
- }
- }
- }
- /**
- * @getSelection: Gets the selection bounds of a focused textarea, input or
- * contentEditable node.
- * -@input: Look up selection bounds of this input
- * -@return {start: selectionStart, end: selectionEnd}
- */
-
- function getSelection(input) {
- var selection;
-
- if ('selectionStart' in input) {
- // Modern browser with input or textarea.
- selection = {
- start: input.selectionStart,
- end: input.selectionEnd
- };
- } else {
- // Content editable or old IE textarea.
- selection = getOffsets(input);
- }
-
- return selection || {
- start: 0,
- end: 0
- };
- }
- /**
- * @setSelection: Sets the selection bounds of a textarea or input and focuses
- * the input.
- * -@input Set selection bounds of this input or textarea
- * -@offsets Object of same form that is returned from get*
- */
-
- function setSelection(input, offsets) {
- var start = offsets.start;
- var end = offsets.end;
-
- if (end === undefined) {
- end = start;
- }
-
- if ('selectionStart' in input) {
- input.selectionStart = start;
- input.selectionEnd = Math.min(end, input.value.length);
- } else {
- setOffsets(input, offsets);
- }
- }
-
- var skipSelectionChangeEvent = canUseDOM && 'documentMode' in document && document.documentMode <= 11;
-
- function registerEvents$3() {
- registerTwoPhaseEvent('onSelect', ['focusout', 'contextmenu', 'dragend', 'focusin', 'keydown', 'keyup', 'mousedown', 'mouseup', 'selectionchange']);
- }
-
- var activeElement$1 = null;
- var activeElementInst$1 = null;
- var lastSelection = null;
- var mouseDown = false;
- /**
- * Get an object which is a unique representation of the current selection.
- *
- * The return value will not be consistent across nodes or browsers, but
- * two identical selections on the same node will return identical objects.
- */
-
- function getSelection$1(node) {
- if ('selectionStart' in node && hasSelectionCapabilities(node)) {
- return {
- start: node.selectionStart,
- end: node.selectionEnd
- };
- } else {
- var win = node.ownerDocument && node.ownerDocument.defaultView || window;
- var selection = win.getSelection();
- return {
- anchorNode: selection.anchorNode,
- anchorOffset: selection.anchorOffset,
- focusNode: selection.focusNode,
- focusOffset: selection.focusOffset
- };
- }
- }
- /**
- * Get document associated with the event target.
- */
-
-
- function getEventTargetDocument(eventTarget) {
- return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
- }
- /**
- * Poll selection to see whether it's changed.
- *
- * @param {object} nativeEvent
- * @param {object} nativeEventTarget
- * @return {?SyntheticEvent}
- */
-
-
- function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
- // Ensure we have the right element, and that the user is not dragging a
- // selection (this matches native `select` event behavior). In HTML5, select
- // fires only on input and textarea thus if there's no focused element we
- // won't dispatch.
- var doc = getEventTargetDocument(nativeEventTarget);
-
- if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
- return;
- } // Only fire when selection has actually changed.
-
-
- var currentSelection = getSelection$1(activeElement$1);
-
- if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
- lastSelection = currentSelection;
- var listeners = accumulateTwoPhaseListeners(activeElementInst$1, 'onSelect');
-
- if (listeners.length > 0) {
- var event = new SyntheticEvent('onSelect', 'select', null, nativeEvent, nativeEventTarget);
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
- event.target = activeElement$1;
- }
- }
- }
- /**
- * This plugin creates an `onSelect` event that normalizes select events
- * across form elements.
- *
- * Supported elements are:
- * - input (see `isTextInputElement`)
- * - textarea
- * - contentEditable
- *
- * This differs from native browser implementations in the following ways:
- * - Fires on contentEditable fields as well as inputs.
- * - Fires for collapsed selection.
- * - Fires after user input.
- */
-
-
- function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
-
- var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
-
- switch (domEventName) {
- // Track the input node that has focus.
- case 'focusin':
- if (isTextInputElement(targetNode) || targetNode.contentEditable === 'true') {
- activeElement$1 = targetNode;
- activeElementInst$1 = targetInst;
- lastSelection = null;
- }
-
- break;
-
- case 'focusout':
- activeElement$1 = null;
- activeElementInst$1 = null;
- lastSelection = null;
- break;
- // Don't fire the event while the user is dragging. This matches the
- // semantics of the native select event.
-
- case 'mousedown':
- mouseDown = true;
- break;
-
- case 'contextmenu':
- case 'mouseup':
- case 'dragend':
- mouseDown = false;
- constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
- break;
- // Chrome and IE fire non-standard event when selection is changed (and
- // sometimes when it hasn't). IE's event fires out of order with respect
- // to key and input events on deletion, so we discard it.
- //
- // Firefox doesn't support selectionchange, so check selection status
- // after each key entry. The selection changes after keydown and before
- // keyup, but we check on keydown as well in the case of holding down a
- // key, when multiple keydown events are fired but only one keyup is.
- // This is also our approach for IE handling, for the reason above.
-
- case 'selectionchange':
- if (skipSelectionChangeEvent) {
- break;
- }
-
- // falls through
-
- case 'keydown':
- case 'keyup':
- constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
- }
- }
-
- function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- var reactName = topLevelEventsToReactNames.get(domEventName);
-
- if (reactName === undefined) {
- return;
- }
-
- var SyntheticEventCtor = SyntheticEvent;
- var reactEventType = domEventName;
-
- switch (domEventName) {
- case 'keypress':
- // Firefox creates a keypress event for function keys too. This removes
- // the unwanted keypress events. Enter is however both printable and
- // non-printable. One would expect Tab to be as well (but it isn't).
- if (getEventCharCode(nativeEvent) === 0) {
- return;
- }
-
- /* falls through */
-
- case 'keydown':
- case 'keyup':
- SyntheticEventCtor = SyntheticKeyboardEvent;
- break;
-
- case 'focusin':
- reactEventType = 'focus';
- SyntheticEventCtor = SyntheticFocusEvent;
- break;
-
- case 'focusout':
- reactEventType = 'blur';
- SyntheticEventCtor = SyntheticFocusEvent;
- break;
-
- case 'beforeblur':
- case 'afterblur':
- SyntheticEventCtor = SyntheticFocusEvent;
- break;
-
- case 'click':
- // Firefox creates a click event on right mouse clicks. This removes the
- // unwanted click events.
- if (nativeEvent.button === 2) {
- return;
- }
-
- /* falls through */
-
- case 'auxclick':
- case 'dblclick':
- case 'mousedown':
- case 'mousemove':
- case 'mouseup': // TODO: Disabled elements should not respond to mouse events
-
- /* falls through */
-
- case 'mouseout':
- case 'mouseover':
- case 'contextmenu':
- SyntheticEventCtor = SyntheticMouseEvent;
- break;
-
- case 'drag':
- case 'dragend':
- case 'dragenter':
- case 'dragexit':
- case 'dragleave':
- case 'dragover':
- case 'dragstart':
- case 'drop':
- SyntheticEventCtor = SyntheticDragEvent;
- break;
-
- case 'touchcancel':
- case 'touchend':
- case 'touchmove':
- case 'touchstart':
- SyntheticEventCtor = SyntheticTouchEvent;
- break;
-
- case ANIMATION_END:
- case ANIMATION_ITERATION:
- case ANIMATION_START:
- SyntheticEventCtor = SyntheticAnimationEvent;
- break;
-
- case TRANSITION_END:
- SyntheticEventCtor = SyntheticTransitionEvent;
- break;
-
- case 'scroll':
- SyntheticEventCtor = SyntheticUIEvent;
- break;
-
- case 'wheel':
- SyntheticEventCtor = SyntheticWheelEvent;
- break;
-
- case 'copy':
- case 'cut':
- case 'paste':
- SyntheticEventCtor = SyntheticClipboardEvent;
- break;
-
- case 'gotpointercapture':
- case 'lostpointercapture':
- case 'pointercancel':
- case 'pointerdown':
- case 'pointermove':
- case 'pointerout':
- case 'pointerover':
- case 'pointerup':
- SyntheticEventCtor = SyntheticPointerEvent;
- break;
- }
-
- var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
-
- {
- // Some events don't bubble in the browser.
- // In the past, React has always bubbled them, but this can be surprising.
- // We're going to try aligning closer to the browser behavior by not bubbling
- // them in React either. We'll start by not bubbling onScroll, and then expand.
- var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
- // nonDelegatedEvents list in DOMPluginEventSystem.
- // Then we can remove this special list.
- // This is a breaking change that can wait until React 18.
- domEventName === 'scroll';
-
- var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);
-
- if (_listeners.length > 0) {
- // Intentionally create event lazily.
- var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);
-
- dispatchQueue.push({
- event: _event,
- listeners: _listeners
- });
- }
- }
- }
-
- // TODO: remove top-level side effect.
- registerSimpleEvents();
- registerEvents$2();
- registerEvents$1();
- registerEvents$3();
- registerEvents();
-
- function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
- // TODO: we should remove the concept of a "SimpleEventPlugin".
- // This is the basic functionality of the event system. All
- // the other plugins are essentially polyfills. So the plugin
- // should probably be inlined somewhere and have its logic
- // be core the to event system. This would potentially allow
- // us to ship builds of React without the polyfilled plugins below.
- extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0; // We don't process these events unless we are in the
- // event's native "bubble" phase, which means that we're
- // not in the capture phase. That's because we emulate
- // the capture phase here still. This is a trade-off,
- // because in an ideal world we would not emulate and use
- // the phases properly, like we do with the SimpleEvent
- // plugin. However, the plugins below either expect
- // emulation (EnterLeave) or use state localized to that
- // plugin (BeforeInput, Change, Select). The state in
- // these modules complicates things, as you'll essentially
- // get the case where the capture phase event might change
- // state, only for the following bubble event to come in
- // later and not trigger anything as the state now
- // invalidates the heuristics of the event plugin. We
- // could alter all these plugins to work in such ways, but
- // that might cause other unknown side-effects that we
- // can't forsee right now.
-
- if (shouldProcessPolyfillPlugins) {
- extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
- }
- } // List of events that need to be individually attached to media elements.
-
-
- var mediaEventTypes = ['abort', 'canplay', 'canplaythrough', 'durationchange', 'emptied', 'encrypted', 'ended', 'error', 'loadeddata', 'loadedmetadata', 'loadstart', 'pause', 'play', 'playing', 'progress', 'ratechange', 'seeked', 'seeking', 'stalled', 'suspend', 'timeupdate', 'volumechange', 'waiting']; // We should not delegate these events to the container, but rather
- // set them on the actual target element itself. This is primarily
- // because these events do not consistently bubble in the DOM.
-
- var nonDelegatedEvents = new Set(['cancel', 'close', 'invalid', 'load', 'scroll', 'toggle'].concat(mediaEventTypes));
-
- function executeDispatch(event, listener, currentTarget) {
- var type = event.type || 'unknown-event';
- event.currentTarget = currentTarget;
- invokeGuardedCallbackAndCatchFirstError(type, listener, undefined, event);
- event.currentTarget = null;
- }
-
- function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
- var previousInstance;
-
- if (inCapturePhase) {
- for (var i = dispatchListeners.length - 1; i >= 0; i--) {
- var _dispatchListeners$i = dispatchListeners[i],
- instance = _dispatchListeners$i.instance,
- currentTarget = _dispatchListeners$i.currentTarget,
- listener = _dispatchListeners$i.listener;
-
- if (instance !== previousInstance && event.isPropagationStopped()) {
- return;
- }
-
- executeDispatch(event, listener, currentTarget);
- previousInstance = instance;
- }
- } else {
- for (var _i = 0; _i < dispatchListeners.length; _i++) {
- var _dispatchListeners$_i = dispatchListeners[_i],
- _instance = _dispatchListeners$_i.instance,
- _currentTarget = _dispatchListeners$_i.currentTarget,
- _listener = _dispatchListeners$_i.listener;
-
- if (_instance !== previousInstance && event.isPropagationStopped()) {
- return;
- }
-
- executeDispatch(event, _listener, _currentTarget);
- previousInstance = _instance;
- }
- }
- }
-
- function processDispatchQueue(dispatchQueue, eventSystemFlags) {
- var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
-
- for (var i = 0; i < dispatchQueue.length; i++) {
- var _dispatchQueue$i = dispatchQueue[i],
- event = _dispatchQueue$i.event,
- listeners = _dispatchQueue$i.listeners;
- processDispatchQueueItemsInOrder(event, listeners, inCapturePhase); // event system doesn't use pooling.
- } // This would be a good time to rethrow if any of the event handlers threw.
-
-
- rethrowCaughtError();
- }
-
- function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
- var nativeEventTarget = getEventTarget(nativeEvent);
- var dispatchQueue = [];
- extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
- processDispatchQueue(dispatchQueue, eventSystemFlags);
- }
-
- function listenToNonDelegatedEvent(domEventName, targetElement) {
- var isCapturePhaseListener = false;
- var listenerSet = getEventListenerSet(targetElement);
- var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
-
- if (!listenerSet.has(listenerSetKey)) {
- addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
- listenerSet.add(listenerSetKey);
- }
- }
- var listeningMarker = '_reactListening' + Math.random().toString(36).slice(2);
- function listenToAllSupportedEvents(rootContainerElement) {
- {
- if (rootContainerElement[listeningMarker]) {
- // Performance optimization: don't iterate through events
- // for the same portal container or root node more than once.
- // TODO: once we remove the flag, we may be able to also
- // remove some of the bookkeeping maps used for laziness.
- return;
- }
-
- rootContainerElement[listeningMarker] = true;
- allNativeEvents.forEach(function (domEventName) {
- if (!nonDelegatedEvents.has(domEventName)) {
- listenToNativeEvent(domEventName, false, rootContainerElement, null);
- }
-
- listenToNativeEvent(domEventName, true, rootContainerElement, null);
- });
- }
- }
- function listenToNativeEvent(domEventName, isCapturePhaseListener, rootContainerElement, targetElement) {
- var eventSystemFlags = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
- var target = rootContainerElement; // selectionchange needs to be attached to the document
- // otherwise it won't capture incoming events that are only
- // triggered on the document directly.
-
- if (domEventName === 'selectionchange' && rootContainerElement.nodeType !== DOCUMENT_NODE) {
- target = rootContainerElement.ownerDocument;
- } // If the event can be delegated (or is capture phase), we can
- // register it to the root container. Otherwise, we should
- // register the event to the target element and mark it as
- // a non-delegated event.
-
-
- if (targetElement !== null && !isCapturePhaseListener && nonDelegatedEvents.has(domEventName)) {
- // For all non-delegated events, apart from scroll, we attach
- // their event listeners to the respective elements that their
- // events fire on. That means we can skip this step, as event
- // listener has already been added previously. However, we
- // special case the scroll event because the reality is that any
- // element can scroll.
- // TODO: ideally, we'd eventually apply the same logic to all
- // events from the nonDelegatedEvents list. Then we can remove
- // this special case and use the same logic for all events.
- if (domEventName !== 'scroll') {
- return;
- }
-
- eventSystemFlags |= IS_NON_DELEGATED;
- target = targetElement;
- }
-
- var listenerSet = getEventListenerSet(target);
- var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener); // If the listener entry is empty or we should upgrade, then
- // we need to trap an event listener onto the target.
-
- if (!listenerSet.has(listenerSetKey)) {
- if (isCapturePhaseListener) {
- eventSystemFlags |= IS_CAPTURE_PHASE;
- }
-
- addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
- listenerSet.add(listenerSetKey);
- }
- }
-
- function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
- var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags); // If passive option is not supported, then the event will be
- // active and not passive.
-
- var isPassiveListener = undefined;
-
- if (passiveBrowserEventsSupported) {
- // Browsers introduced an intervention, making these events
- // passive by default on document. React doesn't bind them
- // to document anymore, but changing this now would undo
- // the performance wins from the change. So we emulate
- // the existing behavior manually on the roots now.
- // https://github.com/facebook/react/issues/19651
- if (domEventName === 'touchstart' || domEventName === 'touchmove' || domEventName === 'wheel') {
- isPassiveListener = true;
- }
- }
-
- targetContainer = targetContainer;
- var unsubscribeListener; // When legacyFBSupport is enabled, it's for when we
-
-
- if (isCapturePhaseListener) {
- if (isPassiveListener !== undefined) {
- unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
- } else {
- unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
- }
- } else {
- if (isPassiveListener !== undefined) {
- unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
- } else {
- unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
- }
- }
- }
-
- function isMatchingRootContainer(grandContainer, targetContainer) {
- return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
- }
-
- function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
- var ancestorInst = targetInst;
-
- if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
- var targetContainerNode = targetContainer; // If we are using the legacy FB support flag, we
-
- if (targetInst !== null) {
- // The below logic attempts to work out if we need to change
- // the target fiber to a different ancestor. We had similar logic
- // in the legacy event system, except the big difference between
- // systems is that the modern event system now has an event listener
- // attached to each React Root and React Portal Root. Together,
- // the DOM nodes representing these roots are the "rootContainer".
- // To figure out which ancestor instance we should use, we traverse
- // up the fiber tree from the target instance and attempt to find
- // root boundaries that match that of our current "rootContainer".
- // If we find that "rootContainer", we find the parent fiber
- // sub-tree for that root and make that our ancestor instance.
- var node = targetInst;
-
- mainLoop: while (true) {
- if (node === null) {
- return;
- }
-
- var nodeTag = node.tag;
-
- if (nodeTag === HostRoot || nodeTag === HostPortal) {
- var container = node.stateNode.containerInfo;
-
- if (isMatchingRootContainer(container, targetContainerNode)) {
- break;
- }
-
- if (nodeTag === HostPortal) {
- // The target is a portal, but it's not the rootContainer we're looking for.
- // Normally portals handle their own events all the way down to the root.
- // So we should be able to stop now. However, we don't know if this portal
- // was part of *our* root.
- var grandNode = node.return;
-
- while (grandNode !== null) {
- var grandTag = grandNode.tag;
-
- if (grandTag === HostRoot || grandTag === HostPortal) {
- var grandContainer = grandNode.stateNode.containerInfo;
-
- if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
- // This is the rootContainer we're looking for and we found it as
- // a parent of the Portal. That means we can ignore it because the
- // Portal will bubble through to us.
- return;
- }
- }
-
- grandNode = grandNode.return;
- }
- } // Now we need to find it's corresponding host fiber in the other
- // tree. To do this we can use getClosestInstanceFromNode, but we
- // need to validate that the fiber is a host instance, otherwise
- // we need to traverse up through the DOM till we find the correct
- // node that is from the other tree.
-
-
- while (container !== null) {
- var parentNode = getClosestInstanceFromNode(container);
-
- if (parentNode === null) {
- return;
- }
-
- var parentTag = parentNode.tag;
-
- if (parentTag === HostComponent || parentTag === HostText) {
- node = ancestorInst = parentNode;
- continue mainLoop;
- }
-
- container = container.parentNode;
- }
- }
-
- node = node.return;
- }
- }
- }
-
- batchedEventUpdates(function () {
- return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
- });
- }
-
- function createDispatchListener(instance, listener, currentTarget) {
- return {
- instance: instance,
- listener: listener,
- currentTarget: currentTarget
- };
- }
-
- function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly) {
- var captureName = reactName !== null ? reactName + 'Capture' : null;
- var reactEventName = inCapturePhase ? captureName : reactName;
- var listeners = [];
- var instance = targetFiber;
- var lastHostComponent = null; // Accumulate all instances and listeners via the target -> root path.
-
- while (instance !== null) {
- var _instance2 = instance,
- stateNode = _instance2.stateNode,
- tag = _instance2.tag; // Handle listeners that are on HostComponents (i.e. <div>)
-
- if (tag === HostComponent && stateNode !== null) {
- lastHostComponent = stateNode; // createEventHandle listeners
-
-
- if (reactEventName !== null) {
- var listener = getListener(instance, reactEventName);
-
- if (listener != null) {
- listeners.push(createDispatchListener(instance, listener, lastHostComponent));
- }
- }
- } // If we are only accumulating events for the target, then we don't
- // continue to propagate through the React fiber tree to find other
- // listeners.
-
-
- if (accumulateTargetOnly) {
- break;
- }
-
- instance = instance.return;
- }
-
- return listeners;
- } // We should only use this function for:
- // - BeforeInputEventPlugin
- // - ChangeEventPlugin
- // - SelectEventPlugin
- // This is because we only process these plugins
- // in the bubble phase, so we need to accumulate two
- // phase event listeners (via emulation).
-
- function accumulateTwoPhaseListeners(targetFiber, reactName) {
- var captureName = reactName + 'Capture';
- var listeners = [];
- var instance = targetFiber; // Accumulate all instances and listeners via the target -> root path.
-
- while (instance !== null) {
- var _instance3 = instance,
- stateNode = _instance3.stateNode,
- tag = _instance3.tag; // Handle listeners that are on HostComponents (i.e. <div>)
-
- if (tag === HostComponent && stateNode !== null) {
- var currentTarget = stateNode;
- var captureListener = getListener(instance, captureName);
-
- if (captureListener != null) {
- listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
- }
-
- var bubbleListener = getListener(instance, reactName);
-
- if (bubbleListener != null) {
- listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
- }
- }
-
- instance = instance.return;
- }
-
- return listeners;
- }
-
- function getParent(inst) {
- if (inst === null) {
- return null;
- }
-
- do {
- inst = inst.return; // TODO: If this is a HostRoot we might want to bail out.
- // That is depending on if we want nested subtrees (layers) to bubble
- // events to their parent. We could also go through parentNode on the
- // host node but that wouldn't work for React Native and doesn't let us
- // do the portal feature.
- } while (inst && inst.tag !== HostComponent);
-
- if (inst) {
- return inst;
- }
-
- return null;
- }
- /**
- * Return the lowest common ancestor of A and B, or null if they are in
- * different trees.
- */
-
-
- function getLowestCommonAncestor(instA, instB) {
- var nodeA = instA;
- var nodeB = instB;
- var depthA = 0;
-
- for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
- depthA++;
- }
-
- var depthB = 0;
-
- for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
- depthB++;
- } // If A is deeper, crawl up.
-
-
- while (depthA - depthB > 0) {
- nodeA = getParent(nodeA);
- depthA--;
- } // If B is deeper, crawl up.
-
-
- while (depthB - depthA > 0) {
- nodeB = getParent(nodeB);
- depthB--;
- } // Walk in lockstep until we find a match.
-
-
- var depth = depthA;
-
- while (depth--) {
- if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
- return nodeA;
- }
-
- nodeA = getParent(nodeA);
- nodeB = getParent(nodeB);
- }
-
- return null;
- }
-
- function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
- var registrationName = event._reactName;
- var listeners = [];
- var instance = target;
-
- while (instance !== null) {
- if (instance === common) {
- break;
- }
-
- var _instance4 = instance,
- alternate = _instance4.alternate,
- stateNode = _instance4.stateNode,
- tag = _instance4.tag;
-
- if (alternate !== null && alternate === common) {
- break;
- }
-
- if (tag === HostComponent && stateNode !== null) {
- var currentTarget = stateNode;
-
- if (inCapturePhase) {
- var captureListener = getListener(instance, registrationName);
-
- if (captureListener != null) {
- listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
- }
- } else if (!inCapturePhase) {
- var bubbleListener = getListener(instance, registrationName);
-
- if (bubbleListener != null) {
- listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
- }
- }
- }
-
- instance = instance.return;
- }
-
- if (listeners.length !== 0) {
- dispatchQueue.push({
- event: event,
- listeners: listeners
- });
- }
- } // We should only use this function for:
- // - EnterLeaveEventPlugin
- // This is because we only process this plugin
- // in the bubble phase, so we need to accumulate two
- // phase event listeners.
-
-
- function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
- var common = from && to ? getLowestCommonAncestor(from, to) : null;
-
- if (from !== null) {
- accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
- }
-
- if (to !== null && enterEvent !== null) {
- accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
- }
- }
- function getListenerSetKey(domEventName, capture) {
- return domEventName + "__" + (capture ? 'capture' : 'bubble');
- }
-
- var didWarnInvalidHydration = false;
- var DANGEROUSLY_SET_INNER_HTML = 'dangerouslySetInnerHTML';
- var SUPPRESS_CONTENT_EDITABLE_WARNING = 'suppressContentEditableWarning';
- var SUPPRESS_HYDRATION_WARNING = 'suppressHydrationWarning';
- var AUTOFOCUS = 'autoFocus';
- var CHILDREN = 'children';
- var STYLE = 'style';
- var HTML$1 = '__html';
- var HTML_NAMESPACE$1 = Namespaces.html;
- var warnedUnknownTags;
- var suppressHydrationWarning;
- var validatePropertiesInDevelopment;
- var warnForTextDifference;
- var warnForPropDifference;
- var warnForExtraAttributes;
- var warnForInvalidEventListener;
- var canDiffStyleForHydrationWarning;
- var normalizeMarkupForTextOrAttribute;
- var normalizeHTML;
-
- {
- warnedUnknownTags = {
- // There are working polyfills for <dialog>. Let people use it.
- dialog: true,
- // Electron ships a custom <webview> tag to display external web content in
- // an isolated frame and process.
- // This tag is not present in non Electron environments such as JSDom which
- // is often used for testing purposes.
- // @see https://electronjs.org/docs/api/webview-tag
- webview: true
- };
-
- validatePropertiesInDevelopment = function (type, props) {
- validateProperties(type, props);
- validateProperties$1(type, props);
- validateProperties$2(type, props, {
- registrationNameDependencies: registrationNameDependencies,
- possibleRegistrationNames: possibleRegistrationNames
- });
- }; // IE 11 parses & normalizes the style attribute as opposed to other
- // browsers. It adds spaces and sorts the properties in some
- // non-alphabetical order. Handling that would require sorting CSS
- // properties in the client & server versions or applying
- // `expectedStyle` to a temporary DOM node to read its `style` attribute
- // normalized. Since it only affects IE, we're skipping style warnings
- // in that browser completely in favor of doing all that work.
- // See https://github.com/facebook/react/issues/11807
-
-
- canDiffStyleForHydrationWarning = canUseDOM && !document.documentMode; // HTML parsing normalizes CR and CRLF to LF.
- // It also can turn \u0000 into \uFFFD inside attributes.
- // https://www.w3.org/TR/html5/single-page.html#preprocessing-the-input-stream
- // If we have a mismatch, it might be caused by that.
- // We will still patch up in this case but not fire the warning.
-
- var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
- var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
-
- normalizeMarkupForTextOrAttribute = function (markup) {
- var markupString = typeof markup === 'string' ? markup : '' + markup;
- return markupString.replace(NORMALIZE_NEWLINES_REGEX, '\n').replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, '');
- };
-
- warnForTextDifference = function (serverText, clientText) {
- if (didWarnInvalidHydration) {
- return;
- }
-
- var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
- var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
-
- if (normalizedServerText === normalizedClientText) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
- };
-
- warnForPropDifference = function (propName, serverValue, clientValue) {
- if (didWarnInvalidHydration) {
- return;
- }
-
- var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
- var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
-
- if (normalizedServerValue === normalizedClientValue) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Prop `%s` did not match. Server: %s Client: %s', propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
- };
-
- warnForExtraAttributes = function (attributeNames) {
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
- var names = [];
- attributeNames.forEach(function (name) {
- names.push(name);
- });
-
- error('Extra attributes from the server: %s', names);
- };
-
- warnForInvalidEventListener = function (registrationName, listener) {
- if (listener === false) {
- error('Expected `%s` listener to be a function, instead got `false`.\n\n' + 'If you used to conditionally omit it with %s={condition && value}, ' + 'pass %s={condition ? value : undefined} instead.', registrationName, registrationName, registrationName);
- } else {
- error('Expected `%s` listener to be a function, instead got a value of `%s` type.', registrationName, typeof listener);
- }
- }; // Parse the HTML and read it back to normalize the HTML string so that it
- // can be used for comparison.
-
-
- normalizeHTML = function (parent, html) {
- // We could have created a separate document here to avoid
- // re-initializing custom elements if they exist. But this breaks
- // how <noscript> is being handled. So we use the same document.
- // See the discussion in https://github.com/facebook/react/pull/11157.
- var testElement = parent.namespaceURI === HTML_NAMESPACE$1 ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
- testElement.innerHTML = html;
- return testElement.innerHTML;
- };
- }
-
- function getOwnerDocumentFromRootContainer(rootContainerElement) {
- return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
- }
-
- function noop() {}
-
- function trapClickOnNonInteractiveElement(node) {
- // Mobile Safari does not fire properly bubble click events on
- // non-interactive elements, which means delegated click listeners do not
- // fire. The workaround for this bug involves attaching an empty click
- // listener on the target node.
- // https://www.quirksmode.org/blog/archives/2010/09/click_event_del.html
- // Just set it using the onclick property so that we don't have to manage any
- // bookkeeping for it. Not sure if we need to clear it when the listener is
- // removed.
- // TODO: Only do this for the relevant Safaris maybe?
- node.onclick = noop;
- }
-
- function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
- for (var propKey in nextProps) {
- if (!nextProps.hasOwnProperty(propKey)) {
- continue;
- }
-
- var nextProp = nextProps[propKey];
-
- if (propKey === STYLE) {
- {
- if (nextProp) {
- // Freeze the next style object so that we can assume it won't be
- // mutated. We have already warned for this in the past.
- Object.freeze(nextProp);
- }
- } // Relies on `updateStylesByID` not mutating `styleUpdates`.
-
-
- setValueForStyles(domElement, nextProp);
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
-
- if (nextHtml != null) {
- setInnerHTML(domElement, nextHtml);
- }
- } else if (propKey === CHILDREN) {
- if (typeof nextProp === 'string') {
- // Avoid setting initial textContent when the text is empty. In IE11 setting
- // textContent on a <textarea> will cause the placeholder to not
- // show within the <textarea> until it has been focused and blurred again.
- // https://github.com/facebook/react/issues/6731#issuecomment-254874553
- var canSetTextContent = tag !== 'textarea' || nextProp !== '';
-
- if (canSetTextContent) {
- setTextContent(domElement, nextProp);
- }
- } else if (typeof nextProp === 'number') {
- setTextContent(domElement, '' + nextProp);
- }
- } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
-
- if (propKey === 'onScroll') {
- listenToNonDelegatedEvent('scroll', domElement);
- }
- }
- } else if (nextProp != null) {
- setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
- }
- }
- }
-
- function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
- // TODO: Handle wasCustomComponentTag
- for (var i = 0; i < updatePayload.length; i += 2) {
- var propKey = updatePayload[i];
- var propValue = updatePayload[i + 1];
-
- if (propKey === STYLE) {
- setValueForStyles(domElement, propValue);
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- setInnerHTML(domElement, propValue);
- } else if (propKey === CHILDREN) {
- setTextContent(domElement, propValue);
- } else {
- setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
- }
- }
- }
-
- function createElement(type, props, rootContainerElement, parentNamespace) {
- var isCustomComponentTag; // We create tags in the namespace of their parent container, except HTML
- // tags get no namespace.
-
- var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
- var domElement;
- var namespaceURI = parentNamespace;
-
- if (namespaceURI === HTML_NAMESPACE$1) {
- namespaceURI = getIntrinsicNamespace(type);
- }
-
- if (namespaceURI === HTML_NAMESPACE$1) {
- {
- isCustomComponentTag = isCustomComponent(type, props); // Should this check be gated by parent namespace? Not sure we want to
- // allow <SVG> or <mATH>.
-
- if (!isCustomComponentTag && type !== type.toLowerCase()) {
- error('<%s /> is using incorrect casing. ' + 'Use PascalCase for React components, ' + 'or lowercase for HTML elements.', type);
- }
- }
-
- if (type === 'script') {
- // Create the script via .innerHTML so its "parser-inserted" flag is
- // set to true and it does not execute
- var div = ownerDocument.createElement('div');
-
- div.innerHTML = '<script><' + '/script>'; // eslint-disable-line
- // This is guaranteed to yield a script element.
-
- var firstChild = div.firstChild;
- domElement = div.removeChild(firstChild);
- } else if (typeof props.is === 'string') {
- // $FlowIssue `createElement` should be updated for Web Components
- domElement = ownerDocument.createElement(type, {
- is: props.is
- });
- } else {
- // Separate else branch instead of using `props.is || undefined` above because of a Firefox bug.
- // See discussion in https://github.com/facebook/react/pull/6896
- // and discussion in https://bugzilla.mozilla.org/show_bug.cgi?id=1276240
- domElement = ownerDocument.createElement(type); // Normally attributes are assigned in `setInitialDOMProperties`, however the `multiple` and `size`
- // attributes on `select`s needs to be added before `option`s are inserted.
- // This prevents:
- // - a bug where the `select` does not scroll to the correct option because singular
- // `select` elements automatically pick the first item #13222
- // - a bug where the `select` set the first item as selected despite the `size` attribute #14239
- // See https://github.com/facebook/react/issues/13222
- // and https://github.com/facebook/react/issues/14239
-
- if (type === 'select') {
- var node = domElement;
-
- if (props.multiple) {
- node.multiple = true;
- } else if (props.size) {
- // Setting a size greater than 1 causes a select to behave like `multiple=true`, where
- // it is possible that no option is selected.
- //
- // This is only necessary when a select in "single selection mode".
- node.size = props.size;
- }
- }
- }
- } else {
- domElement = ownerDocument.createElementNS(namespaceURI, type);
- }
-
- {
- if (namespaceURI === HTML_NAMESPACE$1) {
- if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === '[object HTMLUnknownElement]' && !Object.prototype.hasOwnProperty.call(warnedUnknownTags, type)) {
- warnedUnknownTags[type] = true;
-
- error('The tag <%s> is unrecognized in this browser. ' + 'If you meant to render a React component, start its name with ' + 'an uppercase letter.', type);
- }
- }
- }
-
- return domElement;
- }
- function createTextNode(text, rootContainerElement) {
- return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
- }
- function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
- var isCustomComponentTag = isCustomComponent(tag, rawProps);
-
- {
- validatePropertiesInDevelopment(tag, rawProps);
- } // TODO: Make sure that we check isMounted before firing any of these events.
-
-
- var props;
-
- switch (tag) {
- case 'dialog':
- listenToNonDelegatedEvent('cancel', domElement);
- listenToNonDelegatedEvent('close', domElement);
- props = rawProps;
- break;
-
- case 'iframe':
- case 'object':
- case 'embed':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the load event.
- listenToNonDelegatedEvent('load', domElement);
- props = rawProps;
- break;
-
- case 'video':
- case 'audio':
- // We listen to these events in case to ensure emulated bubble
- // listeners still fire for all the media events.
- for (var i = 0; i < mediaEventTypes.length; i++) {
- listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
- }
-
- props = rawProps;
- break;
-
- case 'source':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the error event.
- listenToNonDelegatedEvent('error', domElement);
- props = rawProps;
- break;
-
- case 'img':
- case 'image':
- case 'link':
- // We listen to these events in case to ensure emulated bubble
- // listeners still fire for error and load events.
- listenToNonDelegatedEvent('error', domElement);
- listenToNonDelegatedEvent('load', domElement);
- props = rawProps;
- break;
-
- case 'details':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the toggle event.
- listenToNonDelegatedEvent('toggle', domElement);
- props = rawProps;
- break;
-
- case 'input':
- initWrapperState(domElement, rawProps);
- props = getHostProps(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- case 'option':
- validateProps(domElement, rawProps);
- props = getHostProps$1(domElement, rawProps);
- break;
-
- case 'select':
- initWrapperState$1(domElement, rawProps);
- props = getHostProps$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- case 'textarea':
- initWrapperState$2(domElement, rawProps);
- props = getHostProps$3(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- default:
- props = rawProps;
- }
-
- assertValidProps(tag, props);
- setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
-
- switch (tag) {
- case 'input':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper(domElement, rawProps, false);
- break;
-
- case 'textarea':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper$3(domElement);
- break;
-
- case 'option':
- postMountWrapper$1(domElement, rawProps);
- break;
-
- case 'select':
- postMountWrapper$2(domElement, rawProps);
- break;
-
- default:
- if (typeof props.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
-
- break;
- }
- } // Calculate the diff between the two objects.
-
- function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
- {
- validatePropertiesInDevelopment(tag, nextRawProps);
- }
-
- var updatePayload = null;
- var lastProps;
- var nextProps;
-
- switch (tag) {
- case 'input':
- lastProps = getHostProps(domElement, lastRawProps);
- nextProps = getHostProps(domElement, nextRawProps);
- updatePayload = [];
- break;
-
- case 'option':
- lastProps = getHostProps$1(domElement, lastRawProps);
- nextProps = getHostProps$1(domElement, nextRawProps);
- updatePayload = [];
- break;
-
- case 'select':
- lastProps = getHostProps$2(domElement, lastRawProps);
- nextProps = getHostProps$2(domElement, nextRawProps);
- updatePayload = [];
- break;
-
- case 'textarea':
- lastProps = getHostProps$3(domElement, lastRawProps);
- nextProps = getHostProps$3(domElement, nextRawProps);
- updatePayload = [];
- break;
-
- default:
- lastProps = lastRawProps;
- nextProps = nextRawProps;
-
- if (typeof lastProps.onClick !== 'function' && typeof nextProps.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
-
- break;
- }
-
- assertValidProps(tag, nextProps);
- var propKey;
- var styleName;
- var styleUpdates = null;
-
- for (propKey in lastProps) {
- if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
- continue;
- }
-
- if (propKey === STYLE) {
- var lastStyle = lastProps[propKey];
-
- for (styleName in lastStyle) {
- if (lastStyle.hasOwnProperty(styleName)) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
-
- styleUpdates[styleName] = '';
- }
- }
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (propKey === AUTOFOCUS) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
- // This is a special case. If any listener updates we need to ensure
- // that the "current" fiber pointer gets updated so we need a commit
- // to update this element.
- if (!updatePayload) {
- updatePayload = [];
- }
- } else {
- // For all other deleted properties we add it to the queue. We use
- // the allowed property list in the commit phase instead.
- (updatePayload = updatePayload || []).push(propKey, null);
- }
- }
-
- for (propKey in nextProps) {
- var nextProp = nextProps[propKey];
- var lastProp = lastProps != null ? lastProps[propKey] : undefined;
-
- if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
- continue;
- }
-
- if (propKey === STYLE) {
- {
- if (nextProp) {
- // Freeze the next style object so that we can assume it won't be
- // mutated. We have already warned for this in the past.
- Object.freeze(nextProp);
- }
- }
-
- if (lastProp) {
- // Unset styles on `lastProp` but not on `nextProp`.
- for (styleName in lastProp) {
- if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
-
- styleUpdates[styleName] = '';
- }
- } // Update styles that changed since `lastProp`.
-
-
- for (styleName in nextProp) {
- if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
- if (!styleUpdates) {
- styleUpdates = {};
- }
-
- styleUpdates[styleName] = nextProp[styleName];
- }
- }
- } else {
- // Relies on `updateStylesByID` not mutating `styleUpdates`.
- if (!styleUpdates) {
- if (!updatePayload) {
- updatePayload = [];
- }
-
- updatePayload.push(propKey, styleUpdates);
- }
-
- styleUpdates = nextProp;
- }
- } else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
- var lastHtml = lastProp ? lastProp[HTML$1] : undefined;
-
- if (nextHtml != null) {
- if (lastHtml !== nextHtml) {
- (updatePayload = updatePayload || []).push(propKey, nextHtml);
- }
- }
- } else if (propKey === CHILDREN) {
- if (typeof nextProp === 'string' || typeof nextProp === 'number') {
- (updatePayload = updatePayload || []).push(propKey, '' + nextProp);
- }
- } else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING) ; else if (registrationNameDependencies.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- // We eagerly listen to this even though we haven't committed yet.
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
-
- if (propKey === 'onScroll') {
- listenToNonDelegatedEvent('scroll', domElement);
- }
- }
-
- if (!updatePayload && lastProp !== nextProp) {
- // This is a special case. If any listener updates we need to ensure
- // that the "current" props pointer gets updated so we need a commit
- // to update this element.
- updatePayload = [];
- }
- } else if (typeof nextProp === 'object' && nextProp !== null && nextProp.$$typeof === REACT_OPAQUE_ID_TYPE) {
- // If we encounter useOpaqueReference's opaque object, this means we are hydrating.
- // In this case, call the opaque object's toString function which generates a new client
- // ID so client and server IDs match and throws to rerender.
- nextProp.toString();
- } else {
- // For any other property we always add it to the queue and then we
- // filter it out using the allowed property list during the commit.
- (updatePayload = updatePayload || []).push(propKey, nextProp);
- }
- }
-
- if (styleUpdates) {
- {
- validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
- }
-
- (updatePayload = updatePayload || []).push(STYLE, styleUpdates);
- }
-
- return updatePayload;
- } // Apply the diff.
-
- function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
- // Update checked *before* name.
- // In the middle of an update, it is possible to have multiple checked.
- // When a checked radio tries to change name, browser makes another radio's checked false.
- if (tag === 'input' && nextRawProps.type === 'radio' && nextRawProps.name != null) {
- updateChecked(domElement, nextRawProps);
- }
-
- var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
- var isCustomComponentTag = isCustomComponent(tag, nextRawProps); // Apply the diff.
-
- updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag); // TODO: Ensure that an update gets scheduled if any of the special props
- // changed.
-
- switch (tag) {
- case 'input':
- // Update the wrapper around inputs *after* updating props. This has to
- // happen after `updateDOMProperties`. Otherwise HTML5 input validations
- // raise warnings and prevent the new value from being assigned.
- updateWrapper(domElement, nextRawProps);
- break;
-
- case 'textarea':
- updateWrapper$1(domElement, nextRawProps);
- break;
-
- case 'select':
- // <select> value update needs to occur after <option> children
- // reconciliation
- postUpdateWrapper(domElement, nextRawProps);
- break;
- }
- }
-
- function getPossibleStandardName(propName) {
- {
- var lowerCasedName = propName.toLowerCase();
-
- if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
- return null;
- }
-
- return possibleStandardNames[lowerCasedName] || null;
- }
- }
-
- function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement) {
- var isCustomComponentTag;
- var extraAttributeNames;
-
- {
- suppressHydrationWarning = rawProps[SUPPRESS_HYDRATION_WARNING] === true;
- isCustomComponentTag = isCustomComponent(tag, rawProps);
- validatePropertiesInDevelopment(tag, rawProps);
- } // TODO: Make sure that we check isMounted before firing any of these events.
-
-
- switch (tag) {
- case 'dialog':
- listenToNonDelegatedEvent('cancel', domElement);
- listenToNonDelegatedEvent('close', domElement);
- break;
-
- case 'iframe':
- case 'object':
- case 'embed':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the load event.
- listenToNonDelegatedEvent('load', domElement);
- break;
-
- case 'video':
- case 'audio':
- // We listen to these events in case to ensure emulated bubble
- // listeners still fire for all the media events.
- for (var i = 0; i < mediaEventTypes.length; i++) {
- listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
- }
-
- break;
-
- case 'source':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the error event.
- listenToNonDelegatedEvent('error', domElement);
- break;
-
- case 'img':
- case 'image':
- case 'link':
- // We listen to these events in case to ensure emulated bubble
- // listeners still fire for error and load events.
- listenToNonDelegatedEvent('error', domElement);
- listenToNonDelegatedEvent('load', domElement);
- break;
-
- case 'details':
- // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the toggle event.
- listenToNonDelegatedEvent('toggle', domElement);
- break;
-
- case 'input':
- initWrapperState(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- case 'option':
- validateProps(domElement, rawProps);
- break;
-
- case 'select':
- initWrapperState$1(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
-
- case 'textarea':
- initWrapperState$2(domElement, rawProps); // We listen to this event in case to ensure emulated bubble
- // listeners still fire for the invalid event.
-
- listenToNonDelegatedEvent('invalid', domElement);
-
- break;
- }
-
- assertValidProps(tag, rawProps);
-
- {
- extraAttributeNames = new Set();
- var attributes = domElement.attributes;
-
- for (var _i = 0; _i < attributes.length; _i++) {
- var name = attributes[_i].name.toLowerCase();
-
- switch (name) {
- // Built-in SSR attribute is allowed
- case 'data-reactroot':
- break;
- // Controlled attributes are not validated
- // TODO: Only ignore them on controlled tags.
-
- case 'value':
- break;
-
- case 'checked':
- break;
-
- case 'selected':
- break;
-
- default:
- // Intentionally use the original name.
- // See discussion in https://github.com/facebook/react/pull/10676.
- extraAttributeNames.add(attributes[_i].name);
- }
- }
- }
-
- var updatePayload = null;
-
- for (var propKey in rawProps) {
- if (!rawProps.hasOwnProperty(propKey)) {
- continue;
- }
-
- var nextProp = rawProps[propKey];
-
- if (propKey === CHILDREN) {
- // For text content children we compare against textContent. This
- // might match additional HTML that is hidden when we read it using
- // textContent. E.g. "foo" will match "f<span>oo</span>" but that still
- // satisfies our requirement. Our requirement is not to produce perfect
- // HTML and attributes. Ideally we should preserve structure but it's
- // ok not to if the visible content is still enough to indicate what
- // even listeners these nodes might be wired up to.
- // TODO: Warn if there is more than a single textNode as a child.
- // TODO: Should we use domElement.firstChild.nodeValue to compare?
- if (typeof nextProp === 'string') {
- if (domElement.textContent !== nextProp) {
- if ( !suppressHydrationWarning) {
- warnForTextDifference(domElement.textContent, nextProp);
- }
-
- updatePayload = [CHILDREN, nextProp];
- }
- } else if (typeof nextProp === 'number') {
- if (domElement.textContent !== '' + nextProp) {
- if ( !suppressHydrationWarning) {
- warnForTextDifference(domElement.textContent, nextProp);
- }
-
- updatePayload = [CHILDREN, '' + nextProp];
- }
- }
- } else if (registrationNameDependencies.hasOwnProperty(propKey)) {
- if (nextProp != null) {
- if ( typeof nextProp !== 'function') {
- warnForInvalidEventListener(propKey, nextProp);
- }
-
- if (propKey === 'onScroll') {
- listenToNonDelegatedEvent('scroll', domElement);
- }
- }
- } else if ( // Convince Flow we've calculated it (it's DEV-only in this method.)
- typeof isCustomComponentTag === 'boolean') {
- // Validate that the properties correspond to their expected values.
- var serverValue = void 0;
- var propertyInfo = getPropertyInfo(propKey);
-
- if (suppressHydrationWarning) ; else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
- // TODO: Only ignore them on controlled tags.
- propKey === 'value' || propKey === 'checked' || propKey === 'selected') ; else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
- var serverHTML = domElement.innerHTML;
- var nextHtml = nextProp ? nextProp[HTML$1] : undefined;
-
- if (nextHtml != null) {
- var expectedHTML = normalizeHTML(domElement, nextHtml);
-
- if (expectedHTML !== serverHTML) {
- warnForPropDifference(propKey, serverHTML, expectedHTML);
- }
- }
- } else if (propKey === STYLE) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey);
-
- if (canDiffStyleForHydrationWarning) {
- var expectedStyle = createDangerousStringForStyles(nextProp);
- serverValue = domElement.getAttribute('style');
-
- if (expectedStyle !== serverValue) {
- warnForPropDifference(propKey, serverValue, expectedStyle);
- }
- }
- } else if (isCustomComponentTag) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey.toLowerCase());
- serverValue = getValueForAttribute(domElement, propKey, nextProp);
-
- if (nextProp !== serverValue) {
- warnForPropDifference(propKey, serverValue, nextProp);
- }
- } else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
- var isMismatchDueToBadCasing = false;
-
- if (propertyInfo !== null) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propertyInfo.attributeName);
- serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
- } else {
- var ownNamespace = parentNamespace;
-
- if (ownNamespace === HTML_NAMESPACE$1) {
- ownNamespace = getIntrinsicNamespace(tag);
- }
-
- if (ownNamespace === HTML_NAMESPACE$1) {
- // $FlowFixMe - Should be inferred as not undefined.
- extraAttributeNames.delete(propKey.toLowerCase());
- } else {
- var standardName = getPossibleStandardName(propKey);
-
- if (standardName !== null && standardName !== propKey) {
- // If an SVG prop is supplied with bad casing, it will
- // be successfully parsed from HTML, but will produce a mismatch
- // (and would be incorrectly rendered on the client).
- // However, we already warn about bad casing elsewhere.
- // So we'll skip the misleading extra mismatch warning in this case.
- isMismatchDueToBadCasing = true; // $FlowFixMe - Should be inferred as not undefined.
-
- extraAttributeNames.delete(standardName);
- } // $FlowFixMe - Should be inferred as not undefined.
-
-
- extraAttributeNames.delete(propKey);
- }
-
- serverValue = getValueForAttribute(domElement, propKey, nextProp);
- }
-
- if (nextProp !== serverValue && !isMismatchDueToBadCasing) {
- warnForPropDifference(propKey, serverValue, nextProp);
- }
- }
- }
- }
-
- {
- // $FlowFixMe - Should be inferred as not undefined.
- if (extraAttributeNames.size > 0 && !suppressHydrationWarning) {
- // $FlowFixMe - Should be inferred as not undefined.
- warnForExtraAttributes(extraAttributeNames);
- }
- }
-
- switch (tag) {
- case 'input':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper(domElement, rawProps, true);
- break;
-
- case 'textarea':
- // TODO: Make sure we check if this is still unmounted or do any clean
- // up necessary since we never stop tracking anymore.
- track(domElement);
- postMountWrapper$3(domElement);
- break;
-
- case 'select':
- case 'option':
- // For input and textarea we current always set the value property at
- // post mount to force it to diverge from attributes. However, for
- // option and select we don't quite do the same thing and select
- // is not resilient to the DOM state changing so we don't do that here.
- // TODO: Consider not doing this for input and textarea.
- break;
-
- default:
- if (typeof rawProps.onClick === 'function') {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(domElement);
- }
-
- break;
- }
-
- return updatePayload;
- }
- function diffHydratedText(textNode, text) {
- var isDifferent = textNode.nodeValue !== text;
- return isDifferent;
- }
- function warnForUnmatchedText(textNode, text) {
- {
- warnForTextDifference(textNode.nodeValue, text);
- }
- }
- function warnForDeletedHydratableElement(parentNode, child) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Did not expect server HTML to contain a <%s> in <%s>.', child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
- }
- }
- function warnForDeletedHydratableText(parentNode, child) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
- }
- }
- function warnForInsertedHydratedElement(parentNode, tag, props) {
- {
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Expected server HTML to contain a matching <%s> in <%s>.', tag, parentNode.nodeName.toLowerCase());
- }
- }
- function warnForInsertedHydratedText(parentNode, text) {
- {
- if (text === '') {
- // We expect to insert empty text nodes since they're not represented in
- // the HTML.
- // TODO: Remove this special case if we can just avoid inserting empty
- // text nodes.
- return;
- }
-
- if (didWarnInvalidHydration) {
- return;
- }
-
- didWarnInvalidHydration = true;
-
- error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
- }
- }
- function restoreControlledState$3(domElement, tag, props) {
- switch (tag) {
- case 'input':
- restoreControlledState(domElement, props);
- return;
-
- case 'textarea':
- restoreControlledState$2(domElement, props);
- return;
-
- case 'select':
- restoreControlledState$1(domElement, props);
- return;
- }
- }
-
- var validateDOMNesting = function () {};
-
- var updatedAncestorInfo = function () {};
-
- {
- // This validation code was written based on the HTML5 parsing spec:
- // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
- //
- // Note: this does not catch all invalid nesting, nor does it try to (as it's
- // not clear what practical benefit doing so provides); instead, we warn only
- // for cases where the parser will give a parse tree differing from what React
- // intended. For example, <b><div></div></b> is invalid but we don't warn
- // because it still parses correctly; we do warn for other cases like nested
- // <p> tags where the beginning of the second element implicitly closes the
- // first, causing a confusing mess.
- // https://html.spec.whatwg.org/multipage/syntax.html#special
- var specialTags = ['address', 'applet', 'area', 'article', 'aside', 'base', 'basefont', 'bgsound', 'blockquote', 'body', 'br', 'button', 'caption', 'center', 'col', 'colgroup', 'dd', 'details', 'dir', 'div', 'dl', 'dt', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'iframe', 'img', 'input', 'isindex', 'li', 'link', 'listing', 'main', 'marquee', 'menu', 'menuitem', 'meta', 'nav', 'noembed', 'noframes', 'noscript', 'object', 'ol', 'p', 'param', 'plaintext', 'pre', 'script', 'section', 'select', 'source', 'style', 'summary', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'title', 'tr', 'track', 'ul', 'wbr', 'xmp']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-scope
-
- var inScopeTags = ['applet', 'caption', 'html', 'table', 'td', 'th', 'marquee', 'object', 'template', // https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
- // TODO: Distinguish by namespace here -- for <title>, including it here
- // errs on the side of fewer warnings
- 'foreignObject', 'desc', 'title']; // https://html.spec.whatwg.org/multipage/syntax.html#has-an-element-in-button-scope
-
- var buttonScopeTags = inScopeTags.concat(['button']); // https://html.spec.whatwg.org/multipage/syntax.html#generate-implied-end-tags
-
- var impliedEndTags = ['dd', 'dt', 'li', 'option', 'optgroup', 'p', 'rp', 'rt'];
- var emptyAncestorInfo = {
- current: null,
- formTag: null,
- aTagInScope: null,
- buttonTagInScope: null,
- nobrTagInScope: null,
- pTagInButtonScope: null,
- listItemTagAutoclosing: null,
- dlItemTagAutoclosing: null
- };
-
- updatedAncestorInfo = function (oldInfo, tag) {
- var ancestorInfo = _assign({}, oldInfo || emptyAncestorInfo);
-
- var info = {
- tag: tag
- };
-
- if (inScopeTags.indexOf(tag) !== -1) {
- ancestorInfo.aTagInScope = null;
- ancestorInfo.buttonTagInScope = null;
- ancestorInfo.nobrTagInScope = null;
- }
-
- if (buttonScopeTags.indexOf(tag) !== -1) {
- ancestorInfo.pTagInButtonScope = null;
- } // See rules for 'li', 'dd', 'dt' start tags in
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
-
-
- if (specialTags.indexOf(tag) !== -1 && tag !== 'address' && tag !== 'div' && tag !== 'p') {
- ancestorInfo.listItemTagAutoclosing = null;
- ancestorInfo.dlItemTagAutoclosing = null;
- }
-
- ancestorInfo.current = info;
-
- if (tag === 'form') {
- ancestorInfo.formTag = info;
- }
-
- if (tag === 'a') {
- ancestorInfo.aTagInScope = info;
- }
-
- if (tag === 'button') {
- ancestorInfo.buttonTagInScope = info;
- }
-
- if (tag === 'nobr') {
- ancestorInfo.nobrTagInScope = info;
- }
-
- if (tag === 'p') {
- ancestorInfo.pTagInButtonScope = info;
- }
-
- if (tag === 'li') {
- ancestorInfo.listItemTagAutoclosing = info;
- }
-
- if (tag === 'dd' || tag === 'dt') {
- ancestorInfo.dlItemTagAutoclosing = info;
- }
-
- return ancestorInfo;
- };
- /**
- * Returns whether
- */
-
-
- var isTagValidWithParent = function (tag, parentTag) {
- // First, let's check if we're in an unusual parsing mode...
- switch (parentTag) {
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inselect
- case 'select':
- return tag === 'option' || tag === 'optgroup' || tag === '#text';
-
- case 'optgroup':
- return tag === 'option' || tag === '#text';
- // Strictly speaking, seeing an <option> doesn't mean we're in a <select>
- // but
-
- case 'option':
- return tag === '#text';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intd
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incaption
- // No special behavior since these rules fall back to "in body" mode for
- // all except special table nodes which cause bad parsing behavior anyway.
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intr
-
- case 'tr':
- return tag === 'th' || tag === 'td' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intbody
-
- case 'tbody':
- case 'thead':
- case 'tfoot':
- return tag === 'tr' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-incolgroup
-
- case 'colgroup':
- return tag === 'col' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-intable
-
- case 'table':
- return tag === 'caption' || tag === 'colgroup' || tag === 'tbody' || tag === 'tfoot' || tag === 'thead' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inhead
-
- case 'head':
- return tag === 'base' || tag === 'basefont' || tag === 'bgsound' || tag === 'link' || tag === 'meta' || tag === 'title' || tag === 'noscript' || tag === 'noframes' || tag === 'style' || tag === 'script' || tag === 'template';
- // https://html.spec.whatwg.org/multipage/semantics.html#the-html-element
-
- case 'html':
- return tag === 'head' || tag === 'body' || tag === 'frameset';
-
- case 'frameset':
- return tag === 'frame';
-
- case '#document':
- return tag === 'html';
- } // Probably in the "in body" parsing mode, so we outlaw only tag combos
- // where the parsing rules cause implicit opens or closes to be added.
- // https://html.spec.whatwg.org/multipage/syntax.html#parsing-main-inbody
-
-
- switch (tag) {
- case 'h1':
- case 'h2':
- case 'h3':
- case 'h4':
- case 'h5':
- case 'h6':
- return parentTag !== 'h1' && parentTag !== 'h2' && parentTag !== 'h3' && parentTag !== 'h4' && parentTag !== 'h5' && parentTag !== 'h6';
-
- case 'rp':
- case 'rt':
- return impliedEndTags.indexOf(parentTag) === -1;
-
- case 'body':
- case 'caption':
- case 'col':
- case 'colgroup':
- case 'frameset':
- case 'frame':
- case 'head':
- case 'html':
- case 'tbody':
- case 'td':
- case 'tfoot':
- case 'th':
- case 'thead':
- case 'tr':
- // These tags are only valid with a few parents that have special child
- // parsing rules -- if we're down here, then none of those matched and
- // so we allow it only if we don't know what the parent is, as all other
- // cases are invalid.
- return parentTag == null;
- }
-
- return true;
- };
- /**
- * Returns whether
- */
-
-
- var findInvalidAncestorForTag = function (tag, ancestorInfo) {
- switch (tag) {
- case 'address':
- case 'article':
- case 'aside':
- case 'blockquote':
- case 'center':
- case 'details':
- case 'dialog':
- case 'dir':
- case 'div':
- case 'dl':
- case 'fieldset':
- case 'figcaption':
- case 'figure':
- case 'footer':
- case 'header':
- case 'hgroup':
- case 'main':
- case 'menu':
- case 'nav':
- case 'ol':
- case 'p':
- case 'section':
- case 'summary':
- case 'ul':
- case 'pre':
- case 'listing':
- case 'table':
- case 'hr':
- case 'xmp':
- case 'h1':
- case 'h2':
- case 'h3':
- case 'h4':
- case 'h5':
- case 'h6':
- return ancestorInfo.pTagInButtonScope;
-
- case 'form':
- return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
-
- case 'li':
- return ancestorInfo.listItemTagAutoclosing;
-
- case 'dd':
- case 'dt':
- return ancestorInfo.dlItemTagAutoclosing;
-
- case 'button':
- return ancestorInfo.buttonTagInScope;
-
- case 'a':
- // Spec says something about storing a list of markers, but it sounds
- // equivalent to this check.
- return ancestorInfo.aTagInScope;
-
- case 'nobr':
- return ancestorInfo.nobrTagInScope;
- }
-
- return null;
- };
-
- var didWarn$1 = {};
-
- validateDOMNesting = function (childTag, childText, ancestorInfo) {
- ancestorInfo = ancestorInfo || emptyAncestorInfo;
- var parentInfo = ancestorInfo.current;
- var parentTag = parentInfo && parentInfo.tag;
-
- if (childText != null) {
- if (childTag != null) {
- error('validateDOMNesting: when childText is passed, childTag should be null');
- }
-
- childTag = '#text';
- }
-
- var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
- var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
- var invalidParentOrAncestor = invalidParent || invalidAncestor;
-
- if (!invalidParentOrAncestor) {
- return;
- }
-
- var ancestorTag = invalidParentOrAncestor.tag;
- var warnKey = !!invalidParent + '|' + childTag + '|' + ancestorTag;
-
- if (didWarn$1[warnKey]) {
- return;
- }
-
- didWarn$1[warnKey] = true;
- var tagDisplayName = childTag;
- var whitespaceInfo = '';
-
- if (childTag === '#text') {
- if (/\S/.test(childText)) {
- tagDisplayName = 'Text nodes';
- } else {
- tagDisplayName = 'Whitespace text nodes';
- whitespaceInfo = " Make sure you don't have any extra whitespace between tags on " + 'each line of your source code.';
- }
- } else {
- tagDisplayName = '<' + childTag + '>';
- }
-
- if (invalidParent) {
- var info = '';
-
- if (ancestorTag === 'table' && childTag === 'tr') {
- info += ' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' + 'the browser.';
- }
-
- error('validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s', tagDisplayName, ancestorTag, whitespaceInfo, info);
- } else {
- error('validateDOMNesting(...): %s cannot appear as a descendant of ' + '<%s>.', tagDisplayName, ancestorTag);
- }
- };
- }
-
- var SUPPRESS_HYDRATION_WARNING$1;
-
- {
- SUPPRESS_HYDRATION_WARNING$1 = 'suppressHydrationWarning';
- }
-
- var SUSPENSE_START_DATA = '$';
- var SUSPENSE_END_DATA = '/$';
- var SUSPENSE_PENDING_START_DATA = '$?';
- var SUSPENSE_FALLBACK_START_DATA = '$!';
- var STYLE$1 = 'style';
- var eventsEnabled = null;
- var selectionInformation = null;
-
- function shouldAutoFocusHostComponent(type, props) {
- switch (type) {
- case 'button':
- case 'input':
- case 'select':
- case 'textarea':
- return !!props.autoFocus;
- }
-
- return false;
- }
- function getRootHostContext(rootContainerInstance) {
- var type;
- var namespace;
- var nodeType = rootContainerInstance.nodeType;
-
- switch (nodeType) {
- case DOCUMENT_NODE:
- case DOCUMENT_FRAGMENT_NODE:
- {
- type = nodeType === DOCUMENT_NODE ? '#document' : '#fragment';
- var root = rootContainerInstance.documentElement;
- namespace = root ? root.namespaceURI : getChildNamespace(null, '');
- break;
- }
-
- default:
- {
- var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
- var ownNamespace = container.namespaceURI || null;
- type = container.tagName;
- namespace = getChildNamespace(ownNamespace, type);
- break;
- }
- }
-
- {
- var validatedTag = type.toLowerCase();
- var ancestorInfo = updatedAncestorInfo(null, validatedTag);
- return {
- namespace: namespace,
- ancestorInfo: ancestorInfo
- };
- }
- }
- function getChildHostContext(parentHostContext, type, rootContainerInstance) {
- {
- var parentHostContextDev = parentHostContext;
- var namespace = getChildNamespace(parentHostContextDev.namespace, type);
- var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
- return {
- namespace: namespace,
- ancestorInfo: ancestorInfo
- };
- }
- }
- function getPublicInstance(instance) {
- return instance;
- }
- function prepareForCommit(containerInfo) {
- eventsEnabled = isEnabled();
- selectionInformation = getSelectionInformation();
- var activeInstance = null;
-
- setEnabled(false);
- return activeInstance;
- }
- function resetAfterCommit(containerInfo) {
- restoreSelection(selectionInformation);
- setEnabled(eventsEnabled);
- eventsEnabled = null;
- selectionInformation = null;
- }
- function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
- var parentNamespace;
-
- {
- // TODO: take namespace into account when validating.
- var hostContextDev = hostContext;
- validateDOMNesting(type, null, hostContextDev.ancestorInfo);
-
- if (typeof props.children === 'string' || typeof props.children === 'number') {
- var string = '' + props.children;
- var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
- validateDOMNesting(null, string, ownAncestorInfo);
- }
-
- parentNamespace = hostContextDev.namespace;
- }
-
- var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
- precacheFiberNode(internalInstanceHandle, domElement);
- updateFiberProps(domElement, props);
- return domElement;
- }
- function appendInitialChild(parentInstance, child) {
- parentInstance.appendChild(child);
- }
- function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
- setInitialProperties(domElement, type, props, rootContainerInstance);
- return shouldAutoFocusHostComponent(type, props);
- }
- function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
- {
- var hostContextDev = hostContext;
-
- if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === 'string' || typeof newProps.children === 'number')) {
- var string = '' + newProps.children;
- var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
- validateDOMNesting(null, string, ownAncestorInfo);
- }
- }
-
- return diffProperties(domElement, type, oldProps, newProps);
- }
- function shouldSetTextContent(type, props) {
- return type === 'textarea' || type === 'option' || type === 'noscript' || typeof props.children === 'string' || typeof props.children === 'number' || typeof props.dangerouslySetInnerHTML === 'object' && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
- }
- function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
- {
- var hostContextDev = hostContext;
- validateDOMNesting(null, text, hostContextDev.ancestorInfo);
- }
-
- var textNode = createTextNode(text, rootContainerInstance);
- precacheFiberNode(internalInstanceHandle, textNode);
- return textNode;
- }
- // if a component just imports ReactDOM (e.g. for findDOMNode).
- // Some environments might not have setTimeout or clearTimeout.
-
- var scheduleTimeout = typeof setTimeout === 'function' ? setTimeout : undefined;
- var cancelTimeout = typeof clearTimeout === 'function' ? clearTimeout : undefined;
- var noTimeout = -1; // -------------------
- function commitMount(domElement, type, newProps, internalInstanceHandle) {
- // Despite the naming that might imply otherwise, this method only
- // fires if there is an `Update` effect scheduled during mounting.
- // This happens if `finalizeInitialChildren` returns `true` (which it
- // does to implement the `autoFocus` attribute on the client). But
- // there are also other cases when this might happen (such as patching
- // up text content during hydration mismatch). So we'll check this again.
- if (shouldAutoFocusHostComponent(type, newProps)) {
- domElement.focus();
- }
- }
- function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
- // Update the props handle so that we know which props are the ones with
- // with current event handlers.
- updateFiberProps(domElement, newProps); // Apply the diff to the DOM node.
-
- updateProperties(domElement, updatePayload, type, oldProps, newProps);
- }
- function resetTextContent(domElement) {
- setTextContent(domElement, '');
- }
- function commitTextUpdate(textInstance, oldText, newText) {
- textInstance.nodeValue = newText;
- }
- function appendChild(parentInstance, child) {
- parentInstance.appendChild(child);
- }
- function appendChildToContainer(container, child) {
- var parentNode;
-
- if (container.nodeType === COMMENT_NODE) {
- parentNode = container.parentNode;
- parentNode.insertBefore(child, container);
- } else {
- parentNode = container;
- parentNode.appendChild(child);
- } // This container might be used for a portal.
- // If something inside a portal is clicked, that click should bubble
- // through the React tree. However, on Mobile Safari the click would
- // never bubble through the *DOM* tree unless an ancestor with onclick
- // event exists. So we wouldn't see it and dispatch it.
- // This is why we ensure that non React root containers have inline onclick
- // defined.
- // https://github.com/facebook/react/issues/11918
-
-
- var reactRootContainer = container._reactRootContainer;
-
- if ((reactRootContainer === null || reactRootContainer === undefined) && parentNode.onclick === null) {
- // TODO: This cast may not be sound for SVG, MathML or custom elements.
- trapClickOnNonInteractiveElement(parentNode);
- }
- }
- function insertBefore(parentInstance, child, beforeChild) {
- parentInstance.insertBefore(child, beforeChild);
- }
- function insertInContainerBefore(container, child, beforeChild) {
- if (container.nodeType === COMMENT_NODE) {
- container.parentNode.insertBefore(child, beforeChild);
- } else {
- container.insertBefore(child, beforeChild);
- }
- }
-
- function removeChild(parentInstance, child) {
- parentInstance.removeChild(child);
- }
- function removeChildFromContainer(container, child) {
- if (container.nodeType === COMMENT_NODE) {
- container.parentNode.removeChild(child);
- } else {
- container.removeChild(child);
- }
- }
- function hideInstance(instance) {
- // TODO: Does this work for all element types? What about MathML? Should we
- // pass host context to this method?
- instance = instance;
- var style = instance.style;
-
- if (typeof style.setProperty === 'function') {
- style.setProperty('display', 'none', 'important');
- } else {
- style.display = 'none';
- }
- }
- function hideTextInstance(textInstance) {
- textInstance.nodeValue = '';
- }
- function unhideInstance(instance, props) {
- instance = instance;
- var styleProp = props[STYLE$1];
- var display = styleProp !== undefined && styleProp !== null && styleProp.hasOwnProperty('display') ? styleProp.display : null;
- instance.style.display = dangerousStyleValue('display', display);
- }
- function unhideTextInstance(textInstance, text) {
- textInstance.nodeValue = text;
- }
- function clearContainer(container) {
- if (container.nodeType === ELEMENT_NODE) {
- container.textContent = '';
- } else if (container.nodeType === DOCUMENT_NODE) {
- var body = container.body;
-
- if (body != null) {
- body.textContent = '';
- }
- }
- } // -------------------
- function canHydrateInstance(instance, type, props) {
- if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
- return null;
- } // This has now been refined to an element node.
-
-
- return instance;
- }
- function canHydrateTextInstance(instance, text) {
- if (text === '' || instance.nodeType !== TEXT_NODE) {
- // Empty strings are not parsed by HTML so there won't be a correct match here.
- return null;
- } // This has now been refined to a text node.
-
-
- return instance;
- }
- function isSuspenseInstancePending(instance) {
- return instance.data === SUSPENSE_PENDING_START_DATA;
- }
- function isSuspenseInstanceFallback(instance) {
- return instance.data === SUSPENSE_FALLBACK_START_DATA;
- }
-
- function getNextHydratable(node) {
- // Skip non-hydratable nodes.
- for (; node != null; node = node.nextSibling) {
- var nodeType = node.nodeType;
-
- if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
- break;
- }
- }
-
- return node;
- }
-
- function getNextHydratableSibling(instance) {
- return getNextHydratable(instance.nextSibling);
- }
- function getFirstHydratableChild(parentInstance) {
- return getNextHydratable(parentInstance.firstChild);
- }
- function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
- precacheFiberNode(internalInstanceHandle, instance); // TODO: Possibly defer this until the commit phase where all the events
- // get attached.
-
- updateFiberProps(instance, props);
- var parentNamespace;
-
- {
- var hostContextDev = hostContext;
- parentNamespace = hostContextDev.namespace;
- }
-
- return diffHydratedProperties(instance, type, props, parentNamespace);
- }
- function hydrateTextInstance(textInstance, text, internalInstanceHandle) {
- precacheFiberNode(internalInstanceHandle, textInstance);
- return diffHydratedText(textInstance, text);
- }
- function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
- var node = suspenseInstance.nextSibling; // Skip past all nodes within this suspense boundary.
- // There might be nested nodes so we need to keep track of how
- // deep we are and only break out when we're back on top.
-
- var depth = 0;
-
- while (node) {
- if (node.nodeType === COMMENT_NODE) {
- var data = node.data;
-
- if (data === SUSPENSE_END_DATA) {
- if (depth === 0) {
- return getNextHydratableSibling(node);
- } else {
- depth--;
- }
- } else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
- depth++;
- }
- }
-
- node = node.nextSibling;
- } // TODO: Warn, we didn't find the end comment boundary.
-
-
- return null;
- } // Returns the SuspenseInstance if this node is a direct child of a
- // SuspenseInstance. I.e. if its previous sibling is a Comment with
- // SUSPENSE_x_START_DATA. Otherwise, null.
-
- function getParentSuspenseInstance(targetInstance) {
- var node = targetInstance.previousSibling; // Skip past all nodes within this suspense boundary.
- // There might be nested nodes so we need to keep track of how
- // deep we are and only break out when we're back on top.
-
- var depth = 0;
-
- while (node) {
- if (node.nodeType === COMMENT_NODE) {
- var data = node.data;
-
- if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
- if (depth === 0) {
- return node;
- } else {
- depth--;
- }
- } else if (data === SUSPENSE_END_DATA) {
- depth++;
- }
- }
-
- node = node.previousSibling;
- }
-
- return null;
- }
- function commitHydratedContainer(container) {
- // Retry if any event replaying was blocked on this.
- retryIfBlockedOn(container);
- }
- function commitHydratedSuspenseInstance(suspenseInstance) {
- // Retry if any event replaying was blocked on this.
- retryIfBlockedOn(suspenseInstance);
- }
- function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text) {
- {
- warnForUnmatchedText(textInstance, text);
- }
- }
- function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForUnmatchedText(textInstance, text);
- }
- }
- function didNotHydrateContainerInstance(parentContainer, instance) {
- {
- if (instance.nodeType === ELEMENT_NODE) {
- warnForDeletedHydratableElement(parentContainer, instance);
- } else if (instance.nodeType === COMMENT_NODE) ; else {
- warnForDeletedHydratableText(parentContainer, instance);
- }
- }
- }
- function didNotHydrateInstance(parentType, parentProps, parentInstance, instance) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- if (instance.nodeType === ELEMENT_NODE) {
- warnForDeletedHydratableElement(parentInstance, instance);
- } else if (instance.nodeType === COMMENT_NODE) ; else {
- warnForDeletedHydratableText(parentInstance, instance);
- }
- }
- }
- function didNotFindHydratableContainerInstance(parentContainer, type, props) {
- {
- warnForInsertedHydratedElement(parentContainer, type);
- }
- }
- function didNotFindHydratableContainerTextInstance(parentContainer, text) {
- {
- warnForInsertedHydratedText(parentContainer, text);
- }
- }
- function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForInsertedHydratedElement(parentInstance, type);
- }
- }
- function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
- warnForInsertedHydratedText(parentInstance, text);
- }
- }
- function didNotFindHydratableSuspenseInstance(parentType, parentProps, parentInstance) {
- if ( parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) ;
- }
- var clientId = 0;
- function makeClientIdInDEV(warnOnAccessInDEV) {
- var id = 'r:' + (clientId++).toString(36);
- return {
- toString: function () {
- warnOnAccessInDEV();
- return id;
- },
- valueOf: function () {
- warnOnAccessInDEV();
- return id;
- }
- };
- }
- function isOpaqueHydratingObject(value) {
- return value !== null && typeof value === 'object' && value.$$typeof === REACT_OPAQUE_ID_TYPE;
- }
- function makeOpaqueHydratingObject(attemptToReadValue) {
- return {
- $$typeof: REACT_OPAQUE_ID_TYPE,
- toString: attemptToReadValue,
- valueOf: attemptToReadValue
- };
- }
- function preparePortalMount(portalInstance) {
- {
- listenToAllSupportedEvents(portalInstance);
- }
- }
-
- var randomKey = Math.random().toString(36).slice(2);
- var internalInstanceKey = '__reactFiber$' + randomKey;
- var internalPropsKey = '__reactProps$' + randomKey;
- var internalContainerInstanceKey = '__reactContainer$' + randomKey;
- var internalEventHandlersKey = '__reactEvents$' + randomKey;
- function precacheFiberNode(hostInst, node) {
- node[internalInstanceKey] = hostInst;
- }
- function markContainerAsRoot(hostRoot, node) {
- node[internalContainerInstanceKey] = hostRoot;
- }
- function unmarkContainerAsRoot(node) {
- node[internalContainerInstanceKey] = null;
- }
- function isContainerMarkedAsRoot(node) {
- return !!node[internalContainerInstanceKey];
- } // Given a DOM node, return the closest HostComponent or HostText fiber ancestor.
- // If the target node is part of a hydrated or not yet rendered subtree, then
- // this may also return a SuspenseComponent or HostRoot to indicate that.
- // Conceptually the HostRoot fiber is a child of the Container node. So if you
- // pass the Container node as the targetNode, you will not actually get the
- // HostRoot back. To get to the HostRoot, you need to pass a child of it.
- // The same thing applies to Suspense boundaries.
-
- function getClosestInstanceFromNode(targetNode) {
- var targetInst = targetNode[internalInstanceKey];
-
- if (targetInst) {
- // Don't return HostRoot or SuspenseComponent here.
- return targetInst;
- } // If the direct event target isn't a React owned DOM node, we need to look
- // to see if one of its parents is a React owned DOM node.
-
-
- var parentNode = targetNode.parentNode;
-
- while (parentNode) {
- // We'll check if this is a container root that could include
- // React nodes in the future. We need to check this first because
- // if we're a child of a dehydrated container, we need to first
- // find that inner container before moving on to finding the parent
- // instance. Note that we don't check this field on the targetNode
- // itself because the fibers are conceptually between the container
- // node and the first child. It isn't surrounding the container node.
- // If it's not a container, we check if it's an instance.
- targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];
-
- if (targetInst) {
- // Since this wasn't the direct target of the event, we might have
- // stepped past dehydrated DOM nodes to get here. However they could
- // also have been non-React nodes. We need to answer which one.
- // If we the instance doesn't have any children, then there can't be
- // a nested suspense boundary within it. So we can use this as a fast
- // bailout. Most of the time, when people add non-React children to
- // the tree, it is using a ref to a child-less DOM node.
- // Normally we'd only need to check one of the fibers because if it
- // has ever gone from having children to deleting them or vice versa
- // it would have deleted the dehydrated boundary nested inside already.
- // However, since the HostRoot starts out with an alternate it might
- // have one on the alternate so we need to check in case this was a
- // root.
- var alternate = targetInst.alternate;
-
- if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
- // Next we need to figure out if the node that skipped past is
- // nested within a dehydrated boundary and if so, which one.
- var suspenseInstance = getParentSuspenseInstance(targetNode);
-
- while (suspenseInstance !== null) {
- // We found a suspense instance. That means that we haven't
- // hydrated it yet. Even though we leave the comments in the
- // DOM after hydrating, and there are boundaries in the DOM
- // that could already be hydrated, we wouldn't have found them
- // through this pass since if the target is hydrated it would
- // have had an internalInstanceKey on it.
- // Let's get the fiber associated with the SuspenseComponent
- // as the deepest instance.
- var targetSuspenseInst = suspenseInstance[internalInstanceKey];
-
- if (targetSuspenseInst) {
- return targetSuspenseInst;
- } // If we don't find a Fiber on the comment, it might be because
- // we haven't gotten to hydrate it yet. There might still be a
- // parent boundary that hasn't above this one so we need to find
- // the outer most that is known.
-
-
- suspenseInstance = getParentSuspenseInstance(suspenseInstance); // If we don't find one, then that should mean that the parent
- // host component also hasn't hydrated yet. We can return it
- // below since it will bail out on the isMounted check later.
- }
- }
-
- return targetInst;
- }
-
- targetNode = parentNode;
- parentNode = targetNode.parentNode;
- }
-
- return null;
- }
- /**
- * Given a DOM node, return the ReactDOMComponent or ReactDOMTextComponent
- * instance, or null if the node was not rendered by this React.
- */
-
- function getInstanceFromNode(node) {
- var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
-
- if (inst) {
- if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
- return inst;
- } else {
- return null;
- }
- }
-
- return null;
- }
- /**
- * Given a ReactDOMComponent or ReactDOMTextComponent, return the corresponding
- * DOM node.
- */
-
- function getNodeFromInstance(inst) {
- if (inst.tag === HostComponent || inst.tag === HostText) {
- // In Fiber this, is just the state node right now. We assume it will be
- // a host component or host text.
- return inst.stateNode;
- } // Without this first invariant, passing a non-DOM-component triggers the next
- // invariant for a missing parent, which is super confusing.
-
-
- {
- {
- throw Error( "getNodeFromInstance: Invalid argument." );
- }
- }
- }
- function getFiberCurrentPropsFromNode(node) {
- return node[internalPropsKey] || null;
- }
- function updateFiberProps(node, props) {
- node[internalPropsKey] = props;
- }
- function getEventListenerSet(node) {
- var elementListenerSet = node[internalEventHandlersKey];
-
- if (elementListenerSet === undefined) {
- elementListenerSet = node[internalEventHandlersKey] = new Set();
- }
-
- return elementListenerSet;
- }
-
- var loggedTypeFailures = {};
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
- function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
- }
- }
- }
-
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
- }
-
- var valueStack = [];
- var fiberStack;
-
- {
- fiberStack = [];
- }
-
- var index = -1;
-
- function createCursor(defaultValue) {
- return {
- current: defaultValue
- };
- }
-
- function pop(cursor, fiber) {
- if (index < 0) {
- {
- error('Unexpected pop.');
- }
-
- return;
- }
-
- {
- if (fiber !== fiberStack[index]) {
- error('Unexpected Fiber popped.');
- }
- }
-
- cursor.current = valueStack[index];
- valueStack[index] = null;
-
- {
- fiberStack[index] = null;
- }
-
- index--;
- }
-
- function push(cursor, value, fiber) {
- index++;
- valueStack[index] = cursor.current;
-
- {
- fiberStack[index] = fiber;
- }
-
- cursor.current = value;
- }
-
- var warnedAboutMissingGetChildContext;
-
- {
- warnedAboutMissingGetChildContext = {};
- }
-
- var emptyContextObject = {};
-
- {
- Object.freeze(emptyContextObject);
- } // A cursor to the current merged context object on the stack.
-
-
- var contextStackCursor = createCursor(emptyContextObject); // A cursor to a boolean indicating whether the context has changed.
-
- var didPerformWorkStackCursor = createCursor(false); // Keep track of the previous context object that was on the stack.
- // We use this to get access to the parent context after we have already
- // pushed the next context provider, and now need to merge their contexts.
-
- var previousContext = emptyContextObject;
-
- function getUnmaskedContext(workInProgress, Component, didPushOwnContextIfProvider) {
- {
- if (didPushOwnContextIfProvider && isContextProvider(Component)) {
- // If the fiber is a context provider itself, when we read its context
- // we may have already pushed its own child context on the stack. A context
- // provider should not "see" its own child context. Therefore we read the
- // previous (parent) context instead for a context provider.
- return previousContext;
- }
-
- return contextStackCursor.current;
- }
- }
-
- function cacheContext(workInProgress, unmaskedContext, maskedContext) {
- {
- var instance = workInProgress.stateNode;
- instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
- instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
- }
- }
-
- function getMaskedContext(workInProgress, unmaskedContext) {
- {
- var type = workInProgress.type;
- var contextTypes = type.contextTypes;
-
- if (!contextTypes) {
- return emptyContextObject;
- } // Avoid recreating masked context unless unmasked context has changed.
- // Failing to do this will result in unnecessary calls to componentWillReceiveProps.
- // This may trigger infinite loops if componentWillReceiveProps calls setState.
-
-
- var instance = workInProgress.stateNode;
-
- if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
- return instance.__reactInternalMemoizedMaskedChildContext;
- }
-
- var context = {};
-
- for (var key in contextTypes) {
- context[key] = unmaskedContext[key];
- }
-
- {
- var name = getComponentName(type) || 'Unknown';
- checkPropTypes(contextTypes, context, 'context', name);
- } // Cache unmasked context so we can avoid recreating masked context unless necessary.
- // Context is created before the class component is instantiated so check for instance.
-
-
- if (instance) {
- cacheContext(workInProgress, unmaskedContext, context);
- }
-
- return context;
- }
- }
-
- function hasContextChanged() {
- {
- return didPerformWorkStackCursor.current;
- }
- }
-
- function isContextProvider(type) {
- {
- var childContextTypes = type.childContextTypes;
- return childContextTypes !== null && childContextTypes !== undefined;
- }
- }
-
- function popContext(fiber) {
- {
- pop(didPerformWorkStackCursor, fiber);
- pop(contextStackCursor, fiber);
- }
- }
-
- function popTopLevelContextObject(fiber) {
- {
- pop(didPerformWorkStackCursor, fiber);
- pop(contextStackCursor, fiber);
- }
- }
-
- function pushTopLevelContextObject(fiber, context, didChange) {
- {
- if (!(contextStackCursor.current === emptyContextObject)) {
- {
- throw Error( "Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- push(contextStackCursor, context, fiber);
- push(didPerformWorkStackCursor, didChange, fiber);
- }
- }
-
- function processChildContext(fiber, type, parentContext) {
- {
- var instance = fiber.stateNode;
- var childContextTypes = type.childContextTypes; // TODO (bvaughn) Replace this behavior with an invariant() in the future.
- // It has only been added in Fiber to match the (unintentional) behavior in Stack.
-
- if (typeof instance.getChildContext !== 'function') {
- {
- var componentName = getComponentName(type) || 'Unknown';
-
- if (!warnedAboutMissingGetChildContext[componentName]) {
- warnedAboutMissingGetChildContext[componentName] = true;
-
- 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);
- }
- }
-
- return parentContext;
- }
-
- var childContext = instance.getChildContext();
-
- for (var contextKey in childContext) {
- if (!(contextKey in childContextTypes)) {
- {
- throw Error( (getComponentName(type) || 'Unknown') + ".getChildContext(): key \"" + contextKey + "\" is not defined in childContextTypes." );
- }
- }
- }
-
- {
- var name = getComponentName(type) || 'Unknown';
- checkPropTypes(childContextTypes, childContext, 'child context', name);
- }
-
- return _assign({}, parentContext, childContext);
- }
- }
-
- function pushContextProvider(workInProgress) {
- {
- var instance = workInProgress.stateNode; // We push the context as early as possible to ensure stack integrity.
- // If the instance does not exist yet, we will push null at first,
- // and replace it on the stack later when invalidating the context.
-
- var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject; // Remember the parent context so we can merge with it later.
- // Inherit the parent's did-perform-work value to avoid inadvertently blocking updates.
-
- previousContext = contextStackCursor.current;
- push(contextStackCursor, memoizedMergedChildContext, workInProgress);
- push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress);
- return true;
- }
- }
-
- function invalidateContextProvider(workInProgress, type, didChange) {
- {
- var instance = workInProgress.stateNode;
-
- if (!instance) {
- {
- throw Error( "Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- if (didChange) {
- // Merge parent and own context.
- // Skip this if we're not updating due to sCU.
- // This avoids unnecessarily recomputing memoized values.
- var mergedContext = processChildContext(workInProgress, type, previousContext);
- instance.__reactInternalMemoizedMergedChildContext = mergedContext; // Replace the old (or empty) context with the new one.
- // It is important to unwind the context in the reverse order.
-
- pop(didPerformWorkStackCursor, workInProgress);
- pop(contextStackCursor, workInProgress); // Now push the new context and mark that it has changed.
-
- push(contextStackCursor, mergedContext, workInProgress);
- push(didPerformWorkStackCursor, didChange, workInProgress);
- } else {
- pop(didPerformWorkStackCursor, workInProgress);
- push(didPerformWorkStackCursor, didChange, workInProgress);
- }
- }
- }
-
- function findCurrentUnmaskedContext(fiber) {
- {
- // Currently this is only used with renderSubtreeIntoContainer; not sure if it
- // makes sense elsewhere
- if (!(isFiberMounted(fiber) && fiber.tag === ClassComponent)) {
- {
- throw Error( "Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var node = fiber;
-
- do {
- switch (node.tag) {
- case HostRoot:
- return node.stateNode.context;
-
- case ClassComponent:
- {
- var Component = node.type;
-
- if (isContextProvider(Component)) {
- return node.stateNode.__reactInternalMemoizedMergedChildContext;
- }
-
- break;
- }
- }
-
- node = node.return;
- } while (node !== null);
-
- {
- {
- throw Error( "Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
- }
-
- var LegacyRoot = 0;
- var BlockingRoot = 1;
- var ConcurrentRoot = 2;
-
- var rendererID = null;
- var injectedHook = null;
- var hasLoggedError = false;
- var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined';
- function injectInternals(internals) {
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined') {
- // No DevTools
- return false;
- }
-
- var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
-
- if (hook.isDisabled) {
- // This isn't a real property on the hook, but it can be set to opt out
- // of DevTools integration and associated warnings and logs.
- // https://github.com/facebook/react/issues/3877
- return true;
- }
-
- if (!hook.supportsFiber) {
- {
- error('The installed version of React DevTools is too old and will not work ' + 'with the current version of React. Please update React DevTools. ' + 'https://reactjs.org/link/react-devtools');
- } // DevTools exists, even though it doesn't support Fiber.
-
-
- return true;
- }
-
- try {
- rendererID = hook.inject(internals); // We have successfully injected, so now it is safe to set up hooks.
-
- injectedHook = hook;
- } catch (err) {
- // Catch all errors because it is unsafe to throw during initialization.
- {
- error('React instrumentation encountered an error: %s.', err);
- }
- } // DevTools exists
-
-
- return true;
- }
- function onScheduleRoot(root, children) {
- {
- if (injectedHook && typeof injectedHook.onScheduleFiberRoot === 'function') {
- try {
- injectedHook.onScheduleFiberRoot(rendererID, root, children);
- } catch (err) {
- if ( !hasLoggedError) {
- hasLoggedError = true;
-
- error('React instrumentation encountered an error: %s', err);
- }
- }
- }
- }
- }
- function onCommitRoot(root, priorityLevel) {
- if (injectedHook && typeof injectedHook.onCommitFiberRoot === 'function') {
- try {
- var didError = (root.current.flags & DidCapture) === DidCapture;
-
- if (enableProfilerTimer) {
- injectedHook.onCommitFiberRoot(rendererID, root, priorityLevel, didError);
- } else {
- injectedHook.onCommitFiberRoot(rendererID, root, undefined, didError);
- }
- } catch (err) {
- {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error('React instrumentation encountered an error: %s', err);
- }
- }
- }
- }
- }
- function onCommitUnmount(fiber) {
- if (injectedHook && typeof injectedHook.onCommitFiberUnmount === 'function') {
- try {
- injectedHook.onCommitFiberUnmount(rendererID, fiber);
- } catch (err) {
- {
- if (!hasLoggedError) {
- hasLoggedError = true;
-
- error('React instrumentation encountered an error: %s', err);
- }
- }
- }
- }
- }
-
- var Scheduler_runWithPriority = unstable_runWithPriority,
- Scheduler_scheduleCallback = unstable_scheduleCallback,
- Scheduler_cancelCallback = unstable_cancelCallback,
- Scheduler_shouldYield = unstable_shouldYield,
- Scheduler_requestPaint = unstable_requestPaint,
- Scheduler_now$1 = unstable_now,
- Scheduler_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel,
- Scheduler_ImmediatePriority = unstable_ImmediatePriority,
- Scheduler_UserBlockingPriority = unstable_UserBlockingPriority,
- Scheduler_NormalPriority = unstable_NormalPriority,
- Scheduler_LowPriority = unstable_LowPriority,
- Scheduler_IdlePriority = unstable_IdlePriority;
-
- {
- // Provide explicit error message when production+profiling bundle of e.g.
- // react-dom is used with production (non-profiling) bundle of
- // scheduler/tracing
- if (!(__interactionsRef != null && __interactionsRef.current != null)) {
- {
- throw Error( "It is not supported to run the profiling version of a renderer (for example, `react-dom/profiling`) without also replacing the `scheduler/tracing` module with `scheduler/tracing-profiling`. Your bundler might have a setting for aliasing both modules. Learn more at https://reactjs.org/link/profiling" );
- }
- }
- }
-
- var fakeCallbackNode = {}; // Except for NoPriority, these correspond to Scheduler priorities. We use
- // ascending numbers so we can compare them like numbers. They start at 90 to
- // avoid clashing with Scheduler's priorities.
-
- var ImmediatePriority$1 = 99;
- var UserBlockingPriority$2 = 98;
- var NormalPriority$1 = 97;
- var LowPriority$1 = 96;
- var IdlePriority$1 = 95; // NoPriority is the absence of priority. Also React-only.
-
- var NoPriority$1 = 90;
- var shouldYield = Scheduler_shouldYield;
- var requestPaint = // Fall back gracefully if we're running an older version of Scheduler.
- Scheduler_requestPaint !== undefined ? Scheduler_requestPaint : function () {};
- var syncQueue = null;
- var immediateQueueCallbackNode = null;
- var isFlushingSyncQueue = false;
- var initialTimeMs$1 = Scheduler_now$1(); // If the initial timestamp is reasonably small, use Scheduler's `now` directly.
- // This will be the case for modern browsers that support `performance.now`. In
- // older browsers, Scheduler falls back to `Date.now`, which returns a Unix
- // timestamp. In that case, subtract the module initialization time to simulate
- // the behavior of performance.now and keep our times small enough to fit
- // within 32 bits.
- // TODO: Consider lifting this into Scheduler.
-
- var now = initialTimeMs$1 < 10000 ? Scheduler_now$1 : function () {
- return Scheduler_now$1() - initialTimeMs$1;
- };
- function getCurrentPriorityLevel() {
- switch (Scheduler_getCurrentPriorityLevel()) {
- case Scheduler_ImmediatePriority:
- return ImmediatePriority$1;
-
- case Scheduler_UserBlockingPriority:
- return UserBlockingPriority$2;
-
- case Scheduler_NormalPriority:
- return NormalPriority$1;
-
- case Scheduler_LowPriority:
- return LowPriority$1;
-
- case Scheduler_IdlePriority:
- return IdlePriority$1;
-
- default:
- {
- {
- throw Error( "Unknown priority level." );
- }
- }
-
- }
- }
-
- function reactPriorityToSchedulerPriority(reactPriorityLevel) {
- switch (reactPriorityLevel) {
- case ImmediatePriority$1:
- return Scheduler_ImmediatePriority;
-
- case UserBlockingPriority$2:
- return Scheduler_UserBlockingPriority;
-
- case NormalPriority$1:
- return Scheduler_NormalPriority;
-
- case LowPriority$1:
- return Scheduler_LowPriority;
-
- case IdlePriority$1:
- return Scheduler_IdlePriority;
-
- default:
- {
- {
- throw Error( "Unknown priority level." );
- }
- }
-
- }
- }
-
- function runWithPriority$1(reactPriorityLevel, fn) {
- var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
- return Scheduler_runWithPriority(priorityLevel, fn);
- }
- function scheduleCallback(reactPriorityLevel, callback, options) {
- var priorityLevel = reactPriorityToSchedulerPriority(reactPriorityLevel);
- return Scheduler_scheduleCallback(priorityLevel, callback, options);
- }
- function scheduleSyncCallback(callback) {
- // Push this callback into an internal queue. We'll flush these either in
- // the next tick, or earlier if something calls `flushSyncCallbackQueue`.
- if (syncQueue === null) {
- syncQueue = [callback]; // Flush the queue in the next tick, at the earliest.
-
- immediateQueueCallbackNode = Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueueImpl);
- } else {
- // Push onto existing queue. Don't need to schedule a callback because
- // we already scheduled one when we created the queue.
- syncQueue.push(callback);
- }
-
- return fakeCallbackNode;
- }
- function cancelCallback(callbackNode) {
- if (callbackNode !== fakeCallbackNode) {
- Scheduler_cancelCallback(callbackNode);
- }
- }
- function flushSyncCallbackQueue() {
- if (immediateQueueCallbackNode !== null) {
- var node = immediateQueueCallbackNode;
- immediateQueueCallbackNode = null;
- Scheduler_cancelCallback(node);
- }
-
- flushSyncCallbackQueueImpl();
- }
-
- function flushSyncCallbackQueueImpl() {
- if (!isFlushingSyncQueue && syncQueue !== null) {
- // Prevent re-entrancy.
- isFlushingSyncQueue = true;
- var i = 0;
-
- {
- try {
- var _isSync2 = true;
- var _queue = syncQueue;
- runWithPriority$1(ImmediatePriority$1, function () {
- for (; i < _queue.length; i++) {
- var callback = _queue[i];
-
- do {
- callback = callback(_isSync2);
- } while (callback !== null);
- }
- });
- syncQueue = null;
- } catch (error) {
- // If something throws, leave the remaining callbacks on the queue.
- if (syncQueue !== null) {
- syncQueue = syncQueue.slice(i + 1);
- } // Resume flushing in the next tick
-
-
- Scheduler_scheduleCallback(Scheduler_ImmediatePriority, flushSyncCallbackQueue);
- throw error;
- } finally {
- isFlushingSyncQueue = false;
- }
- }
- }
- }
-
- // TODO: this is special because it gets imported during build.
- var ReactVersion = '17.0.2';
-
- var NoMode = 0;
- var StrictMode = 1; // TODO: Remove BlockingMode and ConcurrentMode by reading from the root
- // tag instead
-
- var BlockingMode = 2;
- var ConcurrentMode = 4;
- var ProfileMode = 8;
- var DebugTracingMode = 16;
-
- var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
- var NoTransition = 0;
- function requestCurrentTransition() {
- return ReactCurrentBatchConfig.transition;
- }
-
- var ReactStrictModeWarnings = {
- recordUnsafeLifecycleWarnings: function (fiber, instance) {},
- flushPendingUnsafeLifecycleWarnings: function () {},
- recordLegacyContextWarning: function (fiber, instance) {},
- flushLegacyContextWarning: function () {},
- discardPendingWarnings: function () {}
- };
-
- {
- var findStrictRoot = function (fiber) {
- var maybeStrictRoot = null;
- var node = fiber;
-
- while (node !== null) {
- if (node.mode & StrictMode) {
- maybeStrictRoot = node;
- }
-
- node = node.return;
- }
-
- return maybeStrictRoot;
- };
-
- var setToSortedString = function (set) {
- var array = [];
- set.forEach(function (value) {
- array.push(value);
- });
- return array.sort().join(', ');
- };
-
- var pendingComponentWillMountWarnings = [];
- var pendingUNSAFE_ComponentWillMountWarnings = [];
- var pendingComponentWillReceivePropsWarnings = [];
- var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- var pendingComponentWillUpdateWarnings = [];
- var pendingUNSAFE_ComponentWillUpdateWarnings = []; // Tracks components we have already warned about.
-
- var didWarnAboutUnsafeLifecycles = new Set();
-
- ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function (fiber, instance) {
- // Dedup strategy: Warn once per component.
- if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
- return;
- }
-
- if (typeof instance.componentWillMount === 'function' && // Don't warn about react-lifecycles-compat polyfilled components.
- instance.componentWillMount.__suppressDeprecationWarning !== true) {
- pendingComponentWillMountWarnings.push(fiber);
- }
-
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillMount === 'function') {
- pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
- }
-
- if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
- pendingComponentWillReceivePropsWarnings.push(fiber);
- }
-
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
- }
-
- if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
- pendingComponentWillUpdateWarnings.push(fiber);
- }
-
- if (fiber.mode & StrictMode && typeof instance.UNSAFE_componentWillUpdate === 'function') {
- pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
- }
- };
-
- ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function () {
- // We do an initial pass to gather component names
- var componentWillMountUniqueNames = new Set();
-
- if (pendingComponentWillMountWarnings.length > 0) {
- pendingComponentWillMountWarnings.forEach(function (fiber) {
- componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillMountWarnings = [];
- }
-
- var UNSAFE_componentWillMountUniqueNames = new Set();
-
- if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
- pendingUNSAFE_ComponentWillMountWarnings.forEach(function (fiber) {
- UNSAFE_componentWillMountUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillMountWarnings = [];
- }
-
- var componentWillReceivePropsUniqueNames = new Set();
-
- if (pendingComponentWillReceivePropsWarnings.length > 0) {
- pendingComponentWillReceivePropsWarnings.forEach(function (fiber) {
- componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillReceivePropsWarnings = [];
- }
-
- var UNSAFE_componentWillReceivePropsUniqueNames = new Set();
-
- if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
- pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function (fiber) {
- UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- }
-
- var componentWillUpdateUniqueNames = new Set();
-
- if (pendingComponentWillUpdateWarnings.length > 0) {
- pendingComponentWillUpdateWarnings.forEach(function (fiber) {
- componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingComponentWillUpdateWarnings = [];
- }
-
- var UNSAFE_componentWillUpdateUniqueNames = new Set();
-
- if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
- pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function (fiber) {
- UNSAFE_componentWillUpdateUniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutUnsafeLifecycles.add(fiber.type);
- });
- pendingUNSAFE_ComponentWillUpdateWarnings = [];
- } // Finally, we flush all the warnings
- // UNSAFE_ ones before the deprecated ones, since they'll be 'louder'
-
-
- if (UNSAFE_componentWillMountUniqueNames.size > 0) {
- var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
-
- error('Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move code with side effects to componentDidMount, and set initial state in the constructor.\n' + '\nPlease update the following components: %s', sortedNames);
- }
-
- if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
- var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
-
- error('Using UNSAFE_componentWillReceiveProps in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, " + 'refactor your code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '\nPlease update the following components: %s', _sortedNames);
- }
-
- if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
- var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
-
- error('Using UNSAFE_componentWillUpdate in strict mode is not recommended ' + 'and may indicate bugs in your code. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '\nPlease update the following components: %s', _sortedNames2);
- }
-
- if (componentWillMountUniqueNames.size > 0) {
- var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
-
- 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 with side effects to componentDidMount, and set initial state in the constructor.\n' + '* Rename componentWillMount to UNSAFE_componentWillMount to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames3);
- }
-
- if (componentWillReceivePropsUniqueNames.size > 0) {
- var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
-
- warn('componentWillReceiveProps has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + "* If you're updating state whenever props change, refactor your " + 'code to use memoization techniques or move it to ' + 'static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n' + '* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames4);
- }
-
- if (componentWillUpdateUniqueNames.size > 0) {
- var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
-
- warn('componentWillUpdate has been renamed, and is not recommended for use. ' + 'See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n' + '* Move data fetching code or side effects to componentDidUpdate.\n' + '* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress ' + 'this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. ' + 'To rename all deprecated lifecycles to their new names, you can run ' + '`npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n' + '\nPlease update the following components: %s', _sortedNames5);
- }
- };
-
- var pendingLegacyContextWarning = new Map(); // Tracks components we have already warned about.
-
- var didWarnAboutLegacyContext = new Set();
-
- ReactStrictModeWarnings.recordLegacyContextWarning = function (fiber, instance) {
- var strictRoot = findStrictRoot(fiber);
-
- if (strictRoot === null) {
- error('Expected to find a StrictMode component in a strict mode tree. ' + 'This error is likely caused by a bug in React. Please file an issue.');
-
- return;
- } // Dedup strategy: Warn once per component.
-
-
- if (didWarnAboutLegacyContext.has(fiber.type)) {
- return;
- }
-
- var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
-
- if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === 'function') {
- if (warningsForRoot === undefined) {
- warningsForRoot = [];
- pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
- }
-
- warningsForRoot.push(fiber);
- }
- };
-
- ReactStrictModeWarnings.flushLegacyContextWarning = function () {
- pendingLegacyContextWarning.forEach(function (fiberArray, strictRoot) {
- if (fiberArray.length === 0) {
- return;
- }
-
- var firstFiber = fiberArray[0];
- var uniqueNames = new Set();
- fiberArray.forEach(function (fiber) {
- uniqueNames.add(getComponentName(fiber.type) || 'Component');
- didWarnAboutLegacyContext.add(fiber.type);
- });
- var sortedNames = setToSortedString(uniqueNames);
-
- try {
- setCurrentFiber(firstFiber);
-
- error('Legacy context API has been detected within a strict-mode tree.' + '\n\nThe old API will be supported in all 16.x releases, but applications ' + 'using it should migrate to the new version.' + '\n\nPlease update the following components: %s' + '\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context', sortedNames);
- } finally {
- resetCurrentFiber();
- }
- });
- };
-
- ReactStrictModeWarnings.discardPendingWarnings = function () {
- pendingComponentWillMountWarnings = [];
- pendingUNSAFE_ComponentWillMountWarnings = [];
- pendingComponentWillReceivePropsWarnings = [];
- pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
- pendingComponentWillUpdateWarnings = [];
- pendingUNSAFE_ComponentWillUpdateWarnings = [];
- pendingLegacyContextWarning = new Map();
- };
- }
-
- function resolveDefaultProps(Component, baseProps) {
- if (Component && Component.defaultProps) {
- // Resolve default props. Taken from ReactElement
- var props = _assign({}, baseProps);
-
- var defaultProps = Component.defaultProps;
-
- for (var propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
-
- return props;
- }
-
- return baseProps;
- }
-
- // Max 31 bit integer. The max integer size in V8 for 32-bit systems.
- // Math.pow(2, 30) - 1
- // 0b111111111111111111111111111111
- var MAX_SIGNED_31_BIT_INT = 1073741823;
-
- var valueCursor = createCursor(null);
- var rendererSigil;
-
- {
- // Use this to detect multiple renderers using the same context
- rendererSigil = {};
- }
-
- var currentlyRenderingFiber = null;
- var lastContextDependency = null;
- var lastContextWithAllBitsObserved = null;
- var isDisallowedContextReadInDEV = false;
- function resetContextDependencies() {
- // This is called right before React yields execution, to ensure `readContext`
- // cannot be called outside the render phase.
- currentlyRenderingFiber = null;
- lastContextDependency = null;
- lastContextWithAllBitsObserved = null;
-
- {
- isDisallowedContextReadInDEV = false;
- }
- }
- function enterDisallowedContextReadInDEV() {
- {
- isDisallowedContextReadInDEV = true;
- }
- }
- function exitDisallowedContextReadInDEV() {
- {
- isDisallowedContextReadInDEV = false;
- }
- }
- function pushProvider(providerFiber, nextValue) {
- var context = providerFiber.type._context;
-
- {
- push(valueCursor, context._currentValue, providerFiber);
- context._currentValue = nextValue;
-
- {
- if (context._currentRenderer !== undefined && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
- error('Detected multiple renderers concurrently rendering the ' + 'same context provider. This is currently unsupported.');
- }
-
- context._currentRenderer = rendererSigil;
- }
- }
- }
- function popProvider(providerFiber) {
- var currentValue = valueCursor.current;
- pop(valueCursor, providerFiber);
- var context = providerFiber.type._context;
-
- {
- context._currentValue = currentValue;
- }
- }
- function calculateChangedBits(context, newValue, oldValue) {
- if (objectIs(oldValue, newValue)) {
- // No change
- return 0;
- } else {
- var changedBits = typeof context._calculateChangedBits === 'function' ? context._calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
-
- {
- if ((changedBits & MAX_SIGNED_31_BIT_INT) !== changedBits) {
- error('calculateChangedBits: Expected the return value to be a ' + '31-bit integer. Instead received: %s', changedBits);
- }
- }
-
- return changedBits | 0;
- }
- }
- function scheduleWorkOnParentPath(parent, renderLanes) {
- // Update the child lanes of all the ancestors, including the alternates.
- var node = parent;
-
- while (node !== null) {
- var alternate = node.alternate;
-
- if (!isSubsetOfLanes(node.childLanes, renderLanes)) {
- node.childLanes = mergeLanes(node.childLanes, renderLanes);
-
- if (alternate !== null) {
- alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
- }
- } else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes)) {
- alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes);
- } else {
- // Neither alternate was updated, which means the rest of the
- // ancestor path already has sufficient priority.
- break;
- }
-
- node = node.return;
- }
- }
- function propagateContextChange(workInProgress, context, changedBits, renderLanes) {
- var fiber = workInProgress.child;
-
- if (fiber !== null) {
- // Set the return pointer of the child to the work-in-progress fiber.
- fiber.return = workInProgress;
- }
-
- while (fiber !== null) {
- var nextFiber = void 0; // Visit this fiber.
-
- var list = fiber.dependencies;
-
- if (list !== null) {
- nextFiber = fiber.child;
- var dependency = list.firstContext;
-
- while (dependency !== null) {
- // Check if the context matches.
- if (dependency.context === context && (dependency.observedBits & changedBits) !== 0) {
- // Match! Schedule an update on this fiber.
- if (fiber.tag === ClassComponent) {
- // Schedule a force update on the work-in-progress.
- var update = createUpdate(NoTimestamp, pickArbitraryLane(renderLanes));
- update.tag = ForceUpdate; // TODO: Because we don't have a work-in-progress, this will add the
- // update to the current fiber, too, which means it will persist even if
- // this render is thrown away. Since it's a race condition, not sure it's
- // worth fixing.
-
- enqueueUpdate(fiber, update);
- }
-
- fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
- var alternate = fiber.alternate;
-
- if (alternate !== null) {
- alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
- }
-
- scheduleWorkOnParentPath(fiber.return, renderLanes); // Mark the updated lanes on the list, too.
-
- list.lanes = mergeLanes(list.lanes, renderLanes); // Since we already found a match, we can stop traversing the
- // dependency list.
-
- break;
- }
-
- dependency = dependency.next;
- }
- } else if (fiber.tag === ContextProvider) {
- // Don't scan deeper if this is a matching provider
- nextFiber = fiber.type === workInProgress.type ? null : fiber.child;
- } else {
- // Traverse down.
- nextFiber = fiber.child;
- }
-
- if (nextFiber !== null) {
- // Set the return pointer of the child to the work-in-progress fiber.
- nextFiber.return = fiber;
- } else {
- // No child. Traverse to next sibling.
- nextFiber = fiber;
-
- while (nextFiber !== null) {
- if (nextFiber === workInProgress) {
- // We're back to the root of this subtree. Exit.
- nextFiber = null;
- break;
- }
-
- var sibling = nextFiber.sibling;
-
- if (sibling !== null) {
- // Set the return pointer of the sibling to the work-in-progress fiber.
- sibling.return = nextFiber.return;
- nextFiber = sibling;
- break;
- } // No more siblings. Traverse up.
-
-
- nextFiber = nextFiber.return;
- }
- }
-
- fiber = nextFiber;
- }
- }
- function prepareToReadContext(workInProgress, renderLanes) {
- currentlyRenderingFiber = workInProgress;
- lastContextDependency = null;
- lastContextWithAllBitsObserved = null;
- var dependencies = workInProgress.dependencies;
-
- if (dependencies !== null) {
- var firstContext = dependencies.firstContext;
-
- if (firstContext !== null) {
- if (includesSomeLane(dependencies.lanes, renderLanes)) {
- // Context list has a pending update. Mark that this fiber performed work.
- markWorkInProgressReceivedUpdate();
- } // Reset the work-in-progress list
-
-
- dependencies.firstContext = null;
- }
- }
- }
- function readContext(context, observedBits) {
- {
- // This warning would fire if you read context inside a Hook like useMemo.
- // Unlike the class check below, it's not enforced in production for perf.
- if (isDisallowedContextReadInDEV) {
- 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().');
- }
- }
-
- if (lastContextWithAllBitsObserved === context) ; else if (observedBits === false || observedBits === 0) ; else {
- var resolvedObservedBits; // Avoid deopting on observable arguments or heterogeneous types.
-
- if (typeof observedBits !== 'number' || observedBits === MAX_SIGNED_31_BIT_INT) {
- // Observe all updates.
- lastContextWithAllBitsObserved = context;
- resolvedObservedBits = MAX_SIGNED_31_BIT_INT;
- } else {
- resolvedObservedBits = observedBits;
- }
-
- var contextItem = {
- context: context,
- observedBits: resolvedObservedBits,
- next: null
- };
-
- if (lastContextDependency === null) {
- if (!(currentlyRenderingFiber !== null)) {
- {
- throw 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()." );
- }
- } // This is the first dependency for this component. Create a new list.
-
-
- lastContextDependency = contextItem;
- currentlyRenderingFiber.dependencies = {
- lanes: NoLanes,
- firstContext: contextItem,
- responders: null
- };
- } else {
- // Append a new context item.
- lastContextDependency = lastContextDependency.next = contextItem;
- }
- }
-
- return context._currentValue ;
- }
-
- var UpdateState = 0;
- var ReplaceState = 1;
- var ForceUpdate = 2;
- var CaptureUpdate = 3; // Global state that is reset at the beginning of calling `processUpdateQueue`.
- // It should only be read right after calling `processUpdateQueue`, via
- // `checkHasForceUpdateAfterProcessing`.
-
- var hasForceUpdate = false;
- var didWarnUpdateInsideUpdate;
- var currentlyProcessingQueue;
-
- {
- didWarnUpdateInsideUpdate = false;
- currentlyProcessingQueue = null;
- }
-
- function initializeUpdateQueue(fiber) {
- var queue = {
- baseState: fiber.memoizedState,
- firstBaseUpdate: null,
- lastBaseUpdate: null,
- shared: {
- pending: null
- },
- effects: null
- };
- fiber.updateQueue = queue;
- }
- function cloneUpdateQueue(current, workInProgress) {
- // Clone the update queue from current. Unless it's already a clone.
- var queue = workInProgress.updateQueue;
- var currentQueue = current.updateQueue;
-
- if (queue === currentQueue) {
- var clone = {
- baseState: currentQueue.baseState,
- firstBaseUpdate: currentQueue.firstBaseUpdate,
- lastBaseUpdate: currentQueue.lastBaseUpdate,
- shared: currentQueue.shared,
- effects: currentQueue.effects
- };
- workInProgress.updateQueue = clone;
- }
- }
- function createUpdate(eventTime, lane) {
- var update = {
- eventTime: eventTime,
- lane: lane,
- tag: UpdateState,
- payload: null,
- callback: null,
- next: null
- };
- return update;
- }
- function enqueueUpdate(fiber, update) {
- var updateQueue = fiber.updateQueue;
-
- if (updateQueue === null) {
- // Only occurs if the fiber has been unmounted.
- return;
- }
-
- var sharedQueue = updateQueue.shared;
- var pending = sharedQueue.pending;
-
- if (pending === null) {
- // This is the first update. Create a circular list.
- update.next = update;
- } else {
- update.next = pending.next;
- pending.next = update;
- }
-
- sharedQueue.pending = update;
-
- {
- if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
- error('An update (setState, replaceState, or forceUpdate) was scheduled ' + 'from inside an update function. Update functions should be pure, ' + 'with zero side-effects. Consider using componentDidUpdate or a ' + 'callback.');
-
- didWarnUpdateInsideUpdate = true;
- }
- }
- }
- function enqueueCapturedUpdate(workInProgress, capturedUpdate) {
- // Captured updates are updates that are thrown by a child during the render
- // phase. They should be discarded if the render is aborted. Therefore,
- // we should only put them on the work-in-progress queue, not the current one.
- var queue = workInProgress.updateQueue; // Check if the work-in-progress queue is a clone.
-
- var current = workInProgress.alternate;
-
- if (current !== null) {
- var currentQueue = current.updateQueue;
-
- if (queue === currentQueue) {
- // The work-in-progress queue is the same as current. This happens when
- // we bail out on a parent fiber that then captures an error thrown by
- // a child. Since we want to append the update only to the work-in
- // -progress queue, we need to clone the updates. We usually clone during
- // processUpdateQueue, but that didn't happen in this case because we
- // skipped over the parent when we bailed out.
- var newFirst = null;
- var newLast = null;
- var firstBaseUpdate = queue.firstBaseUpdate;
-
- if (firstBaseUpdate !== null) {
- // Loop through the updates and clone them.
- var update = firstBaseUpdate;
-
- do {
- var clone = {
- eventTime: update.eventTime,
- lane: update.lane,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
-
- if (newLast === null) {
- newFirst = newLast = clone;
- } else {
- newLast.next = clone;
- newLast = clone;
- }
-
- update = update.next;
- } while (update !== null); // Append the captured update the end of the cloned list.
-
-
- if (newLast === null) {
- newFirst = newLast = capturedUpdate;
- } else {
- newLast.next = capturedUpdate;
- newLast = capturedUpdate;
- }
- } else {
- // There are no base updates.
- newFirst = newLast = capturedUpdate;
- }
-
- queue = {
- baseState: currentQueue.baseState,
- firstBaseUpdate: newFirst,
- lastBaseUpdate: newLast,
- shared: currentQueue.shared,
- effects: currentQueue.effects
- };
- workInProgress.updateQueue = queue;
- return;
- }
- } // Append the update to the end of the list.
-
-
- var lastBaseUpdate = queue.lastBaseUpdate;
-
- if (lastBaseUpdate === null) {
- queue.firstBaseUpdate = capturedUpdate;
- } else {
- lastBaseUpdate.next = capturedUpdate;
- }
-
- queue.lastBaseUpdate = capturedUpdate;
- }
-
- function getStateFromUpdate(workInProgress, queue, update, prevState, nextProps, instance) {
- switch (update.tag) {
- case ReplaceState:
- {
- var payload = update.payload;
-
- if (typeof payload === 'function') {
- // Updater function
- {
- enterDisallowedContextReadInDEV();
- }
-
- var nextState = payload.call(instance, prevState, nextProps);
-
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- payload.call(instance, prevState, nextProps);
- } finally {
- reenableLogs();
- }
- }
-
- exitDisallowedContextReadInDEV();
- }
-
- return nextState;
- } // State object
-
-
- return payload;
- }
-
- case CaptureUpdate:
- {
- workInProgress.flags = workInProgress.flags & ~ShouldCapture | DidCapture;
- }
- // Intentional fallthrough
-
- case UpdateState:
- {
- var _payload = update.payload;
- var partialState;
-
- if (typeof _payload === 'function') {
- // Updater function
- {
- enterDisallowedContextReadInDEV();
- }
-
- partialState = _payload.call(instance, prevState, nextProps);
-
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- _payload.call(instance, prevState, nextProps);
- } finally {
- reenableLogs();
- }
- }
-
- exitDisallowedContextReadInDEV();
- }
- } else {
- // Partial state object
- partialState = _payload;
- }
-
- if (partialState === null || partialState === undefined) {
- // Null and undefined are treated as no-ops.
- return prevState;
- } // Merge the partial state and the previous state.
-
-
- return _assign({}, prevState, partialState);
- }
-
- case ForceUpdate:
- {
- hasForceUpdate = true;
- return prevState;
- }
- }
-
- return prevState;
- }
-
- function processUpdateQueue(workInProgress, props, instance, renderLanes) {
- // This is always non-null on a ClassComponent or HostRoot
- var queue = workInProgress.updateQueue;
- hasForceUpdate = false;
-
- {
- currentlyProcessingQueue = queue.shared;
- }
-
- var firstBaseUpdate = queue.firstBaseUpdate;
- var lastBaseUpdate = queue.lastBaseUpdate; // Check if there are pending updates. If so, transfer them to the base queue.
-
- var pendingQueue = queue.shared.pending;
-
- if (pendingQueue !== null) {
- queue.shared.pending = null; // The pending queue is circular. Disconnect the pointer between first
- // and last so that it's non-circular.
-
- var lastPendingUpdate = pendingQueue;
- var firstPendingUpdate = lastPendingUpdate.next;
- lastPendingUpdate.next = null; // Append pending updates to base queue
-
- if (lastBaseUpdate === null) {
- firstBaseUpdate = firstPendingUpdate;
- } else {
- lastBaseUpdate.next = firstPendingUpdate;
- }
-
- lastBaseUpdate = lastPendingUpdate; // If there's a current queue, and it's different from the base queue, then
- // we need to transfer the updates to that queue, too. Because the base
- // queue is a singly-linked list with no cycles, we can append to both
- // lists and take advantage of structural sharing.
- // TODO: Pass `current` as argument
-
- var current = workInProgress.alternate;
-
- if (current !== null) {
- // This is always non-null on a ClassComponent or HostRoot
- var currentQueue = current.updateQueue;
- var currentLastBaseUpdate = currentQueue.lastBaseUpdate;
-
- if (currentLastBaseUpdate !== lastBaseUpdate) {
- if (currentLastBaseUpdate === null) {
- currentQueue.firstBaseUpdate = firstPendingUpdate;
- } else {
- currentLastBaseUpdate.next = firstPendingUpdate;
- }
-
- currentQueue.lastBaseUpdate = lastPendingUpdate;
- }
- }
- } // These values may change as we process the queue.
-
-
- if (firstBaseUpdate !== null) {
- // Iterate through the list of updates to compute the result.
- var newState = queue.baseState; // TODO: Don't need to accumulate this. Instead, we can remove renderLanes
- // from the original lanes.
-
- var newLanes = NoLanes;
- var newBaseState = null;
- var newFirstBaseUpdate = null;
- var newLastBaseUpdate = null;
- var update = firstBaseUpdate;
-
- do {
- var updateLane = update.lane;
- var updateEventTime = update.eventTime;
-
- if (!isSubsetOfLanes(renderLanes, updateLane)) {
- // Priority is insufficient. Skip this update. If this is the first
- // skipped update, the previous update/state is the new base
- // update/state.
- var clone = {
- eventTime: updateEventTime,
- lane: updateLane,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
-
- if (newLastBaseUpdate === null) {
- newFirstBaseUpdate = newLastBaseUpdate = clone;
- newBaseState = newState;
- } else {
- newLastBaseUpdate = newLastBaseUpdate.next = clone;
- } // Update the remaining priority in the queue.
-
-
- newLanes = mergeLanes(newLanes, updateLane);
- } else {
- // This update does have sufficient priority.
- if (newLastBaseUpdate !== null) {
- var _clone = {
- eventTime: updateEventTime,
- // This update is going to be committed so we never want uncommit
- // it. Using NoLane works because 0 is a subset of all bitmasks, so
- // this will never be skipped by the check above.
- lane: NoLane,
- tag: update.tag,
- payload: update.payload,
- callback: update.callback,
- next: null
- };
- newLastBaseUpdate = newLastBaseUpdate.next = _clone;
- } // Process this update.
-
-
- newState = getStateFromUpdate(workInProgress, queue, update, newState, props, instance);
- var callback = update.callback;
-
- if (callback !== null) {
- workInProgress.flags |= Callback;
- var effects = queue.effects;
-
- if (effects === null) {
- queue.effects = [update];
- } else {
- effects.push(update);
- }
- }
- }
-
- update = update.next;
-
- if (update === null) {
- pendingQueue = queue.shared.pending;
-
- if (pendingQueue === null) {
- break;
- } else {
- // An update was scheduled from inside a reducer. Add the new
- // pending updates to the end of the list and keep processing.
- var _lastPendingUpdate = pendingQueue; // Intentionally unsound. Pending updates form a circular list, but we
- // unravel them when transferring them to the base queue.
-
- var _firstPendingUpdate = _lastPendingUpdate.next;
- _lastPendingUpdate.next = null;
- update = _firstPendingUpdate;
- queue.lastBaseUpdate = _lastPendingUpdate;
- queue.shared.pending = null;
- }
- }
- } while (true);
-
- if (newLastBaseUpdate === null) {
- newBaseState = newState;
- }
-
- queue.baseState = newBaseState;
- queue.firstBaseUpdate = newFirstBaseUpdate;
- queue.lastBaseUpdate = newLastBaseUpdate; // Set the remaining expiration time to be whatever is remaining in the queue.
- // This should be fine because the only two other things that contribute to
- // expiration time are props and context. We're already in the middle of the
- // begin phase by the time we start processing the queue, so we've already
- // dealt with the props. Context in components that specify
- // shouldComponentUpdate is tricky; but we'll have to account for
- // that regardless.
-
- markSkippedUpdateLanes(newLanes);
- workInProgress.lanes = newLanes;
- workInProgress.memoizedState = newState;
- }
-
- {
- currentlyProcessingQueue = null;
- }
- }
-
- function callCallback(callback, context) {
- if (!(typeof callback === 'function')) {
- {
- throw Error( "Invalid argument passed as callback. Expected a function. Instead received: " + callback );
- }
- }
-
- callback.call(context);
- }
-
- function resetHasForceUpdateBeforeProcessing() {
- hasForceUpdate = false;
- }
- function checkHasForceUpdateAfterProcessing() {
- return hasForceUpdate;
- }
- function commitUpdateQueue(finishedWork, finishedQueue, instance) {
- // Commit the effects
- var effects = finishedQueue.effects;
- finishedQueue.effects = null;
-
- if (effects !== null) {
- for (var i = 0; i < effects.length; i++) {
- var effect = effects[i];
- var callback = effect.callback;
-
- if (callback !== null) {
- effect.callback = null;
- callCallback(callback, instance);
- }
- }
- }
- }
-
- var fakeInternalInstance = {};
- var isArray = Array.isArray; // React.Component uses a shared frozen object by default.
- // We'll use it to determine whether we need to initialize legacy refs.
-
- var emptyRefsObject = new React.Component().refs;
- var didWarnAboutStateAssignmentForComponent;
- var didWarnAboutUninitializedState;
- var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
- var didWarnAboutLegacyLifecyclesAndDerivedState;
- var didWarnAboutUndefinedDerivedState;
- var warnOnUndefinedDerivedState;
- var warnOnInvalidCallback;
- var didWarnAboutDirectlyAssigningPropsToState;
- var didWarnAboutContextTypeAndContextTypes;
- var didWarnAboutInvalidateContextType;
-
- {
- didWarnAboutStateAssignmentForComponent = new Set();
- didWarnAboutUninitializedState = new Set();
- didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = new Set();
- didWarnAboutLegacyLifecyclesAndDerivedState = new Set();
- didWarnAboutDirectlyAssigningPropsToState = new Set();
- didWarnAboutUndefinedDerivedState = new Set();
- didWarnAboutContextTypeAndContextTypes = new Set();
- didWarnAboutInvalidateContextType = new Set();
- var didWarnOnInvalidCallback = new Set();
-
- warnOnInvalidCallback = function (callback, callerName) {
- if (callback === null || typeof callback === 'function') {
- return;
- }
-
- var key = callerName + '_' + callback;
-
- if (!didWarnOnInvalidCallback.has(key)) {
- didWarnOnInvalidCallback.add(key);
-
- error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
- }
- };
-
- warnOnUndefinedDerivedState = function (type, partialState) {
- if (partialState === undefined) {
- var componentName = getComponentName(type) || 'Component';
-
- if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
- didWarnAboutUndefinedDerivedState.add(componentName);
-
- error('%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. ' + 'You have returned undefined.', componentName);
- }
- }
- }; // This is so gross but it's at least non-critical and can be removed if
- // it causes problems. This is meant to give a nicer error message for
- // ReactDOM15.unstable_renderSubtreeIntoContainer(reactDOM16Component,
- // ...)) which otherwise throws a "_processChildContext is not a function"
- // exception.
-
-
- Object.defineProperty(fakeInternalInstance, '_processChildContext', {
- enumerable: false,
- value: function () {
- {
- {
- throw Error( "_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal)." );
- }
- }
- }
- });
- Object.freeze(fakeInternalInstance);
- }
-
- function applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, nextProps) {
- var prevState = workInProgress.memoizedState;
-
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- // Invoke the function an extra time to help detect side-effects.
- getDerivedStateFromProps(nextProps, prevState);
- } finally {
- reenableLogs();
- }
- }
- }
-
- var partialState = getDerivedStateFromProps(nextProps, prevState);
-
- {
- warnOnUndefinedDerivedState(ctor, partialState);
- } // Merge the partial state and the previous state.
-
-
- var memoizedState = partialState === null || partialState === undefined ? prevState : _assign({}, prevState, partialState);
- workInProgress.memoizedState = memoizedState; // Once the update queue is empty, persist the derived state onto the
- // base state.
-
- if (workInProgress.lanes === NoLanes) {
- // Queue is always non-null for classes
- var updateQueue = workInProgress.updateQueue;
- updateQueue.baseState = memoizedState;
- }
- }
- var classComponentUpdater = {
- isMounted: isMounted,
- enqueueSetState: function (inst, payload, callback) {
- var fiber = get(inst);
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- var update = createUpdate(eventTime, lane);
- update.payload = payload;
-
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'setState');
- }
-
- update.callback = callback;
- }
-
- enqueueUpdate(fiber, update);
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- },
- enqueueReplaceState: function (inst, payload, callback) {
- var fiber = get(inst);
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- var update = createUpdate(eventTime, lane);
- update.tag = ReplaceState;
- update.payload = payload;
-
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'replaceState');
- }
-
- update.callback = callback;
- }
-
- enqueueUpdate(fiber, update);
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- },
- enqueueForceUpdate: function (inst, callback) {
- var fiber = get(inst);
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- var update = createUpdate(eventTime, lane);
- update.tag = ForceUpdate;
-
- if (callback !== undefined && callback !== null) {
- {
- warnOnInvalidCallback(callback, 'forceUpdate');
- }
-
- update.callback = callback;
- }
-
- enqueueUpdate(fiber, update);
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- }
- };
-
- function checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext) {
- var instance = workInProgress.stateNode;
-
- if (typeof instance.shouldComponentUpdate === 'function') {
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- // Invoke the function an extra time to help detect side-effects.
- instance.shouldComponentUpdate(newProps, newState, nextContext);
- } finally {
- reenableLogs();
- }
- }
- }
-
- var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
-
- {
- if (shouldUpdate === undefined) {
- error('%s.shouldComponentUpdate(): Returned undefined instead of a ' + 'boolean value. Make sure to return true or false.', getComponentName(ctor) || 'Component');
- }
- }
-
- return shouldUpdate;
- }
-
- if (ctor.prototype && ctor.prototype.isPureReactComponent) {
- return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
- }
-
- return true;
- }
-
- function checkClassInstance(workInProgress, ctor, newProps) {
- var instance = workInProgress.stateNode;
-
- {
- var name = getComponentName(ctor) || 'Component';
- var renderPresent = instance.render;
-
- if (!renderPresent) {
- if (ctor.prototype && typeof ctor.prototype.render === 'function') {
- error('%s(...): No `render` method found on the returned component ' + 'instance: did you accidentally return an object from the constructor?', name);
- } else {
- error('%s(...): No `render` method found on the returned component ' + 'instance: you may have forgotten to define `render`.', name);
- }
- }
-
- if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
- 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);
- }
-
- if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
- 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);
- }
-
- if (instance.propTypes) {
- error('propTypes was defined as an instance property on %s. Use a static ' + 'property to define propTypes instead.', name);
- }
-
- if (instance.contextType) {
- error('contextType was defined as an instance property on %s. Use a static ' + 'property to define contextType instead.', name);
- }
-
- {
- if (instance.contextTypes) {
- error('contextTypes was defined as an instance property on %s. Use a static ' + 'property to define contextTypes instead.', name);
- }
-
- if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
- didWarnAboutContextTypeAndContextTypes.add(ctor);
-
- error('%s declares both contextTypes and contextType static properties. ' + 'The legacy contextTypes property will be ignored.', name);
- }
- }
-
- if (typeof instance.componentShouldUpdate === 'function') {
- 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);
- }
-
- if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== 'undefined') {
- error('%s has a method called shouldComponentUpdate(). ' + 'shouldComponentUpdate should not be used when extending React.PureComponent. ' + 'Please extend React.Component if shouldComponentUpdate is used.', getComponentName(ctor) || 'A pure component');
- }
-
- if (typeof instance.componentDidUnmount === 'function') {
- error('%s has a method called ' + 'componentDidUnmount(). But there is no such lifecycle method. ' + 'Did you mean componentWillUnmount()?', name);
- }
-
- if (typeof instance.componentDidReceiveProps === 'function') {
- 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);
- }
-
- if (typeof instance.componentWillRecieveProps === 'function') {
- error('%s has a method called ' + 'componentWillRecieveProps(). Did you mean componentWillReceiveProps()?', name);
- }
-
- if (typeof instance.UNSAFE_componentWillRecieveProps === 'function') {
- error('%s has a method called ' + 'UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?', name);
- }
-
- var hasMutatedProps = instance.props !== newProps;
-
- if (instance.props !== undefined && hasMutatedProps) {
- error('%s(...): When calling super() in `%s`, make sure to pass ' + "up the same props that your component's constructor was passed.", name, name);
- }
-
- if (instance.defaultProps) {
- 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);
- }
-
- if (typeof instance.getSnapshotBeforeUpdate === 'function' && typeof instance.componentDidUpdate !== 'function' && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
- didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
-
- error('%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). ' + 'This component defines getSnapshotBeforeUpdate() only.', getComponentName(ctor));
- }
-
- if (typeof instance.getDerivedStateFromProps === 'function') {
- error('%s: getDerivedStateFromProps() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
- }
-
- if (typeof instance.getDerivedStateFromError === 'function') {
- error('%s: getDerivedStateFromError() is defined as an instance method ' + 'and will be ignored. Instead, declare it as a static method.', name);
- }
-
- if (typeof ctor.getSnapshotBeforeUpdate === 'function') {
- error('%s: getSnapshotBeforeUpdate() is defined as a static method ' + 'and will be ignored. Instead, declare it as an instance method.', name);
- }
-
- var _state = instance.state;
-
- if (_state && (typeof _state !== 'object' || isArray(_state))) {
- error('%s.state: must be set to an object or null', name);
- }
-
- if (typeof instance.getChildContext === 'function' && typeof ctor.childContextTypes !== 'object') {
- error('%s.getChildContext(): childContextTypes must be defined in order to ' + 'use getChildContext().', name);
- }
- }
- }
-
- function adoptClassInstance(workInProgress, instance) {
- instance.updater = classComponentUpdater;
- workInProgress.stateNode = instance; // The instance needs access to the fiber so that it can schedule updates
-
- set(instance, workInProgress);
-
- {
- instance._reactInternalInstance = fakeInternalInstance;
- }
- }
-
- function constructClassInstance(workInProgress, ctor, props) {
- var isLegacyContextConsumer = false;
- var unmaskedContext = emptyContextObject;
- var context = emptyContextObject;
- var contextType = ctor.contextType;
-
- {
- if ('contextType' in ctor) {
- var isValid = // Allow null for conditional declaration
- contextType === null || contextType !== undefined && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === undefined; // Not a <Context.Consumer>
-
- if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
- didWarnAboutInvalidateContextType.add(ctor);
- var addendum = '';
-
- if (contextType === undefined) {
- 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.';
- } else if (typeof contextType !== 'object') {
- addendum = ' However, it is set to a ' + typeof contextType + '.';
- } else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
- addendum = ' Did you accidentally pass the Context.Provider instead?';
- } else if (contextType._context !== undefined) {
- // <Context.Consumer>
- addendum = ' Did you accidentally pass the Context.Consumer instead?';
- } else {
- addendum = ' However, it is set to an object with keys {' + Object.keys(contextType).join(', ') + '}.';
- }
-
- error('%s defines an invalid contextType. ' + 'contextType should point to the Context object returned by React.createContext().%s', getComponentName(ctor) || 'Component', addendum);
- }
- }
- }
-
- if (typeof contextType === 'object' && contextType !== null) {
- context = readContext(contextType);
- } else {
- unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- var contextTypes = ctor.contextTypes;
- isLegacyContextConsumer = contextTypes !== null && contextTypes !== undefined;
- context = isLegacyContextConsumer ? getMaskedContext(workInProgress, unmaskedContext) : emptyContextObject;
- } // Instantiate twice to help detect side-effects.
-
-
- {
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- new ctor(props, context); // eslint-disable-line no-new
- } finally {
- reenableLogs();
- }
- }
- }
-
- var instance = new ctor(props, context);
- var state = workInProgress.memoizedState = instance.state !== null && instance.state !== undefined ? instance.state : null;
- adoptClassInstance(workInProgress, instance);
-
- {
- if (typeof ctor.getDerivedStateFromProps === 'function' && state === null) {
- var componentName = getComponentName(ctor) || 'Component';
-
- if (!didWarnAboutUninitializedState.has(componentName)) {
- didWarnAboutUninitializedState.add(componentName);
-
- 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);
- }
- } // If new component APIs are defined, "unsafe" lifecycles won't be called.
- // Warn about these lifecycles if they are present.
- // Don't warn about react-lifecycles-compat polyfilled methods though.
-
-
- if (typeof ctor.getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function') {
- var foundWillMountName = null;
- var foundWillReceivePropsName = null;
- var foundWillUpdateName = null;
-
- if (typeof instance.componentWillMount === 'function' && instance.componentWillMount.__suppressDeprecationWarning !== true) {
- foundWillMountName = 'componentWillMount';
- } else if (typeof instance.UNSAFE_componentWillMount === 'function') {
- foundWillMountName = 'UNSAFE_componentWillMount';
- }
-
- if (typeof instance.componentWillReceiveProps === 'function' && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
- foundWillReceivePropsName = 'componentWillReceiveProps';
- } else if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- foundWillReceivePropsName = 'UNSAFE_componentWillReceiveProps';
- }
-
- if (typeof instance.componentWillUpdate === 'function' && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
- foundWillUpdateName = 'componentWillUpdate';
- } else if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
- foundWillUpdateName = 'UNSAFE_componentWillUpdate';
- }
-
- if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
- var _componentName = getComponentName(ctor) || 'Component';
-
- var newApiName = typeof ctor.getDerivedStateFromProps === 'function' ? 'getDerivedStateFromProps()' : 'getSnapshotBeforeUpdate()';
-
- if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
- didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
-
- 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 : '');
- }
- }
- }
- } // Cache unmasked context so we can avoid recreating masked context unless necessary.
- // ReactFiberContext usually updates this cache but can't for newly-created instances.
-
-
- if (isLegacyContextConsumer) {
- cacheContext(workInProgress, unmaskedContext, context);
- }
-
- return instance;
- }
-
- function callComponentWillMount(workInProgress, instance) {
- var oldState = instance.state;
-
- if (typeof instance.componentWillMount === 'function') {
- instance.componentWillMount();
- }
-
- if (typeof instance.UNSAFE_componentWillMount === 'function') {
- instance.UNSAFE_componentWillMount();
- }
-
- if (oldState !== instance.state) {
- {
- error('%s.componentWillMount(): Assigning directly to this.state is ' + "deprecated (except inside a component's " + 'constructor). Use setState instead.', getComponentName(workInProgress.type) || 'Component');
- }
-
- classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
- }
- }
-
- function callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext) {
- var oldState = instance.state;
-
- if (typeof instance.componentWillReceiveProps === 'function') {
- instance.componentWillReceiveProps(newProps, nextContext);
- }
-
- if (typeof instance.UNSAFE_componentWillReceiveProps === 'function') {
- instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
- }
-
- if (instance.state !== oldState) {
- {
- var componentName = getComponentName(workInProgress.type) || 'Component';
-
- if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
- didWarnAboutStateAssignmentForComponent.add(componentName);
-
- error('%s.componentWillReceiveProps(): Assigning directly to ' + "this.state is deprecated (except inside a component's " + 'constructor). Use setState instead.', componentName);
- }
- }
-
- classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
- }
- } // Invokes the mount life-cycles on a previously never rendered instance.
-
-
- function mountClassInstance(workInProgress, ctor, newProps, renderLanes) {
- {
- checkClassInstance(workInProgress, ctor, newProps);
- }
-
- var instance = workInProgress.stateNode;
- instance.props = newProps;
- instance.state = workInProgress.memoizedState;
- instance.refs = emptyRefsObject;
- initializeUpdateQueue(workInProgress);
- var contextType = ctor.contextType;
-
- if (typeof contextType === 'object' && contextType !== null) {
- instance.context = readContext(contextType);
- } else {
- var unmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- instance.context = getMaskedContext(workInProgress, unmaskedContext);
- }
-
- {
- if (instance.state === newProps) {
- var componentName = getComponentName(ctor) || 'Component';
-
- if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
- didWarnAboutDirectlyAssigningPropsToState.add(componentName);
-
- 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);
- }
- }
-
- if (workInProgress.mode & StrictMode) {
- ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, instance);
- }
-
- {
- ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress, instance);
- }
- }
-
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
- instance.state = workInProgress.memoizedState;
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
-
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- instance.state = workInProgress.memoizedState;
- } // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
-
-
- if (typeof ctor.getDerivedStateFromProps !== 'function' && typeof instance.getSnapshotBeforeUpdate !== 'function' && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
- callComponentWillMount(workInProgress, instance); // If we had additional state updates during this life-cycle, let's
- // process them now.
-
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
- instance.state = workInProgress.memoizedState;
- }
-
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.flags |= Update;
- }
- }
-
- function resumeMountClassInstance(workInProgress, ctor, newProps, renderLanes) {
- var instance = workInProgress.stateNode;
- var oldProps = workInProgress.memoizedProps;
- instance.props = oldProps;
- var oldContext = instance.context;
- var contextType = ctor.contextType;
- var nextContext = emptyContextObject;
-
- if (typeof contextType === 'object' && contextType !== null) {
- nextContext = readContext(contextType);
- } else {
- var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- nextContext = getMaskedContext(workInProgress, nextLegacyUnmaskedContext);
- }
-
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
- var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
- // ever the previously attempted to render - not the "current". However,
- // during componentDidUpdate we pass the "current" props.
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
-
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
- if (oldProps !== newProps || oldContext !== nextContext) {
- callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
- }
- }
-
- resetHasForceUpdateBeforeProcessing();
- var oldState = workInProgress.memoizedState;
- var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
- newState = workInProgress.memoizedState;
-
- if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.flags |= Update;
- }
-
- return false;
- }
-
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- newState = workInProgress.memoizedState;
- }
-
- var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
-
- if (shouldUpdate) {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === 'function' || typeof instance.componentWillMount === 'function')) {
- if (typeof instance.componentWillMount === 'function') {
- instance.componentWillMount();
- }
-
- if (typeof instance.UNSAFE_componentWillMount === 'function') {
- instance.UNSAFE_componentWillMount();
- }
- }
-
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.flags |= Update;
- }
- } else {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidMount === 'function') {
- workInProgress.flags |= Update;
- } // If shouldComponentUpdate returned false, we should still update the
- // memoized state to indicate that this work can be reused.
-
-
- workInProgress.memoizedProps = newProps;
- workInProgress.memoizedState = newState;
- } // Update the existing instance's state, props, and context pointers even
- // if shouldComponentUpdate returns false.
-
-
- instance.props = newProps;
- instance.state = newState;
- instance.context = nextContext;
- return shouldUpdate;
- } // Invokes the update life-cycles and returns false if it shouldn't rerender.
-
-
- function updateClassInstance(current, workInProgress, ctor, newProps, renderLanes) {
- var instance = workInProgress.stateNode;
- cloneUpdateQueue(current, workInProgress);
- var unresolvedOldProps = workInProgress.memoizedProps;
- var oldProps = workInProgress.type === workInProgress.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress.type, unresolvedOldProps);
- instance.props = oldProps;
- var unresolvedNewProps = workInProgress.pendingProps;
- var oldContext = instance.context;
- var contextType = ctor.contextType;
- var nextContext = emptyContextObject;
-
- if (typeof contextType === 'object' && contextType !== null) {
- nextContext = readContext(contextType);
- } else {
- var nextUnmaskedContext = getUnmaskedContext(workInProgress, ctor, true);
- nextContext = getMaskedContext(workInProgress, nextUnmaskedContext);
- }
-
- var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
- var hasNewLifecycles = typeof getDerivedStateFromProps === 'function' || typeof instance.getSnapshotBeforeUpdate === 'function'; // Note: During these life-cycles, instance.props/instance.state are what
- // ever the previously attempted to render - not the "current". However,
- // during componentDidUpdate we pass the "current" props.
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
-
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === 'function' || typeof instance.componentWillReceiveProps === 'function')) {
- if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
- callComponentWillReceiveProps(workInProgress, instance, newProps, nextContext);
- }
- }
-
- resetHasForceUpdateBeforeProcessing();
- var oldState = workInProgress.memoizedState;
- var newState = instance.state = oldState;
- processUpdateQueue(workInProgress, newProps, instance, renderLanes);
- newState = workInProgress.memoizedState;
-
- if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidUpdate === 'function') {
- if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.flags |= Update;
- }
- }
-
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.flags |= Snapshot;
- }
- }
-
- return false;
- }
-
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, ctor, getDerivedStateFromProps, newProps);
- newState = workInProgress.memoizedState;
- }
-
- var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress, ctor, oldProps, newProps, oldState, newState, nextContext);
-
- if (shouldUpdate) {
- // In order to support react-lifecycles-compat polyfilled components,
- // Unsafe lifecycles should not be invoked for components using the new APIs.
- if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === 'function' || typeof instance.componentWillUpdate === 'function')) {
- if (typeof instance.componentWillUpdate === 'function') {
- instance.componentWillUpdate(newProps, newState, nextContext);
- }
-
- if (typeof instance.UNSAFE_componentWillUpdate === 'function') {
- instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
- }
- }
-
- if (typeof instance.componentDidUpdate === 'function') {
- workInProgress.flags |= Update;
- }
-
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- workInProgress.flags |= Snapshot;
- }
- } else {
- // If an update was already in progress, we should schedule an Update
- // effect even though we're bailing out, so that cWU/cDU are called.
- if (typeof instance.componentDidUpdate === 'function') {
- if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.flags |= Update;
- }
- }
-
- if (typeof instance.getSnapshotBeforeUpdate === 'function') {
- if (unresolvedOldProps !== current.memoizedProps || oldState !== current.memoizedState) {
- workInProgress.flags |= Snapshot;
- }
- } // If shouldComponentUpdate returned false, we should still update the
- // memoized props/state to indicate that this work can be reused.
-
-
- workInProgress.memoizedProps = newProps;
- workInProgress.memoizedState = newState;
- } // Update the existing instance's state, props, and context pointers even
- // if shouldComponentUpdate returns false.
-
-
- instance.props = newProps;
- instance.state = newState;
- instance.context = nextContext;
- return shouldUpdate;
- }
-
- var didWarnAboutMaps;
- var didWarnAboutGenerators;
- var didWarnAboutStringRefs;
- var ownerHasKeyUseWarning;
- var ownerHasFunctionTypeWarning;
-
- var warnForMissingKey = function (child, returnFiber) {};
-
- {
- didWarnAboutMaps = false;
- didWarnAboutGenerators = false;
- didWarnAboutStringRefs = {};
- /**
- * Warn if there's no key explicitly set on dynamic arrays of children or
- * object keys are not valid. This allows us to keep track of children between
- * updates.
- */
-
- ownerHasKeyUseWarning = {};
- ownerHasFunctionTypeWarning = {};
-
- warnForMissingKey = function (child, returnFiber) {
- if (child === null || typeof child !== 'object') {
- return;
- }
-
- if (!child._store || child._store.validated || child.key != null) {
- return;
- }
-
- if (!(typeof child._store === 'object')) {
- {
- throw Error( "React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- child._store.validated = true;
- var componentName = getComponentName(returnFiber.type) || 'Component';
-
- if (ownerHasKeyUseWarning[componentName]) {
- return;
- }
-
- ownerHasKeyUseWarning[componentName] = true;
-
- error('Each child in a list should have a unique ' + '"key" prop. See https://reactjs.org/link/warning-keys for ' + 'more information.');
- };
- }
-
- var isArray$1 = Array.isArray;
-
- function coerceRef(returnFiber, current, element) {
- var mixedRef = element.ref;
-
- if (mixedRef !== null && typeof mixedRef !== 'function' && typeof mixedRef !== 'object') {
- {
- // TODO: Clean this up once we turn on the string ref warning for
- // everyone, because the strict mode case will no longer be relevant
- if ((returnFiber.mode & StrictMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
- // because these cannot be automatically converted to an arrow function
- // using a codemod. Therefore, we don't have to warn about string refs again.
- !(element._owner && element._self && element._owner.stateNode !== element._self)) {
- var componentName = getComponentName(returnFiber.type) || 'Component';
-
- if (!didWarnAboutStringRefs[componentName]) {
- {
- error('A string ref, "%s", has been found within a strict mode tree. ' + 'String refs are a source of potential bugs and should be avoided. ' + 'We recommend using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', mixedRef);
- }
-
- didWarnAboutStringRefs[componentName] = true;
- }
- }
- }
-
- if (element._owner) {
- var owner = element._owner;
- var inst;
-
- if (owner) {
- var ownerFiber = owner;
-
- if (!(ownerFiber.tag === ClassComponent)) {
- {
- throw Error( "Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref" );
- }
- }
-
- inst = ownerFiber.stateNode;
- }
-
- if (!inst) {
- {
- throw Error( "Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var stringRef = '' + mixedRef; // Check if previous string ref matches new string ref
-
- if (current !== null && current.ref !== null && typeof current.ref === 'function' && current.ref._stringRef === stringRef) {
- return current.ref;
- }
-
- var ref = function (value) {
- var refs = inst.refs;
-
- if (refs === emptyRefsObject) {
- // This is a lazy pooled frozen object, so we need to initialize.
- refs = inst.refs = {};
- }
-
- if (value === null) {
- delete refs[stringRef];
- } else {
- refs[stringRef] = value;
- }
- };
-
- ref._stringRef = stringRef;
- return ref;
- } else {
- if (!(typeof mixedRef === 'string')) {
- {
- throw Error( "Expected ref to be a function, a string, an object returned by React.createRef(), or null." );
- }
- }
-
- if (!element._owner) {
- {
- throw Error( "Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information." );
- }
- }
- }
- }
-
- return mixedRef;
- }
-
- function throwOnInvalidObjectType(returnFiber, newChild) {
- if (returnFiber.type !== 'textarea') {
- {
- {
- throw Error( "Objects are not valid as a React child (found: " + (Object.prototype.toString.call(newChild) === '[object Object]' ? 'object with keys {' + Object.keys(newChild).join(', ') + '}' : newChild) + "). If you meant to render a collection of children, use an array instead." );
- }
- }
- }
- }
-
- function warnOnFunctionType(returnFiber) {
- {
- var componentName = getComponentName(returnFiber.type) || 'Component';
-
- if (ownerHasFunctionTypeWarning[componentName]) {
- return;
- }
-
- ownerHasFunctionTypeWarning[componentName] = true;
-
- 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.');
- }
- } // We avoid inlining this to avoid potential deopts from using try/catch.
- // to be able to optimize each path individually by branching early. This needs
- // a compiler or we can do it manually. Helpers that don't need this branching
- // live outside of this function.
-
-
- function ChildReconciler(shouldTrackSideEffects) {
- function deleteChild(returnFiber, childToDelete) {
- if (!shouldTrackSideEffects) {
- // Noop.
- return;
- } // Deletions are added in reversed order so we add it to the front.
- // At this point, the return fiber's effect list is empty except for
- // deletions, so we can just append the deletion to the list. The remaining
- // effects aren't added until the complete phase. Once we implement
- // resuming, this may not be true.
-
-
- var last = returnFiber.lastEffect;
-
- if (last !== null) {
- last.nextEffect = childToDelete;
- returnFiber.lastEffect = childToDelete;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
- }
-
- childToDelete.nextEffect = null;
- childToDelete.flags = Deletion;
- }
-
- function deleteRemainingChildren(returnFiber, currentFirstChild) {
- if (!shouldTrackSideEffects) {
- // Noop.
- return null;
- } // TODO: For the shouldClone case, this could be micro-optimized a bit by
- // assuming that after the first child we've already added everything.
-
-
- var childToDelete = currentFirstChild;
-
- while (childToDelete !== null) {
- deleteChild(returnFiber, childToDelete);
- childToDelete = childToDelete.sibling;
- }
-
- return null;
- }
-
- function mapRemainingChildren(returnFiber, currentFirstChild) {
- // Add the remaining children to a temporary map so that we can find them by
- // keys quickly. Implicit (null) keys get added to this set with their index
- // instead.
- var existingChildren = new Map();
- var existingChild = currentFirstChild;
-
- while (existingChild !== null) {
- if (existingChild.key !== null) {
- existingChildren.set(existingChild.key, existingChild);
- } else {
- existingChildren.set(existingChild.index, existingChild);
- }
-
- existingChild = existingChild.sibling;
- }
-
- return existingChildren;
- }
-
- function useFiber(fiber, pendingProps) {
- // We currently set sibling to null and index to 0 here because it is easy
- // to forget to do before returning it. E.g. for the single child case.
- var clone = createWorkInProgress(fiber, pendingProps);
- clone.index = 0;
- clone.sibling = null;
- return clone;
- }
-
- function placeChild(newFiber, lastPlacedIndex, newIndex) {
- newFiber.index = newIndex;
-
- if (!shouldTrackSideEffects) {
- // Noop.
- return lastPlacedIndex;
- }
-
- var current = newFiber.alternate;
-
- if (current !== null) {
- var oldIndex = current.index;
-
- if (oldIndex < lastPlacedIndex) {
- // This is a move.
- newFiber.flags = Placement;
- return lastPlacedIndex;
- } else {
- // This item can stay in place.
- return oldIndex;
- }
- } else {
- // This is an insertion.
- newFiber.flags = Placement;
- return lastPlacedIndex;
- }
- }
-
- function placeSingleChild(newFiber) {
- // This is simpler for the single child case. We only need to do a
- // placement for inserting new children.
- if (shouldTrackSideEffects && newFiber.alternate === null) {
- newFiber.flags = Placement;
- }
-
- return newFiber;
- }
-
- function updateTextNode(returnFiber, current, textContent, lanes) {
- if (current === null || current.tag !== HostText) {
- // Insert
- var created = createFiberFromText(textContent, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, textContent);
- existing.return = returnFiber;
- return existing;
- }
- }
-
- function updateElement(returnFiber, current, element, lanes) {
- if (current !== null) {
- if (current.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
- isCompatibleFamilyForHotReloading(current, element) )) {
- // Move based on index
- var existing = useFiber(current, element.props);
- existing.ref = coerceRef(returnFiber, current, element);
- existing.return = returnFiber;
-
- {
- existing._debugSource = element._source;
- existing._debugOwner = element._owner;
- }
-
- return existing;
- }
- } // Insert
-
-
- var created = createFiberFromElement(element, returnFiber.mode, lanes);
- created.ref = coerceRef(returnFiber, current, element);
- created.return = returnFiber;
- return created;
- }
-
- function updatePortal(returnFiber, current, portal, lanes) {
- if (current === null || current.tag !== HostPortal || current.stateNode.containerInfo !== portal.containerInfo || current.stateNode.implementation !== portal.implementation) {
- // Insert
- var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, portal.children || []);
- existing.return = returnFiber;
- return existing;
- }
- }
-
- function updateFragment(returnFiber, current, fragment, lanes, key) {
- if (current === null || current.tag !== Fragment) {
- // Insert
- var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key);
- created.return = returnFiber;
- return created;
- } else {
- // Update
- var existing = useFiber(current, fragment);
- existing.return = returnFiber;
- return existing;
- }
- }
-
- function createChild(returnFiber, newChild, lanes) {
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys. If the previous node is implicitly keyed
- // we can continue to replace it without aborting even if it is not a text
- // node.
- var created = createFiberFromText('' + newChild, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- }
-
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);
-
- _created.ref = coerceRef(returnFiber, null, newChild);
- _created.return = returnFiber;
- return _created;
- }
-
- case REACT_PORTAL_TYPE:
- {
- var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);
-
- _created2.return = returnFiber;
- return _created2;
- }
- }
-
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);
-
- _created3.return = returnFiber;
- return _created3;
- }
-
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType(returnFiber);
- }
- }
-
- return null;
- }
-
- function updateSlot(returnFiber, oldFiber, newChild, lanes) {
- // Update the fiber if the keys match, otherwise return null.
- var key = oldFiber !== null ? oldFiber.key : null;
-
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys. If the previous node is implicitly keyed
- // we can continue to replace it without aborting even if it is not a text
- // node.
- if (key !== null) {
- return null;
- }
-
- return updateTextNode(returnFiber, oldFiber, '' + newChild, lanes);
- }
-
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- if (newChild.key === key) {
- if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, oldFiber, newChild.props.children, lanes, key);
- }
-
- return updateElement(returnFiber, oldFiber, newChild, lanes);
- } else {
- return null;
- }
- }
-
- case REACT_PORTAL_TYPE:
- {
- if (newChild.key === key) {
- return updatePortal(returnFiber, oldFiber, newChild, lanes);
- } else {
- return null;
- }
- }
- }
-
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- if (key !== null) {
- return null;
- }
-
- return updateFragment(returnFiber, oldFiber, newChild, lanes, null);
- }
-
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType(returnFiber);
- }
- }
-
- return null;
- }
-
- function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- // Text nodes don't have keys, so we neither have to check the old nor
- // new node for the key. If both are text nodes, they match.
- var matchedFiber = existingChildren.get(newIdx) || null;
- return updateTextNode(returnFiber, matchedFiber, '' + newChild, lanes);
- }
-
- if (typeof newChild === 'object' && newChild !== null) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- {
- var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
-
- if (newChild.type === REACT_FRAGMENT_TYPE) {
- return updateFragment(returnFiber, _matchedFiber, newChild.props.children, lanes, newChild.key);
- }
-
- return updateElement(returnFiber, _matchedFiber, newChild, lanes);
- }
-
- case REACT_PORTAL_TYPE:
- {
- var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
-
- return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
- }
-
- }
-
- if (isArray$1(newChild) || getIteratorFn(newChild)) {
- var _matchedFiber3 = existingChildren.get(newIdx) || null;
-
- return updateFragment(returnFiber, _matchedFiber3, newChild, lanes, null);
- }
-
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType(returnFiber);
- }
- }
-
- return null;
- }
- /**
- * Warns if there is a duplicate or missing key
- */
-
-
- function warnOnInvalidKey(child, knownKeys, returnFiber) {
- {
- if (typeof child !== 'object' || child === null) {
- return knownKeys;
- }
-
- switch (child.$$typeof) {
- case REACT_ELEMENT_TYPE:
- case REACT_PORTAL_TYPE:
- warnForMissingKey(child, returnFiber);
- var key = child.key;
-
- if (typeof key !== 'string') {
- break;
- }
-
- if (knownKeys === null) {
- knownKeys = new Set();
- knownKeys.add(key);
- break;
- }
-
- if (!knownKeys.has(key)) {
- knownKeys.add(key);
- break;
- }
-
- error('Encountered two children with the same key, `%s`. ' + 'Keys should be unique so that components maintain their identity ' + 'across updates. Non-unique keys may cause children to be ' + 'duplicated and/or omitted — the behavior is unsupported and ' + 'could change in a future version.', key);
-
- break;
- }
- }
-
- return knownKeys;
- }
-
- function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
- // This algorithm can't optimize by searching from both ends since we
- // don't have backpointers on fibers. I'm trying to see how far we can get
- // with that model. If it ends up not being worth the tradeoffs, we can
- // add it later.
- // Even with a two ended optimization, we'd want to optimize for the case
- // where there are few changes and brute force the comparison instead of
- // going for the Map. It'd like to explore hitting that path first in
- // forward-only mode and only go for the Map once we notice that we need
- // lots of look ahead. This doesn't handle reversal as well as two ended
- // search but that's unusual. Besides, for the two ended optimization to
- // work on Iterables, we'd need to copy the whole set.
- // In this first iteration, we'll just live with hitting the bad case
- // (adding everything to a Map) in for every insert/move.
- // If you change this code, also update reconcileChildrenIterator() which
- // uses the same algorithm.
- {
- // First, validate keys.
- var knownKeys = null;
-
- for (var i = 0; i < newChildren.length; i++) {
- var child = newChildren[i];
- knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
- }
- }
-
- var resultingFirstChild = null;
- var previousNewFiber = null;
- var oldFiber = currentFirstChild;
- var lastPlacedIndex = 0;
- var newIdx = 0;
- var nextOldFiber = null;
-
- for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
- if (oldFiber.index > newIdx) {
- nextOldFiber = oldFiber;
- oldFiber = null;
- } else {
- nextOldFiber = oldFiber.sibling;
- }
-
- var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
-
- if (newFiber === null) {
- // TODO: This breaks on empty slots like null children. That's
- // unfortunate because it triggers the slow path all the time. We need
- // a better way to communicate whether this was a miss or null,
- // boolean, undefined, etc.
- if (oldFiber === null) {
- oldFiber = nextOldFiber;
- }
-
- break;
- }
-
- if (shouldTrackSideEffects) {
- if (oldFiber && newFiber.alternate === null) {
- // We matched the slot, but we didn't reuse the existing fiber, so we
- // need to delete the existing child.
- deleteChild(returnFiber, oldFiber);
- }
- }
-
- lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = newFiber;
- } else {
- // TODO: Defer siblings if we're not at the right index for this slot.
- // I.e. if we had null values before, then we want to defer this
- // for each null value. However, we also don't want to call updateSlot
- // with the previous one.
- previousNewFiber.sibling = newFiber;
- }
-
- previousNewFiber = newFiber;
- oldFiber = nextOldFiber;
- }
-
- if (newIdx === newChildren.length) {
- // We've reached the end of the new children. We can delete the rest.
- deleteRemainingChildren(returnFiber, oldFiber);
- return resultingFirstChild;
- }
-
- if (oldFiber === null) {
- // If we don't have any more existing children we can choose a fast path
- // since the rest will all be insertions.
- for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);
-
- if (_newFiber === null) {
- continue;
- }
-
- lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = _newFiber;
- } else {
- previousNewFiber.sibling = _newFiber;
- }
-
- previousNewFiber = _newFiber;
- }
-
- return resultingFirstChild;
- } // Add all children to a key map for quick lookups.
-
-
- var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
-
- for (; newIdx < newChildren.length; newIdx++) {
- var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);
-
- if (_newFiber2 !== null) {
- if (shouldTrackSideEffects) {
- if (_newFiber2.alternate !== null) {
- // The new fiber is a work in progress, but if there exists a
- // current, that means that we reused the fiber. We need to delete
- // it from the child list so that we don't add it to the deletion
- // list.
- existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
- }
- }
-
- lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- resultingFirstChild = _newFiber2;
- } else {
- previousNewFiber.sibling = _newFiber2;
- }
-
- previousNewFiber = _newFiber2;
- }
- }
-
- if (shouldTrackSideEffects) {
- // Any existing children that weren't consumed above were deleted. We need
- // to add them to the deletion list.
- existingChildren.forEach(function (child) {
- return deleteChild(returnFiber, child);
- });
- }
-
- return resultingFirstChild;
- }
-
- function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
- // This is the same implementation as reconcileChildrenArray(),
- // but using the iterator instead.
- var iteratorFn = getIteratorFn(newChildrenIterable);
-
- if (!(typeof iteratorFn === 'function')) {
- {
- throw Error( "An object is not an iterable. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- {
- // We don't support rendering Generators because it's a mutation.
- // See https://github.com/facebook/react/issues/12995
- if (typeof Symbol === 'function' && // $FlowFixMe Flow doesn't know about toStringTag
- newChildrenIterable[Symbol.toStringTag] === 'Generator') {
- if (!didWarnAboutGenerators) {
- 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.');
- }
-
- didWarnAboutGenerators = true;
- } // Warn about using Maps as children
-
-
- if (newChildrenIterable.entries === iteratorFn) {
- if (!didWarnAboutMaps) {
- error('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
- }
-
- didWarnAboutMaps = true;
- } // First, validate keys.
- // We'll get a different iterator later for the main pass.
-
-
- var _newChildren = iteratorFn.call(newChildrenIterable);
-
- if (_newChildren) {
- var knownKeys = null;
-
- var _step = _newChildren.next();
-
- for (; !_step.done; _step = _newChildren.next()) {
- var child = _step.value;
- knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
- }
- }
- }
-
- var newChildren = iteratorFn.call(newChildrenIterable);
-
- if (!(newChildren != null)) {
- {
- throw Error( "An iterable object provided no iterator." );
- }
- }
-
- var resultingFirstChild = null;
- var previousNewFiber = null;
- var oldFiber = currentFirstChild;
- var lastPlacedIndex = 0;
- var newIdx = 0;
- var nextOldFiber = null;
- var step = newChildren.next();
-
- for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
- if (oldFiber.index > newIdx) {
- nextOldFiber = oldFiber;
- oldFiber = null;
- } else {
- nextOldFiber = oldFiber.sibling;
- }
-
- var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
-
- if (newFiber === null) {
- // TODO: This breaks on empty slots like null children. That's
- // unfortunate because it triggers the slow path all the time. We need
- // a better way to communicate whether this was a miss or null,
- // boolean, undefined, etc.
- if (oldFiber === null) {
- oldFiber = nextOldFiber;
- }
-
- break;
- }
-
- if (shouldTrackSideEffects) {
- if (oldFiber && newFiber.alternate === null) {
- // We matched the slot, but we didn't reuse the existing fiber, so we
- // need to delete the existing child.
- deleteChild(returnFiber, oldFiber);
- }
- }
-
- lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = newFiber;
- } else {
- // TODO: Defer siblings if we're not at the right index for this slot.
- // I.e. if we had null values before, then we want to defer this
- // for each null value. However, we also don't want to call updateSlot
- // with the previous one.
- previousNewFiber.sibling = newFiber;
- }
-
- previousNewFiber = newFiber;
- oldFiber = nextOldFiber;
- }
-
- if (step.done) {
- // We've reached the end of the new children. We can delete the rest.
- deleteRemainingChildren(returnFiber, oldFiber);
- return resultingFirstChild;
- }
-
- if (oldFiber === null) {
- // If we don't have any more existing children we can choose a fast path
- // since the rest will all be insertions.
- for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber3 = createChild(returnFiber, step.value, lanes);
-
- if (_newFiber3 === null) {
- continue;
- }
-
- lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- // TODO: Move out of the loop. This only happens for the first run.
- resultingFirstChild = _newFiber3;
- } else {
- previousNewFiber.sibling = _newFiber3;
- }
-
- previousNewFiber = _newFiber3;
- }
-
- return resultingFirstChild;
- } // Add all children to a key map for quick lookups.
-
-
- var existingChildren = mapRemainingChildren(returnFiber, oldFiber); // Keep scanning and use the map to restore deleted items as moves.
-
- for (; !step.done; newIdx++, step = newChildren.next()) {
- var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);
-
- if (_newFiber4 !== null) {
- if (shouldTrackSideEffects) {
- if (_newFiber4.alternate !== null) {
- // The new fiber is a work in progress, but if there exists a
- // current, that means that we reused the fiber. We need to delete
- // it from the child list so that we don't add it to the deletion
- // list.
- existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
- }
- }
-
- lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
-
- if (previousNewFiber === null) {
- resultingFirstChild = _newFiber4;
- } else {
- previousNewFiber.sibling = _newFiber4;
- }
-
- previousNewFiber = _newFiber4;
- }
- }
-
- if (shouldTrackSideEffects) {
- // Any existing children that weren't consumed above were deleted. We need
- // to add them to the deletion list.
- existingChildren.forEach(function (child) {
- return deleteChild(returnFiber, child);
- });
- }
-
- return resultingFirstChild;
- }
-
- function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
- // There's no need to check for keys on text nodes since we don't have a
- // way to define them.
- if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
- // We already have an existing node so let's just update it and delete
- // the rest.
- deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
- var existing = useFiber(currentFirstChild, textContent);
- existing.return = returnFiber;
- return existing;
- } // The existing first child is not a text node so we need to create one
- // and delete the existing ones.
-
-
- deleteRemainingChildren(returnFiber, currentFirstChild);
- var created = createFiberFromText(textContent, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- }
-
- function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
- var key = element.key;
- var child = currentFirstChild;
-
- while (child !== null) {
- // TODO: If key === null and child.key === null, then this only applies to
- // the first item in the list.
- if (child.key === key) {
- switch (child.tag) {
- case Fragment:
- {
- if (element.type === REACT_FRAGMENT_TYPE) {
- deleteRemainingChildren(returnFiber, child.sibling);
- var existing = useFiber(child, element.props.children);
- existing.return = returnFiber;
-
- {
- existing._debugSource = element._source;
- existing._debugOwner = element._owner;
- }
-
- return existing;
- }
-
- break;
- }
-
- case Block:
-
- // We intentionally fallthrough here if enableBlocksAPI is not on.
- // eslint-disable-next-lined no-fallthrough
-
- default:
- {
- if (child.elementType === element.type || ( // Keep this check inline so it only runs on the false path:
- isCompatibleFamilyForHotReloading(child, element) )) {
- deleteRemainingChildren(returnFiber, child.sibling);
-
- var _existing3 = useFiber(child, element.props);
-
- _existing3.ref = coerceRef(returnFiber, child, element);
- _existing3.return = returnFiber;
-
- {
- _existing3._debugSource = element._source;
- _existing3._debugOwner = element._owner;
- }
-
- return _existing3;
- }
-
- break;
- }
- } // Didn't match.
-
-
- deleteRemainingChildren(returnFiber, child);
- break;
- } else {
- deleteChild(returnFiber, child);
- }
-
- child = child.sibling;
- }
-
- if (element.type === REACT_FRAGMENT_TYPE) {
- var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
- created.return = returnFiber;
- return created;
- } else {
- var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);
-
- _created4.ref = coerceRef(returnFiber, currentFirstChild, element);
- _created4.return = returnFiber;
- return _created4;
- }
- }
-
- function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
- var key = portal.key;
- var child = currentFirstChild;
-
- while (child !== null) {
- // TODO: If key === null and child.key === null, then this only applies to
- // the first item in the list.
- if (child.key === key) {
- if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
- deleteRemainingChildren(returnFiber, child.sibling);
- var existing = useFiber(child, portal.children || []);
- existing.return = returnFiber;
- return existing;
- } else {
- deleteRemainingChildren(returnFiber, child);
- break;
- }
- } else {
- deleteChild(returnFiber, child);
- }
-
- child = child.sibling;
- }
-
- var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
- created.return = returnFiber;
- return created;
- } // This API will tag the children with the side-effect of the reconciliation
- // itself. They will be added to the side-effect list as we pass through the
- // children and the parent.
-
-
- function reconcileChildFibers(returnFiber, currentFirstChild, newChild, lanes) {
- // This function is not recursive.
- // If the top level item is an array, we treat it as a set of children,
- // not as a fragment. Nested arrays on the other hand will be treated as
- // fragment nodes. Recursion happens at the normal flow.
- // Handle top level unkeyed fragments as if they were arrays.
- // This leads to an ambiguity between <>{[...]}</> and <>...</>.
- // We treat the ambiguous cases above the same.
- var isUnkeyedTopLevelFragment = typeof newChild === 'object' && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
-
- if (isUnkeyedTopLevelFragment) {
- newChild = newChild.props.children;
- } // Handle object types
-
-
- var isObject = typeof newChild === 'object' && newChild !== null;
-
- if (isObject) {
- switch (newChild.$$typeof) {
- case REACT_ELEMENT_TYPE:
- return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));
-
- case REACT_PORTAL_TYPE:
- return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
-
- }
- }
-
- if (typeof newChild === 'string' || typeof newChild === 'number') {
- return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, '' + newChild, lanes));
- }
-
- if (isArray$1(newChild)) {
- return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
- }
-
- if (getIteratorFn(newChild)) {
- return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
- }
-
- if (isObject) {
- throwOnInvalidObjectType(returnFiber, newChild);
- }
-
- {
- if (typeof newChild === 'function') {
- warnOnFunctionType(returnFiber);
- }
- }
-
- if (typeof newChild === 'undefined' && !isUnkeyedTopLevelFragment) {
- // If the new child is undefined, and the return fiber is a composite
- // component, throw an error. If Fiber return types are disabled,
- // we already threw above.
- switch (returnFiber.tag) {
- case ClassComponent:
- {
- {
- var instance = returnFiber.stateNode;
-
- if (instance.render._isMockFunction) {
- // We allow auto-mocks to proceed as if they're returning null.
- break;
- }
- }
- }
- // Intentionally fall through to the next case, which handles both
- // functions and classes
- // eslint-disable-next-lined no-fallthrough
-
- case Block:
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- {
- {
- {
- throw Error( (getComponentName(returnFiber.type) || 'Component') + "(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null." );
- }
- }
- }
- }
- } // Remaining cases are all treated as empty.
-
-
- return deleteRemainingChildren(returnFiber, currentFirstChild);
- }
-
- return reconcileChildFibers;
- }
-
- var reconcileChildFibers = ChildReconciler(true);
- var mountChildFibers = ChildReconciler(false);
- function cloneChildFibers(current, workInProgress) {
- if (!(current === null || workInProgress.child === current.child)) {
- {
- throw Error( "Resuming work not yet implemented." );
- }
- }
-
- if (workInProgress.child === null) {
- return;
- }
-
- var currentChild = workInProgress.child;
- var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
- workInProgress.child = newChild;
- newChild.return = workInProgress;
-
- while (currentChild.sibling !== null) {
- currentChild = currentChild.sibling;
- newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
- newChild.return = workInProgress;
- }
-
- newChild.sibling = null;
- } // Reset a workInProgress child set to prepare it for a second pass.
-
- function resetChildFibers(workInProgress, lanes) {
- var child = workInProgress.child;
-
- while (child !== null) {
- resetWorkInProgress(child, lanes);
- child = child.sibling;
- }
- }
-
- var NO_CONTEXT = {};
- var contextStackCursor$1 = createCursor(NO_CONTEXT);
- var contextFiberStackCursor = createCursor(NO_CONTEXT);
- var rootInstanceStackCursor = createCursor(NO_CONTEXT);
-
- function requiredContext(c) {
- if (!(c !== NO_CONTEXT)) {
- {
- throw Error( "Expected host context to exist. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- return c;
- }
-
- function getRootHostContainer() {
- var rootInstance = requiredContext(rootInstanceStackCursor.current);
- return rootInstance;
- }
-
- function pushHostContainer(fiber, nextRootInstance) {
- // Push current root instance onto the stack;
- // This allows us to reset root when portals are popped.
- push(rootInstanceStackCursor, nextRootInstance, fiber); // Track the context and the Fiber that provided it.
- // This enables us to pop only Fibers that provide unique contexts.
-
- push(contextFiberStackCursor, fiber, fiber); // Finally, we need to push the host context to the stack.
- // However, we can't just call getRootHostContext() and push it because
- // we'd have a different number of entries on the stack depending on
- // whether getRootHostContext() throws somewhere in renderer code or not.
- // So we push an empty value first. This lets us safely unwind on errors.
-
- push(contextStackCursor$1, NO_CONTEXT, fiber);
- var nextRootContext = getRootHostContext(nextRootInstance); // Now that we know this function doesn't throw, replace it.
-
- pop(contextStackCursor$1, fiber);
- push(contextStackCursor$1, nextRootContext, fiber);
- }
-
- function popHostContainer(fiber) {
- pop(contextStackCursor$1, fiber);
- pop(contextFiberStackCursor, fiber);
- pop(rootInstanceStackCursor, fiber);
- }
-
- function getHostContext() {
- var context = requiredContext(contextStackCursor$1.current);
- return context;
- }
-
- function pushHostContext(fiber) {
- var rootInstance = requiredContext(rootInstanceStackCursor.current);
- var context = requiredContext(contextStackCursor$1.current);
- var nextContext = getChildHostContext(context, fiber.type); // Don't push this Fiber's context unless it's unique.
-
- if (context === nextContext) {
- return;
- } // Track the context and the Fiber that provided it.
- // This enables us to pop only Fibers that provide unique contexts.
-
-
- push(contextFiberStackCursor, fiber, fiber);
- push(contextStackCursor$1, nextContext, fiber);
- }
-
- function popHostContext(fiber) {
- // Do not pop unless this Fiber provided the current context.
- // pushHostContext() only pushes Fibers that provide unique contexts.
- if (contextFiberStackCursor.current !== fiber) {
- return;
- }
-
- pop(contextStackCursor$1, fiber);
- pop(contextFiberStackCursor, fiber);
- }
-
- var DefaultSuspenseContext = 0; // The Suspense Context is split into two parts. The lower bits is
- // inherited deeply down the subtree. The upper bits only affect
- // this immediate suspense boundary and gets reset each new
- // boundary or suspense list.
-
- var SubtreeSuspenseContextMask = 1; // Subtree Flags:
- // InvisibleParentSuspenseContext indicates that one of our parent Suspense
- // boundaries is not currently showing visible main content.
- // Either because it is already showing a fallback or is not mounted at all.
- // We can use this to determine if it is desirable to trigger a fallback at
- // the parent. If not, then we might need to trigger undesirable boundaries
- // and/or suspend the commit to avoid hiding the parent content.
-
- var InvisibleParentSuspenseContext = 1; // Shallow Flags:
- // ForceSuspenseFallback can be used by SuspenseList to force newly added
- // items into their fallback state during one of the render passes.
-
- var ForceSuspenseFallback = 2;
- var suspenseStackCursor = createCursor(DefaultSuspenseContext);
- function hasSuspenseContext(parentContext, flag) {
- return (parentContext & flag) !== 0;
- }
- function setDefaultShallowSuspenseContext(parentContext) {
- return parentContext & SubtreeSuspenseContextMask;
- }
- function setShallowSuspenseContext(parentContext, shallowContext) {
- return parentContext & SubtreeSuspenseContextMask | shallowContext;
- }
- function addSubtreeSuspenseContext(parentContext, subtreeContext) {
- return parentContext | subtreeContext;
- }
- function pushSuspenseContext(fiber, newContext) {
- push(suspenseStackCursor, newContext, fiber);
- }
- function popSuspenseContext(fiber) {
- pop(suspenseStackCursor, fiber);
- }
-
- function shouldCaptureSuspense(workInProgress, hasInvisibleParent) {
- // If it was the primary children that just suspended, capture and render the
- // fallback. Otherwise, don't capture and bubble to the next boundary.
- var nextState = workInProgress.memoizedState;
-
- if (nextState !== null) {
- if (nextState.dehydrated !== null) {
- // A dehydrated boundary always captures.
- return true;
- }
-
- return false;
- }
-
- var props = workInProgress.memoizedProps; // In order to capture, the Suspense component must have a fallback prop.
-
- if (props.fallback === undefined) {
- return false;
- } // Regular boundaries always capture.
-
-
- if (props.unstable_avoidThisFallback !== true) {
- return true;
- } // If it's a boundary we should avoid, then we prefer to bubble up to the
- // parent boundary if it is currently invisible.
-
-
- if (hasInvisibleParent) {
- return false;
- } // If the parent is not able to handle it, we must handle it.
-
-
- return true;
- }
- function findFirstSuspended(row) {
- var node = row;
-
- while (node !== null) {
- if (node.tag === SuspenseComponent) {
- var state = node.memoizedState;
-
- if (state !== null) {
- var dehydrated = state.dehydrated;
-
- if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
- return node;
- }
- }
- } else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
- // keep track of whether it suspended or not.
- node.memoizedProps.revealOrder !== undefined) {
- var didSuspend = (node.flags & DidCapture) !== NoFlags;
-
- if (didSuspend) {
- return node;
- }
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === row) {
- return null;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === row) {
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
-
- return null;
- }
-
- var NoFlags$1 =
- /* */
- 0; // Represents whether effect should fire.
-
- var HasEffect =
- /* */
- 1; // Represents the phase in which the effect (not the clean-up) fires.
-
- var Layout =
- /* */
- 2;
- var Passive$1 =
- /* */
- 4;
-
- // This may have been an insertion or a hydration.
-
- var hydrationParentFiber = null;
- var nextHydratableInstance = null;
- var isHydrating = false;
-
- function enterHydrationState(fiber) {
-
- var parentInstance = fiber.stateNode.containerInfo;
- nextHydratableInstance = getFirstHydratableChild(parentInstance);
- hydrationParentFiber = fiber;
- isHydrating = true;
- return true;
- }
-
- function deleteHydratableInstance(returnFiber, instance) {
- {
- switch (returnFiber.tag) {
- case HostRoot:
- didNotHydrateContainerInstance(returnFiber.stateNode.containerInfo, instance);
- break;
-
- case HostComponent:
- didNotHydrateInstance(returnFiber.type, returnFiber.memoizedProps, returnFiber.stateNode, instance);
- break;
- }
- }
-
- var childToDelete = createFiberFromHostInstanceForDeletion();
- childToDelete.stateNode = instance;
- childToDelete.return = returnFiber;
- childToDelete.flags = Deletion; // This might seem like it belongs on progressedFirstDeletion. However,
- // these children are not part of the reconciliation list of children.
- // Even if we abort and rereconcile the children, that will try to hydrate
- // again and the nodes are still in the host tree so these will be
- // recreated.
-
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = childToDelete;
- returnFiber.lastEffect = childToDelete;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = childToDelete;
- }
- }
-
- function insertNonHydratedInstance(returnFiber, fiber) {
- fiber.flags = fiber.flags & ~Hydrating | Placement;
-
- {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
-
- switch (fiber.tag) {
- case HostComponent:
- var type = fiber.type;
- var props = fiber.pendingProps;
- didNotFindHydratableContainerInstance(parentContainer, type);
- break;
-
- case HostText:
- var text = fiber.pendingProps;
- didNotFindHydratableContainerTextInstance(parentContainer, text);
- break;
- }
-
- break;
- }
-
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
-
- switch (fiber.tag) {
- case HostComponent:
- var _type = fiber.type;
- var _props = fiber.pendingProps;
- didNotFindHydratableInstance(parentType, parentProps, parentInstance, _type);
- break;
-
- case HostText:
- var _text = fiber.pendingProps;
- didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, _text);
- break;
-
- case SuspenseComponent:
- didNotFindHydratableSuspenseInstance(parentType, parentProps);
- break;
- }
-
- break;
- }
-
- default:
- return;
- }
- }
- }
-
- function tryHydrate(fiber, nextInstance) {
- switch (fiber.tag) {
- case HostComponent:
- {
- var type = fiber.type;
- var props = fiber.pendingProps;
- var instance = canHydrateInstance(nextInstance, type);
-
- if (instance !== null) {
- fiber.stateNode = instance;
- return true;
- }
-
- return false;
- }
-
- case HostText:
- {
- var text = fiber.pendingProps;
- var textInstance = canHydrateTextInstance(nextInstance, text);
-
- if (textInstance !== null) {
- fiber.stateNode = textInstance;
- return true;
- }
-
- return false;
- }
-
- case SuspenseComponent:
- {
-
- return false;
- }
-
- default:
- return false;
- }
- }
-
- function tryToClaimNextHydratableInstance(fiber) {
- if (!isHydrating) {
- return;
- }
-
- var nextInstance = nextHydratableInstance;
-
- if (!nextInstance) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- }
-
- var firstAttemptedInstance = nextInstance;
-
- if (!tryHydrate(fiber, nextInstance)) {
- // If we can't hydrate this instance let's try the next one.
- // We use this as a heuristic. It's based on intuition and not data so it
- // might be flawed or unnecessary.
- nextInstance = getNextHydratableSibling(firstAttemptedInstance);
-
- if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
- // Nothing to hydrate. Make it an insertion.
- insertNonHydratedInstance(hydrationParentFiber, fiber);
- isHydrating = false;
- hydrationParentFiber = fiber;
- return;
- } // We matched the next one, we'll now assume that the first one was
- // superfluous and we'll delete it. Since we can't eagerly delete it
- // we'll have to schedule a deletion. To do that, this node needs a dummy
- // fiber associated with it.
-
-
- deleteHydratableInstance(hydrationParentFiber, firstAttemptedInstance);
- }
-
- hydrationParentFiber = fiber;
- nextHydratableInstance = getFirstHydratableChild(nextInstance);
- }
-
- function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
-
- var instance = fiber.stateNode;
- var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber); // TODO: Type this specific to this type of component.
-
- fiber.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
- // is a new ref we mark this as an update.
-
- if (updatePayload !== null) {
- return true;
- }
-
- return false;
- }
-
- function prepareToHydrateHostTextInstance(fiber) {
-
- var textInstance = fiber.stateNode;
- var textContent = fiber.memoizedProps;
- var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
-
- {
- if (shouldUpdate) {
- // We assume that prepareToHydrateHostTextInstance is called in a context where the
- // hydration parent is the parent host component of this host text.
- var returnFiber = hydrationParentFiber;
-
- if (returnFiber !== null) {
- switch (returnFiber.tag) {
- case HostRoot:
- {
- var parentContainer = returnFiber.stateNode.containerInfo;
- didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, textContent);
- break;
- }
-
- case HostComponent:
- {
- var parentType = returnFiber.type;
- var parentProps = returnFiber.memoizedProps;
- var parentInstance = returnFiber.stateNode;
- didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, textContent);
- break;
- }
- }
- }
- }
- }
-
- return shouldUpdate;
- }
-
- function skipPastDehydratedSuspenseInstance(fiber) {
-
- var suspenseState = fiber.memoizedState;
- var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
-
- if (!suspenseInstance) {
- {
- throw Error( "Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
- }
-
- function popToNextHostParent(fiber) {
- var parent = fiber.return;
-
- while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
- parent = parent.return;
- }
-
- hydrationParentFiber = parent;
- }
-
- function popHydrationState(fiber) {
-
- if (fiber !== hydrationParentFiber) {
- // We're deeper than the current hydration context, inside an inserted
- // tree.
- return false;
- }
-
- if (!isHydrating) {
- // If we're not currently hydrating but we're in a hydration context, then
- // we were an insertion and now need to pop up reenter hydration of our
- // siblings.
- popToNextHostParent(fiber);
- isHydrating = true;
- return false;
- }
-
- var type = fiber.type; // If we have any remaining hydratable nodes, we need to delete them now.
- // We only do this deeper than head and body since they tend to have random
- // other nodes in them. We also ignore components with pure text content in
- // side of them.
- // TODO: Better heuristic.
-
- if (fiber.tag !== HostComponent || type !== 'head' && type !== 'body' && !shouldSetTextContent(type, fiber.memoizedProps)) {
- var nextInstance = nextHydratableInstance;
-
- while (nextInstance) {
- deleteHydratableInstance(fiber, nextInstance);
- nextInstance = getNextHydratableSibling(nextInstance);
- }
- }
-
- popToNextHostParent(fiber);
-
- if (fiber.tag === SuspenseComponent) {
- nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
- } else {
- nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
- }
-
- return true;
- }
-
- function resetHydrationState() {
-
- hydrationParentFiber = null;
- nextHydratableInstance = null;
- isHydrating = false;
- }
-
- function getIsHydrating() {
- return isHydrating;
- }
-
- // and should be reset before starting a new render.
- // This tracks which mutable sources need to be reset after a render.
-
- var workInProgressSources = [];
- var rendererSigil$1;
-
- {
- // Used to detect multiple renderers using the same mutable source.
- rendererSigil$1 = {};
- }
-
- function markSourceAsDirty(mutableSource) {
- workInProgressSources.push(mutableSource);
- }
- function resetWorkInProgressVersions() {
- for (var i = 0; i < workInProgressSources.length; i++) {
- var mutableSource = workInProgressSources[i];
-
- {
- mutableSource._workInProgressVersionPrimary = null;
- }
- }
-
- workInProgressSources.length = 0;
- }
- function getWorkInProgressVersion(mutableSource) {
- {
- return mutableSource._workInProgressVersionPrimary;
- }
- }
- function setWorkInProgressVersion(mutableSource, version) {
- {
- mutableSource._workInProgressVersionPrimary = version;
- }
-
- workInProgressSources.push(mutableSource);
- }
- function warnAboutMultipleRenderersDEV(mutableSource) {
- {
- {
- if (mutableSource._currentPrimaryRenderer == null) {
- mutableSource._currentPrimaryRenderer = rendererSigil$1;
- } else if (mutableSource._currentPrimaryRenderer !== rendererSigil$1) {
- error('Detected multiple renderers concurrently rendering the ' + 'same mutable source. This is currently unsupported.');
- }
- }
- }
- } // Eager reads the version of a mutable source and stores it on the root.
-
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher,
- ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
- var didWarnAboutMismatchedHooksForComponent;
- var didWarnAboutUseOpaqueIdentifier;
-
- {
- didWarnAboutUseOpaqueIdentifier = {};
- didWarnAboutMismatchedHooksForComponent = new Set();
- }
-
- // These are set right before calling the component.
- var renderLanes = NoLanes; // The work-in-progress fiber. I've named it differently to distinguish it from
- // the work-in-progress hook.
-
- var currentlyRenderingFiber$1 = null; // Hooks are stored as a linked list on the fiber's memoizedState field. The
- // current hook list is the list that belongs to the current fiber. The
- // work-in-progress hook list is a new list that will be added to the
- // work-in-progress fiber.
-
- var currentHook = null;
- var workInProgressHook = null; // Whether an update was scheduled at any point during the render phase. This
- // does not get reset if we do another render pass; only when we're completely
- // finished evaluating this component. This is an optimization so we know
- // whether we need to clear render phase updates after a throw.
-
- var didScheduleRenderPhaseUpdate = false; // Where an update was scheduled only during the current render pass. This
- // gets reset after each attempt.
- // TODO: Maybe there's some way to consolidate this with
- // `didScheduleRenderPhaseUpdate`. Or with `numberOfReRenders`.
-
- var didScheduleRenderPhaseUpdateDuringThisPass = false;
- var RE_RENDER_LIMIT = 25; // In DEV, this is the name of the currently executing primitive hook
-
- var currentHookNameInDev = null; // In DEV, this list ensures that hooks are called in the same order between renders.
- // The list stores the order of hooks used during the initial render (mount).
- // Subsequent renders (updates) reference this list.
-
- var hookTypesDev = null;
- var hookTypesUpdateIndexDev = -1; // In DEV, this tracks whether currently rendering component needs to ignore
- // the dependencies for Hooks that need them (e.g. useEffect or useMemo).
- // When true, such Hooks will always be "remounted". Only used during hot reload.
-
- var ignorePreviousDependencies = false;
-
- function mountHookTypesDev() {
- {
- var hookName = currentHookNameInDev;
-
- if (hookTypesDev === null) {
- hookTypesDev = [hookName];
- } else {
- hookTypesDev.push(hookName);
- }
- }
- }
-
- function updateHookTypesDev() {
- {
- var hookName = currentHookNameInDev;
-
- if (hookTypesDev !== null) {
- hookTypesUpdateIndexDev++;
-
- if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
- warnOnHookMismatchInDev(hookName);
- }
- }
- }
- }
-
- function checkDepsAreArrayDev(deps) {
- {
- if (deps !== undefined && deps !== null && !Array.isArray(deps)) {
- // Verify deps, but only on mount to avoid extra checks.
- // It's unlikely their type would change as usually you define them inline.
- error('%s received a final argument that is not an array (instead, received `%s`). When ' + 'specified, the final argument must be an array.', currentHookNameInDev, typeof deps);
- }
- }
- }
-
- function warnOnHookMismatchInDev(currentHookName) {
- {
- var componentName = getComponentName(currentlyRenderingFiber$1.type);
-
- if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
- didWarnAboutMismatchedHooksForComponent.add(componentName);
-
- if (hookTypesDev !== null) {
- var table = '';
- var secondColumnStart = 30;
-
- for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
- var oldHookName = hookTypesDev[i];
- var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
- var row = i + 1 + ". " + oldHookName; // Extra space so second column lines up
- // lol @ IE not supporting String#repeat
-
- while (row.length < secondColumnStart) {
- row += ' ';
- }
-
- row += newHookName + '\n';
- table += row;
- }
-
- error('React has detected a change in the order of Hooks called by %s. ' + 'This will lead to bugs and errors if not fixed. ' + 'For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n' + ' Previous render Next render\n' + ' ------------------------------------------------------\n' + '%s' + ' ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', componentName, table);
- }
- }
- }
- }
-
- function throwInvalidHookError() {
- {
- {
- throw 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
- }
-
- function areHookInputsEqual(nextDeps, prevDeps) {
- {
- if (ignorePreviousDependencies) {
- // Only true when this component is being hot reloaded.
- return false;
- }
- }
-
- if (prevDeps === null) {
- {
- 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);
- }
-
- return false;
- }
-
- {
- // Don't bother comparing lengths in prod because these arrays should be
- // passed inline.
- if (nextDeps.length !== prevDeps.length) {
- 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, "[" + prevDeps.join(', ') + "]", "[" + nextDeps.join(', ') + "]");
- }
- }
-
- for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
- if (objectIs(nextDeps[i], prevDeps[i])) {
- continue;
- }
-
- return false;
- }
-
- return true;
- }
-
- function renderWithHooks(current, workInProgress, Component, props, secondArg, nextRenderLanes) {
- renderLanes = nextRenderLanes;
- currentlyRenderingFiber$1 = workInProgress;
-
- {
- hookTypesDev = current !== null ? current._debugHookTypes : null;
- hookTypesUpdateIndexDev = -1; // Used for hot reloading:
-
- ignorePreviousDependencies = current !== null && current.type !== workInProgress.type;
- }
-
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null;
- workInProgress.lanes = NoLanes; // The following should have already been reset
- // currentHook = null;
- // workInProgressHook = null;
- // didScheduleRenderPhaseUpdate = false;
- // TODO Warn if no hooks are used at all during mount, then some are used during update.
- // Currently we will identify the update render as a mount because memoizedState === null.
- // This is tricky because it's valid for certain types of components (e.g. React.lazy)
- // Using memoizedState to differentiate between mount/update only works if at least one stateful hook is used.
- // Non-stateful hooks (e.g. context) don't get added to memoizedState,
- // so memoizedState would be null during updates and mounts.
-
- {
- if (current !== null && current.memoizedState !== null) {
- ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
- } else if (hookTypesDev !== null) {
- // This dispatcher handles an edge case where a component is updating,
- // but no stateful hooks have been used.
- // We want to match the production code behavior (which will use HooksDispatcherOnMount),
- // but with the extra DEV validation to ensure hooks ordering hasn't changed.
- // This dispatcher does that.
- ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
- } else {
- ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
- }
- }
-
- var children = Component(props, secondArg); // Check if there was a render phase update
-
- if (didScheduleRenderPhaseUpdateDuringThisPass) {
- // Keep rendering in a loop for as long as render phase updates continue to
- // be scheduled. Use a counter to prevent infinite loops.
- var numberOfReRenders = 0;
-
- do {
- didScheduleRenderPhaseUpdateDuringThisPass = false;
-
- if (!(numberOfReRenders < RE_RENDER_LIMIT)) {
- {
- throw Error( "Too many re-renders. React limits the number of renders to prevent an infinite loop." );
- }
- }
-
- numberOfReRenders += 1;
-
- {
- // Even when hot reloading, allow dependencies to stabilize
- // after first render to prevent infinite render phase updates.
- ignorePreviousDependencies = false;
- } // Start over from the beginning of the list
-
-
- currentHook = null;
- workInProgressHook = null;
- workInProgress.updateQueue = null;
-
- {
- // Also validate hook order for cascading updates.
- hookTypesUpdateIndexDev = -1;
- }
-
- ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV ;
- children = Component(props, secondArg);
- } while (didScheduleRenderPhaseUpdateDuringThisPass);
- } // We can assume the previous dispatcher is always this one, since we set it
- // at the beginning of the render phase and there's no re-entrancy.
-
-
- ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
-
- {
- workInProgress._debugHookTypes = hookTypesDev;
- } // This check uses currentHook so that it works the same in DEV and prod bundles.
- // hookTypesDev could catch more cases (e.g. context) but only in DEV bundles.
-
-
- var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
- renderLanes = NoLanes;
- currentlyRenderingFiber$1 = null;
- currentHook = null;
- workInProgressHook = null;
-
- {
- currentHookNameInDev = null;
- hookTypesDev = null;
- hookTypesUpdateIndexDev = -1;
- }
-
- didScheduleRenderPhaseUpdate = false;
-
- if (!!didRenderTooFewHooks) {
- {
- throw Error( "Rendered fewer hooks than expected. This may be caused by an accidental early return statement." );
- }
- }
-
- return children;
- }
- function bailoutHooks(current, workInProgress, lanes) {
- workInProgress.updateQueue = current.updateQueue;
- workInProgress.flags &= ~(Passive | Update);
- current.lanes = removeLanes(current.lanes, lanes);
- }
- function resetHooksAfterThrow() {
- // We can assume the previous dispatcher is always this one, since we set it
- // at the beginning of the render phase and there's no re-entrancy.
- ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
-
- if (didScheduleRenderPhaseUpdate) {
- // There were render phase updates. These are only valid for this render
- // phase, which we are now aborting. Remove the updates from the queues so
- // they do not persist to the next render. Do not remove updates from hooks
- // that weren't processed.
- //
- // Only reset the updates from the queue if it has a clone. If it does
- // not have a clone, that means it wasn't processed, and the updates were
- // scheduled before we entered the render phase.
- var hook = currentlyRenderingFiber$1.memoizedState;
-
- while (hook !== null) {
- var queue = hook.queue;
-
- if (queue !== null) {
- queue.pending = null;
- }
-
- hook = hook.next;
- }
-
- didScheduleRenderPhaseUpdate = false;
- }
-
- renderLanes = NoLanes;
- currentlyRenderingFiber$1 = null;
- currentHook = null;
- workInProgressHook = null;
-
- {
- hookTypesDev = null;
- hookTypesUpdateIndexDev = -1;
- currentHookNameInDev = null;
- isUpdatingOpaqueValueInRenderPhase = false;
- }
-
- didScheduleRenderPhaseUpdateDuringThisPass = false;
- }
-
- function mountWorkInProgressHook() {
- var hook = {
- memoizedState: null,
- baseState: null,
- baseQueue: null,
- queue: null,
- next: null
- };
-
- if (workInProgressHook === null) {
- // This is the first hook in the list
- currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
- } else {
- // Append to the end of the list
- workInProgressHook = workInProgressHook.next = hook;
- }
-
- return workInProgressHook;
- }
-
- function updateWorkInProgressHook() {
- // This function is used both for updates and for re-renders triggered by a
- // render phase update. It assumes there is either a current hook we can
- // clone, or a work-in-progress hook from a previous render pass that we can
- // use as a base. When we reach the end of the base list, we must switch to
- // the dispatcher used for mounts.
- var nextCurrentHook;
-
- if (currentHook === null) {
- var current = currentlyRenderingFiber$1.alternate;
-
- if (current !== null) {
- nextCurrentHook = current.memoizedState;
- } else {
- nextCurrentHook = null;
- }
- } else {
- nextCurrentHook = currentHook.next;
- }
-
- var nextWorkInProgressHook;
-
- if (workInProgressHook === null) {
- nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
- } else {
- nextWorkInProgressHook = workInProgressHook.next;
- }
-
- if (nextWorkInProgressHook !== null) {
- // There's already a work-in-progress. Reuse it.
- workInProgressHook = nextWorkInProgressHook;
- nextWorkInProgressHook = workInProgressHook.next;
- currentHook = nextCurrentHook;
- } else {
- // Clone from the current hook.
- if (!(nextCurrentHook !== null)) {
- {
- throw Error( "Rendered more hooks than during the previous render." );
- }
- }
-
- currentHook = nextCurrentHook;
- var newHook = {
- memoizedState: currentHook.memoizedState,
- baseState: currentHook.baseState,
- baseQueue: currentHook.baseQueue,
- queue: currentHook.queue,
- next: null
- };
-
- if (workInProgressHook === null) {
- // This is the first hook in the list.
- currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
- } else {
- // Append to the end of the list.
- workInProgressHook = workInProgressHook.next = newHook;
- }
- }
-
- return workInProgressHook;
- }
-
- function createFunctionComponentUpdateQueue() {
- return {
- lastEffect: null
- };
- }
-
- function basicStateReducer(state, action) {
- // $FlowFixMe: Flow doesn't like mixed types
- return typeof action === 'function' ? action(state) : action;
- }
-
- function mountReducer(reducer, initialArg, init) {
- var hook = mountWorkInProgressHook();
- var initialState;
-
- if (init !== undefined) {
- initialState = init(initialArg);
- } else {
- initialState = initialArg;
- }
-
- hook.memoizedState = hook.baseState = initialState;
- var queue = hook.queue = {
- pending: null,
- dispatch: null,
- lastRenderedReducer: reducer,
- lastRenderedState: initialState
- };
- var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
- return [hook.memoizedState, dispatch];
- }
-
- function updateReducer(reducer, initialArg, init) {
- var hook = updateWorkInProgressHook();
- var queue = hook.queue;
-
- if (!(queue !== null)) {
- {
- throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
- }
- }
-
- queue.lastRenderedReducer = reducer;
- var current = currentHook; // The last rebase update that is NOT part of the base state.
-
- var baseQueue = current.baseQueue; // The last pending update that hasn't been processed yet.
-
- var pendingQueue = queue.pending;
-
- if (pendingQueue !== null) {
- // We have new updates that haven't been processed yet.
- // We'll add them to the base queue.
- if (baseQueue !== null) {
- // Merge the pending queue and the base queue.
- var baseFirst = baseQueue.next;
- var pendingFirst = pendingQueue.next;
- baseQueue.next = pendingFirst;
- pendingQueue.next = baseFirst;
- }
-
- {
- if (current.baseQueue !== baseQueue) {
- // Internal invariant that should never happen, but feasibly could in
- // the future if we implement resuming, or some form of that.
- error('Internal error: Expected work-in-progress queue to be a clone. ' + 'This is a bug in React.');
- }
- }
-
- current.baseQueue = baseQueue = pendingQueue;
- queue.pending = null;
- }
-
- if (baseQueue !== null) {
- // We have a queue to process.
- var first = baseQueue.next;
- var newState = current.baseState;
- var newBaseState = null;
- var newBaseQueueFirst = null;
- var newBaseQueueLast = null;
- var update = first;
-
- do {
- var updateLane = update.lane;
-
- if (!isSubsetOfLanes(renderLanes, updateLane)) {
- // Priority is insufficient. Skip this update. If this is the first
- // skipped update, the previous update/state is the new base
- // update/state.
- var clone = {
- lane: updateLane,
- action: update.action,
- eagerReducer: update.eagerReducer,
- eagerState: update.eagerState,
- next: null
- };
-
- if (newBaseQueueLast === null) {
- newBaseQueueFirst = newBaseQueueLast = clone;
- newBaseState = newState;
- } else {
- newBaseQueueLast = newBaseQueueLast.next = clone;
- } // Update the remaining priority in the queue.
- // TODO: Don't need to accumulate this. Instead, we can remove
- // renderLanes from the original lanes.
-
-
- currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
- markSkippedUpdateLanes(updateLane);
- } else {
- // This update does have sufficient priority.
- if (newBaseQueueLast !== null) {
- var _clone = {
- // This update is going to be committed so we never want uncommit
- // it. Using NoLane works because 0 is a subset of all bitmasks, so
- // this will never be skipped by the check above.
- lane: NoLane,
- action: update.action,
- eagerReducer: update.eagerReducer,
- eagerState: update.eagerState,
- next: null
- };
- newBaseQueueLast = newBaseQueueLast.next = _clone;
- } // Process this update.
-
-
- if (update.eagerReducer === reducer) {
- // If this update was processed eagerly, and its reducer matches the
- // current reducer, we can use the eagerly computed state.
- newState = update.eagerState;
- } else {
- var action = update.action;
- newState = reducer(newState, action);
- }
- }
-
- update = update.next;
- } while (update !== null && update !== first);
-
- if (newBaseQueueLast === null) {
- newBaseState = newState;
- } else {
- newBaseQueueLast.next = newBaseQueueFirst;
- } // Mark that the fiber performed work, but only if the new state is
- // different from the current state.
-
-
- if (!objectIs(newState, hook.memoizedState)) {
- markWorkInProgressReceivedUpdate();
- }
-
- hook.memoizedState = newState;
- hook.baseState = newBaseState;
- hook.baseQueue = newBaseQueueLast;
- queue.lastRenderedState = newState;
- }
-
- var dispatch = queue.dispatch;
- return [hook.memoizedState, dispatch];
- }
-
- function rerenderReducer(reducer, initialArg, init) {
- var hook = updateWorkInProgressHook();
- var queue = hook.queue;
-
- if (!(queue !== null)) {
- {
- throw Error( "Should have a queue. This is likely a bug in React. Please file an issue." );
- }
- }
-
- queue.lastRenderedReducer = reducer; // This is a re-render. Apply the new render phase updates to the previous
- // work-in-progress hook.
-
- var dispatch = queue.dispatch;
- var lastRenderPhaseUpdate = queue.pending;
- var newState = hook.memoizedState;
-
- if (lastRenderPhaseUpdate !== null) {
- // The queue doesn't persist past this render pass.
- queue.pending = null;
- var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
- var update = firstRenderPhaseUpdate;
-
- do {
- // Process this render phase update. We don't have to check the
- // priority because it will always be the same as the current
- // render's.
- var action = update.action;
- newState = reducer(newState, action);
- update = update.next;
- } while (update !== firstRenderPhaseUpdate); // Mark that the fiber performed work, but only if the new state is
- // different from the current state.
-
-
- if (!objectIs(newState, hook.memoizedState)) {
- markWorkInProgressReceivedUpdate();
- }
-
- hook.memoizedState = newState; // Don't persist the state accumulated from the render phase updates to
- // the base state unless the queue is empty.
- // TODO: Not sure if this is the desired semantics, but it's what we
- // do for gDSFP. I can't remember why.
-
- if (hook.baseQueue === null) {
- hook.baseState = newState;
- }
-
- queue.lastRenderedState = newState;
- }
-
- return [newState, dispatch];
- }
-
- function readFromUnsubcribedMutableSource(root, source, getSnapshot) {
- {
- warnAboutMultipleRenderersDEV(source);
- }
-
- var getVersion = source._getVersion;
- var version = getVersion(source._source); // Is it safe for this component to read from this source during the current render?
-
- var isSafeToReadFromSource = false; // Check the version first.
- // If this render has already been started with a specific version,
- // we can use it alone to determine if we can safely read from the source.
-
- var currentRenderVersion = getWorkInProgressVersion(source);
-
- if (currentRenderVersion !== null) {
- // It's safe to read if the store hasn't been mutated since the last time
- // we read something.
- isSafeToReadFromSource = currentRenderVersion === version;
- } else {
- // If there's no version, then this is the first time we've read from the
- // source during the current render pass, so we need to do a bit more work.
- // What we need to determine is if there are any hooks that already
- // subscribed to the source, and if so, whether there are any pending
- // mutations that haven't been synchronized yet.
- //
- // If there are no pending mutations, then `root.mutableReadLanes` will be
- // empty, and we know we can safely read.
- //
- // If there *are* pending mutations, we may still be able to safely read
- // if the currently rendering lanes are inclusive of the pending mutation
- // lanes, since that guarantees that the value we're about to read from
- // the source is consistent with the values that we read during the most
- // recent mutation.
- isSafeToReadFromSource = isSubsetOfLanes(renderLanes, root.mutableReadLanes);
-
- if (isSafeToReadFromSource) {
- // If it's safe to read from this source during the current render,
- // store the version in case other components read from it.
- // A changed version number will let those components know to throw and restart the render.
- setWorkInProgressVersion(source, version);
- }
- }
-
- if (isSafeToReadFromSource) {
- var snapshot = getSnapshot(source._source);
-
- {
- if (typeof snapshot === 'function') {
- error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
- }
- }
-
- return snapshot;
- } else {
- // This handles the special case of a mutable source being shared between renderers.
- // In that case, if the source is mutated between the first and second renderer,
- // The second renderer don't know that it needs to reset the WIP version during unwind,
- // (because the hook only marks sources as dirty if it's written to their WIP version).
- // That would cause this tear check to throw again and eventually be visible to the user.
- // We can avoid this infinite loop by explicitly marking the source as dirty.
- //
- // This can lead to tearing in the first renderer when it resumes,
- // but there's nothing we can do about that (short of throwing here and refusing to continue the render).
- markSourceAsDirty(source);
-
- {
- {
- throw Error( "Cannot read from mutable source during the current render without tearing. This is a bug in React. Please file an issue." );
- }
- }
- }
- }
-
- function useMutableSource(hook, source, getSnapshot, subscribe) {
- var root = getWorkInProgressRoot();
-
- if (!(root !== null)) {
- {
- throw Error( "Expected a work-in-progress root. This is a bug in React. Please file an issue." );
- }
- }
-
- var getVersion = source._getVersion;
- var version = getVersion(source._source);
- var dispatcher = ReactCurrentDispatcher$1.current; // eslint-disable-next-line prefer-const
-
- var _dispatcher$useState = dispatcher.useState(function () {
- return readFromUnsubcribedMutableSource(root, source, getSnapshot);
- }),
- currentSnapshot = _dispatcher$useState[0],
- setSnapshot = _dispatcher$useState[1];
-
- var snapshot = currentSnapshot; // Grab a handle to the state hook as well.
- // We use it to clear the pending update queue if we have a new source.
-
- var stateHook = workInProgressHook;
- var memoizedState = hook.memoizedState;
- var refs = memoizedState.refs;
- var prevGetSnapshot = refs.getSnapshot;
- var prevSource = memoizedState.source;
- var prevSubscribe = memoizedState.subscribe;
- var fiber = currentlyRenderingFiber$1;
- hook.memoizedState = {
- refs: refs,
- source: source,
- subscribe: subscribe
- }; // Sync the values needed by our subscription handler after each commit.
-
- dispatcher.useEffect(function () {
- refs.getSnapshot = getSnapshot; // Normally the dispatch function for a state hook never changes,
- // but this hook recreates the queue in certain cases to avoid updates from stale sources.
- // handleChange() below needs to reference the dispatch function without re-subscribing,
- // so we use a ref to ensure that it always has the latest version.
-
- refs.setSnapshot = setSnapshot; // Check for a possible change between when we last rendered now.
-
- var maybeNewVersion = getVersion(source._source);
-
- if (!objectIs(version, maybeNewVersion)) {
- var maybeNewSnapshot = getSnapshot(source._source);
-
- {
- if (typeof maybeNewSnapshot === 'function') {
- error('Mutable source should not return a function as the snapshot value. ' + 'Functions may close over mutable values and cause tearing.');
- }
- }
-
- if (!objectIs(snapshot, maybeNewSnapshot)) {
- setSnapshot(maybeNewSnapshot);
- var lane = requestUpdateLane(fiber);
- markRootMutableRead(root, lane);
- } // If the source mutated between render and now,
- // there may be state updates already scheduled from the old source.
- // Entangle the updates so that they render in the same batch.
-
-
- markRootEntangled(root, root.mutableReadLanes);
- }
- }, [getSnapshot, source, subscribe]); // If we got a new source or subscribe function, re-subscribe in a passive effect.
-
- dispatcher.useEffect(function () {
- var handleChange = function () {
- var latestGetSnapshot = refs.getSnapshot;
- var latestSetSnapshot = refs.setSnapshot;
-
- try {
- latestSetSnapshot(latestGetSnapshot(source._source)); // Record a pending mutable source update with the same expiration time.
-
- var lane = requestUpdateLane(fiber);
- markRootMutableRead(root, lane);
- } catch (error) {
- // A selector might throw after a source mutation.
- // e.g. it might try to read from a part of the store that no longer exists.
- // In this case we should still schedule an update with React.
- // Worst case the selector will throw again and then an error boundary will handle it.
- latestSetSnapshot(function () {
- throw error;
- });
- }
- };
-
- var unsubscribe = subscribe(source._source, handleChange);
-
- {
- if (typeof unsubscribe !== 'function') {
- error('Mutable source subscribe function must return an unsubscribe function.');
- }
- }
-
- return unsubscribe;
- }, [source, subscribe]); // If any of the inputs to useMutableSource change, reading is potentially unsafe.
- //
- // If either the source or the subscription have changed we can't can't trust the update queue.
- // Maybe the source changed in a way that the old subscription ignored but the new one depends on.
- //
- // If the getSnapshot function changed, we also shouldn't rely on the update queue.
- // It's possible that the underlying source was mutated between the when the last "change" event fired,
- // and when the current render (with the new getSnapshot function) is processed.
- //
- // In both cases, we need to throw away pending updates (since they are no longer relevant)
- // and treat reading from the source as we do in the mount case.
-
- if (!objectIs(prevGetSnapshot, getSnapshot) || !objectIs(prevSource, source) || !objectIs(prevSubscribe, subscribe)) {
- // Create a new queue and setState method,
- // So if there are interleaved updates, they get pushed to the older queue.
- // When this becomes current, the previous queue and dispatch method will be discarded,
- // including any interleaving updates that occur.
- var newQueue = {
- pending: null,
- dispatch: null,
- lastRenderedReducer: basicStateReducer,
- lastRenderedState: snapshot
- };
- newQueue.dispatch = setSnapshot = dispatchAction.bind(null, currentlyRenderingFiber$1, newQueue);
- stateHook.queue = newQueue;
- stateHook.baseQueue = null;
- snapshot = readFromUnsubcribedMutableSource(root, source, getSnapshot);
- stateHook.memoizedState = stateHook.baseState = snapshot;
- }
-
- return snapshot;
- }
-
- function mountMutableSource(source, getSnapshot, subscribe) {
- var hook = mountWorkInProgressHook();
- hook.memoizedState = {
- refs: {
- getSnapshot: getSnapshot,
- setSnapshot: null
- },
- source: source,
- subscribe: subscribe
- };
- return useMutableSource(hook, source, getSnapshot, subscribe);
- }
-
- function updateMutableSource(source, getSnapshot, subscribe) {
- var hook = updateWorkInProgressHook();
- return useMutableSource(hook, source, getSnapshot, subscribe);
- }
-
- function mountState(initialState) {
- var hook = mountWorkInProgressHook();
-
- if (typeof initialState === 'function') {
- // $FlowFixMe: Flow doesn't like mixed types
- initialState = initialState();
- }
-
- hook.memoizedState = hook.baseState = initialState;
- var queue = hook.queue = {
- pending: null,
- dispatch: null,
- lastRenderedReducer: basicStateReducer,
- lastRenderedState: initialState
- };
- var dispatch = queue.dispatch = dispatchAction.bind(null, currentlyRenderingFiber$1, queue);
- return [hook.memoizedState, dispatch];
- }
-
- function updateState(initialState) {
- return updateReducer(basicStateReducer);
- }
-
- function rerenderState(initialState) {
- return rerenderReducer(basicStateReducer);
- }
-
- function pushEffect(tag, create, destroy, deps) {
- var effect = {
- tag: tag,
- create: create,
- destroy: destroy,
- deps: deps,
- // Circular
- next: null
- };
- var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
-
- if (componentUpdateQueue === null) {
- componentUpdateQueue = createFunctionComponentUpdateQueue();
- currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
- componentUpdateQueue.lastEffect = effect.next = effect;
- } else {
- var lastEffect = componentUpdateQueue.lastEffect;
-
- if (lastEffect === null) {
- componentUpdateQueue.lastEffect = effect.next = effect;
- } else {
- var firstEffect = lastEffect.next;
- lastEffect.next = effect;
- effect.next = firstEffect;
- componentUpdateQueue.lastEffect = effect;
- }
- }
-
- return effect;
- }
-
- function mountRef(initialValue) {
- var hook = mountWorkInProgressHook();
- var ref = {
- current: initialValue
- };
-
- {
- Object.seal(ref);
- }
-
- hook.memoizedState = ref;
- return ref;
- }
-
- function updateRef(initialValue) {
- var hook = updateWorkInProgressHook();
- return hook.memoizedState;
- }
-
- function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- currentlyRenderingFiber$1.flags |= fiberFlags;
- hook.memoizedState = pushEffect(HasEffect | hookFlags, create, undefined, nextDeps);
- }
-
- function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var destroy = undefined;
-
- if (currentHook !== null) {
- var prevEffect = currentHook.memoizedState;
- destroy = prevEffect.destroy;
-
- if (nextDeps !== null) {
- var prevDeps = prevEffect.deps;
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- pushEffect(hookFlags, create, destroy, nextDeps);
- return;
- }
- }
- }
-
- currentlyRenderingFiber$1.flags |= fiberFlags;
- hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);
- }
-
- function mountEffect(create, deps) {
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
- }
- }
-
- return mountEffectImpl(Update | Passive, Passive$1, create, deps);
- }
-
- function updateEffect(create, deps) {
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotCurrentlyActingEffectsInDEV(currentlyRenderingFiber$1);
- }
- }
-
- return updateEffectImpl(Update | Passive, Passive$1, create, deps);
- }
-
- function mountLayoutEffect(create, deps) {
- return mountEffectImpl(Update, Layout, create, deps);
- }
-
- function updateLayoutEffect(create, deps) {
- return updateEffectImpl(Update, Layout, create, deps);
- }
-
- function imperativeHandleEffect(create, ref) {
- if (typeof ref === 'function') {
- var refCallback = ref;
-
- var _inst = create();
-
- refCallback(_inst);
- return function () {
- refCallback(null);
- };
- } else if (ref !== null && ref !== undefined) {
- var refObject = ref;
-
- {
- if (!refObject.hasOwnProperty('current')) {
- error('Expected useImperativeHandle() first argument to either be a ' + 'ref callback or React.createRef() object. Instead received: %s.', 'an object with keys {' + Object.keys(refObject).join(', ') + '}');
- }
- }
-
- var _inst2 = create();
-
- refObject.current = _inst2;
- return function () {
- refObject.current = null;
- };
- }
- }
-
- function mountImperativeHandle(ref, create, deps) {
- {
- if (typeof create !== 'function') {
- error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
- }
- } // TODO: If deps are provided, should we skip comparing the ref itself?
-
-
- var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
- return mountEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
- }
-
- function updateImperativeHandle(ref, create, deps) {
- {
- if (typeof create !== 'function') {
- error('Expected useImperativeHandle() second argument to be a function ' + 'that creates a handle. Instead received: %s.', create !== null ? typeof create : 'null');
- }
- } // TODO: If deps are provided, should we skip comparing the ref itself?
-
-
- var effectDeps = deps !== null && deps !== undefined ? deps.concat([ref]) : null;
- return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
- }
-
- function mountDebugValue(value, formatterFn) {// This hook is normally a no-op.
- // The react-debug-hooks package injects its own implementation
- // so that e.g. DevTools can display custom hook values.
- }
-
- var updateDebugValue = mountDebugValue;
-
- function mountCallback(callback, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- hook.memoizedState = [callback, nextDeps];
- return callback;
- }
-
- function updateCallback(callback, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var prevState = hook.memoizedState;
-
- if (prevState !== null) {
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
-
- hook.memoizedState = [callback, nextDeps];
- return callback;
- }
-
- function mountMemo(nextCreate, deps) {
- var hook = mountWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var nextValue = nextCreate();
- hook.memoizedState = [nextValue, nextDeps];
- return nextValue;
- }
-
- function updateMemo(nextCreate, deps) {
- var hook = updateWorkInProgressHook();
- var nextDeps = deps === undefined ? null : deps;
- var prevState = hook.memoizedState;
-
- if (prevState !== null) {
- // Assume these are defined. If they're not, areHookInputsEqual will warn.
- if (nextDeps !== null) {
- var prevDeps = prevState[1];
-
- if (areHookInputsEqual(nextDeps, prevDeps)) {
- return prevState[0];
- }
- }
- }
-
- var nextValue = nextCreate();
- hook.memoizedState = [nextValue, nextDeps];
- return nextValue;
- }
-
- function mountDeferredValue(value) {
- var _mountState = mountState(value),
- prevValue = _mountState[0],
- setValue = _mountState[1];
-
- mountEffect(function () {
- var prevTransition = ReactCurrentBatchConfig$1.transition;
- ReactCurrentBatchConfig$1.transition = 1;
-
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.transition = prevTransition;
- }
- }, [value]);
- return prevValue;
- }
-
- function updateDeferredValue(value) {
- var _updateState = updateState(),
- prevValue = _updateState[0],
- setValue = _updateState[1];
-
- updateEffect(function () {
- var prevTransition = ReactCurrentBatchConfig$1.transition;
- ReactCurrentBatchConfig$1.transition = 1;
-
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.transition = prevTransition;
- }
- }, [value]);
- return prevValue;
- }
-
- function rerenderDeferredValue(value) {
- var _rerenderState = rerenderState(),
- prevValue = _rerenderState[0],
- setValue = _rerenderState[1];
-
- updateEffect(function () {
- var prevTransition = ReactCurrentBatchConfig$1.transition;
- ReactCurrentBatchConfig$1.transition = 1;
-
- try {
- setValue(value);
- } finally {
- ReactCurrentBatchConfig$1.transition = prevTransition;
- }
- }, [value]);
- return prevValue;
- }
-
- function startTransition(setPending, callback) {
- var priorityLevel = getCurrentPriorityLevel();
-
- {
- runWithPriority$1(priorityLevel < UserBlockingPriority$2 ? UserBlockingPriority$2 : priorityLevel, function () {
- setPending(true);
- });
- runWithPriority$1(priorityLevel > NormalPriority$1 ? NormalPriority$1 : priorityLevel, function () {
- var prevTransition = ReactCurrentBatchConfig$1.transition;
- ReactCurrentBatchConfig$1.transition = 1;
-
- try {
- setPending(false);
- callback();
- } finally {
- ReactCurrentBatchConfig$1.transition = prevTransition;
- }
- });
- }
- }
-
- function mountTransition() {
- var _mountState2 = mountState(false),
- isPending = _mountState2[0],
- setPending = _mountState2[1]; // The `start` method can be stored on a ref, since `setPending`
- // never changes.
-
-
- var start = startTransition.bind(null, setPending);
- mountRef(start);
- return [start, isPending];
- }
-
- function updateTransition() {
- var _updateState2 = updateState(),
- isPending = _updateState2[0];
-
- var startRef = updateRef();
- var start = startRef.current;
- return [start, isPending];
- }
-
- function rerenderTransition() {
- var _rerenderState2 = rerenderState(),
- isPending = _rerenderState2[0];
-
- var startRef = updateRef();
- var start = startRef.current;
- return [start, isPending];
- }
-
- var isUpdatingOpaqueValueInRenderPhase = false;
- function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
- {
- return isUpdatingOpaqueValueInRenderPhase;
- }
- }
-
- function warnOnOpaqueIdentifierAccessInDEV(fiber) {
- {
- // TODO: Should warn in effects and callbacks, too
- var name = getComponentName(fiber.type) || 'Unknown';
-
- if (getIsRendering() && !didWarnAboutUseOpaqueIdentifier[name]) {
- error('The object passed back from useOpaqueIdentifier is meant to be ' + 'passed through to attributes only. Do not read the ' + 'value directly.');
-
- didWarnAboutUseOpaqueIdentifier[name] = true;
- }
- }
- }
-
- function mountOpaqueIdentifier() {
- var makeId = makeClientIdInDEV.bind(null, warnOnOpaqueIdentifierAccessInDEV.bind(null, currentlyRenderingFiber$1)) ;
-
- if (getIsHydrating()) {
- var didUpgrade = false;
- var fiber = currentlyRenderingFiber$1;
-
- var readValue = function () {
- if (!didUpgrade) {
- // Only upgrade once. This works even inside the render phase because
- // the update is added to a shared queue, which outlasts the
- // in-progress render.
- didUpgrade = true;
-
- {
- isUpdatingOpaqueValueInRenderPhase = true;
- setId(makeId());
- isUpdatingOpaqueValueInRenderPhase = false;
- warnOnOpaqueIdentifierAccessInDEV(fiber);
- }
- }
-
- {
- {
- throw Error( "The object passed back from useOpaqueIdentifier is meant to be passed through to attributes only. Do not read the value directly." );
- }
- }
- };
-
- var id = makeOpaqueHydratingObject(readValue);
- var setId = mountState(id)[1];
-
- if ((currentlyRenderingFiber$1.mode & BlockingMode) === NoMode) {
- currentlyRenderingFiber$1.flags |= Update | Passive;
- pushEffect(HasEffect | Passive$1, function () {
- setId(makeId());
- }, undefined, null);
- }
-
- return id;
- } else {
- var _id = makeId();
-
- mountState(_id);
- return _id;
- }
- }
-
- function updateOpaqueIdentifier() {
- var id = updateState()[0];
- return id;
- }
-
- function rerenderOpaqueIdentifier() {
- var id = rerenderState()[0];
- return id;
- }
-
- function dispatchAction(fiber, queue, action) {
- {
- if (typeof arguments[3] === 'function') {
- error("State updates from the useState() and useReducer() Hooks don't support the " + 'second callback argument. To execute a side effect after ' + 'rendering, declare it in the component body with useEffect().');
- }
- }
-
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- var update = {
- lane: lane,
- action: action,
- eagerReducer: null,
- eagerState: null,
- next: null
- }; // Append the update to the end of the list.
-
- var pending = queue.pending;
-
- if (pending === null) {
- // This is the first update. Create a circular list.
- update.next = update;
- } else {
- update.next = pending.next;
- pending.next = update;
- }
-
- queue.pending = update;
- var alternate = fiber.alternate;
-
- if (fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1) {
- // This is a render phase update. Stash it in a lazily-created map of
- // queue -> linked list of updates. After this render pass, we'll restart
- // and apply the stashed updates on top of the work-in-progress hook.
- didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
- } else {
- if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
- // The queue is currently empty, which means we can eagerly compute the
- // next state before entering the render phase. If the new state is the
- // same as the current state, we may be able to bail out entirely.
- var lastRenderedReducer = queue.lastRenderedReducer;
-
- if (lastRenderedReducer !== null) {
- var prevDispatcher;
-
- {
- prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
- }
-
- try {
- var currentState = queue.lastRenderedState;
- var eagerState = lastRenderedReducer(currentState, action); // Stash the eagerly computed state, and the reducer used to compute
- // it, on the update object. If the reducer hasn't changed by the
- // time we enter the render phase, then the eager state can be used
- // without calling the reducer again.
-
- update.eagerReducer = lastRenderedReducer;
- update.eagerState = eagerState;
-
- if (objectIs(eagerState, currentState)) {
- // Fast path. We can bail out without scheduling React to re-render.
- // It's still possible that we'll need to rebase this update later,
- // if the component re-renders for a different reason and by that
- // time the reducer has changed.
- return;
- }
- } catch (error) {// Suppress the error. It will throw again in the render phase.
- } finally {
- {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- }
- }
- }
-
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfNotScopedWithMatchingAct(fiber);
- warnIfNotCurrentlyActingUpdatesInDev(fiber);
- }
- }
-
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- }
- }
-
- var ContextOnlyDispatcher = {
- readContext: readContext,
- useCallback: throwInvalidHookError,
- useContext: throwInvalidHookError,
- useEffect: throwInvalidHookError,
- useImperativeHandle: throwInvalidHookError,
- useLayoutEffect: throwInvalidHookError,
- useMemo: throwInvalidHookError,
- useReducer: throwInvalidHookError,
- useRef: throwInvalidHookError,
- useState: throwInvalidHookError,
- useDebugValue: throwInvalidHookError,
- useDeferredValue: throwInvalidHookError,
- useTransition: throwInvalidHookError,
- useMutableSource: throwInvalidHookError,
- useOpaqueIdentifier: throwInvalidHookError,
- unstable_isNewReconciler: enableNewReconciler
- };
- var HooksDispatcherOnMountInDEV = null;
- var HooksDispatcherOnMountWithHookTypesInDEV = null;
- var HooksDispatcherOnUpdateInDEV = null;
- var HooksDispatcherOnRerenderInDEV = null;
- var InvalidNestedHooksDispatcherOnMountInDEV = null;
- var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
- var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
-
- {
- var warnInvalidContextAccess = function () {
- 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().');
- };
-
- var warnInvalidHookAccess = function () {
- 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');
- };
-
- HooksDispatcherOnMountInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- mountHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- mountHookTypesDev();
- checkDepsAreArrayDev(deps);
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- mountHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- mountHookTypesDev();
- return mountDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- mountHookTypesDev();
- return mountDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- mountHookTypesDev();
- return mountTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- mountHookTypesDev();
- return mountMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- mountHookTypesDev();
- return mountOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- HooksDispatcherOnMountWithHookTypesInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return mountDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return mountDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return mountTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- updateHookTypesDev();
- return mountMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- updateHookTypesDev();
- return mountOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- HooksDispatcherOnUpdateInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return updateDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return updateDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return updateTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- updateHookTypesDev();
- return updateMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- updateHookTypesDev();
- return updateOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- HooksDispatcherOnRerenderInDEV = {
- readContext: function (context, observedBits) {
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
-
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
-
- try {
- return rerenderReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
-
- try {
- return rerenderState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- updateHookTypesDev();
- return updateDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- updateHookTypesDev();
- return rerenderDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- updateHookTypesDev();
- return rerenderTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- updateHookTypesDev();
- return updateMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- updateHookTypesDev();
- return rerenderOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- InvalidNestedHooksDispatcherOnMountInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountRef(initialValue);
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- mountHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
-
- try {
- return mountState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- warnInvalidHookAccess();
- mountHookTypesDev();
- return mountOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- InvalidNestedHooksDispatcherOnUpdateInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- InvalidNestedHooksDispatcherOnRerenderInDEV = {
- readContext: function (context, observedBits) {
- warnInvalidContextAccess();
- return readContext(context, observedBits);
- },
- useCallback: function (callback, deps) {
- currentHookNameInDev = 'useCallback';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateCallback(callback, deps);
- },
- useContext: function (context, observedBits) {
- currentHookNameInDev = 'useContext';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return readContext(context, observedBits);
- },
- useEffect: function (create, deps) {
- currentHookNameInDev = 'useEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateEffect(create, deps);
- },
- useImperativeHandle: function (ref, create, deps) {
- currentHookNameInDev = 'useImperativeHandle';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateImperativeHandle(ref, create, deps);
- },
- useLayoutEffect: function (create, deps) {
- currentHookNameInDev = 'useLayoutEffect';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateLayoutEffect(create, deps);
- },
- useMemo: function (create, deps) {
- currentHookNameInDev = 'useMemo';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return updateMemo(create, deps);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useReducer: function (reducer, initialArg, init) {
- currentHookNameInDev = 'useReducer';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return rerenderReducer(reducer, initialArg, init);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useRef: function (initialValue) {
- currentHookNameInDev = 'useRef';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateRef();
- },
- useState: function (initialState) {
- currentHookNameInDev = 'useState';
- warnInvalidHookAccess();
- updateHookTypesDev();
- var prevDispatcher = ReactCurrentDispatcher$1.current;
- ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
-
- try {
- return rerenderState(initialState);
- } finally {
- ReactCurrentDispatcher$1.current = prevDispatcher;
- }
- },
- useDebugValue: function (value, formatterFn) {
- currentHookNameInDev = 'useDebugValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateDebugValue();
- },
- useDeferredValue: function (value) {
- currentHookNameInDev = 'useDeferredValue';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return rerenderDeferredValue(value);
- },
- useTransition: function () {
- currentHookNameInDev = 'useTransition';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return rerenderTransition();
- },
- useMutableSource: function (source, getSnapshot, subscribe) {
- currentHookNameInDev = 'useMutableSource';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return updateMutableSource(source, getSnapshot, subscribe);
- },
- useOpaqueIdentifier: function () {
- currentHookNameInDev = 'useOpaqueIdentifier';
- warnInvalidHookAccess();
- updateHookTypesDev();
- return rerenderOpaqueIdentifier();
- },
- unstable_isNewReconciler: enableNewReconciler
- };
- }
-
- var now$1 = unstable_now;
- var commitTime = 0;
- var profilerStartTime = -1;
-
- function getCommitTime() {
- return commitTime;
- }
-
- function recordCommitTime() {
-
- commitTime = now$1();
- }
-
- function startProfilerTimer(fiber) {
-
- profilerStartTime = now$1();
-
- if (fiber.actualStartTime < 0) {
- fiber.actualStartTime = now$1();
- }
- }
-
- function stopProfilerTimerIfRunning(fiber) {
-
- profilerStartTime = -1;
- }
-
- function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
-
- if (profilerStartTime >= 0) {
- var elapsedTime = now$1() - profilerStartTime;
- fiber.actualDuration += elapsedTime;
-
- if (overrideBaseTime) {
- fiber.selfBaseDuration = elapsedTime;
- }
-
- profilerStartTime = -1;
- }
- }
-
- function transferActualDuration(fiber) {
- // Transfer time spent rendering these children so we don't lose it
- // after we rerender. This is used as a helper in special cases
- // where we should count the work of multiple passes.
- var child = fiber.child;
-
- while (child) {
- fiber.actualDuration += child.actualDuration;
- child = child.sibling;
- }
- }
-
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
- var didReceiveUpdate = false;
- var didWarnAboutBadClass;
- var didWarnAboutModulePatternComponent;
- var didWarnAboutContextTypeOnFunctionComponent;
- var didWarnAboutGetDerivedStateOnFunctionComponent;
- var didWarnAboutFunctionRefs;
- var didWarnAboutReassigningProps;
- var didWarnAboutRevealOrder;
- var didWarnAboutTailOptions;
-
- {
- didWarnAboutBadClass = {};
- didWarnAboutModulePatternComponent = {};
- didWarnAboutContextTypeOnFunctionComponent = {};
- didWarnAboutGetDerivedStateOnFunctionComponent = {};
- didWarnAboutFunctionRefs = {};
- didWarnAboutReassigningProps = false;
- didWarnAboutRevealOrder = {};
- didWarnAboutTailOptions = {};
- }
-
- function reconcileChildren(current, workInProgress, nextChildren, renderLanes) {
- if (current === null) {
- // If this is a fresh new component that hasn't been rendered yet, we
- // won't update its child set by applying minimal side-effects. Instead,
- // we will add them all to the child before it gets rendered. That means
- // we can optimize this reconciliation pass by not tracking side-effects.
- workInProgress.child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
- } else {
- // If the current child is the same as the work in progress, it means that
- // we haven't yet started any work on these children. Therefore, we use
- // the clone algorithm to create a copy of all the current children.
- // If we had any progressed work already, that is invalid at this point so
- // let's throw it out.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, nextChildren, renderLanes);
- }
- }
-
- function forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes) {
- // This function is fork of reconcileChildren. It's used in cases where we
- // want to reconcile without matching against the existing set. This has the
- // effect of all current children being unmounted; even if the type and key
- // are the same, the old child is unmounted and a new child is created.
- //
- // To do this, we're going to go through the reconcile algorithm twice. In
- // the first pass, we schedule a deletion for all the current children by
- // passing null.
- workInProgress.child = reconcileChildFibers(workInProgress, current.child, null, renderLanes); // In the second pass, we mount the new children. The trick here is that we
- // pass null in place of where we usually pass the current child set. This has
- // the effect of remounting all children regardless of whether their
- // identities match.
-
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
- }
-
- function updateForwardRef(current, workInProgress, Component, nextProps, renderLanes) {
- // TODO: current can be non-null here even if the component
- // hasn't yet mounted. This happens after the first render suspends.
- // We'll need to figure out if this is fine or can cause issues.
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
-
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component));
- }
- }
- }
-
- var render = Component.render;
- var ref = workInProgress.ref; // The rest is a fork of updateFunctionComponent
-
- var nextChildren;
- prepareToReadContext(workInProgress, renderLanes);
-
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
-
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- nextChildren = renderWithHooks(current, workInProgress, render, nextProps, ref, renderLanes);
- } finally {
- reenableLogs();
- }
- }
-
- setIsRendering(false);
- }
-
- if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderLanes);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
- }
-
- function updateMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
- if (current === null) {
- var type = Component.type;
-
- if (isSimpleFunctionComponent(type) && Component.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
- Component.defaultProps === undefined) {
- var resolvedType = type;
-
- {
- resolvedType = resolveFunctionForHotReloading(type);
- } // If this is a plain function component without default props,
- // and with only the default shallow comparison, we upgrade it
- // to a SimpleMemoComponent to allow fast path updates.
-
-
- workInProgress.tag = SimpleMemoComponent;
- workInProgress.type = resolvedType;
-
- {
- validateFunctionComponentInDev(workInProgress, type);
- }
-
- return updateSimpleMemoComponent(current, workInProgress, resolvedType, nextProps, updateLanes, renderLanes);
- }
-
- {
- var innerPropTypes = type.propTypes;
-
- if (innerPropTypes) {
- // Inner memo component props aren't currently validated in createElement.
- // We could move it there, but we'd still need this for lazy code path.
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(type));
- }
- }
-
- var child = createFiberFromTypeAndProps(Component.type, null, nextProps, workInProgress, workInProgress.mode, renderLanes);
- child.ref = workInProgress.ref;
- child.return = workInProgress;
- workInProgress.child = child;
- return child;
- }
-
- {
- var _type = Component.type;
- var _innerPropTypes = _type.propTypes;
-
- if (_innerPropTypes) {
- // Inner memo component props aren't currently validated in createElement.
- // We could move it there, but we'd still need this for lazy code path.
- checkPropTypes(_innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(_type));
- }
- }
-
- var currentChild = current.child; // This is always exactly one child
-
- if (!includesSomeLane(updateLanes, renderLanes)) {
- // This will be the props with resolved defaultProps,
- // unlike current.memoizedProps which will be the unresolved ones.
- var prevProps = currentChild.memoizedProps; // Default to shallow comparison
-
- var compare = Component.compare;
- compare = compare !== null ? compare : shallowEqual;
-
- if (compare(prevProps, nextProps) && current.ref === workInProgress.ref) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- }
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
- var newChild = createWorkInProgress(currentChild, nextProps);
- newChild.ref = workInProgress.ref;
- newChild.return = workInProgress;
- workInProgress.child = newChild;
- return newChild;
- }
-
- function updateSimpleMemoComponent(current, workInProgress, Component, nextProps, updateLanes, renderLanes) {
- // TODO: current can be non-null here even if the component
- // hasn't yet mounted. This happens when the inner render suspends.
- // We'll need to figure out if this is fine or can cause issues.
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var outerMemoType = workInProgress.elementType;
-
- if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
- // We warn when you define propTypes on lazy()
- // so let's just skip over it to find memo() outer wrapper.
- // Inner props for memo are validated later.
- var lazyComponent = outerMemoType;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- outerMemoType = init(payload);
- } catch (x) {
- outerMemoType = null;
- } // Inner propTypes will be validated in the function component path.
-
-
- var outerPropTypes = outerMemoType && outerMemoType.propTypes;
-
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, nextProps, // Resolved (SimpleMemoComponent has no defaultProps)
- 'prop', getComponentName(outerMemoType));
- }
- }
- }
- }
-
- if (current !== null) {
- var prevProps = current.memoizedProps;
-
- if (shallowEqual(prevProps, nextProps) && current.ref === workInProgress.ref && ( // Prevent bailout if the implementation changed due to hot reload.
- workInProgress.type === current.type )) {
- didReceiveUpdate = false;
-
- if (!includesSomeLane(renderLanes, updateLanes)) {
- // The pending lanes were cleared at the beginning of beginWork. We're
- // about to bail out, but there might be other lanes that weren't
- // included in the current render. Usually, the priority level of the
- // remaining updates is accumlated during the evaluation of the
- // component (i.e. when processing the update queue). But since since
- // we're bailing out early *without* evaluating the component, we need
- // to account for it here, too. Reset to the value of the current fiber.
- // NOTE: This only applies to SimpleMemoComponent, not MemoComponent,
- // because a MemoComponent fiber does not have hooks or an update queue;
- // rather, it wraps around an inner component, which may or may not
- // contains hooks.
- // TODO: Move the reset at in beginWork out of the common path so that
- // this is no longer necessary.
- workInProgress.lanes = current.lanes;
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- } else if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
- // This is a special case that only exists for legacy mode.
- // See https://github.com/facebook/react/pull/19216.
- didReceiveUpdate = true;
- }
- }
- }
-
- return updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes);
- }
-
- function updateOffscreenComponent(current, workInProgress, renderLanes) {
- var nextProps = workInProgress.pendingProps;
- var nextChildren = nextProps.children;
- var prevState = current !== null ? current.memoizedState : null;
-
- if (nextProps.mode === 'hidden' || nextProps.mode === 'unstable-defer-without-hiding') {
- if ((workInProgress.mode & ConcurrentMode) === NoMode) {
- // In legacy sync mode, don't defer the subtree. Render it now.
- // TODO: Figure out what we should do in Blocking mode.
- var nextState = {
- baseLanes: NoLanes
- };
- workInProgress.memoizedState = nextState;
- pushRenderLanes(workInProgress, renderLanes);
- } else if (!includesSomeLane(renderLanes, OffscreenLane)) {
- var nextBaseLanes;
-
- if (prevState !== null) {
- var prevBaseLanes = prevState.baseLanes;
- nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes);
- } else {
- nextBaseLanes = renderLanes;
- } // Schedule this fiber to re-render at offscreen priority. Then bailout.
-
-
- {
- markSpawnedWork(OffscreenLane);
- }
-
- workInProgress.lanes = workInProgress.childLanes = laneToLanes(OffscreenLane);
- var _nextState = {
- baseLanes: nextBaseLanes
- };
- workInProgress.memoizedState = _nextState; // We're about to bail out, but we need to push this to the stack anyway
- // to avoid a push/pop misalignment.
-
- pushRenderLanes(workInProgress, nextBaseLanes);
- return null;
- } else {
- // Rendering at offscreen, so we can clear the base lanes.
- var _nextState2 = {
- baseLanes: NoLanes
- };
- workInProgress.memoizedState = _nextState2; // Push the lanes that were skipped when we bailed out.
-
- var subtreeRenderLanes = prevState !== null ? prevState.baseLanes : renderLanes;
- pushRenderLanes(workInProgress, subtreeRenderLanes);
- }
- } else {
- var _subtreeRenderLanes;
-
- if (prevState !== null) {
- _subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes); // Since we're not hidden anymore, reset the state
-
- workInProgress.memoizedState = null;
- } else {
- // We weren't previously hidden, and we still aren't, so there's nothing
- // special to do. Need to push to the stack regardless, though, to avoid
- // a push/pop misalignment.
- _subtreeRenderLanes = renderLanes;
- }
-
- pushRenderLanes(workInProgress, _subtreeRenderLanes);
- }
-
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
- } // Note: These happen to have identical begin phases, for now. We shouldn't hold
- // ourselves to this constraint, though. If the behavior diverges, we should
- // fork the function.
-
-
- var updateLegacyHiddenComponent = updateOffscreenComponent;
-
- function updateFragment(current, workInProgress, renderLanes) {
- var nextChildren = workInProgress.pendingProps;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
- }
-
- function updateMode(current, workInProgress, renderLanes) {
- var nextChildren = workInProgress.pendingProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
- }
-
- function updateProfiler(current, workInProgress, renderLanes) {
- {
- workInProgress.flags |= Update; // Reset effect durations for the next eventual effect phase.
- // These are reset during render to allow the DevTools commit hook a chance to read them,
-
- var stateNode = workInProgress.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- }
-
- var nextProps = workInProgress.pendingProps;
- var nextChildren = nextProps.children;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
- }
-
- function markRef(current, workInProgress) {
- var ref = workInProgress.ref;
-
- if (current === null && ref !== null || current !== null && current.ref !== ref) {
- // Schedule a Ref effect
- workInProgress.flags |= Ref;
- }
- }
-
- function updateFunctionComponent(current, workInProgress, Component, nextProps, renderLanes) {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
-
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component));
- }
- }
- }
-
- var context;
-
- {
- var unmaskedContext = getUnmaskedContext(workInProgress, Component, true);
- context = getMaskedContext(workInProgress, unmaskedContext);
- }
-
- var nextChildren;
- prepareToReadContext(workInProgress, renderLanes);
-
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
-
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- nextChildren = renderWithHooks(current, workInProgress, Component, nextProps, context, renderLanes);
- } finally {
- reenableLogs();
- }
- }
-
- setIsRendering(false);
- }
-
- if (current !== null && !didReceiveUpdate) {
- bailoutHooks(current, workInProgress, renderLanes);
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
- }
-
- function updateClassComponent(current, workInProgress, Component, nextProps, renderLanes) {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- // Lazy component props can't be validated in createElement
- // because they're only guaranteed to be resolved here.
- var innerPropTypes = Component.propTypes;
-
- if (innerPropTypes) {
- checkPropTypes(innerPropTypes, nextProps, // Resolved props
- 'prop', getComponentName(Component));
- }
- }
- } // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
-
-
- var hasContext;
-
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
-
- prepareToReadContext(workInProgress, renderLanes);
- var instance = workInProgress.stateNode;
- var shouldUpdate;
-
- if (instance === null) {
- if (current !== null) {
- // A class component without an instance only mounts if it suspended
- // inside a non-concurrent tree, in an inconsistent state. We want to
- // treat it like a new mount, even though an empty version of it already
- // committed. Disconnect the alternate pointers.
- current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
-
- workInProgress.flags |= Placement;
- } // In the initial pass we might need to construct the instance.
-
-
- constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderLanes);
- shouldUpdate = true;
- } else if (current === null) {
- // In a resume, we'll already have an instance we can reuse.
- shouldUpdate = resumeMountClassInstance(workInProgress, Component, nextProps, renderLanes);
- } else {
- shouldUpdate = updateClassInstance(current, workInProgress, Component, nextProps, renderLanes);
- }
-
- var nextUnitOfWork = finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes);
-
- {
- var inst = workInProgress.stateNode;
-
- if (shouldUpdate && inst.props !== nextProps) {
- if (!didWarnAboutReassigningProps) {
- error('It looks like %s is reassigning its own `this.props` while rendering. ' + 'This is not supported and can lead to confusing bugs.', getComponentName(workInProgress.type) || 'a component');
- }
-
- didWarnAboutReassigningProps = true;
- }
- }
-
- return nextUnitOfWork;
- }
-
- function finishClassComponent(current, workInProgress, Component, shouldUpdate, hasContext, renderLanes) {
- // Refs should update even if shouldComponentUpdate returns false
- markRef(current, workInProgress);
- var didCaptureError = (workInProgress.flags & DidCapture) !== NoFlags;
-
- if (!shouldUpdate && !didCaptureError) {
- // Context providers should defer to sCU for rendering
- if (hasContext) {
- invalidateContextProvider(workInProgress, Component, false);
- }
-
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- }
-
- var instance = workInProgress.stateNode; // Rerender
-
- ReactCurrentOwner$1.current = workInProgress;
- var nextChildren;
-
- if (didCaptureError && typeof Component.getDerivedStateFromError !== 'function') {
- // If we captured an error, but getDerivedStateFromError is not defined,
- // unmount all the children. componentDidCatch will schedule an update to
- // re-render a fallback. This is temporary until we migrate everyone to
- // the new API.
- // TODO: Warn in a future release.
- nextChildren = null;
-
- {
- stopProfilerTimerIfRunning();
- }
- } else {
- {
- setIsRendering(true);
- nextChildren = instance.render();
-
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- instance.render();
- } finally {
- reenableLogs();
- }
- }
-
- setIsRendering(false);
- }
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
-
- if (current !== null && didCaptureError) {
- // If we're recovering from an error, reconcile without reusing any of
- // the existing children. Conceptually, the normal children and the children
- // that are shown on error are two different sets, so we shouldn't reuse
- // normal children even if their identities match.
- forceUnmountCurrentAndReconcile(current, workInProgress, nextChildren, renderLanes);
- } else {
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- } // Memoize state using the values we just used to render.
- // TODO: Restructure so we never read values from the instance.
-
-
- workInProgress.memoizedState = instance.state; // The context might have changed so we need to recalculate it.
-
- if (hasContext) {
- invalidateContextProvider(workInProgress, Component, true);
- }
-
- return workInProgress.child;
- }
-
- function pushHostRootContext(workInProgress) {
- var root = workInProgress.stateNode;
-
- if (root.pendingContext) {
- pushTopLevelContextObject(workInProgress, root.pendingContext, root.pendingContext !== root.context);
- } else if (root.context) {
- // Should always be set
- pushTopLevelContextObject(workInProgress, root.context, false);
- }
-
- pushHostContainer(workInProgress, root.containerInfo);
- }
-
- function updateHostRoot(current, workInProgress, renderLanes) {
- pushHostRootContext(workInProgress);
- var updateQueue = workInProgress.updateQueue;
-
- if (!(current !== null && updateQueue !== null)) {
- {
- throw Error( "If the root does not have an updateQueue, we should have already bailed out. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var nextProps = workInProgress.pendingProps;
- var prevState = workInProgress.memoizedState;
- var prevChildren = prevState !== null ? prevState.element : null;
- cloneUpdateQueue(current, workInProgress);
- processUpdateQueue(workInProgress, nextProps, null, renderLanes);
- var nextState = workInProgress.memoizedState; // Caution: React DevTools currently depends on this property
- // being called "element".
-
- var nextChildren = nextState.element;
-
- if (nextChildren === prevChildren) {
- resetHydrationState();
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- }
-
- var root = workInProgress.stateNode;
-
- if (root.hydrate && enterHydrationState(workInProgress)) {
- // If we don't have any current children this might be the first pass.
- // We always try to hydrate. If this isn't a hydration pass there won't
- // be any children to hydrate which is effectively the same thing as
- // not hydrating.
- {
- var mutableSourceEagerHydrationData = root.mutableSourceEagerHydrationData;
-
- if (mutableSourceEagerHydrationData != null) {
- for (var i = 0; i < mutableSourceEagerHydrationData.length; i += 2) {
- var mutableSource = mutableSourceEagerHydrationData[i];
- var version = mutableSourceEagerHydrationData[i + 1];
- setWorkInProgressVersion(mutableSource, version);
- }
- }
- }
-
- var child = mountChildFibers(workInProgress, null, nextChildren, renderLanes);
- workInProgress.child = child;
- var node = child;
-
- while (node) {
- // Mark each child as hydrating. This is a fast path to know whether this
- // tree is part of a hydrating tree. This is used to determine if a child
- // node has fully mounted yet, and for scheduling event replaying.
- // Conceptually this is similar to Placement in that a new subtree is
- // inserted into the React tree here. It just happens to not need DOM
- // mutations because it already exists.
- node.flags = node.flags & ~Placement | Hydrating;
- node = node.sibling;
- }
- } else {
- // Otherwise reset hydration state in case we aborted and resumed another
- // root.
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- resetHydrationState();
- }
-
- return workInProgress.child;
- }
-
- function updateHostComponent(current, workInProgress, renderLanes) {
- pushHostContext(workInProgress);
-
- if (current === null) {
- tryToClaimNextHydratableInstance(workInProgress);
- }
-
- var type = workInProgress.type;
- var nextProps = workInProgress.pendingProps;
- var prevProps = current !== null ? current.memoizedProps : null;
- var nextChildren = nextProps.children;
- var isDirectTextChild = shouldSetTextContent(type, nextProps);
-
- if (isDirectTextChild) {
- // We special case a direct text child of a host node. This is a common
- // case. We won't handle it as a reified child. We will instead handle
- // this in the host environment that also has access to this prop. That
- // avoids allocating another HostText fiber and traversing it.
- nextChildren = null;
- } else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
- // If we're switching from a direct text child to a normal child, or to
- // empty, we need to schedule the text content to be reset.
- workInProgress.flags |= ContentReset;
- }
-
- markRef(current, workInProgress);
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- return workInProgress.child;
- }
-
- function updateHostText(current, workInProgress) {
- if (current === null) {
- tryToClaimNextHydratableInstance(workInProgress);
- } // Nothing to do here. This is terminal. We'll do the completion step
- // immediately after.
-
-
- return null;
- }
-
- function mountLazyComponent(_current, workInProgress, elementType, updateLanes, renderLanes) {
- if (_current !== null) {
- // A lazy component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
-
- workInProgress.flags |= Placement;
- }
-
- var props = workInProgress.pendingProps;
- var lazyComponent = elementType;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
- var Component = init(payload); // Store the unwrapped component in the type.
-
- workInProgress.type = Component;
- var resolvedTag = workInProgress.tag = resolveLazyComponentTag(Component);
- var resolvedProps = resolveDefaultProps(Component, props);
- var child;
-
- switch (resolvedTag) {
- case FunctionComponent:
- {
- {
- validateFunctionComponentInDev(workInProgress, Component);
- workInProgress.type = Component = resolveFunctionForHotReloading(Component);
- }
-
- child = updateFunctionComponent(null, workInProgress, Component, resolvedProps, renderLanes);
- return child;
- }
-
- case ClassComponent:
- {
- {
- workInProgress.type = Component = resolveClassForHotReloading(Component);
- }
-
- child = updateClassComponent(null, workInProgress, Component, resolvedProps, renderLanes);
- return child;
- }
-
- case ForwardRef:
- {
- {
- workInProgress.type = Component = resolveForwardRefForHotReloading(Component);
- }
-
- child = updateForwardRef(null, workInProgress, Component, resolvedProps, renderLanes);
- return child;
- }
-
- case MemoComponent:
- {
- {
- if (workInProgress.type !== workInProgress.elementType) {
- var outerPropTypes = Component.propTypes;
-
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, resolvedProps, // Resolved for outer only
- 'prop', getComponentName(Component));
- }
- }
- }
-
- child = updateMemoComponent(null, workInProgress, Component, resolveDefaultProps(Component.type, resolvedProps), // The inner type can have defaults too
- updateLanes, renderLanes);
- return child;
- }
- }
-
- var hint = '';
-
- {
- if (Component !== null && typeof Component === 'object' && Component.$$typeof === REACT_LAZY_TYPE) {
- hint = ' Did you wrap a component in React.lazy() more than once?';
- }
- } // This message intentionally doesn't mention ForwardRef or MemoComponent
- // because the fact that it's a separate type of work is an
- // implementation detail.
-
-
- {
- {
- throw Error( "Element type is invalid. Received a promise that resolves to: " + Component + ". Lazy element type must resolve to a class or function." + hint );
- }
- }
- }
-
- function mountIncompleteClassComponent(_current, workInProgress, Component, nextProps, renderLanes) {
- if (_current !== null) {
- // An incomplete component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
-
- workInProgress.flags |= Placement;
- } // Promote the fiber to a class and try rendering again.
-
-
- workInProgress.tag = ClassComponent; // The rest of this function is a fork of `updateClassComponent`
- // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
-
- var hasContext;
-
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
-
- prepareToReadContext(workInProgress, renderLanes);
- constructClassInstance(workInProgress, Component, nextProps);
- mountClassInstance(workInProgress, Component, nextProps, renderLanes);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
- }
-
- function mountIndeterminateComponent(_current, workInProgress, Component, renderLanes) {
- if (_current !== null) {
- // An indeterminate component only mounts if it suspended inside a non-
- // concurrent tree, in an inconsistent state. We want to treat it like
- // a new mount, even though an empty version of it already committed.
- // Disconnect the alternate pointers.
- _current.alternate = null;
- workInProgress.alternate = null; // Since this is conceptually a new fiber, schedule a Placement effect
-
- workInProgress.flags |= Placement;
- }
-
- var props = workInProgress.pendingProps;
- var context;
-
- {
- var unmaskedContext = getUnmaskedContext(workInProgress, Component, false);
- context = getMaskedContext(workInProgress, unmaskedContext);
- }
-
- prepareToReadContext(workInProgress, renderLanes);
- var value;
-
- {
- if (Component.prototype && typeof Component.prototype.render === 'function') {
- var componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutBadClass[componentName]) {
- 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);
-
- didWarnAboutBadClass[componentName] = true;
- }
- }
-
- if (workInProgress.mode & StrictMode) {
- ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress, null);
- }
-
- setIsRendering(true);
- ReactCurrentOwner$1.current = workInProgress;
- value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
- setIsRendering(false);
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
-
- {
- // Support for module components is deprecated and is removed behind a flag.
- // Whether or not it would crash later, we want to show a good message in DEV first.
- if (typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
- var _componentName = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutModulePatternComponent[_componentName]) {
- 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);
-
- didWarnAboutModulePatternComponent[_componentName] = true;
- }
- }
- }
-
- if ( // Run these checks in production only if the flag is off.
- // Eventually we'll delete this branch altogether.
- typeof value === 'object' && value !== null && typeof value.render === 'function' && value.$$typeof === undefined) {
- {
- var _componentName2 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutModulePatternComponent[_componentName2]) {
- 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);
-
- didWarnAboutModulePatternComponent[_componentName2] = true;
- }
- } // Proceed under the assumption that this is a class instance
-
-
- workInProgress.tag = ClassComponent; // Throw out any hooks that were used.
-
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null; // Push context providers early to prevent context stack mismatches.
- // During mounting we don't know the child context yet as the instance doesn't exist.
- // We will invalidate the child context in finishClassComponent() right after rendering.
-
- var hasContext = false;
-
- if (isContextProvider(Component)) {
- hasContext = true;
- pushContextProvider(workInProgress);
- } else {
- hasContext = false;
- }
-
- workInProgress.memoizedState = value.state !== null && value.state !== undefined ? value.state : null;
- initializeUpdateQueue(workInProgress);
- var getDerivedStateFromProps = Component.getDerivedStateFromProps;
-
- if (typeof getDerivedStateFromProps === 'function') {
- applyDerivedStateFromProps(workInProgress, Component, getDerivedStateFromProps, props);
- }
-
- adoptClassInstance(workInProgress, value);
- mountClassInstance(workInProgress, Component, props, renderLanes);
- return finishClassComponent(null, workInProgress, Component, true, hasContext, renderLanes);
- } else {
- // Proceed under the assumption that this is a function component
- workInProgress.tag = FunctionComponent;
-
- {
-
- if ( workInProgress.mode & StrictMode) {
- disableLogs();
-
- try {
- value = renderWithHooks(null, workInProgress, Component, props, context, renderLanes);
- } finally {
- reenableLogs();
- }
- }
- }
-
- reconcileChildren(null, workInProgress, value, renderLanes);
-
- {
- validateFunctionComponentInDev(workInProgress, Component);
- }
-
- return workInProgress.child;
- }
- }
-
- function validateFunctionComponentInDev(workInProgress, Component) {
- {
- if (Component) {
- if (Component.childContextTypes) {
- error('%s(...): childContextTypes cannot be defined on a function component.', Component.displayName || Component.name || 'Component');
- }
- }
-
- if (workInProgress.ref !== null) {
- var info = '';
- var ownerName = getCurrentFiberOwnerNameInDevOrNull();
-
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
-
- var warningKey = ownerName || workInProgress._debugID || '';
- var debugSource = workInProgress._debugSource;
-
- if (debugSource) {
- warningKey = debugSource.fileName + ':' + debugSource.lineNumber;
- }
-
- if (!didWarnAboutFunctionRefs[warningKey]) {
- didWarnAboutFunctionRefs[warningKey] = true;
-
- error('Function components cannot be given refs. ' + 'Attempts to access this ref will fail. ' + 'Did you mean to use React.forwardRef()?%s', info);
- }
- }
-
- if (typeof Component.getDerivedStateFromProps === 'function') {
- var _componentName3 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
- error('%s: Function components do not support getDerivedStateFromProps.', _componentName3);
-
- didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
- }
- }
-
- if (typeof Component.contextType === 'object' && Component.contextType !== null) {
- var _componentName4 = getComponentName(Component) || 'Unknown';
-
- if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
- error('%s: Function components do not support contextType.', _componentName4);
-
- didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
- }
- }
- }
- }
-
- var SUSPENDED_MARKER = {
- dehydrated: null,
- retryLane: NoLane
- };
-
- function mountSuspenseOffscreenState(renderLanes) {
- return {
- baseLanes: renderLanes
- };
- }
-
- function updateSuspenseOffscreenState(prevOffscreenState, renderLanes) {
- return {
- baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes)
- };
- } // TODO: Probably should inline this back
-
-
- function shouldRemainOnFallback(suspenseContext, current, workInProgress, renderLanes) {
- // If we're already showing a fallback, there are cases where we need to
- // remain on that fallback regardless of whether the content has resolved.
- // For example, SuspenseList coordinates when nested content appears.
- if (current !== null) {
- var suspenseState = current.memoizedState;
-
- if (suspenseState === null) {
- // Currently showing content. Don't hide it, even if ForceSuspenseFallack
- // is true. More precise name might be "ForceRemainSuspenseFallback".
- // Note: This is a factoring smell. Can't remain on a fallback if there's
- // no fallback to remain on.
- return false;
- }
- } // Not currently showing content. Consult the Suspense context.
-
-
- return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
- }
-
- function getRemainingWorkInPrimaryTree(current, renderLanes) {
- // TODO: Should not remove render lanes that were pinged during this render
- return removeLanes(current.childLanes, renderLanes);
- }
-
- function updateSuspenseComponent(current, workInProgress, renderLanes) {
- var nextProps = workInProgress.pendingProps; // This is used by DevTools to force a boundary to suspend.
-
- {
- if (shouldSuspend(workInProgress)) {
- workInProgress.flags |= DidCapture;
- }
- }
-
- var suspenseContext = suspenseStackCursor.current;
- var showFallback = false;
- var didSuspend = (workInProgress.flags & DidCapture) !== NoFlags;
-
- if (didSuspend || shouldRemainOnFallback(suspenseContext, current)) {
- // Something in this boundary's subtree already suspended. Switch to
- // rendering the fallback children.
- showFallback = true;
- workInProgress.flags &= ~DidCapture;
- } else {
- // Attempting the main content
- if (current === null || current.memoizedState !== null) {
- // This is a new mount or this boundary is already showing a fallback state.
- // Mark this subtree context as having at least one invisible parent that could
- // handle the fallback state.
- // Boundaries without fallbacks or should be avoided are not considered since
- // they cannot handle preferred fallback states.
- if (nextProps.fallback !== undefined && nextProps.unstable_avoidThisFallback !== true) {
- suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
- }
- }
- }
-
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- pushSuspenseContext(workInProgress, suspenseContext); // OK, the next part is confusing. We're about to reconcile the Suspense
- // boundary's children. This involves some custom reconcilation logic. Two
- // main reasons this is so complicated.
- //
- // First, Legacy Mode has different semantics for backwards compatibility. The
- // primary tree will commit in an inconsistent state, so when we do the
- // second pass to render the fallback, we do some exceedingly, uh, clever
- // hacks to make that not totally break. Like transferring effects and
- // deletions from hidden tree. In Concurrent Mode, it's much simpler,
- // because we bailout on the primary tree completely and leave it in its old
- // state, no effects. Same as what we do for Offscreen (except that
- // Offscreen doesn't have the first render pass).
- //
- // Second is hydration. During hydration, the Suspense fiber has a slightly
- // different layout, where the child points to a dehydrated fragment, which
- // contains the DOM rendered by the server.
- //
- // Third, even if you set all that aside, Suspense is like error boundaries in
- // that we first we try to render one tree, and if that fails, we render again
- // and switch to a different tree. Like a try/catch block. So we have to track
- // which branch we're currently rendering. Ideally we would model this using
- // a stack.
-
- if (current === null) {
- // Initial mount
- // If we're currently hydrating, try to hydrate this boundary.
- // But only if this has a fallback.
- if (nextProps.fallback !== undefined) {
- tryToClaimNextHydratableInstance(workInProgress); // This could've been a dehydrated suspense component.
- }
-
- var nextPrimaryChildren = nextProps.children;
- var nextFallbackChildren = nextProps.fallback;
-
- if (showFallback) {
- var fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
- var primaryChildFragment = workInProgress.child;
- primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
- workInProgress.memoizedState = SUSPENDED_MARKER;
- return fallbackFragment;
- } else if (typeof nextProps.unstable_expectedLoadTime === 'number') {
- // This is a CPU-bound tree. Skip this tree and show a placeholder to
- // unblock the surrounding content. Then immediately retry after the
- // initial commit.
- var _fallbackFragment = mountSuspenseFallbackChildren(workInProgress, nextPrimaryChildren, nextFallbackChildren, renderLanes);
-
- var _primaryChildFragment = workInProgress.child;
- _primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes);
- workInProgress.memoizedState = SUSPENDED_MARKER; // Since nothing actually suspended, there will nothing to ping this to
- // get it started back up to attempt the next item. While in terms of
- // priority this work has the same priority as this current render, it's
- // not part of the same transition once the transition has committed. If
- // it's sync, we still want to yield so that it can be painted.
- // Conceptually, this is really the same as pinging. We can use any
- // RetryLane even if it's the one currently rendering since we're leaving
- // it behind on this node.
-
- workInProgress.lanes = SomeRetryLane;
-
- {
- markSpawnedWork(SomeRetryLane);
- }
-
- return _fallbackFragment;
- } else {
- return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren, renderLanes);
- }
- } else {
- // This is an update.
- // If the current fiber has a SuspenseState, that means it's already showing
- // a fallback.
- var prevState = current.memoizedState;
-
- if (prevState !== null) {
-
- if (showFallback) {
- var _nextFallbackChildren2 = nextProps.fallback;
- var _nextPrimaryChildren2 = nextProps.children;
-
- var _fallbackChildFragment = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren2, _nextFallbackChildren2, renderLanes);
-
- var _primaryChildFragment3 = workInProgress.child;
- var prevOffscreenState = current.child.memoizedState;
- _primaryChildFragment3.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes);
- _primaryChildFragment3.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes);
- workInProgress.memoizedState = SUSPENDED_MARKER;
- return _fallbackChildFragment;
- } else {
- var _nextPrimaryChildren3 = nextProps.children;
-
- var _primaryChildFragment4 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren3, renderLanes);
-
- workInProgress.memoizedState = null;
- return _primaryChildFragment4;
- }
- } else {
- // The current tree is not already showing a fallback.
- if (showFallback) {
- // Timed out.
- var _nextFallbackChildren3 = nextProps.fallback;
- var _nextPrimaryChildren4 = nextProps.children;
-
- var _fallbackChildFragment2 = updateSuspenseFallbackChildren(current, workInProgress, _nextPrimaryChildren4, _nextFallbackChildren3, renderLanes);
-
- var _primaryChildFragment5 = workInProgress.child;
- var _prevOffscreenState = current.child.memoizedState;
- _primaryChildFragment5.memoizedState = _prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes) : updateSuspenseOffscreenState(_prevOffscreenState, renderLanes);
- _primaryChildFragment5.childLanes = getRemainingWorkInPrimaryTree(current, renderLanes); // Skip the primary children, and continue working on the
- // fallback children.
-
- workInProgress.memoizedState = SUSPENDED_MARKER;
- return _fallbackChildFragment2;
- } else {
- // Still haven't timed out. Continue rendering the children, like we
- // normally do.
- var _nextPrimaryChildren5 = nextProps.children;
-
- var _primaryChildFragment6 = updateSuspensePrimaryChildren(current, workInProgress, _nextPrimaryChildren5, renderLanes);
-
- workInProgress.memoizedState = null;
- return _primaryChildFragment6;
- }
- }
- }
- }
-
- function mountSuspensePrimaryChildren(workInProgress, primaryChildren, renderLanes) {
- var mode = workInProgress.mode;
- var primaryChildProps = {
- mode: 'visible',
- children: primaryChildren
- };
- var primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, renderLanes, null);
- primaryChildFragment.return = workInProgress;
- workInProgress.child = primaryChildFragment;
- return primaryChildFragment;
- }
-
- function mountSuspenseFallbackChildren(workInProgress, primaryChildren, fallbackChildren, renderLanes) {
- var mode = workInProgress.mode;
- var progressedPrimaryFragment = workInProgress.child;
- var primaryChildProps = {
- mode: 'hidden',
- children: primaryChildren
- };
- var primaryChildFragment;
- var fallbackChildFragment;
-
- if ((mode & BlockingMode) === NoMode && progressedPrimaryFragment !== null) {
- // In legacy mode, we commit the primary tree as if it successfully
- // completed, even though it's in an inconsistent state.
- primaryChildFragment = progressedPrimaryFragment;
- primaryChildFragment.childLanes = NoLanes;
- primaryChildFragment.pendingProps = primaryChildProps;
-
- if ( workInProgress.mode & ProfileMode) {
- // Reset the durations from the first pass so they aren't included in the
- // final amounts. This seems counterintuitive, since we're intentionally
- // not measuring part of the render phase, but this makes it match what we
- // do in Concurrent Mode.
- primaryChildFragment.actualDuration = 0;
- primaryChildFragment.actualStartTime = -1;
- primaryChildFragment.selfBaseDuration = 0;
- primaryChildFragment.treeBaseDuration = 0;
- }
-
- fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
- } else {
- primaryChildFragment = createFiberFromOffscreen(primaryChildProps, mode, NoLanes, null);
- fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null);
- }
-
- primaryChildFragment.return = workInProgress;
- fallbackChildFragment.return = workInProgress;
- primaryChildFragment.sibling = fallbackChildFragment;
- workInProgress.child = primaryChildFragment;
- return fallbackChildFragment;
- }
-
- function createWorkInProgressOffscreenFiber(current, offscreenProps) {
- // The props argument to `createWorkInProgress` is `any` typed, so we use this
- // wrapper function to constrain it.
- return createWorkInProgress(current, offscreenProps);
- }
-
- function updateSuspensePrimaryChildren(current, workInProgress, primaryChildren, renderLanes) {
- var currentPrimaryChildFragment = current.child;
- var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
- var primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
- mode: 'visible',
- children: primaryChildren
- });
-
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- primaryChildFragment.lanes = renderLanes;
- }
-
- primaryChildFragment.return = workInProgress;
- primaryChildFragment.sibling = null;
-
- if (currentFallbackChildFragment !== null) {
- // Delete the fallback child fragment
- currentFallbackChildFragment.nextEffect = null;
- currentFallbackChildFragment.flags = Deletion;
- workInProgress.firstEffect = workInProgress.lastEffect = currentFallbackChildFragment;
- }
-
- workInProgress.child = primaryChildFragment;
- return primaryChildFragment;
- }
-
- function updateSuspenseFallbackChildren(current, workInProgress, primaryChildren, fallbackChildren, renderLanes) {
- var mode = workInProgress.mode;
- var currentPrimaryChildFragment = current.child;
- var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
- var primaryChildProps = {
- mode: 'hidden',
- children: primaryChildren
- };
- var primaryChildFragment;
-
- if ( // In legacy mode, we commit the primary tree as if it successfully
- // completed, even though it's in an inconsistent state.
- (mode & BlockingMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
- // already cloned. In legacy mode, the only case where this isn't true is
- // when DevTools forces us to display a fallback; we skip the first render
- // pass entirely and go straight to rendering the fallback. (In Concurrent
- // Mode, SuspenseList can also trigger this scenario, but this is a legacy-
- // only codepath.)
- workInProgress.child !== currentPrimaryChildFragment) {
- var progressedPrimaryFragment = workInProgress.child;
- primaryChildFragment = progressedPrimaryFragment;
- primaryChildFragment.childLanes = NoLanes;
- primaryChildFragment.pendingProps = primaryChildProps;
-
- if ( workInProgress.mode & ProfileMode) {
- // Reset the durations from the first pass so they aren't included in the
- // final amounts. This seems counterintuitive, since we're intentionally
- // not measuring part of the render phase, but this makes it match what we
- // do in Concurrent Mode.
- primaryChildFragment.actualDuration = 0;
- primaryChildFragment.actualStartTime = -1;
- primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
- primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
- } // The fallback fiber was added as a deletion effect during the first pass.
- // However, since we're going to remain on the fallback, we no longer want
- // to delete it. So we need to remove it from the list. Deletions are stored
- // on the same list as effects. We want to keep the effects from the primary
- // tree. So we copy the primary child fragment's effect list, which does not
- // include the fallback deletion effect.
-
-
- var progressedLastEffect = primaryChildFragment.lastEffect;
-
- if (progressedLastEffect !== null) {
- workInProgress.firstEffect = primaryChildFragment.firstEffect;
- workInProgress.lastEffect = progressedLastEffect;
- progressedLastEffect.nextEffect = null;
- } else {
- // TODO: Reset this somewhere else? Lol legacy mode is so weird.
- workInProgress.firstEffect = workInProgress.lastEffect = null;
- }
- } else {
- primaryChildFragment = createWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);
- }
-
- var fallbackChildFragment;
-
- if (currentFallbackChildFragment !== null) {
- fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
- } else {
- fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes, null); // Needs a placement effect because the parent (the Suspense boundary) already
- // mounted but this is a new fiber.
-
- fallbackChildFragment.flags |= Placement;
- }
-
- fallbackChildFragment.return = workInProgress;
- primaryChildFragment.return = workInProgress;
- primaryChildFragment.sibling = fallbackChildFragment;
- workInProgress.child = primaryChildFragment;
- return fallbackChildFragment;
- }
-
- function scheduleWorkOnFiber(fiber, renderLanes) {
- fiber.lanes = mergeLanes(fiber.lanes, renderLanes);
- var alternate = fiber.alternate;
-
- if (alternate !== null) {
- alternate.lanes = mergeLanes(alternate.lanes, renderLanes);
- }
-
- scheduleWorkOnParentPath(fiber.return, renderLanes);
- }
-
- function propagateSuspenseContextChange(workInProgress, firstChild, renderLanes) {
- // Mark any Suspense boundaries with fallbacks as having work to do.
- // If they were previously forced into fallbacks, they may now be able
- // to unblock.
- var node = firstChild;
-
- while (node !== null) {
- if (node.tag === SuspenseComponent) {
- var state = node.memoizedState;
-
- if (state !== null) {
- scheduleWorkOnFiber(node, renderLanes);
- }
- } else if (node.tag === SuspenseListComponent) {
- // If the tail is hidden there might not be an Suspense boundaries
- // to schedule work on. In this case we have to schedule it on the
- // list itself.
- // We don't have to traverse to the children of the list since
- // the list will propagate the change when it rerenders.
- scheduleWorkOnFiber(node, renderLanes);
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === workInProgress) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === workInProgress) {
- return;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-
- function findLastContentRow(firstChild) {
- // This is going to find the last row among these children that is already
- // showing content on the screen, as opposed to being in fallback state or
- // new. If a row has multiple Suspense boundaries, any of them being in the
- // fallback state, counts as the whole row being in a fallback state.
- // Note that the "rows" will be workInProgress, but any nested children
- // will still be current since we haven't rendered them yet. The mounted
- // order may not be the same as the new order. We use the new order.
- var row = firstChild;
- var lastContentRow = null;
-
- while (row !== null) {
- var currentRow = row.alternate; // New rows can't be content rows.
-
- if (currentRow !== null && findFirstSuspended(currentRow) === null) {
- lastContentRow = row;
- }
-
- row = row.sibling;
- }
-
- return lastContentRow;
- }
-
- function validateRevealOrder(revealOrder) {
- {
- if (revealOrder !== undefined && revealOrder !== 'forwards' && revealOrder !== 'backwards' && revealOrder !== 'together' && !didWarnAboutRevealOrder[revealOrder]) {
- didWarnAboutRevealOrder[revealOrder] = true;
-
- if (typeof revealOrder === 'string') {
- switch (revealOrder.toLowerCase()) {
- case 'together':
- case 'forwards':
- case 'backwards':
- {
- error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());
-
- break;
- }
-
- case 'forward':
- case 'backward':
- {
- error('"%s" is not a valid value for revealOrder on <SuspenseList />. ' + 'React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());
-
- break;
- }
-
- default:
- error('"%s" is not a supported revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
-
- break;
- }
- } else {
- error('%s is not a supported value for revealOrder on <SuspenseList />. ' + 'Did you mean "together", "forwards" or "backwards"?', revealOrder);
- }
- }
- }
- }
-
- function validateTailOptions(tailMode, revealOrder) {
- {
- if (tailMode !== undefined && !didWarnAboutTailOptions[tailMode]) {
- if (tailMode !== 'collapsed' && tailMode !== 'hidden') {
- didWarnAboutTailOptions[tailMode] = true;
-
- error('"%s" is not a supported value for tail on <SuspenseList />. ' + 'Did you mean "collapsed" or "hidden"?', tailMode);
- } else if (revealOrder !== 'forwards' && revealOrder !== 'backwards') {
- didWarnAboutTailOptions[tailMode] = true;
-
- error('<SuspenseList tail="%s" /> is only valid if revealOrder is ' + '"forwards" or "backwards". ' + 'Did you mean to specify revealOrder="forwards"?', tailMode);
- }
- }
- }
- }
-
- function validateSuspenseListNestedChild(childSlot, index) {
- {
- var isArray = Array.isArray(childSlot);
- var isIterable = !isArray && typeof getIteratorFn(childSlot) === 'function';
-
- if (isArray || isIterable) {
- var type = isArray ? 'array' : 'iterable';
-
- error('A nested %s was passed to row #%s in <SuspenseList />. Wrap it in ' + 'an additional SuspenseList to configure its revealOrder: ' + '<SuspenseList revealOrder=...> ... ' + '<SuspenseList revealOrder=...>{%s}</SuspenseList> ... ' + '</SuspenseList>', type, index, type);
-
- return false;
- }
- }
-
- return true;
- }
-
- function validateSuspenseListChildren(children, revealOrder) {
- {
- if ((revealOrder === 'forwards' || revealOrder === 'backwards') && children !== undefined && children !== null && children !== false) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- if (!validateSuspenseListNestedChild(children[i], i)) {
- return;
- }
- }
- } else {
- var iteratorFn = getIteratorFn(children);
-
- if (typeof iteratorFn === 'function') {
- var childrenIterator = iteratorFn.call(children);
-
- if (childrenIterator) {
- var step = childrenIterator.next();
- var _i = 0;
-
- for (; !step.done; step = childrenIterator.next()) {
- if (!validateSuspenseListNestedChild(step.value, _i)) {
- return;
- }
-
- _i++;
- }
- }
- } else {
- error('A single row was passed to a <SuspenseList revealOrder="%s" />. ' + 'This is not useful since it needs multiple rows. ' + 'Did you mean to pass multiple children or an array?', revealOrder);
- }
- }
- }
- }
- }
-
- function initSuspenseListRenderState(workInProgress, isBackwards, tail, lastContentRow, tailMode, lastEffectBeforeRendering) {
- var renderState = workInProgress.memoizedState;
-
- if (renderState === null) {
- workInProgress.memoizedState = {
- isBackwards: isBackwards,
- rendering: null,
- renderingStartTime: 0,
- last: lastContentRow,
- tail: tail,
- tailMode: tailMode,
- lastEffect: lastEffectBeforeRendering
- };
- } else {
- // We can reuse the existing object from previous renders.
- renderState.isBackwards = isBackwards;
- renderState.rendering = null;
- renderState.renderingStartTime = 0;
- renderState.last = lastContentRow;
- renderState.tail = tail;
- renderState.tailMode = tailMode;
- renderState.lastEffect = lastEffectBeforeRendering;
- }
- } // This can end up rendering this component multiple passes.
- // The first pass splits the children fibers into two sets. A head and tail.
- // We first render the head. If anything is in fallback state, we do another
- // pass through beginWork to rerender all children (including the tail) with
- // the force suspend context. If the first render didn't have anything in
- // in fallback state. Then we render each row in the tail one-by-one.
- // That happens in the completeWork phase without going back to beginWork.
-
-
- function updateSuspenseListComponent(current, workInProgress, renderLanes) {
- var nextProps = workInProgress.pendingProps;
- var revealOrder = nextProps.revealOrder;
- var tailMode = nextProps.tail;
- var newChildren = nextProps.children;
- validateRevealOrder(revealOrder);
- validateTailOptions(tailMode, revealOrder);
- validateSuspenseListChildren(newChildren, revealOrder);
- reconcileChildren(current, workInProgress, newChildren, renderLanes);
- var suspenseContext = suspenseStackCursor.current;
- var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
-
- if (shouldForceFallback) {
- suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- workInProgress.flags |= DidCapture;
- } else {
- var didSuspendBefore = current !== null && (current.flags & DidCapture) !== NoFlags;
-
- if (didSuspendBefore) {
- // If we previously forced a fallback, we need to schedule work
- // on any nested boundaries to let them know to try to render
- // again. This is the same as context updating.
- propagateSuspenseContextChange(workInProgress, workInProgress.child, renderLanes);
- }
-
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- }
-
- pushSuspenseContext(workInProgress, suspenseContext);
-
- if ((workInProgress.mode & BlockingMode) === NoMode) {
- // In legacy mode, SuspenseList doesn't work so we just
- // use make it a noop by treating it as the default revealOrder.
- workInProgress.memoizedState = null;
- } else {
- switch (revealOrder) {
- case 'forwards':
- {
- var lastContentRow = findLastContentRow(workInProgress.child);
- var tail;
-
- if (lastContentRow === null) {
- // The whole list is part of the tail.
- // TODO: We could fast path by just rendering the tail now.
- tail = workInProgress.child;
- workInProgress.child = null;
- } else {
- // Disconnect the tail rows after the content row.
- // We're going to render them separately later.
- tail = lastContentRow.sibling;
- lastContentRow.sibling = null;
- }
-
- initSuspenseListRenderState(workInProgress, false, // isBackwards
- tail, lastContentRow, tailMode, workInProgress.lastEffect);
- break;
- }
-
- case 'backwards':
- {
- // We're going to find the first row that has existing content.
- // At the same time we're going to reverse the list of everything
- // we pass in the meantime. That's going to be our tail in reverse
- // order.
- var _tail = null;
- var row = workInProgress.child;
- workInProgress.child = null;
-
- while (row !== null) {
- var currentRow = row.alternate; // New rows can't be content rows.
-
- if (currentRow !== null && findFirstSuspended(currentRow) === null) {
- // This is the beginning of the main content.
- workInProgress.child = row;
- break;
- }
-
- var nextRow = row.sibling;
- row.sibling = _tail;
- _tail = row;
- row = nextRow;
- } // TODO: If workInProgress.child is null, we can continue on the tail immediately.
-
-
- initSuspenseListRenderState(workInProgress, true, // isBackwards
- _tail, null, // last
- tailMode, workInProgress.lastEffect);
- break;
- }
-
- case 'together':
- {
- initSuspenseListRenderState(workInProgress, false, // isBackwards
- null, // tail
- null, // last
- undefined, workInProgress.lastEffect);
- break;
- }
-
- default:
- {
- // The default reveal order is the same as not having
- // a boundary.
- workInProgress.memoizedState = null;
- }
- }
- }
-
- return workInProgress.child;
- }
-
- function updatePortalComponent(current, workInProgress, renderLanes) {
- pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
- var nextChildren = workInProgress.pendingProps;
-
- if (current === null) {
- // Portals are special because we don't append the children during mount
- // but at commit. Therefore we need to track insertions which the normal
- // flow doesn't do during mount. This doesn't happen at the root because
- // the root always starts with a "current" with a null child.
- // TODO: Consider unifying this with how the root works.
- workInProgress.child = reconcileChildFibers(workInProgress, null, nextChildren, renderLanes);
- } else {
- reconcileChildren(current, workInProgress, nextChildren, renderLanes);
- }
-
- return workInProgress.child;
- }
-
- var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
-
- function updateContextProvider(current, workInProgress, renderLanes) {
- var providerType = workInProgress.type;
- var context = providerType._context;
- var newProps = workInProgress.pendingProps;
- var oldProps = workInProgress.memoizedProps;
- var newValue = newProps.value;
-
- {
- if (!('value' in newProps)) {
- if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
- hasWarnedAboutUsingNoValuePropOnContextProvider = true;
-
- error('The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?');
- }
- }
-
- var providerPropTypes = workInProgress.type.propTypes;
-
- if (providerPropTypes) {
- checkPropTypes(providerPropTypes, newProps, 'prop', 'Context.Provider');
- }
- }
-
- pushProvider(workInProgress, newValue);
-
- if (oldProps !== null) {
- var oldValue = oldProps.value;
- var changedBits = calculateChangedBits(context, newValue, oldValue);
-
- if (changedBits === 0) {
- // No change. Bailout early if children are the same.
- if (oldProps.children === newProps.children && !hasContextChanged()) {
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- }
- } else {
- // The context value changed. Search for matching consumers and schedule
- // them to update.
- propagateContextChange(workInProgress, context, changedBits, renderLanes);
- }
- }
-
- var newChildren = newProps.children;
- reconcileChildren(current, workInProgress, newChildren, renderLanes);
- return workInProgress.child;
- }
-
- var hasWarnedAboutUsingContextAsConsumer = false;
-
- function updateContextConsumer(current, workInProgress, renderLanes) {
- var context = workInProgress.type; // The logic below for Context differs depending on PROD or DEV mode. In
- // DEV mode, we create a separate object for Context.Consumer that acts
- // like a proxy to Context. This proxy object adds unnecessary code in PROD
- // so we use the old behaviour (Context.Consumer references Context) to
- // reduce size and overhead. The separate object references context via
- // a property called "_context", which also gives us the ability to check
- // in DEV mode if this property exists or not and warn if it does not.
-
- {
- if (context._context === undefined) {
- // This may be because it's a Context (rather than a Consumer).
- // Or it may be because it's older React where they're the same thing.
- // We only want to warn if we're sure it's a new React.
- if (context !== context.Consumer) {
- if (!hasWarnedAboutUsingContextAsConsumer) {
- hasWarnedAboutUsingContextAsConsumer = true;
-
- error('Rendering <Context> directly is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
- }
- } else {
- context = context._context;
- }
- }
-
- var newProps = workInProgress.pendingProps;
- var render = newProps.children;
-
- {
- if (typeof render !== 'function') {
- 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.');
- }
- }
-
- prepareToReadContext(workInProgress, renderLanes);
- var newValue = readContext(context, newProps.unstable_observedBits);
- var newChildren;
-
- {
- ReactCurrentOwner$1.current = workInProgress;
- setIsRendering(true);
- newChildren = render(newValue);
- setIsRendering(false);
- } // React DevTools reads this flag.
-
-
- workInProgress.flags |= PerformedWork;
- reconcileChildren(current, workInProgress, newChildren, renderLanes);
- return workInProgress.child;
- }
-
- function markWorkInProgressReceivedUpdate() {
- didReceiveUpdate = true;
- }
-
- function bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {
- if (current !== null) {
- // Reuse previous dependencies
- workInProgress.dependencies = current.dependencies;
- }
-
- {
- // Don't update "base" render times for bailouts.
- stopProfilerTimerIfRunning();
- }
-
- markSkippedUpdateLanes(workInProgress.lanes); // Check if the children have any pending work.
-
- if (!includesSomeLane(renderLanes, workInProgress.childLanes)) {
- // The children don't have any work either. We can skip them.
- // TODO: Once we add back resuming, we should check if the children are
- // a work-in-progress set. If so, we need to transfer their effects.
- return null;
- } else {
- // This fiber doesn't have work, but its subtree does. Clone the child
- // fibers and continue.
- cloneChildFibers(current, workInProgress);
- return workInProgress.child;
- }
- }
-
- function remountFiber(current, oldWorkInProgress, newWorkInProgress) {
- {
- var returnFiber = oldWorkInProgress.return;
-
- if (returnFiber === null) {
- throw new Error('Cannot swap the root fiber.');
- } // Disconnect from the old current.
- // It will get deleted.
-
-
- current.alternate = null;
- oldWorkInProgress.alternate = null; // Connect to the new tree.
-
- newWorkInProgress.index = oldWorkInProgress.index;
- newWorkInProgress.sibling = oldWorkInProgress.sibling;
- newWorkInProgress.return = oldWorkInProgress.return;
- newWorkInProgress.ref = oldWorkInProgress.ref; // Replace the child/sibling pointers above it.
-
- if (oldWorkInProgress === returnFiber.child) {
- returnFiber.child = newWorkInProgress;
- } else {
- var prevSibling = returnFiber.child;
-
- if (prevSibling === null) {
- throw new Error('Expected parent to have a child.');
- }
-
- while (prevSibling.sibling !== oldWorkInProgress) {
- prevSibling = prevSibling.sibling;
-
- if (prevSibling === null) {
- throw new Error('Expected to find the previous sibling.');
- }
- }
-
- prevSibling.sibling = newWorkInProgress;
- } // Delete the old fiber and place the new one.
- // Since the old fiber is disconnected, we have to schedule it manually.
-
-
- var last = returnFiber.lastEffect;
-
- if (last !== null) {
- last.nextEffect = current;
- returnFiber.lastEffect = current;
- } else {
- returnFiber.firstEffect = returnFiber.lastEffect = current;
- }
-
- current.nextEffect = null;
- current.flags = Deletion;
- newWorkInProgress.flags |= Placement; // Restart work from the new fiber.
-
- return newWorkInProgress;
- }
- }
-
- function beginWork(current, workInProgress, renderLanes) {
- var updateLanes = workInProgress.lanes;
-
- {
- if (workInProgress._debugNeedsRemount && current !== null) {
- // This will restart the begin phase with a new fiber.
- return remountFiber(current, workInProgress, createFiberFromTypeAndProps(workInProgress.type, workInProgress.key, workInProgress.pendingProps, workInProgress._debugOwner || null, workInProgress.mode, workInProgress.lanes));
- }
- }
-
- if (current !== null) {
- var oldProps = current.memoizedProps;
- var newProps = workInProgress.pendingProps;
-
- if (oldProps !== newProps || hasContextChanged() || ( // Force a re-render if the implementation changed due to hot reload:
- workInProgress.type !== current.type )) {
- // If props or context changed, mark the fiber as having performed work.
- // This may be unset if the props are determined to be equal later (memo).
- didReceiveUpdate = true;
- } else if (!includesSomeLane(renderLanes, updateLanes)) {
- didReceiveUpdate = false; // This fiber does not have any pending work. Bailout without entering
- // the begin phase. There's still some bookkeeping we that needs to be done
- // in this optimized path, mostly pushing stuff onto the stack.
-
- switch (workInProgress.tag) {
- case HostRoot:
- pushHostRootContext(workInProgress);
- resetHydrationState();
- break;
-
- case HostComponent:
- pushHostContext(workInProgress);
- break;
-
- case ClassComponent:
- {
- var Component = workInProgress.type;
-
- if (isContextProvider(Component)) {
- pushContextProvider(workInProgress);
- }
-
- break;
- }
-
- case HostPortal:
- pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
- break;
-
- case ContextProvider:
- {
- var newValue = workInProgress.memoizedProps.value;
- pushProvider(workInProgress, newValue);
- break;
- }
-
- case Profiler:
- {
- // Profiler should only call onRender when one of its descendants actually rendered.
- var hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
-
- if (hasChildWork) {
- workInProgress.flags |= Update;
- } // Reset effect durations for the next eventual effect phase.
- // These are reset during render to allow the DevTools commit hook a chance to read them,
-
-
- var stateNode = workInProgress.stateNode;
- stateNode.effectDuration = 0;
- stateNode.passiveEffectDuration = 0;
- }
-
- break;
-
- case SuspenseComponent:
- {
- var state = workInProgress.memoizedState;
-
- if (state !== null) {
- // whether to retry the primary children, or to skip over it and
- // go straight to the fallback. Check the priority of the primary
- // child fragment.
-
-
- var primaryChildFragment = workInProgress.child;
- var primaryChildLanes = primaryChildFragment.childLanes;
-
- if (includesSomeLane(renderLanes, primaryChildLanes)) {
- // The primary children have pending work. Use the normal path
- // to attempt to render the primary children again.
- return updateSuspenseComponent(current, workInProgress, renderLanes);
- } else {
- // The primary child fragment does not have pending work marked
- // on it
- pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current)); // The primary children do not have pending work with sufficient
- // priority. Bailout.
-
- var child = bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
-
- if (child !== null) {
- // The fallback children have pending work. Skip over the
- // primary children and work on the fallback.
- return child.sibling;
- } else {
- return null;
- }
- }
- } else {
- pushSuspenseContext(workInProgress, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
- }
-
- break;
- }
-
- case SuspenseListComponent:
- {
- var didSuspendBefore = (current.flags & DidCapture) !== NoFlags;
-
- var _hasChildWork = includesSomeLane(renderLanes, workInProgress.childLanes);
-
- if (didSuspendBefore) {
- if (_hasChildWork) {
- // If something was in fallback state last time, and we have all the
- // same children then we're still in progressive loading state.
- // Something might get unblocked by state updates or retries in the
- // tree which will affect the tail. So we need to use the normal
- // path to compute the correct tail.
- return updateSuspenseListComponent(current, workInProgress, renderLanes);
- } // If none of the children had any work, that means that none of
- // them got retried so they'll still be blocked in the same way
- // as before. We can fast bail out.
-
-
- workInProgress.flags |= DidCapture;
- } // If nothing suspended before and we're rendering the same children,
- // then the tail doesn't matter. Anything new that suspends will work
- // in the "together" mode, so we can continue from the state we had.
-
-
- var renderState = workInProgress.memoizedState;
-
- if (renderState !== null) {
- // Reset to the "together" mode in case we've started a different
- // update in the past but didn't complete it.
- renderState.rendering = null;
- renderState.tail = null;
- renderState.lastEffect = null;
- }
-
- pushSuspenseContext(workInProgress, suspenseStackCursor.current);
-
- if (_hasChildWork) {
- break;
- } else {
- // If none of the children had any work, that means that none of
- // them got retried so they'll still be blocked in the same way
- // as before. We can fast bail out.
- return null;
- }
- }
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- {
- // Need to check if the tree still needs to be deferred. This is
- // almost identical to the logic used in the normal update path,
- // so we'll just enter that. The only difference is we'll bail out
- // at the next level instead of this one, because the child props
- // have not changed. Which is fine.
- // TODO: Probably should refactor `beginWork` to split the bailout
- // path from the normal path. I'm tempted to do a labeled break here
- // but I won't :)
- workInProgress.lanes = NoLanes;
- return updateOffscreenComponent(current, workInProgress, renderLanes);
- }
- }
-
- return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);
- } else {
- if ((current.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
- // This is a special case that only exists for legacy mode.
- // See https://github.com/facebook/react/pull/19216.
- didReceiveUpdate = true;
- } else {
- // An update was scheduled on this fiber, but there are no new props
- // nor legacy context. Set this to false. If an update queue or context
- // consumer produces a changed value, it will set this to true. Otherwise,
- // the component will assume the children have not changed and bail out.
- didReceiveUpdate = false;
- }
- }
- } else {
- didReceiveUpdate = false;
- } // Before entering the begin phase, clear pending update priority.
- // TODO: This assumes that we're about to evaluate the component and process
- // the update queue. However, there's an exception: SimpleMemoComponent
- // sometimes bails out later in the begin phase. This indicates that we should
- // move this assignment out of the common path and into each branch.
-
-
- workInProgress.lanes = NoLanes;
-
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- {
- return mountIndeterminateComponent(current, workInProgress, workInProgress.type, renderLanes);
- }
-
- case LazyComponent:
- {
- var elementType = workInProgress.elementType;
- return mountLazyComponent(current, workInProgress, elementType, updateLanes, renderLanes);
- }
-
- case FunctionComponent:
- {
- var _Component = workInProgress.type;
- var unresolvedProps = workInProgress.pendingProps;
- var resolvedProps = workInProgress.elementType === _Component ? unresolvedProps : resolveDefaultProps(_Component, unresolvedProps);
- return updateFunctionComponent(current, workInProgress, _Component, resolvedProps, renderLanes);
- }
-
- case ClassComponent:
- {
- var _Component2 = workInProgress.type;
- var _unresolvedProps = workInProgress.pendingProps;
-
- var _resolvedProps = workInProgress.elementType === _Component2 ? _unresolvedProps : resolveDefaultProps(_Component2, _unresolvedProps);
-
- return updateClassComponent(current, workInProgress, _Component2, _resolvedProps, renderLanes);
- }
-
- case HostRoot:
- return updateHostRoot(current, workInProgress, renderLanes);
-
- case HostComponent:
- return updateHostComponent(current, workInProgress, renderLanes);
-
- case HostText:
- return updateHostText(current, workInProgress);
-
- case SuspenseComponent:
- return updateSuspenseComponent(current, workInProgress, renderLanes);
-
- case HostPortal:
- return updatePortalComponent(current, workInProgress, renderLanes);
-
- case ForwardRef:
- {
- var type = workInProgress.type;
- var _unresolvedProps2 = workInProgress.pendingProps;
-
- var _resolvedProps2 = workInProgress.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
-
- return updateForwardRef(current, workInProgress, type, _resolvedProps2, renderLanes);
- }
-
- case Fragment:
- return updateFragment(current, workInProgress, renderLanes);
-
- case Mode:
- return updateMode(current, workInProgress, renderLanes);
-
- case Profiler:
- return updateProfiler(current, workInProgress, renderLanes);
-
- case ContextProvider:
- return updateContextProvider(current, workInProgress, renderLanes);
-
- case ContextConsumer:
- return updateContextConsumer(current, workInProgress, renderLanes);
-
- case MemoComponent:
- {
- var _type2 = workInProgress.type;
- var _unresolvedProps3 = workInProgress.pendingProps; // Resolve outer props first, then resolve inner props.
-
- var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
-
- {
- if (workInProgress.type !== workInProgress.elementType) {
- var outerPropTypes = _type2.propTypes;
-
- if (outerPropTypes) {
- checkPropTypes(outerPropTypes, _resolvedProps3, // Resolved for outer only
- 'prop', getComponentName(_type2));
- }
- }
- }
-
- _resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
- return updateMemoComponent(current, workInProgress, _type2, _resolvedProps3, updateLanes, renderLanes);
- }
-
- case SimpleMemoComponent:
- {
- return updateSimpleMemoComponent(current, workInProgress, workInProgress.type, workInProgress.pendingProps, updateLanes, renderLanes);
- }
-
- case IncompleteClassComponent:
- {
- var _Component3 = workInProgress.type;
- var _unresolvedProps4 = workInProgress.pendingProps;
-
- var _resolvedProps4 = workInProgress.elementType === _Component3 ? _unresolvedProps4 : resolveDefaultProps(_Component3, _unresolvedProps4);
-
- return mountIncompleteClassComponent(current, workInProgress, _Component3, _resolvedProps4, renderLanes);
- }
-
- case SuspenseListComponent:
- {
- return updateSuspenseListComponent(current, workInProgress, renderLanes);
- }
-
- case FundamentalComponent:
- {
-
- break;
- }
-
- case ScopeComponent:
- {
-
- break;
- }
-
- case Block:
- {
-
- break;
- }
-
- case OffscreenComponent:
- {
- return updateOffscreenComponent(current, workInProgress, renderLanes);
- }
-
- case LegacyHiddenComponent:
- {
- return updateLegacyHiddenComponent(current, workInProgress, renderLanes);
- }
- }
-
- {
- {
- throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-
- function markUpdate(workInProgress) {
- // Tag the fiber with an update effect. This turns a Placement into
- // a PlacementAndUpdate.
- workInProgress.flags |= Update;
- }
-
- function markRef$1(workInProgress) {
- workInProgress.flags |= Ref;
- }
-
- var appendAllChildren;
- var updateHostContainer;
- var updateHostComponent$1;
- var updateHostText$1;
-
- {
- // Mutation mode
- appendAllChildren = function (parent, workInProgress, needsVisibilityToggle, isHidden) {
- // We only have the top Fiber that was created but we need recurse down its
- // children to find all the terminal nodes.
- var node = workInProgress.child;
-
- while (node !== null) {
- if (node.tag === HostComponent || node.tag === HostText) {
- appendInitialChild(parent, node.stateNode);
- } else if (node.tag === HostPortal) ; else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === workInProgress) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === workInProgress) {
- return;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- };
-
- updateHostContainer = function (workInProgress) {// Noop
- };
-
- updateHostComponent$1 = function (current, workInProgress, type, newProps, rootContainerInstance) {
- // If we have an alternate, that means this is an update and we need to
- // schedule a side-effect to do the updates.
- var oldProps = current.memoizedProps;
-
- if (oldProps === newProps) {
- // In mutation mode, this is sufficient for a bailout because
- // we won't touch this node even if children changed.
- return;
- } // If we get updated because one of our children updated, we don't
- // have newProps so we'll have to reuse them.
- // TODO: Split the update API as separate for the props vs. children.
- // Even better would be if children weren't special cased at all tho.
-
-
- var instance = workInProgress.stateNode;
- var currentHostContext = getHostContext(); // TODO: Experiencing an error where oldProps is null. Suggests a host
- // component is hitting the resume path. Figure out why. Possibly
- // related to `hidden`.
-
- var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext); // TODO: Type this specific to this type of component.
-
- workInProgress.updateQueue = updatePayload; // If the update payload indicates that there is a change or if there
- // is a new ref we mark this as an update. All the work is done in commitWork.
-
- if (updatePayload) {
- markUpdate(workInProgress);
- }
- };
-
- updateHostText$1 = function (current, workInProgress, oldText, newText) {
- // If the text differs, mark it as an update. All the work in done in commitWork.
- if (oldText !== newText) {
- markUpdate(workInProgress);
- }
- };
- }
-
- function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
- if (getIsHydrating()) {
- // If we're hydrating, we should consume as many items as we can
- // so we don't leave any behind.
- return;
- }
-
- switch (renderState.tailMode) {
- case 'hidden':
- {
- // Any insertions at the end of the tail list after this point
- // should be invisible. If there are already mounted boundaries
- // anything before them are not considered for collapsing.
- // Therefore we need to go through the whole tail to find if
- // there are any.
- var tailNode = renderState.tail;
- var lastTailNode = null;
-
- while (tailNode !== null) {
- if (tailNode.alternate !== null) {
- lastTailNode = tailNode;
- }
-
- tailNode = tailNode.sibling;
- } // Next we're simply going to delete all insertions after the
- // last rendered item.
-
-
- if (lastTailNode === null) {
- // All remaining items in the tail are insertions.
- renderState.tail = null;
- } else {
- // Detach the insertion after the last node that was already
- // inserted.
- lastTailNode.sibling = null;
- }
-
- break;
- }
-
- case 'collapsed':
- {
- // Any insertions at the end of the tail list after this point
- // should be invisible. If there are already mounted boundaries
- // anything before them are not considered for collapsing.
- // Therefore we need to go through the whole tail to find if
- // there are any.
- var _tailNode = renderState.tail;
- var _lastTailNode = null;
-
- while (_tailNode !== null) {
- if (_tailNode.alternate !== null) {
- _lastTailNode = _tailNode;
- }
-
- _tailNode = _tailNode.sibling;
- } // Next we're simply going to delete all insertions after the
- // last rendered item.
-
-
- if (_lastTailNode === null) {
- // All remaining items in the tail are insertions.
- if (!hasRenderedATailFallback && renderState.tail !== null) {
- // We suspended during the head. We want to show at least one
- // row at the tail. So we'll keep on and cut off the rest.
- renderState.tail.sibling = null;
- } else {
- renderState.tail = null;
- }
- } else {
- // Detach the insertion after the last node that was already
- // inserted.
- _lastTailNode.sibling = null;
- }
-
- break;
- }
- }
- }
-
- function completeWork(current, workInProgress, renderLanes) {
- var newProps = workInProgress.pendingProps;
-
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- case LazyComponent:
- case SimpleMemoComponent:
- case FunctionComponent:
- case ForwardRef:
- case Fragment:
- case Mode:
- case Profiler:
- case ContextConsumer:
- case MemoComponent:
- return null;
-
- case ClassComponent:
- {
- var Component = workInProgress.type;
-
- if (isContextProvider(Component)) {
- popContext(workInProgress);
- }
-
- return null;
- }
-
- case HostRoot:
- {
- popHostContainer(workInProgress);
- popTopLevelContextObject(workInProgress);
- resetWorkInProgressVersions();
- var fiberRoot = workInProgress.stateNode;
-
- if (fiberRoot.pendingContext) {
- fiberRoot.context = fiberRoot.pendingContext;
- fiberRoot.pendingContext = null;
- }
-
- if (current === null || current.child === null) {
- // If we hydrated, pop so that we can delete any remaining children
- // that weren't hydrated.
- var wasHydrated = popHydrationState(workInProgress);
-
- if (wasHydrated) {
- // If we hydrated, then we'll need to schedule an update for
- // the commit side-effects on the root.
- markUpdate(workInProgress);
- } else if (!fiberRoot.hydrate) {
- // Schedule an effect to clear this container at the start of the next commit.
- // This handles the case of React rendering into a container with previous children.
- // It's also safe to do for updates too, because current.child would only be null
- // if the previous render was null (so the the container would already be empty).
- workInProgress.flags |= Snapshot;
- }
- }
-
- updateHostContainer(workInProgress);
- return null;
- }
-
- case HostComponent:
- {
- popHostContext(workInProgress);
- var rootContainerInstance = getRootHostContainer();
- var type = workInProgress.type;
-
- if (current !== null && workInProgress.stateNode != null) {
- updateHostComponent$1(current, workInProgress, type, newProps, rootContainerInstance);
-
- if (current.ref !== workInProgress.ref) {
- markRef$1(workInProgress);
- }
- } else {
- if (!newProps) {
- if (!(workInProgress.stateNode !== null)) {
- {
- throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // This can happen when we abort work.
-
-
- return null;
- }
-
- var currentHostContext = getHostContext(); // TODO: Move createInstance to beginWork and keep it on a context
- // "stack" as the parent. Then append children as we go in beginWork
- // or completeWork depending on whether we want to add them top->down or
- // bottom->up. Top->down is faster in IE11.
-
- var _wasHydrated = popHydrationState(workInProgress);
-
- if (_wasHydrated) {
- // TODO: Move this and createInstance step into the beginPhase
- // to consolidate.
- if (prepareToHydrateHostInstance(workInProgress, rootContainerInstance, currentHostContext)) {
- // If changes to the hydrated node need to be applied at the
- // commit-phase we mark this as such.
- markUpdate(workInProgress);
- }
- } else {
- var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress);
- appendAllChildren(instance, workInProgress, false, false);
- workInProgress.stateNode = instance; // Certain renderers require commit-time effects for initial mount.
- // (eg DOM renderer supports auto-focus for certain elements).
- // Make sure such renderers get scheduled for later work.
-
- if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
- markUpdate(workInProgress);
- }
- }
-
- if (workInProgress.ref !== null) {
- // If there is a ref on a host node we need to schedule a callback
- markRef$1(workInProgress);
- }
- }
-
- return null;
- }
-
- case HostText:
- {
- var newText = newProps;
-
- if (current && workInProgress.stateNode != null) {
- var oldText = current.memoizedProps; // If we have an alternate, that means this is an update and we need
- // to schedule a side-effect to do the updates.
-
- updateHostText$1(current, workInProgress, oldText, newText);
- } else {
- if (typeof newText !== 'string') {
- if (!(workInProgress.stateNode !== null)) {
- {
- throw Error( "We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // This can happen when we abort work.
-
- }
-
- var _rootContainerInstance = getRootHostContainer();
-
- var _currentHostContext = getHostContext();
-
- var _wasHydrated2 = popHydrationState(workInProgress);
-
- if (_wasHydrated2) {
- if (prepareToHydrateHostTextInstance(workInProgress)) {
- markUpdate(workInProgress);
- }
- } else {
- workInProgress.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress);
- }
- }
-
- return null;
- }
-
- case SuspenseComponent:
- {
- popSuspenseContext(workInProgress);
- var nextState = workInProgress.memoizedState;
-
- if ((workInProgress.flags & DidCapture) !== NoFlags) {
- // Something suspended. Re-render with the fallback children.
- workInProgress.lanes = renderLanes; // Do not reset the effect list.
-
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
- transferActualDuration(workInProgress);
- }
-
- return workInProgress;
- }
-
- var nextDidTimeout = nextState !== null;
- var prevDidTimeout = false;
-
- if (current === null) {
- if (workInProgress.memoizedProps.fallback !== undefined) {
- popHydrationState(workInProgress);
- }
- } else {
- var prevState = current.memoizedState;
- prevDidTimeout = prevState !== null;
- }
-
- if (nextDidTimeout && !prevDidTimeout) {
- // If this subtreee is running in blocking mode we can suspend,
- // otherwise we won't suspend.
- // TODO: This will still suspend a synchronous tree if anything
- // in the concurrent tree already suspended during this render.
- // This is a known bug.
- if ((workInProgress.mode & BlockingMode) !== NoMode) {
- // TODO: Move this back to throwException because this is too late
- // if this is a large tree which is common for initial loads. We
- // don't know if we should restart a render or not until we get
- // this marker, and this is too late.
- // If this render already had a ping or lower pri updates,
- // and this is the first time we know we're going to suspend we
- // should be able to immediately restart from within throwException.
- var hasInvisibleChildContext = current === null && workInProgress.memoizedProps.unstable_avoidThisFallback !== true;
-
- if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
- // If this was in an invisible tree or a new render, then showing
- // this boundary is ok.
- renderDidSuspend();
- } else {
- // Otherwise, we're going to have to hide content so we should
- // suspend for longer if possible.
- renderDidSuspendDelayIfPossible();
- }
- }
- }
-
- {
- // TODO: Only schedule updates if these values are non equal, i.e. it changed.
- if (nextDidTimeout || prevDidTimeout) {
- // If this boundary just timed out, schedule an effect to attach a
- // retry listener to the promise. This flag is also used to hide the
- // primary children. In mutation mode, we also need the flag to
- // *unhide* children that were previously hidden, so check if this
- // is currently timed out, too.
- workInProgress.flags |= Update;
- }
- }
-
- return null;
- }
-
- case HostPortal:
- popHostContainer(workInProgress);
- updateHostContainer(workInProgress);
-
- if (current === null) {
- preparePortalMount(workInProgress.stateNode.containerInfo);
- }
-
- return null;
-
- case ContextProvider:
- // Pop provider fiber
- popProvider(workInProgress);
- return null;
-
- case IncompleteClassComponent:
- {
- // Same as class component case. I put it down here so that the tags are
- // sequential to ensure this switch is compiled to a jump table.
- var _Component = workInProgress.type;
-
- if (isContextProvider(_Component)) {
- popContext(workInProgress);
- }
-
- return null;
- }
-
- case SuspenseListComponent:
- {
- popSuspenseContext(workInProgress);
- var renderState = workInProgress.memoizedState;
-
- if (renderState === null) {
- // We're running in the default, "independent" mode.
- // We don't do anything in this mode.
- return null;
- }
-
- var didSuspendAlready = (workInProgress.flags & DidCapture) !== NoFlags;
- var renderedTail = renderState.rendering;
-
- if (renderedTail === null) {
- // We just rendered the head.
- if (!didSuspendAlready) {
- // This is the first pass. We need to figure out if anything is still
- // suspended in the rendered set.
- // If new content unsuspended, but there's still some content that
- // didn't. Then we need to do a second pass that forces everything
- // to keep showing their fallbacks.
- // We might be suspended if something in this render pass suspended, or
- // something in the previous committed pass suspended. Otherwise,
- // there's no chance so we can skip the expensive call to
- // findFirstSuspended.
- var cannotBeSuspended = renderHasNotSuspendedYet() && (current === null || (current.flags & DidCapture) === NoFlags);
-
- if (!cannotBeSuspended) {
- var row = workInProgress.child;
-
- while (row !== null) {
- var suspended = findFirstSuspended(row);
-
- if (suspended !== null) {
- didSuspendAlready = true;
- workInProgress.flags |= DidCapture;
- cutOffTailIfNeeded(renderState, false); // If this is a newly suspended tree, it might not get committed as
- // part of the second pass. In that case nothing will subscribe to
- // its thennables. Instead, we'll transfer its thennables to the
- // SuspenseList so that it can retry if they resolve.
- // There might be multiple of these in the list but since we're
- // going to wait for all of them anyway, it doesn't really matter
- // which ones gets to ping. In theory we could get clever and keep
- // track of how many dependencies remain but it gets tricky because
- // in the meantime, we can add/remove/change items and dependencies.
- // We might bail out of the loop before finding any but that
- // doesn't matter since that means that the other boundaries that
- // we did find already has their listeners attached.
-
- var newThennables = suspended.updateQueue;
-
- if (newThennables !== null) {
- workInProgress.updateQueue = newThennables;
- workInProgress.flags |= Update;
- } // Rerender the whole list, but this time, we'll force fallbacks
- // to stay in place.
- // Reset the effect list before doing the second pass since that's now invalid.
-
-
- if (renderState.lastEffect === null) {
- workInProgress.firstEffect = null;
- }
-
- workInProgress.lastEffect = renderState.lastEffect; // Reset the child fibers to their original state.
-
- resetChildFibers(workInProgress, renderLanes); // Set up the Suspense Context to force suspense and immediately
- // rerender the children.
-
- pushSuspenseContext(workInProgress, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
- return workInProgress.child;
- }
-
- row = row.sibling;
- }
- }
-
- if (renderState.tail !== null && now() > getRenderTargetTime()) {
- // We have already passed our CPU deadline but we still have rows
- // left in the tail. We'll just give up further attempts to render
- // the main content and only render fallbacks.
- workInProgress.flags |= DidCapture;
- didSuspendAlready = true;
- cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
- // to get it started back up to attempt the next item. While in terms
- // of priority this work has the same priority as this current render,
- // it's not part of the same transition once the transition has
- // committed. If it's sync, we still want to yield so that it can be
- // painted. Conceptually, this is really the same as pinging.
- // We can use any RetryLane even if it's the one currently rendering
- // since we're leaving it behind on this node.
-
- workInProgress.lanes = SomeRetryLane;
-
- {
- markSpawnedWork(SomeRetryLane);
- }
- }
- } else {
- cutOffTailIfNeeded(renderState, false);
- } // Next we're going to render the tail.
-
- } else {
- // Append the rendered row to the child list.
- if (!didSuspendAlready) {
- var _suspended = findFirstSuspended(renderedTail);
-
- if (_suspended !== null) {
- workInProgress.flags |= DidCapture;
- didSuspendAlready = true; // Ensure we transfer the update queue to the parent so that it doesn't
- // get lost if this row ends up dropped during a second pass.
-
- var _newThennables = _suspended.updateQueue;
-
- if (_newThennables !== null) {
- workInProgress.updateQueue = _newThennables;
- workInProgress.flags |= Update;
- }
-
- cutOffTailIfNeeded(renderState, true); // This might have been modified.
-
- if (renderState.tail === null && renderState.tailMode === 'hidden' && !renderedTail.alternate && !getIsHydrating() // We don't cut it if we're hydrating.
- ) {
- // We need to delete the row we just rendered.
- // Reset the effect list to what it was before we rendered this
- // child. The nested children have already appended themselves.
- var lastEffect = workInProgress.lastEffect = renderState.lastEffect; // Remove any effects that were appended after this point.
-
- if (lastEffect !== null) {
- lastEffect.nextEffect = null;
- } // We're done.
-
-
- return null;
- }
- } else if ( // The time it took to render last row is greater than the remaining
- // time we have to render. So rendering one more row would likely
- // exceed it.
- now() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes !== OffscreenLane) {
- // We have now passed our CPU deadline and we'll just give up further
- // attempts to render the main content and only render fallbacks.
- // The assumption is that this is usually faster.
- workInProgress.flags |= DidCapture;
- didSuspendAlready = true;
- cutOffTailIfNeeded(renderState, false); // Since nothing actually suspended, there will nothing to ping this
- // to get it started back up to attempt the next item. While in terms
- // of priority this work has the same priority as this current render,
- // it's not part of the same transition once the transition has
- // committed. If it's sync, we still want to yield so that it can be
- // painted. Conceptually, this is really the same as pinging.
- // We can use any RetryLane even if it's the one currently rendering
- // since we're leaving it behind on this node.
-
- workInProgress.lanes = SomeRetryLane;
-
- {
- markSpawnedWork(SomeRetryLane);
- }
- }
- }
-
- if (renderState.isBackwards) {
- // The effect list of the backwards tail will have been added
- // to the end. This breaks the guarantee that life-cycles fire in
- // sibling order but that isn't a strong guarantee promised by React.
- // Especially since these might also just pop in during future commits.
- // Append to the beginning of the list.
- renderedTail.sibling = workInProgress.child;
- workInProgress.child = renderedTail;
- } else {
- var previousSibling = renderState.last;
-
- if (previousSibling !== null) {
- previousSibling.sibling = renderedTail;
- } else {
- workInProgress.child = renderedTail;
- }
-
- renderState.last = renderedTail;
- }
- }
-
- if (renderState.tail !== null) {
- // We still have tail rows to render.
- // Pop a row.
- var next = renderState.tail;
- renderState.rendering = next;
- renderState.tail = next.sibling;
- renderState.lastEffect = workInProgress.lastEffect;
- renderState.renderingStartTime = now();
- next.sibling = null; // Restore the context.
- // TODO: We can probably just avoid popping it instead and only
- // setting it the first time we go from not suspended to suspended.
-
- var suspenseContext = suspenseStackCursor.current;
-
- if (didSuspendAlready) {
- suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
- } else {
- suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
- }
-
- pushSuspenseContext(workInProgress, suspenseContext); // Do a pass over the next row.
-
- return next;
- }
-
- return null;
- }
-
- case FundamentalComponent:
- {
-
- break;
- }
-
- case ScopeComponent:
- {
-
- break;
- }
-
- case Block:
-
- break;
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- {
- popRenderLanes(workInProgress);
-
- if (current !== null) {
- var _nextState = workInProgress.memoizedState;
- var _prevState = current.memoizedState;
- var prevIsHidden = _prevState !== null;
- var nextIsHidden = _nextState !== null;
-
- if (prevIsHidden !== nextIsHidden && newProps.mode !== 'unstable-defer-without-hiding') {
- workInProgress.flags |= Update;
- }
- }
-
- return null;
- }
- }
-
- {
- {
- throw Error( "Unknown unit of work tag (" + workInProgress.tag + "). This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-
- function unwindWork(workInProgress, renderLanes) {
- switch (workInProgress.tag) {
- case ClassComponent:
- {
- var Component = workInProgress.type;
-
- if (isContextProvider(Component)) {
- popContext(workInProgress);
- }
-
- var flags = workInProgress.flags;
-
- if (flags & ShouldCapture) {
- workInProgress.flags = flags & ~ShouldCapture | DidCapture;
-
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
- transferActualDuration(workInProgress);
- }
-
- return workInProgress;
- }
-
- return null;
- }
-
- case HostRoot:
- {
- popHostContainer(workInProgress);
- popTopLevelContextObject(workInProgress);
- resetWorkInProgressVersions();
- var _flags = workInProgress.flags;
-
- if (!((_flags & DidCapture) === NoFlags)) {
- {
- throw Error( "The root failed to unmount after an error. This is likely a bug in React. Please file an issue." );
- }
- }
-
- workInProgress.flags = _flags & ~ShouldCapture | DidCapture;
- return workInProgress;
- }
-
- case HostComponent:
- {
- // TODO: popHydrationState
- popHostContext(workInProgress);
- return null;
- }
-
- case SuspenseComponent:
- {
- popSuspenseContext(workInProgress);
-
- var _flags2 = workInProgress.flags;
-
- if (_flags2 & ShouldCapture) {
- workInProgress.flags = _flags2 & ~ShouldCapture | DidCapture; // Captured a suspense effect. Re-render the boundary.
-
- if ( (workInProgress.mode & ProfileMode) !== NoMode) {
- transferActualDuration(workInProgress);
- }
-
- return workInProgress;
- }
-
- return null;
- }
-
- case SuspenseListComponent:
- {
- popSuspenseContext(workInProgress); // SuspenseList doesn't actually catch anything. It should've been
- // caught by a nested boundary. If not, it should bubble through.
-
- return null;
- }
-
- case HostPortal:
- popHostContainer(workInProgress);
- return null;
-
- case ContextProvider:
- popProvider(workInProgress);
- return null;
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- popRenderLanes(workInProgress);
- return null;
-
- default:
- return null;
- }
- }
-
- function unwindInterruptedWork(interruptedWork) {
- switch (interruptedWork.tag) {
- case ClassComponent:
- {
- var childContextTypes = interruptedWork.type.childContextTypes;
-
- if (childContextTypes !== null && childContextTypes !== undefined) {
- popContext(interruptedWork);
- }
-
- break;
- }
-
- case HostRoot:
- {
- popHostContainer(interruptedWork);
- popTopLevelContextObject(interruptedWork);
- resetWorkInProgressVersions();
- break;
- }
-
- case HostComponent:
- {
- popHostContext(interruptedWork);
- break;
- }
-
- case HostPortal:
- popHostContainer(interruptedWork);
- break;
-
- case SuspenseComponent:
- popSuspenseContext(interruptedWork);
- break;
-
- case SuspenseListComponent:
- popSuspenseContext(interruptedWork);
- break;
-
- case ContextProvider:
- popProvider(interruptedWork);
- break;
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- popRenderLanes(interruptedWork);
- break;
- }
- }
-
- function createCapturedValue(value, source) {
- // If the value is an error, call this function immediately after it is thrown
- // so the stack is accurate.
- return {
- value: value,
- source: source,
- stack: getStackByFiberInDevAndProd(source)
- };
- }
-
- // This module is forked in different environments.
- // By default, return `true` to log errors to the console.
- // Forks can return `false` if this isn't desirable.
- function showErrorDialog(boundary, errorInfo) {
- return true;
- }
-
- function logCapturedError(boundary, errorInfo) {
- try {
- var logError = showErrorDialog(boundary, errorInfo); // Allow injected showErrorDialog() to prevent default console.error logging.
- // This enables renderers like ReactNative to better manage redbox behavior.
-
- if (logError === false) {
- return;
- }
-
- var error = errorInfo.value;
-
- if (true) {
- var source = errorInfo.source;
- var stack = errorInfo.stack;
- var componentStack = stack !== null ? stack : ''; // Browsers support silencing uncaught errors by calling
- // `preventDefault()` in window `error` handler.
- // We record this information as an expando on the error.
-
- if (error != null && error._suppressLogging) {
- if (boundary.tag === ClassComponent) {
- // The error is recoverable and was silenced.
- // Ignore it and don't print the stack addendum.
- // This is handy for testing error boundaries without noise.
- return;
- } // The error is fatal. Since the silencing might have
- // been accidental, we'll surface it anyway.
- // However, the browser would have silenced the original error
- // so we'll print it first, and then print the stack addendum.
-
-
- console['error'](error); // Don't transform to our wrapper
- // For a more detailed description of this block, see:
- // https://github.com/facebook/react/pull/13384
- }
-
- var componentName = source ? getComponentName(source.type) : null;
- var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : 'The above error occurred in one of your React components:';
- var errorBoundaryMessage;
- var errorBoundaryName = getComponentName(boundary.type);
-
- if (errorBoundaryName) {
- errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
- } else {
- errorBoundaryMessage = 'Consider adding an error boundary to your tree to customize error handling behavior.\n' + 'Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.';
- }
-
- var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage); // In development, we provide our own message with just the component stack.
- // We don't include the original error message and JS stack because the browser
- // has already printed it. Even if the application swallows the error, it is still
- // displayed by the browser thanks to the DEV-only fake event trick in ReactErrorUtils.
-
- console['error'](combinedMessage); // Don't transform to our wrapper
- } else {
- // In production, we print the error directly.
- // This will include the message, the JS stack, and anything the browser wants to show.
- // We pass the error object instead of custom message so that the browser displays the error natively.
- console['error'](error); // Don't transform to our wrapper
- }
- } catch (e) {
- // This method must not throw, or React internal state will get messed up.
- // If console.error is overridden, or logCapturedError() shows a dialog that throws,
- // we want to report this error outside of the normal stack as a last resort.
- // https://github.com/facebook/react/issues/13188
- setTimeout(function () {
- throw e;
- });
- }
- }
-
- var PossiblyWeakMap$1 = typeof WeakMap === 'function' ? WeakMap : Map;
-
- function createRootErrorUpdate(fiber, errorInfo, lane) {
- var update = createUpdate(NoTimestamp, lane); // Unmount the root by rendering null.
-
- update.tag = CaptureUpdate; // Caution: React DevTools currently depends on this property
- // being called "element".
-
- update.payload = {
- element: null
- };
- var error = errorInfo.value;
-
- update.callback = function () {
- onUncaughtError(error);
- logCapturedError(fiber, errorInfo);
- };
-
- return update;
- }
-
- function createClassErrorUpdate(fiber, errorInfo, lane) {
- var update = createUpdate(NoTimestamp, lane);
- update.tag = CaptureUpdate;
- var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
-
- if (typeof getDerivedStateFromError === 'function') {
- var error$1 = errorInfo.value;
-
- update.payload = function () {
- logCapturedError(fiber, errorInfo);
- return getDerivedStateFromError(error$1);
- };
- }
-
- var inst = fiber.stateNode;
-
- if (inst !== null && typeof inst.componentDidCatch === 'function') {
- update.callback = function callback() {
- {
- markFailedErrorBoundaryForHotReloading(fiber);
- }
-
- if (typeof getDerivedStateFromError !== 'function') {
- // To preserve the preexisting retry behavior of error boundaries,
- // we keep track of which ones already failed during this batch.
- // This gets reset before we yield back to the browser.
- // TODO: Warn in strict mode if getDerivedStateFromError is
- // not defined.
- markLegacyErrorBoundaryAsFailed(this); // Only log here if componentDidCatch is the only error boundary method defined
-
- logCapturedError(fiber, errorInfo);
- }
-
- var error$1 = errorInfo.value;
- var stack = errorInfo.stack;
- this.componentDidCatch(error$1, {
- componentStack: stack !== null ? stack : ''
- });
-
- {
- if (typeof getDerivedStateFromError !== 'function') {
- // If componentDidCatch is the only error boundary method defined,
- // then it needs to call setState to recover from errors.
- // If no state update is scheduled then the boundary will swallow the error.
- if (!includesSomeLane(fiber.lanes, SyncLane)) {
- error('%s: Error boundaries should implement getDerivedStateFromError(). ' + 'In that method, return a state update to display an error message or fallback UI.', getComponentName(fiber.type) || 'Unknown');
- }
- }
- }
- };
- } else {
- update.callback = function () {
- markFailedErrorBoundaryForHotReloading(fiber);
- };
- }
-
- return update;
- }
-
- function attachPingListener(root, wakeable, lanes) {
- // Attach a listener to the promise to "ping" the root and retry. But only if
- // one does not already exist for the lanes we're currently rendering (which
- // acts like a "thread ID" here).
- var pingCache = root.pingCache;
- var threadIDs;
-
- if (pingCache === null) {
- pingCache = root.pingCache = new PossiblyWeakMap$1();
- threadIDs = new Set();
- pingCache.set(wakeable, threadIDs);
- } else {
- threadIDs = pingCache.get(wakeable);
-
- if (threadIDs === undefined) {
- threadIDs = new Set();
- pingCache.set(wakeable, threadIDs);
- }
- }
-
- if (!threadIDs.has(lanes)) {
- // Memoize using the thread ID to prevent redundant listeners.
- threadIDs.add(lanes);
- var ping = pingSuspendedRoot.bind(null, root, wakeable, lanes);
- wakeable.then(ping, ping);
- }
- }
-
- function throwException(root, returnFiber, sourceFiber, value, rootRenderLanes) {
- // The source fiber did not complete.
- sourceFiber.flags |= Incomplete; // Its effect list is no longer valid.
-
- sourceFiber.firstEffect = sourceFiber.lastEffect = null;
-
- if (value !== null && typeof value === 'object' && typeof value.then === 'function') {
- // This is a wakeable.
- var wakeable = value;
-
- if ((sourceFiber.mode & BlockingMode) === NoMode) {
- // Reset the memoizedState to what it was before we attempted
- // to render it.
- var currentSource = sourceFiber.alternate;
-
- if (currentSource) {
- sourceFiber.updateQueue = currentSource.updateQueue;
- sourceFiber.memoizedState = currentSource.memoizedState;
- sourceFiber.lanes = currentSource.lanes;
- } else {
- sourceFiber.updateQueue = null;
- sourceFiber.memoizedState = null;
- }
- }
-
- var hasInvisibleParentBoundary = hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext); // Schedule the nearest Suspense to re-render the timed out view.
-
- var _workInProgress = returnFiber;
-
- do {
- if (_workInProgress.tag === SuspenseComponent && shouldCaptureSuspense(_workInProgress, hasInvisibleParentBoundary)) {
- // Found the nearest boundary.
- // Stash the promise on the boundary fiber. If the boundary times out, we'll
- // attach another listener to flip the boundary back to its normal state.
- var wakeables = _workInProgress.updateQueue;
-
- if (wakeables === null) {
- var updateQueue = new Set();
- updateQueue.add(wakeable);
- _workInProgress.updateQueue = updateQueue;
- } else {
- wakeables.add(wakeable);
- } // If the boundary is outside of blocking mode, we should *not*
- // suspend the commit. Pretend as if the suspended component rendered
- // null and keep rendering. In the commit phase, we'll schedule a
- // subsequent synchronous update to re-render the Suspense.
- //
- // Note: It doesn't matter whether the component that suspended was
- // inside a blocking mode tree. If the Suspense is outside of it, we
- // should *not* suspend the commit.
-
-
- if ((_workInProgress.mode & BlockingMode) === NoMode) {
- _workInProgress.flags |= DidCapture;
- sourceFiber.flags |= ForceUpdateForLegacySuspense; // We're going to commit this fiber even though it didn't complete.
- // But we shouldn't call any lifecycle methods or callbacks. Remove
- // all lifecycle effect tags.
-
- sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);
-
- if (sourceFiber.tag === ClassComponent) {
- var currentSourceFiber = sourceFiber.alternate;
-
- if (currentSourceFiber === null) {
- // This is a new mount. Change the tag so it's not mistaken for a
- // completed class component. For example, we should not call
- // componentWillUnmount if it is deleted.
- sourceFiber.tag = IncompleteClassComponent;
- } else {
- // When we try rendering again, we should not reuse the current fiber,
- // since it's known to be in an inconsistent state. Use a force update to
- // prevent a bail out.
- var update = createUpdate(NoTimestamp, SyncLane);
- update.tag = ForceUpdate;
- enqueueUpdate(sourceFiber, update);
- }
- } // The source fiber did not complete. Mark it with Sync priority to
- // indicate that it still has pending work.
-
-
- sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane); // Exit without suspending.
-
- return;
- } // Confirmed that the boundary is in a concurrent mode tree. Continue
- // with the normal suspend path.
- //
- // After this we'll use a set of heuristics to determine whether this
- // render pass will run to completion or restart or "suspend" the commit.
- // The actual logic for this is spread out in different places.
- //
- // This first principle is that if we're going to suspend when we complete
- // a root, then we should also restart if we get an update or ping that
- // might unsuspend it, and vice versa. The only reason to suspend is
- // because you think you might want to restart before committing. However,
- // it doesn't make sense to restart only while in the period we're suspended.
- //
- // Restarting too aggressively is also not good because it starves out any
- // intermediate loading state. So we use heuristics to determine when.
- // Suspense Heuristics
- //
- // If nothing threw a Promise or all the same fallbacks are already showing,
- // then don't suspend/restart.
- //
- // If this is an initial render of a new tree of Suspense boundaries and
- // those trigger a fallback, then don't suspend/restart. We want to ensure
- // that we can show the initial loading state as quickly as possible.
- //
- // If we hit a "Delayed" case, such as when we'd switch from content back into
- // a fallback, then we should always suspend/restart. Transitions apply
- // to this case. If none is defined, JND is used instead.
- //
- // If we're already showing a fallback and it gets "retried", allowing us to show
- // another level, but there's still an inner boundary that would show a fallback,
- // then we suspend/restart for 500ms since the last time we showed a fallback
- // anywhere in the tree. This effectively throttles progressive loading into a
- // consistent train of commits. This also gives us an opportunity to restart to
- // get to the completed state slightly earlier.
- //
- // If there's ambiguity due to batching it's resolved in preference of:
- // 1) "delayed", 2) "initial render", 3) "retry".
- //
- // We want to ensure that a "busy" state doesn't get force committed. We want to
- // ensure that new initial loading states can commit as soon as possible.
-
-
- attachPingListener(root, wakeable, rootRenderLanes);
- _workInProgress.flags |= ShouldCapture;
- _workInProgress.lanes = rootRenderLanes;
- return;
- } // This boundary already captured during this render. Continue to the next
- // boundary.
-
-
- _workInProgress = _workInProgress.return;
- } while (_workInProgress !== null); // No boundary was found. Fallthrough to error mode.
- // TODO: Use invariant so the message is stripped in prod?
-
-
- value = new Error((getComponentName(sourceFiber.type) || 'A React component') + ' suspended while rendering, but no fallback UI was specified.\n' + '\n' + 'Add a <Suspense fallback=...> component higher in the tree to ' + 'provide a loading indicator or placeholder to display.');
- } // We didn't find a boundary that could handle this type of exception. Start
- // over and traverse parent path again, this time treating the exception
- // as an error.
-
-
- renderDidError();
- value = createCapturedValue(value, sourceFiber);
- var workInProgress = returnFiber;
-
- do {
- switch (workInProgress.tag) {
- case HostRoot:
- {
- var _errorInfo = value;
- workInProgress.flags |= ShouldCapture;
- var lane = pickArbitraryLane(rootRenderLanes);
- workInProgress.lanes = mergeLanes(workInProgress.lanes, lane);
-
- var _update = createRootErrorUpdate(workInProgress, _errorInfo, lane);
-
- enqueueCapturedUpdate(workInProgress, _update);
- return;
- }
-
- case ClassComponent:
- // Capture and retry
- var errorInfo = value;
- var ctor = workInProgress.type;
- var instance = workInProgress.stateNode;
-
- if ((workInProgress.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === 'function' || instance !== null && typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance))) {
- workInProgress.flags |= ShouldCapture;
-
- var _lane = pickArbitraryLane(rootRenderLanes);
-
- workInProgress.lanes = mergeLanes(workInProgress.lanes, _lane); // Schedule the error boundary to re-render using updated state
-
- var _update2 = createClassErrorUpdate(workInProgress, errorInfo, _lane);
-
- enqueueCapturedUpdate(workInProgress, _update2);
- return;
- }
-
- break;
- }
-
- workInProgress = workInProgress.return;
- } while (workInProgress !== null);
- }
-
- var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
-
- {
- didWarnAboutUndefinedSnapshotBeforeUpdate = new Set();
- }
-
- var PossiblyWeakSet = typeof WeakSet === 'function' ? WeakSet : Set;
-
- var callComponentWillUnmountWithTimer = function (current, instance) {
- instance.props = current.memoizedProps;
- instance.state = current.memoizedState;
-
- {
- instance.componentWillUnmount();
- }
- }; // Capture errors so they don't interrupt unmounting.
-
-
- function safelyCallComponentWillUnmount(current, instance) {
- {
- invokeGuardedCallback(null, callComponentWillUnmountWithTimer, null, current, instance);
-
- if (hasCaughtError()) {
- var unmountError = clearCaughtError();
- captureCommitPhaseError(current, unmountError);
- }
- }
- }
-
- function safelyDetachRef(current) {
- var ref = current.ref;
-
- if (ref !== null) {
- if (typeof ref === 'function') {
- {
- invokeGuardedCallback(null, ref, null, null);
-
- if (hasCaughtError()) {
- var refError = clearCaughtError();
- captureCommitPhaseError(current, refError);
- }
- }
- } else {
- ref.current = null;
- }
- }
- }
-
- function safelyCallDestroy(current, destroy) {
- {
- invokeGuardedCallback(null, destroy, null);
-
- if (hasCaughtError()) {
- var error = clearCaughtError();
- captureCommitPhaseError(current, error);
- }
- }
- }
-
- function commitBeforeMutationLifeCycles(current, finishedWork) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- return;
- }
-
- case ClassComponent:
- {
- if (finishedWork.flags & Snapshot) {
- if (current !== null) {
- var prevProps = current.memoizedProps;
- var prevState = current.memoizedState;
- var instance = finishedWork.stateNode; // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
-
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
-
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'getSnapshotBeforeUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
-
- var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
-
- {
- var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
-
- if (snapshot === undefined && !didWarnSet.has(finishedWork.type)) {
- didWarnSet.add(finishedWork.type);
-
- error('%s.getSnapshotBeforeUpdate(): A snapshot value (or null) ' + 'must be returned. You have returned undefined.', getComponentName(finishedWork.type));
- }
- }
-
- instance.__reactInternalSnapshotBeforeUpdate = snapshot;
- }
- }
-
- return;
- }
-
- case HostRoot:
- {
- {
- if (finishedWork.flags & Snapshot) {
- var root = finishedWork.stateNode;
- clearContainer(root.containerInfo);
- }
- }
-
- return;
- }
-
- case HostComponent:
- case HostText:
- case HostPortal:
- case IncompleteClassComponent:
- // Nothing to do for these component types
- return;
- }
-
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-
- function commitHookEffectListUnmount(tag, finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
-
- do {
- if ((effect.tag & tag) === tag) {
- // Unmount
- var destroy = effect.destroy;
- effect.destroy = undefined;
-
- if (destroy !== undefined) {
- destroy();
- }
- }
-
- effect = effect.next;
- } while (effect !== firstEffect);
- }
- }
-
- function commitHookEffectListMount(tag, finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
-
- do {
- if ((effect.tag & tag) === tag) {
- // Mount
- var create = effect.create;
- effect.destroy = create();
-
- {
- var destroy = effect.destroy;
-
- if (destroy !== undefined && typeof destroy !== 'function') {
- var addendum = void 0;
-
- if (destroy === null) {
- addendum = ' You returned null. If your effect does not require clean ' + 'up, return undefined (or nothing).';
- } else if (typeof destroy.then === 'function') {
- addendum = '\n\nIt looks like you wrote useEffect(async () => ...) or returned a Promise. ' + 'Instead, write the async function inside your effect ' + 'and call it immediately:\n\n' + 'useEffect(() => {\n' + ' async function fetchData() {\n' + ' // You can await here\n' + ' const response = await MyAPI.getData(someId);\n' + ' // ...\n' + ' }\n' + ' fetchData();\n' + "}, [someId]); // Or [] if effect doesn't need props or state\n\n" + 'Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching';
- } else {
- addendum = ' You returned: ' + destroy;
- }
-
- error('An effect function must not return anything besides a function, ' + 'which is used for clean-up.%s', addendum);
- }
- }
- }
-
- effect = effect.next;
- } while (effect !== firstEffect);
- }
- }
-
- function schedulePassiveEffects(finishedWork) {
- var updateQueue = finishedWork.updateQueue;
- var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
-
- do {
- var _effect = effect,
- next = _effect.next,
- tag = _effect.tag;
-
- if ((tag & Passive$1) !== NoFlags$1 && (tag & HasEffect) !== NoFlags$1) {
- enqueuePendingPassiveHookEffectUnmount(finishedWork, effect);
- enqueuePendingPassiveHookEffectMount(finishedWork, effect);
- }
-
- effect = next;
- } while (effect !== firstEffect);
- }
- }
-
- function commitLifeCycles(finishedRoot, current, finishedWork, committedLanes) {
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- case Block:
- {
- // At this point layout effects have already been destroyed (during mutation phase).
- // This is done to prevent sibling component effects from interfering with each other,
- // e.g. a destroy function in one component should never override a ref set
- // by a create function in another component during the same commit.
- {
- commitHookEffectListMount(Layout | HasEffect, finishedWork);
- }
-
- schedulePassiveEffects(finishedWork);
- return;
- }
-
- case ClassComponent:
- {
- var instance = finishedWork.stateNode;
-
- if (finishedWork.flags & Update) {
- if (current === null) {
- // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
-
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidMount. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
-
- {
- instance.componentDidMount();
- }
- } else {
- var prevProps = finishedWork.elementType === finishedWork.type ? current.memoizedProps : resolveDefaultProps(finishedWork.type, current.memoizedProps);
- var prevState = current.memoizedState; // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
-
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
-
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'componentDidUpdate. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- }
-
- {
- instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
- }
- }
- } // TODO: I think this is now always non-null by the time it reaches the
- // commit phase. Consider removing the type check.
-
-
- var updateQueue = finishedWork.updateQueue;
-
- if (updateQueue !== null) {
- {
- if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
- if (instance.props !== finishedWork.memoizedProps) {
- error('Expected %s props to match memoized props before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.props`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
-
- if (instance.state !== finishedWork.memoizedState) {
- error('Expected %s state to match memoized state before ' + 'processing the update queue. ' + 'This might either be because of a bug in React, or because ' + 'a component reassigns its own `this.state`. ' + 'Please file an issue.', getComponentName(finishedWork.type) || 'instance');
- }
- }
- } // We could update instance props and state here,
- // but instead we rely on them being set during last render.
- // TODO: revisit this when we implement resuming.
-
-
- commitUpdateQueue(finishedWork, updateQueue, instance);
- }
-
- return;
- }
-
- case HostRoot:
- {
- // TODO: I think this is now always non-null by the time it reaches the
- // commit phase. Consider removing the type check.
- var _updateQueue = finishedWork.updateQueue;
-
- if (_updateQueue !== null) {
- var _instance = null;
-
- if (finishedWork.child !== null) {
- switch (finishedWork.child.tag) {
- case HostComponent:
- _instance = getPublicInstance(finishedWork.child.stateNode);
- break;
-
- case ClassComponent:
- _instance = finishedWork.child.stateNode;
- break;
- }
- }
-
- commitUpdateQueue(finishedWork, _updateQueue, _instance);
- }
-
- return;
- }
-
- case HostComponent:
- {
- var _instance2 = finishedWork.stateNode; // Renderers may schedule work to be done after host components are mounted
- // (eg DOM renderer may schedule auto-focus for inputs and form controls).
- // These effects should only be committed when components are first mounted,
- // aka when there is no current/alternate.
-
- if (current === null && finishedWork.flags & Update) {
- var type = finishedWork.type;
- var props = finishedWork.memoizedProps;
- commitMount(_instance2, type, props);
- }
-
- return;
- }
-
- case HostText:
- {
- // We have no life-cycles associated with text.
- return;
- }
-
- case HostPortal:
- {
- // We have no life-cycles associated with portals.
- return;
- }
-
- case Profiler:
- {
- {
- var _finishedWork$memoize2 = finishedWork.memoizedProps,
- onCommit = _finishedWork$memoize2.onCommit,
- onRender = _finishedWork$memoize2.onRender;
- var effectDuration = finishedWork.stateNode.effectDuration;
- var commitTime = getCommitTime();
-
- if (typeof onRender === 'function') {
- {
- onRender(finishedWork.memoizedProps.id, current === null ? 'mount' : 'update', finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime, finishedRoot.memoizedInteractions);
- }
- }
- }
-
- return;
- }
-
- case SuspenseComponent:
- {
- commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
- return;
- }
-
- case SuspenseListComponent:
- case IncompleteClassComponent:
- case FundamentalComponent:
- case ScopeComponent:
- case OffscreenComponent:
- case LegacyHiddenComponent:
- return;
- }
-
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-
- function hideOrUnhideAllChildren(finishedWork, isHidden) {
- {
- // We only have the top Fiber that was inserted but we need to recurse down its
- // children to find all the terminal nodes.
- var node = finishedWork;
-
- while (true) {
- if (node.tag === HostComponent) {
- var instance = node.stateNode;
-
- if (isHidden) {
- hideInstance(instance);
- } else {
- unhideInstance(node.stateNode, node.memoizedProps);
- }
- } else if (node.tag === HostText) {
- var _instance3 = node.stateNode;
-
- if (isHidden) {
- hideTextInstance(_instance3);
- } else {
- unhideTextInstance(_instance3, node.memoizedProps);
- }
- } else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork) ; else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === finishedWork) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === finishedWork) {
- return;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
- }
-
- function commitAttachRef(finishedWork) {
- var ref = finishedWork.ref;
-
- if (ref !== null) {
- var instance = finishedWork.stateNode;
- var instanceToUse;
-
- switch (finishedWork.tag) {
- case HostComponent:
- instanceToUse = getPublicInstance(instance);
- break;
-
- default:
- instanceToUse = instance;
- } // Moved outside to ensure DCE works with this flag
-
- if (typeof ref === 'function') {
- ref(instanceToUse);
- } else {
- {
- if (!ref.hasOwnProperty('current')) {
- error('Unexpected ref object provided for %s. ' + 'Use either a ref-setter function or React.createRef().', getComponentName(finishedWork.type));
- }
- }
-
- ref.current = instanceToUse;
- }
- }
- }
-
- function commitDetachRef(current) {
- var currentRef = current.ref;
-
- if (currentRef !== null) {
- if (typeof currentRef === 'function') {
- currentRef(null);
- } else {
- currentRef.current = null;
- }
- }
- } // User-originating errors (lifecycles and refs) should not interrupt
- // deletion, so don't let them throw. Host-originating errors should
- // interrupt deletion, so it's okay
-
-
- function commitUnmount(finishedRoot, current, renderPriorityLevel) {
- onCommitUnmount(current);
-
- switch (current.tag) {
- case FunctionComponent:
- case ForwardRef:
- case MemoComponent:
- case SimpleMemoComponent:
- case Block:
- {
- var updateQueue = current.updateQueue;
-
- if (updateQueue !== null) {
- var lastEffect = updateQueue.lastEffect;
-
- if (lastEffect !== null) {
- var firstEffect = lastEffect.next;
- var effect = firstEffect;
-
- do {
- var _effect2 = effect,
- destroy = _effect2.destroy,
- tag = _effect2.tag;
-
- if (destroy !== undefined) {
- if ((tag & Passive$1) !== NoFlags$1) {
- enqueuePendingPassiveHookEffectUnmount(current, effect);
- } else {
- {
- safelyCallDestroy(current, destroy);
- }
- }
- }
-
- effect = effect.next;
- } while (effect !== firstEffect);
- }
- }
-
- return;
- }
-
- case ClassComponent:
- {
- safelyDetachRef(current);
- var instance = current.stateNode;
-
- if (typeof instance.componentWillUnmount === 'function') {
- safelyCallComponentWillUnmount(current, instance);
- }
-
- return;
- }
-
- case HostComponent:
- {
- safelyDetachRef(current);
- return;
- }
-
- case HostPortal:
- {
- // TODO: this is recursive.
- // We are also not using this parent because
- // the portal will get pushed immediately.
- {
- unmountHostComponents(finishedRoot, current);
- }
-
- return;
- }
-
- case FundamentalComponent:
- {
-
- return;
- }
-
- case DehydratedFragment:
- {
-
- return;
- }
-
- case ScopeComponent:
- {
-
- return;
- }
- }
- }
-
- function commitNestedUnmounts(finishedRoot, root, renderPriorityLevel) {
- // While we're inside a removed host node we don't want to call
- // removeChild on the inner nodes because they're removed by the top
- // call anyway. We also want to call componentWillUnmount on all
- // composites before this host node is removed from the tree. Therefore
- // we do an inner loop while we're still inside the host node.
- var node = root;
-
- while (true) {
- commitUnmount(finishedRoot, node); // Visit children because they may contain more composite or host nodes.
- // Skip portals because commitUnmount() currently visits them recursively.
-
- if (node.child !== null && ( // If we use mutation we drill down into portals using commitUnmount above.
- // If we don't use mutation we drill down into portals here instead.
- node.tag !== HostPortal)) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === root) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === root) {
- return;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-
- function detachFiberMutation(fiber) {
- // Cut off the return pointers to disconnect it from the tree. Ideally, we
- // should clear the child pointer of the parent alternate to let this
- // get GC:ed but we don't know which for sure which parent is the current
- // one so we'll settle for GC:ing the subtree of this child. This child
- // itself will be GC:ed when the parent updates the next time.
- // Note: we cannot null out sibling here, otherwise it can cause issues
- // with findDOMNode and how it requires the sibling field to carry out
- // traversal in a later effect. See PR #16820. We now clear the sibling
- // field after effects, see: detachFiberAfterEffects.
- //
- // Don't disconnect stateNode now; it will be detached in detachFiberAfterEffects.
- // It may be required if the current component is an error boundary,
- // and one of its descendants throws while unmounting a passive effect.
- fiber.alternate = null;
- fiber.child = null;
- fiber.dependencies = null;
- fiber.firstEffect = null;
- fiber.lastEffect = null;
- fiber.memoizedProps = null;
- fiber.memoizedState = null;
- fiber.pendingProps = null;
- fiber.return = null;
- fiber.updateQueue = null;
-
- {
- fiber._debugOwner = null;
- }
- }
-
- function getHostParentFiber(fiber) {
- var parent = fiber.return;
-
- while (parent !== null) {
- if (isHostParent(parent)) {
- return parent;
- }
-
- parent = parent.return;
- }
-
- {
- {
- throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-
- function isHostParent(fiber) {
- return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
- }
-
- function getHostSibling(fiber) {
- // We're going to search forward into the tree until we find a sibling host
- // node. Unfortunately, if multiple insertions are done in a row we have to
- // search past them. This leads to exponential search for the next sibling.
- // TODO: Find a more efficient way to do this.
- var node = fiber;
-
- siblings: while (true) {
- // If we didn't find anything, let's try the next sibling.
- while (node.sibling === null) {
- if (node.return === null || isHostParent(node.return)) {
- // If we pop out of the root or hit the parent the fiber we are the
- // last sibling.
- return null;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
-
- while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
- // If it is not host node and, we might have a host node inside it.
- // Try to search down until we find one.
- if (node.flags & Placement) {
- // If we don't have a child, try the siblings instead.
- continue siblings;
- } // If we don't have a child, try the siblings instead.
- // We also skip portals because they are not part of this host tree.
-
-
- if (node.child === null || node.tag === HostPortal) {
- continue siblings;
- } else {
- node.child.return = node;
- node = node.child;
- }
- } // Check if this host node is stable or about to be placed.
-
-
- if (!(node.flags & Placement)) {
- // Found it!
- return node.stateNode;
- }
- }
- }
-
- function commitPlacement(finishedWork) {
-
-
- var parentFiber = getHostParentFiber(finishedWork); // Note: these two variables *must* always be updated together.
-
- var parent;
- var isContainer;
- var parentStateNode = parentFiber.stateNode;
-
- switch (parentFiber.tag) {
- case HostComponent:
- parent = parentStateNode;
- isContainer = false;
- break;
-
- case HostRoot:
- parent = parentStateNode.containerInfo;
- isContainer = true;
- break;
-
- case HostPortal:
- parent = parentStateNode.containerInfo;
- isContainer = true;
- break;
-
- case FundamentalComponent:
-
- // eslint-disable-next-line-no-fallthrough
-
- default:
- {
- {
- throw Error( "Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- }
-
- if (parentFiber.flags & ContentReset) {
- // Reset the text content of the parent before doing any insertions
- resetTextContent(parent); // Clear ContentReset from the effect tag
-
- parentFiber.flags &= ~ContentReset;
- }
-
- var before = getHostSibling(finishedWork); // We only have the top Fiber that was inserted but we need to recurse down its
- // children to find all the terminal nodes.
-
- if (isContainer) {
- insertOrAppendPlacementNodeIntoContainer(finishedWork, before, parent);
- } else {
- insertOrAppendPlacementNode(finishedWork, before, parent);
- }
- }
-
- function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
- var tag = node.tag;
- var isHost = tag === HostComponent || tag === HostText;
-
- if (isHost || enableFundamentalAPI ) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
-
- if (before) {
- insertInContainerBefore(parent, stateNode, before);
- } else {
- appendChildToContainer(parent, stateNode);
- }
- } else if (tag === HostPortal) ; else {
- var child = node.child;
-
- if (child !== null) {
- insertOrAppendPlacementNodeIntoContainer(child, before, parent);
- var sibling = child.sibling;
-
- while (sibling !== null) {
- insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
- sibling = sibling.sibling;
- }
- }
- }
- }
-
- function insertOrAppendPlacementNode(node, before, parent) {
- var tag = node.tag;
- var isHost = tag === HostComponent || tag === HostText;
-
- if (isHost || enableFundamentalAPI ) {
- var stateNode = isHost ? node.stateNode : node.stateNode.instance;
-
- if (before) {
- insertBefore(parent, stateNode, before);
- } else {
- appendChild(parent, stateNode);
- }
- } else if (tag === HostPortal) ; else {
- var child = node.child;
-
- if (child !== null) {
- insertOrAppendPlacementNode(child, before, parent);
- var sibling = child.sibling;
-
- while (sibling !== null) {
- insertOrAppendPlacementNode(sibling, before, parent);
- sibling = sibling.sibling;
- }
- }
- }
- }
-
- function unmountHostComponents(finishedRoot, current, renderPriorityLevel) {
- // We only have the top Fiber that was deleted but we need to recurse down its
- // children to find all the terminal nodes.
- var node = current; // Each iteration, currentParent is populated with node's host parent if not
- // currentParentIsValid.
-
- var currentParentIsValid = false; // Note: these two variables *must* always be updated together.
-
- var currentParent;
- var currentParentIsContainer;
-
- while (true) {
- if (!currentParentIsValid) {
- var parent = node.return;
-
- findParent: while (true) {
- if (!(parent !== null)) {
- {
- throw Error( "Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var parentStateNode = parent.stateNode;
-
- switch (parent.tag) {
- case HostComponent:
- currentParent = parentStateNode;
- currentParentIsContainer = false;
- break findParent;
-
- case HostRoot:
- currentParent = parentStateNode.containerInfo;
- currentParentIsContainer = true;
- break findParent;
-
- case HostPortal:
- currentParent = parentStateNode.containerInfo;
- currentParentIsContainer = true;
- break findParent;
-
- }
-
- parent = parent.return;
- }
-
- currentParentIsValid = true;
- }
-
- if (node.tag === HostComponent || node.tag === HostText) {
- commitNestedUnmounts(finishedRoot, node); // After all the children have unmounted, it is now safe to remove the
- // node from the tree.
-
- if (currentParentIsContainer) {
- removeChildFromContainer(currentParent, node.stateNode);
- } else {
- removeChild(currentParent, node.stateNode);
- } // Don't visit children because we already visited them.
-
- } else if (node.tag === HostPortal) {
- if (node.child !== null) {
- // When we go into a portal, it becomes the parent to remove from.
- // We will reassign it back when we pop the portal on the way up.
- currentParent = node.stateNode.containerInfo;
- currentParentIsContainer = true; // Visit children because portals might contain host components.
-
- node.child.return = node;
- node = node.child;
- continue;
- }
- } else {
- commitUnmount(finishedRoot, node); // Visit children because we may find more host components below.
-
- if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
- }
-
- if (node === current) {
- return;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === current) {
- return;
- }
-
- node = node.return;
-
- if (node.tag === HostPortal) {
- // When we go out of the portal, we need to restore the parent.
- // Since we don't keep a stack of them, we will search for it.
- currentParentIsValid = false;
- }
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-
- function commitDeletion(finishedRoot, current, renderPriorityLevel) {
- {
- // Recursively delete all host nodes from the parent.
- // Detach refs and call componentWillUnmount() on the whole subtree.
- unmountHostComponents(finishedRoot, current);
- }
-
- var alternate = current.alternate;
- detachFiberMutation(current);
-
- if (alternate !== null) {
- detachFiberMutation(alternate);
- }
- }
-
- function commitWork(current, finishedWork) {
-
- switch (finishedWork.tag) {
- case FunctionComponent:
- case ForwardRef:
- case MemoComponent:
- case SimpleMemoComponent:
- case Block:
- {
- // Layout effects are destroyed during the mutation phase so that all
- // destroy functions for all fibers are called before any create functions.
- // This prevents sibling component effects from interfering with each other,
- // e.g. a destroy function in one component should never override a ref set
- // by a create function in another component during the same commit.
- {
- commitHookEffectListUnmount(Layout | HasEffect, finishedWork);
- }
-
- return;
- }
-
- case ClassComponent:
- {
- return;
- }
-
- case HostComponent:
- {
- var instance = finishedWork.stateNode;
-
- if (instance != null) {
- // Commit the work prepared earlier.
- var newProps = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
- // as the newProps. The updatePayload will contain the real change in
- // this case.
-
- var oldProps = current !== null ? current.memoizedProps : newProps;
- var type = finishedWork.type; // TODO: Type the updateQueue to be specific to host components.
-
- var updatePayload = finishedWork.updateQueue;
- finishedWork.updateQueue = null;
-
- if (updatePayload !== null) {
- commitUpdate(instance, updatePayload, type, oldProps, newProps);
- }
- }
-
- return;
- }
-
- case HostText:
- {
- if (!(finishedWork.stateNode !== null)) {
- {
- throw Error( "This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
-
- var textInstance = finishedWork.stateNode;
- var newText = finishedWork.memoizedProps; // For hydration we reuse the update path but we treat the oldProps
- // as the newProps. The updatePayload will contain the real change in
- // this case.
-
- var oldText = current !== null ? current.memoizedProps : newText;
- commitTextUpdate(textInstance, oldText, newText);
- return;
- }
-
- case HostRoot:
- {
- {
- var _root = finishedWork.stateNode;
-
- if (_root.hydrate) {
- // We've just hydrated. No need to hydrate again.
- _root.hydrate = false;
- commitHydratedContainer(_root.containerInfo);
- }
- }
-
- return;
- }
-
- case Profiler:
- {
- return;
- }
-
- case SuspenseComponent:
- {
- commitSuspenseComponent(finishedWork);
- attachSuspenseRetryListeners(finishedWork);
- return;
- }
-
- case SuspenseListComponent:
- {
- attachSuspenseRetryListeners(finishedWork);
- return;
- }
-
- case IncompleteClassComponent:
- {
- return;
- }
-
- case FundamentalComponent:
- {
-
- break;
- }
-
- case ScopeComponent:
- {
-
- break;
- }
-
- case OffscreenComponent:
- case LegacyHiddenComponent:
- {
- var newState = finishedWork.memoizedState;
- var isHidden = newState !== null;
- hideOrUnhideAllChildren(finishedWork, isHidden);
- return;
- }
- }
-
- {
- {
- throw Error( "This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-
- function commitSuspenseComponent(finishedWork) {
- var newState = finishedWork.memoizedState;
-
- if (newState !== null) {
- markCommitTimeOfFallback();
-
- {
- // Hide the Offscreen component that contains the primary children. TODO:
- // Ideally, this effect would have been scheduled on the Offscreen fiber
- // itself. That's how unhiding works: the Offscreen component schedules an
- // effect on itself. However, in this case, the component didn't complete,
- // so the fiber was never added to the effect list in the normal path. We
- // could have appended it to the effect list in the Suspense component's
- // second pass, but doing it this way is less complicated. This would be
- // simpler if we got rid of the effect list and traversed the tree, like
- // we're planning to do.
- var primaryChildParent = finishedWork.child;
- hideOrUnhideAllChildren(primaryChildParent, true);
- }
- }
- }
-
- function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
-
- var newState = finishedWork.memoizedState;
-
- if (newState === null) {
- var current = finishedWork.alternate;
-
- if (current !== null) {
- var prevState = current.memoizedState;
-
- if (prevState !== null) {
- var suspenseInstance = prevState.dehydrated;
-
- if (suspenseInstance !== null) {
- commitHydratedSuspenseInstance(suspenseInstance);
- }
- }
- }
- }
- }
-
- function attachSuspenseRetryListeners(finishedWork) {
- // If this boundary just timed out, then it will have a set of wakeables.
- // For each wakeable, attach a listener so that when it resolves, React
- // attempts to re-render the boundary in the primary (pre-timeout) state.
- var wakeables = finishedWork.updateQueue;
-
- if (wakeables !== null) {
- finishedWork.updateQueue = null;
- var retryCache = finishedWork.stateNode;
-
- if (retryCache === null) {
- retryCache = finishedWork.stateNode = new PossiblyWeakSet();
- }
-
- wakeables.forEach(function (wakeable) {
- // Memoize using the boundary fiber to prevent redundant listeners.
- var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
-
- if (!retryCache.has(wakeable)) {
- {
- if (wakeable.__reactDoNotTraceInteractions !== true) {
- retry = unstable_wrap(retry);
- }
- }
-
- retryCache.add(wakeable);
- wakeable.then(retry, retry);
- }
- });
- }
- } // This function detects when a Suspense boundary goes from visible to hidden.
- // It returns false if the boundary is already hidden.
- // TODO: Use an effect tag.
-
-
- function isSuspenseBoundaryBeingHidden(current, finishedWork) {
- if (current !== null) {
- var oldState = current.memoizedState;
-
- if (oldState === null || oldState.dehydrated !== null) {
- var newState = finishedWork.memoizedState;
- return newState !== null && newState.dehydrated === null;
- }
- }
-
- return false;
- }
-
- function commitResetTextContent(current) {
-
- resetTextContent(current.stateNode);
- }
-
- var COMPONENT_TYPE = 0;
- var HAS_PSEUDO_CLASS_TYPE = 1;
- var ROLE_TYPE = 2;
- var TEST_NAME_TYPE = 3;
- var TEXT_TYPE = 4;
-
- if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor$1 = Symbol.for;
- COMPONENT_TYPE = symbolFor$1('selector.component');
- HAS_PSEUDO_CLASS_TYPE = symbolFor$1('selector.has_pseudo_class');
- ROLE_TYPE = symbolFor$1('selector.role');
- TEST_NAME_TYPE = symbolFor$1('selector.test_id');
- TEXT_TYPE = symbolFor$1('selector.text');
- }
- var commitHooks = [];
- function onCommitRoot$1() {
- {
- commitHooks.forEach(function (commitHook) {
- return commitHook();
- });
- }
- }
-
- var ceil = Math.ceil;
- var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher,
- ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner,
- IsSomeRendererActing = ReactSharedInternals.IsSomeRendererActing;
- var NoContext =
- /* */
- 0;
- var BatchedContext =
- /* */
- 1;
- var EventContext =
- /* */
- 2;
- var DiscreteEventContext =
- /* */
- 4;
- var LegacyUnbatchedContext =
- /* */
- 8;
- var RenderContext =
- /* */
- 16;
- var CommitContext =
- /* */
- 32;
- var RetryAfterError =
- /* */
- 64;
- var RootIncomplete = 0;
- var RootFatalErrored = 1;
- var RootErrored = 2;
- var RootSuspended = 3;
- var RootSuspendedWithDelay = 4;
- var RootCompleted = 5; // Describes where we are in the React execution stack
-
- var executionContext = NoContext; // The root we're working on
-
- var workInProgressRoot = null; // The fiber we're working on
-
- var workInProgress = null; // The lanes we're rendering
-
- var workInProgressRootRenderLanes = NoLanes; // Stack that allows components to change the render lanes for its subtree
- // This is a superset of the lanes we started working on at the root. The only
- // case where it's different from `workInProgressRootRenderLanes` is when we
- // enter a subtree that is hidden and needs to be unhidden: Suspense and
- // Offscreen component.
- //
- // Most things in the work loop should deal with workInProgressRootRenderLanes.
- // Most things in begin/complete phases should deal with subtreeRenderLanes.
-
- var subtreeRenderLanes = NoLanes;
- var subtreeRenderLanesCursor = createCursor(NoLanes); // Whether to root completed, errored, suspended, etc.
-
- var workInProgressRootExitStatus = RootIncomplete; // A fatal error, if one is thrown
-
- var workInProgressRootFatalError = null; // "Included" lanes refer to lanes that were worked on during this render. It's
- // slightly different than `renderLanes` because `renderLanes` can change as you
- // enter and exit an Offscreen tree. This value is the combination of all render
- // lanes for the entire render phase.
-
- var workInProgressRootIncludedLanes = NoLanes; // The work left over by components that were visited during this render. Only
- // includes unprocessed updates, not work in bailed out children.
-
- var workInProgressRootSkippedLanes = NoLanes; // Lanes that were updated (in an interleaved event) during this render.
-
- var workInProgressRootUpdatedLanes = NoLanes; // Lanes that were pinged (in an interleaved event) during this render.
-
- var workInProgressRootPingedLanes = NoLanes;
- var mostRecentlyUpdatedRoot = null; // The most recent time we committed a fallback. This lets us ensure a train
- // model where we don't commit new loading states in too quick succession.
-
- var globalMostRecentFallbackTime = 0;
- var FALLBACK_THROTTLE_MS = 500; // The absolute time for when we should start giving up on rendering
- // more and prefer CPU suspense heuristics instead.
-
- var workInProgressRootRenderTargetTime = Infinity; // How long a render is supposed to take before we start following CPU
- // suspense heuristics and opt out of rendering more content.
-
- var RENDER_TIMEOUT_MS = 500;
-
- function resetRenderTimer() {
- workInProgressRootRenderTargetTime = now() + RENDER_TIMEOUT_MS;
- }
-
- function getRenderTargetTime() {
- return workInProgressRootRenderTargetTime;
- }
- var nextEffect = null;
- var hasUncaughtError = false;
- var firstUncaughtError = null;
- var legacyErrorBoundariesThatAlreadyFailed = null;
- var rootDoesHavePassiveEffects = false;
- var rootWithPendingPassiveEffects = null;
- var pendingPassiveEffectsRenderPriority = NoPriority$1;
- var pendingPassiveEffectsLanes = NoLanes;
- var pendingPassiveHookEffectsMount = [];
- var pendingPassiveHookEffectsUnmount = [];
- var rootsWithPendingDiscreteUpdates = null; // Use these to prevent an infinite loop of nested updates
-
- var NESTED_UPDATE_LIMIT = 50;
- var nestedUpdateCount = 0;
- var rootWithNestedUpdates = null;
- var NESTED_PASSIVE_UPDATE_LIMIT = 50;
- var nestedPassiveUpdateCount = 0; // Marks the need to reschedule pending interactions at these lanes
- // during the commit phase. This enables them to be traced across components
- // that spawn new work during render. E.g. hidden boundaries, suspended SSR
- // hydration or SuspenseList.
- // TODO: Can use a bitmask instead of an array
-
- var spawnedWorkDuringRender = null; // If two updates are scheduled within the same event, we should treat their
- // event times as simultaneous, even if the actual clock time has advanced
- // between the first and second call.
-
- var currentEventTime = NoTimestamp;
- var currentEventWipLanes = NoLanes;
- var currentEventPendingLanes = NoLanes; // Dev only flag that tracks if passive effects are currently being flushed.
- // We warn about state updates for unmounted components differently in this case.
-
- var isFlushingPassiveEffects = false;
- var focusedInstanceHandle = null;
- var shouldFireAfterActiveInstanceBlur = false;
- function getWorkInProgressRoot() {
- return workInProgressRoot;
- }
- function requestEventTime() {
- if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
- // We're inside React, so it's fine to read the actual time.
- return now();
- } // We're not inside React, so we may be in the middle of a browser event.
-
-
- if (currentEventTime !== NoTimestamp) {
- // Use the same start time for all updates until we enter React again.
- return currentEventTime;
- } // This is the first update since React yielded. Compute a new start time.
-
-
- currentEventTime = now();
- return currentEventTime;
- }
- function requestUpdateLane(fiber) {
- // Special cases
- var mode = fiber.mode;
-
- if ((mode & BlockingMode) === NoMode) {
- return SyncLane;
- } else if ((mode & ConcurrentMode) === NoMode) {
- return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
- } // The algorithm for assigning an update to a lane should be stable for all
- // updates at the same priority within the same event. To do this, the inputs
- // to the algorithm must be the same. For example, we use the `renderLanes`
- // to avoid choosing a lane that is already in the middle of rendering.
- //
- // However, the "included" lanes could be mutated in between updates in the
- // same event, like if you perform an update inside `flushSync`. Or any other
- // code path that might call `prepareFreshStack`.
- //
- // The trick we use is to cache the first of each of these inputs within an
- // event. Then reset the cached values once we can be sure the event is over.
- // Our heuristic for that is whenever we enter a concurrent work loop.
- //
- // We'll do the same for `currentEventPendingLanes` below.
-
-
- if (currentEventWipLanes === NoLanes) {
- currentEventWipLanes = workInProgressRootIncludedLanes;
- }
-
- var isTransition = requestCurrentTransition() !== NoTransition;
-
- if (isTransition) {
- if (currentEventPendingLanes !== NoLanes) {
- currentEventPendingLanes = mostRecentlyUpdatedRoot !== null ? mostRecentlyUpdatedRoot.pendingLanes : NoLanes;
- }
-
- return findTransitionLane(currentEventWipLanes, currentEventPendingLanes);
- } // TODO: Remove this dependency on the Scheduler priority.
- // To do that, we're replacing it with an update lane priority.
-
-
- var schedulerPriority = getCurrentPriorityLevel(); // The old behavior was using the priority level of the Scheduler.
- // This couples React to the Scheduler internals, so we're replacing it
- // with the currentUpdateLanePriority above. As an example of how this
- // could be problematic, if we're not inside `Scheduler.runWithPriority`,
- // then we'll get the priority of the current running Scheduler task,
- // which is probably not what we want.
-
- var lane;
-
- if ( // TODO: Temporary. We're removing the concept of discrete updates.
- (executionContext & DiscreteEventContext) !== NoContext && schedulerPriority === UserBlockingPriority$2) {
- lane = findUpdateLane(InputDiscreteLanePriority, currentEventWipLanes);
- } else {
- var schedulerLanePriority = schedulerPriorityToLanePriority(schedulerPriority);
-
- lane = findUpdateLane(schedulerLanePriority, currentEventWipLanes);
- }
-
- return lane;
- }
-
- function requestRetryLane(fiber) {
- // This is a fork of `requestUpdateLane` designed specifically for Suspense
- // "retries" — a special update that attempts to flip a Suspense boundary
- // from its placeholder state to its primary/resolved state.
- // Special cases
- var mode = fiber.mode;
-
- if ((mode & BlockingMode) === NoMode) {
- return SyncLane;
- } else if ((mode & ConcurrentMode) === NoMode) {
- return getCurrentPriorityLevel() === ImmediatePriority$1 ? SyncLane : SyncBatchedLane;
- } // See `requestUpdateLane` for explanation of `currentEventWipLanes`
-
-
- if (currentEventWipLanes === NoLanes) {
- currentEventWipLanes = workInProgressRootIncludedLanes;
- }
-
- return findRetryLane(currentEventWipLanes);
- }
-
- function scheduleUpdateOnFiber(fiber, lane, eventTime) {
- checkForNestedUpdates();
- warnAboutRenderPhaseUpdatesInDEV(fiber);
- var root = markUpdateLaneFromFiberToRoot(fiber, lane);
-
- if (root === null) {
- warnAboutUpdateOnUnmountedFiberInDEV(fiber);
- return null;
- } // Mark that the root has a pending update.
-
-
- markRootUpdated(root, lane, eventTime);
-
- if (root === workInProgressRoot) {
- // Received an update to a tree that's in the middle of rendering. Mark
- // that there was an interleaved update work on this root. Unless the
- // `deferRenderPhaseUpdateToNextBatch` flag is off and this is a render
- // phase update. In that case, we don't treat render phase updates as if
- // they were interleaved, for backwards compat reasons.
- {
- workInProgressRootUpdatedLanes = mergeLanes(workInProgressRootUpdatedLanes, lane);
- }
-
- if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
- // The root already suspended with a delay, which means this render
- // definitely won't finish. Since we have a new update, let's mark it as
- // suspended now, right before marking the incoming update. This has the
- // effect of interrupting the current render and switching to the update.
- // TODO: Make sure this doesn't override pings that happen while we've
- // already started rendering.
- markRootSuspended$1(root, workInProgressRootRenderLanes);
- }
- } // TODO: requestUpdateLanePriority also reads the priority. Pass the
- // priority as an argument to that function and this one.
-
-
- var priorityLevel = getCurrentPriorityLevel();
-
- if (lane === SyncLane) {
- if ( // Check if we're inside unbatchedUpdates
- (executionContext & LegacyUnbatchedContext) !== NoContext && // Check if we're not already rendering
- (executionContext & (RenderContext | CommitContext)) === NoContext) {
- // Register pending interactions on the root to avoid losing traced interaction data.
- schedulePendingInteractions(root, lane); // This is a legacy edge case. The initial mount of a ReactDOM.render-ed
- // root inside of batchedUpdates should be synchronous, but layout updates
- // should be deferred until the end of the batch.
-
- performSyncWorkOnRoot(root);
- } else {
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, lane);
-
- if (executionContext === NoContext) {
- // Flush the synchronous work now, unless we're already working or inside
- // a batch. This is intentionally inside scheduleUpdateOnFiber instead of
- // scheduleCallbackForFiber to preserve the ability to schedule a callback
- // without immediately flushing it. We only do this for user-initiated
- // updates, to preserve historical behavior of legacy mode.
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
- } else {
- // Schedule a discrete update but only if it's not Sync.
- if ((executionContext & DiscreteEventContext) !== NoContext && ( // Only updates at user-blocking priority or greater are considered
- // discrete, even inside a discrete event.
- priorityLevel === UserBlockingPriority$2 || priorityLevel === ImmediatePriority$1)) {
- // This is the result of a discrete event. Track the lowest priority
- // discrete update per root so we can flush them early, if needed.
- if (rootsWithPendingDiscreteUpdates === null) {
- rootsWithPendingDiscreteUpdates = new Set([root]);
- } else {
- rootsWithPendingDiscreteUpdates.add(root);
- }
- } // Schedule other updates after in case the callback is sync.
-
-
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, lane);
- } // We use this when assigning a lane for a transition inside
- // `requestUpdateLane`. We assume it's the same as the root being updated,
- // since in the common case of a single root app it probably is. If it's not
- // the same root, then it's not a huge deal, we just might batch more stuff
- // together more than necessary.
-
-
- mostRecentlyUpdatedRoot = root;
- } // This is split into a separate function so we can mark a fiber with pending
- // work without treating it as a typical update that originates from an event;
- // e.g. retrying a Suspense boundary isn't an update, but it does schedule work
- // on a fiber.
-
- function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
- // Update the source fiber's lanes
- sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
- var alternate = sourceFiber.alternate;
-
- if (alternate !== null) {
- alternate.lanes = mergeLanes(alternate.lanes, lane);
- }
-
- {
- if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
- warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
- }
- } // Walk the parent path to the root and update the child expiration time.
-
-
- var node = sourceFiber;
- var parent = sourceFiber.return;
-
- while (parent !== null) {
- parent.childLanes = mergeLanes(parent.childLanes, lane);
- alternate = parent.alternate;
-
- if (alternate !== null) {
- alternate.childLanes = mergeLanes(alternate.childLanes, lane);
- } else {
- {
- if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
- warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
- }
- }
- }
-
- node = parent;
- parent = parent.return;
- }
-
- if (node.tag === HostRoot) {
- var root = node.stateNode;
- return root;
- } else {
- return null;
- }
- } // Use this function to schedule a task for a root. There's only one task per
- // root; if a task was already scheduled, we'll check to make sure the priority
- // of the existing task is the same as the priority of the next level that the
- // root has work on. This function is called on every update, and right before
- // exiting a task.
-
-
- function ensureRootIsScheduled(root, currentTime) {
- var existingCallbackNode = root.callbackNode; // Check if any lanes are being starved by other work. If so, mark them as
- // expired so we know to work on those next.
-
- markStarvedLanesAsExpired(root, currentTime); // Determine the next lanes to work on, and their priority.
-
- var nextLanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes); // This returns the priority level computed during the `getNextLanes` call.
-
- var newCallbackPriority = returnNextLanesPriority();
-
- if (nextLanes === NoLanes) {
- // Special case: There's nothing to work on.
- if (existingCallbackNode !== null) {
- cancelCallback(existingCallbackNode);
- root.callbackNode = null;
- root.callbackPriority = NoLanePriority;
- }
-
- return;
- } // Check if there's an existing task. We may be able to reuse it.
-
-
- if (existingCallbackNode !== null) {
- var existingCallbackPriority = root.callbackPriority;
-
- if (existingCallbackPriority === newCallbackPriority) {
- // The priority hasn't changed. We can reuse the existing task. Exit.
- return;
- } // The priority changed. Cancel the existing callback. We'll schedule a new
- // one below.
-
-
- cancelCallback(existingCallbackNode);
- } // Schedule a new callback.
-
-
- var newCallbackNode;
-
- if (newCallbackPriority === SyncLanePriority) {
- // Special case: Sync React callbacks are scheduled on a special
- // internal queue
- newCallbackNode = scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root));
- } else if (newCallbackPriority === SyncBatchedLanePriority) {
- newCallbackNode = scheduleCallback(ImmediatePriority$1, performSyncWorkOnRoot.bind(null, root));
- } else {
- var schedulerPriorityLevel = lanePriorityToSchedulerPriority(newCallbackPriority);
- newCallbackNode = scheduleCallback(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root));
- }
-
- root.callbackPriority = newCallbackPriority;
- root.callbackNode = newCallbackNode;
- } // This is the entry point for every concurrent task, i.e. anything that
- // goes through Scheduler.
-
-
- function performConcurrentWorkOnRoot(root) {
- // Since we know we're in a React event, we can clear the current
- // event time. The next update will compute a new event time.
- currentEventTime = NoTimestamp;
- currentEventWipLanes = NoLanes;
- currentEventPendingLanes = NoLanes;
-
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- } // Flush any pending passive effects before deciding which lanes to work on,
- // in case they schedule additional work.
-
-
- var originalCallbackNode = root.callbackNode;
- var didFlushPassiveEffects = flushPassiveEffects();
-
- if (didFlushPassiveEffects) {
- // Something in the passive effect phase may have canceled the current task.
- // Check if the task node for this root was changed.
- if (root.callbackNode !== originalCallbackNode) {
- // The current task was canceled. Exit. We don't need to call
- // `ensureRootIsScheduled` because the check above implies either that
- // there's a new task, or that there's no remaining work on this root.
- return null;
- }
- } // Determine the next expiration time to work on, using the fields stored
- // on the root.
-
-
- var lanes = getNextLanes(root, root === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
-
- if (lanes === NoLanes) {
- // Defensive coding. This is never expected to happen.
- return null;
- }
-
- var exitStatus = renderRootConcurrent(root, lanes);
-
- if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
- // The render included lanes that were updated during the render phase.
- // For example, when unhiding a hidden tree, we include all the lanes
- // that were previously skipped when the tree was hidden. That set of
- // lanes is a superset of the lanes we started rendering with.
- //
- // So we'll throw out the current work and restart.
- prepareFreshStack(root, NoLanes);
- } else if (exitStatus !== RootIncomplete) {
- if (exitStatus === RootErrored) {
- executionContext |= RetryAfterError; // If an error occurred during hydration,
- // discard server response and fall back to client side render.
-
- if (root.hydrate) {
- root.hydrate = false;
- clearContainer(root.containerInfo);
- } // If something threw an error, try rendering one more time. We'll render
- // synchronously to block concurrent data mutations, and we'll includes
- // all pending updates are included. If it still fails after the second
- // attempt, we'll give up and commit the resulting tree.
-
-
- lanes = getLanesToRetrySynchronouslyOnError(root);
-
- if (lanes !== NoLanes) {
- exitStatus = renderRootSync(root, lanes);
- }
- }
-
- if (exitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- prepareFreshStack(root, NoLanes);
- markRootSuspended$1(root, lanes);
- ensureRootIsScheduled(root, now());
- throw fatalError;
- } // We now have a consistent tree. The next step is either to commit it,
- // or, if something suspended, wait to commit it after a timeout.
-
-
- var finishedWork = root.current.alternate;
- root.finishedWork = finishedWork;
- root.finishedLanes = lanes;
- finishConcurrentRender(root, exitStatus, lanes);
- }
-
- ensureRootIsScheduled(root, now());
-
- if (root.callbackNode === originalCallbackNode) {
- // The task node scheduled for this root is the same one that's
- // currently executed. Need to return a continuation.
- return performConcurrentWorkOnRoot.bind(null, root);
- }
-
- return null;
- }
-
- function finishConcurrentRender(root, exitStatus, lanes) {
- switch (exitStatus) {
- case RootIncomplete:
- case RootFatalErrored:
- {
- {
- {
- throw Error( "Root did not complete. This is a bug in React." );
- }
- }
- }
- // Flow knows about invariant, so it complains if I add a break
- // statement, but eslint doesn't know about invariant, so it complains
- // if I do. eslint-disable-next-line no-fallthrough
-
- case RootErrored:
- {
- // We should have already attempted to retry this tree. If we reached
- // this point, it errored again. Commit it.
- commitRoot(root);
- break;
- }
-
- case RootSuspended:
- {
- markRootSuspended$1(root, lanes); // We have an acceptable loading state. We need to figure out if we
- // should immediately commit it or wait a bit.
-
- if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
- !shouldForceFlushFallbacksInDEV()) {
- // This render only included retries, no updates. Throttle committing
- // retries so that we don't show too many loading states too quickly.
- var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now(); // Don't bother with a very short suspense time.
-
- if (msUntilTimeout > 10) {
- var nextLanes = getNextLanes(root, NoLanes);
-
- if (nextLanes !== NoLanes) {
- // There's additional work on this root.
- break;
- }
-
- var suspendedLanes = root.suspendedLanes;
-
- if (!isSubsetOfLanes(suspendedLanes, lanes)) {
- // We should prefer to render the fallback of at the last
- // suspended level. Ping the last suspended level to try
- // rendering it again.
- // FIXME: What if the suspended lanes are Idle? Should not restart.
- var eventTime = requestEventTime();
- markRootPinged(root, suspendedLanes);
- break;
- } // The render is suspended, it hasn't timed out, and there's no
- // lower priority work to do. Instead of committing the fallback
- // immediately, wait for more data to arrive.
-
-
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), msUntilTimeout);
- break;
- }
- } // The work expired. Commit immediately.
-
-
- commitRoot(root);
- break;
- }
-
- case RootSuspendedWithDelay:
- {
- markRootSuspended$1(root, lanes);
-
- if (includesOnlyTransitions(lanes)) {
- // This is a transition, so we should exit without committing a
- // placeholder and without scheduling a timeout. Delay indefinitely
- // until we receive more data.
- break;
- }
-
- if (!shouldForceFlushFallbacksInDEV()) {
- // This is not a transition, but we did trigger an avoided state.
- // Schedule a placeholder to display after a short delay, using the Just
- // Noticeable Difference.
- // TODO: Is the JND optimization worth the added complexity? If this is
- // the only reason we track the event time, then probably not.
- // Consider removing.
- var mostRecentEventTime = getMostRecentEventTime(root, lanes);
- var eventTimeMs = mostRecentEventTime;
- var timeElapsedMs = now() - eventTimeMs;
-
- var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs; // Don't bother with a very short suspense time.
-
-
- if (_msUntilTimeout > 10) {
- // Instead of committing the fallback immediately, wait for more data
- // to arrive.
- root.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root), _msUntilTimeout);
- break;
- }
- } // Commit the placeholder.
-
-
- commitRoot(root);
- break;
- }
-
- case RootCompleted:
- {
- // The work completed. Ready to commit.
- commitRoot(root);
- break;
- }
-
- default:
- {
- {
- {
- throw Error( "Unknown root exit status." );
- }
- }
- }
- }
- }
-
- function markRootSuspended$1(root, suspendedLanes) {
- // When suspending, we should always exclude lanes that were pinged or (more
- // rarely, since we try to avoid it) updated during the render phase.
- // TODO: Lol maybe there's a better way to factor this besides this
- // obnoxiously named function :)
- suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
- suspendedLanes = removeLanes(suspendedLanes, workInProgressRootUpdatedLanes);
- markRootSuspended(root, suspendedLanes);
- } // This is the entry point for synchronous tasks that don't go
- // through Scheduler
-
-
- function performSyncWorkOnRoot(root) {
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
-
- flushPassiveEffects();
- var lanes;
- var exitStatus;
-
- if (root === workInProgressRoot && includesSomeLane(root.expiredLanes, workInProgressRootRenderLanes)) {
- // There's a partial tree, and at least one of its lanes has expired. Finish
- // rendering it before rendering the rest of the expired work.
- lanes = workInProgressRootRenderLanes;
- exitStatus = renderRootSync(root, lanes);
-
- if (includesSomeLane(workInProgressRootIncludedLanes, workInProgressRootUpdatedLanes)) {
- // The render included lanes that were updated during the render phase.
- // For example, when unhiding a hidden tree, we include all the lanes
- // that were previously skipped when the tree was hidden. That set of
- // lanes is a superset of the lanes we started rendering with.
- //
- // Note that this only happens when part of the tree is rendered
- // concurrently. If the whole tree is rendered synchronously, then there
- // are no interleaved events.
- lanes = getNextLanes(root, lanes);
- exitStatus = renderRootSync(root, lanes);
- }
- } else {
- lanes = getNextLanes(root, NoLanes);
- exitStatus = renderRootSync(root, lanes);
- }
-
- if (root.tag !== LegacyRoot && exitStatus === RootErrored) {
- executionContext |= RetryAfterError; // If an error occurred during hydration,
- // discard server response and fall back to client side render.
-
- if (root.hydrate) {
- root.hydrate = false;
- clearContainer(root.containerInfo);
- } // If something threw an error, try rendering one more time. We'll render
- // synchronously to block concurrent data mutations, and we'll includes
- // all pending updates are included. If it still fails after the second
- // attempt, we'll give up and commit the resulting tree.
-
-
- lanes = getLanesToRetrySynchronouslyOnError(root);
-
- if (lanes !== NoLanes) {
- exitStatus = renderRootSync(root, lanes);
- }
- }
-
- if (exitStatus === RootFatalErrored) {
- var fatalError = workInProgressRootFatalError;
- prepareFreshStack(root, NoLanes);
- markRootSuspended$1(root, lanes);
- ensureRootIsScheduled(root, now());
- throw fatalError;
- } // We now have a consistent tree. Because this is a sync render, we
- // will commit it even if something suspended.
-
-
- var finishedWork = root.current.alternate;
- root.finishedWork = finishedWork;
- root.finishedLanes = lanes;
- commitRoot(root); // Before exiting, make sure there's a callback scheduled for the next
- // pending level.
-
- ensureRootIsScheduled(root, now());
- return null;
- }
- function flushDiscreteUpdates() {
- // TODO: Should be able to flush inside batchedUpdates, but not inside `act`.
- // However, `act` uses `batchedUpdates`, so there's no way to distinguish
- // those two cases. Need to fix this before exposing flushDiscreteUpdates
- // as a public API.
- if ((executionContext & (BatchedContext | RenderContext | CommitContext)) !== NoContext) {
- {
- if ((executionContext & RenderContext) !== NoContext) {
- error('unstable_flushDiscreteUpdates: Cannot flush updates when React is ' + 'already rendering.');
- }
- } // We're already rendering, so we can't synchronously flush pending work.
- // This is probably a nested event dispatch triggered by a lifecycle/effect,
- // like `el.focus()`. Exit.
-
-
- return;
- }
-
- flushPendingDiscreteUpdates(); // If the discrete updates scheduled passive effects, flush them now so that
- // they fire before the next serial event.
-
- flushPassiveEffects();
- }
-
- function flushPendingDiscreteUpdates() {
- if (rootsWithPendingDiscreteUpdates !== null) {
- // For each root with pending discrete updates, schedule a callback to
- // immediately flush them.
- var roots = rootsWithPendingDiscreteUpdates;
- rootsWithPendingDiscreteUpdates = null;
- roots.forEach(function (root) {
- markDiscreteUpdatesExpired(root);
- ensureRootIsScheduled(root, now());
- });
- } // Now flush the immediate queue.
-
-
- flushSyncCallbackQueue();
- }
-
- function batchedUpdates$1(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext |= BatchedContext;
-
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
-
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
- }
- function batchedEventUpdates$1(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext |= EventContext;
-
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
-
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
- }
- function discreteUpdates$1(fn, a, b, c, d) {
- var prevExecutionContext = executionContext;
- executionContext |= DiscreteEventContext;
-
- {
- try {
- return runWithPriority$1(UserBlockingPriority$2, fn.bind(null, a, b, c, d));
- } finally {
- executionContext = prevExecutionContext;
-
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
- }
- }
- function unbatchedUpdates(fn, a) {
- var prevExecutionContext = executionContext;
- executionContext &= ~BatchedContext;
- executionContext |= LegacyUnbatchedContext;
-
- try {
- return fn(a);
- } finally {
- executionContext = prevExecutionContext;
-
- if (executionContext === NoContext) {
- // Flush the immediate callbacks that were scheduled during this batch
- resetRenderTimer();
- flushSyncCallbackQueue();
- }
- }
- }
- function flushSync(fn, a) {
- var prevExecutionContext = executionContext;
-
- if ((prevExecutionContext & (RenderContext | CommitContext)) !== NoContext) {
- {
- error('flushSync was called from inside a lifecycle method. React cannot ' + 'flush when React is already rendering. Consider moving this call to ' + 'a scheduler task or micro task.');
- }
-
- return fn(a);
- }
-
- executionContext |= BatchedContext;
-
- {
- try {
- if (fn) {
- return runWithPriority$1(ImmediatePriority$1, fn.bind(null, a));
- } else {
- return undefined;
- }
- } finally {
- executionContext = prevExecutionContext; // Flush the immediate callbacks that were scheduled during this batch.
- // Note that this will happen even if batchedUpdates is higher up
- // the stack.
-
- flushSyncCallbackQueue();
- }
- }
- }
- function pushRenderLanes(fiber, lanes) {
- push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
- subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
- workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
- }
- function popRenderLanes(fiber) {
- subtreeRenderLanes = subtreeRenderLanesCursor.current;
- pop(subtreeRenderLanesCursor, fiber);
- }
-
- function prepareFreshStack(root, lanes) {
- root.finishedWork = null;
- root.finishedLanes = NoLanes;
- var timeoutHandle = root.timeoutHandle;
-
- if (timeoutHandle !== noTimeout) {
- // The root previous suspended and scheduled a timeout to commit a fallback
- // state. Now that we have additional work, cancel the timeout.
- root.timeoutHandle = noTimeout; // $FlowFixMe Complains noTimeout is not a TimeoutID, despite the check above
-
- cancelTimeout(timeoutHandle);
- }
-
- if (workInProgress !== null) {
- var interruptedWork = workInProgress.return;
-
- while (interruptedWork !== null) {
- unwindInterruptedWork(interruptedWork);
- interruptedWork = interruptedWork.return;
- }
- }
-
- workInProgressRoot = root;
- workInProgress = createWorkInProgress(root.current, null);
- workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
- workInProgressRootExitStatus = RootIncomplete;
- workInProgressRootFatalError = null;
- workInProgressRootSkippedLanes = NoLanes;
- workInProgressRootUpdatedLanes = NoLanes;
- workInProgressRootPingedLanes = NoLanes;
-
- {
- spawnedWorkDuringRender = null;
- }
-
- {
- ReactStrictModeWarnings.discardPendingWarnings();
- }
- }
-
- function handleError(root, thrownValue) {
- do {
- var erroredWork = workInProgress;
-
- try {
- // Reset module-level state that was set during the render phase.
- resetContextDependencies();
- resetHooksAfterThrow();
- resetCurrentFiber(); // TODO: I found and added this missing line while investigating a
- // separate issue. Write a regression test using string refs.
-
- ReactCurrentOwner$2.current = null;
-
- if (erroredWork === null || erroredWork.return === null) {
- // Expected to be working on a non-root fiber. This is a fatal error
- // because there's no ancestor that can handle it; the root is
- // supposed to capture all errors that weren't caught by an error
- // boundary.
- workInProgressRootExitStatus = RootFatalErrored;
- workInProgressRootFatalError = thrownValue; // Set `workInProgress` to null. This represents advancing to the next
- // sibling, or the parent if there are no siblings. But since the root
- // has no siblings nor a parent, we set it to null. Usually this is
- // handled by `completeUnitOfWork` or `unwindWork`, but since we're
- // intentionally not calling those, we need set it here.
- // TODO: Consider calling `unwindWork` to pop the contexts.
-
- workInProgress = null;
- return;
- }
-
- if (enableProfilerTimer && erroredWork.mode & ProfileMode) {
- // Record the time spent rendering before an error was thrown. This
- // avoids inaccurate Profiler durations in the case of a
- // suspended render.
- stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);
- }
-
- throwException(root, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
- completeUnitOfWork(erroredWork);
- } catch (yetAnotherThrownValue) {
- // Something in the return path also threw.
- thrownValue = yetAnotherThrownValue;
-
- if (workInProgress === erroredWork && erroredWork !== null) {
- // If this boundary has already errored, then we had trouble processing
- // the error. Bubble it to the next boundary.
- erroredWork = erroredWork.return;
- workInProgress = erroredWork;
- } else {
- erroredWork = workInProgress;
- }
-
- continue;
- } // Return to the normal work loop.
-
-
- return;
- } while (true);
- }
-
- function pushDispatcher() {
- var prevDispatcher = ReactCurrentDispatcher$2.current;
- ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;
-
- if (prevDispatcher === null) {
- // The React isomorphic package does not include a default dispatcher.
- // Instead the first renderer will lazily attach one, in order to give
- // nicer error messages.
- return ContextOnlyDispatcher;
- } else {
- return prevDispatcher;
- }
- }
-
- function popDispatcher(prevDispatcher) {
- ReactCurrentDispatcher$2.current = prevDispatcher;
- }
-
- function pushInteractions(root) {
- {
- var prevInteractions = __interactionsRef.current;
- __interactionsRef.current = root.memoizedInteractions;
- return prevInteractions;
- }
- }
-
- function popInteractions(prevInteractions) {
- {
- __interactionsRef.current = prevInteractions;
- }
- }
-
- function markCommitTimeOfFallback() {
- globalMostRecentFallbackTime = now();
- }
- function markSkippedUpdateLanes(lane) {
- workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
- }
- function renderDidSuspend() {
- if (workInProgressRootExitStatus === RootIncomplete) {
- workInProgressRootExitStatus = RootSuspended;
- }
- }
- function renderDidSuspendDelayIfPossible() {
- if (workInProgressRootExitStatus === RootIncomplete || workInProgressRootExitStatus === RootSuspended) {
- workInProgressRootExitStatus = RootSuspendedWithDelay;
- } // Check if there are updates that we skipped tree that might have unblocked
- // this render.
-
-
- if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootUpdatedLanes))) {
- // Mark the current render as suspended so that we switch to working on
- // the updates that were skipped. Usually we only suspend at the end of
- // the render phase.
- // TODO: We should probably always mark the root as suspended immediately
- // (inside this function), since by suspending at the end of the render
- // phase introduces a potential mistake where we suspend lanes that were
- // pinged or updated while we were rendering.
- markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
- }
- }
- function renderDidError() {
- if (workInProgressRootExitStatus !== RootCompleted) {
- workInProgressRootExitStatus = RootErrored;
- }
- } // Called during render to determine if anything has suspended.
- // Returns false if we're not sure.
-
- function renderHasNotSuspendedYet() {
- // If something errored or completed, we can't really be sure,
- // so those are false.
- return workInProgressRootExitStatus === RootIncomplete;
- }
-
- function renderRootSync(root, lanes) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
-
- if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
- prepareFreshStack(root, lanes);
- startWorkOnPendingInteractions(root, lanes);
- }
-
- var prevInteractions = pushInteractions(root);
-
- do {
- try {
- workLoopSync();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
-
- resetContextDependencies();
-
- {
- popInteractions(prevInteractions);
- }
-
- executionContext = prevExecutionContext;
- popDispatcher(prevDispatcher);
-
- if (workInProgress !== null) {
- // This is a sync render, so we should have finished the whole tree.
- {
- {
- throw Error( "Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue." );
- }
- }
- }
-
-
- workInProgressRoot = null;
- workInProgressRootRenderLanes = NoLanes;
- return workInProgressRootExitStatus;
- } // The work loop is an extremely hot path. Tell Closure not to inline it.
-
- /** @noinline */
-
-
- function workLoopSync() {
- // Already timed out, so perform work without checking if we need to yield.
- while (workInProgress !== null) {
- performUnitOfWork(workInProgress);
- }
- }
-
- function renderRootConcurrent(root, lanes) {
- var prevExecutionContext = executionContext;
- executionContext |= RenderContext;
- var prevDispatcher = pushDispatcher(); // If the root or lanes have changed, throw out the existing stack
- // and prepare a fresh one. Otherwise we'll continue where we left off.
-
- if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes) {
- resetRenderTimer();
- prepareFreshStack(root, lanes);
- startWorkOnPendingInteractions(root, lanes);
- }
-
- var prevInteractions = pushInteractions(root);
-
- do {
- try {
- workLoopConcurrent();
- break;
- } catch (thrownValue) {
- handleError(root, thrownValue);
- }
- } while (true);
-
- resetContextDependencies();
-
- {
- popInteractions(prevInteractions);
- }
-
- popDispatcher(prevDispatcher);
- executionContext = prevExecutionContext;
-
-
- if (workInProgress !== null) {
-
- return RootIncomplete;
- } else {
-
-
- workInProgressRoot = null;
- workInProgressRootRenderLanes = NoLanes; // Return the final exit status.
-
- return workInProgressRootExitStatus;
- }
- }
- /** @noinline */
-
-
- function workLoopConcurrent() {
- // Perform work until Scheduler asks us to yield
- while (workInProgress !== null && !shouldYield()) {
- performUnitOfWork(workInProgress);
- }
- }
-
- function performUnitOfWork(unitOfWork) {
- // The current, flushed, state of this fiber is the alternate. Ideally
- // nothing should rely on this, but relying on it here means that we don't
- // need an additional field on the work in progress.
- var current = unitOfWork.alternate;
- setCurrentFiber(unitOfWork);
- var next;
-
- if ( (unitOfWork.mode & ProfileMode) !== NoMode) {
- startProfilerTimer(unitOfWork);
- next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
- stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
- } else {
- next = beginWork$1(current, unitOfWork, subtreeRenderLanes);
- }
-
- resetCurrentFiber();
- unitOfWork.memoizedProps = unitOfWork.pendingProps;
-
- if (next === null) {
- // If this doesn't spawn new work, complete the current work.
- completeUnitOfWork(unitOfWork);
- } else {
- workInProgress = next;
- }
-
- ReactCurrentOwner$2.current = null;
- }
-
- function completeUnitOfWork(unitOfWork) {
- // Attempt to complete the current unit of work, then move to the next
- // sibling. If there are no more siblings, return to the parent fiber.
- var completedWork = unitOfWork;
-
- do {
- // The current, flushed, state of this fiber is the alternate. Ideally
- // nothing should rely on this, but relying on it here means that we don't
- // need an additional field on the work in progress.
- var current = completedWork.alternate;
- var returnFiber = completedWork.return; // Check if the work completed or if something threw.
-
- if ((completedWork.flags & Incomplete) === NoFlags) {
- setCurrentFiber(completedWork);
- var next = void 0;
-
- if ( (completedWork.mode & ProfileMode) === NoMode) {
- next = completeWork(current, completedWork, subtreeRenderLanes);
- } else {
- startProfilerTimer(completedWork);
- next = completeWork(current, completedWork, subtreeRenderLanes); // Update render duration assuming we didn't error.
-
- stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
- }
-
- resetCurrentFiber();
-
- if (next !== null) {
- // Completing this fiber spawned new work. Work on that next.
- workInProgress = next;
- return;
- }
-
- resetChildLanes(completedWork);
-
- if (returnFiber !== null && // Do not append effects to parents if a sibling failed to complete
- (returnFiber.flags & Incomplete) === NoFlags) {
- // Append all the effects of the subtree and this fiber onto the effect
- // list of the parent. The completion order of the children affects the
- // side-effect order.
- if (returnFiber.firstEffect === null) {
- returnFiber.firstEffect = completedWork.firstEffect;
- }
-
- if (completedWork.lastEffect !== null) {
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = completedWork.firstEffect;
- }
-
- returnFiber.lastEffect = completedWork.lastEffect;
- } // If this fiber had side-effects, we append it AFTER the children's
- // side-effects. We can perform certain side-effects earlier if needed,
- // by doing multiple passes over the effect list. We don't want to
- // schedule our own side-effect on our own list because if end up
- // reusing children we'll schedule this effect onto itself since we're
- // at the end.
-
-
- var flags = completedWork.flags; // Skip both NoWork and PerformedWork tags when creating the effect
- // list. PerformedWork effect is read by React DevTools but shouldn't be
- // committed.
-
- if (flags > PerformedWork) {
- if (returnFiber.lastEffect !== null) {
- returnFiber.lastEffect.nextEffect = completedWork;
- } else {
- returnFiber.firstEffect = completedWork;
- }
-
- returnFiber.lastEffect = completedWork;
- }
- }
- } else {
- // This fiber did not complete because something threw. Pop values off
- // the stack without entering the complete phase. If this is a boundary,
- // capture values if possible.
- var _next = unwindWork(completedWork); // Because this fiber did not complete, don't reset its expiration time.
-
-
- if (_next !== null) {
- // If completing this work spawned new work, do that next. We'll come
- // back here again.
- // Since we're restarting, remove anything that is not a host effect
- // from the effect tag.
- _next.flags &= HostEffectMask;
- workInProgress = _next;
- return;
- }
-
- if ( (completedWork.mode & ProfileMode) !== NoMode) {
- // Record the render duration for the fiber that errored.
- stopProfilerTimerIfRunningAndRecordDelta(completedWork, false); // Include the time spent working on failed children before continuing.
-
- var actualDuration = completedWork.actualDuration;
- var child = completedWork.child;
-
- while (child !== null) {
- actualDuration += child.actualDuration;
- child = child.sibling;
- }
-
- completedWork.actualDuration = actualDuration;
- }
-
- if (returnFiber !== null) {
- // Mark the parent fiber as incomplete and clear its effect list.
- returnFiber.firstEffect = returnFiber.lastEffect = null;
- returnFiber.flags |= Incomplete;
- }
- }
-
- var siblingFiber = completedWork.sibling;
-
- if (siblingFiber !== null) {
- // If there is more work to do in this returnFiber, do that next.
- workInProgress = siblingFiber;
- return;
- } // Otherwise, return to the parent
-
-
- completedWork = returnFiber; // Update the next thing we're working on in case something throws.
-
- workInProgress = completedWork;
- } while (completedWork !== null); // We've reached the root.
-
-
- if (workInProgressRootExitStatus === RootIncomplete) {
- workInProgressRootExitStatus = RootCompleted;
- }
- }
-
- function resetChildLanes(completedWork) {
- if ( // TODO: Move this check out of the hot path by moving `resetChildLanes`
- // to switch statement in `completeWork`.
- (completedWork.tag === LegacyHiddenComponent || completedWork.tag === OffscreenComponent) && completedWork.memoizedState !== null && !includesSomeLane(subtreeRenderLanes, OffscreenLane) && (completedWork.mode & ConcurrentMode) !== NoLanes) {
- // The children of this component are hidden. Don't bubble their
- // expiration times.
- return;
- }
-
- var newChildLanes = NoLanes; // Bubble up the earliest expiration time.
-
- if ( (completedWork.mode & ProfileMode) !== NoMode) {
- // In profiling mode, resetChildExpirationTime is also used to reset
- // profiler durations.
- var actualDuration = completedWork.actualDuration;
- var treeBaseDuration = completedWork.selfBaseDuration; // When a fiber is cloned, its actualDuration is reset to 0. This value will
- // only be updated if work is done on the fiber (i.e. it doesn't bailout).
- // When work is done, it should bubble to the parent's actualDuration. If
- // the fiber has not been cloned though, (meaning no work was done), then
- // this value will reflect the amount of time spent working on a previous
- // render. In that case it should not bubble. We determine whether it was
- // cloned by comparing the child pointer.
-
- var shouldBubbleActualDurations = completedWork.alternate === null || completedWork.child !== completedWork.alternate.child;
- var child = completedWork.child;
-
- while (child !== null) {
- newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));
-
- if (shouldBubbleActualDurations) {
- actualDuration += child.actualDuration;
- }
-
- treeBaseDuration += child.treeBaseDuration;
- child = child.sibling;
- }
-
- var isTimedOutSuspense = completedWork.tag === SuspenseComponent && completedWork.memoizedState !== null;
-
- if (isTimedOutSuspense) {
- // Don't count time spent in a timed out Suspense subtree as part of the base duration.
- var primaryChildFragment = completedWork.child;
-
- if (primaryChildFragment !== null) {
- treeBaseDuration -= primaryChildFragment.treeBaseDuration;
- }
- }
-
- completedWork.actualDuration = actualDuration;
- completedWork.treeBaseDuration = treeBaseDuration;
- } else {
- var _child = completedWork.child;
-
- while (_child !== null) {
- newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
- _child = _child.sibling;
- }
- }
-
- completedWork.childLanes = newChildLanes;
- }
-
- function commitRoot(root) {
- var renderPriorityLevel = getCurrentPriorityLevel();
- runWithPriority$1(ImmediatePriority$1, commitRootImpl.bind(null, root, renderPriorityLevel));
- return null;
- }
-
- function commitRootImpl(root, renderPriorityLevel) {
- do {
- // `flushPassiveEffects` will call `flushSyncUpdateQueue` at the end, which
- // means `flushPassiveEffects` will sometimes result in additional
- // passive effects. So we need to keep flushing in a loop until there are
- // no more pending effects.
- // TODO: Might be better if `flushPassiveEffects` did not automatically
- // flush synchronous work at the end, to avoid factoring hazards like this.
- flushPassiveEffects();
- } while (rootWithPendingPassiveEffects !== null);
-
- flushRenderPhaseStrictModeWarningsInDEV();
-
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Should not already be working." );
- }
- }
-
- var finishedWork = root.finishedWork;
- var lanes = root.finishedLanes;
-
- if (finishedWork === null) {
-
- return null;
- }
-
- root.finishedWork = null;
- root.finishedLanes = NoLanes;
-
- if (!(finishedWork !== root.current)) {
- {
- throw Error( "Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue." );
- }
- } // commitRoot never returns a continuation; it always finishes synchronously.
- // So we can clear these now to allow a new callback to be scheduled.
-
-
- root.callbackNode = null; // Update the first and last pending times on this root. The new first
- // pending time is whatever is left on the root fiber.
-
- var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
- markRootFinished(root, remainingLanes); // Clear already finished discrete updates in case that a later call of
- // `flushDiscreteUpdates` starts a useless render pass which may cancels
- // a scheduled timeout.
-
- if (rootsWithPendingDiscreteUpdates !== null) {
- if (!hasDiscreteLanes(remainingLanes) && rootsWithPendingDiscreteUpdates.has(root)) {
- rootsWithPendingDiscreteUpdates.delete(root);
- }
- }
-
- if (root === workInProgressRoot) {
- // We can reset these now that they are finished.
- workInProgressRoot = null;
- workInProgress = null;
- workInProgressRootRenderLanes = NoLanes;
- } // Get the list of effects.
-
-
- var firstEffect;
-
- if (finishedWork.flags > PerformedWork) {
- // A fiber's effect list consists only of its children, not itself. So if
- // the root has an effect, we need to add it to the end of the list. The
- // resulting list is the set that would belong to the root's parent, if it
- // had one; that is, all the effects in the tree including the root.
- if (finishedWork.lastEffect !== null) {
- finishedWork.lastEffect.nextEffect = finishedWork;
- firstEffect = finishedWork.firstEffect;
- } else {
- firstEffect = finishedWork;
- }
- } else {
- // There is no effect on the root.
- firstEffect = finishedWork.firstEffect;
- }
-
- if (firstEffect !== null) {
-
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- var prevInteractions = pushInteractions(root); // Reset this to null before calling lifecycles
-
- ReactCurrentOwner$2.current = null; // The commit phase is broken into several sub-phases. We do a separate pass
- // of the effect list for each phase: all mutation effects come before all
- // layout effects, and so on.
- // The first phase a "before mutation" phase. We use this phase to read the
- // state of the host tree right before we mutate it. This is where
- // getSnapshotBeforeUpdate is called.
-
- focusedInstanceHandle = prepareForCommit(root.containerInfo);
- shouldFireAfterActiveInstanceBlur = false;
- nextEffect = firstEffect;
-
- do {
- {
- invokeGuardedCallback(null, commitBeforeMutationEffects, null);
-
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var error = clearCaughtError();
- captureCommitPhaseError(nextEffect, error);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null); // We no longer need to track the active instance fiber
-
-
- focusedInstanceHandle = null;
-
- {
- // Mark the current commit time to be shared by all Profilers in this
- // batch. This enables them to be grouped later.
- recordCommitTime();
- } // The next phase is the mutation phase, where we mutate the host tree.
-
-
- nextEffect = firstEffect;
-
- do {
- {
- invokeGuardedCallback(null, commitMutationEffects, null, root, renderPriorityLevel);
-
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var _error = clearCaughtError();
-
- captureCommitPhaseError(nextEffect, _error);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null);
-
- resetAfterCommit(root.containerInfo); // The work-in-progress tree is now the current tree. This must come after
- // the mutation phase, so that the previous tree is still current during
- // componentWillUnmount, but before the layout phase, so that the finished
- // work is current during componentDidMount/Update.
-
- root.current = finishedWork; // The next phase is the layout phase, where we call effects that read
- // the host tree after it's been mutated. The idiomatic use case for this is
- // layout, but class component lifecycles also fire here for legacy reasons.
-
- nextEffect = firstEffect;
-
- do {
- {
- invokeGuardedCallback(null, commitLayoutEffects, null, root, lanes);
-
- if (hasCaughtError()) {
- if (!(nextEffect !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var _error2 = clearCaughtError();
-
- captureCommitPhaseError(nextEffect, _error2);
- nextEffect = nextEffect.nextEffect;
- }
- }
- } while (nextEffect !== null);
-
- nextEffect = null; // Tell Scheduler to yield at the end of the frame, so the browser has an
- // opportunity to paint.
-
- requestPaint();
-
- {
- popInteractions(prevInteractions);
- }
-
- executionContext = prevExecutionContext;
- } else {
- // No effects.
- root.current = finishedWork; // Measure these anyway so the flamegraph explicitly shows that there were
- // no effects.
- // TODO: Maybe there's a better way to report this.
-
- {
- recordCommitTime();
- }
- }
-
- var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
-
- if (rootDoesHavePassiveEffects) {
- // This commit has passive effects. Stash a reference to them. But don't
- // schedule a callback until after flushing layout work.
- rootDoesHavePassiveEffects = false;
- rootWithPendingPassiveEffects = root;
- pendingPassiveEffectsLanes = lanes;
- pendingPassiveEffectsRenderPriority = renderPriorityLevel;
- } else {
- // We are done with the effect chain at this point so let's clear the
- // nextEffect pointers to assist with GC. If we have passive effects, we'll
- // clear this in flushPassiveEffects.
- nextEffect = firstEffect;
-
- while (nextEffect !== null) {
- var nextNextEffect = nextEffect.nextEffect;
- nextEffect.nextEffect = null;
-
- if (nextEffect.flags & Deletion) {
- detachFiberAfterEffects(nextEffect);
- }
-
- nextEffect = nextNextEffect;
- }
- } // Read this again, since an effect might have updated it
-
-
- remainingLanes = root.pendingLanes; // Check if there's remaining work on this root
-
- if (remainingLanes !== NoLanes) {
- {
- if (spawnedWorkDuringRender !== null) {
- var expirationTimes = spawnedWorkDuringRender;
- spawnedWorkDuringRender = null;
-
- for (var i = 0; i < expirationTimes.length; i++) {
- scheduleInteractions(root, expirationTimes[i], root.memoizedInteractions);
- }
- }
-
- schedulePendingInteractions(root, remainingLanes);
- }
- } else {
- // If there's no remaining work, we can clear the set of already failed
- // error boundaries.
- legacyErrorBoundariesThatAlreadyFailed = null;
- }
-
- {
- if (!rootDidHavePassiveEffects) {
- // If there are no passive effects, then we can complete the pending interactions.
- // Otherwise, we'll wait until after the passive effects are flushed.
- // Wait to do this until after remaining work has been scheduled,
- // so that we don't prematurely signal complete for interactions when there's e.g. hidden work.
- finishPendingInteractions(root, lanes);
- }
- }
-
- if (remainingLanes === SyncLane) {
- // Count the number of times the root synchronously re-renders without
- // finishing. If there are too many, it indicates an infinite update loop.
- if (root === rootWithNestedUpdates) {
- nestedUpdateCount++;
- } else {
- nestedUpdateCount = 0;
- rootWithNestedUpdates = root;
- }
- } else {
- nestedUpdateCount = 0;
- }
-
- onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
-
- {
- onCommitRoot$1();
- } // Always call this before exiting `commitRoot`, to ensure that any
- // additional work on this root is scheduled.
-
-
- ensureRootIsScheduled(root, now());
-
- if (hasUncaughtError) {
- hasUncaughtError = false;
- var _error3 = firstUncaughtError;
- firstUncaughtError = null;
- throw _error3;
- }
-
- if ((executionContext & LegacyUnbatchedContext) !== NoContext) {
- // a ReactDOM.render-ed root inside of batchedUpdates. The commit fired
- // synchronously, but layout updates should be deferred until the end
- // of the batch.
-
-
- return null;
- } // If layout work was scheduled, flush it now.
-
-
- flushSyncCallbackQueue();
-
- return null;
- }
-
- function commitBeforeMutationEffects() {
- while (nextEffect !== null) {
- var current = nextEffect.alternate;
-
- if (!shouldFireAfterActiveInstanceBlur && focusedInstanceHandle !== null) {
- if ((nextEffect.flags & Deletion) !== NoFlags) {
- if (doesFiberContain(nextEffect, focusedInstanceHandle)) {
- shouldFireAfterActiveInstanceBlur = true;
- }
- } else {
- // TODO: Move this out of the hot path using a dedicated effect tag.
- if (nextEffect.tag === SuspenseComponent && isSuspenseBoundaryBeingHidden(current, nextEffect) && doesFiberContain(nextEffect, focusedInstanceHandle)) {
- shouldFireAfterActiveInstanceBlur = true;
- }
- }
- }
-
- var flags = nextEffect.flags;
-
- if ((flags & Snapshot) !== NoFlags) {
- setCurrentFiber(nextEffect);
- commitBeforeMutationLifeCycles(current, nextEffect);
- resetCurrentFiber();
- }
-
- if ((flags & Passive) !== NoFlags) {
- // If there are passive effects, schedule a callback to flush at
- // the earliest opportunity.
- if (!rootDoesHavePassiveEffects) {
- rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects();
- return null;
- });
- }
- }
-
- nextEffect = nextEffect.nextEffect;
- }
- }
-
- function commitMutationEffects(root, renderPriorityLevel) {
- // TODO: Should probably move the bulk of this function to commitWork.
- while (nextEffect !== null) {
- setCurrentFiber(nextEffect);
- var flags = nextEffect.flags;
-
- if (flags & ContentReset) {
- commitResetTextContent(nextEffect);
- }
-
- if (flags & Ref) {
- var current = nextEffect.alternate;
-
- if (current !== null) {
- commitDetachRef(current);
- }
- } // The following switch statement is only concerned about placement,
- // updates, and deletions. To avoid needing to add a case for every possible
- // bitmap value, we remove the secondary effects from the effect tag and
- // switch on that value.
-
-
- var primaryFlags = flags & (Placement | Update | Deletion | Hydrating);
-
- switch (primaryFlags) {
- case Placement:
- {
- commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
- // inserted, before any life-cycles like componentDidMount gets called.
- // TODO: findDOMNode doesn't rely on this any more but isMounted does
- // and isMounted is deprecated anyway so we should be able to kill this.
-
- nextEffect.flags &= ~Placement;
- break;
- }
-
- case PlacementAndUpdate:
- {
- // Placement
- commitPlacement(nextEffect); // Clear the "placement" from effect tag so that we know that this is
- // inserted, before any life-cycles like componentDidMount gets called.
-
- nextEffect.flags &= ~Placement; // Update
-
- var _current = nextEffect.alternate;
- commitWork(_current, nextEffect);
- break;
- }
-
- case Hydrating:
- {
- nextEffect.flags &= ~Hydrating;
- break;
- }
-
- case HydratingAndUpdate:
- {
- nextEffect.flags &= ~Hydrating; // Update
-
- var _current2 = nextEffect.alternate;
- commitWork(_current2, nextEffect);
- break;
- }
-
- case Update:
- {
- var _current3 = nextEffect.alternate;
- commitWork(_current3, nextEffect);
- break;
- }
-
- case Deletion:
- {
- commitDeletion(root, nextEffect);
- break;
- }
- }
-
- resetCurrentFiber();
- nextEffect = nextEffect.nextEffect;
- }
- }
-
- function commitLayoutEffects(root, committedLanes) {
-
-
- while (nextEffect !== null) {
- setCurrentFiber(nextEffect);
- var flags = nextEffect.flags;
-
- if (flags & (Update | Callback)) {
- var current = nextEffect.alternate;
- commitLifeCycles(root, current, nextEffect);
- }
-
- {
- if (flags & Ref) {
- commitAttachRef(nextEffect);
- }
- }
-
- resetCurrentFiber();
- nextEffect = nextEffect.nextEffect;
- }
- }
-
- function flushPassiveEffects() {
- // Returns whether passive effects were flushed.
- if (pendingPassiveEffectsRenderPriority !== NoPriority$1) {
- var priorityLevel = pendingPassiveEffectsRenderPriority > NormalPriority$1 ? NormalPriority$1 : pendingPassiveEffectsRenderPriority;
- pendingPassiveEffectsRenderPriority = NoPriority$1;
-
- {
- return runWithPriority$1(priorityLevel, flushPassiveEffectsImpl);
- }
- }
-
- return false;
- }
- function enqueuePendingPassiveHookEffectMount(fiber, effect) {
- pendingPassiveHookEffectsMount.push(effect, fiber);
-
- if (!rootDoesHavePassiveEffects) {
- rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects();
- return null;
- });
- }
- }
- function enqueuePendingPassiveHookEffectUnmount(fiber, effect) {
- pendingPassiveHookEffectsUnmount.push(effect, fiber);
-
- {
- fiber.flags |= PassiveUnmountPendingDev;
- var alternate = fiber.alternate;
-
- if (alternate !== null) {
- alternate.flags |= PassiveUnmountPendingDev;
- }
- }
-
- if (!rootDoesHavePassiveEffects) {
- rootDoesHavePassiveEffects = true;
- scheduleCallback(NormalPriority$1, function () {
- flushPassiveEffects();
- return null;
- });
- }
- }
-
- function invokePassiveEffectCreate(effect) {
- var create = effect.create;
- effect.destroy = create();
- }
-
- function flushPassiveEffectsImpl() {
- if (rootWithPendingPassiveEffects === null) {
- return false;
- }
-
- var root = rootWithPendingPassiveEffects;
- var lanes = pendingPassiveEffectsLanes;
- rootWithPendingPassiveEffects = null;
- pendingPassiveEffectsLanes = NoLanes;
-
- if (!((executionContext & (RenderContext | CommitContext)) === NoContext)) {
- {
- throw Error( "Cannot flush passive effects while already rendering." );
- }
- }
-
- {
- isFlushingPassiveEffects = true;
- }
-
- var prevExecutionContext = executionContext;
- executionContext |= CommitContext;
- var prevInteractions = pushInteractions(root); // It's important that ALL pending passive effect destroy functions are called
- // before ANY passive effect create functions are called.
- // Otherwise effects in sibling components might interfere with each other.
- // e.g. a destroy function in one component may unintentionally override a ref
- // value set by a create function in another component.
- // Layout effects have the same constraint.
- // First pass: Destroy stale passive effects.
-
- var unmountEffects = pendingPassiveHookEffectsUnmount;
- pendingPassiveHookEffectsUnmount = [];
-
- for (var i = 0; i < unmountEffects.length; i += 2) {
- var _effect = unmountEffects[i];
- var fiber = unmountEffects[i + 1];
- var destroy = _effect.destroy;
- _effect.destroy = undefined;
-
- {
- fiber.flags &= ~PassiveUnmountPendingDev;
- var alternate = fiber.alternate;
-
- if (alternate !== null) {
- alternate.flags &= ~PassiveUnmountPendingDev;
- }
- }
-
- if (typeof destroy === 'function') {
- {
- setCurrentFiber(fiber);
-
- {
- invokeGuardedCallback(null, destroy, null);
- }
-
- if (hasCaughtError()) {
- if (!(fiber !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var error = clearCaughtError();
- captureCommitPhaseError(fiber, error);
- }
-
- resetCurrentFiber();
- }
- }
- } // Second pass: Create new passive effects.
-
-
- var mountEffects = pendingPassiveHookEffectsMount;
- pendingPassiveHookEffectsMount = [];
-
- for (var _i = 0; _i < mountEffects.length; _i += 2) {
- var _effect2 = mountEffects[_i];
- var _fiber = mountEffects[_i + 1];
-
- {
- setCurrentFiber(_fiber);
-
- {
- invokeGuardedCallback(null, invokePassiveEffectCreate, null, _effect2);
- }
-
- if (hasCaughtError()) {
- if (!(_fiber !== null)) {
- {
- throw Error( "Should be working on an effect." );
- }
- }
-
- var _error4 = clearCaughtError();
-
- captureCommitPhaseError(_fiber, _error4);
- }
-
- resetCurrentFiber();
- }
- } // Note: This currently assumes there are no passive effects on the root fiber
- // because the root is not part of its own effect list.
- // This could change in the future.
-
-
- var effect = root.current.firstEffect;
-
- while (effect !== null) {
- var nextNextEffect = effect.nextEffect; // Remove nextEffect pointer to assist GC
-
- effect.nextEffect = null;
-
- if (effect.flags & Deletion) {
- detachFiberAfterEffects(effect);
- }
-
- effect = nextNextEffect;
- }
-
- {
- popInteractions(prevInteractions);
- finishPendingInteractions(root, lanes);
- }
-
- {
- isFlushingPassiveEffects = false;
- }
-
- executionContext = prevExecutionContext;
- flushSyncCallbackQueue(); // If additional passive effects were scheduled, increment a counter. If this
- // exceeds the limit, we'll fire a warning.
-
- nestedPassiveUpdateCount = rootWithPendingPassiveEffects === null ? 0 : nestedPassiveUpdateCount + 1;
- return true;
- }
-
- function isAlreadyFailedLegacyErrorBoundary(instance) {
- return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
- }
- function markLegacyErrorBoundaryAsFailed(instance) {
- if (legacyErrorBoundariesThatAlreadyFailed === null) {
- legacyErrorBoundariesThatAlreadyFailed = new Set([instance]);
- } else {
- legacyErrorBoundariesThatAlreadyFailed.add(instance);
- }
- }
-
- function prepareToThrowUncaughtError(error) {
- if (!hasUncaughtError) {
- hasUncaughtError = true;
- firstUncaughtError = error;
- }
- }
-
- var onUncaughtError = prepareToThrowUncaughtError;
-
- function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {
- var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
- enqueueUpdate(rootFiber, update);
- var eventTime = requestEventTime();
- var root = markUpdateLaneFromFiberToRoot(rootFiber, SyncLane);
-
- if (root !== null) {
- markRootUpdated(root, SyncLane, eventTime);
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, SyncLane);
- }
- }
-
- function captureCommitPhaseError(sourceFiber, error) {
- if (sourceFiber.tag === HostRoot) {
- // Error was thrown at the root. There is no parent, so the root
- // itself should capture it.
- captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);
- return;
- }
-
- var fiber = sourceFiber.return;
-
- while (fiber !== null) {
- if (fiber.tag === HostRoot) {
- captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error);
- return;
- } else if (fiber.tag === ClassComponent) {
- var ctor = fiber.type;
- var instance = fiber.stateNode;
-
- if (typeof ctor.getDerivedStateFromError === 'function' || typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
- var errorInfo = createCapturedValue(error, sourceFiber);
- var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
- enqueueUpdate(fiber, update);
- var eventTime = requestEventTime();
- var root = markUpdateLaneFromFiberToRoot(fiber, SyncLane);
-
- if (root !== null) {
- markRootUpdated(root, SyncLane, eventTime);
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, SyncLane);
- } else {
- // This component has already been unmounted.
- // We can't schedule any follow up work for the root because the fiber is already unmounted,
- // but we can still call the log-only boundary so the error isn't swallowed.
- //
- // TODO This is only a temporary bandaid for the old reconciler fork.
- // We can delete this special case once the new fork is merged.
- if (typeof instance.componentDidCatch === 'function' && !isAlreadyFailedLegacyErrorBoundary(instance)) {
- try {
- instance.componentDidCatch(error, errorInfo);
- } catch (errorToIgnore) {// TODO Ignore this error? Rethrow it?
- // This is kind of an edge case.
- }
- }
- }
-
- return;
- }
- }
-
- fiber = fiber.return;
- }
- }
- function pingSuspendedRoot(root, wakeable, pingedLanes) {
- var pingCache = root.pingCache;
-
- if (pingCache !== null) {
- // The wakeable resolved, so we no longer need to memoize, because it will
- // never be thrown again.
- pingCache.delete(wakeable);
- }
-
- var eventTime = requestEventTime();
- markRootPinged(root, pingedLanes);
-
- if (workInProgressRoot === root && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
- // Received a ping at the same priority level at which we're currently
- // rendering. We might want to restart this render. This should mirror
- // the logic of whether or not a root suspends once it completes.
- // TODO: If we're rendering sync either due to Sync, Batched or expired,
- // we should probably never restart.
- // If we're suspended with delay, or if it's a retry, we'll always suspend
- // so we can always restart.
- if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
- // Restart from the root.
- prepareFreshStack(root, NoLanes);
- } else {
- // Even though we can't restart right now, we might get an
- // opportunity later. So we mark this render as having a ping.
- workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
- }
- }
-
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, pingedLanes);
- }
-
- function retryTimedOutBoundary(boundaryFiber, retryLane) {
- // The boundary fiber (a Suspense component or SuspenseList component)
- // previously was rendered in its fallback state. One of the promises that
- // suspended it has resolved, which means at least part of the tree was
- // likely unblocked. Try rendering again, at a new expiration time.
- if (retryLane === NoLane) {
- retryLane = requestRetryLane(boundaryFiber);
- } // TODO: Special case idle priority?
-
-
- var eventTime = requestEventTime();
- var root = markUpdateLaneFromFiberToRoot(boundaryFiber, retryLane);
-
- if (root !== null) {
- markRootUpdated(root, retryLane, eventTime);
- ensureRootIsScheduled(root, eventTime);
- schedulePendingInteractions(root, retryLane);
- }
- }
- function resolveRetryWakeable(boundaryFiber, wakeable) {
- var retryLane = NoLane; // Default
-
- var retryCache;
-
- {
- retryCache = boundaryFiber.stateNode;
- }
-
- if (retryCache !== null) {
- // The wakeable resolved, so we no longer need to memoize, because it will
- // never be thrown again.
- retryCache.delete(wakeable);
- }
-
- retryTimedOutBoundary(boundaryFiber, retryLane);
- } // Computes the next Just Noticeable Difference (JND) boundary.
- // The theory is that a person can't tell the difference between small differences in time.
- // Therefore, if we wait a bit longer than necessary that won't translate to a noticeable
- // difference in the experience. However, waiting for longer might mean that we can avoid
- // showing an intermediate loading state. The longer we have already waited, the harder it
- // is to tell small differences in time. Therefore, the longer we've already waited,
- // the longer we can wait additionally. At some point we have to give up though.
- // We pick a train model where the next boundary commits at a consistent schedule.
- // These particular numbers are vague estimates. We expect to adjust them based on research.
-
- function jnd(timeElapsed) {
- return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3000 ? 3000 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
- }
-
- function checkForNestedUpdates() {
- if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
- nestedUpdateCount = 0;
- rootWithNestedUpdates = null;
-
- {
- {
- throw Error( "Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops." );
- }
- }
- }
-
- {
- if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
- nestedPassiveUpdateCount = 0;
-
- error('Maximum update depth exceeded. This can happen when a component ' + "calls setState inside useEffect, but useEffect either doesn't " + 'have a dependency array, or one of the dependencies changes on ' + 'every render.');
- }
- }
- }
-
- function flushRenderPhaseStrictModeWarningsInDEV() {
- {
- ReactStrictModeWarnings.flushLegacyContextWarning();
-
- {
- ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
- }
- }
- }
-
- var didWarnStateUpdateForNotYetMountedComponent = null;
-
- function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
- {
- if ((executionContext & RenderContext) !== NoContext) {
- // We let the other warning about render phase updates deal with this one.
- return;
- }
-
- if (!(fiber.mode & (BlockingMode | ConcurrentMode))) {
- return;
- }
-
- var tag = fiber.tag;
-
- if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
- // Only warn for user-defined components, not internal ones like Suspense.
- return;
- } // We show the whole stack but dedupe on the top component's name because
- // the problematic code almost always lies inside that component.
-
-
- var componentName = getComponentName(fiber.type) || 'ReactComponent';
-
- if (didWarnStateUpdateForNotYetMountedComponent !== null) {
- if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
- return;
- }
-
- didWarnStateUpdateForNotYetMountedComponent.add(componentName);
- } else {
- didWarnStateUpdateForNotYetMountedComponent = new Set([componentName]);
- }
-
- var previousFiber = current;
-
- try {
- setCurrentFiber(fiber);
-
- error("Can't perform a React state update on a component that hasn't mounted yet. " + 'This indicates that you have a side-effect in your render function that ' + 'asynchronously later calls tries to update the component. Move this work to ' + 'useEffect instead.');
- } finally {
- if (previousFiber) {
- setCurrentFiber(fiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
-
- var didWarnStateUpdateForUnmountedComponent = null;
-
- function warnAboutUpdateOnUnmountedFiberInDEV(fiber) {
- {
- var tag = fiber.tag;
-
- if (tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent && tag !== Block) {
- // Only warn for user-defined components, not internal ones like Suspense.
- return;
- } // If there are pending passive effects unmounts for this Fiber,
- // we can assume that they would have prevented this update.
-
-
- if ((fiber.flags & PassiveUnmountPendingDev) !== NoFlags) {
- return;
- } // We show the whole stack but dedupe on the top component's name because
- // the problematic code almost always lies inside that component.
-
-
- var componentName = getComponentName(fiber.type) || 'ReactComponent';
-
- if (didWarnStateUpdateForUnmountedComponent !== null) {
- if (didWarnStateUpdateForUnmountedComponent.has(componentName)) {
- return;
- }
-
- didWarnStateUpdateForUnmountedComponent.add(componentName);
- } else {
- didWarnStateUpdateForUnmountedComponent = new Set([componentName]);
- }
-
- if (isFlushingPassiveEffects) ; else {
- var previousFiber = current;
-
- try {
- setCurrentFiber(fiber);
-
- error("Can't perform a React state update on an unmounted component. This " + 'is a no-op, but it indicates a memory leak in your application. To ' + 'fix, cancel all subscriptions and asynchronous tasks in %s.', tag === ClassComponent ? 'the componentWillUnmount method' : 'a useEffect cleanup function');
- } finally {
- if (previousFiber) {
- setCurrentFiber(fiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
- }
-
- var beginWork$1;
-
- {
- var dummyFiber = null;
-
- beginWork$1 = function (current, unitOfWork, lanes) {
- // If a component throws an error, we replay it again in a synchronously
- // dispatched event, so that the debugger will treat it as an uncaught
- // error See ReactErrorUtils for more information.
- // Before entering the begin phase, copy the work-in-progress onto a dummy
- // fiber. If beginWork throws, we'll use this to reset the state.
- var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
-
- try {
- return beginWork(current, unitOfWork, lanes);
- } catch (originalError) {
- if (originalError !== null && typeof originalError === 'object' && typeof originalError.then === 'function') {
- // Don't replay promises. Treat everything else like an error.
- throw originalError;
- } // Keep this code in sync with handleError; any changes here must have
- // corresponding changes there.
-
-
- resetContextDependencies();
- resetHooksAfterThrow(); // Don't reset current debug fiber, since we're about to work on the
- // same fiber again.
- // Unwind the failed stack frame
-
- unwindInterruptedWork(unitOfWork); // Restore the original properties of the fiber.
-
- assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);
-
- if ( unitOfWork.mode & ProfileMode) {
- // Reset the profiler timer.
- startProfilerTimer(unitOfWork);
- } // Run beginWork again.
-
-
- invokeGuardedCallback(null, beginWork, null, current, unitOfWork, lanes);
-
- if (hasCaughtError()) {
- var replayError = clearCaughtError(); // `invokeGuardedCallback` sometimes sets an expando `_suppressLogging`.
- // Rethrow this error instead of the original one.
-
- throw replayError;
- } else {
- // This branch is reachable if the render phase is impure.
- throw originalError;
- }
- }
- };
- }
-
- var didWarnAboutUpdateInRender = false;
- var didWarnAboutUpdateInRenderForAnotherComponent;
-
- {
- didWarnAboutUpdateInRenderForAnotherComponent = new Set();
- }
-
- function warnAboutRenderPhaseUpdatesInDEV(fiber) {
- {
- if (isRendering && (executionContext & RenderContext) !== NoContext && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
- switch (fiber.tag) {
- case FunctionComponent:
- case ForwardRef:
- case SimpleMemoComponent:
- {
- var renderingComponentName = workInProgress && getComponentName(workInProgress.type) || 'Unknown'; // Dedupe by the rendering component because it's the one that needs to be fixed.
-
- var dedupeKey = renderingComponentName;
-
- if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
- didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
- var setStateComponentName = getComponentName(fiber.type) || 'Unknown';
-
- error('Cannot update a component (`%s`) while rendering a ' + 'different component (`%s`). To locate the bad setState() call inside `%s`, ' + 'follow the stack trace as described in https://reactjs.org/link/setstate-in-render', setStateComponentName, renderingComponentName, renderingComponentName);
- }
-
- break;
- }
-
- case ClassComponent:
- {
- if (!didWarnAboutUpdateInRender) {
- error('Cannot update during an existing state transition (such as ' + 'within `render`). Render methods should be a pure ' + 'function of props and state.');
-
- didWarnAboutUpdateInRender = true;
- }
-
- break;
- }
- }
- }
- }
- } // a 'shared' variable that changes when act() opens/closes in tests.
-
-
- var IsThisRendererActing = {
- current: false
- };
- function warnIfNotScopedWithMatchingAct(fiber) {
- {
- if ( IsSomeRendererActing.current === true && IsThisRendererActing.current !== true) {
- var previousFiber = current;
-
- try {
- setCurrentFiber(fiber);
-
- error("It looks like you're using the wrong act() around your test interactions.\n" + 'Be sure to use the matching version of act() corresponding to your renderer:\n\n' + '// for react-dom:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
- 'import {act} fr' + "om 'react-dom/test-utils';\n" + '// ...\n' + 'act(() => ...);\n\n' + '// for react-test-renderer:\n' + // Break up imports to avoid accidentally parsing them as dependencies.
- 'import TestRenderer fr' + "om react-test-renderer';\n" + 'const {act} = TestRenderer;\n' + '// ...\n' + 'act(() => ...);');
- } finally {
- if (previousFiber) {
- setCurrentFiber(fiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
- }
- function warnIfNotCurrentlyActingEffectsInDEV(fiber) {
- {
- if ( (fiber.mode & StrictMode) !== NoMode && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- error('An update to %s ran an effect, but was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
- }
- }
- }
-
- function warnIfNotCurrentlyActingUpdatesInDEV(fiber) {
- {
- if ( executionContext === NoContext && IsSomeRendererActing.current === false && IsThisRendererActing.current === false) {
- var previousFiber = current;
-
- try {
- setCurrentFiber(fiber);
-
- error('An update to %s inside a test was not wrapped in act(...).\n\n' + 'When testing, code that causes React state updates should be ' + 'wrapped into act(...):\n\n' + 'act(() => {\n' + ' /* fire events that update state */\n' + '});\n' + '/* assert on the output */\n\n' + "This ensures that you're testing the behavior the user would see " + 'in the browser.' + ' Learn more at https://reactjs.org/link/wrap-tests-with-act', getComponentName(fiber.type));
- } finally {
- if (previousFiber) {
- setCurrentFiber(fiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
- }
-
- var warnIfNotCurrentlyActingUpdatesInDev = warnIfNotCurrentlyActingUpdatesInDEV; // In tests, we want to enforce a mocked scheduler.
-
- var didWarnAboutUnmockedScheduler = false; // TODO Before we release concurrent mode, revisit this and decide whether a mocked
- // scheduler is the actual recommendation. The alternative could be a testing build,
- // a new lib, or whatever; we dunno just yet. This message is for early adopters
- // to get their tests right.
-
- function warnIfUnmockedScheduler(fiber) {
- {
- if (didWarnAboutUnmockedScheduler === false && unstable_flushAllWithoutAsserting === undefined) {
- if (fiber.mode & BlockingMode || fiber.mode & ConcurrentMode) {
- didWarnAboutUnmockedScheduler = true;
-
- error('In Concurrent or Sync modes, the "scheduler" module needs to be mocked ' + 'to guarantee consistent behaviour across tests and browsers. ' + 'For example, with jest: \n' + // Break up requires to avoid accidentally parsing them as dependencies.
- "jest.mock('scheduler', () => require" + "('scheduler/unstable_mock'));\n\n" + 'For more info, visit https://reactjs.org/link/mock-scheduler');
- }
- }
- }
- }
-
- function computeThreadID(root, lane) {
- // Interaction threads are unique per root and expiration time.
- // NOTE: Intentionally unsound cast. All that matters is that it's a number
- // and it represents a batch of work. Could make a helper function instead,
- // but meh this is fine for now.
- return lane * 1000 + root.interactionThreadID;
- }
-
- function markSpawnedWork(lane) {
-
- if (spawnedWorkDuringRender === null) {
- spawnedWorkDuringRender = [lane];
- } else {
- spawnedWorkDuringRender.push(lane);
- }
- }
-
- function scheduleInteractions(root, lane, interactions) {
-
- if (interactions.size > 0) {
- var pendingInteractionMap = root.pendingInteractionMap;
- var pendingInteractions = pendingInteractionMap.get(lane);
-
- if (pendingInteractions != null) {
- interactions.forEach(function (interaction) {
- if (!pendingInteractions.has(interaction)) {
- // Update the pending async work count for previously unscheduled interaction.
- interaction.__count++;
- }
-
- pendingInteractions.add(interaction);
- });
- } else {
- pendingInteractionMap.set(lane, new Set(interactions)); // Update the pending async work count for the current interactions.
-
- interactions.forEach(function (interaction) {
- interaction.__count++;
- });
- }
-
- var subscriber = __subscriberRef.current;
-
- if (subscriber !== null) {
- var threadID = computeThreadID(root, lane);
- subscriber.onWorkScheduled(interactions, threadID);
- }
- }
- }
-
- function schedulePendingInteractions(root, lane) {
-
- scheduleInteractions(root, lane, __interactionsRef.current);
- }
-
- function startWorkOnPendingInteractions(root, lanes) {
- // we can accurately attribute time spent working on it, And so that cascading
- // work triggered during the render phase will be associated with it.
-
-
- var interactions = new Set();
- root.pendingInteractionMap.forEach(function (scheduledInteractions, scheduledLane) {
- if (includesSomeLane(lanes, scheduledLane)) {
- scheduledInteractions.forEach(function (interaction) {
- return interactions.add(interaction);
- });
- }
- }); // Store the current set of interactions on the FiberRoot for a few reasons:
- // We can re-use it in hot functions like performConcurrentWorkOnRoot()
- // without having to recalculate it. We will also use it in commitWork() to
- // pass to any Profiler onRender() hooks. This also provides DevTools with a
- // way to access it when the onCommitRoot() hook is called.
-
- root.memoizedInteractions = interactions;
-
- if (interactions.size > 0) {
- var subscriber = __subscriberRef.current;
-
- if (subscriber !== null) {
- var threadID = computeThreadID(root, lanes);
-
- try {
- subscriber.onWorkStarted(interactions, threadID);
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority$1, function () {
- throw error;
- });
- }
- }
- }
- }
-
- function finishPendingInteractions(root, committedLanes) {
-
- var remainingLanesAfterCommit = root.pendingLanes;
- var subscriber;
-
- try {
- subscriber = __subscriberRef.current;
-
- if (subscriber !== null && root.memoizedInteractions.size > 0) {
- // FIXME: More than one lane can finish in a single commit.
- var threadID = computeThreadID(root, committedLanes);
- subscriber.onWorkStopped(root.memoizedInteractions, threadID);
- }
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority$1, function () {
- throw error;
- });
- } finally {
- // Clear completed interactions from the pending Map.
- // Unless the render was suspended or cascading work was scheduled,
- // In which case– leave pending interactions until the subsequent render.
- var pendingInteractionMap = root.pendingInteractionMap;
- pendingInteractionMap.forEach(function (scheduledInteractions, lane) {
- // Only decrement the pending interaction count if we're done.
- // If there's still work at the current priority,
- // That indicates that we are waiting for suspense data.
- if (!includesSomeLane(remainingLanesAfterCommit, lane)) {
- pendingInteractionMap.delete(lane);
- scheduledInteractions.forEach(function (interaction) {
- interaction.__count--;
-
- if (subscriber !== null && interaction.__count === 0) {
- try {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- } catch (error) {
- // If the subscriber throws, rethrow it in a separate task
- scheduleCallback(ImmediatePriority$1, function () {
- throw error;
- });
- }
- }
- });
- }
- });
- }
- } // `act` testing API
-
- function shouldForceFlushFallbacksInDEV() {
- // Never force flush in production. This function should get stripped out.
- return actingUpdatesScopeDepth > 0;
- }
- // so we can tell if any async act() calls try to run in parallel.
-
-
- var actingUpdatesScopeDepth = 0;
-
- function detachFiberAfterEffects(fiber) {
- fiber.sibling = null;
- fiber.stateNode = null;
- }
-
- var resolveFamily = null; // $FlowFixMe Flow gets confused by a WeakSet feature check below.
-
- var failedBoundaries = null;
- var setRefreshHandler = function (handler) {
- {
- resolveFamily = handler;
- }
- };
- function resolveFunctionForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
-
- var family = resolveFamily(type);
-
- if (family === undefined) {
- return type;
- } // Use the latest known implementation.
-
-
- return family.current;
- }
- }
- function resolveClassForHotReloading(type) {
- // No implementation differences.
- return resolveFunctionForHotReloading(type);
- }
- function resolveForwardRefForHotReloading(type) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return type;
- }
-
- var family = resolveFamily(type);
-
- if (family === undefined) {
- // Check if we're dealing with a real forwardRef. Don't want to crash early.
- if (type !== null && type !== undefined && typeof type.render === 'function') {
- // ForwardRef is special because its resolved .type is an object,
- // but it's possible that we only have its inner render function in the map.
- // If that inner render function is different, we'll build a new forwardRef type.
- var currentRender = resolveFunctionForHotReloading(type.render);
-
- if (type.render !== currentRender) {
- var syntheticType = {
- $$typeof: REACT_FORWARD_REF_TYPE,
- render: currentRender
- };
-
- if (type.displayName !== undefined) {
- syntheticType.displayName = type.displayName;
- }
-
- return syntheticType;
- }
- }
-
- return type;
- } // Use the latest known implementation.
-
-
- return family.current;
- }
- }
- function isCompatibleFamilyForHotReloading(fiber, element) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return false;
- }
-
- var prevType = fiber.elementType;
- var nextType = element.type; // If we got here, we know types aren't === equal.
-
- var needsCompareFamilies = false;
- var $$typeofNextType = typeof nextType === 'object' && nextType !== null ? nextType.$$typeof : null;
-
- switch (fiber.tag) {
- case ClassComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case FunctionComponent:
- {
- if (typeof nextType === 'function') {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- // We don't know the inner type yet.
- // We're going to assume that the lazy inner type is stable,
- // and so it is sufficient to avoid reconciling it away.
- // We're not going to unwrap or actually use the new lazy type.
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case ForwardRef:
- {
- if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- case MemoComponent:
- case SimpleMemoComponent:
- {
- if ($$typeofNextType === REACT_MEMO_TYPE) {
- // TODO: if it was but can no longer be simple,
- // we shouldn't set this.
- needsCompareFamilies = true;
- } else if ($$typeofNextType === REACT_LAZY_TYPE) {
- needsCompareFamilies = true;
- }
-
- break;
- }
-
- default:
- return false;
- } // Check if both types have a family and it's the same one.
-
-
- if (needsCompareFamilies) {
- // Note: memo() and forwardRef() we'll compare outer rather than inner type.
- // This means both of them need to be registered to preserve state.
- // If we unwrapped and compared the inner types for wrappers instead,
- // then we would risk falsely saying two separate memo(Foo)
- // calls are equivalent because they wrap the same Foo function.
- var prevFamily = resolveFamily(prevType);
-
- if (prevFamily !== undefined && prevFamily === resolveFamily(nextType)) {
- return true;
- }
- }
-
- return false;
- }
- }
- function markFailedErrorBoundaryForHotReloading(fiber) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
-
- if (typeof WeakSet !== 'function') {
- return;
- }
-
- if (failedBoundaries === null) {
- failedBoundaries = new WeakSet();
- }
-
- failedBoundaries.add(fiber);
- }
- }
- var scheduleRefresh = function (root, update) {
- {
- if (resolveFamily === null) {
- // Hot reloading is disabled.
- return;
- }
-
- var staleFamilies = update.staleFamilies,
- updatedFamilies = update.updatedFamilies;
- flushPassiveEffects();
- flushSync(function () {
- scheduleFibersWithFamiliesRecursively(root.current, updatedFamilies, staleFamilies);
- });
- }
- };
- var scheduleRoot = function (root, element) {
- {
- if (root.context !== emptyContextObject) {
- // Super edge case: root has a legacy _renderSubtree context
- // but we don't know the parentComponent so we can't pass it.
- // Just ignore. We'll delete this with _renderSubtree code path later.
- return;
- }
-
- flushPassiveEffects();
- flushSync(function () {
- updateContainer(element, root, null, null);
- });
- }
- };
-
- function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
- {
- var alternate = fiber.alternate,
- child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
-
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
-
- case ForwardRef:
- candidateType = type.render;
- break;
- }
-
- if (resolveFamily === null) {
- throw new Error('Expected resolveFamily to be set during hot reload.');
- }
-
- var needsRender = false;
- var needsRemount = false;
-
- if (candidateType !== null) {
- var family = resolveFamily(candidateType);
-
- if (family !== undefined) {
- if (staleFamilies.has(family)) {
- needsRemount = true;
- } else if (updatedFamilies.has(family)) {
- if (tag === ClassComponent) {
- needsRemount = true;
- } else {
- needsRender = true;
- }
- }
- }
- }
-
- if (failedBoundaries !== null) {
- if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
- needsRemount = true;
- }
- }
-
- if (needsRemount) {
- fiber._debugNeedsRemount = true;
- }
-
- if (needsRemount || needsRender) {
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- }
-
- if (child !== null && !needsRemount) {
- scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
- }
-
- if (sibling !== null) {
- scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
- }
- }
- }
-
- var findHostInstancesForRefresh = function (root, families) {
- {
- var hostInstances = new Set();
- var types = new Set(families.map(function (family) {
- return family.current;
- }));
- findHostInstancesForMatchingFibersRecursively(root.current, types, hostInstances);
- return hostInstances;
- }
- };
-
- function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
- {
- var child = fiber.child,
- sibling = fiber.sibling,
- tag = fiber.tag,
- type = fiber.type;
- var candidateType = null;
-
- switch (tag) {
- case FunctionComponent:
- case SimpleMemoComponent:
- case ClassComponent:
- candidateType = type;
- break;
-
- case ForwardRef:
- candidateType = type.render;
- break;
- }
-
- var didMatch = false;
-
- if (candidateType !== null) {
- if (types.has(candidateType)) {
- didMatch = true;
- }
- }
-
- if (didMatch) {
- // We have a match. This only drills down to the closest host components.
- // There's no need to search deeper because for the purpose of giving
- // visual feedback, "flashing" outermost parent rectangles is sufficient.
- findHostInstancesForFiberShallowly(fiber, hostInstances);
- } else {
- // If there's no match, maybe there will be one further down in the child tree.
- if (child !== null) {
- findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
- }
- }
-
- if (sibling !== null) {
- findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
- }
- }
- }
-
- function findHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
-
- if (foundHostInstances) {
- return;
- } // If we didn't find any host children, fallback to closest host parent.
-
-
- var node = fiber;
-
- while (true) {
- switch (node.tag) {
- case HostComponent:
- hostInstances.add(node.stateNode);
- return;
-
- case HostPortal:
- hostInstances.add(node.stateNode.containerInfo);
- return;
-
- case HostRoot:
- hostInstances.add(node.stateNode.containerInfo);
- return;
- }
-
- if (node.return === null) {
- throw new Error('Expected to reach root first.');
- }
-
- node = node.return;
- }
- }
- }
-
- function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
- {
- var node = fiber;
- var foundHostInstances = false;
-
- while (true) {
- if (node.tag === HostComponent) {
- // We got a match.
- foundHostInstances = true;
- hostInstances.add(node.stateNode); // There may still be more, so keep searching.
- } else if (node.child !== null) {
- node.child.return = node;
- node = node.child;
- continue;
- }
-
- if (node === fiber) {
- return foundHostInstances;
- }
-
- while (node.sibling === null) {
- if (node.return === null || node.return === fiber) {
- return foundHostInstances;
- }
-
- node = node.return;
- }
-
- node.sibling.return = node.return;
- node = node.sibling;
- }
- }
-
- return false;
- }
-
- var hasBadMapPolyfill;
-
- {
- hasBadMapPolyfill = false;
-
- try {
- var nonExtensibleObject = Object.preventExtensions({});
- /* eslint-disable no-new */
-
- new Map([[nonExtensibleObject, null]]);
- new Set([nonExtensibleObject]);
- /* eslint-enable no-new */
- } catch (e) {
- // TODO: Consider warning about bad polyfills
- hasBadMapPolyfill = true;
- }
- }
-
- var debugCounter = 1;
-
- function FiberNode(tag, pendingProps, key, mode) {
- // Instance
- this.tag = tag;
- this.key = key;
- this.elementType = null;
- this.type = null;
- this.stateNode = null; // Fiber
-
- this.return = null;
- this.child = null;
- this.sibling = null;
- this.index = 0;
- this.ref = null;
- this.pendingProps = pendingProps;
- this.memoizedProps = null;
- this.updateQueue = null;
- this.memoizedState = null;
- this.dependencies = null;
- this.mode = mode; // Effects
-
- this.flags = NoFlags;
- this.nextEffect = null;
- this.firstEffect = null;
- this.lastEffect = null;
- this.lanes = NoLanes;
- this.childLanes = NoLanes;
- this.alternate = null;
-
- {
- // Note: The following is done to avoid a v8 performance cliff.
- //
- // Initializing the fields below to smis and later updating them with
- // double values will cause Fibers to end up having separate shapes.
- // This behavior/bug has something to do with Object.preventExtension().
- // Fortunately this only impacts DEV builds.
- // Unfortunately it makes React unusably slow for some applications.
- // To work around this, initialize the fields below with doubles.
- //
- // Learn more about this here:
- // https://github.com/facebook/react/issues/14365
- // https://bugs.chromium.org/p/v8/issues/detail?id=8538
- this.actualDuration = Number.NaN;
- this.actualStartTime = Number.NaN;
- this.selfBaseDuration = Number.NaN;
- this.treeBaseDuration = Number.NaN; // It's okay to replace the initial doubles with smis after initialization.
- // This won't trigger the performance cliff mentioned above,
- // and it simplifies other profiler code (including DevTools).
-
- this.actualDuration = 0;
- this.actualStartTime = -1;
- this.selfBaseDuration = 0;
- this.treeBaseDuration = 0;
- }
-
- {
- // This isn't directly used but is handy for debugging internals:
- this._debugID = debugCounter++;
- this._debugSource = null;
- this._debugOwner = null;
- this._debugNeedsRemount = false;
- this._debugHookTypes = null;
-
- if (!hasBadMapPolyfill && typeof Object.preventExtensions === 'function') {
- Object.preventExtensions(this);
- }
- }
- } // This is a constructor function, rather than a POJO constructor, still
- // please ensure we do the following:
- // 1) Nobody should add any instance methods on this. Instance methods can be
- // more difficult to predict when they get optimized and they are almost
- // never inlined properly in static compilers.
- // 2) Nobody should rely on `instanceof Fiber` for type testing. We should
- // always know when it is a fiber.
- // 3) We might want to experiment with using numeric keys since they are easier
- // to optimize in a non-JIT environment.
- // 4) We can easily go from a constructor to a createFiber object literal if that
- // is faster.
- // 5) It should be easy to port this to a C struct and keep a C implementation
- // compatible.
-
-
- var createFiber = function (tag, pendingProps, key, mode) {
- // $FlowFixMe: the shapes are exact here but Flow doesn't like constructors
- return new FiberNode(tag, pendingProps, key, mode);
- };
-
- function shouldConstruct$1(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
- }
-
- function isSimpleFunctionComponent(type) {
- return typeof type === 'function' && !shouldConstruct$1(type) && type.defaultProps === undefined;
- }
- function resolveLazyComponentTag(Component) {
- if (typeof Component === 'function') {
- return shouldConstruct$1(Component) ? ClassComponent : FunctionComponent;
- } else if (Component !== undefined && Component !== null) {
- var $$typeof = Component.$$typeof;
-
- if ($$typeof === REACT_FORWARD_REF_TYPE) {
- return ForwardRef;
- }
-
- if ($$typeof === REACT_MEMO_TYPE) {
- return MemoComponent;
- }
- }
-
- return IndeterminateComponent;
- } // This is used to create an alternate fiber to do work on.
-
- function createWorkInProgress(current, pendingProps) {
- var workInProgress = current.alternate;
-
- if (workInProgress === null) {
- // We use a double buffering pooling technique because we know that we'll
- // only ever need at most two versions of a tree. We pool the "other" unused
- // node that we're free to reuse. This is lazily created to avoid allocating
- // extra objects for things that are never updated. It also allow us to
- // reclaim the extra memory if needed.
- workInProgress = createFiber(current.tag, pendingProps, current.key, current.mode);
- workInProgress.elementType = current.elementType;
- workInProgress.type = current.type;
- workInProgress.stateNode = current.stateNode;
-
- {
- // DEV-only fields
- workInProgress._debugID = current._debugID;
- workInProgress._debugSource = current._debugSource;
- workInProgress._debugOwner = current._debugOwner;
- workInProgress._debugHookTypes = current._debugHookTypes;
- }
-
- workInProgress.alternate = current;
- current.alternate = workInProgress;
- } else {
- workInProgress.pendingProps = pendingProps; // Needed because Blocks store data on type.
-
- workInProgress.type = current.type; // We already have an alternate.
- // Reset the effect tag.
-
- workInProgress.flags = NoFlags; // The effect list is no longer valid.
-
- workInProgress.nextEffect = null;
- workInProgress.firstEffect = null;
- workInProgress.lastEffect = null;
-
- {
- // We intentionally reset, rather than copy, actualDuration & actualStartTime.
- // This prevents time from endlessly accumulating in new commits.
- // This has the downside of resetting values for different priority renders,
- // But works for yielding (the common case) and should support resuming.
- workInProgress.actualDuration = 0;
- workInProgress.actualStartTime = -1;
- }
- }
-
- workInProgress.childLanes = current.childLanes;
- workInProgress.lanes = current.lanes;
- workInProgress.child = current.child;
- workInProgress.memoizedProps = current.memoizedProps;
- workInProgress.memoizedState = current.memoizedState;
- workInProgress.updateQueue = current.updateQueue; // Clone the dependencies object. This is mutated during the render phase, so
- // it cannot be shared with the current fiber.
-
- var currentDependencies = current.dependencies;
- workInProgress.dependencies = currentDependencies === null ? null : {
- lanes: currentDependencies.lanes,
- firstContext: currentDependencies.firstContext
- }; // These will be overridden during the parent's reconciliation
-
- workInProgress.sibling = current.sibling;
- workInProgress.index = current.index;
- workInProgress.ref = current.ref;
-
- {
- workInProgress.selfBaseDuration = current.selfBaseDuration;
- workInProgress.treeBaseDuration = current.treeBaseDuration;
- }
-
- {
- workInProgress._debugNeedsRemount = current._debugNeedsRemount;
-
- switch (workInProgress.tag) {
- case IndeterminateComponent:
- case FunctionComponent:
- case SimpleMemoComponent:
- workInProgress.type = resolveFunctionForHotReloading(current.type);
- break;
-
- case ClassComponent:
- workInProgress.type = resolveClassForHotReloading(current.type);
- break;
-
- case ForwardRef:
- workInProgress.type = resolveForwardRefForHotReloading(current.type);
- break;
- }
- }
-
- return workInProgress;
- } // Used to reuse a Fiber for a second pass.
-
- function resetWorkInProgress(workInProgress, renderLanes) {
- // This resets the Fiber to what createFiber or createWorkInProgress would
- // have set the values to before during the first pass. Ideally this wouldn't
- // be necessary but unfortunately many code paths reads from the workInProgress
- // when they should be reading from current and writing to workInProgress.
- // We assume pendingProps, index, key, ref, return are still untouched to
- // avoid doing another reconciliation.
- // Reset the effect tag but keep any Placement tags, since that's something
- // that child fiber is setting, not the reconciliation.
- workInProgress.flags &= Placement; // The effect list is no longer valid.
-
- workInProgress.nextEffect = null;
- workInProgress.firstEffect = null;
- workInProgress.lastEffect = null;
- var current = workInProgress.alternate;
-
- if (current === null) {
- // Reset to createFiber's initial values.
- workInProgress.childLanes = NoLanes;
- workInProgress.lanes = renderLanes;
- workInProgress.child = null;
- workInProgress.memoizedProps = null;
- workInProgress.memoizedState = null;
- workInProgress.updateQueue = null;
- workInProgress.dependencies = null;
- workInProgress.stateNode = null;
-
- {
- // Note: We don't reset the actualTime counts. It's useful to accumulate
- // actual time across multiple render passes.
- workInProgress.selfBaseDuration = 0;
- workInProgress.treeBaseDuration = 0;
- }
- } else {
- // Reset to the cloned values that createWorkInProgress would've.
- workInProgress.childLanes = current.childLanes;
- workInProgress.lanes = current.lanes;
- workInProgress.child = current.child;
- workInProgress.memoizedProps = current.memoizedProps;
- workInProgress.memoizedState = current.memoizedState;
- workInProgress.updateQueue = current.updateQueue; // Needed because Blocks store data on type.
-
- workInProgress.type = current.type; // Clone the dependencies object. This is mutated during the render phase, so
- // it cannot be shared with the current fiber.
-
- var currentDependencies = current.dependencies;
- workInProgress.dependencies = currentDependencies === null ? null : {
- lanes: currentDependencies.lanes,
- firstContext: currentDependencies.firstContext
- };
-
- {
- // Note: We don't reset the actualTime counts. It's useful to accumulate
- // actual time across multiple render passes.
- workInProgress.selfBaseDuration = current.selfBaseDuration;
- workInProgress.treeBaseDuration = current.treeBaseDuration;
- }
- }
-
- return workInProgress;
- }
- function createHostRootFiber(tag) {
- var mode;
-
- if (tag === ConcurrentRoot) {
- mode = ConcurrentMode | BlockingMode | StrictMode;
- } else if (tag === BlockingRoot) {
- mode = BlockingMode | StrictMode;
- } else {
- mode = NoMode;
- }
-
- if ( isDevToolsPresent) {
- // Always collect profile timings when DevTools are present.
- // This enables DevTools to start capturing timing at any point–
- // Without some nodes in the tree having empty base times.
- mode |= ProfileMode;
- }
-
- return createFiber(HostRoot, null, null, mode);
- }
- function createFiberFromTypeAndProps(type, // React$ElementType
- key, pendingProps, owner, mode, lanes) {
- var fiberTag = IndeterminateComponent; // The resolved type is set if we know what the final type will be. I.e. it's not lazy.
-
- var resolvedType = type;
-
- if (typeof type === 'function') {
- if (shouldConstruct$1(type)) {
- fiberTag = ClassComponent;
-
- {
- resolvedType = resolveClassForHotReloading(resolvedType);
- }
- } else {
- {
- resolvedType = resolveFunctionForHotReloading(resolvedType);
- }
- }
- } else if (typeof type === 'string') {
- fiberTag = HostComponent;
- } else {
- getTag: switch (type) {
- case REACT_FRAGMENT_TYPE:
- return createFiberFromFragment(pendingProps.children, mode, lanes, key);
-
- case REACT_DEBUG_TRACING_MODE_TYPE:
- fiberTag = Mode;
- mode |= DebugTracingMode;
- break;
-
- case REACT_STRICT_MODE_TYPE:
- fiberTag = Mode;
- mode |= StrictMode;
- break;
-
- case REACT_PROFILER_TYPE:
- return createFiberFromProfiler(pendingProps, mode, lanes, key);
-
- case REACT_SUSPENSE_TYPE:
- return createFiberFromSuspense(pendingProps, mode, lanes, key);
-
- case REACT_SUSPENSE_LIST_TYPE:
- return createFiberFromSuspenseList(pendingProps, mode, lanes, key);
-
- case REACT_OFFSCREEN_TYPE:
- return createFiberFromOffscreen(pendingProps, mode, lanes, key);
-
- case REACT_LEGACY_HIDDEN_TYPE:
- return createFiberFromLegacyHidden(pendingProps, mode, lanes, key);
-
- case REACT_SCOPE_TYPE:
-
- // eslint-disable-next-line no-fallthrough
-
- default:
- {
- if (typeof type === 'object' && type !== null) {
- switch (type.$$typeof) {
- case REACT_PROVIDER_TYPE:
- fiberTag = ContextProvider;
- break getTag;
-
- case REACT_CONTEXT_TYPE:
- // This is a consumer
- fiberTag = ContextConsumer;
- break getTag;
-
- case REACT_FORWARD_REF_TYPE:
- fiberTag = ForwardRef;
-
- {
- resolvedType = resolveForwardRefForHotReloading(resolvedType);
- }
-
- break getTag;
-
- case REACT_MEMO_TYPE:
- fiberTag = MemoComponent;
- break getTag;
-
- case REACT_LAZY_TYPE:
- fiberTag = LazyComponent;
- resolvedType = null;
- break getTag;
-
- case REACT_BLOCK_TYPE:
- fiberTag = Block;
- break getTag;
- }
- }
-
- var info = '';
-
- {
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and " + 'named imports.';
- }
-
- var ownerName = owner ? getComponentName(owner.type) : null;
-
- if (ownerName) {
- info += '\n\nCheck the render method of `' + ownerName + '`.';
- }
- }
-
- {
- {
- throw 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 );
- }
- }
- }
- }
- }
-
- var fiber = createFiber(fiberTag, pendingProps, key, mode);
- fiber.elementType = type;
- fiber.type = resolvedType;
- fiber.lanes = lanes;
-
- {
- fiber._debugOwner = owner;
- }
-
- return fiber;
- }
- function createFiberFromElement(element, mode, lanes) {
- var owner = null;
-
- {
- owner = element._owner;
- }
-
- var type = element.type;
- var key = element.key;
- var pendingProps = element.props;
- var fiber = createFiberFromTypeAndProps(type, key, pendingProps, owner, mode, lanes);
-
- {
- fiber._debugSource = element._source;
- fiber._debugOwner = element._owner;
- }
-
- return fiber;
- }
- function createFiberFromFragment(elements, mode, lanes, key) {
- var fiber = createFiber(Fragment, elements, key, mode);
- fiber.lanes = lanes;
- return fiber;
- }
-
- function createFiberFromProfiler(pendingProps, mode, lanes, key) {
- {
- if (typeof pendingProps.id !== 'string') {
- error('Profiler must specify an "id" as a prop');
- }
- }
-
- var fiber = createFiber(Profiler, pendingProps, key, mode | ProfileMode); // TODO: The Profiler fiber shouldn't have a type. It has a tag.
-
- fiber.elementType = REACT_PROFILER_TYPE;
- fiber.type = REACT_PROFILER_TYPE;
- fiber.lanes = lanes;
-
- {
- fiber.stateNode = {
- effectDuration: 0,
- passiveEffectDuration: 0
- };
- }
-
- return fiber;
- }
-
- function createFiberFromSuspense(pendingProps, mode, lanes, key) {
- var fiber = createFiber(SuspenseComponent, pendingProps, key, mode); // TODO: The SuspenseComponent fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
-
- fiber.type = REACT_SUSPENSE_TYPE;
- fiber.elementType = REACT_SUSPENSE_TYPE;
- fiber.lanes = lanes;
- return fiber;
- }
- function createFiberFromSuspenseList(pendingProps, mode, lanes, key) {
- var fiber = createFiber(SuspenseListComponent, pendingProps, key, mode);
-
- {
- // TODO: The SuspenseListComponent fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
- fiber.type = REACT_SUSPENSE_LIST_TYPE;
- }
-
- fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
- fiber.lanes = lanes;
- return fiber;
- }
- function createFiberFromOffscreen(pendingProps, mode, lanes, key) {
- var fiber = createFiber(OffscreenComponent, pendingProps, key, mode); // TODO: The OffscreenComponent fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
-
- {
- fiber.type = REACT_OFFSCREEN_TYPE;
- }
-
- fiber.elementType = REACT_OFFSCREEN_TYPE;
- fiber.lanes = lanes;
- return fiber;
- }
- function createFiberFromLegacyHidden(pendingProps, mode, lanes, key) {
- var fiber = createFiber(LegacyHiddenComponent, pendingProps, key, mode); // TODO: The LegacyHidden fiber shouldn't have a type. It has a tag.
- // This needs to be fixed in getComponentName so that it relies on the tag
- // instead.
-
- {
- fiber.type = REACT_LEGACY_HIDDEN_TYPE;
- }
-
- fiber.elementType = REACT_LEGACY_HIDDEN_TYPE;
- fiber.lanes = lanes;
- return fiber;
- }
- function createFiberFromText(content, mode, lanes) {
- var fiber = createFiber(HostText, content, null, mode);
- fiber.lanes = lanes;
- return fiber;
- }
- function createFiberFromHostInstanceForDeletion() {
- var fiber = createFiber(HostComponent, null, null, NoMode); // TODO: These should not need a type.
-
- fiber.elementType = 'DELETED';
- fiber.type = 'DELETED';
- return fiber;
- }
- function createFiberFromPortal(portal, mode, lanes) {
- var pendingProps = portal.children !== null ? portal.children : [];
- var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
- fiber.lanes = lanes;
- fiber.stateNode = {
- containerInfo: portal.containerInfo,
- pendingChildren: null,
- // Used by persistent updates
- implementation: portal.implementation
- };
- return fiber;
- } // Used for stashing WIP properties to replay failed work in DEV.
-
- function assignFiberPropertiesInDEV(target, source) {
- if (target === null) {
- // This Fiber's initial properties will always be overwritten.
- // We only use a Fiber to ensure the same hidden class so DEV isn't slow.
- target = createFiber(IndeterminateComponent, null, null, NoMode);
- } // This is intentionally written as a list of all properties.
- // We tried to use Object.assign() instead but this is called in
- // the hottest path, and Object.assign() was too slow:
- // https://github.com/facebook/react/issues/12502
- // This code is DEV-only so size is not a concern.
-
-
- target.tag = source.tag;
- target.key = source.key;
- target.elementType = source.elementType;
- target.type = source.type;
- target.stateNode = source.stateNode;
- target.return = source.return;
- target.child = source.child;
- target.sibling = source.sibling;
- target.index = source.index;
- target.ref = source.ref;
- target.pendingProps = source.pendingProps;
- target.memoizedProps = source.memoizedProps;
- target.updateQueue = source.updateQueue;
- target.memoizedState = source.memoizedState;
- target.dependencies = source.dependencies;
- target.mode = source.mode;
- target.flags = source.flags;
- target.nextEffect = source.nextEffect;
- target.firstEffect = source.firstEffect;
- target.lastEffect = source.lastEffect;
- target.lanes = source.lanes;
- target.childLanes = source.childLanes;
- target.alternate = source.alternate;
-
- {
- target.actualDuration = source.actualDuration;
- target.actualStartTime = source.actualStartTime;
- target.selfBaseDuration = source.selfBaseDuration;
- target.treeBaseDuration = source.treeBaseDuration;
- }
-
- target._debugID = source._debugID;
- target._debugSource = source._debugSource;
- target._debugOwner = source._debugOwner;
- target._debugNeedsRemount = source._debugNeedsRemount;
- target._debugHookTypes = source._debugHookTypes;
- return target;
- }
-
- function FiberRootNode(containerInfo, tag, hydrate) {
- this.tag = tag;
- this.containerInfo = containerInfo;
- this.pendingChildren = null;
- this.current = null;
- this.pingCache = null;
- this.finishedWork = null;
- this.timeoutHandle = noTimeout;
- this.context = null;
- this.pendingContext = null;
- this.hydrate = hydrate;
- this.callbackNode = null;
- this.callbackPriority = NoLanePriority;
- this.eventTimes = createLaneMap(NoLanes);
- this.expirationTimes = createLaneMap(NoTimestamp);
- this.pendingLanes = NoLanes;
- this.suspendedLanes = NoLanes;
- this.pingedLanes = NoLanes;
- this.expiredLanes = NoLanes;
- this.mutableReadLanes = NoLanes;
- this.finishedLanes = NoLanes;
- this.entangledLanes = NoLanes;
- this.entanglements = createLaneMap(NoLanes);
-
- {
- this.mutableSourceEagerHydrationData = null;
- }
-
- {
- this.interactionThreadID = unstable_getThreadID();
- this.memoizedInteractions = new Set();
- this.pendingInteractionMap = new Map();
- }
-
- {
- switch (tag) {
- case BlockingRoot:
- this._debugRootType = 'createBlockingRoot()';
- break;
-
- case ConcurrentRoot:
- this._debugRootType = 'createRoot()';
- break;
-
- case LegacyRoot:
- this._debugRootType = 'createLegacyRoot()';
- break;
- }
- }
- }
-
- function createFiberRoot(containerInfo, tag, hydrate, hydrationCallbacks) {
- var root = new FiberRootNode(containerInfo, tag, hydrate);
- // stateNode is any.
-
-
- var uninitializedFiber = createHostRootFiber(tag);
- root.current = uninitializedFiber;
- uninitializedFiber.stateNode = root;
- initializeUpdateQueue(uninitializedFiber);
- return root;
- }
-
- // This ensures that the version used for server rendering matches the one
- // that is eventually read during hydration.
- // If they don't match there's a potential tear and a full deopt render is required.
-
- function registerMutableSourceForHydration(root, mutableSource) {
- var getVersion = mutableSource._getVersion;
- var version = getVersion(mutableSource._source); // TODO Clear this data once all pending hydration work is finished.
- // Retaining it forever may interfere with GC.
-
- if (root.mutableSourceEagerHydrationData == null) {
- root.mutableSourceEagerHydrationData = [mutableSource, version];
- } else {
- root.mutableSourceEagerHydrationData.push(mutableSource, version);
- }
- }
-
- function createPortal(children, containerInfo, // TODO: figure out the API for cross-renderer implementation.
- implementation) {
- var key = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
- return {
- // This tag allow us to uniquely identify this as a React Portal
- $$typeof: REACT_PORTAL_TYPE,
- key: key == null ? null : '' + key,
- children: children,
- containerInfo: containerInfo,
- implementation: implementation
- };
- }
-
- var didWarnAboutNestedUpdates;
- var didWarnAboutFindNodeInStrictMode;
-
- {
- didWarnAboutNestedUpdates = false;
- didWarnAboutFindNodeInStrictMode = {};
- }
-
- function getContextForSubtree(parentComponent) {
- if (!parentComponent) {
- return emptyContextObject;
- }
-
- var fiber = get(parentComponent);
- var parentContext = findCurrentUnmaskedContext(fiber);
-
- if (fiber.tag === ClassComponent) {
- var Component = fiber.type;
-
- if (isContextProvider(Component)) {
- return processChildContext(fiber, Component, parentContext);
- }
- }
-
- return parentContext;
- }
-
- function findHostInstanceWithWarning(component, methodName) {
- {
- var fiber = get(component);
-
- if (fiber === undefined) {
- if (typeof component.render === 'function') {
- {
- {
- throw Error( "Unable to find node on an unmounted component." );
- }
- }
- } else {
- {
- {
- throw Error( "Argument appears to not be a ReactComponent. Keys: " + Object.keys(component) );
- }
- }
- }
- }
-
- var hostFiber = findCurrentHostFiber(fiber);
-
- if (hostFiber === null) {
- return null;
- }
-
- if (hostFiber.mode & StrictMode) {
- var componentName = getComponentName(fiber.type) || 'Component';
-
- if (!didWarnAboutFindNodeInStrictMode[componentName]) {
- didWarnAboutFindNodeInStrictMode[componentName] = true;
- var previousFiber = current;
-
- try {
- setCurrentFiber(hostFiber);
-
- if (fiber.mode & StrictMode) {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which is inside StrictMode. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
- } else {
- error('%s is deprecated in StrictMode. ' + '%s was passed an instance of %s which renders StrictMode children. ' + 'Instead, add a ref directly to the element you want to reference. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-find-node', methodName, methodName, componentName);
- }
- } finally {
- // Ideally this should reset to previous but this shouldn't be called in
- // render and there's another warning for that anyway.
- if (previousFiber) {
- setCurrentFiber(previousFiber);
- } else {
- resetCurrentFiber();
- }
- }
- }
- }
-
- return hostFiber.stateNode;
- }
- }
-
- function createContainer(containerInfo, tag, hydrate, hydrationCallbacks) {
- return createFiberRoot(containerInfo, tag, hydrate);
- }
- function updateContainer(element, container, parentComponent, callback) {
- {
- onScheduleRoot(container, element);
- }
-
- var current$1 = container.current;
- var eventTime = requestEventTime();
-
- {
- // $FlowExpectedError - jest isn't a global, and isn't recognized outside of tests
- if ('undefined' !== typeof jest) {
- warnIfUnmockedScheduler(current$1);
- warnIfNotScopedWithMatchingAct(current$1);
- }
- }
-
- var lane = requestUpdateLane(current$1);
-
- var context = getContextForSubtree(parentComponent);
-
- if (container.context === null) {
- container.context = context;
- } else {
- container.pendingContext = context;
- }
-
- {
- if (isRendering && current !== null && !didWarnAboutNestedUpdates) {
- didWarnAboutNestedUpdates = true;
-
- error('Render methods should be a pure function of props and state; ' + 'triggering nested component updates from render is not allowed. ' + 'If necessary, trigger nested updates in componentDidUpdate.\n\n' + 'Check the render method of %s.', getComponentName(current.type) || 'Unknown');
- }
- }
-
- var update = createUpdate(eventTime, lane); // Caution: React DevTools currently depends on this property
- // being called "element".
-
- update.payload = {
- element: element
- };
- callback = callback === undefined ? null : callback;
-
- if (callback !== null) {
- {
- if (typeof callback !== 'function') {
- error('render(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callback);
- }
- }
-
- update.callback = callback;
- }
-
- enqueueUpdate(current$1, update);
- scheduleUpdateOnFiber(current$1, lane, eventTime);
- return lane;
- }
- function getPublicRootInstance(container) {
- var containerFiber = container.current;
-
- if (!containerFiber.child) {
- return null;
- }
-
- switch (containerFiber.child.tag) {
- case HostComponent:
- return getPublicInstance(containerFiber.child.stateNode);
-
- default:
- return containerFiber.child.stateNode;
- }
- }
-
- function markRetryLaneImpl(fiber, retryLane) {
- var suspenseState = fiber.memoizedState;
-
- if (suspenseState !== null && suspenseState.dehydrated !== null) {
- suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
- }
- } // Increases the priority of thennables when they resolve within this boundary.
-
-
- function markRetryLaneIfNotHydrated(fiber, retryLane) {
- markRetryLaneImpl(fiber, retryLane);
- var alternate = fiber.alternate;
-
- if (alternate) {
- markRetryLaneImpl(alternate, retryLane);
- }
- }
-
- function attemptUserBlockingHydration$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority and they should not suspend on I/O,
- // since you have to wrap anything that might suspend in
- // Suspense.
- return;
- }
-
- var eventTime = requestEventTime();
- var lane = InputDiscreteHydrationLane;
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- markRetryLaneIfNotHydrated(fiber, lane);
- }
- function attemptContinuousHydration$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority and they should not suspend on I/O,
- // since you have to wrap anything that might suspend in
- // Suspense.
- return;
- }
-
- var eventTime = requestEventTime();
- var lane = SelectiveHydrationLane;
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- markRetryLaneIfNotHydrated(fiber, lane);
- }
- function attemptHydrationAtCurrentPriority$1(fiber) {
- if (fiber.tag !== SuspenseComponent) {
- // We ignore HostRoots here because we can't increase
- // their priority other than synchronously flush it.
- return;
- }
-
- var eventTime = requestEventTime();
- var lane = requestUpdateLane(fiber);
- scheduleUpdateOnFiber(fiber, lane, eventTime);
- markRetryLaneIfNotHydrated(fiber, lane);
- }
- function runWithPriority$2(priority, fn) {
-
- try {
- setCurrentUpdateLanePriority(priority);
- return fn();
- } finally {
- }
- }
- function findHostInstanceWithNoPortals(fiber) {
- var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
-
- if (hostFiber === null) {
- return null;
- }
-
- if (hostFiber.tag === FundamentalComponent) {
- return hostFiber.stateNode.instance;
- }
-
- return hostFiber.stateNode;
- }
-
- var shouldSuspendImpl = function (fiber) {
- return false;
- };
-
- function shouldSuspend(fiber) {
- return shouldSuspendImpl(fiber);
- }
- var overrideHookState = null;
- var overrideHookStateDeletePath = null;
- var overrideHookStateRenamePath = null;
- var overrideProps = null;
- var overridePropsDeletePath = null;
- var overridePropsRenamePath = null;
- var scheduleUpdate = null;
- var setSuspenseHandler = null;
-
- {
- var copyWithDeleteImpl = function (obj, path, index) {
- var key = path[index];
- var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
-
- if (index + 1 === path.length) {
- if (Array.isArray(updated)) {
- updated.splice(key, 1);
- } else {
- delete updated[key];
- }
-
- return updated;
- } // $FlowFixMe number or string is fine here
-
-
- updated[key] = copyWithDeleteImpl(obj[key], path, index + 1);
- return updated;
- };
-
- var copyWithDelete = function (obj, path) {
- return copyWithDeleteImpl(obj, path, 0);
- };
-
- var copyWithRenameImpl = function (obj, oldPath, newPath, index) {
- var oldKey = oldPath[index];
- var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj);
-
- if (index + 1 === oldPath.length) {
- var newKey = newPath[index]; // $FlowFixMe number or string is fine here
-
- updated[newKey] = updated[oldKey];
-
- if (Array.isArray(updated)) {
- updated.splice(oldKey, 1);
- } else {
- delete updated[oldKey];
- }
- } else {
- // $FlowFixMe number or string is fine here
- updated[oldKey] = copyWithRenameImpl( // $FlowFixMe number or string is fine here
- obj[oldKey], oldPath, newPath, index + 1);
- }
-
- return updated;
- };
-
- var copyWithRename = function (obj, oldPath, newPath) {
- if (oldPath.length !== newPath.length) {
- warn('copyWithRename() expects paths of the same length');
-
- return;
- } else {
- for (var i = 0; i < newPath.length - 1; i++) {
- if (oldPath[i] !== newPath[i]) {
- warn('copyWithRename() expects paths to be the same except for the deepest key');
-
- return;
- }
- }
- }
-
- return copyWithRenameImpl(obj, oldPath, newPath, 0);
- };
-
- var copyWithSetImpl = function (obj, path, index, value) {
- if (index >= path.length) {
- return value;
- }
-
- var key = path[index];
- var updated = Array.isArray(obj) ? obj.slice() : _assign({}, obj); // $FlowFixMe number or string is fine here
-
- updated[key] = copyWithSetImpl(obj[key], path, index + 1, value);
- return updated;
- };
-
- var copyWithSet = function (obj, path, value) {
- return copyWithSetImpl(obj, path, 0, value);
- };
-
- var findHook = function (fiber, id) {
- // For now, the "id" of stateful hooks is just the stateful hook index.
- // This may change in the future with e.g. nested hooks.
- var currentHook = fiber.memoizedState;
-
- while (currentHook !== null && id > 0) {
- currentHook = currentHook.next;
- id--;
- }
-
- return currentHook;
- }; // Support DevTools editable values for useState and useReducer.
-
-
- overrideHookState = function (fiber, id, path, value) {
- var hook = findHook(fiber, id);
-
- if (hook !== null) {
- var newState = copyWithSet(hook.memoizedState, path, value);
- hook.memoizedState = newState;
- hook.baseState = newState; // We aren't actually adding an update to the queue,
- // because there is no update we can add for useReducer hooks that won't trigger an error.
- // (There's no appropriate action type for DevTools overrides.)
- // As a result though, React will see the scheduled update as a noop and bailout.
- // Shallow cloning props works as a workaround for now to bypass the bailout check.
-
- fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- }
- };
-
- overrideHookStateDeletePath = function (fiber, id, path) {
- var hook = findHook(fiber, id);
-
- if (hook !== null) {
- var newState = copyWithDelete(hook.memoizedState, path);
- hook.memoizedState = newState;
- hook.baseState = newState; // We aren't actually adding an update to the queue,
- // because there is no update we can add for useReducer hooks that won't trigger an error.
- // (There's no appropriate action type for DevTools overrides.)
- // As a result though, React will see the scheduled update as a noop and bailout.
- // Shallow cloning props works as a workaround for now to bypass the bailout check.
-
- fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- }
- };
-
- overrideHookStateRenamePath = function (fiber, id, oldPath, newPath) {
- var hook = findHook(fiber, id);
-
- if (hook !== null) {
- var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
- hook.memoizedState = newState;
- hook.baseState = newState; // We aren't actually adding an update to the queue,
- // because there is no update we can add for useReducer hooks that won't trigger an error.
- // (There's no appropriate action type for DevTools overrides.)
- // As a result though, React will see the scheduled update as a noop and bailout.
- // Shallow cloning props works as a workaround for now to bypass the bailout check.
-
- fiber.memoizedProps = _assign({}, fiber.memoizedProps);
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- }
- }; // Support DevTools props for function components, forwardRef, memo, host components, etc.
-
-
- overrideProps = function (fiber, path, value) {
- fiber.pendingProps = copyWithSet(fiber.memoizedProps, path, value);
-
- if (fiber.alternate) {
- fiber.alternate.pendingProps = fiber.pendingProps;
- }
-
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- };
-
- overridePropsDeletePath = function (fiber, path) {
- fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path);
-
- if (fiber.alternate) {
- fiber.alternate.pendingProps = fiber.pendingProps;
- }
-
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- };
-
- overridePropsRenamePath = function (fiber, oldPath, newPath) {
- fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
-
- if (fiber.alternate) {
- fiber.alternate.pendingProps = fiber.pendingProps;
- }
-
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- };
-
- scheduleUpdate = function (fiber) {
- scheduleUpdateOnFiber(fiber, SyncLane, NoTimestamp);
- };
-
- setSuspenseHandler = function (newShouldSuspendImpl) {
- shouldSuspendImpl = newShouldSuspendImpl;
- };
- }
-
- function findHostInstanceByFiber(fiber) {
- var hostFiber = findCurrentHostFiber(fiber);
-
- if (hostFiber === null) {
- return null;
- }
-
- return hostFiber.stateNode;
- }
-
- function emptyFindFiberByHostInstance(instance) {
- return null;
- }
-
- function getCurrentFiberForDevTools() {
- return current;
- }
-
- function injectIntoDevTools(devToolsConfig) {
- var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
- return injectInternals({
- bundleType: devToolsConfig.bundleType,
- version: devToolsConfig.version,
- rendererPackageName: devToolsConfig.rendererPackageName,
- rendererConfig: devToolsConfig.rendererConfig,
- overrideHookState: overrideHookState,
- overrideHookStateDeletePath: overrideHookStateDeletePath,
- overrideHookStateRenamePath: overrideHookStateRenamePath,
- overrideProps: overrideProps,
- overridePropsDeletePath: overridePropsDeletePath,
- overridePropsRenamePath: overridePropsRenamePath,
- setSuspenseHandler: setSuspenseHandler,
- scheduleUpdate: scheduleUpdate,
- currentDispatcherRef: ReactCurrentDispatcher,
- findHostInstanceByFiber: findHostInstanceByFiber,
- findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
- // React Refresh
- findHostInstancesForRefresh: findHostInstancesForRefresh ,
- scheduleRefresh: scheduleRefresh ,
- scheduleRoot: scheduleRoot ,
- setRefreshHandler: setRefreshHandler ,
- // Enables DevTools to append owner stacks to error messages in DEV mode.
- getCurrentFiber: getCurrentFiberForDevTools
- });
- }
-
- function ReactDOMRoot(container, options) {
- this._internalRoot = createRootImpl(container, ConcurrentRoot, options);
- }
-
- function ReactDOMBlockingRoot(container, tag, options) {
- this._internalRoot = createRootImpl(container, tag, options);
- }
-
- ReactDOMRoot.prototype.render = ReactDOMBlockingRoot.prototype.render = function (children) {
- var root = this._internalRoot;
-
- {
- if (typeof arguments[1] === 'function') {
- error('render(...): does not support the second callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
- }
-
- var container = root.containerInfo;
-
- if (container.nodeType !== COMMENT_NODE) {
- var hostInstance = findHostInstanceWithNoPortals(root.current);
-
- if (hostInstance) {
- if (hostInstance.parentNode !== container) {
- error('render(...): It looks like the React-rendered content of the ' + 'root container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + "root.unmount() to empty a root's container.");
- }
- }
- }
- }
-
- updateContainer(children, root, null, null);
- };
-
- ReactDOMRoot.prototype.unmount = ReactDOMBlockingRoot.prototype.unmount = function () {
- {
- if (typeof arguments[0] === 'function') {
- error('unmount(...): does not support a callback argument. ' + 'To execute a side effect after rendering, declare it in a component body with useEffect().');
- }
- }
-
- var root = this._internalRoot;
- var container = root.containerInfo;
- updateContainer(null, root, null, function () {
- unmarkContainerAsRoot(container);
- });
- };
-
- function createRootImpl(container, tag, options) {
- // Tag is either LegacyRoot or Concurrent Root
- var hydrate = options != null && options.hydrate === true;
- var hydrationCallbacks = options != null && options.hydrationOptions || null;
- var mutableSources = options != null && options.hydrationOptions != null && options.hydrationOptions.mutableSources || null;
- var root = createContainer(container, tag, hydrate);
- markContainerAsRoot(root.current, container);
- var containerNodeType = container.nodeType;
-
- {
- var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
- listenToAllSupportedEvents(rootContainerElement);
- }
-
- if (mutableSources) {
- for (var i = 0; i < mutableSources.length; i++) {
- var mutableSource = mutableSources[i];
- registerMutableSourceForHydration(root, mutableSource);
- }
- }
-
- return root;
- }
- function createLegacyRoot(container, options) {
- return new ReactDOMBlockingRoot(container, LegacyRoot, options);
- }
- function isValidContainer(node) {
- return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === ' react-mount-point-unstable '));
- }
-
- var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
- var topLevelUpdateWarnings;
- var warnedAboutHydrateAPI = false;
-
- {
- topLevelUpdateWarnings = function (container) {
- if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
- var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer._internalRoot.current);
-
- if (hostInstance) {
- if (hostInstance.parentNode !== container) {
- error('render(...): It looks like the React-rendered content of this ' + 'container was removed without using React. This is not ' + 'supported and will cause errors. Instead, call ' + 'ReactDOM.unmountComponentAtNode to empty a container.');
- }
- }
- }
-
- var isRootRenderedBySomeReact = !!container._reactRootContainer;
- var rootEl = getReactRootElementInContainer(container);
- var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));
-
- if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
- error('render(...): Replacing React-rendered children with a new root ' + 'component. If you intended to update the children of this node, ' + 'you should instead have the existing children update their state ' + 'and render the new components instead of calling ReactDOM.render.');
- }
-
- if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === 'BODY') {
- error('render(): Rendering components directly into document.body is ' + 'discouraged, since its children are often manipulated by third-party ' + 'scripts and browser extensions. This may lead to subtle ' + 'reconciliation issues. Try rendering into a container element created ' + 'for your app.');
- }
- };
- }
-
- function getReactRootElementInContainer(container) {
- if (!container) {
- return null;
- }
-
- if (container.nodeType === DOCUMENT_NODE) {
- return container.documentElement;
- } else {
- return container.firstChild;
- }
- }
-
- function shouldHydrateDueToLegacyHeuristic(container) {
- var rootElement = getReactRootElementInContainer(container);
- return !!(rootElement && rootElement.nodeType === ELEMENT_NODE && rootElement.hasAttribute(ROOT_ATTRIBUTE_NAME));
- }
-
- function legacyCreateRootFromDOMContainer(container, forceHydrate) {
- var shouldHydrate = forceHydrate || shouldHydrateDueToLegacyHeuristic(container); // First clear any existing content.
-
- if (!shouldHydrate) {
- var warned = false;
- var rootSibling;
-
- while (rootSibling = container.lastChild) {
- {
- if (!warned && rootSibling.nodeType === ELEMENT_NODE && rootSibling.hasAttribute(ROOT_ATTRIBUTE_NAME)) {
- warned = true;
-
- error('render(): Target node has markup rendered by React, but there ' + 'are unrelated nodes as well. This is most commonly caused by ' + 'white-space inserted around server-rendered markup.');
- }
- }
-
- container.removeChild(rootSibling);
- }
- }
-
- {
- if (shouldHydrate && !forceHydrate && !warnedAboutHydrateAPI) {
- warnedAboutHydrateAPI = true;
-
- warn('render(): Calling ReactDOM.render() to hydrate server-rendered markup ' + 'will stop working in React v18. Replace the ReactDOM.render() call ' + 'with ReactDOM.hydrate() if you want React to attach to the server HTML.');
- }
- }
-
- return createLegacyRoot(container, shouldHydrate ? {
- hydrate: true
- } : undefined);
- }
-
- function warnOnInvalidCallback$1(callback, callerName) {
- {
- if (callback !== null && typeof callback !== 'function') {
- error('%s(...): Expected the last optional `callback` argument to be a ' + 'function. Instead received: %s.', callerName, callback);
- }
- }
- }
-
- function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
- {
- topLevelUpdateWarnings(container);
- warnOnInvalidCallback$1(callback === undefined ? null : callback, 'render');
- } // TODO: Without `any` type, Flow says "Property cannot be accessed on any
- // member of intersection type." Whyyyyyy.
-
-
- var root = container._reactRootContainer;
- var fiberRoot;
-
- if (!root) {
- // Initial mount
- root = container._reactRootContainer = legacyCreateRootFromDOMContainer(container, forceHydrate);
- fiberRoot = root._internalRoot;
-
- if (typeof callback === 'function') {
- var originalCallback = callback;
-
- callback = function () {
- var instance = getPublicRootInstance(fiberRoot);
- originalCallback.call(instance);
- };
- } // Initial mount should not be batched.
-
-
- unbatchedUpdates(function () {
- updateContainer(children, fiberRoot, parentComponent, callback);
- });
- } else {
- fiberRoot = root._internalRoot;
-
- if (typeof callback === 'function') {
- var _originalCallback = callback;
-
- callback = function () {
- var instance = getPublicRootInstance(fiberRoot);
-
- _originalCallback.call(instance);
- };
- } // Update
-
-
- updateContainer(children, fiberRoot, parentComponent, callback);
- }
-
- return getPublicRootInstance(fiberRoot);
- }
-
- function findDOMNode(componentOrElement) {
- {
- var owner = ReactCurrentOwner$3.current;
-
- if (owner !== null && owner.stateNode !== null) {
- var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
-
- if (!warnedAboutRefsInRender) {
- error('%s is accessing findDOMNode inside its render(). ' + 'render() should be a pure function of props and state. It should ' + 'never access something that requires stale data from the previous ' + 'render, such as refs. Move this logic to componentDidMount and ' + 'componentDidUpdate instead.', getComponentName(owner.type) || 'A component');
- }
-
- owner.stateNode._warnedAboutRefsInRender = true;
- }
- }
-
- if (componentOrElement == null) {
- return null;
- }
-
- if (componentOrElement.nodeType === ELEMENT_NODE) {
- return componentOrElement;
- }
-
- {
- return findHostInstanceWithWarning(componentOrElement, 'findDOMNode');
- }
- }
- function hydrate(element, container, callback) {
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
-
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
-
- if (isModernRoot) {
- error('You are calling ReactDOM.hydrate() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call createRoot(container, {hydrate: true}).render(element)?');
- }
- } // TODO: throw or warn if we couldn't hydrate?
-
-
- return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
- }
- function render(element, container, callback) {
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
-
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
-
- if (isModernRoot) {
- error('You are calling ReactDOM.render() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. ' + 'Did you mean to call root.render(element)?');
- }
- }
-
- return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
- }
- function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
- if (!isValidContainer(containerNode)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- }
-
- if (!(parentComponent != null && has(parentComponent))) {
- {
- throw Error( "parentComponent must be a valid React Component" );
- }
- }
-
- return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
- }
- function unmountComponentAtNode(container) {
- if (!isValidContainer(container)) {
- {
- throw Error( "unmountComponentAtNode(...): Target container is not a DOM element." );
- }
- }
-
- {
- var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === undefined;
-
- if (isModernRoot) {
- error('You are calling ReactDOM.unmountComponentAtNode() on a container that was previously ' + 'passed to ReactDOM.createRoot(). This is not supported. Did you mean to call root.unmount()?');
- }
- }
-
- if (container._reactRootContainer) {
- {
- var rootEl = getReactRootElementInContainer(container);
- var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);
-
- if (renderedByDifferentReact) {
- error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by another copy of React.');
- }
- } // Unmount should not be batched.
-
-
- unbatchedUpdates(function () {
- legacyRenderSubtreeIntoContainer(null, null, container, false, function () {
- // $FlowFixMe This should probably use `delete container._reactRootContainer`
- container._reactRootContainer = null;
- unmarkContainerAsRoot(container);
- });
- }); // If you call unmountComponentAtNode twice in quick succession, you'll
- // get `true` twice. That's probably fine?
-
- return true;
- } else {
- {
- var _rootEl = getReactRootElementInContainer(container);
-
- var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl)); // Check if the container itself is a React root node.
-
- var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainer(container.parentNode) && !!container.parentNode._reactRootContainer;
-
- if (hasNonRootReactChild) {
- error("unmountComponentAtNode(): The node you're attempting to unmount " + 'was rendered by React and is not a top-level container. %s', isContainerReactRoot ? 'You may have accidentally passed in a React root node instead ' + 'of its container.' : 'Instead, have the parent component update its state and ' + 'rerender in order to remove this component.');
- }
- }
-
- return false;
- }
- }
-
- setAttemptUserBlockingHydration(attemptUserBlockingHydration$1);
- setAttemptContinuousHydration(attemptContinuousHydration$1);
- setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
- setAttemptHydrationAtPriority(runWithPriority$2);
- var didWarnAboutUnstableCreatePortal = false;
-
- {
- if (typeof Map !== 'function' || // $FlowIssue Flow incorrectly thinks Map has no prototype
- Map.prototype == null || typeof Map.prototype.forEach !== 'function' || typeof Set !== 'function' || // $FlowIssue Flow incorrectly thinks Set has no prototype
- Set.prototype == null || typeof Set.prototype.clear !== 'function' || typeof Set.prototype.forEach !== 'function') {
- error('React depends on Map and Set built-in types. Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
- }
- }
-
- setRestoreImplementation(restoreControlledState$3);
- setBatchingImplementation(batchedUpdates$1, discreteUpdates$1, flushDiscreteUpdates, batchedEventUpdates$1);
-
- function createPortal$1(children, container) {
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
-
- if (!isValidContainer(container)) {
- {
- throw Error( "Target container is not a DOM element." );
- }
- } // TODO: pass ReactDOM portal implementation as third argument
- // $FlowFixMe The Flow type is opaque but there's no way to actually create it.
-
-
- return createPortal(children, container, null, key);
- }
-
- function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
-
- return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
- }
-
- function unstable_createPortal(children, container) {
- var key = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
-
- {
- if (!didWarnAboutUnstableCreatePortal) {
- didWarnAboutUnstableCreatePortal = true;
-
- warn('The ReactDOM.unstable_createPortal() alias has been deprecated, ' + 'and will be removed in React 18+. Update your code to use ' + 'ReactDOM.createPortal() instead. It has the exact same API, ' + 'but without the "unstable_" prefix.');
- }
- }
-
- return createPortal$1(children, container, key);
- }
-
- var Internals = {
- // Keep in sync with ReactTestUtils.js, and ReactTestUtilsAct.js.
- // This is an array for better minification.
- Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, flushPassiveEffects, // TODO: This is related to `act`, not events. Move to separate key?
- IsThisRendererActing]
- };
- var foundDevTools = injectIntoDevTools({
- findFiberByHostInstance: getClosestInstanceFromNode,
- bundleType: 1 ,
- version: ReactVersion,
- rendererPackageName: 'react-dom'
- });
-
- {
- if (!foundDevTools && canUseDOM && window.top === window.self) {
- // If we're in Chrome or Firefox, provide a download link if not installed.
- if (navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edge') === -1 || navigator.userAgent.indexOf('Firefox') > -1) {
- var protocol = window.location.protocol; // Don't warn in exotic cases like chrome-extension://.
-
- if (/^(https?|file):$/.test(protocol)) {
- // eslint-disable-next-line react-internal/no-production-logging
- console.info('%cDownload the React DevTools ' + 'for a better development experience: ' + 'https://reactjs.org/link/react-devtools' + (protocol === 'file:' ? '\nYou might need to use a local HTTP server (instead of file://): ' + 'https://reactjs.org/link/react-devtools-faq' : ''), 'font-weight:bold');
- }
- }
- }
- }
-
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
- exports.createPortal = createPortal$1;
- exports.findDOMNode = findDOMNode;
- exports.flushSync = flushSync;
- exports.hydrate = hydrate;
- exports.render = render;
- exports.unmountComponentAtNode = unmountComponentAtNode;
- exports.unstable_batchedUpdates = batchedUpdates$1;
- exports.unstable_createPortal = unstable_createPortal;
- exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
- exports.version = ReactVersion;
-
-})));
diff --git a/node_modules/react-dom/umd/react-dom.production.min.js b/node_modules/react-dom/umd/react-dom.production.min.js
deleted file mode 100644
index e38d120..0000000
--- a/node_modules/react-dom/umd/react-dom.production.min.js
+++ /dev/null
@@ -1,245 +0,0 @@
-/** @license React v17.0.2
- * react-dom.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function(){/*
- Modernizr 3.0.0pre (Custom Build) | MIT
-*/
-'use strict';(function(M,ha){"object"===typeof exports&&"undefined"!==typeof module?ha(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],ha):(M=M||self,ha(M.ReactDOM={},M.React))})(this,function(M,ha){function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-function Ta(a,b){gb(a,b);gb(a+"Capture",b)}function gb(a,b){Ib[a]=b;for(a=0;a<b.length;a++)zf.add(b[a])}function li(a){if(Af.call(Bf,a))return!0;if(Af.call(Cf,a))return!1;if(mi.test(a))return Bf[a]=!0;Cf[a]=!0;return!1}function ni(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function oi(a,b,c,d){if(null===
-b||"undefined"===typeof b||ni(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function Q(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}function Ed(a,b,c,d){var e=I.hasOwnProperty(b)?I[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||
-"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(oi(b,c,e,d)&&(c=null),d||null===e?li(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}function Jb(a){if(null===a||"object"!==typeof a)return null;a=Df&&a[Df]||a["@@iterator"];return"function"===typeof a?a:null}
-function Kb(a,b,c){if(void 0===Fd)try{throw Error();}catch(d){Fd=(b=d.stack.trim().match(/\n( *(at )?)/))&&b[1]||""}return"\n"+Fd+a}function Bc(a,b){if(!a||Gd)return"";Gd=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();
-}catch(k){d=k}a()}}catch(k){if(k&&d&&"string"===typeof k.stack){for(var e=k.stack.split("\n"),f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return"\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Gd=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Kb(a):""}function pi(a){switch(a.tag){case 5:return Kb(a.type);case 16:return Kb("Lazy");case 13:return Kb("Suspense");
-case 19:return Kb("SuspenseList");case 0:case 2:case 15:return a=Bc(a.type,!1),a;case 11:return a=Bc(a.type.render,!1),a;case 22:return a=Bc(a.type._render,!1),a;case 1:return a=Bc(a.type,!0),a;default:return""}}function hb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case wa:return"Fragment";case Ua:return"Portal";case Lb:return"Profiler";case Hd:return"StrictMode";case Mb:return"Suspense";case Cc:return"SuspenseList"}if("object"===
-typeof a)switch(a.$$typeof){case Id:return(a.displayName||"Context")+".Consumer";case Jd:return(a._context.displayName||"Context")+".Provider";case Dc:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Ec:return hb(a.type);case Kd:return hb(a._render);case Ld:b=a._payload;a=a._init;try{return hb(a(b))}catch(c){}}return null}function xa(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;
-default:return""}}function Ef(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function qi(a){var b=Ef(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,
-b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}}function Fc(a){a._valueTracker||(a._valueTracker=qi(a))}function Ff(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Ef(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Gc(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||
-a.body}catch(b){return a.body}}function Md(a,b){var c=b.checked;return B({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Gf(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=xa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Hf(a,b){b=b.checked;null!=b&&Ed(a,"checked",
-b,!1)}function Nd(a,b){Hf(a,b);var c=xa(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Od(a,b.type,c):b.hasOwnProperty("defaultValue")&&Od(a,b.type,xa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function If(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=
-b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function Od(a,b,c){if("number"!==b||Gc(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function ri(a){var b="";ha.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}
-function Pd(a,b){a=B({children:void 0},b);if(b=ri(b.children))a.children=b;return a}function ib(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+xa(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function Qd(a,b){if(null!=
-b.dangerouslySetInnerHTML)throw Error(m(91));return B({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Jf(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(m(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(m(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:xa(c)}}function Kf(a,b){var c=xa(b.value),d=xa(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==
-c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Lf(a,b){b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function Mf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Rd(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Mf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function Nf(a,b,c){return null==
-b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Nb.hasOwnProperty(a)&&Nb[a]?(""+b).trim():b+"px"}function Of(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=Nf(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function Sd(a,b){if(b){if(si[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(m(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(m(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&
-"__html"in b.dangerouslySetInnerHTML))throw Error(m(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(m(62));}}function Td(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function Ud(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);
-return 3===a.nodeType?a.parentNode:a}function Pf(a){if(a=Ob(a)){if("function"!==typeof Vd)throw Error(m(280));var b=a.stateNode;b&&(b=Hc(b),Vd(a.stateNode,a.type,b))}}function Qf(a){jb?kb?kb.push(a):kb=[a]:jb=a}function Rf(){if(jb){var a=jb,b=kb;kb=jb=null;Pf(a);if(b)for(a=0;a<b.length;a++)Pf(b[a])}}function Wd(){if(null!==jb||null!==kb)Xd(),Rf()}function ti(a,b,c){if(Yd)return a(b,c);Yd=!0;try{return Sf(a,b,c)}finally{Yd=!1,Wd()}}function Pb(a,b){var c=a.stateNode;if(null===c)return null;var d=Hc(c);
-if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(m(231,b,typeof c));return c}function ui(a,b,c,d,e,
-f,g,h,k){Qb=!1;Ic=null;vi.apply(wi,arguments)}function xi(a,b,c,d,e,f,g,h,k){ui.apply(this,arguments);if(Qb){if(Qb){var v=Ic;Qb=!1;Ic=null}else throw Error(m(198));Jc||(Jc=!0,Zd=v)}}function Va(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function Tf(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Uf(a){if(Va(a)!==
-a)throw Error(m(188));}function yi(a){var b=a.alternate;if(!b){b=Va(a);if(null===b)throw Error(m(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Uf(e),a;if(f===d)return Uf(e),b;f=f.sibling}throw Error(m(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=
-f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(m(189));}}if(c.alternate!==d)throw Error(m(190));}if(3!==c.tag)throw Error(m(188));return c.stateNode.current===c?a:b}function Vf(a){a=yi(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}function Wf(a,b){for(var c=
-a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}function $d(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function Xf(a,b){switch(a){case "focusin":case "focusout":ya=null;break;case "dragenter":case "dragleave":za=null;break;case "mouseover":case "mouseout":Aa=null;break;case "pointerover":case "pointerout":Rb.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Sb.delete(b.pointerId)}}function Tb(a,
-b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=$d(b,c,d,e,f),null!==b&&(b=Ob(b),null!==b&&Yf(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}function zi(a,b,c,d,e){switch(b){case "focusin":return ya=Tb(ya,a,b,c,d,e),!0;case "dragenter":return za=Tb(za,a,b,c,d,e),!0;case "mouseover":return Aa=Tb(Aa,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Rb.set(f,Tb(Rb.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Sb.set(f,
-Tb(Sb.get(f)||null,a,b,c,d,e)),!0}return!1}function Ai(a){var b=Wa(a.target);if(null!==b){var c=Va(b);if(null!==c)if(b=c.tag,13===b){if(b=Tf(c),null!==b){a.blockedOn=b;Bi(a.lanePriority,function(){ae(a.priority,function(){Ci(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Kc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=be(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);
-if(null!==c)return b=Ob(c),null!==b&&Yf(b),a.blockedOn=c,!1;b.shift()}return!0}function Zf(a,b,c){Kc(a)&&c.delete(b)}function Di(){for(ce=!1;0<ia.length;){var a=ia[0];if(null!==a.blockedOn){a=Ob(a.blockedOn);null!==a&&Ei(a);break}for(var b=a.targetContainers;0<b.length;){var c=be(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&ia.shift()}null!==ya&&Kc(ya)&&(ya=null);null!==za&&Kc(za)&&(za=null);null!==Aa&&Kc(Aa)&&(Aa=null);Rb.forEach(Zf);
-Sb.forEach(Zf)}function Ub(a,b){a.blockedOn===b&&(a.blockedOn=null,ce||(ce=!0,$f(ag,Di)))}function bg(a){if(0<ia.length){Ub(ia[0],a);for(var b=1;b<ia.length;b++){var c=ia[b];c.blockedOn===a&&(c.blockedOn=null)}}null!==ya&&Ub(ya,a);null!==za&&Ub(za,a);null!==Aa&&Ub(Aa,a);b=function(b){return Ub(b,a)};Rb.forEach(b);Sb.forEach(b);for(b=0;b<Vb.length;b++)c=Vb[b],c.blockedOn===a&&(c.blockedOn=null);for(;0<Vb.length&&(b=Vb[0],null===b.blockedOn);)Ai(b),null===b.blockedOn&&Vb.shift()}function Lc(a,b){var c=
-{};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function Mc(a){if(de[a])return de[a];if(!lb[a])return a;var b=lb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in cg)return de[a]=b[c];return a}function ee(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e="on"+(e[0].toUpperCase()+e.slice(1));fe.set(d,b);dg.set(d,e);Ta(e,[d])}}function mb(a){if(0!==(1&a))return w=15,1;if(0!==(2&a))return w=14,2;if(0!==(4&a))return w=13,4;var b=24&a;if(0!==b)return w=12,b;
-if(0!==(a&32))return w=11,32;b=192&a;if(0!==b)return w=10,b;if(0!==(a&256))return w=9,256;b=3584&a;if(0!==b)return w=8,b;if(0!==(a&4096))return w=7,4096;b=4186112&a;if(0!==b)return w=6,b;b=62914560&a;if(0!==b)return w=5,b;if(a&67108864)return w=4,67108864;if(0!==(a&134217728))return w=3,134217728;b=805306368&a;if(0!==b)return w=2,b;if(0!==(1073741824&a))return w=1,1073741824;w=8;return a}function Fi(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}
-function Gi(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(m(358,a));}}function Wb(a,b){var c=a.pendingLanes;if(0===c)return w=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=w=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=mb(k),e=w):(h&=f,0!==h&&(d=mb(h),e=w))}else f=c&~g,0!==f?(d=mb(f),e=w):0!==h&&(d=mb(h),
-e=w);if(0===d)return 0;d=31-Ba(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){mb(b);if(e<=w)return b;w=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Ba(b),e=1<<c,d|=a[c],b&=~e;return d}function eg(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Nc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=nb(24&~b),0===a?Nc(10,b):a;case 10:return a=nb(192&~b),0===a?Nc(8,b):a;case 8:return a=nb(3584&~b),0===a&&(a=nb(4186112&~b),
-0===a&&(a=512)),a;case 2:return b=nb(805306368&~b),0===b&&(b=268435456),b}throw Error(m(358,a));}function nb(a){return a&-a}function ge(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}function Oc(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Ba(b);a[b]=c}function Hi(a){return 0===a?32:31-(Ii(a)/Ji|0)|0}function Ki(a,b,c,d){Xa||Xd();var e=he,f=Xa;Xa=!0;try{fg(e,a,b,c,d)}finally{(Xa=f)||Wd()}}function Li(a,b,c,d){Mi(Ni,he.bind(null,a,b,c,d))}function he(a,
-b,c,d){if(Pc){var e;if((e=0===(b&4))&&0<ia.length&&-1<gg.indexOf(a))a=$d(null,a,b,c,d),ia.push(a);else{var f=be(a,b,c,d);if(null===f)e&&Xf(a,d);else{if(e){if(-1<gg.indexOf(a)){a=$d(f,a,b,c,d);ia.push(a);return}if(zi(f,a,b,c,d))return;Xf(a,d)}hg(a,b,d,null,c)}}}}function be(a,b,c,d){var e=Ud(d);e=Wa(e);if(null!==e){var f=Va(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=Tf(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==
-e&&(e=null)}}hg(a,b,d,e,c);return null}function ig(){if(Qc)return Qc;var a,b=ie,c=b.length,d,e="value"in Ca?Ca.value:Ca.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Qc=e.slice(a,1<d?1-d:void 0)}function Rc(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function Sc(){return!0}function jg(){return!1}function V(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=
-d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?Sc:jg;this.isPropagationStopped=jg;return this}B(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=Sc)},stopPropagation:function(){var a=
-this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=Sc)},persist:function(){},isPersistent:Sc});return b}function Oi(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Pi[a])?!!b[a]:!1}function je(a){return Oi}function kg(a,b){switch(a){case "keyup":return-1!==Qi.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}
-function lg(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}function Ri(a,b){switch(a){case "compositionend":return lg(b);case "keypress":if(32!==b.which)return null;mg=!0;return ng;case "textInput":return a=b.data,a===ng&&mg?null:a;default:return null}}function Si(a,b){if(ob)return"compositionend"===a||!ke&&kg(a,b)?(a=ig(),Qc=ie=Ca=null,ob=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;
-if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return og&&"ko"!==b.locale?null:b.data;default:return null}}function pg(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Ti[a.type]:"textarea"===b?!0:!1}function Ui(a){if(!oa)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function qg(a,b,c,d){Qf(d);b=Tc(b,"onChange");0<b.length&&(c=new le("onChange","change",
-null,c,d),a.push({event:c,listeners:b}))}function Vi(a){rg(a,0)}function Uc(a){var b=pb(a);if(Ff(b))return a}function Wi(a,b){if("change"===a)return b}function sg(){Xb&&(Xb.detachEvent("onpropertychange",tg),Yb=Xb=null)}function tg(a){if("value"===a.propertyName&&Uc(Yb)){var b=[];qg(b,Yb,a,Ud(a));a=Vi;if(Xa)a(b);else{Xa=!0;try{me(a,b)}finally{Xa=!1,Wd()}}}}function Xi(a,b,c){"focusin"===a?(sg(),Xb=b,Yb=c,Xb.attachEvent("onpropertychange",tg)):"focusout"===a&&sg()}function Yi(a,b){if("selectionchange"===
-a||"keyup"===a||"keydown"===a)return Uc(Yb)}function Zi(a,b){if("click"===a)return Uc(b)}function $i(a,b){if("input"===a||"change"===a)return Uc(b)}function aj(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function Zb(a,b){if(X(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!bj.call(b,c[d])||!X(a[c[d]],b[c[d]]))return!1;return!0}function ug(a){for(;a&&a.firstChild;)a=
-a.firstChild;return a}function vg(a,b){var c=ug(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ug(c)}}function wg(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?wg(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function xg(){for(var a=window,b=Gc();b instanceof a.HTMLIFrameElement;){try{var c=
-"string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Gc(a.document)}return b}function ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function yg(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;oe||null==qb||qb!==Gc(d)||(d=qb,"selectionStart"in d&&ne(d)?d={start:d.selectionStart,
-end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),$b&&Zb($b,d)||($b=d,d=Tc(pe,"onSelect"),0<d.length&&(b=new le("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=qb)))}function zg(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;xi(d,b,void 0,a);a.currentTarget=null}function rg(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=
-a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,v=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;zg(e,h,v);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;v=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;zg(e,h,v);f=k}}}if(Jc)throw a=Zd,Jc=!1,Zd=null,a;}function z(a,b){var c=Ag(b),d=a+"__bubble";c.has(d)||(Bg(b,a,2,!1),c.add(d))}function Cg(a){a[Dg]||(a[Dg]=!0,zf.forEach(function(b){Eg.has(b)||
-Fg(b,!1,a,null);Fg(b,!0,a,null)}))}function Fg(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;"selectionchange"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Eg.has(a)){if("scroll"!==a)return;e|=2;f=d}var g=Ag(f),h=a+"__"+(b?"capture":"bubble");g.has(h)||(b&&(e|=4),Bg(f,a,e,b),g.add(h))}function Bg(a,b,c,d,e){e=fe.get(b);switch(void 0===e?2:e){case 0:e=Ki;break;case 1:e=Li;break;default:e=he}c=e.bind(null,b,c,a);e=void 0;!qe||"touchstart"!==b&&"touchmove"!==
-b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}function hg(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&
-k.parentNode===e)return;g=g.return}for(;null!==h;){g=Wa(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}ti(function(){var d=f,e=Ud(c),g=[];a:{var h=dg.get(a);if(void 0!==h){var k=le,m=a;switch(a){case "keypress":if(0===Rc(c))break a;case "keydown":case "keyup":k=cj;break;case "focusin":m="focus";k=re;break;case "focusout":m="blur";k=re;break;case "beforeblur":case "afterblur":k=re;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=
-Gg;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=dj;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=ej;break;case Hg:case Ig:case Jg:k=fj;break;case Kg:k=gj;break;case "scroll":k=hj;break;case "wheel":k=ij;break;case "copy":case "cut":case "paste":k=jj;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=
-Lg}var l=0!==(b&4),C=!l&&"scroll"===a,x=l?null!==h?h+"Capture":null:h;l=[];for(var p=d,q;null!==p;){q=p;var u=q.stateNode;5===q.tag&&null!==u&&(q=u,null!==x&&(u=Pb(p,x),null!=u&&l.push(ac(p,u,q))));if(C)break;p=p.return}0<l.length&&(h=new k(h,m,null,c,e),g.push({event:h,listeners:l}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&0===(b&16)&&(m=c.relatedTarget||c.fromElement)&&(Wa(m)||m[rb]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||
-h.parentWindow:window;if(k){if(m=c.relatedTarget||c.toElement,k=d,m=m?Wa(m):null,null!==m&&(C=Va(m),m!==C||5!==m.tag&&6!==m.tag))m=null}else k=null,m=d;if(k!==m){l=Gg;u="onMouseLeave";x="onMouseEnter";p="mouse";if("pointerout"===a||"pointerover"===a)l=Lg,u="onPointerLeave",x="onPointerEnter",p="pointer";C=null==k?h:pb(k);q=null==m?h:pb(m);h=new l(u,p+"leave",k,c,e);h.target=C;h.relatedTarget=q;u=null;Wa(e)===d&&(l=new l(x,p+"enter",m,c,e),l.target=q,l.relatedTarget=C,u=l);C=u;if(k&&m)b:{l=k;x=m;p=
-0;for(q=l;q;q=sb(q))p++;q=0;for(u=x;u;u=sb(u))q++;for(;0<p-q;)l=sb(l),p--;for(;0<q-p;)x=sb(x),q--;for(;p--;){if(l===x||null!==x&&l===x.alternate)break b;l=sb(l);x=sb(x)}l=null}else l=null;null!==k&&Mg(g,h,k,l,!1);null!==m&&null!==C&&Mg(g,C,m,l,!0)}}}a:{h=d?pb(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var n=Wi;else if(pg(h))if(Ng)n=$i;else{n=Yi;var da=Xi}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(n=Zi);
-if(n&&(n=n(a,d))){qg(g,n,c,e);break a}da&&da(a,h,d);"focusout"===a&&(da=h._wrapperState)&&da.controlled&&"number"===h.type&&Od(h,"number",h.value)}da=d?pb(d):window;switch(a){case "focusin":if(pg(da)||"true"===da.contentEditable)qb=da,pe=d,$b=null;break;case "focusout":$b=pe=qb=null;break;case "mousedown":oe=!0;break;case "contextmenu":case "mouseup":case "dragend":oe=!1;yg(g,c,e);break;case "selectionchange":if(kj)break;case "keydown":case "keyup":yg(g,c,e)}var Ea;if(ke)b:{switch(a){case "compositionstart":var F=
-"onCompositionStart";break b;case "compositionend":F="onCompositionEnd";break b;case "compositionupdate":F="onCompositionUpdate";break b}F=void 0}else ob?kg(a,c)&&(F="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(F="onCompositionStart");F&&(og&&"ko"!==c.locale&&(ob||"onCompositionStart"!==F?"onCompositionEnd"===F&&ob&&(Ea=ig()):(Ca=e,ie="value"in Ca?Ca.value:Ca.textContent,ob=!0)),da=Tc(d,F),0<da.length&&(F=new Og(F,a,null,c,e),g.push({event:F,listeners:da}),Ea?F.data=Ea:(Ea=lg(c),null!==Ea&&
-(F.data=Ea))));if(Ea=lj?Ri(a,c):Si(a,c))d=Tc(d,"onBeforeInput"),0<d.length&&(e=new mj("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=Ea)}rg(g,b)})}function ac(a,b,c){return{instance:a,listener:b,currentTarget:c}}function Tc(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Pb(a,c),null!=f&&d.unshift(ac(a,f,e)),f=Pb(a,b),null!=f&&d.push(ac(a,f,e)));a=a.return}return d}function sb(a){if(null===a)return null;do a=a.return;while(a&&
-5!==a.tag);return a?a:null}function Mg(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,v=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==v&&(h=v,e?(k=Pb(c,f),null!=k&&g.unshift(ac(c,k,h))):e||(k=Pb(c,f),null!=k&&g.push(ac(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function Vc(){}function Pg(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}function se(a,b){return"textarea"===a||"option"===
-a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function te(a){1===a.nodeType?a.textContent="":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=""))}function tb(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function Qg(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===
-c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}function nj(a){return{$$typeof:ue,toString:a,valueOf:a}}function Wa(a){var b=a[Fa];if(b)return b;for(var c=a.parentNode;c;){if(b=c[rb]||c[Fa]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=Qg(a);null!==a;){if(c=a[Fa])return c;a=Qg(a)}return b}a=c;c=a.parentNode}return null}function Ob(a){a=a[Fa]||a[rb];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function pb(a){if(5===a.tag||6===a.tag)return a.stateNode;
-throw Error(m(33));}function Hc(a){return a[Wc]||null}function Ag(a){var b=a[Rg];void 0===b&&(b=a[Rg]=new Set);return b}function Ga(a){return{current:a}}function t(a,b){0>ub||(a.current=ve[ub],ve[ub]=null,ub--)}function A(a,b,c){ub++;ve[ub]=a.current;a.current=b}function vb(a,b){var c=a.type.contextTypes;if(!c)return Ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=
-b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function S(a){a=a.childContextTypes;return null!==a&&void 0!==a}function Sg(a,b,c){if(D.current!==Ha)throw Error(m(168));A(D,b);A(J,c)}function Tg(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(m(108,hb(b)||"Unknown",e));return B({},c,d)}function Xc(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ha;Ya=D.current;
-A(D,a);A(J,J.current);return!0}function Ug(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=Tg(a,b,Ya),d.__reactInternalMemoizedMergedChildContext=a,t(J),t(D),A(D,a)):t(J);A(J,c)}function wb(){switch(oj()){case Yc:return 99;case Vg:return 98;case Wg:return 97;case Xg:return 96;case Yg:return 95;default:throw Error(m(332));}}function Zg(a){switch(a){case 99:return Yc;case 98:return Vg;case 97:return Wg;case 96:return Xg;case 95:return Yg;default:throw Error(m(332));}}function Za(a,b){a=Zg(a);
-return pj(a,b)}function bc(a,b,c){a=Zg(a);return we(a,b,c)}function ja(){if(null!==Zc){var a=Zc;Zc=null;xe(a)}$g()}function $g(){if(!ye&&null!==pa){ye=!0;var a=0;try{var b=pa;Za(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});pa=null}catch(c){throw null!==pa&&(pa=pa.slice(a+1)),we(Yc,ja),c;}finally{ye=!1}}}function ea(a,b){if(a&&a.defaultProps){b=B({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function ze(){$c=xb=ad=null}function Ae(a){var b=
-bd.current;t(bd);a.type._context._currentValue=b}function ah(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function yb(a,b){ad=a;$c=xb=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(fa=!0),a.firstContext=null)}function Y(a,b){if($c!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)$c=a,b=1073741823;b={context:a,observedBits:b,
-next:null};if(null===xb){if(null===ad)throw Error(m(308));xb=b;ad.dependencies={lanes:0,firstContext:b,responders:null}}else xb=xb.next=b}return a._currentValue}function Be(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function bh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ia(a,b){return{eventTime:a,
-lane:b,tag:0,payload:null,callback:null,next:null}}function Ja(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}function ch(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=
-f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=b;c.lastBaseUpdate=b}function cc(a,b,c,d){var e=a.updateQueue;Ka=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,v=k.next;k.next=null;null===g?f=v:g.next=v;g=k;var m=a.alternate;if(null!==m){m=m.updateQueue;var l=m.lastBaseUpdate;l!==g&&(null===l?m.firstBaseUpdate=
-v:l.next=v,m.lastBaseUpdate=k)}}if(null!==f){l=e.baseState;g=0;m=v=k=null;do{h=f.lane;var r=f.eventTime;if((d&h)===h){null!==m&&(m=m.next={eventTime:r,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});a:{var n=a,t=f;h=b;r=c;switch(t.tag){case 1:n=t.payload;if("function"===typeof n){l=n.call(r,l,h);break a}l=n;break a;case 3:n.flags=n.flags&-4097|64;case 0:n=t.payload;h="function"===typeof n?n.call(r,l,h):n;if(null===h||void 0===h)break a;l=B({},l,h);break a;case 2:Ka=!0}}null!==f.callback&&
-(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else r={eventTime:r,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===m?(v=m=r,k=l):m=m.next=r,g|=h;f=f.next;if(null===f)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===m&&(k=l);e.baseState=k;e.firstBaseUpdate=v;e.lastBaseUpdate=m;La|=g;a.lanes=g;a.memoizedState=l}}function dh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=
-a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(m(191,e));e.call(d)}}}function cd(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:B({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}function eh(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!Zb(c,d)||!Zb(e,f):!0}function fh(a,b,c){var d=!1,e=Ha;var f=b.contextType;"object"===
-typeof f&&null!==f?f=Y(f):(e=S(b)?Ya:D.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?vb(a,e):Ha);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=dd;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}function gh(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&
-b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&dd.enqueueReplaceState(b,b.state,null)}function Ce(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=hh;Be(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=Y(f):(f=S(b)?Ya:D.current,e.context=vb(a,f));cc(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(cd(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||
-"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&dd.enqueueReplaceState(e,e.state,null),cc(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4)}function dc(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==
-c.tag)throw Error(m(309));var d=c.stateNode}if(!d)throw Error(m(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===hh&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(m(284));if(!c._owner)throw Error(m(290,a));}return a}function ed(a,b){if("textarea"!==a.type)throw Error(m(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+
-"}":b));}function ih(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Ma(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=
-2,c):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=De(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=dc(a,b,c),d.return=a,d;d=fd(c.type,c.key,c.props,null,a.mode,d);d.ref=dc(a,b,c);d.return=a;return d}function v(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
-Ee(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function l(a,b,c,d,f){if(null===b||7!==b.tag)return b=zb(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function n(a,b,c){if("string"===typeof b||"number"===typeof b)return b=De(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case ec:return c=fd(b.type,b.key,b.props,null,a.mode,c),c.ref=dc(a,null,b),c.return=a,c;case Ua:return b=Ee(b,a.mode,c),b.return=a,b}if(gd(b)||Jb(b))return b=zb(b,
-a.mode,c,null),b.return=a,b;ed(a,b)}return null}function r(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case ec:return c.key===e?c.type===wa?l(a,b,c.props.children,d,e):k(a,b,c,d):null;case Ua:return c.key===e?v(a,b,c,d):null}if(gd(c)||Jb(c))return null!==e?null:l(a,b,c,d,null);ed(a,c)}return null}function t(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||
-null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case ec:return a=a.get(null===d.key?c:d.key)||null,d.type===wa?l(b,a,d.props.children,e,d.key):k(b,a,d,e);case Ua:return a=a.get(null===d.key?c:d.key)||null,v(b,a,d,e)}if(gd(d)||Jb(d))return a=a.get(c)||null,l(b,a,d,e,null);ed(b,d)}return null}function w(e,g,h,k){for(var m=null,v=null,l=g,p=g=0,x=null;null!==l&&p<h.length;p++){l.index>p?(x=l,l=null):x=l.sibling;var C=r(e,l,h[p],k);if(null===C){null===l&&(l=x);break}a&&l&&null===
-C.alternate&&b(e,l);g=f(C,g,p);null===v?m=C:v.sibling=C;v=C;l=x}if(p===h.length)return c(e,l),m;if(null===l){for(;p<h.length;p++)l=n(e,h[p],k),null!==l&&(g=f(l,g,p),null===v?m=l:v.sibling=l,v=l);return m}for(l=d(e,l);p<h.length;p++)x=t(l,e,p,h[p],k),null!==x&&(a&&null!==x.alternate&&l.delete(null===x.key?p:x.key),g=f(x,g,p),null===v?m=x:v.sibling=x,v=x);a&&l.forEach(function(a){return b(e,a)});return m}function z(e,g,h,k){var l=Jb(h);if("function"!==typeof l)throw Error(m(150));h=l.call(h);if(null==
-h)throw Error(m(151));for(var v=l=null,p=g,x=g=0,C=null,q=h.next();null!==p&&!q.done;x++,q=h.next()){p.index>x?(C=p,p=null):C=p.sibling;var Da=r(e,p,q.value,k);if(null===Da){null===p&&(p=C);break}a&&p&&null===Da.alternate&&b(e,p);g=f(Da,g,x);null===v?l=Da:v.sibling=Da;v=Da;p=C}if(q.done)return c(e,p),l;if(null===p){for(;!q.done;x++,q=h.next())q=n(e,q.value,k),null!==q&&(g=f(q,g,x),null===v?l=q:v.sibling=q,v=q);return l}for(p=d(e,p);!q.done;x++,q=h.next())q=t(p,e,x,q.value,k),null!==q&&(a&&null!==
-q.alternate&&p.delete(null===q.key?x:q.key),g=f(q,g,x),null===v?l=q:v.sibling=q,v=q);a&&p.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===wa&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case ec:a:{l=f.key;for(k=d;null!==k;){if(k.key===l){switch(k.tag){case 7:if(f.type===wa){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,
-k.sibling);d=e(k,f.props);d.ref=dc(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===wa?(d=zb(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=fd(f.type,f.key,f.props,null,a.mode,h),h.ref=dc(a,d,f),h.return=a,a=h)}return g(a);case Ua:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=
-d.sibling}d=Ee(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=De(f,a.mode,h),d.return=a,a=d),g(a);if(gd(f))return w(a,d,f,h);if(Jb(f))return z(a,d,f,h);l&&ed(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(m(152,hb(a.type)||"Component"));}return c(a,d)}}function $a(a){if(a===fc)throw Error(m(174));return a}function Fe(a,b){A(gc,
-b);A(hc,a);A(ka,fc);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Rd(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=Rd(b,a)}t(ka);A(ka,b)}function Ab(a){t(ka);t(hc);t(gc)}function jh(a){$a(gc.current);var b=$a(ka.current);var c=Rd(b,a.type);b!==c&&(A(hc,a),A(ka,c))}function Ge(a){hc.current===a&&(t(ka),t(hc))}function hd(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||
-"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function kh(a,b){var c=Z(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=
-a.lastEffect=c}function lh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}function He(a){if(la){var b=Na;if(b){var c=b;if(!lh(a,b)){b=tb(c.nextSibling);if(!b||!lh(a,b)){a.flags=a.flags&-1025|2;la=!1;ra=a;return}kh(ra,c)}ra=a;Na=tb(b.firstChild)}else a.flags=a.flags&-1025|2,la=!1,
-ra=a}}function mh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;ra=a}function id(a){if(a!==ra)return!1;if(!la)return mh(a),la=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!se(b,a.memoizedProps))for(b=Na;b;)kh(a,b),b=tb(b.nextSibling);mh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(m(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){Na=tb(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==
-c&&"$?"!==c||b++}a=a.nextSibling}Na=null}}else Na=ra?tb(a.stateNode.nextSibling):null;return!0}function Ie(){Na=ra=null;la=!1}function Je(){for(var a=0;a<Bb.length;a++)Bb[a]._workInProgressVersionPrimary=null;Bb.length=0}function T(){throw Error(m(321));}function Ke(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!X(a[c],b[c]))return!1;return!0}function Le(a,b,c,d,e,f){ic=f;y=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;jc.current=null===a||null===a.memoizedState?qj:rj;
-a=c(d,e);if(kc){f=0;do{kc=!1;if(!(25>f))throw Error(m(301));f+=1;K=N=null;b.updateQueue=null;jc.current=sj;a=c(d,e)}while(kc)}jc.current=jd;b=null!==N&&null!==N.next;ic=0;K=N=y=null;kd=!1;if(b)throw Error(m(300));return a}function ab(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===K?y.memoizedState=K=a:K=K.next=a;return K}function bb(){if(null===N){var a=y.alternate;a=null!==a?a.memoizedState:null}else a=N.next;var b=null===K?y.memoizedState:K.next;if(null!==
-b)K=b,N=a;else{if(null===a)throw Error(m(310));N=a;a={memoizedState:N.memoizedState,baseState:N.baseState,baseQueue:N.baseQueue,queue:N.queue,next:null};null===K?y.memoizedState=K=a:K=K.next=a}return K}function ma(a,b){return"function"===typeof b?b(a):b}function lc(a,b,c){b=bb();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=N,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;
-var h=g=f=null,k=e;do{var l=k.lane;if((ic&l)===l)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var n={lane:l,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=n,f=d):h=h.next=n;y.lanes|=l;La|=l}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;X(d,b.memoizedState)||(fa=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=
-d}return[b.memoizedState,c.dispatch]}function mc(a,b,c){b=bb();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);X(f,b.memoizedState)||(fa=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function nh(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,
-a=(ic&a)===a)b._workInProgressVersionPrimary=d,Bb.push(b);if(a)return c(b._source);Bb.push(b);throw Error(m(350));}function oh(a,b,c,d){var e=R;if(null===e)throw Error(m(349));var f=b._getVersion,g=f(b._source),h=jc.current,k=h.useState(function(){return nh(e,b,c)}),l=k[1],n=k[0];k=K;var t=a.memoizedState,r=t.refs,w=r.getSnapshot,z=t.source;t=t.subscribe;var B=y;a.memoizedState={refs:r,source:b,subscribe:d};h.useEffect(function(){r.getSnapshot=c;r.setSnapshot=l;var a=f(b._source);if(!X(g,a)){a=c(b._source);
-X(n,a)||(l(a),a=Oa(B),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=e.entanglements,h=a;0<h;){var k=31-Ba(h),m=1<<k;d[k]|=a;h&=~m}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=r.getSnapshot,c=r.setSnapshot;try{c(a(b._source));var d=Oa(B);e.mutableReadLanes|=d&e.pendingLanes}catch(q){c(function(){throw q;})}})},[b,d]);X(w,c)&&X(z,b)&&X(t,d)||(a={pending:null,dispatch:null,lastRenderedReducer:ma,lastRenderedState:n},a.dispatch=l=Me.bind(null,
-y,a),k.queue=a,k.baseQueue=null,n=nh(e,b,c),k.memoizedState=k.baseState=n);return n}function ph(a,b,c){var d=bb();return oh(d,a,b,c)}function nc(a){var b=ab();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:ma,lastRenderedState:a};a=a.dispatch=Me.bind(null,y,a);return[b.memoizedState,a]}function ld(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=y.updateQueue;null===b?(b={lastEffect:null},y.updateQueue=b,b.lastEffect=
-a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function qh(a){var b=ab();a={current:a};return b.memoizedState=a}function md(a){return bb().memoizedState}function Ne(a,b,c,d){var e=ab();y.flags|=a;e.memoizedState=ld(1|b,c,void 0,void 0===d?null:d)}function Oe(a,b,c,d){var e=bb();d=void 0===d?null:d;var f=void 0;if(null!==N){var g=N.memoizedState;f=g.destroy;if(null!==d&&Ke(d,g.deps)){ld(b,c,f,d);return}}y.flags|=a;e.memoizedState=ld(1|
-b,c,f,d)}function rh(a,b){return Ne(516,4,a,b)}function nd(a,b){return Oe(516,4,a,b)}function sh(a,b){return Oe(4,2,a,b)}function th(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function uh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Oe(4,2,th.bind(null,b,a),c)}function Pe(a,b){}function vh(a,b){var c=bb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Ke(b,d[1]))return d[0];
-c.memoizedState=[a,b];return a}function wh(a,b){var c=bb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Ke(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function tj(a,b){var c=wb();Za(98>c?98:c,function(){a(!0)});Za(97<c?97:c,function(){var c=aa.transition;aa.transition=1;try{a(!1),b()}finally{aa.transition=c}})}function Me(a,b,c){var d=W(),e=Oa(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);
-b.pending=f;g=a.alternate;if(a===y||null!==g&&g===y)kc=kd=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(X(k,h))return}catch(v){}finally{}Pa(a,e,d)}}function U(a,b,c,d){b.child=null===a?xh(b,null,c,d):od(b,a.child,c,d)}function yh(a,b,c,d,e){c=c.render;var f=b.ref;yb(b,e);d=Le(a,b,c,d,f,e);if(null!==a&&!fa)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,sa(a,b,e);b.flags|=1;
-U(a,b,d,e);return b.child}function zh(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!Qe(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,Ah(a,b,g,d,e,f);a=fd(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:Zb,c(e,d)&&a.ref===b.ref))return sa(a,b,f);b.flags|=1;a=Ma(g,d);a.ref=b.ref;a.return=b;return b.child=a}function Ah(a,b,c,d,e,f){if(null!==a&&Zb(a.memoizedProps,
-d)&&a.ref===b.ref)if(fa=!1,0!==(f&e))0!==(a.flags&16384)&&(fa=!0);else return b.lanes=a.lanes,sa(a,b,f);return Re(a,b,c,d,f)}function Se(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode||"unstable-defer-without-hiding"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},pd(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},pd(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState=
-{baseLanes:a},pd(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,pd(b,d);U(a,b,e,c);return b.child}function Bh(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function Re(a,b,c,d,e){var f=S(c)?Ya:D.current;f=vb(b,f);yb(b,e);c=Le(a,b,c,d,f,e);if(null!==a&&!fa)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,sa(a,b,e);b.flags|=1;U(a,b,c,e);return b.child}function Ch(a,b,c,d,e){if(S(c)){var f=!0;Xc(b)}else f=!1;yb(b,e);if(null===b.stateNode)null!==
-a&&(a.alternate=null,b.alternate=null,b.flags|=2),fh(b,c,d),Ce(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=Y(l):(l=S(c)?Ya:D.current,l=vb(b,l));var m=c.getDerivedStateFromProps,n="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;n||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&gh(b,g,d,l);Ka=!1;var r=b.memoizedState;
-g.state=r;cc(b,d,g,e);k=b.memoizedState;h!==d||r!==k||J.current||Ka?("function"===typeof m&&(cd(b,c,m,d),k=b.memoizedState),(h=Ka||eh(b,c,h,d,r,k,l))?(n||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4)):("function"===typeof g.componentDidMount&&(b.flags|=4),
-b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;bh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:ea(b.type,h);g.props=l;n=b.pendingProps;r=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=Y(k):(k=S(c)?Ya:D.current,k=vb(b,k));var t=c.getDerivedStateFromProps;(m="function"===typeof t||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
-"function"!==typeof g.componentWillReceiveProps||(h!==n||r!==k)&&gh(b,g,d,k);Ka=!1;r=b.memoizedState;g.state=r;cc(b,d,g,e);var w=b.memoizedState;h!==n||r!==w||J.current||Ka?("function"===typeof t&&(cd(b,c,t,d),w=b.memoizedState),(l=Ka||eh(b,c,l,d,r,w,k))?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,w,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,
-w,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=w),g.props=d,g.state=w,g.context=k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==
-typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=256),d=!1)}return Te(a,b,c,d,f,e)}function Te(a,b,c,d,e,f){Bh(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&Ug(b,c,!1),sa(a,b,f);d=b.stateNode;uj.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=od(b,a.child,null,f),b.child=od(b,null,h,f)):U(a,b,h,f);b.memoizedState=d.state;e&&Ug(b,c,!0);return b.child}function Dh(a){var b=a.stateNode;b.pendingContext?
-Sg(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Sg(a,b.context,!1);Fe(a,b.containerInfo)}function Eh(a,b,c){var d=b.pendingProps,e=E.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);A(E,e&1);if(null===a){void 0!==d.fallback&&He(b);a=d.children;e=d.fallback;if(f)return a=Fh(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=
-qd,a;if("number"===typeof d.unstable_expectedLoadTime)return a=Fh(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=qd,b.lanes=33554432,a;c=Ue({mode:"visible",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=Gh(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=qd,d;c=Hh(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=
-Gh(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=qd,d;c=Hh(a,b,d.children,c);b.memoizedState=null;return c}function Fh(a,b,c,d){var e=a.mode,f=a.child;b={mode:"hidden",children:b};0===(e&2)&&null!==f?(f.childLanes=0,f.pendingProps=b):f=Ue(b,e,0,null);c=zb(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}function Hh(a,b,c,d){var e=a.child;a=e.sibling;c=Ma(e,
-{mode:"visible",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}function Gh(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:"hidden",children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Ma(g,h);null!==a?d=Ma(a,d):(d=zb(d,f,e,null),d.flags|=
-2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function Ih(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);ah(a.return,b)}function Ve(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}function Jh(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;U(a,b,d.children,c);d=E.current;
-if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&Ih(a,c);else if(19===a.tag)Ih(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}A(E,d);if(0===(b.mode&2))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===
-hd(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ve(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===hd(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ve(b,!0,c,null,f,b.lastEffect);break;case "together":Ve(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}function sa(a,b,c){null!==a&&(b.dependencies=a.dependencies);La|=b.lanes;if(0!==(c&
-b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(m(153));if(null!==b.child){a=b.child;c=Ma(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=Ma(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}function oc(a,b){if(!la)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&
-(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}function vj(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return S(b.type)&&(t(J),t(D)),null;case 3:Ab();t(J);t(D);Je();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)id(b)?b.flags|=4:d.hydrate||(b.flags|=256);Kh(b);return null;case 5:Ge(b);var e=$a(gc.current);
-c=b.type;if(null!==a&&null!=b.stateNode)wj(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===b.stateNode)throw Error(m(166));return null}a=$a(ka.current);if(id(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Fa]=b;d[Wc]=f;switch(c){case "dialog":z("cancel",d);z("close",d);break;case "iframe":case "object":case "embed":z("load",d);break;case "video":case "audio":for(a=0;a<pc.length;a++)z(pc[a],d);break;case "source":z("error",d);break;case "img":case "image":case "link":z("error",d);
-z("load",d);break;case "details":z("toggle",d);break;case "input":Gf(d,f);z("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};z("invalid",d);break;case "textarea":Jf(d,f),z("invalid",d)}Sd(c,f);a=null;for(var g in f)f.hasOwnProperty(g)&&(e=f[g],"children"===g?"string"===typeof e?d.textContent!==e&&(a=["children",e]):"number"===typeof e&&d.textContent!==""+e&&(a=["children",""+e]):Ib.hasOwnProperty(g)&&null!=e&&"onScroll"===g&&z("scroll",d));switch(c){case "input":Fc(d);If(d,
-f,!0);break;case "textarea":Fc(d);Lf(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=Vc)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===a&&(a=Mf(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?
-g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Fa]=b;a[Wc]=d;xj(a,b,!1,!1);b.stateNode=a;g=Td(c,d);switch(c){case "dialog":z("cancel",a);z("close",a);e=d;break;case "iframe":case "object":case "embed":z("load",a);e=d;break;case "video":case "audio":for(e=0;e<pc.length;e++)z(pc[e],a);e=d;break;case "source":z("error",a);e=d;break;case "img":case "image":case "link":z("error",a);z("load",a);e=d;break;case "details":z("toggle",a);e=d;break;case "input":Gf(a,d);e=Md(a,d);z("invalid",
-a);break;case "option":e=Pd(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=B({},d,{value:void 0});z("invalid",a);break;case "textarea":Jf(a,d);e=Qd(a,d);z("invalid",a);break;default:e=d}Sd(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=h[f];"style"===f?Of(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&Lh(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&qc(a,k):"number"===typeof k&&qc(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==
-f&&"autoFocus"!==f&&(Ib.hasOwnProperty(f)?null!=k&&"onScroll"===f&&z("scroll",a):null!=k&&Ed(a,f,k,g))}switch(c){case "input":Fc(a);If(a,d,!1);break;case "textarea":Fc(a);Lf(a);break;case "option":null!=d.value&&a.setAttribute("value",""+xa(d.value));break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?ib(a,!!d.multiple,f,!1):null!=d.defaultValue&&ib(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=Vc)}Pg(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=
-128)}return null;case 6:if(a&&null!=b.stateNode)yj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(m(166));c=$a(gc.current);$a(ka.current);id(b)?(d=b.stateNode,c=b.memoizedProps,d[Fa]=b,d.nodeValue!==c&&(b.flags|=4)):(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Fa]=b,b.stateNode=d)}return null;case 13:t(E);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&id(b):c=null!==a.memoizedState;
-if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(E.current&1))0===L&&(L=3);else{if(0===L||3===L)L=4;null===R||0===(La&134217727)&&0===(Cb&134217727)||Db(R,O)}if(d||c)b.flags|=4;return null;case 4:return Ab(),Kh(b),null===a&&Cg(b.stateNode.containerInfo),null;case 10:return Ae(b),null;case 17:return S(b.type)&&(t(J),t(D)),null;case 19:t(E);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)oc(d,!1);else{if(0!==L||null!==
-a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=hd(a);if(null!==g){b.flags|=64;oc(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=
-g.lanes,f.child=g.child,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;A(E,E.current&1|2);return b.child}a=a.sibling}null!==d.tail&&P()>We&&(b.flags|=64,f=!0,oc(d,!1),b.lanes=33554432)}else{if(!f)if(a=hd(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),oc(d,!0),null===d.tail&&"hidden"===d.tailMode&&
-!g.alternate&&!la)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*P()-d.renderingStartTime>We&&1073741824!==c&&(b.flags|=64,f=!0,oc(d,!1),b.lanes=33554432);d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=P(),c.sibling=null,b=E.current,A(E,f?b&1|2:b&1),c):null;case 23:case 24:return ta=cb.current,t(cb),null!==a&&null!==
-a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(m(156,b.tag));}function zj(a,b){switch(a.tag){case 1:return S(a.type)&&(t(J),t(D)),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 3:Ab();t(J);t(D);Je();b=a.flags;if(0!==(b&64))throw Error(m(285));a.flags=b&-4097|64;return a;case 5:return Ge(a),null;case 13:return t(E),b=a.flags,b&4096?(a.flags=b&-4097|64,a):null;case 19:return t(E),null;case 4:return Ab(),null;case 10:return Ae(a),
-null;case 23:case 24:return ta=cb.current,t(cb),null;default:return null}}function Xe(a,b){try{var c="",d=b;do c+=pi(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e}}function Ye(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function Mh(a,b,c){c=Ia(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){rd||(rd=!0,Ze=d);Ye(a,b)};return c}function Nh(a,b,c){c=Ia(-1,c);c.tag=
-3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Ye(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===na?na=new Set([this]):na.add(this),Ye(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}function Oh(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Qa(a,c)}else b.current=null}function Aj(a,
-b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ea(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&te(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(m(163));}function Bj(a,b,c,d){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;
-do 3===(a.tag&3)&&(d=a.create,a.destroy=d()),a=a.next;while(a!==b)}b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(Ph(c,a),Cj(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:ea(c.type,b.memoizedProps),a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&dh(c,b,a);return;case 3:b=c.updateQueue;
-if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}dh(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&Pg(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&bg(c))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(m(163));}function Qh(a,b){for(var c=a;;){if(5===
-c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=Nf("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===a)break;for(;null===c.sibling;){if(null===
-c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}function Rh(a,b,c){if(db&&"function"===typeof db.onCommitFiberUnmount)try{db.onCommitFiberUnmount($e,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))Ph(b,c);else{d=b;try{e()}catch(f){Qa(d,f)}}c=c.next}while(c!==a)}break;case 1:Oh(b);a=b.stateNode;if("function"===typeof a.componentWillUnmount)try{a.props=
-b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Qa(b,f)}break;case 5:Oh(b);break;case 4:Sh(a,b)}}function Th(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function Uh(a){return 5===a.tag||3===a.tag||4===a.tag}function Vh(a){a:{for(var b=a.return;null!==b;){if(Uh(b))break a;b=b.return}throw Error(m(160));}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=
-!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(m(161));}c.flags&16&&(qc(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Uh(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?af(a,c,b):bf(a,c,b)}function af(a,b,c){var d=
-a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Vc));else if(4!==d&&(a=a.child,null!==a))for(af(a,b,c),a=a.sibling;null!==a;)af(a,b,c),a=a.sibling}function bf(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?c.insertBefore(a,b):c.appendChild(a);
-else if(4!==d&&(a=a.child,null!==a))for(bf(a,b,c),a=a.sibling;null!==a;)bf(a,b,c),a=a.sibling}function Sh(a,b,c){c=b;for(var d=!1,e,f;;){if(!d){e=c.return;a:for(;;){if(null===e)throw Error(m(160));f=e.stateNode;switch(e.tag){case 5:e=f;f=!1;break a;case 3:e=f.containerInfo;f=!0;break a;case 4:e=f.containerInfo;f=!0;break a}e=e.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(Rh(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===h)break a;for(;null===k.sibling;){if(null===
-k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(Rh(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===c.tag&&(d=!1)}c.sibling.return=c.return;c=
-c.sibling}}function cf(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[Wc]=d;"input"===a&&"radio"===d.type&&null!=d.name&&Hf(c,d);Td(a,e);b=Td(a,d);for(e=0;e<f.length;e+=
-2){var g=f[e],h=f[e+1];"style"===g?Of(c,h):"dangerouslySetInnerHTML"===g?Lh(c,h):"children"===g?qc(c,h):Ed(c,g,h,b)}switch(a){case "input":Nd(c,d);break;case "textarea":Kf(c,d);break;case "select":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?ib(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?ib(c,!!d.multiple,d.defaultValue,!0):ib(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===b.stateNode)throw Error(m(162));b.stateNode.nodeValue=
-b.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,bg(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(df=P(),Qh(b.child,!0));Wh(b);return;case 19:Wh(b);return;case 17:return;case 23:case 24:Qh(b,null!==b.memoizedState);return}throw Error(m(163));}function Wh(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Dj);b.forEach(function(b){var d=Ej.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}function Fj(a,
-b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}function Eb(){We=P()+500}function W(){return 0!==(n&48)?P():-1!==sd?sd:sd=P()}function Oa(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===wb()?1:2;0===ua&&(ua=Fb);if(0!==Gj.transition){0!==td&&(td=null!==ef?ef.pendingLanes:0);a=ua;var b=4186112&~td;b&=-b;0===b&&(a=4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=wb();0!==(n&4)&&98===a?a=Nc(12,ua):(a=Fi(a),a=Nc(a,ua));
-return a}function Pa(a,b,c){if(50<rc)throw rc=0,ff=null,Error(m(185));a=ud(a,b);if(null===a)return null;Oc(a,b,c);a===R&&(Cb|=b,4===L&&Db(a,O));var d=wb();1===b?0!==(n&8)&&0===(n&48)?gf(a):(ba(a,c),0===n&&(Eb(),ja())):(0===(n&4)||98!==d&&99!==d||(null===va?va=new Set([a]):va.add(a)),ba(a,c));ef=a}function ud(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}
-function ba(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Ba(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;mb(k);var m=w;f[h]=10<=m?l+250:6<=m?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=Wb(a,a===R?O:0);b=w;if(0===d)null!==c&&(c!==hf&&xe(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==c){if(a.callbackPriority===b)return;c!==hf&&xe(c)}15===b?(c=gf.bind(null,a),null===pa?(pa=[c],Zc=we(Yc,$g)):pa.push(c),
-c=hf):14===b?c=bc(99,gf.bind(null,a)):(c=Gi(b),c=bc(c,Xh.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}function Xh(a){sd=-1;td=ua=0;if(0!==(n&48))throw Error(m(327));var b=a.callbackNode;if(Ra()&&a.callbackNode!==b)return null;var c=Wb(a,a===R?O:0);if(0===c)return null;var d=c;var e=n;n|=16;var f=Yh();if(R!==a||O!==d)Eb(),Gb(a,d);do try{Hj();break}catch(h){Zh(a,h)}while(1);ze();vd.current=f;n=e;null!==G?d=0:(R=null,O=0,d=L);if(0!==(Fb&Cb))Gb(a,0);else if(0!==d){2===d&&(n|=64,a.hydrate&&(a.hydrate=
-!1,te(a.containerInfo)),c=eg(a),0!==c&&(d=sc(a,c)));if(1===d)throw b=wd,Gb(a,0),Db(a,c),ba(a,P()),b;a.finishedWork=a.current.alternate;a.finishedLanes=c;switch(d){case 0:case 1:throw Error(m(345));case 2:eb(a);break;case 3:Db(a,c);if((c&62914560)===c&&(d=df+500-P(),10<d)){if(0!==Wb(a,0))break;e=a.suspendedLanes;if((e&c)!==c){W();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=$h(eb.bind(null,a),d);break}eb(a);break;case 4:Db(a,c);if((c&4186112)===c)break;d=a.eventTimes;for(e=-1;0<c;){var g=
-31-Ba(c);f=1<<g;g=d[g];g>e&&(e=g);c&=~f}c=e;c=P()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>c?4320:1960*Ij(c/1960))-c;if(10<c){a.timeoutHandle=$h(eb.bind(null,a),c);break}eb(a);break;case 5:eb(a);break;default:throw Error(m(329));}}ba(a,P());return a.callbackNode===b?Xh.bind(null,a):null}function Db(a,b){b&=~jf;b&=~Cb;a.suspendedLanes|=b;a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Ba(b),d=1<<c;a[c]=-1;b&=~d}}function gf(a){if(0!==(n&48))throw Error(m(327));Ra();
-if(a===R&&0!==(a.expiredLanes&O)){var b=O;var c=sc(a,b);0!==(Fb&Cb)&&(b=Wb(a,b),c=sc(a,b))}else b=Wb(a,0),c=sc(a,b);0!==a.tag&&2===c&&(n|=64,a.hydrate&&(a.hydrate=!1,te(a.containerInfo)),b=eg(a),0!==b&&(c=sc(a,b)));if(1===c)throw c=wd,Gb(a,0),Db(a,b),ba(a,P()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;eb(a);ba(a,P());return null}function Jj(){if(null!==va){var a=va;va=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;ba(a,P())})}ja()}function ai(a,b){var c=n;n|=1;try{return a(b)}finally{n=
-c,0===n&&(Eb(),ja())}}function bi(a,b){var c=n;n&=-2;n|=8;try{return a(b)}finally{n=c,0===n&&(Eb(),ja())}}function pd(a,b){A(cb,ta);ta|=b;Fb|=b}function Gb(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Kj(c));if(null!==G)for(c=G.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&(t(J),t(D));break;case 3:Ab();t(J);t(D);Je();break;case 5:Ge(d);break;case 4:Ab();break;case 13:t(E);break;case 19:t(E);break;case 10:Ae(d);
-break;case 23:case 24:ta=cb.current,t(cb)}c=c.return}R=a;G=Ma(a.current,null);O=ta=Fb=b;L=0;wd=null;jf=Cb=La=0}function Zh(a,b){do{var c=G;try{ze();jc.current=jd;if(kd){for(var d=y.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}kd=!1}ic=0;K=N=y=null;kc=!1;kf.current=null;if(null===c||null===c.return){L=1;wd=b;G=null;break}a:{var f=a,g=c.return,h=c,k=b;b=O;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k;
-if(0===(h.mode&2)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var n=0!==(E.current&1),r=g;do{var t;if(t=13===r.tag){var w=r.memoizedState;if(null!==w)t=null!==w.dehydrated?!0:!1;else{var z=r.memoizedProps;t=void 0===z.fallback?!1:!0!==z.unstable_avoidThisFallback?!0:n?!1:!0}}if(t){var C=r.updateQueue;if(null===C){var x=new Set;x.add(l);r.updateQueue=x}else C.add(l);if(0===(r.mode&2)){r.flags|=64;h.flags|=
-16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var p=Ia(-1,1);p.tag=2;Ja(h,p)}h.lanes|=1;break a}k=void 0;h=b;var q=f.pingCache;null===q?(q=f.pingCache=new Lj,k=new Set,q.set(l,k)):(k=q.get(l),void 0===k&&(k=new Set,q.set(l,k)));if(!k.has(h)){k.add(h);var u=Mj.bind(null,f,l,h);l.then(u,u)}r.flags|=4096;r.lanes=b;break a}r=r.return}while(null!==r);k=Error((hb(h.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==
-L&&(L=2);k=Xe(k,h);r=g;do{switch(r.tag){case 3:f=k;r.flags|=4096;b&=-b;r.lanes|=b;var B=Mh(r,f,b);ch(r,B);break a;case 1:f=k;var A=r.type,D=r.stateNode;if(0===(r.flags&64)&&("function"===typeof A.getDerivedStateFromError||null!==D&&"function"===typeof D.componentDidCatch&&(null===na||!na.has(D)))){r.flags|=4096;b&=-b;r.lanes|=b;var F=Nh(r,f,b);ch(r,F);break a}}r=r.return}while(null!==r)}ci(c)}catch(qa){b=qa;G===c&&null!==c&&(G=c=c.return);continue}break}while(1)}function Yh(){var a=vd.current;vd.current=
-jd;return null===a?jd:a}function sc(a,b){var c=n;n|=16;var d=Yh();R===a&&O===b||Gb(a,b);do try{Nj();break}catch(e){Zh(a,e)}while(1);ze();n=c;vd.current=d;if(null!==G)throw Error(m(261));R=null;O=0;return L}function Nj(){for(;null!==G;)di(G)}function Hj(){for(;null!==G&&!Oj();)di(G)}function di(a){var b=Pj(a.alternate,a,ta);a.memoizedProps=a.pendingProps;null===b?ci(a):G=b;kf.current=null}function ci(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){c=vj(c,b,ta);if(null!==c){G=c;return}c=
-b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(ta&1073741824)||0===(c.mode&4)){for(var d=0,e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==a.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=zj(b);if(null!==c){c.flags&=2047;G=c;
-return}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){G=b;return}G=b=a}while(null!==b);0===L&&(L=5)}function eb(a){var b=wb();Za(99,Qj.bind(null,a,b));return null}function Qj(a,b){do Ra();while(null!==tc);if(0!==(n&48))throw Error(m(327));var c=a.finishedWork;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(m(177));a.callbackNode=null;var d=c.lanes|c.childLanes,e=d,f=a.pendingLanes&~e;a.pendingLanes=e;a.suspendedLanes=0;
-a.pingedLanes=0;a.expiredLanes&=e;a.mutableReadLanes&=e;a.entangledLanes&=e;e=a.entanglements;for(var g=a.eventTimes,h=a.expirationTimes;0<f;){var k=31-Ba(f),v=1<<k;e[k]=0;g[k]=-1;h[k]=-1;f&=~v}null!==va&&0===(d&24)&&va.has(a)&&va.delete(a);a===R&&(G=R=null,O=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,d=c.firstEffect):d=c:d=c.firstEffect;if(null!==d){e=n;n|=32;kf.current=null;lf=Pc;g=xg();if(ne(g)){if("selectionStart"in g)h={start:g.selectionStart,end:g.selectionEnd};else a:if(h=
-(h=g.ownerDocument)&&h.defaultView||window,(v=h.getSelection&&h.getSelection())&&0!==v.rangeCount){h=v.anchorNode;f=v.anchorOffset;k=v.focusNode;v=v.focusOffset;try{h.nodeType,k.nodeType}catch(qa){h=null;break a}var t=0,w=-1,r=-1,z=0,B=0,y=g,C=null;b:for(;;){for(var x;;){y!==h||0!==f&&3!==y.nodeType||(w=t+f);y!==k||0!==v&&3!==y.nodeType||(r=t+v);3===y.nodeType&&(t+=y.nodeValue.length);if(null===(x=y.firstChild))break;C=y;y=x}for(;;){if(y===g)break b;C===h&&++z===f&&(w=t);C===k&&++B===v&&(r=t);if(null!==
-(x=y.nextSibling))break;y=C;C=y.parentNode}y=x}h=-1===w||-1===r?null:{start:w,end:r}}else h=null;h=h||{start:0,end:0}}else h=null;mf={focusedElem:g,selectionRange:h};Pc=!1;uc=null;xd=!1;l=d;do try{Rj()}catch(qa){if(null===l)throw Error(m(330));Qa(l,qa);l=l.nextEffect}while(null!==l);uc=null;l=d;do try{for(g=a;null!==l;){var p=l.flags;p&16&&qc(l.stateNode,"");if(p&128){var q=l.alternate;if(null!==q){var u=q.ref;null!==u&&("function"===typeof u?u(null):u.current=null)}}switch(p&1038){case 2:Vh(l);l.flags&=
--3;break;case 6:Vh(l);l.flags&=-3;cf(l.alternate,l);break;case 1024:l.flags&=-1025;break;case 1028:l.flags&=-1025;cf(l.alternate,l);break;case 4:cf(l.alternate,l);break;case 8:h=l;Sh(g,h);var A=h.alternate;Th(h);null!==A&&Th(A)}l=l.nextEffect}}catch(qa){if(null===l)throw Error(m(330));Qa(l,qa);l=l.nextEffect}while(null!==l);u=mf;q=xg();p=u.focusedElem;g=u.selectionRange;if(q!==p&&p&&p.ownerDocument&&wg(p.ownerDocument.documentElement,p)){null!==g&&ne(p)&&(q=g.start,u=g.end,void 0===u&&(u=q),"selectionStart"in
-p?(p.selectionStart=q,p.selectionEnd=Math.min(u,p.value.length)):(u=(q=p.ownerDocument||document)&&q.defaultView||window,u.getSelection&&(u=u.getSelection(),h=p.textContent.length,A=Math.min(g.start,h),g=void 0===g.end?A:Math.min(g.end,h),!u.extend&&A>g&&(h=g,g=A,A=h),h=vg(p,A),f=vg(p,g),h&&f&&(1!==u.rangeCount||u.anchorNode!==h.node||u.anchorOffset!==h.offset||u.focusNode!==f.node||u.focusOffset!==f.offset)&&(q=q.createRange(),q.setStart(h.node,h.offset),u.removeAllRanges(),A>g?(u.addRange(q),u.extend(f.node,
-f.offset)):(q.setEnd(f.node,f.offset),u.addRange(q))))));q=[];for(u=p;u=u.parentNode;)1===u.nodeType&&q.push({element:u,left:u.scrollLeft,top:u.scrollTop});"function"===typeof p.focus&&p.focus();for(p=0;p<q.length;p++)u=q[p],u.element.scrollLeft=u.left,u.element.scrollTop=u.top}Pc=!!lf;mf=lf=null;a.current=c;l=d;do try{for(p=a;null!==l;){var D=l.flags;D&36&&Bj(p,l.alternate,l);if(D&128){q=void 0;var E=l.ref;if(null!==E){var F=l.stateNode;switch(l.tag){case 5:q=F;break;default:q=F}"function"===typeof E?
-E(q):E.current=q}}l=l.nextEffect}}catch(qa){if(null===l)throw Error(m(330));Qa(l,qa);l=l.nextEffect}while(null!==l);l=null;Sj();n=e}else a.current=c;if(Sa)Sa=!1,tc=a,vc=b;else for(l=d;null!==l;)b=l.nextEffect,l.nextEffect=null,l.flags&8&&(D=l,D.sibling=null,D.stateNode=null),l=b;d=a.pendingLanes;0===d&&(na=null);1===d?a===ff?rc++:(rc=0,ff=a):rc=0;c=c.stateNode;if(db&&"function"===typeof db.onCommitFiberRoot)try{db.onCommitFiberRoot($e,c,void 0,64===(c.current.flags&64))}catch(qa){}ba(a,P());if(rd)throw rd=
-!1,a=Ze,Ze=null,a;if(0!==(n&8))return null;ja();return null}function Rj(){for(;null!==l;){var a=l.alternate;xd||null===uc||(0!==(l.flags&8)?Wf(l,uc)&&(xd=!0):13===l.tag&&Fj(a,l)&&Wf(l,uc)&&(xd=!0));var b=l.flags;0!==(b&256)&&Aj(a,l);0===(b&512)||Sa||(Sa=!0,bc(97,function(){Ra();return null}));l=l.nextEffect}}function Ra(){if(90!==vc){var a=97<vc?97:vc;vc=90;return Za(a,Tj)}return!1}function Cj(a,b){nf.push(b,a);Sa||(Sa=!0,bc(97,function(){Ra();return null}))}function Ph(a,b){of.push(b,a);Sa||(Sa=
-!0,bc(97,function(){Ra();return null}))}function Tj(){if(null===tc)return!1;var a=tc;tc=null;if(0!==(n&48))throw Error(m(331));var b=n;n|=32;var c=of;of=[];for(var d=0;d<c.length;d+=2){var e=c[d],f=c[d+1],g=e.destroy;e.destroy=void 0;if("function"===typeof g)try{g()}catch(k){if(null===f)throw Error(m(330));Qa(f,k)}}c=nf;nf=[];for(d=0;d<c.length;d+=2){e=c[d];f=c[d+1];try{var h=e.create;e.destroy=h()}catch(k){if(null===f)throw Error(m(330));Qa(f,k)}}for(h=a.current.firstEffect;null!==h;)a=h.nextEffect,
-h.nextEffect=null,h.flags&8&&(h.sibling=null,h.stateNode=null),h=a;n=b;ja();return!0}function ei(a,b,c){b=Xe(c,b);b=Mh(a,b,1);Ja(a,b);b=W();a=ud(a,1);null!==a&&(Oc(a,1,b),ba(a,b))}function Qa(a,b){if(3===a.tag)ei(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){ei(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===na||!na.has(d))){a=Xe(b,a);var e=Nh(c,a,1);Ja(c,e);e=W();c=ud(c,1);if(null!==
-c)Oc(c,1,e),ba(c,e);else if("function"===typeof d.componentDidCatch&&(null===na||!na.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}function Mj(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=W();a.pingedLanes|=a.suspendedLanes&c;R===a&&(O&c)===c&&(4===L||3===L&&(O&62914560)===O&&500>P()-df?Gb(a,0):jf|=c);ba(a,b)}function Ej(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===wb()?1:2:(0===ua&&(ua=Fb),b=nb(62914560&~ua),0===b&&(b=4194304)));
-c=W();a=ud(a,b);null!==a&&(Oc(a,b,c),ba(a,c))}function Uj(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null}function Qe(a){a=a.prototype;return!(!a||!a.isReactComponent)}function Vj(a){if("function"===
-typeof a)return Qe(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Dc)return 11;if(a===Ec)return 14}return 2}function Ma(a,b){var c=a.alternate;null===c?(c=Z(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=
-a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}function fd(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)Qe(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case wa:return zb(c.children,e,f,b);case fi:g=8;e|=16;break;case Hd:g=8;e|=1;break;case Lb:return a=Z(12,c,b,e|8),a.elementType=Lb,a.type=Lb,a.lanes=f,a;case Mb:return a=Z(13,c,b,e),a.type=Mb,a.elementType=Mb,a.lanes=
-f,a;case Cc:return a=Z(19,c,b,e),a.elementType=Cc,a.lanes=f,a;case pf:return Ue(c,e,f,b);case qf:return a=Z(24,c,b,e),a.elementType=qf,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Jd:g=10;break a;case Id:g=9;break a;case Dc:g=11;break a;case Ec:g=14;break a;case Ld:g=16;d=null;break a;case Kd:g=22;break a}throw Error(m(130,null==a?a:typeof a,""));}b=Z(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function zb(a,b,c,d){a=Z(7,a,d,b);a.lanes=c;return a}function Ue(a,
-b,c,d){a=Z(23,a,d,b);a.elementType=pf;a.lanes=c;return a}function De(a,b,c){a=Z(6,a,null,b);a.lanes=c;return a}function Ee(a,b,c){b=Z(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Wj(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=
-null;this.callbackPriority=0;this.eventTimes=ge(0);this.expirationTimes=ge(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=ge(0);this.mutableSourceEagerHydrationData=null}function Xj(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ua,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function yd(a,b,c,d){var e=b.current,f=W(),g=Oa(e);
-a:if(c){c=c._reactInternals;b:{if(Va(c)!==c||1!==c.tag)throw Error(m(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(S(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(m(171));}if(1===c.tag){var k=c.type;if(S(k)){c=Tg(c,k,h);break a}}c=h}else c=Ha;null===b.context?b.context=c:b.pendingContext=c;b=Ia(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);Ja(e,b);Pa(e,g,f);return g}function rf(a){a=
-a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function gi(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function sf(a,b){gi(a,b);(a=a.alternate)&&gi(a,b)}function Yj(a){a=Vf(a);return null===a?null:a.stateNode}function Zj(a){return null}function tf(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new Wj(a,b,null!=c&&!0===c.hydrate);
-b=Z(3,null,null,2===b?7:1===b?3:0);c.current=b;b.stateNode=c;Be(b);a[rb]=c.current;Cg(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,e)}this._internalRoot=c}function wc(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function ak(a,b){b||(b=a?9===
-a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new tf(a,0,b?{hydrate:!0}:void 0)}function zd(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=rf(g);h.call(a)}}yd(b,g,a,e)}else{f=c._reactRootContainer=ak(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=rf(g);k.call(a)}}bi(function(){yd(b,
-g,a,e)})}return rf(g)}function hi(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!wc(b))throw Error(m(200));return Xj(a,b,null,c)}if(!ha)throw Error(m(227));var zf=new Set,Ib={},oa=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),mi=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,
-Af=Object.prototype.hasOwnProperty,Cf={},Bf={},I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){I[a]=new Q(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];I[b]=new Q(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){I[a]=
-new Q(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){I[a]=new Q(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){I[a]=new Q(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple",
-"muted","selected"].forEach(function(a){I[a]=new Q(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){I[a]=new Q(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){I[a]=new Q(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){I[a]=new Q(a,5,!1,a.toLowerCase(),null,!1,!1)});var uf=/[\-:]([a-z])/g,vf=function(a){return a[1].toUpperCase()};"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".split(" ").forEach(function(a){var b=
-a.replace(uf,vf);I[b]=new Q(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(uf,vf);I[b]=new Q(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(uf,vf);I[b]=new Q(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){I[a]=new Q(a,1,!1,a.toLowerCase(),null,!1,!1)});I.xlinkHref=new Q("xlinkHref",
-1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){I[a]=new Q(a,1,!1,a.toLowerCase(),null,!0,!0)});var B=ha.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,fb=ha.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ec=60103,Ua=60106,wa=60107,Hd=60108,Lb=60114,Jd=60109,Id=60110,Dc=60112,Mb=60113,Cc=60120,Ec=60115,Ld=60116,Kd=60121,ue=60128,fi=60129,pf=60130,qf=60131;if("function"===typeof Symbol&&Symbol.for){var H=Symbol.for;ec=
-H("react.element");Ua=H("react.portal");wa=H("react.fragment");Hd=H("react.strict_mode");Lb=H("react.profiler");Jd=H("react.provider");Id=H("react.context");Dc=H("react.forward_ref");Mb=H("react.suspense");Cc=H("react.suspense_list");Ec=H("react.memo");Ld=H("react.lazy");Kd=H("react.block");H("react.scope");ue=H("react.opaque.id");fi=H("react.debug_trace_mode");pf=H("react.offscreen");qf=H("react.legacy_hidden")}var Df="function"===typeof Symbol&&Symbol.iterator,Fd,Gd=!1,Ad,Lh=function(a){return"undefined"!==
-typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Ad=Ad||document.createElement("div");Ad.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Ad.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),qc=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=
-b;return}}a.textContent=b},Nb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,
-zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},bk=["Webkit","ms","Moz","O"];Object.keys(Nb).forEach(function(a){bk.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Nb[b]=Nb[a]})});var si=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),Vd=null,jb=null,kb=null,me=function(a,b){return a(b)},fg=function(a,
-b,c,d,e){return a(b,c,d,e)},Xd=function(){},Sf=me,Xa=!1,Yd=!1,qe=!1;if(oa)try{var xc={};Object.defineProperty(xc,"passive",{get:function(){qe=!0}});window.addEventListener("test",xc,xc);window.removeEventListener("test",xc,xc)}catch(a){qe=!1}var vi=function(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(Da){this.onError(Da)}},Qb=!1,Ic=null,Jc=!1,Zd=null,wi={onError:function(a){Qb=!0;Ic=a}},ca=ha.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,
-ck=ca.unstable_cancelCallback,Bd=ca.unstable_now,$f=ca.unstable_scheduleCallback,dk=ca.unstable_shouldYield,ii=ca.unstable_requestPaint,ae=ca.unstable_runWithPriority,ek=ca.unstable_getCurrentPriorityLevel,fk=ca.unstable_ImmediatePriority,ji=ca.unstable_UserBlockingPriority,ag=ca.unstable_NormalPriority,gk=ca.unstable_LowPriority,hk=ca.unstable_IdlePriority,ce=!1,ia=[],ya=null,za=null,Aa=null,Rb=new Map,Sb=new Map,Vb=[],gg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "),
-lb={animationend:Lc("Animation","AnimationEnd"),animationiteration:Lc("Animation","AnimationIteration"),animationstart:Lc("Animation","AnimationStart"),transitionend:Lc("Transition","TransitionEnd")},de={},cg={};oa&&(cg=document.createElement("div").style,"AnimationEvent"in window||(delete lb.animationend.animation,delete lb.animationiteration.animation,delete lb.animationstart.animation),"TransitionEvent"in window||delete lb.transitionend.transition);var Hg=Mc("animationend"),Ig=Mc("animationiteration"),
-Jg=Mc("animationstart"),Kg=Mc("transitionend"),dg=new Map,fe=new Map,ik=["abort","abort",Hg,"animationEnd",Ig,"animationIteration",Jg,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing",
-"playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Kg,"transitionEnd","waiting","waiting"];Bd();var w=8,Ba=Math.clz32?Math.clz32:Hi,Ii=Math.log,Ji=Math.LN2,Ni=ji,Mi=ae,Pc=!0,Ca=null,ie=null,Qc=null,Hb={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},le=V(Hb),yc=B({},Hb,{view:0,detail:0}),hj=V(yc),wf,xf,zc,Cd=B({},yc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,
-pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:je,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==zc&&(zc&&"mousemove"===a.type?(wf=a.screenX-zc.screenX,xf=a.screenY-zc.screenY):xf=wf=0,zc=a);return wf},movementY:function(a){return"movementY"in a?a.movementY:xf}}),Gg=V(Cd),jk=B({},Cd,{dataTransfer:0}),dj=V(jk),kk=B({},
-yc,{relatedTarget:0}),re=V(kk),lk=B({},Hb,{animationName:0,elapsedTime:0,pseudoElement:0}),fj=V(lk),mk=B({},Hb,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),jj=V(mk),nk=B({},Hb,{data:0}),Og=V(nk),mj=Og,ok={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",
-16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Pi={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},qk=B({},yc,{key:function(a){if(a.key){var b=ok[a.key]||a.key;if("Unidentified"!==
-b)return b}return"keypress"===a.type?(a=Rc(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?pk[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:je,charCode:function(a){return"keypress"===a.type?Rc(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?Rc(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),cj=V(qk),rk=B({},
-Cd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lg=V(rk),sk=B({},yc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:je}),ej=V(sk),tk=B({},Hb,{propertyName:0,elapsedTime:0,pseudoElement:0}),gj=V(tk),uk=B({},Cd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in
-a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),ij=V(uk),Qi=[9,13,27,32],ke=oa&&"CompositionEvent"in window,Ac=null;oa&&"documentMode"in document&&(Ac=document.documentMode);var lj=oa&&"TextEvent"in window&&!Ac,og=oa&&(!ke||Ac&&8<Ac&&11>=Ac),ng=String.fromCharCode(32),mg=!1,ob=!1,Ti={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},Xb=null,Yb=null,Ng=!1;oa&&(Ng=Ui("input")&&(!document.documentMode||9<document.documentMode));
-var X="function"===typeof Object.is?Object.is:aj,bj=Object.prototype.hasOwnProperty,kj=oa&&"documentMode"in document&&11>=document.documentMode,qb=null,pe=null,$b=null,oe=!1;ee("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
-0);ee("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ee(ik,2);(function(a,b){for(var c=0;c<a.length;c++)fe.set(a[c],b)})("change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),0);gb("onMouseEnter",["mouseout","mouseover"]);
-gb("onMouseLeave",["mouseout","mouseover"]);gb("onPointerEnter",["pointerout","pointerover"]);gb("onPointerLeave",["pointerout","pointerover"]);Ta("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Ta("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Ta("onBeforeInput",["compositionend","keypress","textInput","paste"]);Ta("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));
-Ta("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Ta("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var pc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Eg=new Set("cancel close invalid load scroll toggle".split(" ").concat(pc)),
-Dg="_reactListening"+Math.random().toString(36).slice(2),lf=null,mf=null,$h="function"===typeof setTimeout?setTimeout:void 0,Kj="function"===typeof clearTimeout?clearTimeout:void 0,yf=0,Dd=Math.random().toString(36).slice(2),Fa="__reactFiber$"+Dd,Wc="__reactProps$"+Dd,rb="__reactContainer$"+Dd,Rg="__reactEvents$"+Dd,ve=[],ub=-1,Ha={},D=Ga(Ha),J=Ga(!1),Ya=Ha,$e=null,db=null,pj=ae,we=$f,xe=ck,oj=ek,Yc=fk,Vg=ji,Wg=ag,Xg=gk,Yg=hk,hf={},Oj=dk,Sj=void 0!==ii?ii:function(){},pa=null,Zc=null,ye=!1,ki=Bd(),
-P=1E4>ki?Bd:function(){return Bd()-ki},Gj=fb.ReactCurrentBatchConfig,bd=Ga(null),ad=null,xb=null,$c=null,Ka=!1,hh=(new ha.Component).refs,dd={isMounted:function(a){return(a=a._reactInternals)?Va(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=W(),e=Oa(a),f=Ia(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ja(a,f);Pa(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=W(),e=Oa(a),f=Ia(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ja(a,f);
-Pa(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=W(),d=Oa(a),e=Ia(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);Ja(a,e);Pa(a,d,c)}},gd=Array.isArray,od=ih(!0),xh=ih(!1),fc={},ka=Ga(fc),hc=Ga(fc),gc=Ga(fc),E=Ga(0),ra=null,Na=null,la=!1,Bb=[],jc=fb.ReactCurrentDispatcher,aa=fb.ReactCurrentBatchConfig,ic=0,y=null,N=null,K=null,kd=!1,kc=!1,jd={readContext:Y,useCallback:T,useContext:T,useEffect:T,useImperativeHandle:T,useLayoutEffect:T,useMemo:T,useReducer:T,useRef:T,useState:T,
-useDebugValue:T,useDeferredValue:T,useTransition:T,useMutableSource:T,useOpaqueIdentifier:T,unstable_isNewReconciler:!1},qj={readContext:Y,useCallback:function(a,b){ab().memoizedState=[a,void 0===b?null:b];return a},useContext:Y,useEffect:rh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Ne(4,2,th.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Ne(4,2,a,b)},useMemo:function(a,b){var c=ab();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,
-b,c){var d=ab();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Me.bind(null,y,a);return[d.memoizedState,a]},useRef:qh,useState:nc,useDebugValue:Pe,useDeferredValue:function(a){var b=nc(a),c=b[0],d=b[1];rh(function(){var b=aa.transition;aa.transition=1;try{d(a)}finally{aa.transition=b}},[a]);return c},useTransition:function(){var a=nc(!1),b=a[0];a=tj.bind(null,a[1]);qh(a);return[a,b]},useMutableSource:function(a,
-b,c){var d=ab();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return oh(d,a,b,c)},useOpaqueIdentifier:function(){if(la){var a=!1,b=nj(function(){a||(a=!0,c("r:"+(yf++).toString(36)));throw Error(m(355));}),c=nc(b)[1];0===(y.mode&2)&&(y.flags|=516,ld(5,function(){c("r:"+(yf++).toString(36))},void 0,null));return b}b="r:"+(yf++).toString(36);nc(b);return b},unstable_isNewReconciler:!1},rj={readContext:Y,useCallback:vh,useContext:Y,useEffect:nd,useImperativeHandle:uh,useLayoutEffect:sh,
-useMemo:wh,useReducer:lc,useRef:md,useState:function(a){return lc(ma)},useDebugValue:Pe,useDeferredValue:function(a){var b=lc(ma),c=b[0],d=b[1];nd(function(){var b=aa.transition;aa.transition=1;try{d(a)}finally{aa.transition=b}},[a]);return c},useTransition:function(){var a=lc(ma)[0];return[md().current,a]},useMutableSource:ph,useOpaqueIdentifier:function(){return lc(ma)[0]},unstable_isNewReconciler:!1},sj={readContext:Y,useCallback:vh,useContext:Y,useEffect:nd,useImperativeHandle:uh,useLayoutEffect:sh,
-useMemo:wh,useReducer:mc,useRef:md,useState:function(a){return mc(ma)},useDebugValue:Pe,useDeferredValue:function(a){var b=mc(ma),c=b[0],d=b[1];nd(function(){var b=aa.transition;aa.transition=1;try{d(a)}finally{aa.transition=b}},[a]);return c},useTransition:function(){var a=mc(ma)[0];return[md().current,a]},useMutableSource:ph,useOpaqueIdentifier:function(){return mc(ma)[0]},unstable_isNewReconciler:!1},uj=fb.ReactCurrentOwner,fa=!1,qd={dehydrated:null,retryLane:0};var xj=function(a,b,c,d){for(c=
-b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};var Kh=function(a){};var wj=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){a=b.stateNode;$a(ka.current);e=null;switch(c){case "input":f=Md(a,f);d=Md(a,d);e=[];break;case "option":f=Pd(a,f);d=Pd(a,d);e=[];break;case "select":f=
-B({},f,{value:void 0});d=B({},d,{value:void 0});e=[];break;case "textarea":f=Qd(a,f);d=Qd(a,d);e=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(a.onclick=Vc)}Sd(c,d);var g;c=null;for(l in f)if(!d.hasOwnProperty(l)&&f.hasOwnProperty(l)&&null!=f[l])if("style"===l){var h=f[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(Ib.hasOwnProperty(l)?
-e||(e=[]):(e=e||[]).push(l,null));for(l in d){var k=d[l];h=null!=f?f[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(e||(e=[]),e.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(e=e||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(e=
-e||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(Ib.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&z("scroll",a),e||h===k||(e=[])):"object"===typeof k&&null!==k&&k.$$typeof===ue?k.toString():(e=e||[]).push(l,k))}c&&(e=e||[]).push("style",c);var l=e;if(b.updateQueue=l)b.flags|=4}};var yj=function(a,b,c,d){c!==d&&(b.flags|=4)};var Lj="function"===typeof WeakMap?WeakMap:Map,Dj="function"===typeof WeakSet?WeakSet:Set,Ij=Math.ceil,vd=fb.ReactCurrentDispatcher,kf=
-fb.ReactCurrentOwner,n=0,R=null,G=null,O=0,ta=0,cb=Ga(0),L=0,wd=null,Fb=0,La=0,Cb=0,jf=0,ef=null,df=0,We=Infinity,l=null,rd=!1,Ze=null,na=null,Sa=!1,tc=null,vc=90,nf=[],of=[],va=null,rc=0,ff=null,sd=-1,ua=0,td=0,uc=null,xd=!1;var Pj=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||J.current)fa=!0;else if(0!==(c&d))fa=0!==(a.flags&16384)?!0:!1;else{fa=!1;switch(b.tag){case 3:Dh(b);Ie();break;case 5:jh(b);break;case 1:S(b.type)&&Xc(b);break;case 4:Fe(b,b.stateNode.containerInfo);
-break;case 10:d=b.memoizedProps.value;var e=b.type._context;A(bd,e._currentValue);e._currentValue=d;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return Eh(a,b,c);A(E,E.current&1);b=sa(a,b,c);return null!==b?b.sibling:null}A(E,E.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Jh(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);A(E,E.current);if(d)break;else return null;case 23:case 24:return b.lanes=
-0,Se(a,b,c)}return sa(a,b,c)}else fa=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=vb(b,D.current);yb(b,c);e=Le(null,b,d,a,e,c);b.flags|=1;if("object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(S(d)){var f=!0;Xc(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;Be(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&
-cd(b,d,g,a);e.updater=dd;b.stateNode=e;e._reactInternals=b;Ce(b,d,a,c);b=Te(null,b,d,!0,f,c)}else b.tag=0,U(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;f=e._init;e=f(e._payload);b.type=e;f=b.tag=Vj(e);a=ea(e,a);switch(f){case 0:b=Re(null,b,e,a,c);break a;case 1:b=Ch(null,b,e,a,c);break a;case 11:b=yh(null,b,e,a,c);break a;case 14:b=zh(null,b,e,ea(e.type,a),d,c);break a}throw Error(m(306,e,""));}return b;case 0:return d=
-b.type,e=b.pendingProps,e=b.elementType===d?e:ea(d,e),Re(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ea(d,e),Ch(a,b,d,e,c);case 3:Dh(b);d=b.updateQueue;if(null===a||null===d)throw Error(m(282));d=b.pendingProps;e=b.memoizedState;e=null!==e?e.element:null;bh(a,b);cc(b,d,null,c);d=b.memoizedState.element;if(d===e)Ie(),b=sa(a,b,c);else{e=b.stateNode;if(f=e.hydrate)Na=tb(b.stateNode.containerInfo.firstChild),ra=b,f=la=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=
-a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],Bb.push(f);c=xh(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else U(a,b,d,c),Ie();b=b.child}return b;case 5:return jh(b),null===a&&He(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,se(d,e)?g=null:null!==f&&se(d,f)&&(b.flags|=16),Bh(a,b),U(a,b,g,c),b.child;case 6:return null===a&&He(b),null;case 13:return Eh(a,b,c);case 4:return Fe(b,b.stateNode.containerInfo),d=b.pendingProps,null===
-a?b.child=od(b,null,d,c):U(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ea(d,e),yh(a,b,d,e,c);case 7:return U(a,b,b.pendingProps,c),b.child;case 8:return U(a,b,b.pendingProps.children,c),b.child;case 12:return U(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;A(bd,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=X(h,f)?0:("function"===typeof d._calculateChangedBits?
-d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!J.current){b=sa(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Ia(-1,c&-c),l.tag=2,Ja(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);ah(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=
-h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}U(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,yb(b,c),e=Y(e,f.unstable_observedBits),d=d(e),b.flags|=1,U(a,b,d,c),b.child;case 14:return e=b.type,f=ea(e,b.pendingProps),f=ea(e.type,f),zh(a,b,e,f,d,c);case 15:return Ah(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ea(d,e),null!==a&&(a.alternate=null,b.alternate=
-null,b.flags|=2),b.tag=1,S(d)?(a=!0,Xc(b)):a=!1,yb(b,c),fh(b,d,e),Ce(b,d,e,c),Te(null,b,d,!0,a,c);case 19:return Jh(a,b,c);case 23:return Se(a,b,c);case 24:return Se(a,b,c)}throw Error(m(156,b.tag));};var Z=function(a,b,c,d){return new Uj(a,b,c,d)};tf.prototype.render=function(a){yd(a,this._internalRoot,null,null)};tf.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;yd(null,a,null,function(){b[rb]=null})};var Ei=function(a){if(13===a.tag){var b=W();Pa(a,4,b);sf(a,4)}};var Yf=
-function(a){if(13===a.tag){var b=W();Pa(a,67108864,b);sf(a,67108864)}};var Ci=function(a){if(13===a.tag){var b=W(),c=Oa(a);Pa(a,c,b);sf(a,c)}};var Bi=function(a,b){return b()};Vd=function(a,b,c){switch(b){case "input":Nd(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Hc(d);if(!e)throw Error(m(90));Ff(d);Nd(d,e)}}}break;case "textarea":Kf(a,
-c);break;case "select":b=c.value,null!=b&&ib(a,!!c.multiple,b,!1)}};(function(a,b,c,d){me=a;fg=b;Xd=c;Sf=d})(ai,function(a,b,c,d,e){var f=n;n|=4;try{return Za(98,a.bind(null,b,c,d,e))}finally{n=f,0===n&&(Eb(),ja())}},function(){0===(n&49)&&(Jj(),Ra())},function(a,b){var c=n;n|=2;try{return a(b)}finally{n=c,0===n&&(Eb(),ja())}});var vk={Events:[Ob,pb,Hc,Qf,Rf,Ra,{current:!1}]};(function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,
-overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:fb.ReactCurrentDispatcher,findHostInstanceByFiber:Yj,findFiberByHostInstance:a.findFiberByHostInstance||Zj,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=
-!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!b.isDisabled&&b.supportsFiber)try{$e=b.inject(a),db=b}catch(c){}a=!0}return a})({findFiberByHostInstance:Wa,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"});M.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=vk;M.createPortal=hi;M.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(m(188));throw Error(m(268,Object.keys(a)));
-}a=Vf(b);a=null===a?null:a.stateNode;return a};M.flushSync=function(a,b){var c=n;if(0!==(c&48))return a(b);n|=1;try{if(a)return Za(99,a.bind(null,b))}finally{n=c,ja()}};M.hydrate=function(a,b,c){if(!wc(b))throw Error(m(200));return zd(null,a,b,!0,c)};M.render=function(a,b,c){if(!wc(b))throw Error(m(200));return zd(null,a,b,!1,c)};M.unmountComponentAtNode=function(a){if(!wc(a))throw Error(m(40));return a._reactRootContainer?(bi(function(){zd(null,null,a,!1,function(){a._reactRootContainer=null;a[rb]=
-null})}),!0):!1};M.unstable_batchedUpdates=ai;M.unstable_createPortal=function(a,b){return hi(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};M.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!wc(c))throw Error(m(200));if(null==a||void 0===a._reactInternals)throw Error(m(38));return zd(a,b,c,!1,d)};M.version="17.0.2"});
-})();
diff --git a/node_modules/react-dom/umd/react-dom.profiling.min.js b/node_modules/react-dom/umd/react-dom.profiling.min.js
deleted file mode 100644
index eae41ca..0000000
--- a/node_modules/react-dom/umd/react-dom.profiling.min.js
+++ /dev/null
@@ -1,252 +0,0 @@
-/** @license React v17.0.2
- * react-dom.profiling.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function(){/*
- Modernizr 3.0.0pre (Custom Build) | MIT
-*/
-'use strict';(function(N,fa){"object"===typeof exports&&"undefined"!==typeof module?fa(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],fa):(N=N||self,fa(N.ReactDOM={},N.React))})(this,function(N,fa){function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-function Va(a,b){mb(a,b);mb(a+"Capture",b)}function mb(a,b){Ob[a]=b;for(a=0;a<b.length;a++)Mf.add(b[a])}function Di(a){if(Nf.call(Of,a))return!0;if(Nf.call(Pf,a))return!1;if(Ei.test(a))return Of[a]=!0;Pf[a]=!0;return!1}function Fi(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function Gi(a,b,c,d){if(null===
-b||"undefined"===typeof b||Fi(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function R(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}function Nd(a,b,c,d){var e=J.hasOwnProperty(b)?J[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||
-"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(Gi(b,c,e,d)&&(c=null),d||null===e?Di(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}function Pb(a){if(null===a||"object"!==typeof a)return null;a=Qf&&a[Qf]||a["@@iterator"];return"function"===typeof a?a:null}
-function Qb(a,b,c){if(void 0===Od)try{throw Error();}catch(d){Od=(b=d.stack.trim().match(/\n( *(at )?)/))&&b[1]||""}return"\n"+Od+a}function Hc(a,b){if(!a||Pd)return"";Pd=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(k){var d=k}Reflect.construct(a,[],b)}else{try{b.call()}catch(k){d=k}a.call(b.prototype)}else{try{throw Error();
-}catch(k){d=k}a()}}catch(k){if(k&&d&&"string"===typeof k.stack){for(var e=k.stack.split("\n"),f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h])return"\n"+e[g].replace(" at new "," at ");while(1<=g&&0<=h)}break}}}finally{Pd=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?Qb(a):""}function Hi(a){switch(a.tag){case 5:return Qb(a.type);case 16:return Qb("Lazy");case 13:return Qb("Suspense");
-case 19:return Qb("SuspenseList");case 0:case 2:case 15:return a=Hc(a.type,!1),a;case 11:return a=Hc(a.type.render,!1),a;case 22:return a=Hc(a.type._render,!1),a;case 1:return a=Hc(a.type,!0),a;default:return""}}function nb(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case xa:return"Fragment";case Wa:return"Portal";case Rb:return"Profiler";case Qd:return"StrictMode";case Sb:return"Suspense";case Ic:return"SuspenseList"}if("object"===
-typeof a)switch(a.$$typeof){case Rd:return(a.displayName||"Context")+".Consumer";case Sd:return(a._context.displayName||"Context")+".Provider";case Jc:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":"ForwardRef");case Kc:return nb(a.type);case Td:return nb(a._render);case Ud:b=a._payload;a=a._init;try{return nb(a(b))}catch(c){}}return null}function ya(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;
-default:return""}}function Rf(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}function Ii(a){var b=Rf(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,
-b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=null;delete a[b]}}}}function Lc(a){a._valueTracker||(a._valueTracker=Ii(a))}function Sf(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=Rf(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Mc(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||
-a.body}catch(b){return a.body}}function Vd(a,b){var c=b.checked;return C({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Tf(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=ya(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Uf(a,b){b=b.checked;null!=b&&Nd(a,"checked",
-b,!1)}function Wd(a,b){Uf(a,b);var c=ya(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Xd(a,b.type,c):b.hasOwnProperty("defaultValue")&&Xd(a,b.type,ya(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function Vf(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=
-b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function Xd(a,b,c){if("number"!==b||Mc(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Ji(a){var b="";fa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}
-function Yd(a,b){a=C({children:void 0},b);if(b=Ji(b.children))a.children=b;return a}function ob(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+ya(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function Zd(a,b){if(null!=
-b.dangerouslySetInnerHTML)throw Error(m(91));return C({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Wf(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(m(92));if(Array.isArray(c)){if(!(1>=c.length))throw Error(m(93));c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:ya(c)}}function Xf(a,b){var c=ya(b.value),d=ya(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==
-c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Yf(a,b){b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function Zf(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function $d(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Zf(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function $f(a,b,c){return null==
-b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Tb.hasOwnProperty(a)&&Tb[a]?(""+b).trim():b+"px"}function ag(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=$f(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function ae(a,b){if(b){if(Ki[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(m(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(m(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&
-"__html"in b.dangerouslySetInnerHTML))throw Error(m(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(m(62));}}function be(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function ce(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);
-return 3===a.nodeType?a.parentNode:a}function bg(a){if(a=Ub(a)){if("function"!==typeof de)throw Error(m(280));var b=a.stateNode;b&&(b=Nc(b),de(a.stateNode,a.type,b))}}function cg(a){pb?qb?qb.push(a):qb=[a]:pb=a}function dg(){if(pb){var a=pb,b=qb;qb=pb=null;bg(a);if(b)for(a=0;a<b.length;a++)bg(b[a])}}function ee(){if(null!==pb||null!==qb)fe(),dg()}function Li(a,b,c){if(ge)return a(b,c);ge=!0;try{return eg(a,b,c)}finally{ge=!1,ee()}}function Vb(a,b){var c=a.stateNode;if(null===c)return null;var d=Nc(c);
-if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(m(231,b,typeof c));return c}function Mi(a,b,c,d,e,
-f,g,h,k){Wb=!1;Oc=null;Ni.apply(Oi,arguments)}function Pi(a,b,c,d,e,f,g,h,k){Mi.apply(this,arguments);if(Wb){if(Wb){var q=Oc;Wb=!1;Oc=null}else throw Error(m(198));Pc||(Pc=!0,he=q)}}function Xa(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function fg(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function gg(a){if(Xa(a)!==
-a)throw Error(m(188));}function Qi(a){var b=a.alternate;if(!b){b=Xa(a);if(null===b)throw Error(m(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return gg(e),a;if(f===d)return gg(e),b;f=f.sibling}throw Error(m(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=
-f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(m(189));}}if(c.alternate!==d)throw Error(m(190));}if(3!==c.tag)throw Error(m(188));return c.stateNode.current===c?a:b}function hg(a){a=Qi(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}function ig(a,b){for(var c=
-a.alternate;null!==b;){if(b===a||b===c)return!0;b=b.return}return!1}function ie(a,b,c,d,e){return{blockedOn:a,domEventName:b,eventSystemFlags:c|16,nativeEvent:e,targetContainers:[d]}}function jg(a,b){switch(a){case "focusin":case "focusout":za=null;break;case "dragenter":case "dragleave":Aa=null;break;case "mouseover":case "mouseout":Ba=null;break;case "pointerover":case "pointerout":Xb.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":Yb.delete(b.pointerId)}}function Zb(a,
-b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a=ie(b,c,d,e,f),null!==b&&(b=Ub(b),null!==b&&kg(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}function Ri(a,b,c,d,e){switch(b){case "focusin":return za=Zb(za,a,b,c,d,e),!0;case "dragenter":return Aa=Zb(Aa,a,b,c,d,e),!0;case "mouseover":return Ba=Zb(Ba,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;Xb.set(f,Zb(Xb.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,Yb.set(f,
-Zb(Yb.get(f)||null,a,b,c,d,e)),!0}return!1}function Si(a){var b=Ya(a.target);if(null!==b){var c=Xa(b);if(null!==c)if(b=c.tag,13===b){if(b=fg(c),null!==b){a.blockedOn=b;Ti(a.lanePriority,function(){je(a.priority,function(){Ui(c)})});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Qc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=ke(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);
-if(null!==c)return b=Ub(c),null!==b&&kg(b),a.blockedOn=c,!1;b.shift()}return!0}function lg(a,b,c){Qc(a)&&c.delete(b)}function Vi(){for(le=!1;0<la.length;){var a=la[0];if(null!==a.blockedOn){a=Ub(a.blockedOn);null!==a&&Wi(a);break}for(var b=a.targetContainers;0<b.length;){var c=ke(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null!==c){a.blockedOn=c;break}b.shift()}null===a.blockedOn&&la.shift()}null!==za&&Qc(za)&&(za=null);null!==Aa&&Qc(Aa)&&(Aa=null);null!==Ba&&Qc(Ba)&&(Ba=null);Xb.forEach(lg);
-Yb.forEach(lg)}function $b(a,b){a.blockedOn===b&&(a.blockedOn=null,le||(le=!0,mg(ng,Vi)))}function og(a){if(0<la.length){$b(la[0],a);for(var b=1;b<la.length;b++){var c=la[b];c.blockedOn===a&&(c.blockedOn=null)}}null!==za&&$b(za,a);null!==Aa&&$b(Aa,a);null!==Ba&&$b(Ba,a);b=function(b){return $b(b,a)};Xb.forEach(b);Yb.forEach(b);for(b=0;b<ac.length;b++)c=ac[b],c.blockedOn===a&&(c.blockedOn=null);for(;0<ac.length&&(b=ac[0],null===b.blockedOn);)Si(b),null===b.blockedOn&&ac.shift()}function Rc(a,b){var c=
-{};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function Sc(a){if(me[a])return me[a];if(!rb[a])return a;var b=rb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in pg)return me[a]=b[c];return a}function ne(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1];e="on"+(e[0].toUpperCase()+e.slice(1));oe.set(d,b);qg.set(d,e);Va(e,[d])}}function sb(a){if(0!==(1&a))return v=15,1;if(0!==(2&a))return v=14,2;if(0!==(4&a))return v=13,4;var b=24&a;if(0!==b)return v=12,b;
-if(0!==(a&32))return v=11,32;b=192&a;if(0!==b)return v=10,b;if(0!==(a&256))return v=9,256;b=3584&a;if(0!==b)return v=8,b;if(0!==(a&4096))return v=7,4096;b=4186112&a;if(0!==b)return v=6,b;b=62914560&a;if(0!==b)return v=5,b;if(a&67108864)return v=4,67108864;if(0!==(a&134217728))return v=3,134217728;b=805306368&a;if(0!==b)return v=2,b;if(0!==(1073741824&a))return v=1,1073741824;v=8;return a}function Xi(a){switch(a){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}
-function Yi(a){switch(a){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(m(358,a));}}function bc(a,b){var c=a.pendingLanes;if(0===c)return v=0;var d=0,e=0,f=a.expiredLanes,g=a.suspendedLanes,h=a.pingedLanes;if(0!==f)d=f,e=v=15;else if(f=c&134217727,0!==f){var k=f&~g;0!==k?(d=sb(k),e=v):(h&=f,0!==h&&(d=sb(h),e=v))}else f=c&~g,0!==f?(d=sb(f),e=v):0!==h&&(d=sb(h),
-e=v);if(0===d)return 0;d=31-Ca(d);d=c&((0>d?0:1<<d)<<1)-1;if(0!==b&&b!==d&&0===(b&g)){sb(b);if(e<=v)return b;v=e}b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-Ca(b),e=1<<c,d|=a[c],b&=~e;return d}function rg(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Tc(a,b){switch(a){case 15:return 1;case 14:return 2;case 12:return a=tb(24&~b),0===a?Tc(10,b):a;case 10:return a=tb(192&~b),0===a?Tc(8,b):a;case 8:return a=tb(3584&~b),0===a&&(a=tb(4186112&~b),
-0===a&&(a=512)),a;case 2:return b=tb(805306368&~b),0===b&&(b=268435456),b}throw Error(m(358,a));}function tb(a){return a&-a}function pe(a){for(var b=[],c=0;31>c;c++)b.push(a);return b}function Uc(a,b,c){a.pendingLanes|=b;var d=b-1;a.suspendedLanes&=d;a.pingedLanes&=d;a=a.eventTimes;b=31-Ca(b);a[b]=c}function Zi(a){return 0===a?32:31-($i(a)/aj|0)|0}function bj(a,b,c,d){Za||fe();var e=qe,f=Za;Za=!0;try{sg(e,a,b,c,d)}finally{(Za=f)||ee()}}function cj(a,b,c,d){dj(ej,qe.bind(null,a,b,c,d))}function qe(a,
-b,c,d){if(Vc){var e;if((e=0===(b&4))&&0<la.length&&-1<tg.indexOf(a))a=ie(null,a,b,c,d),la.push(a);else{var f=ke(a,b,c,d);if(null===f)e&&jg(a,d);else{if(e){if(-1<tg.indexOf(a)){a=ie(f,a,b,c,d);la.push(a);return}if(Ri(f,a,b,c,d))return;jg(a,d)}ug(a,b,d,null,c)}}}}function ke(a,b,c,d){var e=ce(d);e=Ya(e);if(null!==e){var f=Xa(e);if(null===f)e=null;else{var g=f.tag;if(13===g){e=fg(f);if(null!==e)return e;e=null}else if(3===g){if(f.stateNode.hydrate)return 3===f.tag?f.stateNode.containerInfo:null;e=null}else f!==
-e&&(e=null)}}ug(a,b,d,e,c);return null}function vg(){if(Wc)return Wc;var a,b=re,c=b.length,d,e="value"in Da?Da.value:Da.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Wc=e.slice(a,1<d?1-d:void 0)}function Xc(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function Yc(){return!0}function wg(){return!1}function W(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=
-d;this.nativeEvent=f;this.target=g;this.currentTarget=null;for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?Yc:wg;this.isPropagationStopped=wg;return this}C(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=Yc)},stopPropagation:function(){var a=
-this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=Yc)},persist:function(){},isPersistent:Yc});return b}function fj(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=gj[a])?!!b[a]:!1}function se(a){return fj}function xg(a,b){switch(a){case "keyup":return-1!==hj.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}
-function yg(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}function ij(a,b){switch(a){case "compositionend":return yg(b);case "keypress":if(32!==b.which)return null;zg=!0;return Ag;case "textInput":return a=b.data,a===Ag&&zg?null:a;default:return null}}function jj(a,b){if(ub)return"compositionend"===a||!te&&xg(a,b)?(a=vg(),Wc=re=Da=null,ub=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;
-if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return Bg&&"ko"!==b.locale?null:b.data;default:return null}}function Cg(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!kj[a.type]:"textarea"===b?!0:!1}function lj(a){if(!ra)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function Dg(a,b,c,d){cg(d);b=Zc(b,"onChange");0<b.length&&(c=new ue("onChange","change",
-null,c,d),a.push({event:c,listeners:b}))}function mj(a){Eg(a,0)}function $c(a){var b=vb(a);if(Sf(b))return a}function nj(a,b){if("change"===a)return b}function Fg(){cc&&(cc.detachEvent("onpropertychange",Gg),dc=cc=null)}function Gg(a){if("value"===a.propertyName&&$c(dc)){var b=[];Dg(b,dc,a,ce(a));a=mj;if(Za)a(b);else{Za=!0;try{ve(a,b)}finally{Za=!1,ee()}}}}function oj(a,b,c){"focusin"===a?(Fg(),cc=b,dc=c,cc.attachEvent("onpropertychange",Gg)):"focusout"===a&&Fg()}function pj(a,b){if("selectionchange"===
-a||"keyup"===a||"keydown"===a)return $c(dc)}function qj(a,b){if("click"===a)return $c(b)}function rj(a,b){if("input"===a||"change"===a)return $c(b)}function sj(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function ec(a,b){if(Y(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!tj.call(b,c[d])||!Y(a[c[d]],b[c[d]]))return!1;return!0}function Hg(a){for(;a&&a.firstChild;)a=
-a.firstChild;return a}function Ig(a,b){var c=Hg(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Hg(c)}}function Jg(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Jg(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function Kg(){for(var a=window,b=Mc();b instanceof a.HTMLIFrameElement;){try{var c=
-"string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Mc(a.document)}return b}function we(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function Lg(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;xe||null==wb||wb!==Mc(d)||(d=wb,"selectionStart"in d&&we(d)?d={start:d.selectionStart,
-end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),fc&&ec(fc,d)||(fc=d,d=Zc(ye,"onSelect"),0<d.length&&(b=new ue("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=wb)))}function Mg(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;Pi(d,b,void 0,a);a.currentTarget=null}function Eg(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=
-a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,q=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Mg(e,h,q);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;q=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;Mg(e,h,q);f=k}}}if(Pc)throw a=he,Pc=!1,he=null,a;}function z(a,b){var c=Ng(b),d=a+"__bubble";c.has(d)||(Og(b,a,2,!1),c.add(d))}function Pg(a){a[Qg]||(a[Qg]=!0,Mf.forEach(function(b){Rg.has(b)||
-Sg(b,!1,a,null);Sg(b,!0,a,null)}))}function Sg(a,b,c,d){var e=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,f=c;"selectionchange"===a&&9!==c.nodeType&&(f=c.ownerDocument);if(null!==d&&!b&&Rg.has(a)){if("scroll"!==a)return;e|=2;f=d}var g=Ng(f),h=a+"__"+(b?"capture":"bubble");g.has(h)||(b&&(e|=4),Og(f,a,e,b),g.add(h))}function Og(a,b,c,d,e){e=oe.get(b);switch(void 0===e?2:e){case 0:e=bj;break;case 1:e=cj;break;default:e=qe}c=e.bind(null,b,c,a);e=void 0;!ze||"touchstart"!==b&&"touchmove"!==
-b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}function ug(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&
-k.parentNode===e)return;g=g.return}for(;null!==h;){g=Ya(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}Li(function(){var d=f,e=ce(c),g=[];a:{var h=qg.get(a);if(void 0!==h){var k=ue,m=a;switch(a){case "keypress":if(0===Xc(c))break a;case "keydown":case "keyup":k=uj;break;case "focusin":m="focus";k=Ae;break;case "focusout":m="blur";k=Ae;break;case "beforeblur":case "afterblur":k=Ae;break;case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=
-Tg;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=vj;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=wj;break;case Ug:case Vg:case Wg:k=xj;break;case Xg:k=yj;break;case "scroll":k=zj;break;case "wheel":k=Aj;break;case "copy":case "cut":case "paste":k=Bj;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=
-Yg}var l=0!==(b&4),H=!l&&"scroll"===a,r=l?null!==h?h+"Capture":null:h;l=[];for(var x=d,u;null!==x;){u=x;var y=u.stateNode;5===u.tag&&null!==y&&(u=y,null!==r&&(y=Vb(x,r),null!=y&&l.push(gc(x,y,u))));if(H)break;x=x.return}0<l.length&&(h=new k(h,m,null,c,e),g.push({event:h,listeners:l}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===a;k="mouseout"===a||"pointerout"===a;if(h&&0===(b&16)&&(m=c.relatedTarget||c.fromElement)&&(Ya(m)||m[xb]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||
-h.parentWindow:window;if(k){if(m=c.relatedTarget||c.toElement,k=d,m=m?Ya(m):null,null!==m&&(H=Xa(m),m!==H||5!==m.tag&&6!==m.tag))m=null}else k=null,m=d;if(k!==m){l=Tg;y="onMouseLeave";r="onMouseEnter";x="mouse";if("pointerout"===a||"pointerover"===a)l=Yg,y="onPointerLeave",r="onPointerEnter",x="pointer";H=null==k?h:vb(k);u=null==m?h:vb(m);h=new l(y,x+"leave",k,c,e);h.target=H;h.relatedTarget=u;y=null;Ya(e)===d&&(l=new l(r,x+"enter",m,c,e),l.target=u,l.relatedTarget=H,y=l);H=y;if(k&&m)b:{l=k;r=m;x=
-0;for(u=l;u;u=yb(u))x++;u=0;for(y=r;y;y=yb(y))u++;for(;0<x-u;)l=yb(l),x--;for(;0<u-x;)r=yb(r),u--;for(;x--;){if(l===r||null!==r&&l===r.alternate)break b;l=yb(l);r=yb(r)}l=null}else l=null;null!==k&&Zg(g,h,k,l,!1);null!==m&&null!==H&&Zg(g,H,m,l,!0)}}}a:{h=d?vb(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===k&&"file"===h.type)var A=nj;else if(Cg(h))if($g)A=rj;else{A=pj;var w=oj}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(A=qj);
-if(A&&(A=A(a,d))){Dg(g,A,c,e);break a}w&&w(a,h,d);"focusout"===a&&(w=h._wrapperState)&&w.controlled&&"number"===h.type&&Xd(h,"number",h.value)}w=d?vb(d):window;switch(a){case "focusin":if(Cg(w)||"true"===w.contentEditable)wb=w,ye=d,fc=null;break;case "focusout":fc=ye=wb=null;break;case "mousedown":xe=!0;break;case "contextmenu":case "mouseup":case "dragend":xe=!1;Lg(g,c,e);break;case "selectionchange":if(Cj)break;case "keydown":case "keyup":Lg(g,c,e)}var Ea;if(te)b:{switch(a){case "compositionstart":var n=
-"onCompositionStart";break b;case "compositionend":n="onCompositionEnd";break b;case "compositionupdate":n="onCompositionUpdate";break b}n=void 0}else ub?xg(a,c)&&(n="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(n="onCompositionStart");n&&(Bg&&"ko"!==c.locale&&(ub||"onCompositionStart"!==n?"onCompositionEnd"===n&&ub&&(Ea=vg()):(Da=e,re="value"in Da?Da.value:Da.textContent,ub=!0)),w=Zc(d,n),0<w.length&&(n=new ah(n,a,null,c,e),g.push({event:n,listeners:w}),Ea?n.data=Ea:(Ea=yg(c),null!==Ea&&(n.data=
-Ea))));if(Ea=Dj?ij(a,c):jj(a,c))d=Zc(d,"onBeforeInput"),0<d.length&&(e=new Ej("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=Ea)}Eg(g,b)})}function gc(a,b,c){return{instance:a,listener:b,currentTarget:c}}function Zc(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==f&&(e=f,f=Vb(a,c),null!=f&&d.unshift(gc(a,f,e)),f=Vb(a,b),null!=f&&d.push(gc(a,f,e)));a=a.return}return d}function yb(a){if(null===a)return null;do a=a.return;while(a&&5!==
-a.tag);return a?a:null}function Zg(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,q=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==q&&(h=q,e?(k=Vb(c,f),null!=k&&g.unshift(gc(c,k,h))):e||(k=Vb(c,f),null!=k&&g.push(gc(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function ad(){}function bh(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}function Be(a,b){return"textarea"===a||"option"===a||
-"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function Ce(a){1===a.nodeType?a.textContent="":9===a.nodeType&&(a=a.body,null!=a&&(a.textContent=""))}function zb(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}function ch(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===
-c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}function Fj(a){return{$$typeof:De,toString:a,valueOf:a}}function Ya(a){var b=a[Fa];if(b)return b;for(var c=a.parentNode;c;){if(b=c[xb]||c[Fa]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=ch(a);null!==a;){if(c=a[Fa])return c;a=ch(a)}return b}a=c;c=a.parentNode}return null}function Ub(a){a=a[Fa]||a[xb];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function vb(a){if(5===a.tag||6===a.tag)return a.stateNode;
-throw Error(m(33));}function Nc(a){return a[bd]||null}function Ng(a){var b=a[dh];void 0===b&&(b=a[dh]=new Set);return b}function Ga(a){return{current:a}}function t(a,b){0>Ab||(a.current=Ee[Ab],Ee[Ab]=null,Ab--)}function B(a,b,c){Ab++;Ee[Ab]=a.current;a.current=b}function Bb(a,b){var c=a.type.contextTypes;if(!c)return Ha;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=
-b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function T(a){a=a.childContextTypes;return null!==a&&void 0!==a}function eh(a,b,c){if(D.current!==Ha)throw Error(m(168));B(D,b);B(K,c)}function fh(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(m(108,nb(b)||"Unknown",e));return C({},c,d)}function cd(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Ha;$a=D.current;
-B(D,a);B(K,K.current);return!0}function gh(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=fh(a,b,$a),d.__reactInternalMemoizedMergedChildContext=a,t(K),t(D),B(D,a)):t(K);B(K,c)}function Cb(){switch(Gj()){case dd:return 99;case hh:return 98;case ih:return 97;case jh:return 96;case kh:return 95;default:throw Error(m(332));}}function lh(a){switch(a){case 99:return dd;case 98:return hh;case 97:return ih;case 96:return jh;case 95:return kh;default:throw Error(m(332));}}function ab(a,b){a=lh(a);
-return Hj(a,b)}function Ia(a,b,c){a=lh(a);return Fe(a,b,c)}function ma(){if(null!==ed){var a=ed;ed=null;Ge(a)}mh()}function mh(){if(!He&&null!==sa){He=!0;var a=0;try{var b=sa;ab(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});sa=null}catch(c){throw null!==sa&&(sa=sa.slice(a+1)),Fe(dd,ma),c;}finally{He=!1}}}function ha(a,b){if(a&&a.defaultProps){b=C({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function Ie(){fd=Db=gd=null}function Je(a){var b=
-hd.current;t(hd);a.type._context._currentValue=b}function nh(a,b){for(;null!==a;){var c=a.alternate;if((a.childLanes&b)===b)if(null===c||(c.childLanes&b)===b)break;else c.childLanes|=b;else a.childLanes|=b,null!==c&&(c.childLanes|=b);a=a.return}}function Eb(a,b){gd=a;fd=Db=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ia=!0),a.firstContext=null)}function aa(a,b){if(fd!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)fd=a,b=1073741823;b={context:a,observedBits:b,
-next:null};if(null===Db){if(null===gd)throw Error(m(308));Db=b;gd.dependencies={lanes:0,firstContext:b,responders:null}}else Db=Db.next=b}return a._currentValue}function Ke(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function oh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Ja(a,b){return{eventTime:a,
-lane:b,tag:0,payload:null,callback:null,next:null}}function Ka(a,b){a=a.updateQueue;if(null!==a){a=a.shared;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}}function ph(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=
-f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=b;c.lastBaseUpdate=b}function hc(a,b,c,d){var e=a.updateQueue;La=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,q=k.next;k.next=null;null===g?f=q:g.next=q;g=k;var m=a.alternate;if(null!==m){m=m.updateQueue;var l=m.lastBaseUpdate;l!==g&&(null===l?m.firstBaseUpdate=
-q:l.next=q,m.lastBaseUpdate=k)}}if(null!==f){l=e.baseState;g=0;m=q=k=null;do{h=f.lane;var p=f.eventTime;if((d&h)===h){null!==m&&(m=m.next={eventTime:p,lane:0,tag:f.tag,payload:f.payload,callback:f.callback,next:null});a:{var n=a,t=f;h=b;p=c;switch(t.tag){case 1:n=t.payload;if("function"===typeof n){l=n.call(p,l,h);break a}l=n;break a;case 3:n.flags=n.flags&-4097|64;case 0:n=t.payload;h="function"===typeof n?n.call(p,l,h):n;if(null===h||void 0===h)break a;l=C({},l,h);break a;case 2:La=!0}}null!==f.callback&&
-(a.flags|=32,h=e.effects,null===h?e.effects=[f]:h.push(f))}else p={eventTime:p,lane:h,tag:f.tag,payload:f.payload,callback:f.callback,next:null},null===m?(q=m=p,k=l):m=m.next=p,g|=h;f=f.next;if(null===f)if(h=e.shared.pending,null===h)break;else f=h.next,h.next=null,e.lastBaseUpdate=h,e.shared.pending=null}while(1);null===m&&(k=l);e.baseState=k;e.firstBaseUpdate=q;e.lastBaseUpdate=m;Ma|=g;a.lanes=g;a.memoizedState=l}}function qh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=
-a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(m(191,e));e.call(d)}}}function id(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:C({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}function rh(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!ec(c,d)||!ec(e,f):!0}function sh(a,b,c){var d=!1,e=Ha;var f=b.contextType;"object"===
-typeof f&&null!==f?f=aa(f):(e=T(b)?$a:D.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Bb(a,e):Ha);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=jd;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}function th(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&
-b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&jd.enqueueReplaceState(b,b.state,null)}function Le(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=uh;Ke(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=aa(f):(f=T(b)?$a:D.current,e.context=Bb(a,f));hc(a,c,e,d);e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(id(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||
-"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&jd.enqueueReplaceState(e,e.state,null),hc(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4)}function ic(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==
-c.tag)throw Error(m(309));var d=c.stateNode}if(!d)throw Error(m(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===uh&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(m(284));if(!c._owner)throw Error(m(290,a));}return a}function kd(a,b){if("textarea"!==a.type)throw Error(m(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+
-"}":b));}function vh(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.flags=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=Na(a,b);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags=
-2,c):d;b.flags=2;return c}function g(b){a&&null===b.alternate&&(b.flags=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Me(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props),d.ref=ic(a,b,c),d.return=a,d;d=ld(c.type,c.key,c.props,null,a.mode,d);d.ref=ic(a,b,c);d.return=a;return d}function q(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=
-Ne(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function l(a,b,c,d,f){if(null===b||7!==b.tag)return b=Fb(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function n(a,b,c){if("string"===typeof b||"number"===typeof b)return b=Me(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case jc:return c=ld(b.type,b.key,b.props,null,a.mode,c),c.ref=ic(a,null,b),c.return=a,c;case Wa:return b=Ne(b,a.mode,c),b.return=a,b}if(md(b)||Pb(b))return b=Fb(b,
-a.mode,c,null),b.return=a,b;kd(a,b)}return null}function p(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case jc:return c.key===e?c.type===xa?l(a,b,c.props.children,d,e):k(a,b,c,d):null;case Wa:return c.key===e?q(a,b,c,d):null}if(md(c)||Pb(c))return null!==e?null:l(a,b,c,d,null);kd(a,c)}return null}function t(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=a.get(c)||
-null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case jc:return a=a.get(null===d.key?c:d.key)||null,d.type===xa?l(b,a,d.props.children,e,d.key):k(b,a,d,e);case Wa:return a=a.get(null===d.key?c:d.key)||null,q(b,a,d,e)}if(md(d)||Pb(d))return a=a.get(c)||null,l(b,a,d,e,null);kd(b,d)}return null}function v(e,g,h,k){for(var m=null,q=null,l=g,r=g=0,x=null;null!==l&&r<h.length;r++){l.index>r?(x=l,l=null):x=l.sibling;var H=p(e,l,h[r],k);if(null===H){null===l&&(l=x);break}a&&l&&null===
-H.alternate&&b(e,l);g=f(H,g,r);null===q?m=H:q.sibling=H;q=H;l=x}if(r===h.length)return c(e,l),m;if(null===l){for(;r<h.length;r++)l=n(e,h[r],k),null!==l&&(g=f(l,g,r),null===q?m=l:q.sibling=l,q=l);return m}for(l=d(e,l);r<h.length;r++)x=t(l,e,r,h[r],k),null!==x&&(a&&null!==x.alternate&&l.delete(null===x.key?r:x.key),g=f(x,g,r),null===q?m=x:q.sibling=x,q=x);a&&l.forEach(function(a){return b(e,a)});return m}function z(e,g,h,k){var q=Pb(h);if("function"!==typeof q)throw Error(m(150));h=q.call(h);if(null==
-h)throw Error(m(151));for(var l=q=null,r=g,x=g=0,H=null,u=h.next();null!==r&&!u.done;x++,u=h.next()){r.index>x?(H=r,r=null):H=r.sibling;var Z=p(e,r,u.value,k);if(null===Z){null===r&&(r=H);break}a&&r&&null===Z.alternate&&b(e,r);g=f(Z,g,x);null===l?q=Z:l.sibling=Z;l=Z;r=H}if(u.done)return c(e,r),q;if(null===r){for(;!u.done;x++,u=h.next())u=n(e,u.value,k),null!==u&&(g=f(u,g,x),null===l?q=u:l.sibling=u,l=u);return q}for(r=d(e,r);!u.done;x++,u=h.next())u=t(r,e,x,u.value,k),null!==u&&(a&&null!==u.alternate&&
-r.delete(null===u.key?x:u.key),g=f(u,g,x),null===l?q=u:l.sibling=u,l=u);a&&r.forEach(function(a){return b(e,a)});return q}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===xa&&null===f.key;k&&(f=f.props.children);var q="object"===typeof f&&null!==f;if(q)switch(f.$$typeof){case jc:a:{q=f.key;for(k=d;null!==k;){if(k.key===q){switch(k.tag){case 7:if(f.type===xa){c(a,k.sibling);d=e(k,f.props.children);d.return=a;a=d;break a}break;default:if(k.elementType===f.type){c(a,k.sibling);
-d=e(k,f.props);d.ref=ic(a,k,f);d.return=a;a=d;break a}}c(a,k);break}else b(a,k);k=k.sibling}f.type===xa?(d=Fb(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=ld(f.type,f.key,f.props,null,a.mode,h),h.ref=ic(a,d,f),h.return=a,a=h)}return g(a);case Wa:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=
-Ne(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Me(f,a.mode,h),d.return=a,a=d),g(a);if(md(f))return v(a,d,f,h);if(Pb(f))return z(a,d,f,h);q&&kd(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 22:case 0:case 11:case 15:throw Error(m(152,nb(a.type)||"Component"));}return c(a,d)}}function cb(a){if(a===kc)throw Error(m(174));return a}function Oe(a,b){B(lc,b);B(mc,a);
-B(na,kc);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:$d(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=$d(b,a)}t(na);B(na,b)}function Gb(a){t(na);t(mc);t(lc)}function wh(a){cb(lc.current);var b=cb(na.current);var c=$d(b,a.type);b!==c&&(B(mc,a),B(na,c))}function Pe(a){mc.current===a&&(t(na),t(mc))}function nd(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===
-c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function xh(a,b){var c=ba(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.flags=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=
-a.lastEffect=c}function yh(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}function Qe(a){if(oa){var b=Oa;if(b){var c=b;if(!yh(a,b)){b=zb(c.nextSibling);if(!b||!yh(a,b)){a.flags=a.flags&-1025|2;oa=!1;ta=a;return}xh(ta,c)}ta=a;Oa=zb(b.firstChild)}else a.flags=a.flags&-1025|2,oa=!1,
-ta=a}}function zh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;ta=a}function od(a){if(a!==ta)return!1;if(!oa)return zh(a),oa=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!Be(b,a.memoizedProps))for(b=Oa;b;)xh(a,b),b=zb(b.nextSibling);zh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(m(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){Oa=zb(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==
-c&&"$?"!==c||b++}a=a.nextSibling}Oa=null}}else Oa=ta?zb(a.stateNode.nextSibling):null;return!0}function Re(){Oa=ta=null;oa=!1}function Se(){for(var a=0;a<Hb.length;a++)Hb[a]._workInProgressVersionPrimary=null;Hb.length=0}function U(){throw Error(m(321));}function Te(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!Y(a[c],b[c]))return!1;return!0}function Ue(a,b,c,d,e,f){nc=f;F=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;oc.current=null===a||null===a.memoizedState?Jj:Kj;
-a=c(d,e);if(pc){f=0;do{pc=!1;if(!(25>f))throw Error(m(301));f+=1;L=O=null;b.updateQueue=null;oc.current=Lj;a=c(d,e)}while(pc)}oc.current=pd;b=null!==O&&null!==O.next;nc=0;L=O=F=null;qd=!1;if(b)throw Error(m(300));return a}function db(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===L?F.memoizedState=L=a:L=L.next=a;return L}function eb(){if(null===O){var a=F.alternate;a=null!==a?a.memoizedState:null}else a=O.next;var b=null===L?F.memoizedState:L.next;if(null!==
-b)L=b,O=a;else{if(null===a)throw Error(m(310));O=a;a={memoizedState:O.memoizedState,baseState:O.baseState,baseQueue:O.baseQueue,queue:O.queue,next:null};null===L?F.memoizedState=L=a:L=L.next=a}return L}function pa(a,b){return"function"===typeof b?b(a):b}function qc(a,b,c){b=eb();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=O,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){e=e.next;d=d.baseState;
-var h=g=f=null,k=e;do{var q=k.lane;if((nc&q)===q)null!==h&&(h=h.next={lane:0,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null}),d=k.eagerReducer===a?k.eagerState:a(d,k.action);else{var l={lane:q,action:k.action,eagerReducer:k.eagerReducer,eagerState:k.eagerState,next:null};null===h?(g=h=l,f=d):h=h.next=l;F.lanes|=q;Ma|=q}k=k.next}while(null!==k&&k!==e);null===h?f=d:h.next=g;Y(d,b.memoizedState)||(ia=!0);b.memoizedState=d;b.baseState=f;b.baseQueue=h;c.lastRenderedState=
-d}return[b.memoizedState,c.dispatch]}function rc(a,b,c){b=eb();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);Y(f,b.memoizedState)||(ia=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function Ah(a,b,c){var d=b._getVersion;d=d(b._source);var e=b._workInProgressVersionPrimary;if(null!==e)a=e===d;else if(a=a.mutableReadLanes,
-a=(nc&a)===a)b._workInProgressVersionPrimary=d,Hb.push(b);if(a)return c(b._source);Hb.push(b);throw Error(m(350));}function Bh(a,b,c,d){var e=S;if(null===e)throw Error(m(349));var f=b._getVersion,g=f(b._source),h=oc.current,k=h.useState(function(){return Ah(e,b,c)}),q=k[1],l=k[0];k=L;var n=a.memoizedState,p=n.refs,t=p.getSnapshot,v=n.source;n=n.subscribe;var z=F;a.memoizedState={refs:p,source:b,subscribe:d};h.useEffect(function(){p.getSnapshot=c;p.setSnapshot=q;var a=f(b._source);if(!Y(g,a)){a=c(b._source);
-Y(l,a)||(q(a),a=Pa(z),e.mutableReadLanes|=a&e.pendingLanes);a=e.mutableReadLanes;e.entangledLanes|=a;for(var d=e.entanglements,h=a;0<h;){var k=31-Ca(h),m=1<<k;d[k]|=a;h&=~m}}},[c,b,d]);h.useEffect(function(){return d(b._source,function(){var a=p.getSnapshot,c=p.setSnapshot;try{c(a(b._source));var d=Pa(z);e.mutableReadLanes|=d&e.pendingLanes}catch(u){c(function(){throw u;})}})},[b,d]);Y(t,c)&&Y(v,b)&&Y(n,d)||(a={pending:null,dispatch:null,lastRenderedReducer:pa,lastRenderedState:l},a.dispatch=q=Ve.bind(null,
-F,a),k.queue=a,k.baseQueue=null,l=Ah(e,b,c),k.memoizedState=k.baseState=l);return l}function Ch(a,b,c){var d=eb();return Bh(d,a,b,c)}function sc(a){var b=db();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={pending:null,dispatch:null,lastRenderedReducer:pa,lastRenderedState:a};a=a.dispatch=Ve.bind(null,F,a);return[b.memoizedState,a]}function rd(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};b=F.updateQueue;null===b?(b={lastEffect:null},F.updateQueue=b,b.lastEffect=
-a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Dh(a){var b=db();a={current:a};return b.memoizedState=a}function sd(a){return eb().memoizedState}function We(a,b,c,d){var e=db();F.flags|=a;e.memoizedState=rd(1|b,c,void 0,void 0===d?null:d)}function Xe(a,b,c,d){var e=eb();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&Te(d,g.deps)){rd(b,c,f,d);return}}F.flags|=a;e.memoizedState=rd(1|
-b,c,f,d)}function Eh(a,b){return We(516,4,a,b)}function td(a,b){return Xe(516,4,a,b)}function Fh(a,b){return Xe(4,2,a,b)}function Gh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Hh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Xe(4,2,Gh.bind(null,b,a),c)}function Ye(a,b){}function Ih(a,b){var c=eb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Te(b,d[1]))return d[0];
-c.memoizedState=[a,b];return a}function Jh(a,b){var c=eb();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Te(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Mj(a,b){var c=Cb();ab(98>c?98:c,function(){a(!0)});ab(97<c?97:c,function(){var c=ca.transition;ca.transition=1;try{a(!1),b()}finally{ca.transition=c}})}function Ve(a,b,c){var d=X(),e=Pa(a),f={lane:e,action:c,eagerReducer:null,eagerState:null,next:null},g=b.pending;null===g?f.next=f:(f.next=g.next,g.next=f);
-b.pending=f;g=a.alternate;if(a===F||null!==g&&g===F)pc=qd=!0;else{if(0===a.lanes&&(null===g||0===g.lanes)&&(g=b.lastRenderedReducer,null!==g))try{var h=b.lastRenderedState,k=g(h,c);f.eagerReducer=g;f.eagerState=k;if(Y(k,h))return}catch(q){}finally{}Qa(a,e,d)}}function ud(a,b){if(0<=fb){var c=gb()-fb;a.actualDuration+=c;b&&(a.selfBaseDuration=c);fb=-1}}function Ze(a){for(var b=a.child;b;)a.actualDuration+=b.actualDuration,b=b.sibling}function V(a,b,c,d){b.child=null===a?Kh(b,null,c,d):vd(b,a.child,
-c,d)}function Lh(a,b,c,d,e){c=c.render;var f=b.ref;Eb(b,e);d=Ue(a,b,c,d,f,e);if(null!==a&&!ia)return b.updateQueue=a.updateQueue,b.flags&=-517,a.lanes&=~e,ua(a,b,e);b.flags|=1;V(a,b,d,e);return b.child}function Mh(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!$e(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,Nh(a,b,g,d,e,f);a=ld(c.type,null,d,b,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(0===(e&f)&&(e=g.memoizedProps,
-c=c.compare,c=null!==c?c:ec,c(e,d)&&a.ref===b.ref))return ua(a,b,f);b.flags|=1;a=Na(g,d);a.ref=b.ref;a.return=b;return b.child=a}function Nh(a,b,c,d,e,f){if(null!==a&&ec(a.memoizedProps,d)&&a.ref===b.ref)if(ia=!1,0!==(f&e))0!==(a.flags&16384)&&(ia=!0);else return b.lanes=a.lanes,ua(a,b,f);return af(a,b,c,d,f)}function bf(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode||"unstable-defer-without-hiding"===d.mode)if(0===(b.mode&4))b.memoizedState={baseLanes:0},
-wd(b,c);else if(0!==(c&1073741824))b.memoizedState={baseLanes:0},wd(b,null!==f?f.baseLanes:c);else return a=null!==f?f.baseLanes|c:c,xd(1073741824),b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a},wd(b,a),null;else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,wd(b,d);V(a,b,e,c);return b.child}function Oh(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=128}function af(a,b,c,d,e){var f=T(c)?$a:D.current;f=Bb(b,f);Eb(b,e);c=Ue(a,b,c,d,f,e);if(null!==a&&!ia)return b.updateQueue=
-a.updateQueue,b.flags&=-517,a.lanes&=~e,ua(a,b,e);b.flags|=1;V(a,b,c,e);return b.child}function Ph(a,b,c,d,e){if(T(c)){var f=!0;cd(b)}else f=!1;Eb(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),sh(b,c,d),Le(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=aa(l):(l=T(c)?$a:D.current,l=Bb(b,l));var m=c.getDerivedStateFromProps,n="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;
-n||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&th(b,g,d,l);La=!1;var p=b.memoizedState;g.state=p;hc(b,d,g,e);k=b.memoizedState;h!==d||p!==k||K.current||La?("function"===typeof m&&(id(b,c,m,d),k=b.memoizedState),(h=La||rh(b,c,h,d,p,k,l))?(n||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&
-g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4)):("function"===typeof g.componentDidMount&&(b.flags|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4),d=!1)}else{g=b.stateNode;oh(a,b);h=b.memoizedProps;l=b.type===b.elementType?h:ha(b.type,h);g.props=l;n=b.pendingProps;p=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=aa(k):(k=T(c)?$a:D.current,k=Bb(b,k));var t=c.getDerivedStateFromProps;
-(m="function"===typeof t||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==n||p!==k)&&th(b,g,d,k);La=!1;p=b.memoizedState;g.state=p;hc(b,d,g,e);var v=b.memoizedState;h!==n||p!==v||K.current||La?("function"===typeof t&&(id(b,c,t,d),v=b.memoizedState),(l=La||rh(b,c,l,d,p,v,k))?(m||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&
-g.componentWillUpdate(d,v,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,v,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),b.memoizedProps=d,b.memoizedState=v),g.props=d,g.state=v,g.context=
-k,d=l):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&p===a.memoizedState||(b.flags|=256),d=!1)}return cf(a,b,c,d,f,e)}function cf(a,b,c,d,e,f){Oh(a,b);var g=0!==(b.flags&64);if(!d&&!g)return e&&gh(b,c,!1),ua(a,b,f);d=b.stateNode;Nj.current=b;if(g&&"function"!==typeof c.getDerivedStateFromError){var h=null;fb=-1}else h=d.render();b.flags|=1;null!==a&&g?(g=h,b.child=vd(b,a.child,null,
-f),b.child=vd(b,null,g,f)):V(a,b,h,f);b.memoizedState=d.state;e&&gh(b,c,!0);return b.child}function Qh(a){var b=a.stateNode;b.pendingContext?eh(a,b.pendingContext,b.pendingContext!==b.context):b.context&&eh(a,b.context,!1);Oe(a,b.containerInfo)}function Rh(a,b,c){var d=b.pendingProps,e=G.current,f=!1,g;(g=0!==(b.flags&64))||(g=null!==a&&null===a.memoizedState?!1:0!==(e&2));g?(f=!0,b.flags&=-65):null!==a&&null===a.memoizedState||void 0===d.fallback||!0===d.unstable_avoidThisFallback||(e|=1);B(G,e&
-1);if(null===a){void 0!==d.fallback&&Qe(b);a=d.children;e=d.fallback;if(f)return a=Sh(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=yd,a;if("number"===typeof d.unstable_expectedLoadTime)return a=Sh(b,a,e,c),b.child.memoizedState={baseLanes:c},b.memoizedState=yd,b.lanes=33554432,xd(33554432),a;c=df({mode:"visible",children:a},b.mode,c,null);c.return=b;return b.child=c}if(null!==a.memoizedState){if(f)return d=Th(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=
-null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=yd,d;c=Uh(a,b,d.children,c);b.memoizedState=null;return c}if(f)return d=Th(a,b,d.children,d.fallback,c),f=b.child,e=a.child.memoizedState,f.memoizedState=null===e?{baseLanes:c}:{baseLanes:e.baseLanes|c},f.childLanes=a.childLanes&~c,b.memoizedState=yd,d;c=Uh(a,b,d.children,c);b.memoizedState=null;return c}function Sh(a,b,c,d){var e=a.mode,f=a.child;b={mode:"hidden",children:b};0===(e&2)&&null!==f?(f.childLanes=
-0,f.pendingProps=b,a.mode&8&&(f.actualDuration=0,f.actualStartTime=-1,f.selfBaseDuration=0,f.treeBaseDuration=0)):f=df(b,e,0,null);c=Fb(c,e,d,null);f.return=a;c.return=a;f.sibling=c;a.child=f;return c}function Uh(a,b,c,d){var e=a.child;a=e.sibling;c=Na(e,{mode:"visible",children:c});0===(b.mode&2)&&(c.lanes=d);c.return=b;c.sibling=null;null!==a&&(a.nextEffect=null,a.flags=8,b.firstEffect=b.lastEffect=a);return b.child=c}function Th(a,b,c,d,e){var f=b.mode,g=a.child;a=g.sibling;var h={mode:"hidden",
-children:c};0===(f&2)&&b.child!==g?(c=b.child,c.childLanes=0,c.pendingProps=h,b.mode&8&&(c.actualDuration=0,c.actualStartTime=-1,c.selfBaseDuration=g.selfBaseDuration,c.treeBaseDuration=g.treeBaseDuration),g=c.lastEffect,null!==g?(b.firstEffect=c.firstEffect,b.lastEffect=g,g.nextEffect=null):b.firstEffect=b.lastEffect=null):c=Na(g,h);null!==a?d=Na(a,d):(d=Fb(d,f,e,null),d.flags|=2);d.return=b;c.return=b;c.sibling=d;b.child=c;return d}function Vh(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=
-b);nh(a.return,b)}function ef(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.renderingStartTime=0,g.last=d,g.tail=c,g.tailMode=e,g.lastEffect=f)}function Wh(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;V(a,b,d.children,c);d=G.current;if(0!==(d&2))d=d&1|2,b.flags|=64;else{if(null!==a&&0!==(a.flags&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&
-Vh(a,c);else if(19===a.tag)Vh(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}B(G,d);if(0===(b.mode&2))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===nd(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);ef(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=
-null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===nd(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}ef(b,!0,c,null,f,b.lastEffect);break;case "together":ef(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}function ua(a,b,c){null!==a&&(b.dependencies=a.dependencies);fb=-1;Ma|=b.lanes;if(0!==(c&b.childLanes)){if(null!==a&&b.child!==a.child)throw Error(m(153));if(null!==b.child){a=b.child;c=Na(a,a.pendingProps);b.child=c;for(c.return=
-b;null!==a.sibling;)a=a.sibling,c=c.sibling=Na(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}return null}function tc(a,b){if(!oa)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}function Xh(a,b,c){var d=b.pendingProps;switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;
-case 1:return T(b.type)&&(t(K),t(D)),null;case 3:Gb();t(K);t(D);Se();d=b.stateNode;d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)od(b)?b.flags|=4:d.hydrate||(b.flags|=256);Yh(b);return null;case 5:Pe(b);var e=cb(lc.current);c=b.type;if(null!==a&&null!=b.stateNode)Oj(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=128);else{if(!d){if(null===b.stateNode)throw Error(m(166));return null}a=cb(na.current);if(od(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Fa]=
-b;d[bd]=f;switch(c){case "dialog":z("cancel",d);z("close",d);break;case "iframe":case "object":case "embed":z("load",d);break;case "video":case "audio":for(a=0;a<uc.length;a++)z(uc[a],d);break;case "source":z("error",d);break;case "img":case "image":case "link":z("error",d);z("load",d);break;case "details":z("toggle",d);break;case "input":Tf(d,f);z("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};z("invalid",d);break;case "textarea":Wf(d,f),z("invalid",d)}ae(c,f);a=null;
-for(var g in f)f.hasOwnProperty(g)&&(e=f[g],"children"===g?"string"===typeof e?d.textContent!==e&&(a=["children",e]):"number"===typeof e&&d.textContent!==""+e&&(a=["children",""+e]):Ob.hasOwnProperty(g)&&null!=e&&"onScroll"===g&&z("scroll",d));switch(c){case "input":Lc(d);Vf(d,f,!0);break;case "textarea":Lc(d);Yf(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=ad)}d=a;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===
-a&&(a=Zf(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Fa]=b;a[bd]=d;Pj(a,b,!1,!1);b.stateNode=a;g=be(c,d);switch(c){case "dialog":z("cancel",a);z("close",a);e=d;break;case "iframe":case "object":case "embed":z("load",a);e=d;break;
-case "video":case "audio":for(e=0;e<uc.length;e++)z(uc[e],a);e=d;break;case "source":z("error",a);e=d;break;case "img":case "image":case "link":z("error",a);z("load",a);e=d;break;case "details":z("toggle",a);e=d;break;case "input":Tf(a,d);e=Vd(a,d);z("invalid",a);break;case "option":e=Yd(a,d);break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=C({},d,{value:void 0});z("invalid",a);break;case "textarea":Wf(a,d);e=Zd(a,d);z("invalid",a);break;default:e=d}ae(c,e);var h=e;for(f in h)if(h.hasOwnProperty(f)){var k=
-h[f];"style"===f?ag(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&Zh(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&vc(a,k):"number"===typeof k&&vc(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(Ob.hasOwnProperty(f)?null!=k&&"onScroll"===f&&z("scroll",a):null!=k&&Nd(a,f,k,g))}switch(c){case "input":Lc(a);Vf(a,d,!1);break;case "textarea":Lc(a);Yf(a);break;case "option":null!=d.value&&a.setAttribute("value",""+ya(d.value));
-break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?ob(a,!!d.multiple,f,!1):null!=d.defaultValue&&ob(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=ad)}bh(c,d)&&(b.flags|=4)}null!==b.ref&&(b.flags|=128)}return null;case 6:if(a&&null!=b.stateNode)Qj(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===b.stateNode)throw Error(m(166));c=cb(lc.current);cb(na.current);od(b)?(d=b.stateNode,c=b.memoizedProps,d[Fa]=b,d.nodeValue!==c&&(b.flags|=4)):
-(d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Fa]=b,b.stateNode=d)}return null;case 13:t(G);d=b.memoizedState;if(0!==(b.flags&64))return b.lanes=c,0!==(b.mode&8)&&Ze(b),b;d=null!==d;c=!1;null===a?void 0!==b.memoizedProps.fallback&&od(b):c=null!==a.memoizedState;if(d&&!c&&0!==(b.mode&2))if(null===a&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(G.current&1))0===M&&(M=3);else{if(0===M||3===M)M=4;null===S||0===(Ma&134217727)&&0===(Ib&134217727)||Jb(S,P)}if(d||c)b.flags|=4;return null;
-case 4:return Gb(),Yh(b),null===a&&Pg(b.stateNode.containerInfo),null;case 10:return Je(b),null;case 17:return T(b.type)&&(t(K),t(D)),null;case 19:t(G);d=b.memoizedState;if(null===d)return null;f=0!==(b.flags&64);g=d.rendering;if(null===g)if(f)tc(d,!1);else{if(0!==M||null!==a&&0!==(a.flags&64))for(a=b.child;null!==a;){g=nd(a);if(null!==g){b.flags|=64;tc(d,!1);f=g.updateQueue;null!==f&&(b.updateQueue=f,b.flags|=4);null===d.lastEffect&&(b.firstEffect=null);b.lastEffect=d.lastEffect;d=c;for(c=b.child;null!==
-c;)f=c,g=d,f.flags&=2,f.nextEffect=null,f.firstEffect=null,f.lastEffect=null,a=f.alternate,null===a?(f.childLanes=0,f.lanes=g,f.child=null,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null,f.selfBaseDuration=0,f.treeBaseDuration=0):(f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,f.type=a.type,g=a.dependencies,f.dependencies=null===g?null:{lanes:g.lanes,
-firstContext:g.firstContext},f.selfBaseDuration=a.selfBaseDuration,f.treeBaseDuration=a.treeBaseDuration),c=c.sibling;B(G,G.current&1|2);return b.child}a=a.sibling}null!==d.tail&&Q()>ff&&(b.flags|=64,f=!0,tc(d,!1),b.lanes=33554432,xd(33554432))}else{if(!f)if(a=nd(g),null!==a){if(b.flags|=64,f=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),tc(d,!0),null===d.tail&&"hidden"===d.tailMode&&!g.alternate&&!oa)return b=b.lastEffect=d.lastEffect,null!==b&&(b.nextEffect=null),null}else 2*Q()-d.renderingStartTime>
-ff&&1073741824!==c&&(b.flags|=64,f=!0,tc(d,!1),b.lanes=33554432,xd(33554432));d.isBackwards?(g.sibling=b.child,b.child=g):(c=d.last,null!==c?c.sibling=g:b.child=g,d.last=g)}return null!==d.tail?(c=d.tail,d.rendering=c,d.tail=c.sibling,d.lastEffect=b.lastEffect,d.renderingStartTime=Q(),c.sibling=null,b=G.current,B(G,f?b&1|2:b&1),c):null;case 23:case 24:return ja=hb.current,t(hb),null!==a&&null!==a.memoizedState!==(null!==b.memoizedState)&&"unstable-defer-without-hiding"!==d.mode&&(b.flags|=4),null}throw Error(m(156,
-b.tag));}function Rj(a,b){switch(a.tag){case 1:return T(a.type)&&(t(K),t(D)),b=a.flags,b&4096?(a.flags=b&-4097|64,0!==(a.mode&8)&&Ze(a),a):null;case 3:Gb();t(K);t(D);Se();b=a.flags;if(0!==(b&64))throw Error(m(285));a.flags=b&-4097|64;return a;case 5:return Pe(a),null;case 13:return t(G),b=a.flags,b&4096?(a.flags=b&-4097|64,0!==(a.mode&8)&&Ze(a),a):null;case 19:return t(G),null;case 4:return Gb(),null;case 10:return Je(a),null;case 23:case 24:return ja=hb.current,t(hb),null;default:return null}}function gf(a,
-b){try{var c="",d=b;do c+=Hi(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+"\n"+f.stack}return{value:a,source:b,stack:e}}function hf(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function $h(a,b,c){c=Ja(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){zd||(zd=!0,jf=d);hf(a,b)};return c}function ai(a,b,c){c=Ja(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=
-function(){hf(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===qa?qa=new Set([this]):qa.add(this),hf(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}function bi(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Ra(a,c)}else b.current=null}function Sj(a,b){switch(b.tag){case 0:case 11:case 15:case 22:return;case 1:if(b.flags&256&&null!==a){var c=
-a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:ha(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}return;case 3:b.flags&256&&Ce(b.stateNode.containerInfo);return;case 5:case 6:case 4:case 17:return}throw Error(m(163));}function Tj(a,b,c,d){switch(c.tag){case 0:case 11:case 15:case 22:b=c.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){a=b=b.next;do 3===(a.tag&3)&&(d=a.create,a.destroy=d()),a=a.next;while(a!==b)}b=c.updateQueue;b=null!==
-b?b.lastEffect:null;if(null!==b){a=b=b.next;do{var e=a;d=e.next;e=e.tag;0!==(e&4)&&0!==(e&1)&&(ci(c,a),Uj(c,a));a=d}while(a!==b)}return;case 1:a=c.stateNode;c.flags&4&&(null===b?a.componentDidMount():(d=c.elementType===c.type?b.memoizedProps:ha(c.type,b.memoizedProps),a.componentDidUpdate(d,b.memoizedState,a.__reactInternalSnapshotBeforeUpdate)));b=c.updateQueue;null!==b&&qh(c,b,a);return;case 3:b=c.updateQueue;if(null!==b){a=null;if(null!==c.child)switch(c.child.tag){case 5:a=c.child.stateNode;break;
-case 1:a=c.child.stateNode}qh(c,b,a)}return;case 5:a=c.stateNode;null===b&&c.flags&4&&bh(c.type,c.memoizedProps)&&a.focus();return;case 6:return;case 4:return;case 12:d=c.memoizedProps.onRender;e=kf;"function"===typeof d&&d(c.memoizedProps.id,null===b?"mount":"update",c.actualDuration,c.treeBaseDuration,c.actualStartTime,e,a.memoizedInteractions);return;case 13:null===c.memoizedState&&(c=c.alternate,null!==c&&(c=c.memoizedState,null!==c&&(c=c.dehydrated,null!==c&&og(c))));return;case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(m(163));
-}function di(a,b){for(var c=a;;){if(5===c.tag){var d=c.stateNode;if(b)d=d.style,"function"===typeof d.setProperty?d.setProperty("display","none","important"):d.display="none";else{d=c.stateNode;var e=c.memoizedProps.style;e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null;d.style.display=$f("display",e)}}else if(6===c.tag)c.stateNode.nodeValue=b?"":c.memoizedProps;else if((23!==c.tag&&24!==c.tag||null===c.memoizedState||c===a)&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===
-a)break;for(;null===c.sibling;){if(null===c.return||c.return===a)return;c=c.return}c.sibling.return=c.return;c=c.sibling}}function ei(a,b,c){if(ib&&"function"===typeof ib.onCommitFiberUnmount)try{ib.onCommitFiberUnmount(lf,b)}catch(f){}switch(b.tag){case 0:case 11:case 14:case 15:case 22:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){c=a=a.next;do{var d=c,e=d.destroy;d=d.tag;if(void 0!==e)if(0!==(d&4))ci(b,c);else{d=b;try{e()}catch(f){Ra(d,f)}}c=c.next}while(c!==a)}break;case 1:bi(b);a=b.stateNode;
-if("function"===typeof a.componentWillUnmount)try{a.props=b.memoizedProps,a.state=b.memoizedState,a.componentWillUnmount()}catch(f){Ra(b,f)}break;case 5:bi(b);break;case 4:fi(a,b)}}function gi(a){a.alternate=null;a.child=null;a.dependencies=null;a.firstEffect=null;a.lastEffect=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.return=null;a.updateQueue=null}function hi(a){return 5===a.tag||3===a.tag||4===a.tag}function ii(a){a:{for(var b=a.return;null!==b;){if(hi(b))break a;b=b.return}throw Error(m(160));
-}var c=b;b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(m(161));}c.flags&16&&(vc(b,""),c.flags&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||hi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.flags&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.flags&2)){c=c.stateNode;break a}}d?
-mf(a,c,b):nf(a,c,b)}function mf(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=ad));else if(4!==d&&(a=a.child,null!==a))for(mf(a,b,c),a=a.sibling;null!==a;)mf(a,b,c),a=a.sibling}function nf(a,b,c){var d=a.tag,e=5===d||6===d;if(e)a=e?a.stateNode:a.stateNode.instance,
-b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(nf(a,b,c),a=a.sibling;null!==a;)nf(a,b,c),a=a.sibling}function fi(a,b,c){c=b;for(var d=!1,e,f;;){if(!d){e=c.return;a:for(;;){if(null===e)throw Error(m(160));f=e.stateNode;switch(e.tag){case 5:e=f;f=!1;break a;case 3:e=f.containerInfo;f=!0;break a;case 4:e=f.containerInfo;f=!0;break a}e=e.return}d=!0}if(5===c.tag||6===c.tag){a:for(var g=a,h=c,k=h;;)if(ei(g,k),null!==k.child&&4!==k.tag)k.child.return=k,k=k.child;else{if(k===
-h)break a;for(;null===k.sibling;){if(null===k.return||k.return===h)break a;k=k.return}k.sibling.return=k.return;k=k.sibling}f?(g=e,h=c.stateNode,8===g.nodeType?g.parentNode.removeChild(h):g.removeChild(h)):e.removeChild(c.stateNode)}else if(4===c.tag){if(null!==c.child){e=c.stateNode.containerInfo;f=!0;c.child.return=c;c=c.child;continue}}else if(ei(a,c),null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return;4===
-c.tag&&(d=!1)}c.sibling.return=c.return;c=c.sibling}}function of(a,b){switch(b.tag){case 0:case 11:case 14:case 15:case 22:var c=b.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do 3===(d.tag&3)&&(a=d.destroy,d.destroy=void 0,void 0!==a&&a()),d=d.next;while(d!==c)}return;case 1:return;case 5:c=b.stateNode;if(null!=c){d=b.memoizedProps;var e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[bd]=d;"input"===a&&"radio"===d.type&&null!=d.name&&
-Uf(c,d);be(a,e);b=be(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?ag(c,h):"dangerouslySetInnerHTML"===g?Zh(c,h):"children"===g?vc(c,h):Nd(c,g,h,b)}switch(a){case "input":Wd(c,d);break;case "textarea":Xf(c,d);break;case "select":a=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,f=d.value,null!=f?ob(c,!!d.multiple,f,!1):a!==!!d.multiple&&(null!=d.defaultValue?ob(c,!!d.multiple,d.defaultValue,!0):ob(c,!!d.multiple,d.multiple?[]:"",!1))}}}return;case 6:if(null===
-b.stateNode)throw Error(m(162));b.stateNode.nodeValue=b.memoizedProps;return;case 3:c=b.stateNode;c.hydrate&&(c.hydrate=!1,og(c.containerInfo));return;case 12:return;case 13:null!==b.memoizedState&&(pf=Q(),di(b.child,!0));ji(b);return;case 19:ji(b);return;case 17:return;case 23:case 24:di(b,null!==b.memoizedState);return}throw Error(m(163));}function ji(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Vj);b.forEach(function(b){var d=Wj.bind(null,
-a,b);c.has(b)||(!0!==b.__reactDoNotTraceInteractions&&(d=Xj(d)),c.add(b),b.then(d,d))})}}function Yj(a,b){return null!==a&&(a=a.memoizedState,null===a||null!==a.dehydrated)?(b=b.memoizedState,null!==b&&null===b.dehydrated):!1}function Kb(){ff=Q()+500}function X(){return 0!==(n&48)?Q():-1!==Ad?Ad:Ad=Q()}function Pa(a){a=a.mode;if(0===(a&2))return 1;if(0===(a&4))return 99===Cb()?1:2;0===va&&(va=Lb);if(0!==Zj.transition){0!==Bd&&(Bd=null!==qf?qf.pendingLanes:0);a=va;var b=4186112&~Bd;b&=-b;0===b&&(a=
-4186112&~a,b=a&-a,0===b&&(b=8192));return b}a=Cb();0!==(n&4)&&98===a?a=Tc(12,va):(a=Xi(a),a=Tc(a,va));return a}function Qa(a,b,c){if(50<wc)throw wc=0,rf=null,Error(m(185));a=Cd(a,b);if(null===a)return null;Uc(a,b,c);a===S&&(Ib|=b,4===M&&Jb(a,P));var d=Cb();1===b?0!==(n&8)&&0===(n&48)?(Sa(a,b),sf(a)):(da(a,c),Sa(a,b),0===n&&(Kb(),ma())):(0===(n&4)||98!==d&&99!==d||(null===wa?wa=new Set([a]):wa.add(a)),da(a,c),Sa(a,b));qf=a}function Cd(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=
-a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}function da(a,b){for(var c=a.callbackNode,d=a.suspendedLanes,e=a.pingedLanes,f=a.expirationTimes,g=a.pendingLanes;0<g;){var h=31-Ca(g),k=1<<h,l=f[h];if(-1===l){if(0===(k&d)||0!==(k&e)){l=b;sb(k);var m=v;f[h]=10<=m?l+250:6<=m?l+5E3:-1}}else l<=b&&(a.expiredLanes|=k);g&=~k}d=bc(a,a===S?P:0);b=v;if(0===d)null!==c&&(c!==tf&&Ge(c),a.callbackNode=null,a.callbackPriority=0);else{if(null!==
-c){if(a.callbackPriority===b)return;c!==tf&&Ge(c)}15===b?(c=sf.bind(null,a),null===sa?(sa=[c],ed=Fe(dd,mh)):sa.push(c),c=tf):14===b?c=Ia(99,sf.bind(null,a)):(c=Yi(b),c=Ia(c,ki.bind(null,a)));a.callbackPriority=b;a.callbackNode=c}}function ki(a){Ad=-1;Bd=va=0;if(0!==(n&48))throw Error(m(327));var b=a.callbackNode;if(Ta()&&a.callbackNode!==b)return null;var c=bc(a,a===S?P:0);if(0===c)return null;var d=c;var e=n;n|=16;var f=li();if(S!==a||P!==d)Kb(),Mb(a,d),mi(a,d);d=Dd(a);do try{ak();break}catch(h){ni(a,
-h)}while(1);Ie();ka.current=d;Ed.current=f;n=e;null!==I?e=0:(S=null,P=0,e=M);if(0!==(Lb&Ib))Mb(a,0);else if(0!==e){2===e&&(n|=64,a.hydrate&&(a.hydrate=!1,Ce(a.containerInfo)),c=rg(a),0!==c&&(e=xc(a,c)));if(1===e)throw b=Fd,Mb(a,0),Jb(a,c),da(a,Q()),b;a.finishedWork=a.current.alternate;a.finishedLanes=c;switch(e){case 0:case 1:throw Error(m(345));case 2:jb(a);break;case 3:Jb(a,c);if((c&62914560)===c&&(e=pf+500-Q(),10<e)){if(0!==bc(a,0))break;f=a.suspendedLanes;if((f&c)!==c){X();a.pingedLanes|=a.suspendedLanes&
-f;break}a.timeoutHandle=oi(jb.bind(null,a),e);break}jb(a);break;case 4:Jb(a,c);if((c&4186112)===c)break;e=a.eventTimes;for(f=-1;0<c;){var g=31-Ca(c);d=1<<g;g=e[g];g>f&&(f=g);c&=~d}c=f;c=Q()-c;c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3E3>c?3E3:4320>c?4320:1960*bk(c/1960))-c;if(10<c){a.timeoutHandle=oi(jb.bind(null,a),c);break}jb(a);break;case 5:jb(a);break;default:throw Error(m(329));}}da(a,Q());return a.callbackNode===b?ki.bind(null,a):null}function Jb(a,b){b&=~uf;b&=~Ib;a.suspendedLanes|=b;
-a.pingedLanes&=~b;for(a=a.expirationTimes;0<b;){var c=31-Ca(b),d=1<<c;a[c]=-1;b&=~d}}function sf(a){if(0!==(n&48))throw Error(m(327));Ta();if(a===S&&0!==(a.expiredLanes&P)){var b=P;var c=xc(a,b);0!==(Lb&Ib)&&(b=bc(a,b),c=xc(a,b))}else b=bc(a,0),c=xc(a,b);0!==a.tag&&2===c&&(n|=64,a.hydrate&&(a.hydrate=!1,Ce(a.containerInfo)),b=rg(a),0!==b&&(c=xc(a,b)));if(1===c)throw c=Fd,Mb(a,0),Jb(a,b),da(a,Q()),c;a.finishedWork=a.current.alternate;a.finishedLanes=b;jb(a);da(a,Q());return null}function ck(){if(null!==
-wa){var a=wa;wa=null;a.forEach(function(a){a.expiredLanes|=24&a.pendingLanes;da(a,Q())})}ma()}function pi(a,b){var c=n;n|=1;try{return a(b)}finally{n=c,0===n&&(Kb(),ma())}}function qi(a,b){var c=n;n&=-2;n|=8;try{return a(b)}finally{n=c,0===n&&(Kb(),ma())}}function wd(a,b){B(hb,ja);ja|=b;Lb|=b}function Mb(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,dk(c));if(null!==I)for(c=I.return;null!==c;){var d=c;switch(d.tag){case 1:d=d.type.childContextTypes;null!==
-d&&void 0!==d&&(t(K),t(D));break;case 3:Gb();t(K);t(D);Se();break;case 5:Pe(d);break;case 4:Gb();break;case 13:t(G);break;case 19:t(G);break;case 10:Je(d);break;case 23:case 24:ja=hb.current,t(hb)}c=c.return}S=a;I=Na(a.current,null);P=ja=Lb=b;M=0;Fd=null;uf=Ib=Ma=0;kb=null}function ni(a,b){do{var c=I;try{Ie();oc.current=pd;if(qd){for(var d=F.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}qd=!1}nc=0;L=O=F=null;pc=!1;vf.current=null;if(null===c||null===c.return){M=1;Fd=b;
-I=null;break}c.mode&8&&ud(c,!0);a:{var f=a,g=c.return,h=c,k=b;b=P;h.flags|=2048;h.firstEffect=h.lastEffect=null;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var l=k;if(0===(h.mode&2)){var m=h.alternate;m?(h.updateQueue=m.updateQueue,h.memoizedState=m.memoizedState,h.lanes=m.lanes):(h.updateQueue=null,h.memoizedState=null)}var n=0!==(G.current&1),p=g;do{var t;if(t=13===p.tag){var v=p.memoizedState;if(null!==v)t=null!==v.dehydrated?!0:!1;else{var z=p.memoizedProps;t=void 0===z.fallback?
-!1:!0!==z.unstable_avoidThisFallback?!0:n?!1:!0}}if(t){var H=p.updateQueue;if(null===H){var r=new Set;r.add(l);p.updateQueue=r}else H.add(l);if(0===(p.mode&2)){p.flags|=64;h.flags|=16384;h.flags&=-2981;if(1===h.tag)if(null===h.alternate)h.tag=17;else{var x=Ja(-1,1);x.tag=2;Ka(h,x)}h.lanes|=1;break a}k=void 0;h=b;var u=f.pingCache;null===u?(u=f.pingCache=new ek,k=new Set,u.set(l,k)):(k=u.get(l),void 0===k&&(k=new Set,u.set(l,k)));if(!k.has(h)){k.add(h);var y=fk.bind(null,f,l,h);l.then(y,y)}p.flags|=
-4096;p.lanes=b;break a}p=p.return}while(null!==p);k=Error((nb(h.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==M&&(M=2);k=gf(k,h);p=g;do{switch(p.tag){case 3:f=k;p.flags|=4096;b&=-b;p.lanes|=b;var A=$h(p,f,b);ph(p,A);break a;case 1:f=k;var w=p.type,C=p.stateNode;if(0===(p.flags&64)&&("function"===typeof w.getDerivedStateFromError||
-null!==C&&"function"===typeof C.componentDidCatch&&(null===qa||!qa.has(C)))){p.flags|=4096;b&=-b;p.lanes|=b;var B=ai(p,f,b);ph(p,B);break a}}p=p.return}while(null!==p)}ri(c)}catch(Ij){b=Ij;I===c&&null!==c&&(I=c=c.return);continue}break}while(1)}function li(){var a=Ed.current;Ed.current=pd;return null===a?pd:a}function Dd(a){var b=ka.current;ka.current=a.memoizedInteractions;return b}function xc(a,b){var c=n;n|=16;var d=li();if(S!==a||P!==b)Mb(a,b),mi(a,b);b=Dd(a);do try{gk();break}catch(e){ni(a,e)}while(1);
-Ie();ka.current=b;n=c;Ed.current=d;if(null!==I)throw Error(m(261));S=null;P=0;return M}function gk(){for(;null!==I;)si(I)}function ak(){for(;null!==I&&!hk();)si(I)}function si(a){var b=a.alternate;0!==(a.mode&8)?(fb=gb(),0>a.actualStartTime&&(a.actualStartTime=gb()),b=ti(b,a,ja),ud(a,!0)):b=ti(b,a,ja);a.memoizedProps=a.pendingProps;null===b?ri(a):I=b;vf.current=null}function ri(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&2048)){if(0===(b.mode&8))c=Xh(c,b,ja);else{var d=b;fb=gb();0>
-d.actualStartTime&&(d.actualStartTime=gb());c=Xh(c,b,ja);ud(b,!1)}if(null!==c){I=c;return}c=b;if(24!==c.tag&&23!==c.tag||null===c.memoizedState||0!==(ja&1073741824)||0===(c.mode&4)){d=0;if(0!==(c.mode&8)){for(var e=c.actualDuration,f=c.selfBaseDuration,g=null===c.alternate||c.child!==c.alternate.child,h=c.child;null!==h;)d|=h.lanes|h.childLanes,g&&(e+=h.actualDuration),f+=h.treeBaseDuration,h=h.sibling;13===c.tag&&null!==c.memoizedState&&(g=c.child,null!==g&&(f-=g.treeBaseDuration));c.actualDuration=
-e;c.treeBaseDuration=f}else for(e=c.child;null!==e;)d|=e.lanes|e.childLanes,e=e.sibling;c.childLanes=d}null!==a&&0===(a.flags&2048)&&(null===a.firstEffect&&(a.firstEffect=b.firstEffect),null!==b.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=b.firstEffect),a.lastEffect=b.lastEffect),1<b.flags&&(null!==a.lastEffect?a.lastEffect.nextEffect=b:a.firstEffect=b,a.lastEffect=b))}else{c=Rj(b);if(null!==c){c.flags&=2047;I=c;return}if(0!==(b.mode&8)){ud(b,!1);c=b.actualDuration;for(d=b.child;null!==
-d;)c+=d.actualDuration,d=d.sibling;b.actualDuration=c}null!==a&&(a.firstEffect=a.lastEffect=null,a.flags|=2048)}b=b.sibling;if(null!==b){I=b;return}I=b=a}while(null!==b);0===M&&(M=5)}function jb(a){var b=Cb();ab(99,ik.bind(null,a,b));return null}function ik(a,b){do Ta();while(null!==yc);if(0!==(n&48))throw Error(m(327));var c=a.finishedWork,d=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(m(177));a.callbackNode=null;var e=c.lanes|c.childLanes,
-f=e,g=a.pendingLanes&~f;a.pendingLanes=f;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=f;a.mutableReadLanes&=f;a.entangledLanes&=f;f=a.entanglements;for(var h=a.eventTimes,k=a.expirationTimes;0<g;){var q=31-Ca(g),t=1<<q;f[q]=0;h[q]=-1;k[q]=-1;g&=~t}null!==wa&&0===(e&24)&&wa.has(a)&&wa.delete(a);a===S&&(I=S=null,P=0);1<c.flags?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){f=n;n|=32;h=Dd(a);vf.current=null;wf=Vc;k=Kg();if(we(k)){if("selectionStart"in
-k)g={start:k.selectionStart,end:k.selectionEnd};else a:{g=(g=k.ownerDocument)&&g.defaultView||window;var v=g.getSelection&&g.getSelection();if(v&&0!==v.rangeCount){g=v.anchorNode;q=v.anchorOffset;t=v.focusNode;v=v.focusOffset;try{g.nodeType,t.nodeType}catch(bb){g=null;break a}var p=0,z=-1,C=-1,F=0,H=0,r=k,x=null;b:for(;;){for(var u;;){r!==g||0!==q&&3!==r.nodeType||(z=p+q);r!==t||0!==v&&3!==r.nodeType||(C=p+v);3===r.nodeType&&(p+=r.nodeValue.length);if(null===(u=r.firstChild))break;x=r;r=u}for(;;){if(r===
-k)break b;x===g&&++F===q&&(z=p);x===t&&++H===v&&(C=p);if(null!==(u=r.nextSibling))break;r=x;x=r.parentNode}r=u}g=-1===z||-1===C?null:{start:z,end:C}}else g=null}g=g||{start:0,end:0}}else g=null;xf={focusedElem:k,selectionRange:g};Vc=!1;zc=null;Gd=!1;l=e;do try{jk()}catch(bb){if(null===l)throw Error(m(330));Ra(l,bb);l=l.nextEffect}while(null!==l);zc=null;kf=gb();l=e;do try{for(k=a;null!==l;){var y=l.flags;y&16&&vc(l.stateNode,"");if(y&128){var A=l.alternate;if(null!==A){var w=A.ref;null!==w&&("function"===
-typeof w?w(null):w.current=null)}}switch(y&1038){case 2:ii(l);l.flags&=-3;break;case 6:ii(l);l.flags&=-3;of(l.alternate,l);break;case 1024:l.flags&=-1025;break;case 1028:l.flags&=-1025;of(l.alternate,l);break;case 4:of(l.alternate,l);break;case 8:g=l;fi(k,g);var B=g.alternate;gi(g);null!==B&&gi(B)}l=l.nextEffect}}catch(bb){if(null===l)throw Error(m(330));Ra(l,bb);l=l.nextEffect}while(null!==l);w=xf;A=Kg();y=w.focusedElem;k=w.selectionRange;if(A!==y&&y&&y.ownerDocument&&Jg(y.ownerDocument.documentElement,
-y)){null!==k&&we(y)&&(A=k.start,w=k.end,void 0===w&&(w=A),"selectionStart"in y?(y.selectionStart=A,y.selectionEnd=Math.min(w,y.value.length)):(w=(A=y.ownerDocument||document)&&A.defaultView||window,w.getSelection&&(w=w.getSelection(),g=y.textContent.length,B=Math.min(k.start,g),k=void 0===k.end?B:Math.min(k.end,g),!w.extend&&B>k&&(g=k,k=B,B=g),g=Ig(y,B),q=Ig(y,k),g&&q&&(1!==w.rangeCount||w.anchorNode!==g.node||w.anchorOffset!==g.offset||w.focusNode!==q.node||w.focusOffset!==q.offset)&&(A=A.createRange(),
-A.setStart(g.node,g.offset),w.removeAllRanges(),B>k?(w.addRange(A),w.extend(q.node,q.offset)):(A.setEnd(q.node,q.offset),w.addRange(A))))));A=[];for(w=y;w=w.parentNode;)1===w.nodeType&&A.push({element:w,left:w.scrollLeft,top:w.scrollTop});"function"===typeof y.focus&&y.focus();for(y=0;y<A.length;y++)w=A[y],w.element.scrollLeft=w.left,w.element.scrollTop=w.top}Vc=!!wf;xf=wf=null;a.current=c;l=e;do try{for(y=a;null!==l;){var G=l.flags;G&36&&Tj(y,l.alternate,l);if(G&128){A=void 0;var D=l.ref;if(null!==
-D){var E=l.stateNode;switch(l.tag){case 5:A=E;break;default:A=E}"function"===typeof D?D(A):D.current=A}}l=l.nextEffect}}catch(bb){if(null===l)throw Error(m(330));Ra(l,bb);l=l.nextEffect}while(null!==l);l=null;kk();ka.current=h;n=f}else a.current=c,kf=gb();if(G=Ua)Ua=!1,yc=a,yf=d,Ac=b;else for(l=e;null!==l;)D=l.nextEffect,l.nextEffect=null,l.flags&8&&(E=l,E.sibling=null,E.stateNode=null),l=D;e=a.pendingLanes;if(0!==e){if(null!==kb)for(D=kb,kb=null,E=0;E<D.length;E++)ui(a,D[E],a.memoizedInteractions);
-Sa(a,e)}else qa=null;G||vi(a,d);1===e?a===rf?wc++:(wc=0,rf=a):wc=0;c=c.stateNode;if(ib&&"function"===typeof ib.onCommitFiberRoot)try{ib.onCommitFiberRoot(lf,c,b,64===(c.current.flags&64))}catch(bb){}da(a,Q());if(zd)throw zd=!1,a=jf,jf=null,a;if(0!==(n&8))return null;ma();return null}function jk(){for(;null!==l;){var a=l.alternate;Gd||null===zc||(0!==(l.flags&8)?ig(l,zc)&&(Gd=!0):13===l.tag&&Yj(a,l)&&ig(l,zc)&&(Gd=!0));var b=l.flags;0!==(b&256)&&Sj(a,l);0===(b&512)||Ua||(Ua=!0,Ia(97,function(){Ta();
-return null}));l=l.nextEffect}}function Ta(){if(90!==Ac){var a=97<Ac?97:Ac;Ac=90;return ab(a,lk)}return!1}function Uj(a,b){zf.push(b,a);Ua||(Ua=!0,Ia(97,function(){Ta();return null}))}function ci(a,b){Af.push(b,a);Ua||(Ua=!0,Ia(97,function(){Ta();return null}))}function lk(){if(null===yc)return!1;var a=yc,b=yf;yc=null;yf=0;if(0!==(n&48))throw Error(m(331));var c=n;n|=32;var d=Dd(a),e=Af;Af=[];for(var f=0;f<e.length;f+=2){var g=e[f],h=e[f+1],k=g.destroy;g.destroy=void 0;if("function"===typeof k)try{k()}catch(Z){if(null===
-h)throw Error(m(330));Ra(h,Z)}}e=zf;zf=[];for(f=0;f<e.length;f+=2){g=e[f];h=e[f+1];try{var l=g.create;g.destroy=l()}catch(Z){if(null===h)throw Error(m(330));Ra(h,Z)}}for(e=a.current.firstEffect;null!==e;)l=e.nextEffect,e.nextEffect=null,e.flags&8&&(e.sibling=null,e.stateNode=null),e=l;ka.current=d;vi(a,b);n=c;ma();return!0}function wi(a,b,c){b=gf(c,b);b=$h(a,b,1);Ka(a,b);b=X();a=Cd(a,1);null!==a&&(Uc(a,1,b),da(a,b),Sa(a,1))}function Ra(a,b){if(3===a.tag)wi(a,a,b);else for(var c=a.return;null!==c;){if(3===
-c.tag){wi(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===qa||!qa.has(d))){a=gf(b,a);var e=ai(c,a,1);Ka(c,e);e=X();c=Cd(c,1);if(null!==c)Uc(c,1,e),da(c,e),Sa(c,1);else if("function"===typeof d.componentDidCatch&&(null===qa||!qa.has(d)))try{d.componentDidCatch(b,a)}catch(f){}break}}c=c.return}}function fk(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);b=X();a.pingedLanes|=a.suspendedLanes&c;S===
-a&&(P&c)===c&&(4===M||3===M&&(P&62914560)===P&&500>Q()-pf?Mb(a,0):uf|=c);da(a,b);Sa(a,c)}function Wj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=a.mode,0===(b&2)?b=1:0===(b&4)?b=99===Cb()?1:2:(0===va&&(va=Lb),b=tb(62914560&~va),0===b&&(b=4194304)));c=X();a=Cd(a,b);null!==a&&(Uc(a,b,c),da(a,c),Sa(a,b))}function xd(a){null===kb?kb=[a]:kb.push(a)}function ui(a,b,c){if(0<c.size){var d=a.pendingInteractionMap,e=d.get(b);null!=e?c.forEach(function(a){e.has(a)||a.__count++;e.add(a)}):(d.set(b,
-new Set(c)),c.forEach(function(a){a.__count++}));d=Bf.current;if(null!==d)d.onWorkScheduled(c,1E3*b+a.interactionThreadID)}}function Sa(a,b){ui(a,b,ka.current)}function mi(a,b){var c=new Set;a.pendingInteractionMap.forEach(function(a,d){0!==(b&d)&&a.forEach(function(a){return c.add(a)})});a.memoizedInteractions=c;if(0<c.size){var d=Bf.current;if(null!==d){a=1E3*b+a.interactionThreadID;try{d.onWorkStarted(c,a)}catch(e){Ia(99,function(){throw e;})}}}}function vi(a,b){var c=a.pendingLanes;try{var d=
-Bf.current;if(null!==d&&0<a.memoizedInteractions.size)d.onWorkStopped(a.memoizedInteractions,1E3*b+a.interactionThreadID)}catch(f){Ia(99,function(){throw f;})}finally{var e=a.pendingInteractionMap;e.forEach(function(a,b){0===(c&b)&&(e.delete(b),a.forEach(function(a){a.__count--;if(null!==d&&0===a.__count)try{d.onInteractionScheduledWorkCompleted(a)}catch(k){Ia(99,function(){throw k;})}}))})}}function mk(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=
-null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.flags=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childLanes=this.lanes=0;this.alternate=null;this.actualDuration=0;this.actualStartTime=-1;this.treeBaseDuration=this.selfBaseDuration=0}function $e(a){a=a.prototype;return!(!a||!a.isReactComponent)}function nk(a){if("function"===typeof a)return $e(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;
-if(a===Jc)return 11;if(a===Kc)return 14}return 2}function Na(a,b){var c=a.alternate;null===c?(c=ba(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null,c.actualDuration=0,c.actualStartTime=-1);c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;
-b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;c.selfBaseDuration=a.selfBaseDuration;c.treeBaseDuration=a.treeBaseDuration;return c}function ld(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)$e(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case xa:return Fb(c.children,e,f,b);case xi:g=8;e|=16;break;case Qd:g=8;e|=1;break;case Rb:return a=ba(12,c,b,e|8),a.elementType=Rb,a.type=Rb,a.lanes=f,a.stateNode=
-{effectDuration:0,passiveEffectDuration:0},a;case Sb:return a=ba(13,c,b,e),a.type=Sb,a.elementType=Sb,a.lanes=f,a;case Ic:return a=ba(19,c,b,e),a.elementType=Ic,a.lanes=f,a;case Cf:return df(c,e,f,b);case Df:return a=ba(24,c,b,e),a.elementType=Df,a.lanes=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Sd:g=10;break a;case Rd:g=9;break a;case Jc:g=11;break a;case Kc:g=14;break a;case Ud:g=16;d=null;break a;case Td:g=22;break a}throw Error(m(130,null==a?a:typeof a,""));}b=ba(g,
-c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Fb(a,b,c,d){a=ba(7,a,d,b);a.lanes=c;return a}function df(a,b,c,d){a=ba(23,a,d,b);a.elementType=Cf;a.lanes=c;return a}function Me(a,b,c){a=ba(6,a,null,b);a.lanes=c;return a}function Ne(a,b,c){b=ba(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function ok(a,b,c){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=
-this.pendingChildren=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=0;this.eventTimes=pe(0);this.expirationTimes=pe(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=pe(0);this.mutableSourceEagerHydrationData=null;this.interactionThreadID=pk();this.memoizedInteractions=new Set;this.pendingInteractionMap=new Map}function qk(a,
-b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Wa,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function Hd(a,b,c,d){var e=b.current,f=X(),g=Pa(e);a:if(c){c=c._reactInternals;b:{if(Xa(c)!==c||1!==c.tag)throw Error(m(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(T(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(m(171));}if(1===c.tag){var k=c.type;
-if(T(k)){c=fh(c,k,h);break a}}c=h}else c=Ha;null===b.context?b.context=c:b.pendingContext=c;b=Ja(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);Ka(e,b);Qa(e,g,f);return g}function Ef(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function yi(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function Ff(a,b){yi(a,b);(a=a.alternate)&&yi(a,b)}function rk(a){a=
-hg(a);return null===a?null:a.stateNode}function sk(a){return null}function Gf(a,b,c){var d=null!=c&&null!=c.hydrationOptions&&c.hydrationOptions.mutableSources||null;c=new ok(a,b,null!=c&&!0===c.hydrate);b=2===b?7:1===b?3:0;tk&&(b|=8);b=ba(3,null,null,b);c.current=b;b.stateNode=c;Ke(b);a[xb]=c.current;Pg(8===a.nodeType?a.parentNode:a);if(d)for(a=0;a<d.length;a++){b=d[a];var e=b._getVersion;e=e(b._source);null==c.mutableSourceEagerHydrationData?c.mutableSourceEagerHydrationData=[b,e]:c.mutableSourceEagerHydrationData.push(b,
-e)}this._internalRoot=c}function Bc(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function uk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new Gf(a,0,b?{hydrate:!0}:void 0)}function Id(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;
-e=function(){var a=Ef(g);h.call(a)}}Hd(b,g,a,e)}else{f=c._reactRootContainer=uk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=Ef(g);k.call(a)}}qi(function(){Hd(b,g,a,e)})}return Ef(g)}function zi(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Bc(b))throw Error(m(200));return qk(a,b,null,c)}if(!fa)throw Error(m(227));var Mf=new Set,Ob={},ra=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),
-Ei=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Nf=Object.prototype.hasOwnProperty,Pf={},Of={},J={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){J[a]=
-new R(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];J[b]=new R(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){J[a]=new R(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){J[a]=new R(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){J[a]=
-new R(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){J[a]=new R(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){J[a]=new R(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){J[a]=new R(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){J[a]=new R(a,5,!1,a.toLowerCase(),null,!1,!1)});var Hf=/[\-:]([a-z])/g,If=function(a){return a[1].toUpperCase()};"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".split(" ").forEach(function(a){var b=
-a.replace(Hf,If);J[b]=new R(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Hf,If);J[b]=new R(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Hf,If);J[b]=new R(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){J[a]=new R(a,1,!1,a.toLowerCase(),null,!1,!1)});J.xlinkHref=new R("xlinkHref",
-1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){J[a]=new R(a,1,!1,a.toLowerCase(),null,!0,!0)});var C=fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.assign,lb=fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,jc=60103,Wa=60106,xa=60107,Qd=60108,Rb=60114,Sd=60109,Rd=60110,Jc=60112,Sb=60113,Ic=60120,Kc=60115,Ud=60116,Td=60121,De=60128,xi=60129,Cf=60130,Df=60131;if("function"===typeof Symbol&&Symbol.for){var E=Symbol.for;jc=
-E("react.element");Wa=E("react.portal");xa=E("react.fragment");Qd=E("react.strict_mode");Rb=E("react.profiler");Sd=E("react.provider");Rd=E("react.context");Jc=E("react.forward_ref");Sb=E("react.suspense");Ic=E("react.suspense_list");Kc=E("react.memo");Ud=E("react.lazy");Td=E("react.block");E("react.scope");De=E("react.opaque.id");xi=E("react.debug_trace_mode");Cf=E("react.offscreen");Df=E("react.legacy_hidden")}var Qf="function"===typeof Symbol&&Symbol.iterator,Od,Pd=!1,Jd,Zh=function(a){return"undefined"!==
-typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Jd=Jd||document.createElement("div");Jd.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Jd.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),vc=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=
-b;return}}a.textContent=b},Tb={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,
-zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vk=["Webkit","ms","Moz","O"];Object.keys(Tb).forEach(function(a){vk.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Tb[b]=Tb[a]})});var Ki=C({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),de=null,pb=null,qb=null,ve=function(a,b){return a(b)},sg=function(a,
-b,c,d,e){return a(b,c,d,e)},fe=function(){},eg=ve,Za=!1,ge=!1,ze=!1;if(ra)try{var Cc={};Object.defineProperty(Cc,"passive",{get:function(){ze=!0}});window.addEventListener("test",Cc,Cc);window.removeEventListener("test",Cc,Cc)}catch(a){ze=!1}var Ni=function(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(Z){this.onError(Z)}},Wb=!1,Oc=null,Pc=!1,he=null,Oi={onError:function(a){Wb=!0;Oc=a}},ea=fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,wk=
-ea.unstable_cancelCallback,Dc=ea.unstable_now,mg=ea.unstable_scheduleCallback,xk=ea.unstable_shouldYield,Ai=ea.unstable_requestPaint,je=ea.unstable_runWithPriority,yk=ea.unstable_getCurrentPriorityLevel,zk=ea.unstable_ImmediatePriority,Bi=ea.unstable_UserBlockingPriority,ng=ea.unstable_NormalPriority,Ak=ea.unstable_LowPriority,Bk=ea.unstable_IdlePriority,le=!1,la=[],za=null,Aa=null,Ba=null,Xb=new Map,Yb=new Map,ac=[],tg="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "),
-rb={animationend:Rc("Animation","AnimationEnd"),animationiteration:Rc("Animation","AnimationIteration"),animationstart:Rc("Animation","AnimationStart"),transitionend:Rc("Transition","TransitionEnd")},me={},pg={};ra&&(pg=document.createElement("div").style,"AnimationEvent"in window||(delete rb.animationend.animation,delete rb.animationiteration.animation,delete rb.animationstart.animation),"TransitionEvent"in window||delete rb.transitionend.transition);var Ug=Sc("animationend"),Vg=Sc("animationiteration"),
-Wg=Sc("animationstart"),Xg=Sc("transitionend"),qg=new Map,oe=new Map,Ck=["abort","abort",Ug,"animationEnd",Vg,"animationIteration",Wg,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing",
-"playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Xg,"transitionEnd","waiting","waiting"],Kd=fa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing,ka=Kd.__interactionsRef,Bf=Kd.__subscriberRef,pk=Kd.unstable_getThreadID,Xj=Kd.unstable_wrap;if(null==ka||null==ka.current)throw Error(m(302));Dc();var v=8,Ca=Math.clz32?Math.clz32:Zi,$i=Math.log,aj=Math.LN2,ej=Bi,dj=je,Vc=!0,Da=null,re=null,Wc=null,Nb={eventPhase:0,bubbles:0,
-cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ue=W(Nb),Ec=C({},Nb,{view:0,detail:0}),zj=W(Ec),Jf,Kf,Fc,Ld=C({},Ec,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:se,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==Fc&&
-(Fc&&"mousemove"===a.type?(Jf=a.screenX-Fc.screenX,Kf=a.screenY-Fc.screenY):Kf=Jf=0,Fc=a);return Jf},movementY:function(a){return"movementY"in a?a.movementY:Kf}}),Tg=W(Ld),Dk=C({},Ld,{dataTransfer:0}),vj=W(Dk),Ek=C({},Ec,{relatedTarget:0}),Ae=W(Ek),Fk=C({},Nb,{animationName:0,elapsedTime:0,pseudoElement:0}),xj=W(Fk),Gk=C({},Nb,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Bj=W(Gk),Hk=C({},Nb,{data:0}),ah=W(Hk),Ej=ah,Ik={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",
-Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jk={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",
-122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},gj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},Kk=C({},Ec,{key:function(a){if(a.key){var b=Ik[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=Xc(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?Jk[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:se,charCode:function(a){return"keypress"===
-a.type?Xc(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?Xc(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),uj=W(Kk),Lk=C({},Ld,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Yg=W(Lk),Mk=C({},Ec,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:se}),wj=W(Mk),Nk=C({},Nb,{propertyName:0,elapsedTime:0,
-pseudoElement:0}),yj=W(Nk),Ok=C({},Ld,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),Aj=W(Ok),hj=[9,13,27,32],te=ra&&"CompositionEvent"in window,Gc=null;ra&&"documentMode"in document&&(Gc=document.documentMode);var Dj=ra&&"TextEvent"in window&&!Gc,Bg=ra&&(!te||Gc&&8<Gc&&11>=Gc),Ag=String.fromCharCode(32),zg=!1,ub=!1,kj={color:!0,
-date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},cc=null,dc=null,$g=!1;ra&&($g=lj("input")&&(!document.documentMode||9<document.documentMode));var Y="function"===typeof Object.is?Object.is:sj,tj=Object.prototype.hasOwnProperty,Cj=ra&&"documentMode"in document&&11>=document.documentMode,wb=null,ye=null,fc=null,xe=!1;ne("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),
-0);ne("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ne(Ck,2);(function(a,b){for(var c=0;c<a.length;c++)oe.set(a[c],b)})("change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),0);mb("onMouseEnter",["mouseout","mouseover"]);
-mb("onMouseLeave",["mouseout","mouseover"]);mb("onPointerEnter",["pointerout","pointerover"]);mb("onPointerLeave",["pointerout","pointerover"]);Va("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Va("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Va("onBeforeInput",["compositionend","keypress","textInput","paste"]);Va("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));
-Va("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Va("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var uc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Rg=new Set("cancel close invalid load scroll toggle".split(" ").concat(uc)),
-Qg="_reactListening"+Math.random().toString(36).slice(2),wf=null,xf=null,oi="function"===typeof setTimeout?setTimeout:void 0,dk="function"===typeof clearTimeout?clearTimeout:void 0,Lf=0,Md=Math.random().toString(36).slice(2),Fa="__reactFiber$"+Md,bd="__reactProps$"+Md,xb="__reactContainer$"+Md,dh="__reactEvents$"+Md,Ee=[],Ab=-1,Ha={},D=Ga(Ha),K=Ga(!1),$a=Ha,lf=null,ib=null,tk="undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__,Hj=je,Fe=mg,Ge=wk,Gj=yk,dd=zk,hh=Bi,ih=ng,jh=Ak,kh=Bk;if(null==ka||null==
-ka.current)throw Error(m(302));var tf={},hk=xk,kk=void 0!==Ai?Ai:function(){},sa=null,ed=null,He=!1,Ci=Dc(),Q=1E4>Ci?Dc:function(){return Dc()-Ci},Zj=lb.ReactCurrentBatchConfig,hd=Ga(null),gd=null,Db=null,fd=null,La=!1,uh=(new fa.Component).refs,jd={isMounted:function(a){return(a=a._reactInternals)?Xa(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=X(),e=Pa(a),f=Ja(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ka(a,f);Qa(a,e,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternals;
-var d=X(),e=Pa(a),f=Ja(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);Ka(a,f);Qa(a,e,d)},enqueueForceUpdate:function(a,b){a=a._reactInternals;var c=X(),d=Pa(a),e=Ja(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);Ka(a,e);Qa(a,d,c)}},md=Array.isArray,vd=vh(!0),Kh=vh(!1),kc={},na=Ga(kc),mc=Ga(kc),lc=Ga(kc),G=Ga(0),ta=null,Oa=null,oa=!1,Hb=[],oc=lb.ReactCurrentDispatcher,ca=lb.ReactCurrentBatchConfig,nc=0,F=null,O=null,L=null,qd=!1,pc=!1,pd={readContext:aa,useCallback:U,useContext:U,
-useEffect:U,useImperativeHandle:U,useLayoutEffect:U,useMemo:U,useReducer:U,useRef:U,useState:U,useDebugValue:U,useDeferredValue:U,useTransition:U,useMutableSource:U,useOpaqueIdentifier:U,unstable_isNewReconciler:!1},Jj={readContext:aa,useCallback:function(a,b){db().memoizedState=[a,void 0===b?null:b];return a},useContext:aa,useEffect:Eh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return We(4,2,Gh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return We(4,2,a,b)},
-useMemo:function(a,b){var c=db();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=db();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={pending:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Ve.bind(null,F,a);return[d.memoizedState,a]},useRef:Dh,useState:sc,useDebugValue:Ye,useDeferredValue:function(a){var b=sc(a),c=b[0],d=b[1];Eh(function(){var b=ca.transition;ca.transition=1;try{d(a)}finally{ca.transition=b}},[a]);
-return c},useTransition:function(){var a=sc(!1),b=a[0];a=Mj.bind(null,a[1]);Dh(a);return[a,b]},useMutableSource:function(a,b,c){var d=db();d.memoizedState={refs:{getSnapshot:b,setSnapshot:null},source:a,subscribe:c};return Bh(d,a,b,c)},useOpaqueIdentifier:function(){if(oa){var a=!1,b=Fj(function(){a||(a=!0,c("r:"+(Lf++).toString(36)));throw Error(m(355));}),c=sc(b)[1];0===(F.mode&2)&&(F.flags|=516,rd(5,function(){c("r:"+(Lf++).toString(36))},void 0,null));return b}b="r:"+(Lf++).toString(36);sc(b);
-return b},unstable_isNewReconciler:!1},Kj={readContext:aa,useCallback:Ih,useContext:aa,useEffect:td,useImperativeHandle:Hh,useLayoutEffect:Fh,useMemo:Jh,useReducer:qc,useRef:sd,useState:function(a){return qc(pa)},useDebugValue:Ye,useDeferredValue:function(a){var b=qc(pa),c=b[0],d=b[1];td(function(){var b=ca.transition;ca.transition=1;try{d(a)}finally{ca.transition=b}},[a]);return c},useTransition:function(){var a=qc(pa)[0];return[sd().current,a]},useMutableSource:Ch,useOpaqueIdentifier:function(){return qc(pa)[0]},
-unstable_isNewReconciler:!1},Lj={readContext:aa,useCallback:Ih,useContext:aa,useEffect:td,useImperativeHandle:Hh,useLayoutEffect:Fh,useMemo:Jh,useReducer:rc,useRef:sd,useState:function(a){return rc(pa)},useDebugValue:Ye,useDeferredValue:function(a){var b=rc(pa),c=b[0],d=b[1];td(function(){var b=ca.transition;ca.transition=1;try{d(a)}finally{ca.transition=b}},[a]);return c},useTransition:function(){var a=rc(pa)[0];return[sd().current,a]},useMutableSource:Ch,useOpaqueIdentifier:function(){return rc(pa)[0]},
-unstable_isNewReconciler:!1},gb=Dc,kf=0,fb=-1,Nj=lb.ReactCurrentOwner,ia=!1,yd={dehydrated:null,retryLane:0};var Pj=function(a,b,c,d){for(c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};var Yh=function(a){};var Oj=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){a=b.stateNode;
-cb(na.current);e=null;switch(c){case "input":f=Vd(a,f);d=Vd(a,d);e=[];break;case "option":f=Yd(a,f);d=Yd(a,d);e=[];break;case "select":f=C({},f,{value:void 0});d=C({},d,{value:void 0});e=[];break;case "textarea":f=Zd(a,f);d=Zd(a,d);e=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(a.onclick=ad)}ae(c,d);var g;c=null;for(l in f)if(!d.hasOwnProperty(l)&&f.hasOwnProperty(l)&&null!=f[l])if("style"===l){var h=f[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==
-l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(Ob.hasOwnProperty(l)?e||(e=[]):(e=e||[]).push(l,null));for(l in d){var k=d[l];h=null!=f?f[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||(c={}),c[g]=k[g])}else c||(e||(e=[]),e.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:
-void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(e=e||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(e=e||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(Ob.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&z("scroll",a),e||h===k||(e=[])):"object"===typeof k&&null!==k&&k.$$typeof===De?k.toString():(e=e||[]).push(l,k))}c&&(e=e||[]).push("style",c);var l=e;if(b.updateQueue=l)b.flags|=4}};var Qj=function(a,b,c,d){c!==d&&(b.flags|=4)};var ek="function"===
-typeof WeakMap?WeakMap:Map,Vj="function"===typeof WeakSet?WeakSet:Set,bk=Math.ceil,Ed=lb.ReactCurrentDispatcher,vf=lb.ReactCurrentOwner,n=0,S=null,I=null,P=0,ja=0,hb=Ga(0),M=0,Fd=null,Lb=0,Ma=0,Ib=0,uf=0,qf=null,pf=0,ff=Infinity,l=null,zd=!1,jf=null,qa=null,Ua=!1,yc=null,Ac=90,yf=0,zf=[],Af=[],wa=null,wc=0,rf=null,kb=null,Ad=-1,va=0,Bd=0,zc=null,Gd=!1;var ti=function(a,b,c){var d=b.lanes;if(null!==a)if(a.memoizedProps!==b.pendingProps||K.current)ia=!0;else if(0!==(c&d))ia=0!==(a.flags&16384)?!0:!1;
-else{ia=!1;switch(b.tag){case 3:Qh(b);Re();break;case 5:wh(b);break;case 1:T(b.type)&&cd(b);break;case 4:Oe(b,b.stateNode.containerInfo);break;case 10:d=b.memoizedProps.value;var e=b.type._context;B(hd,e._currentValue);e._currentValue=d;break;case 12:0!==(c&b.childLanes)&&(b.flags|=4);d=b.stateNode;d.effectDuration=0;d.passiveEffectDuration=0;break;case 13:if(null!==b.memoizedState){if(0!==(c&b.child.childLanes))return Rh(a,b,c);B(G,G.current&1);b=ua(a,b,c);return null!==b?b.sibling:null}B(G,G.current&
-1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&64)){if(d)return Wh(a,b,c);b.flags|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);B(G,G.current);if(d)break;else return null;case 23:case 24:return b.lanes=0,bf(a,b,c)}return ua(a,b,c)}else ia=!1;b.lanes=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;e=Bb(b,D.current);Eb(b,c);e=Ue(null,b,d,a,e,c);b.flags|=1;if("object"===typeof e&&null!==e&&"function"===
-typeof e.render&&void 0===e.$$typeof){b.tag=1;b.memoizedState=null;b.updateQueue=null;if(T(d)){var f=!0;cd(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;Ke(b);var g=d.getDerivedStateFromProps;"function"===typeof g&&id(b,d,g,a);e.updater=jd;b.stateNode=e;e._reactInternals=b;Le(b,d,a,c);b=cf(null,b,d,!0,f,c)}else b.tag=0,V(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;a:{null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2);a=b.pendingProps;f=e._init;e=f(e._payload);
-b.type=e;f=b.tag=nk(e);a=ha(e,a);switch(f){case 0:b=af(null,b,e,a,c);break a;case 1:b=Ph(null,b,e,a,c);break a;case 11:b=Lh(null,b,e,a,c);break a;case 14:b=Mh(null,b,e,ha(e.type,a),d,c);break a}throw Error(m(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ha(d,e),af(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ha(d,e),Ph(a,b,d,e,c);case 3:Qh(b);d=b.updateQueue;if(null===a||null===d)throw Error(m(282));d=b.pendingProps;e=b.memoizedState;
-e=null!==e?e.element:null;oh(a,b);hc(b,d,null,c);d=b.memoizedState.element;if(d===e)Re(),b=ua(a,b,c);else{e=b.stateNode;if(f=e.hydrate)Oa=zb(b.stateNode.containerInfo.firstChild),ta=b,f=oa=!0;if(f){a=e.mutableSourceEagerHydrationData;if(null!=a)for(e=0;e<a.length;e+=2)f=a[e],f._workInProgressVersionPrimary=a[e+1],Hb.push(f);c=Kh(b,null,d,c);for(b.child=c;c;)c.flags=c.flags&-3|1024,c=c.sibling}else V(a,b,d,c),Re();b=b.child}return b;case 5:return wh(b),null===a&&Qe(b),d=b.type,e=b.pendingProps,f=null!==
-a?a.memoizedProps:null,g=e.children,Be(d,e)?g=null:null!==f&&Be(d,f)&&(b.flags|=16),Oh(a,b),V(a,b,g,c),b.child;case 6:return null===a&&Qe(b),null;case 13:return Rh(a,b,c);case 4:return Oe(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=vd(b,null,d,c):V(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ha(d,e),Lh(a,b,d,e,c);case 7:return V(a,b,b.pendingProps,c),b.child;case 8:return V(a,b,b.pendingProps.children,c),b.child;case 12:return b.flags|=4,d=b.stateNode,
-d.effectDuration=0,d.passiveEffectDuration=0,V(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;g=b.memoizedProps;f=e.value;var h=b.type._context;B(hd,h._currentValue);h._currentValue=f;if(null!==g)if(h=g.value,f=Y(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0,0===f){if(g.children===e.children&&!K.current){b=ua(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=
-h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Ja(-1,c&-c),l.tag=2,Ka(h,l));h.lanes|=c;l=h.alternate;null!==l&&(l.lanes|=c);nh(h.return,c);k.lanes|=c;break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}V(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,
-Eb(b,c),e=aa(e,f.unstable_observedBits),d=d(e),b.flags|=1,V(a,b,d,c),b.child;case 14:return e=b.type,f=ha(e,b.pendingProps),f=ha(e.type,f),Mh(a,b,e,f,d,c);case 15:return Nh(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ha(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2),b.tag=1,T(d)?(a=!0,cd(b)):a=!1,Eb(b,c),sh(b,d,e),Le(b,d,e,c),cf(null,b,d,!0,a,c);case 19:return Wh(a,b,c);case 23:return bf(a,b,c);case 24:return bf(a,b,c)}throw Error(m(156,
-b.tag));};var ba=function(a,b,c,d){return new mk(a,b,c,d)};Gf.prototype.render=function(a){Hd(a,this._internalRoot,null,null)};Gf.prototype.unmount=function(){var a=this._internalRoot,b=a.containerInfo;Hd(null,a,null,function(){b[xb]=null})};var Wi=function(a){if(13===a.tag){var b=X();Qa(a,4,b);Ff(a,4)}};var kg=function(a){if(13===a.tag){var b=X();Qa(a,67108864,b);Ff(a,67108864)}};var Ui=function(a){if(13===a.tag){var b=X(),c=Pa(a);Qa(a,c,b);Ff(a,c)}};var Ti=function(a,b){return b()};de=function(a,
-b,c){switch(b){case "input":Wd(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Nc(d);if(!e)throw Error(m(90));Sf(d);Wd(d,e)}}}break;case "textarea":Xf(a,c);break;case "select":b=c.value,null!=b&&ob(a,!!c.multiple,b,!1)}};(function(a,b,c,d){ve=a;sg=b;fe=c;eg=d})(pi,function(a,b,c,d,e){var f=n;n|=4;try{return ab(98,a.bind(null,
-b,c,d,e))}finally{n=f,0===n&&(Kb(),ma())}},function(){0===(n&49)&&(ck(),Ta())},function(a,b){var c=n;n|=2;try{return a(b)}finally{n=c,0===n&&(Kb(),ma())}});var Pk={Events:[Ub,vb,Nc,cg,dg,Ta,{current:!1}]};(function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,
-setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:lb.ReactCurrentDispatcher,findHostInstanceByFiber:rk,findFiberByHostInstance:a.findFiberByHostInstance||sk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!b.isDisabled&&b.supportsFiber)try{lf=b.inject(a),ib=b}catch(c){}a=!0}return a})({findFiberByHostInstance:Ya,
-bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"});N.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Pk;N.createPortal=zi;N.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(m(188));throw Error(m(268,Object.keys(a)));}a=hg(b);a=null===a?null:a.stateNode;return a};N.flushSync=function(a,b){var c=n;if(0!==(c&48))return a(b);n|=1;try{if(a)return ab(99,a.bind(null,b))}finally{n=
-c,ma()}};N.hydrate=function(a,b,c){if(!Bc(b))throw Error(m(200));return Id(null,a,b,!0,c)};N.render=function(a,b,c){if(!Bc(b))throw Error(m(200));return Id(null,a,b,!1,c)};N.unmountComponentAtNode=function(a){if(!Bc(a))throw Error(m(40));return a._reactRootContainer?(qi(function(){Id(null,null,a,!1,function(){a._reactRootContainer=null;a[xb]=null})}),!0):!1};N.unstable_batchedUpdates=pi;N.unstable_createPortal=function(a,b){return zi(a,b,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)};
-N.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Bc(c))throw Error(m(200));if(null==a||void 0===a._reactInternals)throw Error(m(38));return Id(a,b,c,!1,d)};N.version="17.0.2"});
-})();
diff --git a/node_modules/react-is/LICENSE b/node_modules/react-is/LICENSE
deleted file mode 100644
index b96dcb0..0000000
--- a/node_modules/react-is/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) Facebook, Inc. and its affiliates.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/react-is/README.md b/node_modules/react-is/README.md
deleted file mode 100644
index d255977..0000000
--- a/node_modules/react-is/README.md
+++ /dev/null
@@ -1,104 +0,0 @@
-# `react-is`
-
-This package allows you to test arbitrary values and see if they're a particular React element type.
-
-## Installation
-
-```sh
-# Yarn
-yarn add react-is
-
-# NPM
-npm install react-is
-```
-
-## Usage
-
-### Determining if a Component is Valid
-
-```js
-import React from "react";
-import * as ReactIs from "react-is";
-
-class ClassComponent extends React.Component {
- render() {
- return React.createElement("div");
- }
-}
-
-const FunctionComponent = () => React.createElement("div");
-
-const ForwardRefComponent = React.forwardRef((props, ref) =>
- React.createElement(Component, { forwardedRef: ref, ...props })
-);
-
-const Context = React.createContext(false);
-
-ReactIs.isValidElementType("div"); // true
-ReactIs.isValidElementType(ClassComponent); // true
-ReactIs.isValidElementType(FunctionComponent); // true
-ReactIs.isValidElementType(ForwardRefComponent); // true
-ReactIs.isValidElementType(Context.Provider); // true
-ReactIs.isValidElementType(Context.Consumer); // true
-ReactIs.isValidElementType(React.createFactory("div")); // true
-```
-
-### Determining an Element's Type
-
-#### Context
-
-```js
-import React from "react";
-import * as ReactIs from 'react-is';
-
-const ThemeContext = React.createContext("blue");
-
-ReactIs.isContextConsumer(<ThemeContext.Consumer />); // true
-ReactIs.isContextProvider(<ThemeContext.Provider />); // true
-ReactIs.typeOf(<ThemeContext.Provider />) === ReactIs.ContextProvider; // true
-ReactIs.typeOf(<ThemeContext.Consumer />) === ReactIs.ContextConsumer; // true
-```
-
-#### Element
-
-```js
-import React from "react";
-import * as ReactIs from 'react-is';
-
-ReactIs.isElement(<div />); // true
-ReactIs.typeOf(<div />) === ReactIs.Element; // true
-```
-
-#### Fragment
-
-```js
-import React from "react";
-import * as ReactIs from 'react-is';
-
-ReactIs.isFragment(<></>); // true
-ReactIs.typeOf(<></>) === ReactIs.Fragment; // true
-```
-
-#### Portal
-
-```js
-import React from "react";
-import ReactDOM from "react-dom";
-import * as ReactIs from 'react-is';
-
-const div = document.createElement("div");
-const portal = ReactDOM.createPortal(<div />, div);
-
-ReactIs.isPortal(portal); // true
-ReactIs.typeOf(portal) === ReactIs.Portal; // true
-```
-
-#### StrictMode
-
-```js
-import React from "react";
-import * as ReactIs from 'react-is';
-
-ReactIs.isStrictMode(<React.StrictMode />); // true
-ReactIs.typeOf(<React.StrictMode />) === ReactIs.StrictMode; // true
-```
diff --git a/node_modules/react-is/build-info.json b/node_modules/react-is/build-info.json
deleted file mode 100644
index db5dbe5..0000000
--- a/node_modules/react-is/build-info.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "branch": "pull/21051",
- "buildNumber": "287151",
- "checksum": "94f5c65",
- "commit": "12adaffef",
- "environment": "ci",
- "reactVersion": "17.0.0-12adaffef"
-}
diff --git a/node_modules/react-is/cjs/react-is.development.js b/node_modules/react-is/cjs/react-is.development.js
deleted file mode 100644
index b2e388e..0000000
--- a/node_modules/react-is/cjs/react-is.development.js
+++ /dev/null
@@ -1,226 +0,0 @@
-/** @license React v17.0.2
- * react-is.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-// ATTENTION
-// When adding new symbols to this file,
-// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var REACT_ELEMENT_TYPE = 0xeac7;
-var REACT_PORTAL_TYPE = 0xeaca;
-var REACT_FRAGMENT_TYPE = 0xeacb;
-var REACT_STRICT_MODE_TYPE = 0xeacc;
-var REACT_PROFILER_TYPE = 0xead2;
-var REACT_PROVIDER_TYPE = 0xeacd;
-var REACT_CONTEXT_TYPE = 0xeace;
-var REACT_FORWARD_REF_TYPE = 0xead0;
-var REACT_SUSPENSE_TYPE = 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = 0xead8;
-var REACT_MEMO_TYPE = 0xead3;
-var REACT_LAZY_TYPE = 0xead4;
-var REACT_BLOCK_TYPE = 0xead9;
-var REACT_SERVER_BLOCK_TYPE = 0xeada;
-var REACT_FUNDAMENTAL_TYPE = 0xead5;
-var REACT_SCOPE_TYPE = 0xead7;
-var REACT_OPAQUE_ID_TYPE = 0xeae0;
-var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
-var REACT_OFFSCREEN_TYPE = 0xeae2;
-var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
-}
-
-// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
-var enableScopeAPI = false; // Experimental Create Event Handle API.
-
-function isValidElementType(type) {
- if (typeof type === 'string' || typeof type === 'function') {
- return true;
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
-
-
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
- return true;
- }
-
- if (typeof type === 'object' && type !== null) {
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
- return true;
- }
- }
-
- return false;
-}
-
-function typeOf(object) {
- if (typeof object === 'object' && object !== null) {
- var $$typeof = object.$$typeof;
-
- switch ($$typeof) {
- case REACT_ELEMENT_TYPE:
- var type = object.type;
-
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_SUSPENSE_TYPE:
- case REACT_SUSPENSE_LIST_TYPE:
- return type;
-
- default:
- var $$typeofType = type && type.$$typeof;
-
- switch ($$typeofType) {
- case REACT_CONTEXT_TYPE:
- case REACT_FORWARD_REF_TYPE:
- case REACT_LAZY_TYPE:
- case REACT_MEMO_TYPE:
- case REACT_PROVIDER_TYPE:
- return $$typeofType;
-
- default:
- return $$typeof;
- }
-
- }
-
- case REACT_PORTAL_TYPE:
- return $$typeof;
- }
- }
-
- return undefined;
-}
-var ContextConsumer = REACT_CONTEXT_TYPE;
-var ContextProvider = REACT_PROVIDER_TYPE;
-var Element = REACT_ELEMENT_TYPE;
-var ForwardRef = REACT_FORWARD_REF_TYPE;
-var Fragment = REACT_FRAGMENT_TYPE;
-var Lazy = REACT_LAZY_TYPE;
-var Memo = REACT_MEMO_TYPE;
-var Portal = REACT_PORTAL_TYPE;
-var Profiler = REACT_PROFILER_TYPE;
-var StrictMode = REACT_STRICT_MODE_TYPE;
-var Suspense = REACT_SUSPENSE_TYPE;
-var hasWarnedAboutDeprecatedIsAsyncMode = false;
-var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
-
-function isAsyncMode(object) {
- {
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
-
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
- }
- }
-
- return false;
-}
-function isConcurrentMode(object) {
- {
- if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
- hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
-
- console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
- }
- }
-
- return false;
-}
-function isContextConsumer(object) {
- return typeOf(object) === REACT_CONTEXT_TYPE;
-}
-function isContextProvider(object) {
- return typeOf(object) === REACT_PROVIDER_TYPE;
-}
-function isElement(object) {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
-}
-function isForwardRef(object) {
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
-}
-function isFragment(object) {
- return typeOf(object) === REACT_FRAGMENT_TYPE;
-}
-function isLazy(object) {
- return typeOf(object) === REACT_LAZY_TYPE;
-}
-function isMemo(object) {
- return typeOf(object) === REACT_MEMO_TYPE;
-}
-function isPortal(object) {
- return typeOf(object) === REACT_PORTAL_TYPE;
-}
-function isProfiler(object) {
- return typeOf(object) === REACT_PROFILER_TYPE;
-}
-function isStrictMode(object) {
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
-}
-function isSuspense(object) {
- return typeOf(object) === REACT_SUSPENSE_TYPE;
-}
-
-exports.ContextConsumer = ContextConsumer;
-exports.ContextProvider = ContextProvider;
-exports.Element = Element;
-exports.ForwardRef = ForwardRef;
-exports.Fragment = Fragment;
-exports.Lazy = Lazy;
-exports.Memo = Memo;
-exports.Portal = Portal;
-exports.Profiler = Profiler;
-exports.StrictMode = StrictMode;
-exports.Suspense = Suspense;
-exports.isAsyncMode = isAsyncMode;
-exports.isConcurrentMode = isConcurrentMode;
-exports.isContextConsumer = isContextConsumer;
-exports.isContextProvider = isContextProvider;
-exports.isElement = isElement;
-exports.isForwardRef = isForwardRef;
-exports.isFragment = isFragment;
-exports.isLazy = isLazy;
-exports.isMemo = isMemo;
-exports.isPortal = isPortal;
-exports.isProfiler = isProfiler;
-exports.isStrictMode = isStrictMode;
-exports.isSuspense = isSuspense;
-exports.isValidElementType = isValidElementType;
-exports.typeOf = typeOf;
- })();
-}
diff --git a/node_modules/react-is/cjs/react-is.production.min.js b/node_modules/react-is/cjs/react-is.production.min.js
deleted file mode 100644
index b416090..0000000
--- a/node_modules/react-is/cjs/react-is.production.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/** @license React v17.0.2
- * react-is.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
-if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden")}
-function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;
-exports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};
-exports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
-exports.typeOf=y;
diff --git a/node_modules/react-is/index.js b/node_modules/react-is/index.js
deleted file mode 100644
index 3ae098d..0000000
--- a/node_modules/react-is/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-is.production.min.js');
-} else {
- module.exports = require('./cjs/react-is.development.js');
-}
diff --git a/node_modules/react-is/package.json b/node_modules/react-is/package.json
deleted file mode 100644
index 1a6567d..0000000
--- a/node_modules/react-is/package.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "name": "react-is",
- "version": "17.0.2",
- "description": "Brand checking of React Elements.",
- "main": "index.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/facebook/react.git",
- "directory": "packages/react-is"
- },
- "keywords": [
- "react"
- ],
- "license": "MIT",
- "bugs": {
- "url": "https://github.com/facebook/react/issues"
- },
- "homepage": "https://reactjs.org/",
- "files": [
- "LICENSE",
- "README.md",
- "build-info.json",
- "index.js",
- "cjs/",
- "umd/"
- ]
-}
diff --git a/node_modules/react-is/umd/react-is.development.js b/node_modules/react-is/umd/react-is.development.js
deleted file mode 100644
index cc44c5b..0000000
--- a/node_modules/react-is/umd/react-is.development.js
+++ /dev/null
@@ -1,225 +0,0 @@
-/** @license React v17.0.2
- * react-is.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (global = global || self, factory(global.ReactIs = {}));
-}(this, (function (exports) { 'use strict';
-
- // ATTENTION
- // When adding new symbols to this file,
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var REACT_ELEMENT_TYPE = 0xeac7;
- var REACT_PORTAL_TYPE = 0xeaca;
- var REACT_FRAGMENT_TYPE = 0xeacb;
- var REACT_STRICT_MODE_TYPE = 0xeacc;
- var REACT_PROFILER_TYPE = 0xead2;
- var REACT_PROVIDER_TYPE = 0xeacd;
- var REACT_CONTEXT_TYPE = 0xeace;
- var REACT_FORWARD_REF_TYPE = 0xead0;
- var REACT_SUSPENSE_TYPE = 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
- var REACT_MEMO_TYPE = 0xead3;
- var REACT_LAZY_TYPE = 0xead4;
- var REACT_BLOCK_TYPE = 0xead9;
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
- var REACT_SCOPE_TYPE = 0xead7;
- var REACT_OPAQUE_ID_TYPE = 0xeae0;
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
- var REACT_OFFSCREEN_TYPE = 0xeae2;
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
- if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- REACT_FRAGMENT_TYPE = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
- }
-
- // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
- var enableScopeAPI = false; // Experimental Create Event Handle API.
-
- function isValidElementType(type) {
- if (typeof type === 'string' || typeof type === 'function') {
- return true;
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
-
-
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
- return true;
- }
-
- if (typeof type === 'object' && type !== null) {
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
- return true;
- }
- }
-
- return false;
- }
-
- function typeOf(object) {
- if (typeof object === 'object' && object !== null) {
- var $$typeof = object.$$typeof;
-
- switch ($$typeof) {
- case REACT_ELEMENT_TYPE:
- var type = object.type;
-
- switch (type) {
- case REACT_FRAGMENT_TYPE:
- case REACT_PROFILER_TYPE:
- case REACT_STRICT_MODE_TYPE:
- case REACT_SUSPENSE_TYPE:
- case REACT_SUSPENSE_LIST_TYPE:
- return type;
-
- default:
- var $$typeofType = type && type.$$typeof;
-
- switch ($$typeofType) {
- case REACT_CONTEXT_TYPE:
- case REACT_FORWARD_REF_TYPE:
- case REACT_LAZY_TYPE:
- case REACT_MEMO_TYPE:
- case REACT_PROVIDER_TYPE:
- return $$typeofType;
-
- default:
- return $$typeof;
- }
-
- }
-
- case REACT_PORTAL_TYPE:
- return $$typeof;
- }
- }
-
- return undefined;
- }
- var ContextConsumer = REACT_CONTEXT_TYPE;
- var ContextProvider = REACT_PROVIDER_TYPE;
- var Element = REACT_ELEMENT_TYPE;
- var ForwardRef = REACT_FORWARD_REF_TYPE;
- var Fragment = REACT_FRAGMENT_TYPE;
- var Lazy = REACT_LAZY_TYPE;
- var Memo = REACT_MEMO_TYPE;
- var Portal = REACT_PORTAL_TYPE;
- var Profiler = REACT_PROFILER_TYPE;
- var StrictMode = REACT_STRICT_MODE_TYPE;
- var Suspense = REACT_SUSPENSE_TYPE;
- var hasWarnedAboutDeprecatedIsAsyncMode = false;
- var hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated
-
- function isAsyncMode(object) {
- {
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
-
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
- }
- }
-
- return false;
- }
- function isConcurrentMode(object) {
- {
- if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
- hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint
-
- console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');
- }
- }
-
- return false;
- }
- function isContextConsumer(object) {
- return typeOf(object) === REACT_CONTEXT_TYPE;
- }
- function isContextProvider(object) {
- return typeOf(object) === REACT_PROVIDER_TYPE;
- }
- function isElement(object) {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
- }
- function isForwardRef(object) {
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
- }
- function isFragment(object) {
- return typeOf(object) === REACT_FRAGMENT_TYPE;
- }
- function isLazy(object) {
- return typeOf(object) === REACT_LAZY_TYPE;
- }
- function isMemo(object) {
- return typeOf(object) === REACT_MEMO_TYPE;
- }
- function isPortal(object) {
- return typeOf(object) === REACT_PORTAL_TYPE;
- }
- function isProfiler(object) {
- return typeOf(object) === REACT_PROFILER_TYPE;
- }
- function isStrictMode(object) {
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
- }
- function isSuspense(object) {
- return typeOf(object) === REACT_SUSPENSE_TYPE;
- }
-
- exports.ContextConsumer = ContextConsumer;
- exports.ContextProvider = ContextProvider;
- exports.Element = Element;
- exports.ForwardRef = ForwardRef;
- exports.Fragment = Fragment;
- exports.Lazy = Lazy;
- exports.Memo = Memo;
- exports.Portal = Portal;
- exports.Profiler = Profiler;
- exports.StrictMode = StrictMode;
- exports.Suspense = Suspense;
- exports.isAsyncMode = isAsyncMode;
- exports.isConcurrentMode = isConcurrentMode;
- exports.isContextConsumer = isContextConsumer;
- exports.isContextProvider = isContextProvider;
- exports.isElement = isElement;
- exports.isForwardRef = isForwardRef;
- exports.isFragment = isFragment;
- exports.isLazy = isLazy;
- exports.isMemo = isMemo;
- exports.isPortal = isPortal;
- exports.isProfiler = isProfiler;
- exports.isStrictMode = isStrictMode;
- exports.isSuspense = isSuspense;
- exports.isValidElementType = isValidElementType;
- exports.typeOf = typeOf;
-
-})));
diff --git a/node_modules/react-is/umd/react-is.production.min.js b/node_modules/react-is/umd/react-is.production.min.js
deleted file mode 100644
index 126d595..0000000
--- a/node_modules/react-is/umd/react-is.production.min.js
+++ /dev/null
@@ -1,14 +0,0 @@
-/** @license React v17.0.2
- * react-is.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function(){'use strict';(function(b,d){"object"===typeof exports&&"undefined"!==typeof module?d(exports):"function"===typeof define&&define.amd?define(["exports"],d):(b=b||self,d(b.ReactIs={}))})(this,function(b){function d(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case q:switch(a=a.type,a){case e:case f:case g:case h:case t:return a;default:switch(a=a&&a.$$typeof,a){case k:case l:case m:case n:case p:return a;default:return b}}case r:return b}}}var q=60103,r=60106,e=60107,g=60108,f=60114,
-p=60109,k=60110,l=60112,h=60113,t=60120,n=60115,m=60116,u=60121,v=60122,w=60117,x=60129,y=60131;if("function"===typeof Symbol&&Symbol.for){var c=Symbol.for;q=c("react.element");r=c("react.portal");e=c("react.fragment");g=c("react.strict_mode");f=c("react.profiler");p=c("react.provider");k=c("react.context");l=c("react.forward_ref");h=c("react.suspense");t=c("react.suspense_list");n=c("react.memo");m=c("react.lazy");u=c("react.block");v=c("react.server.block");w=c("react.fundamental");x=c("react.debug_trace_mode");
-y=c("react.legacy_hidden")}b.ContextConsumer=k;b.ContextProvider=p;b.Element=q;b.ForwardRef=l;b.Fragment=e;b.Lazy=m;b.Memo=n;b.Portal=r;b.Profiler=f;b.StrictMode=g;b.Suspense=h;b.isAsyncMode=function(a){return!1};b.isConcurrentMode=function(a){return!1};b.isContextConsumer=function(a){return d(a)===k};b.isContextProvider=function(a){return d(a)===p};b.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===q};b.isForwardRef=function(a){return d(a)===l};b.isFragment=function(a){return d(a)===
-e};b.isLazy=function(a){return d(a)===m};b.isMemo=function(a){return d(a)===n};b.isPortal=function(a){return d(a)===r};b.isProfiler=function(a){return d(a)===f};b.isStrictMode=function(a){return d(a)===g};b.isSuspense=function(a){return d(a)===h};b.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===f||a===x||a===g||a===h||a===t||a===y||"object"===typeof a&&null!==a&&(a.$$typeof===m||a.$$typeof===n||a.$$typeof===p||a.$$typeof===k||a.$$typeof===l||a.$$typeof===
-w||a.$$typeof===u||a[0]===v)?!0:!1};b.typeOf=d});
-})();
diff --git a/node_modules/react/LICENSE b/node_modules/react/LICENSE
deleted file mode 100644
index b96dcb0..0000000
--- a/node_modules/react/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) Facebook, Inc. and its affiliates.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/react/README.md b/node_modules/react/README.md
deleted file mode 100644
index 0033e23..0000000
--- a/node_modules/react/README.md
+++ /dev/null
@@ -1,13 +0,0 @@
-# `react`
-
-React is a JavaScript library for creating user interfaces.
-
-The `react` package contains only the functionality necessary to define React components. It is typically used together with a React renderer like `react-dom` for the web, or `react-native` for the native environments.
-
-**Note:** by default, React will be in development mode. The development version includes extra warnings about common mistakes, whereas the production version includes extra performance optimizations and strips all error messages. Don't forget to use the [production build](https://reactjs.org/docs/optimizing-performance.html#use-the-production-build) when deploying your application.
-
-## Example Usage
-
-```js
-var React = require('react');
-```
diff --git a/node_modules/react/build-info.json b/node_modules/react/build-info.json
deleted file mode 100644
index db5dbe5..0000000
--- a/node_modules/react/build-info.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "branch": "pull/21051",
- "buildNumber": "287151",
- "checksum": "94f5c65",
- "commit": "12adaffef",
- "environment": "ci",
- "reactVersion": "17.0.0-12adaffef"
-}
diff --git a/node_modules/react/cjs/react-jsx-dev-runtime.development.js b/node_modules/react/cjs/react-jsx-dev-runtime.development.js
deleted file mode 100644
index 9885b5f..0000000
--- a/node_modules/react/cjs/react-jsx-dev-runtime.development.js
+++ /dev/null
@@ -1,1203 +0,0 @@
-/** @license React v17.0.2
- * react-jsx-dev-runtime.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var React = require('react');
-var _assign = require('object-assign');
-
-// ATTENTION
-// When adding new symbols to this file,
-// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var REACT_ELEMENT_TYPE = 0xeac7;
-var REACT_PORTAL_TYPE = 0xeaca;
-exports.Fragment = 0xeacb;
-var REACT_STRICT_MODE_TYPE = 0xeacc;
-var REACT_PROFILER_TYPE = 0xead2;
-var REACT_PROVIDER_TYPE = 0xeacd;
-var REACT_CONTEXT_TYPE = 0xeace;
-var REACT_FORWARD_REF_TYPE = 0xead0;
-var REACT_SUSPENSE_TYPE = 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = 0xead8;
-var REACT_MEMO_TYPE = 0xead3;
-var REACT_LAZY_TYPE = 0xead4;
-var REACT_BLOCK_TYPE = 0xead9;
-var REACT_SERVER_BLOCK_TYPE = 0xeada;
-var REACT_FUNDAMENTAL_TYPE = 0xead5;
-var REACT_SCOPE_TYPE = 0xead7;
-var REACT_OPAQUE_ID_TYPE = 0xeae0;
-var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
-var REACT_OFFSCREEN_TYPE = 0xeae2;
-var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- exports.Fragment = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
-}
-
-var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
-var FAUX_ITERATOR_SYMBOL = '@@iterator';
-function getIteratorFn(maybeIterable) {
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
- return null;
- }
-
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
-
- if (typeof maybeIterator === 'function') {
- return maybeIterator;
- }
-
- return null;
-}
-
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
-function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
-}
-
-function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
-}
-
-// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
-var enableScopeAPI = false; // Experimental Create Event Handle API.
-
-function isValidElementType(type) {
- if (typeof type === 'string' || typeof type === 'function') {
- return true;
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
-
-
- if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
- return true;
- }
-
- if (typeof type === 'object' && type !== null) {
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
- return true;
- }
- }
-
- return false;
-}
-
-function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
-}
-
-function getContextName(type) {
- return type.displayName || 'Context';
-}
-
-function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case exports.Fragment:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case REACT_PROFILER_TYPE:
- return 'Profiler';
-
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
-
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
-}
-
-// Helpers to patch console.logs to avoid logging during side-effect free
-// replaying on render function. This currently only patches the object
-// lazily which won't cover if the log function was extracted eagerly.
-// We could also eagerly patch the method.
-var disabledDepth = 0;
-var prevLog;
-var prevInfo;
-var prevWarn;
-var prevError;
-var prevGroup;
-var prevGroupCollapsed;
-var prevGroupEnd;
-
-function disabledLog() {}
-
-disabledLog.__reactDisabledLog = true;
-function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
-}
-function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: _assign({}, props, {
- value: prevLog
- }),
- info: _assign({}, props, {
- value: prevInfo
- }),
- warn: _assign({}, props, {
- value: prevWarn
- }),
- error: _assign({}, props, {
- value: prevError
- }),
- group: _assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: _assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: _assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
-}
-
-var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
-var prefix;
-function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
-}
-var reentry = false;
-var componentFrameCache;
-
-{
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
-}
-
-function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
-}
-function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
-}
-
-function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
-}
-
-function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case REACT_SUSPENSE_TYPE:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
-}
-
-var loggedTypeFailures = {};
-var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame.setExtraStackFrame(null);
- }
- }
-}
-
-function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
-}
-
-var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var RESERVED_PROPS = {
- key: true,
- ref: true,
- __self: true,
- __source: true
-};
-var specialPropKeyWarningShown;
-var specialPropRefWarningShown;
-var didWarnAboutStringRefs;
-
-{
- didWarnAboutStringRefs = {};
-}
-
-function hasValidRef(config) {
- {
- if (hasOwnProperty.call(config, 'ref')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
-
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
-
- return config.ref !== undefined;
-}
-
-function hasValidKey(config) {
- {
- if (hasOwnProperty.call(config, 'key')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
-
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
-
- return config.key !== undefined;
-}
-
-function warnIfStringRefCannotBeAutoConverted(config, self) {
- {
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
- var componentName = getComponentName(ReactCurrentOwner.current.type);
-
- if (!didWarnAboutStringRefs[componentName]) {
- error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
-
- didWarnAboutStringRefs[componentName] = true;
- }
- }
- }
-}
-
-function defineKeyPropWarningGetter(props, displayName) {
- {
- var warnAboutAccessingKey = function () {
- if (!specialPropKeyWarningShown) {
- specialPropKeyWarningShown = true;
-
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
- }
- };
-
- warnAboutAccessingKey.isReactWarning = true;
- Object.defineProperty(props, 'key', {
- get: warnAboutAccessingKey,
- configurable: true
- });
- }
-}
-
-function defineRefPropWarningGetter(props, displayName) {
- {
- var warnAboutAccessingRef = function () {
- if (!specialPropRefWarningShown) {
- specialPropRefWarningShown = true;
-
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
- }
- };
-
- warnAboutAccessingRef.isReactWarning = true;
- Object.defineProperty(props, 'ref', {
- get: warnAboutAccessingRef,
- configurable: true
- });
- }
-}
-/**
- * Factory method to create a new React element. This no longer adheres to
- * the class pattern, so do not use new to call it. Also, instanceof check
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
- * if something is a React Element.
- *
- * @param {*} type
- * @param {*} props
- * @param {*} key
- * @param {string|object} ref
- * @param {*} owner
- * @param {*} self A *temporary* helper to detect places where `this` is
- * different from the `owner` when React.createElement is called, so that we
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
- * functions, and as long as `this` and owner are the same, there will be no
- * change in behavior.
- * @param {*} source An annotation object (added by a transpiler or otherwise)
- * indicating filename, line number, and/or other information.
- * @internal
- */
-
-
-var ReactElement = function (type, key, ref, self, source, owner, props) {
- var element = {
- // This tag allows us to uniquely identify this as a React Element
- $$typeof: REACT_ELEMENT_TYPE,
- // Built-in properties that belong on the element
- type: type,
- key: key,
- ref: ref,
- props: props,
- // Record the component responsible for creating this element.
- _owner: owner
- };
-
- {
- // The validation flag is currently mutative. We put it on
- // an external backing store so that we can freeze the whole object.
- // This can be replaced with a WeakMap once they are implemented in
- // commonly used development environments.
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
- // the validation flag non-enumerable (where possible, which should
- // include every environment we run tests in), so the test framework
- // ignores it.
-
- Object.defineProperty(element._store, 'validated', {
- configurable: false,
- enumerable: false,
- writable: true,
- value: false
- }); // self and source are DEV only properties.
-
- Object.defineProperty(element, '_self', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: self
- }); // Two elements created in two different places should be considered
- // equal for testing purposes and therefore we hide it from enumeration.
-
- Object.defineProperty(element, '_source', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: source
- });
-
- if (Object.freeze) {
- Object.freeze(element.props);
- Object.freeze(element);
- }
- }
-
- return element;
-};
-/**
- * https://github.com/reactjs/rfcs/pull/107
- * @param {*} type
- * @param {object} props
- * @param {string} key
- */
-
-function jsxDEV(type, config, maybeKey, source, self) {
- {
- var propName; // Reserved names are extracted
-
- var props = {};
- var key = null;
- var ref = null; // Currently, key can be spread in as a prop. This causes a potential
- // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
- // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
- // but as an intermediary step, we will use jsxDEV for everything except
- // <div {...props} key="Hi" />, because we aren't currently able to tell if
- // key is explicitly declared to be undefined or not.
-
- if (maybeKey !== undefined) {
- key = '' + maybeKey;
- }
-
- if (hasValidKey(config)) {
- key = '' + config.key;
- }
-
- if (hasValidRef(config)) {
- ref = config.ref;
- warnIfStringRefCannotBeAutoConverted(config, self);
- } // Remaining properties are added to a new props object
-
-
- for (propName in config) {
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- props[propName] = config[propName];
- }
- } // Resolve default props
-
-
- if (type && type.defaultProps) {
- var defaultProps = type.defaultProps;
-
- for (propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
- }
-
- if (key || ref) {
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
-
- if (key) {
- defineKeyPropWarningGetter(props, displayName);
- }
-
- if (ref) {
- defineRefPropWarningGetter(props, displayName);
- }
- }
-
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
- }
-}
-
-var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
-var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function setCurrentlyValidatingElement$1(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
- }
- }
-}
-
-var propTypesMisspellWarningShown;
-
-{
- propTypesMisspellWarningShown = false;
-}
-/**
- * Verifies the object is a ReactElement.
- * See https://reactjs.org/docs/react-api.html#isvalidelement
- * @param {?object} object
- * @return {boolean} True if `object` is a ReactElement.
- * @final
- */
-
-function isValidElement(object) {
- {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
- }
-}
-
-function getDeclarationErrorAddendum() {
- {
- if (ReactCurrentOwner$1.current) {
- var name = getComponentName(ReactCurrentOwner$1.current.type);
-
- if (name) {
- return '\n\nCheck the render method of `' + name + '`.';
- }
- }
-
- return '';
- }
-}
-
-function getSourceInfoErrorAddendum(source) {
- {
- if (source !== undefined) {
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
- var lineNumber = source.lineNumber;
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
- }
-
- return '';
- }
-}
-/**
- * Warn if there's no key explicitly set on dynamic arrays of children or
- * object keys are not valid. This allows us to keep track of children between
- * updates.
- */
-
-
-var ownerHasKeyUseWarning = {};
-
-function getCurrentComponentErrorInfo(parentType) {
- {
- var info = getDeclarationErrorAddendum();
-
- if (!info) {
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
-
- if (parentName) {
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
- }
- }
-
- return info;
- }
-}
-/**
- * Warn if the element doesn't have an explicit key assigned to it.
- * This element is in an array. The array could grow and shrink or be
- * reordered. All children that haven't already been validated are required to
- * have a "key" property assigned to it. Error statuses are cached so a warning
- * will only be shown once.
- *
- * @internal
- * @param {ReactElement} element Element that requires a key.
- * @param {*} parentType element's parent's type.
- */
-
-
-function validateExplicitKey(element, parentType) {
- {
- if (!element._store || element._store.validated || element.key != null) {
- return;
- }
-
- element._store.validated = true;
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
-
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
- return;
- }
-
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
- // property, it may be the creator of the child that's responsible for
- // assigning it a key.
-
- var childOwner = '';
-
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
- // Give the component that originally created this child.
- childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
- }
-
- setCurrentlyValidatingElement$1(element);
-
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
-
- setCurrentlyValidatingElement$1(null);
- }
-}
-/**
- * Ensure that every element either is passed in a static location, in an
- * array with an explicit keys property defined, or in an object literal
- * with valid key property.
- *
- * @internal
- * @param {ReactNode} node Statically passed child of any type.
- * @param {*} parentType node's parent's type.
- */
-
-
-function validateChildKeys(node, parentType) {
- {
- if (typeof node !== 'object') {
- return;
- }
-
- if (Array.isArray(node)) {
- for (var i = 0; i < node.length; i++) {
- var child = node[i];
-
- if (isValidElement(child)) {
- validateExplicitKey(child, parentType);
- }
- }
- } else if (isValidElement(node)) {
- // This element was passed in a valid location.
- if (node._store) {
- node._store.validated = true;
- }
- } else if (node) {
- var iteratorFn = getIteratorFn(node);
-
- if (typeof iteratorFn === 'function') {
- // Entry iterators used to provide implicit keys,
- // but now we print a separate warning for them later.
- if (iteratorFn !== node.entries) {
- var iterator = iteratorFn.call(node);
- var step;
-
- while (!(step = iterator.next()).done) {
- if (isValidElement(step.value)) {
- validateExplicitKey(step.value, parentType);
- }
- }
- }
- }
- }
- }
-}
-/**
- * Given an element, validate that its props follow the propTypes definition,
- * provided by the type.
- *
- * @param {ReactElement} element
- */
-
-
-function validatePropTypes(element) {
- {
- var type = element.type;
-
- if (type === null || type === undefined || typeof type === 'string') {
- return;
- }
-
- var propTypes;
-
- if (typeof type === 'function') {
- propTypes = type.propTypes;
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
- // Inner props are checked in the reconciler.
- type.$$typeof === REACT_MEMO_TYPE)) {
- propTypes = type.propTypes;
- } else {
- return;
- }
-
- if (propTypes) {
- // Intentionally inside to avoid triggering lazy initializers:
- var name = getComponentName(type);
- checkPropTypes(propTypes, element.props, 'prop', name, element);
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
-
- var _name = getComponentName(type);
-
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
- }
-
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
- }
- }
-}
-/**
- * Given a fragment, validate that it can only be provided with fragment props
- * @param {ReactElement} fragment
- */
-
-
-function validateFragmentProps(fragment) {
- {
- var keys = Object.keys(fragment.props);
-
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
-
- if (key !== 'children' && key !== 'key') {
- setCurrentlyValidatingElement$1(fragment);
-
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
-
- setCurrentlyValidatingElement$1(null);
- break;
- }
- }
-
- if (fragment.ref !== null) {
- setCurrentlyValidatingElement$1(fragment);
-
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
-
- setCurrentlyValidatingElement$1(null);
- }
- }
-}
-
-function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
- {
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
- // succeed and there will likely be errors in render.
-
- if (!validType) {
- var info = '';
-
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
- }
-
- var sourceInfo = getSourceInfoErrorAddendum(source);
-
- if (sourceInfo) {
- info += sourceInfo;
- } else {
- info += getDeclarationErrorAddendum();
- }
-
- var typeString;
-
- if (type === null) {
- typeString = 'null';
- } else if (Array.isArray(type)) {
- typeString = 'array';
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
- info = ' Did you accidentally export a JSX literal instead of a component?';
- } else {
- typeString = typeof type;
- }
-
- error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
- }
-
- var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
- // TODO: Drop this when these are no longer allowed as the type argument.
-
- if (element == null) {
- return element;
- } // Skip key warning if the type isn't valid since our key validation logic
- // doesn't expect a non-string/function type and can throw confusing errors.
- // We don't want exception behavior to differ between dev and prod.
- // (Rendering will throw with a helpful message and as soon as the type is
- // fixed, the key warnings will appear.)
-
-
- if (validType) {
- var children = props.children;
-
- if (children !== undefined) {
- if (isStaticChildren) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- validateChildKeys(children[i], type);
- }
-
- if (Object.freeze) {
- Object.freeze(children);
- }
- } else {
- error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
- }
- } else {
- validateChildKeys(children, type);
- }
- }
- }
-
- if (type === exports.Fragment) {
- validateFragmentProps(element);
- } else {
- validatePropTypes(element);
- }
-
- return element;
- }
-} // These two functions exist to still get child warnings in dev
-
-var jsxDEV$1 = jsxWithValidation ;
-
-exports.jsxDEV = jsxDEV$1;
- })();
-}
diff --git a/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js b/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js
deleted file mode 100644
index 02c1a5b..0000000
--- a/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @license React v17.0.2
- * react-jsx-dev-runtime.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';require("object-assign");require("react");exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var a=Symbol.for;exports.Fragment=a("react.fragment")}exports.jsxDEV=void 0;
diff --git a/node_modules/react/cjs/react-jsx-runtime.development.js b/node_modules/react/cjs/react-jsx-runtime.development.js
deleted file mode 100644
index 38c9224..0000000
--- a/node_modules/react/cjs/react-jsx-runtime.development.js
+++ /dev/null
@@ -1,1221 +0,0 @@
-/** @license React v17.0.2
- * react-jsx-runtime.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var React = require('react');
-var _assign = require('object-assign');
-
-// ATTENTION
-// When adding new symbols to this file,
-// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var REACT_ELEMENT_TYPE = 0xeac7;
-var REACT_PORTAL_TYPE = 0xeaca;
-exports.Fragment = 0xeacb;
-var REACT_STRICT_MODE_TYPE = 0xeacc;
-var REACT_PROFILER_TYPE = 0xead2;
-var REACT_PROVIDER_TYPE = 0xeacd;
-var REACT_CONTEXT_TYPE = 0xeace;
-var REACT_FORWARD_REF_TYPE = 0xead0;
-var REACT_SUSPENSE_TYPE = 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = 0xead8;
-var REACT_MEMO_TYPE = 0xead3;
-var REACT_LAZY_TYPE = 0xead4;
-var REACT_BLOCK_TYPE = 0xead9;
-var REACT_SERVER_BLOCK_TYPE = 0xeada;
-var REACT_FUNDAMENTAL_TYPE = 0xead5;
-var REACT_SCOPE_TYPE = 0xead7;
-var REACT_OPAQUE_ID_TYPE = 0xeae0;
-var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
-var REACT_OFFSCREEN_TYPE = 0xeae2;
-var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- exports.Fragment = symbolFor('react.fragment');
- REACT_STRICT_MODE_TYPE = symbolFor('react.strict_mode');
- REACT_PROFILER_TYPE = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- REACT_SUSPENSE_TYPE = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
-}
-
-var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
-var FAUX_ITERATOR_SYMBOL = '@@iterator';
-function getIteratorFn(maybeIterable) {
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
- return null;
- }
-
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
-
- if (typeof maybeIterator === 'function') {
- return maybeIterator;
- }
-
- return null;
-}
-
-var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
-
-function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
-}
-
-function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
-}
-
-// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
-var enableScopeAPI = false; // Experimental Create Event Handle API.
-
-function isValidElementType(type) {
- if (typeof type === 'string' || typeof type === 'function') {
- return true;
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
-
-
- if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
- return true;
- }
-
- if (typeof type === 'object' && type !== null) {
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
- return true;
- }
- }
-
- return false;
-}
-
-function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
-}
-
-function getContextName(type) {
- return type.displayName || 'Context';
-}
-
-function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case exports.Fragment:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case REACT_PROFILER_TYPE:
- return 'Profiler';
-
- case REACT_STRICT_MODE_TYPE:
- return 'StrictMode';
-
- case REACT_SUSPENSE_TYPE:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
-}
-
-// Helpers to patch console.logs to avoid logging during side-effect free
-// replaying on render function. This currently only patches the object
-// lazily which won't cover if the log function was extracted eagerly.
-// We could also eagerly patch the method.
-var disabledDepth = 0;
-var prevLog;
-var prevInfo;
-var prevWarn;
-var prevError;
-var prevGroup;
-var prevGroupCollapsed;
-var prevGroupEnd;
-
-function disabledLog() {}
-
-disabledLog.__reactDisabledLog = true;
-function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
-}
-function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: _assign({}, props, {
- value: prevLog
- }),
- info: _assign({}, props, {
- value: prevInfo
- }),
- warn: _assign({}, props, {
- value: prevWarn
- }),
- error: _assign({}, props, {
- value: prevError
- }),
- group: _assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: _assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: _assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
-}
-
-var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
-var prefix;
-function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
-}
-var reentry = false;
-var componentFrameCache;
-
-{
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
-}
-
-function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
-}
-function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
-}
-
-function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
-}
-
-function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case REACT_SUSPENSE_TYPE:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
-}
-
-var loggedTypeFailures = {};
-var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame.setExtraStackFrame(null);
- }
- }
-}
-
-function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
-}
-
-var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var RESERVED_PROPS = {
- key: true,
- ref: true,
- __self: true,
- __source: true
-};
-var specialPropKeyWarningShown;
-var specialPropRefWarningShown;
-var didWarnAboutStringRefs;
-
-{
- didWarnAboutStringRefs = {};
-}
-
-function hasValidRef(config) {
- {
- if (hasOwnProperty.call(config, 'ref')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
-
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
-
- return config.ref !== undefined;
-}
-
-function hasValidKey(config) {
- {
- if (hasOwnProperty.call(config, 'key')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
-
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
-
- return config.key !== undefined;
-}
-
-function warnIfStringRefCannotBeAutoConverted(config, self) {
- {
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
- var componentName = getComponentName(ReactCurrentOwner.current.type);
-
- if (!didWarnAboutStringRefs[componentName]) {
- error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', getComponentName(ReactCurrentOwner.current.type), config.ref);
-
- didWarnAboutStringRefs[componentName] = true;
- }
- }
- }
-}
-
-function defineKeyPropWarningGetter(props, displayName) {
- {
- var warnAboutAccessingKey = function () {
- if (!specialPropKeyWarningShown) {
- specialPropKeyWarningShown = true;
-
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
- }
- };
-
- warnAboutAccessingKey.isReactWarning = true;
- Object.defineProperty(props, 'key', {
- get: warnAboutAccessingKey,
- configurable: true
- });
- }
-}
-
-function defineRefPropWarningGetter(props, displayName) {
- {
- var warnAboutAccessingRef = function () {
- if (!specialPropRefWarningShown) {
- specialPropRefWarningShown = true;
-
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
- }
- };
-
- warnAboutAccessingRef.isReactWarning = true;
- Object.defineProperty(props, 'ref', {
- get: warnAboutAccessingRef,
- configurable: true
- });
- }
-}
-/**
- * Factory method to create a new React element. This no longer adheres to
- * the class pattern, so do not use new to call it. Also, instanceof check
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
- * if something is a React Element.
- *
- * @param {*} type
- * @param {*} props
- * @param {*} key
- * @param {string|object} ref
- * @param {*} owner
- * @param {*} self A *temporary* helper to detect places where `this` is
- * different from the `owner` when React.createElement is called, so that we
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
- * functions, and as long as `this` and owner are the same, there will be no
- * change in behavior.
- * @param {*} source An annotation object (added by a transpiler or otherwise)
- * indicating filename, line number, and/or other information.
- * @internal
- */
-
-
-var ReactElement = function (type, key, ref, self, source, owner, props) {
- var element = {
- // This tag allows us to uniquely identify this as a React Element
- $$typeof: REACT_ELEMENT_TYPE,
- // Built-in properties that belong on the element
- type: type,
- key: key,
- ref: ref,
- props: props,
- // Record the component responsible for creating this element.
- _owner: owner
- };
-
- {
- // The validation flag is currently mutative. We put it on
- // an external backing store so that we can freeze the whole object.
- // This can be replaced with a WeakMap once they are implemented in
- // commonly used development environments.
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
- // the validation flag non-enumerable (where possible, which should
- // include every environment we run tests in), so the test framework
- // ignores it.
-
- Object.defineProperty(element._store, 'validated', {
- configurable: false,
- enumerable: false,
- writable: true,
- value: false
- }); // self and source are DEV only properties.
-
- Object.defineProperty(element, '_self', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: self
- }); // Two elements created in two different places should be considered
- // equal for testing purposes and therefore we hide it from enumeration.
-
- Object.defineProperty(element, '_source', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: source
- });
-
- if (Object.freeze) {
- Object.freeze(element.props);
- Object.freeze(element);
- }
- }
-
- return element;
-};
-/**
- * https://github.com/reactjs/rfcs/pull/107
- * @param {*} type
- * @param {object} props
- * @param {string} key
- */
-
-function jsxDEV(type, config, maybeKey, source, self) {
- {
- var propName; // Reserved names are extracted
-
- var props = {};
- var key = null;
- var ref = null; // Currently, key can be spread in as a prop. This causes a potential
- // issue if key is also explicitly declared (ie. <div {...props} key="Hi" />
- // or <div key="Hi" {...props} /> ). We want to deprecate key spread,
- // but as an intermediary step, we will use jsxDEV for everything except
- // <div {...props} key="Hi" />, because we aren't currently able to tell if
- // key is explicitly declared to be undefined or not.
-
- if (maybeKey !== undefined) {
- key = '' + maybeKey;
- }
-
- if (hasValidKey(config)) {
- key = '' + config.key;
- }
-
- if (hasValidRef(config)) {
- ref = config.ref;
- warnIfStringRefCannotBeAutoConverted(config, self);
- } // Remaining properties are added to a new props object
-
-
- for (propName in config) {
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- props[propName] = config[propName];
- }
- } // Resolve default props
-
-
- if (type && type.defaultProps) {
- var defaultProps = type.defaultProps;
-
- for (propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
- }
-
- if (key || ref) {
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
-
- if (key) {
- defineKeyPropWarningGetter(props, displayName);
- }
-
- if (ref) {
- defineRefPropWarningGetter(props, displayName);
- }
- }
-
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
- }
-}
-
-var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
-var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function setCurrentlyValidatingElement$1(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
- }
- }
-}
-
-var propTypesMisspellWarningShown;
-
-{
- propTypesMisspellWarningShown = false;
-}
-/**
- * Verifies the object is a ReactElement.
- * See https://reactjs.org/docs/react-api.html#isvalidelement
- * @param {?object} object
- * @return {boolean} True if `object` is a ReactElement.
- * @final
- */
-
-function isValidElement(object) {
- {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
- }
-}
-
-function getDeclarationErrorAddendum() {
- {
- if (ReactCurrentOwner$1.current) {
- var name = getComponentName(ReactCurrentOwner$1.current.type);
-
- if (name) {
- return '\n\nCheck the render method of `' + name + '`.';
- }
- }
-
- return '';
- }
-}
-
-function getSourceInfoErrorAddendum(source) {
- {
- if (source !== undefined) {
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
- var lineNumber = source.lineNumber;
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
- }
-
- return '';
- }
-}
-/**
- * Warn if there's no key explicitly set on dynamic arrays of children or
- * object keys are not valid. This allows us to keep track of children between
- * updates.
- */
-
-
-var ownerHasKeyUseWarning = {};
-
-function getCurrentComponentErrorInfo(parentType) {
- {
- var info = getDeclarationErrorAddendum();
-
- if (!info) {
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
-
- if (parentName) {
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
- }
- }
-
- return info;
- }
-}
-/**
- * Warn if the element doesn't have an explicit key assigned to it.
- * This element is in an array. The array could grow and shrink or be
- * reordered. All children that haven't already been validated are required to
- * have a "key" property assigned to it. Error statuses are cached so a warning
- * will only be shown once.
- *
- * @internal
- * @param {ReactElement} element Element that requires a key.
- * @param {*} parentType element's parent's type.
- */
-
-
-function validateExplicitKey(element, parentType) {
- {
- if (!element._store || element._store.validated || element.key != null) {
- return;
- }
-
- element._store.validated = true;
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
-
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
- return;
- }
-
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
- // property, it may be the creator of the child that's responsible for
- // assigning it a key.
-
- var childOwner = '';
-
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
- // Give the component that originally created this child.
- childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
- }
-
- setCurrentlyValidatingElement$1(element);
-
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
-
- setCurrentlyValidatingElement$1(null);
- }
-}
-/**
- * Ensure that every element either is passed in a static location, in an
- * array with an explicit keys property defined, or in an object literal
- * with valid key property.
- *
- * @internal
- * @param {ReactNode} node Statically passed child of any type.
- * @param {*} parentType node's parent's type.
- */
-
-
-function validateChildKeys(node, parentType) {
- {
- if (typeof node !== 'object') {
- return;
- }
-
- if (Array.isArray(node)) {
- for (var i = 0; i < node.length; i++) {
- var child = node[i];
-
- if (isValidElement(child)) {
- validateExplicitKey(child, parentType);
- }
- }
- } else if (isValidElement(node)) {
- // This element was passed in a valid location.
- if (node._store) {
- node._store.validated = true;
- }
- } else if (node) {
- var iteratorFn = getIteratorFn(node);
-
- if (typeof iteratorFn === 'function') {
- // Entry iterators used to provide implicit keys,
- // but now we print a separate warning for them later.
- if (iteratorFn !== node.entries) {
- var iterator = iteratorFn.call(node);
- var step;
-
- while (!(step = iterator.next()).done) {
- if (isValidElement(step.value)) {
- validateExplicitKey(step.value, parentType);
- }
- }
- }
- }
- }
- }
-}
-/**
- * Given an element, validate that its props follow the propTypes definition,
- * provided by the type.
- *
- * @param {ReactElement} element
- */
-
-
-function validatePropTypes(element) {
- {
- var type = element.type;
-
- if (type === null || type === undefined || typeof type === 'string') {
- return;
- }
-
- var propTypes;
-
- if (typeof type === 'function') {
- propTypes = type.propTypes;
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
- // Inner props are checked in the reconciler.
- type.$$typeof === REACT_MEMO_TYPE)) {
- propTypes = type.propTypes;
- } else {
- return;
- }
-
- if (propTypes) {
- // Intentionally inside to avoid triggering lazy initializers:
- var name = getComponentName(type);
- checkPropTypes(propTypes, element.props, 'prop', name, element);
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
-
- var _name = getComponentName(type);
-
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
- }
-
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
- }
- }
-}
-/**
- * Given a fragment, validate that it can only be provided with fragment props
- * @param {ReactElement} fragment
- */
-
-
-function validateFragmentProps(fragment) {
- {
- var keys = Object.keys(fragment.props);
-
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
-
- if (key !== 'children' && key !== 'key') {
- setCurrentlyValidatingElement$1(fragment);
-
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
-
- setCurrentlyValidatingElement$1(null);
- break;
- }
- }
-
- if (fragment.ref !== null) {
- setCurrentlyValidatingElement$1(fragment);
-
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
-
- setCurrentlyValidatingElement$1(null);
- }
- }
-}
-
-function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
- {
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
- // succeed and there will likely be errors in render.
-
- if (!validType) {
- var info = '';
-
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
- }
-
- var sourceInfo = getSourceInfoErrorAddendum(source);
-
- if (sourceInfo) {
- info += sourceInfo;
- } else {
- info += getDeclarationErrorAddendum();
- }
-
- var typeString;
-
- if (type === null) {
- typeString = 'null';
- } else if (Array.isArray(type)) {
- typeString = 'array';
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
- info = ' Did you accidentally export a JSX literal instead of a component?';
- } else {
- typeString = typeof type;
- }
-
- error('React.jsx: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
- }
-
- var element = jsxDEV(type, props, key, source, self); // The result can be nullish if a mock or a custom function is used.
- // TODO: Drop this when these are no longer allowed as the type argument.
-
- if (element == null) {
- return element;
- } // Skip key warning if the type isn't valid since our key validation logic
- // doesn't expect a non-string/function type and can throw confusing errors.
- // We don't want exception behavior to differ between dev and prod.
- // (Rendering will throw with a helpful message and as soon as the type is
- // fixed, the key warnings will appear.)
-
-
- if (validType) {
- var children = props.children;
-
- if (children !== undefined) {
- if (isStaticChildren) {
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- validateChildKeys(children[i], type);
- }
-
- if (Object.freeze) {
- Object.freeze(children);
- }
- } else {
- error('React.jsx: Static children should always be an array. ' + 'You are likely explicitly calling React.jsxs or React.jsxDEV. ' + 'Use the Babel transform instead.');
- }
- } else {
- validateChildKeys(children, type);
- }
- }
- }
-
- if (type === exports.Fragment) {
- validateFragmentProps(element);
- } else {
- validatePropTypes(element);
- }
-
- return element;
- }
-} // These two functions exist to still get child warnings in dev
-// even with the prod transform. This means that jsxDEV is purely
-// opt-in behavior for better messages but that we won't stop
-// giving you warnings if you use production apis.
-
-function jsxWithValidationStatic(type, props, key) {
- {
- return jsxWithValidation(type, props, key, true);
- }
-}
-function jsxWithValidationDynamic(type, props, key) {
- {
- return jsxWithValidation(type, props, key, false);
- }
-}
-
-var jsx = jsxWithValidationDynamic ; // we may want to special case jsxs internally to take advantage of static children.
-// for now we can ship identical prod functions
-
-var jsxs = jsxWithValidationStatic ;
-
-exports.jsx = jsx;
-exports.jsxs = jsxs;
- })();
-}
diff --git a/node_modules/react/cjs/react-jsx-runtime.production.min.js b/node_modules/react/cjs/react-jsx-runtime.production.min.js
deleted file mode 100644
index 240488c..0000000
--- a/node_modules/react/cjs/react-jsx-runtime.production.min.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/** @license React v17.0.2
- * react-jsx-runtime.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';require("object-assign");var f=require("react"),g=60103;exports.Fragment=60107;if("function"===typeof Symbol&&Symbol.for){var h=Symbol.for;g=h("react.element");exports.Fragment=h("react.fragment")}var m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,n=Object.prototype.hasOwnProperty,p={key:!0,ref:!0,__self:!0,__source:!0};
-function q(c,a,k){var b,d={},e=null,l=null;void 0!==k&&(e=""+k);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(l=a.ref);for(b in a)n.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:g,type:c,key:e,ref:l,props:d,_owner:m.current}}exports.jsx=q;exports.jsxs=q;
diff --git a/node_modules/react/cjs/react.development.js b/node_modules/react/cjs/react.development.js
deleted file mode 100644
index 7f48126..0000000
--- a/node_modules/react/cjs/react.development.js
+++ /dev/null
@@ -1,2333 +0,0 @@
-/** @license React v17.0.2
- * react.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var _assign = require('object-assign');
-
-// TODO: this is special because it gets imported during build.
-var ReactVersion = '17.0.2';
-
-// ATTENTION
-// When adding new symbols to this file,
-// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
-// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
-// nor polyfill, then a plain number is used for performance.
-var REACT_ELEMENT_TYPE = 0xeac7;
-var REACT_PORTAL_TYPE = 0xeaca;
-exports.Fragment = 0xeacb;
-exports.StrictMode = 0xeacc;
-exports.Profiler = 0xead2;
-var REACT_PROVIDER_TYPE = 0xeacd;
-var REACT_CONTEXT_TYPE = 0xeace;
-var REACT_FORWARD_REF_TYPE = 0xead0;
-exports.Suspense = 0xead1;
-var REACT_SUSPENSE_LIST_TYPE = 0xead8;
-var REACT_MEMO_TYPE = 0xead3;
-var REACT_LAZY_TYPE = 0xead4;
-var REACT_BLOCK_TYPE = 0xead9;
-var REACT_SERVER_BLOCK_TYPE = 0xeada;
-var REACT_FUNDAMENTAL_TYPE = 0xead5;
-var REACT_SCOPE_TYPE = 0xead7;
-var REACT_OPAQUE_ID_TYPE = 0xeae0;
-var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
-var REACT_OFFSCREEN_TYPE = 0xeae2;
-var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
-if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- exports.Fragment = symbolFor('react.fragment');
- exports.StrictMode = symbolFor('react.strict_mode');
- exports.Profiler = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- exports.Suspense = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
-}
-
-var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
-var FAUX_ITERATOR_SYMBOL = '@@iterator';
-function getIteratorFn(maybeIterable) {
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
- return null;
- }
-
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
-
- if (typeof maybeIterator === 'function') {
- return maybeIterator;
- }
-
- return null;
-}
-
-/**
- * Keeps track of the current dispatcher.
- */
-var ReactCurrentDispatcher = {
- /**
- * @internal
- * @type {ReactComponent}
- */
- current: null
-};
-
-/**
- * Keeps track of the current batch's configuration such as how long an update
- * should suspend for if it needs to.
- */
-var ReactCurrentBatchConfig = {
- transition: 0
-};
-
-/**
- * Keeps track of the current owner.
- *
- * The current owner is the component who should own any components that are
- * currently being constructed.
- */
-var ReactCurrentOwner = {
- /**
- * @internal
- * @type {ReactComponent}
- */
- current: null
-};
-
-var ReactDebugCurrentFrame = {};
-var currentExtraStackFrame = null;
-function setExtraStackFrame(stack) {
- {
- currentExtraStackFrame = stack;
- }
-}
-
-{
- ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
- {
- currentExtraStackFrame = stack;
- }
- }; // Stack implementation injected by the current renderer.
-
-
- ReactDebugCurrentFrame.getCurrentStack = null;
-
- ReactDebugCurrentFrame.getStackAddendum = function () {
- var stack = ''; // Add an extra top frame while an element is being validated
-
- if (currentExtraStackFrame) {
- stack += currentExtraStackFrame;
- } // Delegate to the injected renderer-specific implementation
-
-
- var impl = ReactDebugCurrentFrame.getCurrentStack;
-
- if (impl) {
- stack += impl() || '';
- }
-
- return stack;
- };
-}
-
-/**
- * Used by act() to track whether you're inside an act() scope.
- */
-var IsSomeRendererActing = {
- current: false
-};
-
-var ReactSharedInternals = {
- ReactCurrentDispatcher: ReactCurrentDispatcher,
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
- ReactCurrentOwner: ReactCurrentOwner,
- IsSomeRendererActing: IsSomeRendererActing,
- // Used by renderers to avoid bundling object-assign twice in UMD bundles:
- assign: _assign
-};
-
-{
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
-}
-
-// by calls to these methods by a Babel plugin.
-//
-// In PROD (or in packages without access to React internals),
-// they are left as they are instead.
-
-function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
-}
-function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
-}
-
-function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
-}
-
-var didWarnStateUpdateForUnmountedComponent = {};
-
-function warnNoop(publicInstance, callerName) {
- {
- var _constructor = publicInstance.constructor;
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
- var warningKey = componentName + "." + callerName;
-
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
- return;
- }
-
- error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
-
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
- }
-}
-/**
- * This is the abstract API for an update queue.
- */
-
-
-var ReactNoopUpdateQueue = {
- /**
- * Checks whether or not this composite component is mounted.
- * @param {ReactClass} publicInstance The instance we want to test.
- * @return {boolean} True if mounted, false otherwise.
- * @protected
- * @final
- */
- isMounted: function (publicInstance) {
- return false;
- },
-
- /**
- * Forces an update. This should only be invoked when it is known with
- * certainty that we are **not** in a DOM transaction.
- *
- * You may want to call this when you know that some deeper aspect of the
- * component's state has changed but `setState` was not called.
- *
- * This will not invoke `shouldComponentUpdate`, but it will invoke
- * `componentWillUpdate` and `componentDidUpdate`.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {?function} callback Called after component is updated.
- * @param {?string} callerName name of the calling function in the public API.
- * @internal
- */
- enqueueForceUpdate: function (publicInstance, callback, callerName) {
- warnNoop(publicInstance, 'forceUpdate');
- },
-
- /**
- * Replaces all of the state. Always use this or `setState` to mutate state.
- * You should treat `this.state` as immutable.
- *
- * There is no guarantee that `this.state` will be immediately updated, so
- * accessing `this.state` after calling this method may return the old value.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {object} completeState Next state.
- * @param {?function} callback Called after component is updated.
- * @param {?string} callerName name of the calling function in the public API.
- * @internal
- */
- enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
- warnNoop(publicInstance, 'replaceState');
- },
-
- /**
- * Sets a subset of the state. This only exists because _pendingState is
- * internal. This provides a merging strategy that is not available to deep
- * properties which is confusing. TODO: Expose pendingState or don't use it
- * during the merge.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {object} partialState Next partial state to be merged with state.
- * @param {?function} callback Called after component is updated.
- * @param {?string} Name of the calling function in the public API.
- * @internal
- */
- enqueueSetState: function (publicInstance, partialState, callback, callerName) {
- warnNoop(publicInstance, 'setState');
- }
-};
-
-var emptyObject = {};
-
-{
- Object.freeze(emptyObject);
-}
-/**
- * Base class helpers for the updating state of a component.
- */
-
-
-function Component(props, context, updater) {
- this.props = props;
- this.context = context; // If a component has string refs, we will assign a different object later.
-
- this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
- // renderer.
-
- this.updater = updater || ReactNoopUpdateQueue;
-}
-
-Component.prototype.isReactComponent = {};
-/**
- * Sets a subset of the state. Always use this to mutate
- * state. You should treat `this.state` as immutable.
- *
- * There is no guarantee that `this.state` will be immediately updated, so
- * accessing `this.state` after calling this method may return the old value.
- *
- * There is no guarantee that calls to `setState` will run synchronously,
- * as they may eventually be batched together. You can provide an optional
- * callback that will be executed when the call to setState is actually
- * completed.
- *
- * When a function is provided to setState, it will be called at some point in
- * the future (not synchronously). It will be called with the up to date
- * component arguments (state, props, context). These values can be different
- * from this.* because your function may be called after receiveProps but before
- * shouldComponentUpdate, and this new state, props, and context will not yet be
- * assigned to this.
- *
- * @param {object|function} partialState Next partial state or function to
- * produce next partial state to be merged with current state.
- * @param {?function} callback Called after state is updated.
- * @final
- * @protected
- */
-
-Component.prototype.setState = function (partialState, callback) {
- if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
- {
- throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
- }
- }
-
- this.updater.enqueueSetState(this, partialState, callback, 'setState');
-};
-/**
- * Forces an update. This should only be invoked when it is known with
- * certainty that we are **not** in a DOM transaction.
- *
- * You may want to call this when you know that some deeper aspect of the
- * component's state has changed but `setState` was not called.
- *
- * This will not invoke `shouldComponentUpdate`, but it will invoke
- * `componentWillUpdate` and `componentDidUpdate`.
- *
- * @param {?function} callback Called after update is complete.
- * @final
- * @protected
- */
-
-
-Component.prototype.forceUpdate = function (callback) {
- this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
-};
-/**
- * Deprecated APIs. These APIs used to exist on classic React classes but since
- * we would like to deprecate them, we're not going to move them over to this
- * modern base class. Instead, we define a getter that warns if it's accessed.
- */
-
-
-{
- var deprecatedAPIs = {
- isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
- replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
- };
-
- var defineDeprecationWarning = function (methodName, info) {
- Object.defineProperty(Component.prototype, methodName, {
- get: function () {
- warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
-
- return undefined;
- }
- });
- };
-
- for (var fnName in deprecatedAPIs) {
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
- }
- }
-}
-
-function ComponentDummy() {}
-
-ComponentDummy.prototype = Component.prototype;
-/**
- * Convenience component with default shallow equality check for sCU.
- */
-
-function PureComponent(props, context, updater) {
- this.props = props;
- this.context = context; // If a component has string refs, we will assign a different object later.
-
- this.refs = emptyObject;
- this.updater = updater || ReactNoopUpdateQueue;
-}
-
-var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
-pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
-
-_assign(pureComponentPrototype, Component.prototype);
-
-pureComponentPrototype.isPureReactComponent = true;
-
-// an immutable object with a single mutable value
-function createRef() {
- var refObject = {
- current: null
- };
-
- {
- Object.seal(refObject);
- }
-
- return refObject;
-}
-
-function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
-}
-
-function getContextName(type) {
- return type.displayName || 'Context';
-}
-
-function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case exports.Fragment:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case exports.Profiler:
- return 'Profiler';
-
- case exports.StrictMode:
- return 'StrictMode';
-
- case exports.Suspense:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
-}
-
-var hasOwnProperty = Object.prototype.hasOwnProperty;
-var RESERVED_PROPS = {
- key: true,
- ref: true,
- __self: true,
- __source: true
-};
-var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
-
-{
- didWarnAboutStringRefs = {};
-}
-
-function hasValidRef(config) {
- {
- if (hasOwnProperty.call(config, 'ref')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
-
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
-
- return config.ref !== undefined;
-}
-
-function hasValidKey(config) {
- {
- if (hasOwnProperty.call(config, 'key')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
-
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
-
- return config.key !== undefined;
-}
-
-function defineKeyPropWarningGetter(props, displayName) {
- var warnAboutAccessingKey = function () {
- {
- if (!specialPropKeyWarningShown) {
- specialPropKeyWarningShown = true;
-
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
- }
- }
- };
-
- warnAboutAccessingKey.isReactWarning = true;
- Object.defineProperty(props, 'key', {
- get: warnAboutAccessingKey,
- configurable: true
- });
-}
-
-function defineRefPropWarningGetter(props, displayName) {
- var warnAboutAccessingRef = function () {
- {
- if (!specialPropRefWarningShown) {
- specialPropRefWarningShown = true;
-
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
- }
- }
- };
-
- warnAboutAccessingRef.isReactWarning = true;
- Object.defineProperty(props, 'ref', {
- get: warnAboutAccessingRef,
- configurable: true
- });
-}
-
-function warnIfStringRefCannotBeAutoConverted(config) {
- {
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
- var componentName = getComponentName(ReactCurrentOwner.current.type);
-
- if (!didWarnAboutStringRefs[componentName]) {
- error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
-
- didWarnAboutStringRefs[componentName] = true;
- }
- }
- }
-}
-/**
- * Factory method to create a new React element. This no longer adheres to
- * the class pattern, so do not use new to call it. Also, instanceof check
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
- * if something is a React Element.
- *
- * @param {*} type
- * @param {*} props
- * @param {*} key
- * @param {string|object} ref
- * @param {*} owner
- * @param {*} self A *temporary* helper to detect places where `this` is
- * different from the `owner` when React.createElement is called, so that we
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
- * functions, and as long as `this` and owner are the same, there will be no
- * change in behavior.
- * @param {*} source An annotation object (added by a transpiler or otherwise)
- * indicating filename, line number, and/or other information.
- * @internal
- */
-
-
-var ReactElement = function (type, key, ref, self, source, owner, props) {
- var element = {
- // This tag allows us to uniquely identify this as a React Element
- $$typeof: REACT_ELEMENT_TYPE,
- // Built-in properties that belong on the element
- type: type,
- key: key,
- ref: ref,
- props: props,
- // Record the component responsible for creating this element.
- _owner: owner
- };
-
- {
- // The validation flag is currently mutative. We put it on
- // an external backing store so that we can freeze the whole object.
- // This can be replaced with a WeakMap once they are implemented in
- // commonly used development environments.
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
- // the validation flag non-enumerable (where possible, which should
- // include every environment we run tests in), so the test framework
- // ignores it.
-
- Object.defineProperty(element._store, 'validated', {
- configurable: false,
- enumerable: false,
- writable: true,
- value: false
- }); // self and source are DEV only properties.
-
- Object.defineProperty(element, '_self', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: self
- }); // Two elements created in two different places should be considered
- // equal for testing purposes and therefore we hide it from enumeration.
-
- Object.defineProperty(element, '_source', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: source
- });
-
- if (Object.freeze) {
- Object.freeze(element.props);
- Object.freeze(element);
- }
- }
-
- return element;
-};
-/**
- * Create and return a new ReactElement of the given type.
- * See https://reactjs.org/docs/react-api.html#createelement
- */
-
-function createElement(type, config, children) {
- var propName; // Reserved names are extracted
-
- var props = {};
- var key = null;
- var ref = null;
- var self = null;
- var source = null;
-
- if (config != null) {
- if (hasValidRef(config)) {
- ref = config.ref;
-
- {
- warnIfStringRefCannotBeAutoConverted(config);
- }
- }
-
- if (hasValidKey(config)) {
- key = '' + config.key;
- }
-
- self = config.__self === undefined ? null : config.__self;
- source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
-
- for (propName in config) {
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- props[propName] = config[propName];
- }
- }
- } // Children can be more than one argument, and those are transferred onto
- // the newly allocated props object.
-
-
- var childrenLength = arguments.length - 2;
-
- if (childrenLength === 1) {
- props.children = children;
- } else if (childrenLength > 1) {
- var childArray = Array(childrenLength);
-
- for (var i = 0; i < childrenLength; i++) {
- childArray[i] = arguments[i + 2];
- }
-
- {
- if (Object.freeze) {
- Object.freeze(childArray);
- }
- }
-
- props.children = childArray;
- } // Resolve default props
-
-
- if (type && type.defaultProps) {
- var defaultProps = type.defaultProps;
-
- for (propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
- }
-
- {
- if (key || ref) {
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
-
- if (key) {
- defineKeyPropWarningGetter(props, displayName);
- }
-
- if (ref) {
- defineRefPropWarningGetter(props, displayName);
- }
- }
- }
-
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
-}
-function cloneAndReplaceKey(oldElement, newKey) {
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
- return newElement;
-}
-/**
- * Clone and return a new ReactElement using element as the starting point.
- * See https://reactjs.org/docs/react-api.html#cloneelement
- */
-
-function cloneElement(element, config, children) {
- if (!!(element === null || element === undefined)) {
- {
- throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
- }
- }
-
- var propName; // Original props are copied
-
- var props = _assign({}, element.props); // Reserved names are extracted
-
-
- var key = element.key;
- var ref = element.ref; // Self is preserved since the owner is preserved.
-
- var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
- // transpiler, and the original source is probably a better indicator of the
- // true owner.
-
- var source = element._source; // Owner will be preserved, unless ref is overridden
-
- var owner = element._owner;
-
- if (config != null) {
- if (hasValidRef(config)) {
- // Silently steal the ref from the parent.
- ref = config.ref;
- owner = ReactCurrentOwner.current;
- }
-
- if (hasValidKey(config)) {
- key = '' + config.key;
- } // Remaining properties override existing props
-
-
- var defaultProps;
-
- if (element.type && element.type.defaultProps) {
- defaultProps = element.type.defaultProps;
- }
-
- for (propName in config) {
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- if (config[propName] === undefined && defaultProps !== undefined) {
- // Resolve default props
- props[propName] = defaultProps[propName];
- } else {
- props[propName] = config[propName];
- }
- }
- }
- } // Children can be more than one argument, and those are transferred onto
- // the newly allocated props object.
-
-
- var childrenLength = arguments.length - 2;
-
- if (childrenLength === 1) {
- props.children = children;
- } else if (childrenLength > 1) {
- var childArray = Array(childrenLength);
-
- for (var i = 0; i < childrenLength; i++) {
- childArray[i] = arguments[i + 2];
- }
-
- props.children = childArray;
- }
-
- return ReactElement(element.type, key, ref, self, source, owner, props);
-}
-/**
- * Verifies the object is a ReactElement.
- * See https://reactjs.org/docs/react-api.html#isvalidelement
- * @param {?object} object
- * @return {boolean} True if `object` is a ReactElement.
- * @final
- */
-
-function isValidElement(object) {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
-}
-
-var SEPARATOR = '.';
-var SUBSEPARATOR = ':';
-/**
- * Escape and wrap key so it is safe to use as a reactid
- *
- * @param {string} key to be escaped.
- * @return {string} the escaped key.
- */
-
-function escape(key) {
- var escapeRegex = /[=:]/g;
- var escaperLookup = {
- '=': '=0',
- ':': '=2'
- };
- var escapedString = key.replace(escapeRegex, function (match) {
- return escaperLookup[match];
- });
- return '$' + escapedString;
-}
-/**
- * TODO: Test that a single child and an array with one item have the same key
- * pattern.
- */
-
-
-var didWarnAboutMaps = false;
-var userProvidedKeyEscapeRegex = /\/+/g;
-
-function escapeUserProvidedKey(text) {
- return text.replace(userProvidedKeyEscapeRegex, '$&/');
-}
-/**
- * Generate a key string that identifies a element within a set.
- *
- * @param {*} element A element that could contain a manual key.
- * @param {number} index Index that is used if a manual key is not provided.
- * @return {string}
- */
-
-
-function getElementKey(element, index) {
- // Do some typechecking here since we call this blindly. We want to ensure
- // that we don't block potential future ES APIs.
- if (typeof element === 'object' && element !== null && element.key != null) {
- // Explicit key
- return escape('' + element.key);
- } // Implicit key determined by the index in the set
-
-
- return index.toString(36);
-}
-
-function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
- var type = typeof children;
-
- if (type === 'undefined' || type === 'boolean') {
- // All of the above are perceived as null.
- children = null;
- }
-
- var invokeCallback = false;
-
- if (children === null) {
- invokeCallback = true;
- } else {
- switch (type) {
- case 'string':
- case 'number':
- invokeCallback = true;
- break;
-
- case 'object':
- switch (children.$$typeof) {
- case REACT_ELEMENT_TYPE:
- case REACT_PORTAL_TYPE:
- invokeCallback = true;
- }
-
- }
- }
-
- if (invokeCallback) {
- var _child = children;
- var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
- // so that it's consistent if the number of children grows:
-
- var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
-
- if (Array.isArray(mappedChild)) {
- var escapedChildKey = '';
-
- if (childKey != null) {
- escapedChildKey = escapeUserProvidedKey(childKey) + '/';
- }
-
- mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
- return c;
- });
- } else if (mappedChild != null) {
- if (isValidElement(mappedChild)) {
- mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
- // traverseAllChildren used to do for objects as children
- escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
- mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
- escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
- }
-
- array.push(mappedChild);
- }
-
- return 1;
- }
-
- var child;
- var nextName;
- var subtreeCount = 0; // Count of children found in the current subtree.
-
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
-
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- child = children[i];
- nextName = nextNamePrefix + getElementKey(child, i);
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
- }
- } else {
- var iteratorFn = getIteratorFn(children);
-
- if (typeof iteratorFn === 'function') {
- var iterableChildren = children;
-
- {
- // Warn about using Maps as children
- if (iteratorFn === iterableChildren.entries) {
- if (!didWarnAboutMaps) {
- warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
- }
-
- didWarnAboutMaps = true;
- }
- }
-
- var iterator = iteratorFn.call(iterableChildren);
- var step;
- var ii = 0;
-
- while (!(step = iterator.next()).done) {
- child = step.value;
- nextName = nextNamePrefix + getElementKey(child, ii++);
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
- }
- } else if (type === 'object') {
- var childrenString = '' + children;
-
- {
- {
- throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). If you meant to render a collection of children, use an array instead." );
- }
- }
- }
- }
-
- return subtreeCount;
-}
-
-/**
- * Maps children that are typically specified as `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
- *
- * The provided mapFunction(child, index) will be called for each
- * leaf child.
- *
- * @param {?*} children Children tree container.
- * @param {function(*, int)} func The map function.
- * @param {*} context Context for mapFunction.
- * @return {object} Object containing the ordered map of results.
- */
-function mapChildren(children, func, context) {
- if (children == null) {
- return children;
- }
-
- var result = [];
- var count = 0;
- mapIntoArray(children, result, '', '', function (child) {
- return func.call(context, child, count++);
- });
- return result;
-}
-/**
- * Count the number of children that are typically specified as
- * `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
- *
- * @param {?*} children Children tree container.
- * @return {number} The number of children.
- */
-
-
-function countChildren(children) {
- var n = 0;
- mapChildren(children, function () {
- n++; // Don't return anything
- });
- return n;
-}
-
-/**
- * Iterates through children that are typically specified as `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
- *
- * The provided forEachFunc(child, index) will be called for each
- * leaf child.
- *
- * @param {?*} children Children tree container.
- * @param {function(*, int)} forEachFunc
- * @param {*} forEachContext Context for forEachContext.
- */
-function forEachChildren(children, forEachFunc, forEachContext) {
- mapChildren(children, function () {
- forEachFunc.apply(this, arguments); // Don't return anything.
- }, forEachContext);
-}
-/**
- * Flatten a children object (typically specified as `props.children`) and
- * return an array with appropriately re-keyed children.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
- */
-
-
-function toArray(children) {
- return mapChildren(children, function (child) {
- return child;
- }) || [];
-}
-/**
- * Returns the first child in a collection of children and verifies that there
- * is only one child in the collection.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
- *
- * The current implementation of this function assumes that a single child gets
- * passed without a wrapper, but the purpose of this helper function is to
- * abstract away the particular structure of children.
- *
- * @param {?object} children Child collection structure.
- * @return {ReactElement} The first and only `ReactElement` contained in the
- * structure.
- */
-
-
-function onlyChild(children) {
- if (!isValidElement(children)) {
- {
- throw Error( "React.Children.only expected to receive a single React element child." );
- }
- }
-
- return children;
-}
-
-function createContext(defaultValue, calculateChangedBits) {
- if (calculateChangedBits === undefined) {
- calculateChangedBits = null;
- } else {
- {
- if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
- error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
- }
- }
- }
-
- var context = {
- $$typeof: REACT_CONTEXT_TYPE,
- _calculateChangedBits: calculateChangedBits,
- // As a workaround to support multiple concurrent renderers, we categorize
- // some renderers as primary and others as secondary. We only expect
- // there to be two concurrent renderers at most: React Native (primary) and
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
- // Secondary renderers store their context values on separate fields.
- _currentValue: defaultValue,
- _currentValue2: defaultValue,
- // Used to track how many concurrent renderers this context currently
- // supports within in a single renderer. Such as parallel server rendering.
- _threadCount: 0,
- // These are circular
- Provider: null,
- Consumer: null
- };
- context.Provider = {
- $$typeof: REACT_PROVIDER_TYPE,
- _context: context
- };
- var hasWarnedAboutUsingNestedContextConsumers = false;
- var hasWarnedAboutUsingConsumerProvider = false;
- var hasWarnedAboutDisplayNameOnConsumer = false;
-
- {
- // A separate object, but proxies back to the original context object for
- // backwards compatibility. It has a different $$typeof, so we can properly
- // warn for the incorrect usage of Context as a Consumer.
- var Consumer = {
- $$typeof: REACT_CONTEXT_TYPE,
- _context: context,
- _calculateChangedBits: context._calculateChangedBits
- }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
-
- Object.defineProperties(Consumer, {
- Provider: {
- get: function () {
- if (!hasWarnedAboutUsingConsumerProvider) {
- hasWarnedAboutUsingConsumerProvider = true;
-
- error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
- }
-
- return context.Provider;
- },
- set: function (_Provider) {
- context.Provider = _Provider;
- }
- },
- _currentValue: {
- get: function () {
- return context._currentValue;
- },
- set: function (_currentValue) {
- context._currentValue = _currentValue;
- }
- },
- _currentValue2: {
- get: function () {
- return context._currentValue2;
- },
- set: function (_currentValue2) {
- context._currentValue2 = _currentValue2;
- }
- },
- _threadCount: {
- get: function () {
- return context._threadCount;
- },
- set: function (_threadCount) {
- context._threadCount = _threadCount;
- }
- },
- Consumer: {
- get: function () {
- if (!hasWarnedAboutUsingNestedContextConsumers) {
- hasWarnedAboutUsingNestedContextConsumers = true;
-
- error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
-
- return context.Consumer;
- }
- },
- displayName: {
- get: function () {
- return context.displayName;
- },
- set: function (displayName) {
- if (!hasWarnedAboutDisplayNameOnConsumer) {
- warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
-
- hasWarnedAboutDisplayNameOnConsumer = true;
- }
- }
- }
- }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
-
- context.Consumer = Consumer;
- }
-
- {
- context._currentRenderer = null;
- context._currentRenderer2 = null;
- }
-
- return context;
-}
-
-var Uninitialized = -1;
-var Pending = 0;
-var Resolved = 1;
-var Rejected = 2;
-
-function lazyInitializer(payload) {
- if (payload._status === Uninitialized) {
- var ctor = payload._result;
- var thenable = ctor(); // Transition to the next state.
-
- var pending = payload;
- pending._status = Pending;
- pending._result = thenable;
- thenable.then(function (moduleObject) {
- if (payload._status === Pending) {
- var defaultExport = moduleObject.default;
-
- {
- if (defaultExport === undefined) {
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
- }
- } // Transition to the next state.
-
-
- var resolved = payload;
- resolved._status = Resolved;
- resolved._result = defaultExport;
- }
- }, function (error) {
- if (payload._status === Pending) {
- // Transition to the next state.
- var rejected = payload;
- rejected._status = Rejected;
- rejected._result = error;
- }
- });
- }
-
- if (payload._status === Resolved) {
- return payload._result;
- } else {
- throw payload._result;
- }
-}
-
-function lazy(ctor) {
- var payload = {
- // We use these fields to store the result.
- _status: -1,
- _result: ctor
- };
- var lazyType = {
- $$typeof: REACT_LAZY_TYPE,
- _payload: payload,
- _init: lazyInitializer
- };
-
- {
- // In production, this would just set it on the object.
- var defaultProps;
- var propTypes; // $FlowFixMe
-
- Object.defineProperties(lazyType, {
- defaultProps: {
- configurable: true,
- get: function () {
- return defaultProps;
- },
- set: function (newDefaultProps) {
- error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
-
- defaultProps = newDefaultProps; // Match production behavior more closely:
- // $FlowFixMe
-
- Object.defineProperty(lazyType, 'defaultProps', {
- enumerable: true
- });
- }
- },
- propTypes: {
- configurable: true,
- get: function () {
- return propTypes;
- },
- set: function (newPropTypes) {
- error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
-
- propTypes = newPropTypes; // Match production behavior more closely:
- // $FlowFixMe
-
- Object.defineProperty(lazyType, 'propTypes', {
- enumerable: true
- });
- }
- }
- });
- }
-
- return lazyType;
-}
-
-function forwardRef(render) {
- {
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
- error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
- } else if (typeof render !== 'function') {
- error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
- } else {
- if (render.length !== 0 && render.length !== 2) {
- error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
- }
- }
-
- if (render != null) {
- if (render.defaultProps != null || render.propTypes != null) {
- error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
- }
- }
- }
-
- var elementType = {
- $$typeof: REACT_FORWARD_REF_TYPE,
- render: render
- };
-
- {
- var ownName;
- Object.defineProperty(elementType, 'displayName', {
- enumerable: false,
- configurable: true,
- get: function () {
- return ownName;
- },
- set: function (name) {
- ownName = name;
-
- if (render.displayName == null) {
- render.displayName = name;
- }
- }
- });
- }
-
- return elementType;
-}
-
-// Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
-var enableScopeAPI = false; // Experimental Create Event Handle API.
-
-function isValidElementType(type) {
- if (typeof type === 'string' || typeof type === 'function') {
- return true;
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
-
-
- if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
- return true;
- }
-
- if (typeof type === 'object' && type !== null) {
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
- return true;
- }
- }
-
- return false;
-}
-
-function memo(type, compare) {
- {
- if (!isValidElementType(type)) {
- error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
- }
- }
-
- var elementType = {
- $$typeof: REACT_MEMO_TYPE,
- type: type,
- compare: compare === undefined ? null : compare
- };
-
- {
- var ownName;
- Object.defineProperty(elementType, 'displayName', {
- enumerable: false,
- configurable: true,
- get: function () {
- return ownName;
- },
- set: function (name) {
- ownName = name;
-
- if (type.displayName == null) {
- type.displayName = name;
- }
- }
- });
- }
-
- return elementType;
-}
-
-function resolveDispatcher() {
- var dispatcher = ReactCurrentDispatcher.current;
-
- if (!(dispatcher !== null)) {
- {
- throw 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
-
- return dispatcher;
-}
-
-function useContext(Context, unstable_observedBits) {
- var dispatcher = resolveDispatcher();
-
- {
- if (unstable_observedBits !== undefined) {
- error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://reactjs.org/link/rules-of-hooks' : '');
- } // TODO: add a more generic warning for invalid values.
-
-
- if (Context._context !== undefined) {
- var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
- // and nobody should be using this in existing code.
-
- if (realContext.Consumer === Context) {
- error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
- } else if (realContext.Provider === Context) {
- error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
- }
- }
- }
-
- return dispatcher.useContext(Context, unstable_observedBits);
-}
-function useState(initialState) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useState(initialState);
-}
-function useReducer(reducer, initialArg, init) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useReducer(reducer, initialArg, init);
-}
-function useRef(initialValue) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useRef(initialValue);
-}
-function useEffect(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useEffect(create, deps);
-}
-function useLayoutEffect(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useLayoutEffect(create, deps);
-}
-function useCallback(callback, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useCallback(callback, deps);
-}
-function useMemo(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useMemo(create, deps);
-}
-function useImperativeHandle(ref, create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useImperativeHandle(ref, create, deps);
-}
-function useDebugValue(value, formatterFn) {
- {
- var dispatcher = resolveDispatcher();
- return dispatcher.useDebugValue(value, formatterFn);
- }
-}
-
-// Helpers to patch console.logs to avoid logging during side-effect free
-// replaying on render function. This currently only patches the object
-// lazily which won't cover if the log function was extracted eagerly.
-// We could also eagerly patch the method.
-var disabledDepth = 0;
-var prevLog;
-var prevInfo;
-var prevWarn;
-var prevError;
-var prevGroup;
-var prevGroupCollapsed;
-var prevGroupEnd;
-
-function disabledLog() {}
-
-disabledLog.__reactDisabledLog = true;
-function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
-}
-function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: _assign({}, props, {
- value: prevLog
- }),
- info: _assign({}, props, {
- value: prevInfo
- }),
- warn: _assign({}, props, {
- value: prevWarn
- }),
- error: _assign({}, props, {
- value: prevError
- }),
- group: _assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: _assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: _assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
-}
-
-var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
-var prefix;
-function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
-}
-var reentry = false;
-var componentFrameCache;
-
-{
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
-}
-
-function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher$1.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher$1.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
-}
-function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
-}
-
-function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
-}
-
-function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case exports.Suspense:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
-}
-
-var loggedTypeFailures = {};
-var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
-function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
- }
- }
-}
-
-function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
-}
-
-function setCurrentlyValidatingElement$1(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- setExtraStackFrame(stack);
- } else {
- setExtraStackFrame(null);
- }
- }
-}
-
-var propTypesMisspellWarningShown;
-
-{
- propTypesMisspellWarningShown = false;
-}
-
-function getDeclarationErrorAddendum() {
- if (ReactCurrentOwner.current) {
- var name = getComponentName(ReactCurrentOwner.current.type);
-
- if (name) {
- return '\n\nCheck the render method of `' + name + '`.';
- }
- }
-
- return '';
-}
-
-function getSourceInfoErrorAddendum(source) {
- if (source !== undefined) {
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
- var lineNumber = source.lineNumber;
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
- }
-
- return '';
-}
-
-function getSourceInfoErrorAddendumForProps(elementProps) {
- if (elementProps !== null && elementProps !== undefined) {
- return getSourceInfoErrorAddendum(elementProps.__source);
- }
-
- return '';
-}
-/**
- * Warn if there's no key explicitly set on dynamic arrays of children or
- * object keys are not valid. This allows us to keep track of children between
- * updates.
- */
-
-
-var ownerHasKeyUseWarning = {};
-
-function getCurrentComponentErrorInfo(parentType) {
- var info = getDeclarationErrorAddendum();
-
- if (!info) {
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
-
- if (parentName) {
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
- }
- }
-
- return info;
-}
-/**
- * Warn if the element doesn't have an explicit key assigned to it.
- * This element is in an array. The array could grow and shrink or be
- * reordered. All children that haven't already been validated are required to
- * have a "key" property assigned to it. Error statuses are cached so a warning
- * will only be shown once.
- *
- * @internal
- * @param {ReactElement} element Element that requires a key.
- * @param {*} parentType element's parent's type.
- */
-
-
-function validateExplicitKey(element, parentType) {
- if (!element._store || element._store.validated || element.key != null) {
- return;
- }
-
- element._store.validated = true;
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
-
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
- return;
- }
-
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
- // property, it may be the creator of the child that's responsible for
- // assigning it a key.
-
- var childOwner = '';
-
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
- // Give the component that originally created this child.
- childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
- }
-
- {
- setCurrentlyValidatingElement$1(element);
-
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
-
- setCurrentlyValidatingElement$1(null);
- }
-}
-/**
- * Ensure that every element either is passed in a static location, in an
- * array with an explicit keys property defined, or in an object literal
- * with valid key property.
- *
- * @internal
- * @param {ReactNode} node Statically passed child of any type.
- * @param {*} parentType node's parent's type.
- */
-
-
-function validateChildKeys(node, parentType) {
- if (typeof node !== 'object') {
- return;
- }
-
- if (Array.isArray(node)) {
- for (var i = 0; i < node.length; i++) {
- var child = node[i];
-
- if (isValidElement(child)) {
- validateExplicitKey(child, parentType);
- }
- }
- } else if (isValidElement(node)) {
- // This element was passed in a valid location.
- if (node._store) {
- node._store.validated = true;
- }
- } else if (node) {
- var iteratorFn = getIteratorFn(node);
-
- if (typeof iteratorFn === 'function') {
- // Entry iterators used to provide implicit keys,
- // but now we print a separate warning for them later.
- if (iteratorFn !== node.entries) {
- var iterator = iteratorFn.call(node);
- var step;
-
- while (!(step = iterator.next()).done) {
- if (isValidElement(step.value)) {
- validateExplicitKey(step.value, parentType);
- }
- }
- }
- }
- }
-}
-/**
- * Given an element, validate that its props follow the propTypes definition,
- * provided by the type.
- *
- * @param {ReactElement} element
- */
-
-
-function validatePropTypes(element) {
- {
- var type = element.type;
-
- if (type === null || type === undefined || typeof type === 'string') {
- return;
- }
-
- var propTypes;
-
- if (typeof type === 'function') {
- propTypes = type.propTypes;
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
- // Inner props are checked in the reconciler.
- type.$$typeof === REACT_MEMO_TYPE)) {
- propTypes = type.propTypes;
- } else {
- return;
- }
-
- if (propTypes) {
- // Intentionally inside to avoid triggering lazy initializers:
- var name = getComponentName(type);
- checkPropTypes(propTypes, element.props, 'prop', name, element);
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
-
- var _name = getComponentName(type);
-
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
- }
-
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
- }
- }
-}
-/**
- * Given a fragment, validate that it can only be provided with fragment props
- * @param {ReactElement} fragment
- */
-
-
-function validateFragmentProps(fragment) {
- {
- var keys = Object.keys(fragment.props);
-
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
-
- if (key !== 'children' && key !== 'key') {
- setCurrentlyValidatingElement$1(fragment);
-
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
-
- setCurrentlyValidatingElement$1(null);
- break;
- }
- }
-
- if (fragment.ref !== null) {
- setCurrentlyValidatingElement$1(fragment);
-
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
-
- setCurrentlyValidatingElement$1(null);
- }
- }
-}
-function createElementWithValidation(type, props, children) {
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
- // succeed and there will likely be errors in render.
-
- if (!validType) {
- var info = '';
-
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
- }
-
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
-
- if (sourceInfo) {
- info += sourceInfo;
- } else {
- info += getDeclarationErrorAddendum();
- }
-
- var typeString;
-
- if (type === null) {
- typeString = 'null';
- } else if (Array.isArray(type)) {
- typeString = 'array';
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
- info = ' Did you accidentally export a JSX literal instead of a component?';
- } else {
- typeString = typeof type;
- }
-
- {
- error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
- }
- }
-
- var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
- // TODO: Drop this when these are no longer allowed as the type argument.
-
- if (element == null) {
- return element;
- } // Skip key warning if the type isn't valid since our key validation logic
- // doesn't expect a non-string/function type and can throw confusing errors.
- // We don't want exception behavior to differ between dev and prod.
- // (Rendering will throw with a helpful message and as soon as the type is
- // fixed, the key warnings will appear.)
-
-
- if (validType) {
- for (var i = 2; i < arguments.length; i++) {
- validateChildKeys(arguments[i], type);
- }
- }
-
- if (type === exports.Fragment) {
- validateFragmentProps(element);
- } else {
- validatePropTypes(element);
- }
-
- return element;
-}
-var didWarnAboutDeprecatedCreateFactory = false;
-function createFactoryWithValidation(type) {
- var validatedFactory = createElementWithValidation.bind(null, type);
- validatedFactory.type = type;
-
- {
- if (!didWarnAboutDeprecatedCreateFactory) {
- didWarnAboutDeprecatedCreateFactory = true;
-
- warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
- } // Legacy hook: remove it
-
-
- Object.defineProperty(validatedFactory, 'type', {
- enumerable: false,
- get: function () {
- warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
-
- Object.defineProperty(this, 'type', {
- value: type
- });
- return type;
- }
- });
- }
-
- return validatedFactory;
-}
-function cloneElementWithValidation(element, props, children) {
- var newElement = cloneElement.apply(this, arguments);
-
- for (var i = 2; i < arguments.length; i++) {
- validateChildKeys(arguments[i], newElement.type);
- }
-
- validatePropTypes(newElement);
- return newElement;
-}
-
-{
-
- try {
- var frozenObject = Object.freeze({});
- /* eslint-disable no-new */
-
- new Map([[frozenObject, null]]);
- new Set([frozenObject]);
- /* eslint-enable no-new */
- } catch (e) {
- }
-}
-
-var createElement$1 = createElementWithValidation ;
-var cloneElement$1 = cloneElementWithValidation ;
-var createFactory = createFactoryWithValidation ;
-var Children = {
- map: mapChildren,
- forEach: forEachChildren,
- count: countChildren,
- toArray: toArray,
- only: onlyChild
-};
-
-exports.Children = Children;
-exports.Component = Component;
-exports.PureComponent = PureComponent;
-exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
-exports.cloneElement = cloneElement$1;
-exports.createContext = createContext;
-exports.createElement = createElement$1;
-exports.createFactory = createFactory;
-exports.createRef = createRef;
-exports.forwardRef = forwardRef;
-exports.isValidElement = isValidElement;
-exports.lazy = lazy;
-exports.memo = memo;
-exports.useCallback = useCallback;
-exports.useContext = useContext;
-exports.useDebugValue = useDebugValue;
-exports.useEffect = useEffect;
-exports.useImperativeHandle = useImperativeHandle;
-exports.useLayoutEffect = useLayoutEffect;
-exports.useMemo = useMemo;
-exports.useReducer = useReducer;
-exports.useRef = useRef;
-exports.useState = useState;
-exports.version = ReactVersion;
- })();
-}
diff --git a/node_modules/react/cjs/react.production.min.js b/node_modules/react/cjs/react.production.min.js
deleted file mode 100644
index 9128695..0000000
--- a/node_modules/react/cjs/react.production.min.js
+++ /dev/null
@@ -1,23 +0,0 @@
-/** @license React v17.0.2
- * react.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var l=require("object-assign"),n=60103,p=60106;exports.Fragment=60107;exports.StrictMode=60108;exports.Profiler=60114;var q=60109,r=60110,t=60112;exports.Suspense=60113;var u=60115,v=60116;
-if("function"===typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element");p=w("react.portal");exports.Fragment=w("react.fragment");exports.StrictMode=w("react.strict_mode");exports.Profiler=w("react.profiler");q=w("react.provider");r=w("react.context");t=w("react.forward_ref");exports.Suspense=w("react.suspense");u=w("react.memo");v=w("react.lazy")}var x="function"===typeof Symbol&&Symbol.iterator;
-function y(a){if(null===a||"object"!==typeof a)return null;a=x&&a[x]||a["@@iterator"];return"function"===typeof a?a:null}function z(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
-var A={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},B={};function C(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}C.prototype.isReactComponent={};C.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(z(85));this.updater.enqueueSetState(this,a,b,"setState")};C.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};
-function D(){}D.prototype=C.prototype;function E(a,b,c){this.props=a;this.context=b;this.refs=B;this.updater=c||A}var F=E.prototype=new D;F.constructor=E;l(F,C.prototype);F.isPureReactComponent=!0;var G={current:null},H=Object.prototype.hasOwnProperty,I={key:!0,ref:!0,__self:!0,__source:!0};
-function J(a,b,c){var e,d={},k=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)H.call(b,e)&&!I.hasOwnProperty(e)&&(d[e]=b[e]);var g=arguments.length-2;if(1===g)d.children=c;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];d.children=f}if(a&&a.defaultProps)for(e in g=a.defaultProps,g)void 0===d[e]&&(d[e]=g[e]);return{$$typeof:n,type:a,key:k,ref:h,props:d,_owner:G.current}}
-function K(a,b){return{$$typeof:n,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function L(a){return"object"===typeof a&&null!==a&&a.$$typeof===n}function escape(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}var M=/\/+/g;function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
-function O(a,b,c,e,d){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case n:case p:h=!0}}if(h)return h=a,d=d(h),a=""===e?"."+N(h,0):e,Array.isArray(d)?(c="",null!=a&&(c=a.replace(M,"$&/")+"/"),O(d,b,c,"",function(a){return a})):null!=d&&(L(d)&&(d=K(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(M,"$&/")+"/")+a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(Array.isArray(a))for(var g=
-0;g<a.length;g++){k=a[g];var f=e+N(k,g);h+=O(k,b,c,f,d)}else if(f=y(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=e+N(k,g++),h+=O(k,b,c,f,d);else if("object"===k)throw b=""+a,Error(z(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function P(a,b,c){if(null==a)return a;var e=[],d=0;O(a,e,"","",function(a){return b.call(c,a,d++)});return e}
-function Q(a){if(-1===a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}var R={current:null};function S(){var a=R.current;if(null===a)throw Error(z(321));return a}var T={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:G,IsSomeRendererActing:{current:!1},assign:l};
-exports.Children={map:P,forEach:function(a,b,c){P(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;P(a,function(){b++});return b},toArray:function(a){return P(a,function(a){return a})||[]},only:function(a){if(!L(a))throw Error(z(143));return a}};exports.Component=C;exports.PureComponent=E;exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=T;
-exports.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(z(267,a));var e=l({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=G.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)H.call(b,f)&&!I.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==g?g[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){g=Array(f);for(var m=0;m<f;m++)g[m]=arguments[m+2];e.children=g}return{$$typeof:n,type:a.type,
-key:d,ref:k,props:e,_owner:h}};exports.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:r,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:q,_context:a};return a.Consumer=a};exports.createElement=J;exports.createFactory=function(a){var b=J.bind(null,a);b.type=a;return b};exports.createRef=function(){return{current:null}};exports.forwardRef=function(a){return{$$typeof:t,render:a}};exports.isValidElement=L;
-exports.lazy=function(a){return{$$typeof:v,_payload:{_status:-1,_result:a},_init:Q}};exports.memo=function(a,b){return{$$typeof:u,type:a,compare:void 0===b?null:b}};exports.useCallback=function(a,b){return S().useCallback(a,b)};exports.useContext=function(a,b){return S().useContext(a,b)};exports.useDebugValue=function(){};exports.useEffect=function(a,b){return S().useEffect(a,b)};exports.useImperativeHandle=function(a,b,c){return S().useImperativeHandle(a,b,c)};
-exports.useLayoutEffect=function(a,b){return S().useLayoutEffect(a,b)};exports.useMemo=function(a,b){return S().useMemo(a,b)};exports.useReducer=function(a,b,c){return S().useReducer(a,b,c)};exports.useRef=function(a){return S().useRef(a)};exports.useState=function(a){return S().useState(a)};exports.version="17.0.2";
diff --git a/node_modules/react/index.js b/node_modules/react/index.js
deleted file mode 100644
index 999ead7..0000000
--- a/node_modules/react/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react.production.min.js');
-} else {
- module.exports = require('./cjs/react.development.js');
-}
diff --git a/node_modules/react/jsx-dev-runtime.js b/node_modules/react/jsx-dev-runtime.js
deleted file mode 100644
index 324eb11..0000000
--- a/node_modules/react/jsx-dev-runtime.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-jsx-dev-runtime.production.min.js');
-} else {
- module.exports = require('./cjs/react-jsx-dev-runtime.development.js');
-}
diff --git a/node_modules/react/jsx-runtime.js b/node_modules/react/jsx-runtime.js
deleted file mode 100644
index 0416df5..0000000
--- a/node_modules/react/jsx-runtime.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/react-jsx-runtime.production.min.js');
-} else {
- module.exports = require('./cjs/react-jsx-runtime.development.js');
-}
diff --git a/node_modules/react/package.json b/node_modules/react/package.json
deleted file mode 100644
index 936478a..0000000
--- a/node_modules/react/package.json
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "name": "react",
- "description": "React is a JavaScript library for building user interfaces.",
- "keywords": [
- "react"
- ],
- "version": "17.0.2",
- "homepage": "https://reactjs.org/",
- "bugs": "https://github.com/facebook/react/issues",
- "license": "MIT",
- "files": [
- "LICENSE",
- "README.md",
- "build-info.json",
- "index.js",
- "cjs/",
- "umd/",
- "jsx-runtime.js",
- "jsx-dev-runtime.js"
- ],
- "main": "index.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/facebook/react.git",
- "directory": "packages/react"
- },
- "engines": {
- "node": ">=0.10.0"
- },
- "dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
- },
- "browserify": {
- "transform": [
- "loose-envify"
- ]
- }
-}
diff --git a/node_modules/react/umd/react.development.js b/node_modules/react/umd/react.development.js
deleted file mode 100644
index 1124191..0000000
--- a/node_modules/react/umd/react.development.js
+++ /dev/null
@@ -1,3357 +0,0 @@
-/** @license React v17.0.2
- * react.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (global = global || self, factory(global.React = {}));
-}(this, (function (exports) { 'use strict';
-
- // TODO: this is special because it gets imported during build.
- var ReactVersion = '17.0.2';
-
- // ATTENTION
- // When adding new symbols to this file,
- // Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
- // nor polyfill, then a plain number is used for performance.
- var REACT_ELEMENT_TYPE = 0xeac7;
- var REACT_PORTAL_TYPE = 0xeaca;
- exports.Fragment = 0xeacb;
- exports.StrictMode = 0xeacc;
- exports.Profiler = 0xead2;
- var REACT_PROVIDER_TYPE = 0xeacd;
- var REACT_CONTEXT_TYPE = 0xeace;
- var REACT_FORWARD_REF_TYPE = 0xead0;
- exports.Suspense = 0xead1;
- var REACT_SUSPENSE_LIST_TYPE = 0xead8;
- var REACT_MEMO_TYPE = 0xead3;
- var REACT_LAZY_TYPE = 0xead4;
- var REACT_BLOCK_TYPE = 0xead9;
- var REACT_SERVER_BLOCK_TYPE = 0xeada;
- var REACT_FUNDAMENTAL_TYPE = 0xead5;
- var REACT_SCOPE_TYPE = 0xead7;
- var REACT_OPAQUE_ID_TYPE = 0xeae0;
- var REACT_DEBUG_TRACING_MODE_TYPE = 0xeae1;
- var REACT_OFFSCREEN_TYPE = 0xeae2;
- var REACT_LEGACY_HIDDEN_TYPE = 0xeae3;
-
- if (typeof Symbol === 'function' && Symbol.for) {
- var symbolFor = Symbol.for;
- REACT_ELEMENT_TYPE = symbolFor('react.element');
- REACT_PORTAL_TYPE = symbolFor('react.portal');
- exports.Fragment = symbolFor('react.fragment');
- exports.StrictMode = symbolFor('react.strict_mode');
- exports.Profiler = symbolFor('react.profiler');
- REACT_PROVIDER_TYPE = symbolFor('react.provider');
- REACT_CONTEXT_TYPE = symbolFor('react.context');
- REACT_FORWARD_REF_TYPE = symbolFor('react.forward_ref');
- exports.Suspense = symbolFor('react.suspense');
- REACT_SUSPENSE_LIST_TYPE = symbolFor('react.suspense_list');
- REACT_MEMO_TYPE = symbolFor('react.memo');
- REACT_LAZY_TYPE = symbolFor('react.lazy');
- REACT_BLOCK_TYPE = symbolFor('react.block');
- REACT_SERVER_BLOCK_TYPE = symbolFor('react.server.block');
- REACT_FUNDAMENTAL_TYPE = symbolFor('react.fundamental');
- REACT_SCOPE_TYPE = symbolFor('react.scope');
- REACT_OPAQUE_ID_TYPE = symbolFor('react.opaque.id');
- REACT_DEBUG_TRACING_MODE_TYPE = symbolFor('react.debug_trace_mode');
- REACT_OFFSCREEN_TYPE = symbolFor('react.offscreen');
- REACT_LEGACY_HIDDEN_TYPE = symbolFor('react.legacy_hidden');
- }
-
- var MAYBE_ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
- var FAUX_ITERATOR_SYMBOL = '@@iterator';
- function getIteratorFn(maybeIterable) {
- if (maybeIterable === null || typeof maybeIterable !== 'object') {
- return null;
- }
-
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
-
- if (typeof maybeIterator === 'function') {
- return maybeIterator;
- }
-
- return null;
- }
-
- var hasOwnProperty = Object.prototype.hasOwnProperty;
-
- var _assign = function (to, from) {
- for (var key in from) {
- if (hasOwnProperty.call(from, key)) {
- to[key] = from[key];
- }
- }
- };
-
- var assign = Object.assign || function (target, sources) {
- if (target == null) {
- throw new TypeError('Object.assign target cannot be null or undefined');
- }
-
- var to = Object(target);
-
- for (var nextIndex = 1; nextIndex < arguments.length; nextIndex++) {
- var nextSource = arguments[nextIndex];
-
- if (nextSource != null) {
- _assign(to, Object(nextSource));
- }
- }
-
- return to;
- };
-
- /**
- * Keeps track of the current dispatcher.
- */
- var ReactCurrentDispatcher = {
- /**
- * @internal
- * @type {ReactComponent}
- */
- current: null
- };
-
- /**
- * Keeps track of the current batch's configuration such as how long an update
- * should suspend for if it needs to.
- */
- var ReactCurrentBatchConfig = {
- transition: 0
- };
-
- /**
- * Keeps track of the current owner.
- *
- * The current owner is the component who should own any components that are
- * currently being constructed.
- */
- var ReactCurrentOwner = {
- /**
- * @internal
- * @type {ReactComponent}
- */
- current: null
- };
-
- var ReactDebugCurrentFrame = {};
- var currentExtraStackFrame = null;
- function setExtraStackFrame(stack) {
- {
- currentExtraStackFrame = stack;
- }
- }
-
- {
- ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
- {
- currentExtraStackFrame = stack;
- }
- }; // Stack implementation injected by the current renderer.
-
-
- ReactDebugCurrentFrame.getCurrentStack = null;
-
- ReactDebugCurrentFrame.getStackAddendum = function () {
- var stack = ''; // Add an extra top frame while an element is being validated
-
- if (currentExtraStackFrame) {
- stack += currentExtraStackFrame;
- } // Delegate to the injected renderer-specific implementation
-
-
- var impl = ReactDebugCurrentFrame.getCurrentStack;
-
- if (impl) {
- stack += impl() || '';
- }
-
- return stack;
- };
- }
-
- /**
- * Used by act() to track whether you're inside an act() scope.
- */
- var IsSomeRendererActing = {
- current: false
- };
-
- var ReactSharedInternals = {
- ReactCurrentDispatcher: ReactCurrentDispatcher,
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
- ReactCurrentOwner: ReactCurrentOwner,
- IsSomeRendererActing: IsSomeRendererActing,
- // Used by renderers to avoid bundling object-assign twice in UMD bundles:
- assign: assign
- };
-
- {
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
- }
-
- // by calls to these methods by a Babel plugin.
- //
- // In PROD (or in packages without access to React internals),
- // they are left as they are instead.
-
- function warn(format) {
- {
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
- args[_key - 1] = arguments[_key];
- }
-
- printWarning('warn', format, args);
- }
- }
- function error(format) {
- {
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
- args[_key2 - 1] = arguments[_key2];
- }
-
- printWarning('error', format, args);
- }
- }
-
- function printWarning(level, format, args) {
- // When changing this logic, you might want to also
- // update consoleWithStackDev.www.js as well.
- {
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
- var stack = ReactDebugCurrentFrame.getStackAddendum();
-
- if (stack !== '') {
- format += '%s';
- args = args.concat([stack]);
- }
-
- var argsWithFormat = args.map(function (item) {
- return '' + item;
- }); // Careful: RN currently depends on this prefix
-
- argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
- // breaks IE9: https://github.com/facebook/react/issues/13610
- // eslint-disable-next-line react-internal/no-production-logging
-
- Function.prototype.apply.call(console[level], console, argsWithFormat);
- }
- }
-
- var didWarnStateUpdateForUnmountedComponent = {};
-
- function warnNoop(publicInstance, callerName) {
- {
- var _constructor = publicInstance.constructor;
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
- var warningKey = componentName + "." + callerName;
-
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
- return;
- }
-
- error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
-
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
- }
- }
- /**
- * This is the abstract API for an update queue.
- */
-
-
- var ReactNoopUpdateQueue = {
- /**
- * Checks whether or not this composite component is mounted.
- * @param {ReactClass} publicInstance The instance we want to test.
- * @return {boolean} True if mounted, false otherwise.
- * @protected
- * @final
- */
- isMounted: function (publicInstance) {
- return false;
- },
-
- /**
- * Forces an update. This should only be invoked when it is known with
- * certainty that we are **not** in a DOM transaction.
- *
- * You may want to call this when you know that some deeper aspect of the
- * component's state has changed but `setState` was not called.
- *
- * This will not invoke `shouldComponentUpdate`, but it will invoke
- * `componentWillUpdate` and `componentDidUpdate`.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {?function} callback Called after component is updated.
- * @param {?string} callerName name of the calling function in the public API.
- * @internal
- */
- enqueueForceUpdate: function (publicInstance, callback, callerName) {
- warnNoop(publicInstance, 'forceUpdate');
- },
-
- /**
- * Replaces all of the state. Always use this or `setState` to mutate state.
- * You should treat `this.state` as immutable.
- *
- * There is no guarantee that `this.state` will be immediately updated, so
- * accessing `this.state` after calling this method may return the old value.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {object} completeState Next state.
- * @param {?function} callback Called after component is updated.
- * @param {?string} callerName name of the calling function in the public API.
- * @internal
- */
- enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
- warnNoop(publicInstance, 'replaceState');
- },
-
- /**
- * Sets a subset of the state. This only exists because _pendingState is
- * internal. This provides a merging strategy that is not available to deep
- * properties which is confusing. TODO: Expose pendingState or don't use it
- * during the merge.
- *
- * @param {ReactClass} publicInstance The instance that should rerender.
- * @param {object} partialState Next partial state to be merged with state.
- * @param {?function} callback Called after component is updated.
- * @param {?string} Name of the calling function in the public API.
- * @internal
- */
- enqueueSetState: function (publicInstance, partialState, callback, callerName) {
- warnNoop(publicInstance, 'setState');
- }
- };
-
- var emptyObject = {};
-
- {
- Object.freeze(emptyObject);
- }
- /**
- * Base class helpers for the updating state of a component.
- */
-
-
- function Component(props, context, updater) {
- this.props = props;
- this.context = context; // If a component has string refs, we will assign a different object later.
-
- this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
- // renderer.
-
- this.updater = updater || ReactNoopUpdateQueue;
- }
-
- Component.prototype.isReactComponent = {};
- /**
- * Sets a subset of the state. Always use this to mutate
- * state. You should treat `this.state` as immutable.
- *
- * There is no guarantee that `this.state` will be immediately updated, so
- * accessing `this.state` after calling this method may return the old value.
- *
- * There is no guarantee that calls to `setState` will run synchronously,
- * as they may eventually be batched together. You can provide an optional
- * callback that will be executed when the call to setState is actually
- * completed.
- *
- * When a function is provided to setState, it will be called at some point in
- * the future (not synchronously). It will be called with the up to date
- * component arguments (state, props, context). These values can be different
- * from this.* because your function may be called after receiveProps but before
- * shouldComponentUpdate, and this new state, props, and context will not yet be
- * assigned to this.
- *
- * @param {object|function} partialState Next partial state or function to
- * produce next partial state to be merged with current state.
- * @param {?function} callback Called after state is updated.
- * @final
- * @protected
- */
-
- Component.prototype.setState = function (partialState, callback) {
- if (!(typeof partialState === 'object' || typeof partialState === 'function' || partialState == null)) {
- {
- throw Error( "setState(...): takes an object of state variables to update or a function which returns an object of state variables." );
- }
- }
-
- this.updater.enqueueSetState(this, partialState, callback, 'setState');
- };
- /**
- * Forces an update. This should only be invoked when it is known with
- * certainty that we are **not** in a DOM transaction.
- *
- * You may want to call this when you know that some deeper aspect of the
- * component's state has changed but `setState` was not called.
- *
- * This will not invoke `shouldComponentUpdate`, but it will invoke
- * `componentWillUpdate` and `componentDidUpdate`.
- *
- * @param {?function} callback Called after update is complete.
- * @final
- * @protected
- */
-
-
- Component.prototype.forceUpdate = function (callback) {
- this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
- };
- /**
- * Deprecated APIs. These APIs used to exist on classic React classes but since
- * we would like to deprecate them, we're not going to move them over to this
- * modern base class. Instead, we define a getter that warns if it's accessed.
- */
-
-
- {
- var deprecatedAPIs = {
- isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
- replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
- };
-
- var defineDeprecationWarning = function (methodName, info) {
- Object.defineProperty(Component.prototype, methodName, {
- get: function () {
- warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
-
- return undefined;
- }
- });
- };
-
- for (var fnName in deprecatedAPIs) {
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
- }
- }
- }
-
- function ComponentDummy() {}
-
- ComponentDummy.prototype = Component.prototype;
- /**
- * Convenience component with default shallow equality check for sCU.
- */
-
- function PureComponent(props, context, updater) {
- this.props = props;
- this.context = context; // If a component has string refs, we will assign a different object later.
-
- this.refs = emptyObject;
- this.updater = updater || ReactNoopUpdateQueue;
- }
-
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
- pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
-
- assign(pureComponentPrototype, Component.prototype);
-
- pureComponentPrototype.isPureReactComponent = true;
-
- // an immutable object with a single mutable value
- function createRef() {
- var refObject = {
- current: null
- };
-
- {
- Object.seal(refObject);
- }
-
- return refObject;
- }
-
- function getWrappedName(outerType, innerType, wrapperName) {
- var functionName = innerType.displayName || innerType.name || '';
- return outerType.displayName || (functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName);
- }
-
- function getContextName(type) {
- return type.displayName || 'Context';
- }
-
- function getComponentName(type) {
- if (type == null) {
- // Host root, text node or just invalid type.
- return null;
- }
-
- {
- if (typeof type.tag === 'number') {
- error('Received an unexpected object in getComponentName(). ' + 'This is likely a bug in React. Please file an issue.');
- }
- }
-
- if (typeof type === 'function') {
- return type.displayName || type.name || null;
- }
-
- if (typeof type === 'string') {
- return type;
- }
-
- switch (type) {
- case exports.Fragment:
- return 'Fragment';
-
- case REACT_PORTAL_TYPE:
- return 'Portal';
-
- case exports.Profiler:
- return 'Profiler';
-
- case exports.StrictMode:
- return 'StrictMode';
-
- case exports.Suspense:
- return 'Suspense';
-
- case REACT_SUSPENSE_LIST_TYPE:
- return 'SuspenseList';
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_CONTEXT_TYPE:
- var context = type;
- return getContextName(context) + '.Consumer';
-
- case REACT_PROVIDER_TYPE:
- var provider = type;
- return getContextName(provider._context) + '.Provider';
-
- case REACT_FORWARD_REF_TYPE:
- return getWrappedName(type, type.render, 'ForwardRef');
-
- case REACT_MEMO_TYPE:
- return getComponentName(type.type);
-
- case REACT_BLOCK_TYPE:
- return getComponentName(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- return getComponentName(init(payload));
- } catch (x) {
- return null;
- }
- }
- }
- }
-
- return null;
- }
-
- var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
- var RESERVED_PROPS = {
- key: true,
- ref: true,
- __self: true,
- __source: true
- };
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
-
- {
- didWarnAboutStringRefs = {};
- }
-
- function hasValidRef(config) {
- {
- if (hasOwnProperty$1.call(config, 'ref')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
-
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
-
- return config.ref !== undefined;
- }
-
- function hasValidKey(config) {
- {
- if (hasOwnProperty$1.call(config, 'key')) {
- var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
-
- if (getter && getter.isReactWarning) {
- return false;
- }
- }
- }
-
- return config.key !== undefined;
- }
-
- function defineKeyPropWarningGetter(props, displayName) {
- var warnAboutAccessingKey = function () {
- {
- if (!specialPropKeyWarningShown) {
- specialPropKeyWarningShown = true;
-
- error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
- }
- }
- };
-
- warnAboutAccessingKey.isReactWarning = true;
- Object.defineProperty(props, 'key', {
- get: warnAboutAccessingKey,
- configurable: true
- });
- }
-
- function defineRefPropWarningGetter(props, displayName) {
- var warnAboutAccessingRef = function () {
- {
- if (!specialPropRefWarningShown) {
- specialPropRefWarningShown = true;
-
- error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
- }
- }
- };
-
- warnAboutAccessingRef.isReactWarning = true;
- Object.defineProperty(props, 'ref', {
- get: warnAboutAccessingRef,
- configurable: true
- });
- }
-
- function warnIfStringRefCannotBeAutoConverted(config) {
- {
- if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
- var componentName = getComponentName(ReactCurrentOwner.current.type);
-
- if (!didWarnAboutStringRefs[componentName]) {
- error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
-
- didWarnAboutStringRefs[componentName] = true;
- }
- }
- }
- }
- /**
- * Factory method to create a new React element. This no longer adheres to
- * the class pattern, so do not use new to call it. Also, instanceof check
- * will not work. Instead test $$typeof field against Symbol.for('react.element') to check
- * if something is a React Element.
- *
- * @param {*} type
- * @param {*} props
- * @param {*} key
- * @param {string|object} ref
- * @param {*} owner
- * @param {*} self A *temporary* helper to detect places where `this` is
- * different from the `owner` when React.createElement is called, so that we
- * can warn. We want to get rid of owner and replace string `ref`s with arrow
- * functions, and as long as `this` and owner are the same, there will be no
- * change in behavior.
- * @param {*} source An annotation object (added by a transpiler or otherwise)
- * indicating filename, line number, and/or other information.
- * @internal
- */
-
-
- var ReactElement = function (type, key, ref, self, source, owner, props) {
- var element = {
- // This tag allows us to uniquely identify this as a React Element
- $$typeof: REACT_ELEMENT_TYPE,
- // Built-in properties that belong on the element
- type: type,
- key: key,
- ref: ref,
- props: props,
- // Record the component responsible for creating this element.
- _owner: owner
- };
-
- {
- // The validation flag is currently mutative. We put it on
- // an external backing store so that we can freeze the whole object.
- // This can be replaced with a WeakMap once they are implemented in
- // commonly used development environments.
- element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
- // the validation flag non-enumerable (where possible, which should
- // include every environment we run tests in), so the test framework
- // ignores it.
-
- Object.defineProperty(element._store, 'validated', {
- configurable: false,
- enumerable: false,
- writable: true,
- value: false
- }); // self and source are DEV only properties.
-
- Object.defineProperty(element, '_self', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: self
- }); // Two elements created in two different places should be considered
- // equal for testing purposes and therefore we hide it from enumeration.
-
- Object.defineProperty(element, '_source', {
- configurable: false,
- enumerable: false,
- writable: false,
- value: source
- });
-
- if (Object.freeze) {
- Object.freeze(element.props);
- Object.freeze(element);
- }
- }
-
- return element;
- };
- /**
- * Create and return a new ReactElement of the given type.
- * See https://reactjs.org/docs/react-api.html#createelement
- */
-
- function createElement(type, config, children) {
- var propName; // Reserved names are extracted
-
- var props = {};
- var key = null;
- var ref = null;
- var self = null;
- var source = null;
-
- if (config != null) {
- if (hasValidRef(config)) {
- ref = config.ref;
-
- {
- warnIfStringRefCannotBeAutoConverted(config);
- }
- }
-
- if (hasValidKey(config)) {
- key = '' + config.key;
- }
-
- self = config.__self === undefined ? null : config.__self;
- source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
-
- for (propName in config) {
- if (hasOwnProperty$1.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- props[propName] = config[propName];
- }
- }
- } // Children can be more than one argument, and those are transferred onto
- // the newly allocated props object.
-
-
- var childrenLength = arguments.length - 2;
-
- if (childrenLength === 1) {
- props.children = children;
- } else if (childrenLength > 1) {
- var childArray = Array(childrenLength);
-
- for (var i = 0; i < childrenLength; i++) {
- childArray[i] = arguments[i + 2];
- }
-
- {
- if (Object.freeze) {
- Object.freeze(childArray);
- }
- }
-
- props.children = childArray;
- } // Resolve default props
-
-
- if (type && type.defaultProps) {
- var defaultProps = type.defaultProps;
-
- for (propName in defaultProps) {
- if (props[propName] === undefined) {
- props[propName] = defaultProps[propName];
- }
- }
- }
-
- {
- if (key || ref) {
- var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
-
- if (key) {
- defineKeyPropWarningGetter(props, displayName);
- }
-
- if (ref) {
- defineRefPropWarningGetter(props, displayName);
- }
- }
- }
-
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
- }
- function cloneAndReplaceKey(oldElement, newKey) {
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
- return newElement;
- }
- /**
- * Clone and return a new ReactElement using element as the starting point.
- * See https://reactjs.org/docs/react-api.html#cloneelement
- */
-
- function cloneElement(element, config, children) {
- if (!!(element === null || element === undefined)) {
- {
- throw Error( "React.cloneElement(...): The argument must be a React element, but you passed " + element + "." );
- }
- }
-
- var propName; // Original props are copied
-
- var props = assign({}, element.props); // Reserved names are extracted
-
-
- var key = element.key;
- var ref = element.ref; // Self is preserved since the owner is preserved.
-
- var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
- // transpiler, and the original source is probably a better indicator of the
- // true owner.
-
- var source = element._source; // Owner will be preserved, unless ref is overridden
-
- var owner = element._owner;
-
- if (config != null) {
- if (hasValidRef(config)) {
- // Silently steal the ref from the parent.
- ref = config.ref;
- owner = ReactCurrentOwner.current;
- }
-
- if (hasValidKey(config)) {
- key = '' + config.key;
- } // Remaining properties override existing props
-
-
- var defaultProps;
-
- if (element.type && element.type.defaultProps) {
- defaultProps = element.type.defaultProps;
- }
-
- for (propName in config) {
- if (hasOwnProperty$1.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
- if (config[propName] === undefined && defaultProps !== undefined) {
- // Resolve default props
- props[propName] = defaultProps[propName];
- } else {
- props[propName] = config[propName];
- }
- }
- }
- } // Children can be more than one argument, and those are transferred onto
- // the newly allocated props object.
-
-
- var childrenLength = arguments.length - 2;
-
- if (childrenLength === 1) {
- props.children = children;
- } else if (childrenLength > 1) {
- var childArray = Array(childrenLength);
-
- for (var i = 0; i < childrenLength; i++) {
- childArray[i] = arguments[i + 2];
- }
-
- props.children = childArray;
- }
-
- return ReactElement(element.type, key, ref, self, source, owner, props);
- }
- /**
- * Verifies the object is a ReactElement.
- * See https://reactjs.org/docs/react-api.html#isvalidelement
- * @param {?object} object
- * @return {boolean} True if `object` is a ReactElement.
- * @final
- */
-
- function isValidElement(object) {
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
- }
-
- var SEPARATOR = '.';
- var SUBSEPARATOR = ':';
- /**
- * Escape and wrap key so it is safe to use as a reactid
- *
- * @param {string} key to be escaped.
- * @return {string} the escaped key.
- */
-
- function escape(key) {
- var escapeRegex = /[=:]/g;
- var escaperLookup = {
- '=': '=0',
- ':': '=2'
- };
- var escapedString = key.replace(escapeRegex, function (match) {
- return escaperLookup[match];
- });
- return '$' + escapedString;
- }
- /**
- * TODO: Test that a single child and an array with one item have the same key
- * pattern.
- */
-
-
- var didWarnAboutMaps = false;
- var userProvidedKeyEscapeRegex = /\/+/g;
-
- function escapeUserProvidedKey(text) {
- return text.replace(userProvidedKeyEscapeRegex, '$&/');
- }
- /**
- * Generate a key string that identifies a element within a set.
- *
- * @param {*} element A element that could contain a manual key.
- * @param {number} index Index that is used if a manual key is not provided.
- * @return {string}
- */
-
-
- function getElementKey(element, index) {
- // Do some typechecking here since we call this blindly. We want to ensure
- // that we don't block potential future ES APIs.
- if (typeof element === 'object' && element !== null && element.key != null) {
- // Explicit key
- return escape('' + element.key);
- } // Implicit key determined by the index in the set
-
-
- return index.toString(36);
- }
-
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
- var type = typeof children;
-
- if (type === 'undefined' || type === 'boolean') {
- // All of the above are perceived as null.
- children = null;
- }
-
- var invokeCallback = false;
-
- if (children === null) {
- invokeCallback = true;
- } else {
- switch (type) {
- case 'string':
- case 'number':
- invokeCallback = true;
- break;
-
- case 'object':
- switch (children.$$typeof) {
- case REACT_ELEMENT_TYPE:
- case REACT_PORTAL_TYPE:
- invokeCallback = true;
- }
-
- }
- }
-
- if (invokeCallback) {
- var _child = children;
- var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
- // so that it's consistent if the number of children grows:
-
- var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
-
- if (Array.isArray(mappedChild)) {
- var escapedChildKey = '';
-
- if (childKey != null) {
- escapedChildKey = escapeUserProvidedKey(childKey) + '/';
- }
-
- mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
- return c;
- });
- } else if (mappedChild != null) {
- if (isValidElement(mappedChild)) {
- mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
- // traverseAllChildren used to do for objects as children
- escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
- mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
- escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
- }
-
- array.push(mappedChild);
- }
-
- return 1;
- }
-
- var child;
- var nextName;
- var subtreeCount = 0; // Count of children found in the current subtree.
-
- var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
-
- if (Array.isArray(children)) {
- for (var i = 0; i < children.length; i++) {
- child = children[i];
- nextName = nextNamePrefix + getElementKey(child, i);
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
- }
- } else {
- var iteratorFn = getIteratorFn(children);
-
- if (typeof iteratorFn === 'function') {
- var iterableChildren = children;
-
- {
- // Warn about using Maps as children
- if (iteratorFn === iterableChildren.entries) {
- if (!didWarnAboutMaps) {
- warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
- }
-
- didWarnAboutMaps = true;
- }
- }
-
- var iterator = iteratorFn.call(iterableChildren);
- var step;
- var ii = 0;
-
- while (!(step = iterator.next()).done) {
- child = step.value;
- nextName = nextNamePrefix + getElementKey(child, ii++);
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
- }
- } else if (type === 'object') {
- var childrenString = '' + children;
-
- {
- {
- throw Error( "Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). If you meant to render a collection of children, use an array instead." );
- }
- }
- }
- }
-
- return subtreeCount;
- }
-
- /**
- * Maps children that are typically specified as `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenmap
- *
- * The provided mapFunction(child, index) will be called for each
- * leaf child.
- *
- * @param {?*} children Children tree container.
- * @param {function(*, int)} func The map function.
- * @param {*} context Context for mapFunction.
- * @return {object} Object containing the ordered map of results.
- */
- function mapChildren(children, func, context) {
- if (children == null) {
- return children;
- }
-
- var result = [];
- var count = 0;
- mapIntoArray(children, result, '', '', function (child) {
- return func.call(context, child, count++);
- });
- return result;
- }
- /**
- * Count the number of children that are typically specified as
- * `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrencount
- *
- * @param {?*} children Children tree container.
- * @return {number} The number of children.
- */
-
-
- function countChildren(children) {
- var n = 0;
- mapChildren(children, function () {
- n++; // Don't return anything
- });
- return n;
- }
-
- /**
- * Iterates through children that are typically specified as `props.children`.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenforeach
- *
- * The provided forEachFunc(child, index) will be called for each
- * leaf child.
- *
- * @param {?*} children Children tree container.
- * @param {function(*, int)} forEachFunc
- * @param {*} forEachContext Context for forEachContext.
- */
- function forEachChildren(children, forEachFunc, forEachContext) {
- mapChildren(children, function () {
- forEachFunc.apply(this, arguments); // Don't return anything.
- }, forEachContext);
- }
- /**
- * Flatten a children object (typically specified as `props.children`) and
- * return an array with appropriately re-keyed children.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrentoarray
- */
-
-
- function toArray(children) {
- return mapChildren(children, function (child) {
- return child;
- }) || [];
- }
- /**
- * Returns the first child in a collection of children and verifies that there
- * is only one child in the collection.
- *
- * See https://reactjs.org/docs/react-api.html#reactchildrenonly
- *
- * The current implementation of this function assumes that a single child gets
- * passed without a wrapper, but the purpose of this helper function is to
- * abstract away the particular structure of children.
- *
- * @param {?object} children Child collection structure.
- * @return {ReactElement} The first and only `ReactElement` contained in the
- * structure.
- */
-
-
- function onlyChild(children) {
- if (!isValidElement(children)) {
- {
- throw Error( "React.Children.only expected to receive a single React element child." );
- }
- }
-
- return children;
- }
-
- function createContext(defaultValue, calculateChangedBits) {
- if (calculateChangedBits === undefined) {
- calculateChangedBits = null;
- } else {
- {
- if (calculateChangedBits !== null && typeof calculateChangedBits !== 'function') {
- error('createContext: Expected the optional second argument to be a ' + 'function. Instead received: %s', calculateChangedBits);
- }
- }
- }
-
- var context = {
- $$typeof: REACT_CONTEXT_TYPE,
- _calculateChangedBits: calculateChangedBits,
- // As a workaround to support multiple concurrent renderers, we categorize
- // some renderers as primary and others as secondary. We only expect
- // there to be two concurrent renderers at most: React Native (primary) and
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
- // Secondary renderers store their context values on separate fields.
- _currentValue: defaultValue,
- _currentValue2: defaultValue,
- // Used to track how many concurrent renderers this context currently
- // supports within in a single renderer. Such as parallel server rendering.
- _threadCount: 0,
- // These are circular
- Provider: null,
- Consumer: null
- };
- context.Provider = {
- $$typeof: REACT_PROVIDER_TYPE,
- _context: context
- };
- var hasWarnedAboutUsingNestedContextConsumers = false;
- var hasWarnedAboutUsingConsumerProvider = false;
- var hasWarnedAboutDisplayNameOnConsumer = false;
-
- {
- // A separate object, but proxies back to the original context object for
- // backwards compatibility. It has a different $$typeof, so we can properly
- // warn for the incorrect usage of Context as a Consumer.
- var Consumer = {
- $$typeof: REACT_CONTEXT_TYPE,
- _context: context,
- _calculateChangedBits: context._calculateChangedBits
- }; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
-
- Object.defineProperties(Consumer, {
- Provider: {
- get: function () {
- if (!hasWarnedAboutUsingConsumerProvider) {
- hasWarnedAboutUsingConsumerProvider = true;
-
- error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
- }
-
- return context.Provider;
- },
- set: function (_Provider) {
- context.Provider = _Provider;
- }
- },
- _currentValue: {
- get: function () {
- return context._currentValue;
- },
- set: function (_currentValue) {
- context._currentValue = _currentValue;
- }
- },
- _currentValue2: {
- get: function () {
- return context._currentValue2;
- },
- set: function (_currentValue2) {
- context._currentValue2 = _currentValue2;
- }
- },
- _threadCount: {
- get: function () {
- return context._threadCount;
- },
- set: function (_threadCount) {
- context._threadCount = _threadCount;
- }
- },
- Consumer: {
- get: function () {
- if (!hasWarnedAboutUsingNestedContextConsumers) {
- hasWarnedAboutUsingNestedContextConsumers = true;
-
- error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
- }
-
- return context.Consumer;
- }
- },
- displayName: {
- get: function () {
- return context.displayName;
- },
- set: function (displayName) {
- if (!hasWarnedAboutDisplayNameOnConsumer) {
- warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
-
- hasWarnedAboutDisplayNameOnConsumer = true;
- }
- }
- }
- }); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
-
- context.Consumer = Consumer;
- }
-
- {
- context._currentRenderer = null;
- context._currentRenderer2 = null;
- }
-
- return context;
- }
-
- var Uninitialized = -1;
- var Pending = 0;
- var Resolved = 1;
- var Rejected = 2;
-
- function lazyInitializer(payload) {
- if (payload._status === Uninitialized) {
- var ctor = payload._result;
- var thenable = ctor(); // Transition to the next state.
-
- var pending = payload;
- pending._status = Pending;
- pending._result = thenable;
- thenable.then(function (moduleObject) {
- if (payload._status === Pending) {
- var defaultExport = moduleObject.default;
-
- {
- if (defaultExport === undefined) {
- error('lazy: Expected the result of a dynamic import() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
- 'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
- }
- } // Transition to the next state.
-
-
- var resolved = payload;
- resolved._status = Resolved;
- resolved._result = defaultExport;
- }
- }, function (error) {
- if (payload._status === Pending) {
- // Transition to the next state.
- var rejected = payload;
- rejected._status = Rejected;
- rejected._result = error;
- }
- });
- }
-
- if (payload._status === Resolved) {
- return payload._result;
- } else {
- throw payload._result;
- }
- }
-
- function lazy(ctor) {
- var payload = {
- // We use these fields to store the result.
- _status: -1,
- _result: ctor
- };
- var lazyType = {
- $$typeof: REACT_LAZY_TYPE,
- _payload: payload,
- _init: lazyInitializer
- };
-
- {
- // In production, this would just set it on the object.
- var defaultProps;
- var propTypes; // $FlowFixMe
-
- Object.defineProperties(lazyType, {
- defaultProps: {
- configurable: true,
- get: function () {
- return defaultProps;
- },
- set: function (newDefaultProps) {
- error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
-
- defaultProps = newDefaultProps; // Match production behavior more closely:
- // $FlowFixMe
-
- Object.defineProperty(lazyType, 'defaultProps', {
- enumerable: true
- });
- }
- },
- propTypes: {
- configurable: true,
- get: function () {
- return propTypes;
- },
- set: function (newPropTypes) {
- error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
-
- propTypes = newPropTypes; // Match production behavior more closely:
- // $FlowFixMe
-
- Object.defineProperty(lazyType, 'propTypes', {
- enumerable: true
- });
- }
- }
- });
- }
-
- return lazyType;
- }
-
- function forwardRef(render) {
- {
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
- error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
- } else if (typeof render !== 'function') {
- error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
- } else {
- if (render.length !== 0 && render.length !== 2) {
- error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
- }
- }
-
- if (render != null) {
- if (render.defaultProps != null || render.propTypes != null) {
- error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
- }
- }
- }
-
- var elementType = {
- $$typeof: REACT_FORWARD_REF_TYPE,
- render: render
- };
-
- {
- var ownName;
- Object.defineProperty(elementType, 'displayName', {
- enumerable: false,
- configurable: true,
- get: function () {
- return ownName;
- },
- set: function (name) {
- ownName = name;
-
- if (render.displayName == null) {
- render.displayName = name;
- }
- }
- });
- }
-
- return elementType;
- }
-
- // Filter certain DOM attributes (e.g. src, href) if their values are empty strings.
-
- var enableScopeAPI = false; // Experimental Create Event Handle API.
-
- function isValidElementType(type) {
- if (typeof type === 'string' || typeof type === 'function') {
- return true;
- } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
-
-
- if (type === exports.Fragment || type === exports.Profiler || type === REACT_DEBUG_TRACING_MODE_TYPE || type === exports.StrictMode || type === exports.Suspense || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI ) {
- return true;
- }
-
- if (typeof type === 'object' && type !== null) {
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
- return true;
- }
- }
-
- return false;
- }
-
- function memo(type, compare) {
- {
- if (!isValidElementType(type)) {
- error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
- }
- }
-
- var elementType = {
- $$typeof: REACT_MEMO_TYPE,
- type: type,
- compare: compare === undefined ? null : compare
- };
-
- {
- var ownName;
- Object.defineProperty(elementType, 'displayName', {
- enumerable: false,
- configurable: true,
- get: function () {
- return ownName;
- },
- set: function (name) {
- ownName = name;
-
- if (type.displayName == null) {
- type.displayName = name;
- }
- }
- });
- }
-
- return elementType;
- }
-
- function resolveDispatcher() {
- var dispatcher = ReactCurrentDispatcher.current;
-
- if (!(dispatcher !== null)) {
- {
- throw 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:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem." );
- }
- }
-
- return dispatcher;
- }
-
- function useContext(Context, unstable_observedBits) {
- var dispatcher = resolveDispatcher();
-
- {
- if (unstable_observedBits !== undefined) {
- error('useContext() second argument is reserved for future ' + 'use in React. Passing it is not supported. ' + 'You passed: %s.%s', unstable_observedBits, typeof unstable_observedBits === 'number' && Array.isArray(arguments[2]) ? '\n\nDid you call array.map(useContext)? ' + 'Calling Hooks inside a loop is not supported. ' + 'Learn more at https://reactjs.org/link/rules-of-hooks' : '');
- } // TODO: add a more generic warning for invalid values.
-
-
- if (Context._context !== undefined) {
- var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
- // and nobody should be using this in existing code.
-
- if (realContext.Consumer === Context) {
- error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
- } else if (realContext.Provider === Context) {
- error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
- }
- }
- }
-
- return dispatcher.useContext(Context, unstable_observedBits);
- }
- function useState(initialState) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useState(initialState);
- }
- function useReducer(reducer, initialArg, init) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useReducer(reducer, initialArg, init);
- }
- function useRef(initialValue) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useRef(initialValue);
- }
- function useEffect(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useEffect(create, deps);
- }
- function useLayoutEffect(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useLayoutEffect(create, deps);
- }
- function useCallback(callback, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useCallback(callback, deps);
- }
- function useMemo(create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useMemo(create, deps);
- }
- function useImperativeHandle(ref, create, deps) {
- var dispatcher = resolveDispatcher();
- return dispatcher.useImperativeHandle(ref, create, deps);
- }
- function useDebugValue(value, formatterFn) {
- {
- var dispatcher = resolveDispatcher();
- return dispatcher.useDebugValue(value, formatterFn);
- }
- }
-
- // Helpers to patch console.logs to avoid logging during side-effect free
- // replaying on render function. This currently only patches the object
- // lazily which won't cover if the log function was extracted eagerly.
- // We could also eagerly patch the method.
- var disabledDepth = 0;
- var prevLog;
- var prevInfo;
- var prevWarn;
- var prevError;
- var prevGroup;
- var prevGroupCollapsed;
- var prevGroupEnd;
-
- function disabledLog() {}
-
- disabledLog.__reactDisabledLog = true;
- function disableLogs() {
- {
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- prevLog = console.log;
- prevInfo = console.info;
- prevWarn = console.warn;
- prevError = console.error;
- prevGroup = console.group;
- prevGroupCollapsed = console.groupCollapsed;
- prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
-
- var props = {
- configurable: true,
- enumerable: true,
- value: disabledLog,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- info: props,
- log: props,
- warn: props,
- error: props,
- group: props,
- groupCollapsed: props,
- groupEnd: props
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- disabledDepth++;
- }
- }
- function reenableLogs() {
- {
- disabledDepth--;
-
- if (disabledDepth === 0) {
- /* eslint-disable react-internal/no-production-logging */
- var props = {
- configurable: true,
- enumerable: true,
- writable: true
- }; // $FlowFixMe Flow thinks console is immutable.
-
- Object.defineProperties(console, {
- log: assign({}, props, {
- value: prevLog
- }),
- info: assign({}, props, {
- value: prevInfo
- }),
- warn: assign({}, props, {
- value: prevWarn
- }),
- error: assign({}, props, {
- value: prevError
- }),
- group: assign({}, props, {
- value: prevGroup
- }),
- groupCollapsed: assign({}, props, {
- value: prevGroupCollapsed
- }),
- groupEnd: assign({}, props, {
- value: prevGroupEnd
- })
- });
- /* eslint-enable react-internal/no-production-logging */
- }
-
- if (disabledDepth < 0) {
- error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
- }
- }
- }
-
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
- var prefix;
- function describeBuiltInComponentFrame(name, source, ownerFn) {
- {
- if (prefix === undefined) {
- // Extract the VM specific prefix used by each line.
- try {
- throw Error();
- } catch (x) {
- var match = x.stack.trim().match(/\n( *(at )?)/);
- prefix = match && match[1] || '';
- }
- } // We use the prefix to ensure our stacks line up with native stack frames.
-
-
- return '\n' + prefix + name;
- }
- }
- var reentry = false;
- var componentFrameCache;
-
- {
- var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
- componentFrameCache = new PossiblyWeakMap();
- }
-
- function describeNativeComponentFrame(fn, construct) {
- // If something asked for a stack inside a fake render, it should get ignored.
- if (!fn || reentry) {
- return '';
- }
-
- {
- var frame = componentFrameCache.get(fn);
-
- if (frame !== undefined) {
- return frame;
- }
- }
-
- var control;
- reentry = true;
- var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
-
- Error.prepareStackTrace = undefined;
- var previousDispatcher;
-
- {
- previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
- // for warnings.
-
- ReactCurrentDispatcher$1.current = null;
- disableLogs();
- }
-
- try {
- // This should throw.
- if (construct) {
- // Something should be setting the props in the constructor.
- var Fake = function () {
- throw Error();
- }; // $FlowFixMe
-
-
- Object.defineProperty(Fake.prototype, 'props', {
- set: function () {
- // We use a throwing setter instead of frozen or non-writable props
- // because that won't throw in a non-strict mode function.
- throw Error();
- }
- });
-
- if (typeof Reflect === 'object' && Reflect.construct) {
- // We construct a different control for this case to include any extra
- // frames added by the construct call.
- try {
- Reflect.construct(Fake, []);
- } catch (x) {
- control = x;
- }
-
- Reflect.construct(fn, [], Fake);
- } else {
- try {
- Fake.call();
- } catch (x) {
- control = x;
- }
-
- fn.call(Fake.prototype);
- }
- } else {
- try {
- throw Error();
- } catch (x) {
- control = x;
- }
-
- fn();
- }
- } catch (sample) {
- // This is inlined manually because closure doesn't do it for us.
- if (sample && control && typeof sample.stack === 'string') {
- // This extracts the first frame from the sample that isn't also in the control.
- // Skipping one frame that we assume is the frame that calls the two.
- var sampleLines = sample.stack.split('\n');
- var controlLines = control.stack.split('\n');
- var s = sampleLines.length - 1;
- var c = controlLines.length - 1;
-
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
- // We expect at least one stack frame to be shared.
- // Typically this will be the root most one. However, stack frames may be
- // cut off due to maximum stack limits. In this case, one maybe cut off
- // earlier than the other. We assume that the sample is longer or the same
- // and there for cut off earlier. So we should find the root most frame in
- // the sample somewhere in the control.
- c--;
- }
-
- for (; s >= 1 && c >= 0; s--, c--) {
- // Next we find the first one that isn't the same which should be the
- // frame that called our sample function and the control.
- if (sampleLines[s] !== controlLines[c]) {
- // In V8, the first line is describing the message but other VMs don't.
- // If we're about to return the first line, and the control is also on the same
- // line, that's a pretty good indicator that our sample threw at same line as
- // the control. I.e. before we entered the sample frame. So we ignore this result.
- // This can happen if you passed a class to function component, or non-function.
- if (s !== 1 || c !== 1) {
- do {
- s--;
- c--; // We may still have similar intermediate frames from the construct call.
- // The next one that isn't the same should be our match though.
-
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
- // V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
- var _frame = '\n' + sampleLines[s].replace(' at new ', ' at ');
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, _frame);
- }
- } // Return the line we found.
-
-
- return _frame;
- }
- } while (s >= 1 && c >= 0);
- }
-
- break;
- }
- }
- }
- } finally {
- reentry = false;
-
- {
- ReactCurrentDispatcher$1.current = previousDispatcher;
- reenableLogs();
- }
-
- Error.prepareStackTrace = previousPrepareStackTrace;
- } // Fallback to just using the name if we couldn't make it throw.
-
-
- var name = fn ? fn.displayName || fn.name : '';
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
-
- {
- if (typeof fn === 'function') {
- componentFrameCache.set(fn, syntheticFrame);
- }
- }
-
- return syntheticFrame;
- }
- function describeFunctionComponentFrame(fn, source, ownerFn) {
- {
- return describeNativeComponentFrame(fn, false);
- }
- }
-
- function shouldConstruct(Component) {
- var prototype = Component.prototype;
- return !!(prototype && prototype.isReactComponent);
- }
-
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
-
- if (type == null) {
- return '';
- }
-
- if (typeof type === 'function') {
- {
- return describeNativeComponentFrame(type, shouldConstruct(type));
- }
- }
-
- if (typeof type === 'string') {
- return describeBuiltInComponentFrame(type);
- }
-
- switch (type) {
- case exports.Suspense:
- return describeBuiltInComponentFrame('Suspense');
-
- case REACT_SUSPENSE_LIST_TYPE:
- return describeBuiltInComponentFrame('SuspenseList');
- }
-
- if (typeof type === 'object') {
- switch (type.$$typeof) {
- case REACT_FORWARD_REF_TYPE:
- return describeFunctionComponentFrame(type.render);
-
- case REACT_MEMO_TYPE:
- // Memo may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
-
- case REACT_BLOCK_TYPE:
- return describeFunctionComponentFrame(type._render);
-
- case REACT_LAZY_TYPE:
- {
- var lazyComponent = type;
- var payload = lazyComponent._payload;
- var init = lazyComponent._init;
-
- try {
- // Lazy may contain any component type so we recursively resolve it.
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
- } catch (x) {}
- }
- }
- }
-
- return '';
- }
-
- var loggedTypeFailures = {};
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
-
- function setCurrentlyValidatingElement(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
- } else {
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
- }
- }
- }
-
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
- {
- // $FlowFixMe This is okay but Flow doesn't know it.
- var has = Function.call.bind(Object.prototype.hasOwnProperty);
-
- for (var typeSpecName in typeSpecs) {
- if (has(typeSpecs, typeSpecName)) {
- var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
- // fail the render phase where it didn't fail before. So we log it.
- // After these have been cleaned up, we'll let them throw.
-
- try {
- // This is intentionally an invariant that gets caught. It's the same
- // behavior as without this statement except with a better message.
- if (typeof typeSpecs[typeSpecName] !== 'function') {
- 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`.');
- err.name = 'Invariant Violation';
- throw err;
- }
-
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
- } catch (ex) {
- error$1 = ex;
- }
-
- if (error$1 && !(error$1 instanceof Error)) {
- setCurrentlyValidatingElement(element);
-
- 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);
-
- setCurrentlyValidatingElement(null);
- }
-
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
- // Only monitor this failure once because there tends to be a lot of the
- // same error.
- loggedTypeFailures[error$1.message] = true;
- setCurrentlyValidatingElement(element);
-
- error('Failed %s type: %s', location, error$1.message);
-
- setCurrentlyValidatingElement(null);
- }
- }
- }
- }
- }
-
- function setCurrentlyValidatingElement$1(element) {
- {
- if (element) {
- var owner = element._owner;
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
- setExtraStackFrame(stack);
- } else {
- setExtraStackFrame(null);
- }
- }
- }
-
- var propTypesMisspellWarningShown;
-
- {
- propTypesMisspellWarningShown = false;
- }
-
- function getDeclarationErrorAddendum() {
- if (ReactCurrentOwner.current) {
- var name = getComponentName(ReactCurrentOwner.current.type);
-
- if (name) {
- return '\n\nCheck the render method of `' + name + '`.';
- }
- }
-
- return '';
- }
-
- function getSourceInfoErrorAddendum(source) {
- if (source !== undefined) {
- var fileName = source.fileName.replace(/^.*[\\\/]/, '');
- var lineNumber = source.lineNumber;
- return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
- }
-
- return '';
- }
-
- function getSourceInfoErrorAddendumForProps(elementProps) {
- if (elementProps !== null && elementProps !== undefined) {
- return getSourceInfoErrorAddendum(elementProps.__source);
- }
-
- return '';
- }
- /**
- * Warn if there's no key explicitly set on dynamic arrays of children or
- * object keys are not valid. This allows us to keep track of children between
- * updates.
- */
-
-
- var ownerHasKeyUseWarning = {};
-
- function getCurrentComponentErrorInfo(parentType) {
- var info = getDeclarationErrorAddendum();
-
- if (!info) {
- var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
-
- if (parentName) {
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
- }
- }
-
- return info;
- }
- /**
- * Warn if the element doesn't have an explicit key assigned to it.
- * This element is in an array. The array could grow and shrink or be
- * reordered. All children that haven't already been validated are required to
- * have a "key" property assigned to it. Error statuses are cached so a warning
- * will only be shown once.
- *
- * @internal
- * @param {ReactElement} element Element that requires a key.
- * @param {*} parentType element's parent's type.
- */
-
-
- function validateExplicitKey(element, parentType) {
- if (!element._store || element._store.validated || element.key != null) {
- return;
- }
-
- element._store.validated = true;
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
-
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
- return;
- }
-
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
- // property, it may be the creator of the child that's responsible for
- // assigning it a key.
-
- var childOwner = '';
-
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
- // Give the component that originally created this child.
- childOwner = " It was passed a child from " + getComponentName(element._owner.type) + ".";
- }
-
- {
- setCurrentlyValidatingElement$1(element);
-
- error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
-
- setCurrentlyValidatingElement$1(null);
- }
- }
- /**
- * Ensure that every element either is passed in a static location, in an
- * array with an explicit keys property defined, or in an object literal
- * with valid key property.
- *
- * @internal
- * @param {ReactNode} node Statically passed child of any type.
- * @param {*} parentType node's parent's type.
- */
-
-
- function validateChildKeys(node, parentType) {
- if (typeof node !== 'object') {
- return;
- }
-
- if (Array.isArray(node)) {
- for (var i = 0; i < node.length; i++) {
- var child = node[i];
-
- if (isValidElement(child)) {
- validateExplicitKey(child, parentType);
- }
- }
- } else if (isValidElement(node)) {
- // This element was passed in a valid location.
- if (node._store) {
- node._store.validated = true;
- }
- } else if (node) {
- var iteratorFn = getIteratorFn(node);
-
- if (typeof iteratorFn === 'function') {
- // Entry iterators used to provide implicit keys,
- // but now we print a separate warning for them later.
- if (iteratorFn !== node.entries) {
- var iterator = iteratorFn.call(node);
- var step;
-
- while (!(step = iterator.next()).done) {
- if (isValidElement(step.value)) {
- validateExplicitKey(step.value, parentType);
- }
- }
- }
- }
- }
- }
- /**
- * Given an element, validate that its props follow the propTypes definition,
- * provided by the type.
- *
- * @param {ReactElement} element
- */
-
-
- function validatePropTypes(element) {
- {
- var type = element.type;
-
- if (type === null || type === undefined || typeof type === 'string') {
- return;
- }
-
- var propTypes;
-
- if (typeof type === 'function') {
- propTypes = type.propTypes;
- } else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
- // Inner props are checked in the reconciler.
- type.$$typeof === REACT_MEMO_TYPE)) {
- propTypes = type.propTypes;
- } else {
- return;
- }
-
- if (propTypes) {
- // Intentionally inside to avoid triggering lazy initializers:
- var name = getComponentName(type);
- checkPropTypes(propTypes, element.props, 'prop', name, element);
- } else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
- propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
-
- var _name = getComponentName(type);
-
- error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
- }
-
- if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
- error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
- }
- }
- }
- /**
- * Given a fragment, validate that it can only be provided with fragment props
- * @param {ReactElement} fragment
- */
-
-
- function validateFragmentProps(fragment) {
- {
- var keys = Object.keys(fragment.props);
-
- for (var i = 0; i < keys.length; i++) {
- var key = keys[i];
-
- if (key !== 'children' && key !== 'key') {
- setCurrentlyValidatingElement$1(fragment);
-
- error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
-
- setCurrentlyValidatingElement$1(null);
- break;
- }
- }
-
- if (fragment.ref !== null) {
- setCurrentlyValidatingElement$1(fragment);
-
- error('Invalid attribute `ref` supplied to `React.Fragment`.');
-
- setCurrentlyValidatingElement$1(null);
- }
- }
- }
- function createElementWithValidation(type, props, children) {
- var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
- // succeed and there will likely be errors in render.
-
- if (!validType) {
- var info = '';
-
- if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
- info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
- }
-
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
-
- if (sourceInfo) {
- info += sourceInfo;
- } else {
- info += getDeclarationErrorAddendum();
- }
-
- var typeString;
-
- if (type === null) {
- typeString = 'null';
- } else if (Array.isArray(type)) {
- typeString = 'array';
- } else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
- typeString = "<" + (getComponentName(type.type) || 'Unknown') + " />";
- info = ' Did you accidentally export a JSX literal instead of a component?';
- } else {
- typeString = typeof type;
- }
-
- {
- error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
- }
- }
-
- var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
- // TODO: Drop this when these are no longer allowed as the type argument.
-
- if (element == null) {
- return element;
- } // Skip key warning if the type isn't valid since our key validation logic
- // doesn't expect a non-string/function type and can throw confusing errors.
- // We don't want exception behavior to differ between dev and prod.
- // (Rendering will throw with a helpful message and as soon as the type is
- // fixed, the key warnings will appear.)
-
-
- if (validType) {
- for (var i = 2; i < arguments.length; i++) {
- validateChildKeys(arguments[i], type);
- }
- }
-
- if (type === exports.Fragment) {
- validateFragmentProps(element);
- } else {
- validatePropTypes(element);
- }
-
- return element;
- }
- var didWarnAboutDeprecatedCreateFactory = false;
- function createFactoryWithValidation(type) {
- var validatedFactory = createElementWithValidation.bind(null, type);
- validatedFactory.type = type;
-
- {
- if (!didWarnAboutDeprecatedCreateFactory) {
- didWarnAboutDeprecatedCreateFactory = true;
-
- warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
- } // Legacy hook: remove it
-
-
- Object.defineProperty(validatedFactory, 'type', {
- enumerable: false,
- get: function () {
- warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
-
- Object.defineProperty(this, 'type', {
- value: type
- });
- return type;
- }
- });
- }
-
- return validatedFactory;
- }
- function cloneElementWithValidation(element, props, children) {
- var newElement = cloneElement.apply(this, arguments);
-
- for (var i = 2; i < arguments.length; i++) {
- validateChildKeys(arguments[i], newElement.type);
- }
-
- validatePropTypes(newElement);
- return newElement;
- }
-
- var enableSchedulerDebugging = false;
- var enableProfiling = false;
-
- var requestHostCallback;
- var requestHostTimeout;
- var cancelHostTimeout;
- var shouldYieldToHost;
- var requestPaint;
- var getCurrentTime;
- var forceFrameRate;
- var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
-
- if (hasPerformanceNow) {
- var localPerformance = performance;
-
- getCurrentTime = function () {
- return localPerformance.now();
- };
- } else {
- var localDate = Date;
- var initialTime = localDate.now();
-
- getCurrentTime = function () {
- return localDate.now() - initialTime;
- };
- }
-
- if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive
- // implementation using setTimeout.
- typeof window === 'undefined' || // Check if MessageChannel is supported, too.
- typeof MessageChannel !== 'function') {
- // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
- // fallback to a naive implementation.
- var _callback = null;
- var _timeoutID = null;
-
- var _flushCallback = function () {
- if (_callback !== null) {
- try {
- var currentTime = getCurrentTime();
- var hasRemainingTime = true;
-
- _callback(hasRemainingTime, currentTime);
-
- _callback = null;
- } catch (e) {
- setTimeout(_flushCallback, 0);
- throw e;
- }
- }
- };
-
- requestHostCallback = function (cb) {
- if (_callback !== null) {
- // Protect against re-entrancy.
- setTimeout(requestHostCallback, 0, cb);
- } else {
- _callback = cb;
- setTimeout(_flushCallback, 0);
- }
- };
-
- requestHostTimeout = function (cb, ms) {
- _timeoutID = setTimeout(cb, ms);
- };
-
- cancelHostTimeout = function () {
- clearTimeout(_timeoutID);
- };
-
- shouldYieldToHost = function () {
- return false;
- };
-
- requestPaint = forceFrameRate = function () {};
- } else {
- // Capture local references to native APIs, in case a polyfill overrides them.
- var _setTimeout = window.setTimeout;
- var _clearTimeout = window.clearTimeout;
-
- if (typeof console !== 'undefined') {
- // TODO: Scheduler no longer requires these methods to be polyfilled. But
- // maybe we want to continue warning if they don't exist, to preserve the
- // option to rely on it in the future?
- var requestAnimationFrame = window.requestAnimationFrame;
- var cancelAnimationFrame = window.cancelAnimationFrame;
-
- if (typeof requestAnimationFrame !== 'function') {
- // Using console['error'] to evade Babel and ESLint
- console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
- }
-
- if (typeof cancelAnimationFrame !== 'function') {
- // Using console['error'] to evade Babel and ESLint
- console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
- }
- }
-
- var isMessageLoopRunning = false;
- var scheduledHostCallback = null;
- var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
- // thread, like user events. By default, it yields multiple times per frame.
- // It does not attempt to align with frame boundaries, since most tasks don't
- // need to be frame aligned; for those that do, use requestAnimationFrame.
-
- var yieldInterval = 5;
- var deadline = 0; // TODO: Make this configurable
-
- {
- // `isInputPending` is not available. Since we have no way of knowing if
- // there's pending input, always yield at the end of the frame.
- shouldYieldToHost = function () {
- return getCurrentTime() >= deadline;
- }; // Since we yield every frame regardless, `requestPaint` has no effect.
-
-
- requestPaint = function () {};
- }
-
- forceFrameRate = function (fps) {
- if (fps < 0 || fps > 125) {
- // Using console['error'] to evade Babel and ESLint
- console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');
- return;
- }
-
- if (fps > 0) {
- yieldInterval = Math.floor(1000 / fps);
- } else {
- // reset the framerate
- yieldInterval = 5;
- }
- };
-
- var performWorkUntilDeadline = function () {
- if (scheduledHostCallback !== null) {
- var currentTime = getCurrentTime(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
- // cycle. This means there's always time remaining at the beginning of
- // the message event.
-
- deadline = currentTime + yieldInterval;
- var hasTimeRemaining = true;
-
- try {
- var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
-
- if (!hasMoreWork) {
- isMessageLoopRunning = false;
- scheduledHostCallback = null;
- } else {
- // If there's more work, schedule the next message event at the end
- // of the preceding one.
- port.postMessage(null);
- }
- } catch (error) {
- // If a scheduler task throws, exit the current browser task so the
- // error can be observed.
- port.postMessage(null);
- throw error;
- }
- } else {
- isMessageLoopRunning = false;
- } // Yielding to the browser will give it a chance to paint, so we can
- };
-
- var channel = new MessageChannel();
- var port = channel.port2;
- channel.port1.onmessage = performWorkUntilDeadline;
-
- requestHostCallback = function (callback) {
- scheduledHostCallback = callback;
-
- if (!isMessageLoopRunning) {
- isMessageLoopRunning = true;
- port.postMessage(null);
- }
- };
-
- requestHostTimeout = function (callback, ms) {
- taskTimeoutID = _setTimeout(function () {
- callback(getCurrentTime());
- }, ms);
- };
-
- cancelHostTimeout = function () {
- _clearTimeout(taskTimeoutID);
-
- taskTimeoutID = -1;
- };
- }
-
- function push(heap, node) {
- var index = heap.length;
- heap.push(node);
- siftUp(heap, node, index);
- }
- function peek(heap) {
- var first = heap[0];
- return first === undefined ? null : first;
- }
- function pop(heap) {
- var first = heap[0];
-
- if (first !== undefined) {
- var last = heap.pop();
-
- if (last !== first) {
- heap[0] = last;
- siftDown(heap, last, 0);
- }
-
- return first;
- } else {
- return null;
- }
- }
-
- function siftUp(heap, node, i) {
- var index = i;
-
- while (true) {
- var parentIndex = index - 1 >>> 1;
- var parent = heap[parentIndex];
-
- if (parent !== undefined && compare(parent, node) > 0) {
- // The parent is larger. Swap positions.
- heap[parentIndex] = node;
- heap[index] = parent;
- index = parentIndex;
- } else {
- // The parent is smaller. Exit.
- return;
- }
- }
- }
-
- function siftDown(heap, node, i) {
- var index = i;
- var length = heap.length;
-
- while (index < length) {
- var leftIndex = (index + 1) * 2 - 1;
- var left = heap[leftIndex];
- var rightIndex = leftIndex + 1;
- var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
-
- if (left !== undefined && compare(left, node) < 0) {
- if (right !== undefined && compare(right, left) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- heap[index] = left;
- heap[leftIndex] = node;
- index = leftIndex;
- }
- } else if (right !== undefined && compare(right, node) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- // Neither child is smaller. Exit.
- return;
- }
- }
- }
-
- function compare(a, b) {
- // Compare sort index first, then task id.
- var diff = a.sortIndex - b.sortIndex;
- return diff !== 0 ? diff : a.id - b.id;
- }
-
- // TODO: Use symbols?
- var ImmediatePriority = 1;
- var UserBlockingPriority = 2;
- var NormalPriority = 3;
- var LowPriority = 4;
- var IdlePriority = 5;
-
- function markTaskErrored(task, ms) {
- }
-
- /* eslint-disable no-var */
- // Math.pow(2, 30) - 1
- // 0b111111111111111111111111111111
-
- var maxSigned31BitInt = 1073741823; // Times out immediately
-
- var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
-
- var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
- var NORMAL_PRIORITY_TIMEOUT = 5000;
- var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
-
- var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap
-
- var taskQueue = [];
- var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
-
- var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
- var currentTask = null;
- var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.
-
- var isPerformingWork = false;
- var isHostCallbackScheduled = false;
- var isHostTimeoutScheduled = false;
-
- function advanceTimers(currentTime) {
- // Check for tasks that are no longer delayed and add them to the queue.
- var timer = peek(timerQueue);
-
- while (timer !== null) {
- if (timer.callback === null) {
- // Timer was cancelled.
- pop(timerQueue);
- } else if (timer.startTime <= currentTime) {
- // Timer fired. Transfer to the task queue.
- pop(timerQueue);
- timer.sortIndex = timer.expirationTime;
- push(taskQueue, timer);
- } else {
- // Remaining timers are pending.
- return;
- }
-
- timer = peek(timerQueue);
- }
- }
-
- function handleTimeout(currentTime) {
- isHostTimeoutScheduled = false;
- advanceTimers(currentTime);
-
- if (!isHostCallbackScheduled) {
- if (peek(taskQueue) !== null) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- } else {
- var firstTimer = peek(timerQueue);
-
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
- }
- }
- }
-
- function flushWork(hasTimeRemaining, initialTime) {
-
-
- isHostCallbackScheduled = false;
-
- if (isHostTimeoutScheduled) {
- // We scheduled a timeout but it's no longer needed. Cancel it.
- isHostTimeoutScheduled = false;
- cancelHostTimeout();
- }
-
- isPerformingWork = true;
- var previousPriorityLevel = currentPriorityLevel;
-
- try {
- if (enableProfiling) {
- try {
- return workLoop(hasTimeRemaining, initialTime);
- } catch (error) {
- if (currentTask !== null) {
- var currentTime = getCurrentTime();
- markTaskErrored(currentTask, currentTime);
- currentTask.isQueued = false;
- }
-
- throw error;
- }
- } else {
- // No catch in prod code path.
- return workLoop(hasTimeRemaining, initialTime);
- }
- } finally {
- currentTask = null;
- currentPriorityLevel = previousPriorityLevel;
- isPerformingWork = false;
- }
- }
-
- function workLoop(hasTimeRemaining, initialTime) {
- var currentTime = initialTime;
- advanceTimers(currentTime);
- currentTask = peek(taskQueue);
-
- while (currentTask !== null && !(enableSchedulerDebugging )) {
- if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
- // This currentTask hasn't expired, and we've reached the deadline.
- break;
- }
-
- var callback = currentTask.callback;
-
- if (typeof callback === 'function') {
- currentTask.callback = null;
- currentPriorityLevel = currentTask.priorityLevel;
- var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
-
- var continuationCallback = callback(didUserCallbackTimeout);
- currentTime = getCurrentTime();
-
- if (typeof continuationCallback === 'function') {
- currentTask.callback = continuationCallback;
- } else {
-
- if (currentTask === peek(taskQueue)) {
- pop(taskQueue);
- }
- }
-
- advanceTimers(currentTime);
- } else {
- pop(taskQueue);
- }
-
- currentTask = peek(taskQueue);
- } // Return whether there's additional work
-
-
- if (currentTask !== null) {
- return true;
- } else {
- var firstTimer = peek(timerQueue);
-
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
-
- return false;
- }
- }
-
- function unstable_runWithPriority(priorityLevel, eventHandler) {
- switch (priorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- case LowPriority:
- case IdlePriority:
- break;
-
- default:
- priorityLevel = NormalPriority;
- }
-
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
-
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- }
-
- function unstable_next(eventHandler) {
- var priorityLevel;
-
- switch (currentPriorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- // Shift down to normal priority
- priorityLevel = NormalPriority;
- break;
-
- default:
- // Anything lower than normal priority should remain at the current level.
- priorityLevel = currentPriorityLevel;
- break;
- }
-
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
-
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- }
-
- function unstable_wrapCallback(callback) {
- var parentPriorityLevel = currentPriorityLevel;
- return function () {
- // This is a fork of runWithPriority, inlined for performance.
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = parentPriorityLevel;
-
- try {
- return callback.apply(this, arguments);
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- };
- }
-
- function unstable_scheduleCallback(priorityLevel, callback, options) {
- var currentTime = getCurrentTime();
- var startTime;
-
- if (typeof options === 'object' && options !== null) {
- var delay = options.delay;
-
- if (typeof delay === 'number' && delay > 0) {
- startTime = currentTime + delay;
- } else {
- startTime = currentTime;
- }
- } else {
- startTime = currentTime;
- }
-
- var timeout;
-
- switch (priorityLevel) {
- case ImmediatePriority:
- timeout = IMMEDIATE_PRIORITY_TIMEOUT;
- break;
-
- case UserBlockingPriority:
- timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
- break;
-
- case IdlePriority:
- timeout = IDLE_PRIORITY_TIMEOUT;
- break;
-
- case LowPriority:
- timeout = LOW_PRIORITY_TIMEOUT;
- break;
-
- case NormalPriority:
- default:
- timeout = NORMAL_PRIORITY_TIMEOUT;
- break;
- }
-
- var expirationTime = startTime + timeout;
- var newTask = {
- id: taskIdCounter++,
- callback: callback,
- priorityLevel: priorityLevel,
- startTime: startTime,
- expirationTime: expirationTime,
- sortIndex: -1
- };
-
- if (startTime > currentTime) {
- // This is a delayed task.
- newTask.sortIndex = startTime;
- push(timerQueue, newTask);
-
- if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
- // All tasks are delayed, and this is the task with the earliest delay.
- if (isHostTimeoutScheduled) {
- // Cancel an existing timeout.
- cancelHostTimeout();
- } else {
- isHostTimeoutScheduled = true;
- } // Schedule a timeout.
-
-
- requestHostTimeout(handleTimeout, startTime - currentTime);
- }
- } else {
- newTask.sortIndex = expirationTime;
- push(taskQueue, newTask);
- // wait until the next time we yield.
-
-
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
- }
-
- return newTask;
- }
-
- function unstable_pauseExecution() {
- }
-
- function unstable_continueExecution() {
-
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
- }
-
- function unstable_getFirstCallbackNode() {
- return peek(taskQueue);
- }
-
- function unstable_cancelCallback(task) {
- // remove from the queue because you can't remove arbitrary nodes from an
- // array based heap, only the first one.)
-
-
- task.callback = null;
- }
-
- function unstable_getCurrentPriorityLevel() {
- return currentPriorityLevel;
- }
-
- var unstable_requestPaint = requestPaint;
- var unstable_Profiling = null;
-
-
-
- var Scheduler = /*#__PURE__*/Object.freeze({
- __proto__: null,
- unstable_ImmediatePriority: ImmediatePriority,
- unstable_UserBlockingPriority: UserBlockingPriority,
- unstable_NormalPriority: NormalPriority,
- unstable_IdlePriority: IdlePriority,
- unstable_LowPriority: LowPriority,
- unstable_runWithPriority: unstable_runWithPriority,
- unstable_next: unstable_next,
- unstable_scheduleCallback: unstable_scheduleCallback,
- unstable_cancelCallback: unstable_cancelCallback,
- unstable_wrapCallback: unstable_wrapCallback,
- unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
- get unstable_shouldYield () { return shouldYieldToHost; },
- unstable_requestPaint: unstable_requestPaint,
- unstable_continueExecution: unstable_continueExecution,
- unstable_pauseExecution: unstable_pauseExecution,
- unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
- get unstable_now () { return getCurrentTime; },
- get unstable_forceFrameRate () { return forceFrameRate; },
- unstable_Profiling: unstable_Profiling
- });
-
- var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
-
- var interactionIDCounter = 0;
- var threadIDCounter = 0; // Set of currently traced interactions.
- // Interactions "stack"–
- // Meaning that newly traced interactions are appended to the previously active set.
- // When an interaction goes out of scope, the previous set (if any) is restored.
-
- var interactionsRef = null; // Listener(s) to notify when interactions begin and end.
-
- var subscriberRef = null;
-
- {
- interactionsRef = {
- current: new Set()
- };
- subscriberRef = {
- current: null
- };
- }
- function unstable_clear(callback) {
-
- var prevInteractions = interactionsRef.current;
- interactionsRef.current = new Set();
-
- try {
- return callback();
- } finally {
- interactionsRef.current = prevInteractions;
- }
- }
- function unstable_getCurrent() {
- {
- return interactionsRef.current;
- }
- }
- function unstable_getThreadID() {
- return ++threadIDCounter;
- }
- function unstable_trace(name, timestamp, callback) {
- var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
-
- var interaction = {
- __count: 1,
- id: interactionIDCounter++,
- name: name,
- timestamp: timestamp
- };
- var prevInteractions = interactionsRef.current; // Traced interactions should stack/accumulate.
- // To do that, clone the current interactions.
- // The previous set will be restored upon completion.
-
- var interactions = new Set(prevInteractions);
- interactions.add(interaction);
- interactionsRef.current = interactions;
- var subscriber = subscriberRef.current;
- var returnValue;
-
- try {
- if (subscriber !== null) {
- subscriber.onInteractionTraced(interaction);
- }
- } finally {
- try {
- if (subscriber !== null) {
- subscriber.onWorkStarted(interactions, threadID);
- }
- } finally {
- try {
- returnValue = callback();
- } finally {
- interactionsRef.current = prevInteractions;
-
- try {
- if (subscriber !== null) {
- subscriber.onWorkStopped(interactions, threadID);
- }
- } finally {
- interaction.__count--; // If no async work was scheduled for this interaction,
- // Notify subscribers that it's completed.
-
- if (subscriber !== null && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- }
- }
- }
- }
-
- return returnValue;
- }
- function unstable_wrap(callback) {
- var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
-
- var wrappedInteractions = interactionsRef.current;
- var subscriber = subscriberRef.current;
-
- if (subscriber !== null) {
- subscriber.onWorkScheduled(wrappedInteractions, threadID);
- } // Update the pending async work count for the current interactions.
- // Update after calling subscribers in case of error.
-
-
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count++;
- });
- var hasRun = false;
-
- function wrapped() {
- var prevInteractions = interactionsRef.current;
- interactionsRef.current = wrappedInteractions;
- subscriber = subscriberRef.current;
-
- try {
- var returnValue;
-
- try {
- if (subscriber !== null) {
- subscriber.onWorkStarted(wrappedInteractions, threadID);
- }
- } finally {
- try {
- returnValue = callback.apply(undefined, arguments);
- } finally {
- interactionsRef.current = prevInteractions;
-
- if (subscriber !== null) {
- subscriber.onWorkStopped(wrappedInteractions, threadID);
- }
- }
- }
-
- return returnValue;
- } finally {
- if (!hasRun) {
- // We only expect a wrapped function to be executed once,
- // But in the event that it's executed more than once–
- // Only decrement the outstanding interaction counts once.
- hasRun = true; // Update pending async counts for all wrapped interactions.
- // If this was the last scheduled async work for any of them,
- // Mark them as completed.
-
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count--;
-
- if (subscriber !== null && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- });
- }
- }
- }
-
- wrapped.cancel = function cancel() {
- subscriber = subscriberRef.current;
-
- try {
- if (subscriber !== null) {
- subscriber.onWorkCanceled(wrappedInteractions, threadID);
- }
- } finally {
- // Update pending async counts for all wrapped interactions.
- // If this was the last scheduled async work for any of them,
- // Mark them as completed.
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count--;
-
- if (subscriber && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- });
- }
- };
-
- return wrapped;
- }
-
- var subscribers = null;
-
- {
- subscribers = new Set();
- }
-
- function unstable_subscribe(subscriber) {
- {
- subscribers.add(subscriber);
-
- if (subscribers.size === 1) {
- subscriberRef.current = {
- onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
- onInteractionTraced: onInteractionTraced,
- onWorkCanceled: onWorkCanceled,
- onWorkScheduled: onWorkScheduled,
- onWorkStarted: onWorkStarted,
- onWorkStopped: onWorkStopped
- };
- }
- }
- }
- function unstable_unsubscribe(subscriber) {
- {
- subscribers.delete(subscriber);
-
- if (subscribers.size === 0) {
- subscriberRef.current = null;
- }
- }
- }
-
- function onInteractionTraced(interaction) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onInteractionTraced(interaction);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
- }
-
- function onInteractionScheduledWorkCompleted(interaction) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
- }
-
- function onWorkScheduled(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkScheduled(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
- }
-
- function onWorkStarted(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkStarted(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
- }
-
- function onWorkStopped(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkStopped(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
- }
-
- function onWorkCanceled(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkCanceled(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
- }
-
-
-
- var SchedulerTracing = /*#__PURE__*/Object.freeze({
- __proto__: null,
- get __interactionsRef () { return interactionsRef; },
- get __subscriberRef () { return subscriberRef; },
- unstable_clear: unstable_clear,
- unstable_getCurrent: unstable_getCurrent,
- unstable_getThreadID: unstable_getThreadID,
- unstable_trace: unstable_trace,
- unstable_wrap: unstable_wrap,
- unstable_subscribe: unstable_subscribe,
- unstable_unsubscribe: unstable_unsubscribe
- });
-
- var ReactSharedInternals$1 = {
- ReactCurrentDispatcher: ReactCurrentDispatcher,
- ReactCurrentOwner: ReactCurrentOwner,
- IsSomeRendererActing: IsSomeRendererActing,
- ReactCurrentBatchConfig: ReactCurrentBatchConfig,
- // Used by renderers to avoid bundling object-assign twice in UMD bundles:
- assign: assign,
- // Re-export the schedule API(s) for UMD bundles.
- // This avoids introducing a dependency on a new UMD global in a minor update,
- // Since that would be a breaking change (e.g. for all existing CodeSandboxes).
- // This re-export is only required for UMD bundles;
- // CJS bundles use the shared NPM package.
- Scheduler: Scheduler,
- SchedulerTracing: SchedulerTracing
- };
-
- {
- ReactSharedInternals$1.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
- }
-
- {
-
- try {
- var frozenObject = Object.freeze({});
- /* eslint-disable no-new */
-
- new Map([[frozenObject, null]]);
- new Set([frozenObject]);
- /* eslint-enable no-new */
- } catch (e) {
- }
- }
-
- var createElement$1 = createElementWithValidation ;
- var cloneElement$1 = cloneElementWithValidation ;
- var createFactory = createFactoryWithValidation ;
- var Children = {
- map: mapChildren,
- forEach: forEachChildren,
- count: countChildren,
- toArray: toArray,
- only: onlyChild
- };
-
- exports.Children = Children;
- exports.Component = Component;
- exports.PureComponent = PureComponent;
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals$1;
- exports.cloneElement = cloneElement$1;
- exports.createContext = createContext;
- exports.createElement = createElement$1;
- exports.createFactory = createFactory;
- exports.createRef = createRef;
- exports.forwardRef = forwardRef;
- exports.isValidElement = isValidElement;
- exports.lazy = lazy;
- exports.memo = memo;
- exports.useCallback = useCallback;
- exports.useContext = useContext;
- exports.useDebugValue = useDebugValue;
- exports.useEffect = useEffect;
- exports.useImperativeHandle = useImperativeHandle;
- exports.useLayoutEffect = useLayoutEffect;
- exports.useMemo = useMemo;
- exports.useReducer = useReducer;
- exports.useRef = useRef;
- exports.useState = useState;
- exports.version = ReactVersion;
-
-})));
diff --git a/node_modules/react/umd/react.production.min.js b/node_modules/react/umd/react.production.min.js
deleted file mode 100644
index 95f2ce7..0000000
--- a/node_modules/react/umd/react.production.min.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/** @license React v17.0.2
- * react.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function(){'use strict';(function(c,x){"object"===typeof exports&&"undefined"!==typeof module?x(exports):"function"===typeof define&&define.amd?define(["exports"],x):(c=c||self,x(c.React={}))})(this,function(c){function x(a){if(null===a||"object"!==typeof a)return null;a=Y&&a[Y]||a["@@iterator"];return"function"===typeof a?a:null}function y(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,e=1;e<arguments.length;e++)b+="&args[]="+encodeURIComponent(arguments[e]);return"Minified React error #"+
-a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function v(a,b,e){this.props=a;this.context=b;this.refs=Z;this.updater=e||aa}function ba(){}function K(a,b,e){this.props=a;this.context=b;this.refs=Z;this.updater=e||aa}function ca(a,b,e){var l,f={},c=null,da=null;if(null!=b)for(l in void 0!==b.ref&&(da=b.ref),void 0!==b.key&&(c=""+b.key),b)ea.call(b,l)&&!fa.hasOwnProperty(l)&&(f[l]=b[l]);var k=arguments.length-2;if(1===
-k)f.children=e;else if(1<k){for(var h=Array(k),d=0;d<k;d++)h[d]=arguments[d+2];f.children=h}if(a&&a.defaultProps)for(l in k=a.defaultProps,k)void 0===f[l]&&(f[l]=k[l]);return{$$typeof:w,type:a,key:c,ref:da,props:f,_owner:L.current}}function va(a,b){return{$$typeof:w,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===w}function wa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function N(a,b){return"object"===
-typeof a&&null!==a&&null!=a.key?wa(""+a.key):b.toString(36)}function C(a,b,e,l,f){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;var d=!1;if(null===a)d=!0;else switch(c){case "string":case "number":d=!0;break;case "object":switch(a.$$typeof){case w:case ha:d=!0}}if(d)return d=a,f=f(d),a=""===l?"."+N(d,0):l,Array.isArray(f)?(e="",null!=a&&(e=a.replace(ia,"$&/")+"/"),C(f,b,e,"",function(a){return a})):null!=f&&(M(f)&&(f=va(f,e+(!f.key||d&&d.key===f.key?"":(""+f.key).replace(ia,"$&/")+"/")+
-a)),b.push(f)),1;d=0;l=""===l?".":l+":";if(Array.isArray(a))for(var k=0;k<a.length;k++){c=a[k];var h=l+N(c,k);d+=C(c,b,e,h,f)}else if(h=x(a),"function"===typeof h)for(a=h.call(a),k=0;!(c=a.next()).done;)c=c.value,h=l+N(c,k++),d+=C(c,b,e,h,f);else if("object"===c)throw b=""+a,Error(y(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return d}function D(a,b,e){if(null==a)return a;var l=[],c=0;C(a,l,"","",function(a){return b.call(e,a,c++)});return l}function xa(a){if(-1===
-a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}function n(){var a=ja.current;if(null===a)throw Error(y(321));return a}function O(a,b){var e=a.length;a.push(b);a:for(;;){var c=e-1>>>1,f=a[c];if(void 0!==f&&0<E(f,b))a[c]=b,a[e]=f,e=c;else break a}}function p(a){a=a[0];return void 0===a?null:a}function F(a){var b=
-a[0];if(void 0!==b){var e=a.pop();if(e!==b){a[0]=e;a:for(var c=0,f=a.length;c<f;){var d=2*(c+1)-1,g=a[d],k=d+1,h=a[k];if(void 0!==g&&0>E(g,e))void 0!==h&&0>E(h,g)?(a[c]=h,a[k]=e,c=k):(a[c]=g,a[d]=e,c=d);else if(void 0!==h&&0>E(h,e))a[c]=h,a[k]=e,c=k;else break a}}return b}return null}function E(a,b){var e=a.sortIndex-b.sortIndex;return 0!==e?e:a.id-b.id}function P(a){for(var b=p(r);null!==b;){if(null===b.callback)F(r);else if(b.startTime<=a)F(r),b.sortIndex=b.expirationTime,O(q,b);else break;b=p(r)}}
-function Q(a){z=!1;P(a);if(!u)if(null!==p(q))u=!0,A(R);else{var b=p(r);null!==b&&G(Q,b.startTime-a)}}function R(a,b){u=!1;z&&(z=!1,S());H=!0;var e=g;try{P(b);for(m=p(q);null!==m&&(!(m.expirationTime>b)||a&&!T());){var c=m.callback;if("function"===typeof c){m.callback=null;g=m.priorityLevel;var f=c(m.expirationTime<=b);b=t();"function"===typeof f?m.callback=f:m===p(q)&&F(q);P(b)}else F(q);m=p(q)}if(null!==m)var d=!0;else{var n=p(r);null!==n&&G(Q,n.startTime-b);d=!1}return d}finally{m=null,g=e,H=!1}}
-var w=60103,ha=60106;c.Fragment=60107;c.StrictMode=60108;c.Profiler=60114;var ka=60109,la=60110,ma=60112;c.Suspense=60113;var na=60115,oa=60116;if("function"===typeof Symbol&&Symbol.for){var d=Symbol.for;w=d("react.element");ha=d("react.portal");c.Fragment=d("react.fragment");c.StrictMode=d("react.strict_mode");c.Profiler=d("react.profiler");ka=d("react.provider");la=d("react.context");ma=d("react.forward_ref");c.Suspense=d("react.suspense");na=d("react.memo");oa=d("react.lazy")}var Y="function"===
-typeof Symbol&&Symbol.iterator,ya=Object.prototype.hasOwnProperty,U=Object.assign||function(a,b){if(null==a)throw new TypeError("Object.assign target cannot be null or undefined");for(var e=Object(a),c=1;c<arguments.length;c++){var d=arguments[c];if(null!=d){var g=void 0;d=Object(d);for(g in d)ya.call(d,g)&&(e[g]=d[g])}}return e},aa={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,d){},enqueueSetState:function(a,b,c,d){}},Z={};v.prototype.isReactComponent=
-{};v.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(y(85));this.updater.enqueueSetState(this,a,b,"setState")};v.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};ba.prototype=v.prototype;d=K.prototype=new ba;d.constructor=K;U(d,v.prototype);d.isPureReactComponent=!0;var L={current:null},ea=Object.prototype.hasOwnProperty,fa={key:!0,ref:!0,__self:!0,__source:!0},ia=/\/+/g,ja={current:null},V;if("object"===typeof performance&&
-"function"===typeof performance.now){var za=performance;var t=function(){return za.now()}}else{var pa=Date,Aa=pa.now();t=function(){return pa.now()-Aa}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var B=null,qa=null,ra=function(){if(null!==B)try{var a=t();B(!0,a);B=null}catch(b){throw setTimeout(ra,0),b;}};var A=function(a){null!==B?setTimeout(A,0,a):(B=a,setTimeout(ra,0))};var G=function(a,b){qa=setTimeout(a,b)};var S=function(){clearTimeout(qa)};var T=function(){return!1};
-d=V=function(){}}else{var Ba=window.setTimeout,Ca=window.clearTimeout;"undefined"!==typeof console&&(d=window.cancelAnimationFrame,"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!==typeof d&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"));
-var I=!1,J=null,W=-1,sa=5,ta=0;T=function(){return t()>=ta};d=function(){};V=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):sa=0<a?Math.floor(1E3/a):5};var ua=new MessageChannel,X=ua.port2;ua.port1.onmessage=function(){if(null!==J){var a=t();ta=a+sa;try{J(!0,a)?X.postMessage(null):(I=!1,J=null)}catch(b){throw X.postMessage(null),b;}}else I=!1};A=function(a){J=a;I||(I=!0,X.postMessage(null))};G=
-function(a,b){W=Ba(function(){a(t())},b)};S=function(){Ca(W);W=-1}}var q=[],r=[],Da=1,m=null,g=3,H=!1,u=!1,z=!1,Ea=0;d={ReactCurrentDispatcher:ja,ReactCurrentOwner:L,IsSomeRendererActing:{current:!1},ReactCurrentBatchConfig:{transition:0},assign:U,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=
-3}var c=g;g=a;try{return b()}finally{g=c}},unstable_next:function(a){switch(g){case 1:case 2:case 3:var b=3;break;default:b=g}var c=g;g=b;try{return a()}finally{g=c}},unstable_scheduleCallback:function(a,b,c){var d=t();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:Da++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=
-c,O(r,a),null===p(q)&&a===p(r)&&(z?S():z=!0,G(Q,c-d))):(a.sortIndex=e,O(q,a),u||H||(u=!0,A(R)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=g;return function(){var c=g;g=b;try{return a.apply(this,arguments)}finally{g=c}}},unstable_getCurrentPriorityLevel:function(){return g},get unstable_shouldYield(){return T},unstable_requestPaint:d,unstable_continueExecution:function(){u||H||(u=!0,A(R))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)},
-get unstable_now(){return t},get unstable_forceFrameRate(){return V},unstable_Profiling:null},SchedulerTracing:{__proto__:null,__interactionsRef:null,__subscriberRef:null,unstable_clear:function(a){return a()},unstable_getCurrent:function(){return null},unstable_getThreadID:function(){return++Ea},unstable_trace:function(a,b,c){return c()},unstable_wrap:function(a){return a},unstable_subscribe:function(a){},unstable_unsubscribe:function(a){}}};c.Children={map:D,forEach:function(a,b,c){D(a,function(){b.apply(this,
-arguments)},c)},count:function(a){var b=0;D(a,function(){b++});return b},toArray:function(a){return D(a,function(a){return a})||[]},only:function(a){if(!M(a))throw Error(y(143));return a}};c.Component=v;c.PureComponent=K;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d;c.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(y(267,a));var d=U({},a.props),e=a.key,g=a.ref,n=a._owner;if(null!=b){void 0!==b.ref&&(g=b.ref,n=L.current);void 0!==b.key&&(e=""+b.key);if(a.type&&a.type.defaultProps)var k=
-a.type.defaultProps;for(h in b)ea.call(b,h)&&!fa.hasOwnProperty(h)&&(d[h]=void 0===b[h]&&void 0!==k?k[h]:b[h])}var h=arguments.length-2;if(1===h)d.children=c;else if(1<h){k=Array(h);for(var m=0;m<h;m++)k[m]=arguments[m+2];d.children=k}return{$$typeof:w,type:a.type,key:e,ref:g,props:d,_owner:n}};c.createContext=function(a,b){void 0===b&&(b=null);a={$$typeof:la,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:ka,_context:a};return a.Consumer=
-a};c.createElement=ca;c.createFactory=function(a){var b=ca.bind(null,a);b.type=a;return b};c.createRef=function(){return{current:null}};c.forwardRef=function(a){return{$$typeof:ma,render:a}};c.isValidElement=M;c.lazy=function(a){return{$$typeof:oa,_payload:{_status:-1,_result:a},_init:xa}};c.memo=function(a,b){return{$$typeof:na,type:a,compare:void 0===b?null:b}};c.useCallback=function(a,b){return n().useCallback(a,b)};c.useContext=function(a,b){return n().useContext(a,b)};c.useDebugValue=function(a,
-b){};c.useEffect=function(a,b){return n().useEffect(a,b)};c.useImperativeHandle=function(a,b,c){return n().useImperativeHandle(a,b,c)};c.useLayoutEffect=function(a,b){return n().useLayoutEffect(a,b)};c.useMemo=function(a,b){return n().useMemo(a,b)};c.useReducer=function(a,b,c){return n().useReducer(a,b,c)};c.useRef=function(a){return n().useRef(a)};c.useState=function(a){return n().useState(a)};c.version="17.0.2"});
-})();
diff --git a/node_modules/react/umd/react.profiling.min.js b/node_modules/react/umd/react.profiling.min.js
deleted file mode 100644
index df2aad2..0000000
--- a/node_modules/react/umd/react.profiling.min.js
+++ /dev/null
@@ -1,36 +0,0 @@
-/** @license React v17.0.2
- * react.profiling.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function(){'use strict';(function(f,C){"object"===typeof exports&&"undefined"!==typeof module?C(exports):"function"===typeof define&&define.amd?define(["exports"],C):(f=f||self,C(f.React={}))})(this,function(f){function C(a){if(null===a||"object"!==typeof a)return null;a=da&&a[da]||a["@@iterator"];return"function"===typeof a?a:null}function D(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+
-a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function A(a,b,c){this.props=a;this.context=b;this.refs=ea;this.updater=c||fa}function ha(){}function P(a,b,c){this.props=a;this.context=b;this.refs=ea;this.updater=c||fa}function ia(a,b,c){var e,d={},l=null,h=null;if(null!=b)for(e in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(l=""+b.key),b)ja.call(b,e)&&!ka.hasOwnProperty(e)&&(d[e]=b[e]);var k=arguments.length-2;if(1===
-k)d.children=c;else if(1<k){for(var f=Array(k),g=0;g<k;g++)f[g]=arguments[g+2];d.children=f}if(a&&a.defaultProps)for(e in k=a.defaultProps,k)void 0===d[e]&&(d[e]=k[e]);return{$$typeof:B,type:a,key:l,ref:h,props:d,_owner:Q.current}}function za(a,b){return{$$typeof:B,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function R(a){return"object"===typeof a&&null!==a&&a.$$typeof===B}function Aa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function S(a,b){return"object"===
-typeof a&&null!==a&&null!=a.key?Aa(""+a.key):b.toString(36)}function H(a,b,c,e,d){var l=typeof a;if("undefined"===l||"boolean"===l)a=null;var h=!1;if(null===a)h=!0;else switch(l){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case B:case la:h=!0}}if(h)return h=a,d=d(h),a=""===e?"."+S(h,0):e,Array.isArray(d)?(c="",null!=a&&(c=a.replace(ma,"$&/")+"/"),H(d,b,c,"",function(a){return a})):null!=d&&(R(d)&&(d=za(d,c+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(ma,"$&/")+"/")+
-a)),b.push(d)),1;h=0;e=""===e?".":e+":";if(Array.isArray(a))for(var f=0;f<a.length;f++){l=a[f];var n=e+S(l,f);h+=H(l,b,c,n,d)}else if(n=C(a),"function"===typeof n)for(a=n.call(a),f=0;!(l=a.next()).done;)l=l.value,n=e+S(l,f++),h+=H(l,b,c,n,d);else if("object"===l)throw b=""+a,Error(D(31,"[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b));return h}function I(a,b,c){if(null==a)return a;var e=[],d=0;H(a,e,"","",function(a){return b.call(c,a,d++)});return e}function Ba(a){if(-1===
-a._status){var b=a._result;b=b();a._status=0;a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}if(1===a._status)return a._result;throw a._result;}function v(){var a=na.current;if(null===a)throw Error(D(321));return a}function T(a,b){var c=a.length;a.push(b);a:for(;;){var e=c-1>>>1,d=a[e];if(void 0!==d&&0<J(d,b))a[e]=b,a[c]=d,c=e;else break a}}function r(a){a=a[0];return void 0===a?null:a}function K(a){var b=
-a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var e=0,d=a.length;e<d;){var f=2*(e+1)-1,h=a[f],k=f+1,n=a[k];if(void 0!==h&&0>J(h,c))void 0!==n&&0>J(n,h)?(a[e]=n,a[k]=c,e=k):(a[e]=h,a[f]=c,e=f);else if(void 0!==n&&0>J(n,c))a[e]=n,a[k]=c,e=k;else break a}}return b}return null}function J(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function U(a){for(var b=r(w);null!==b;){if(null===b.callback)K(w);else if(b.startTime<=a)K(w),b.sortIndex=b.expirationTime,T(u,b);else break;b=r(w)}}
-function V(a){E=!1;U(a);if(!z)if(null!==r(u))z=!0,F(W);else{var b=r(w);null!==b&&L(V,b.startTime-a)}}function W(a,b){z=!1;E&&(E=!1,X());M=!0;var c=m;try{U(b);for(q=r(u);null!==q&&(!(q.expirationTime>b)||a&&!Y());){var e=q.callback;if("function"===typeof e){q.callback=null;m=q.priorityLevel;var d=e(q.expirationTime<=b);b=x();"function"===typeof d?q.callback=d:q===r(u)&&K(u);U(b)}else K(u);q=r(u)}if(null!==q)var f=!0;else{var h=r(w);null!==h&&L(V,h.startTime-b);f=!1}return f}finally{q=null,m=c,M=!1}}
-function Ca(a){var b=!1,c=null;t.forEach(function(e){try{e.onInteractionTraced(a)}catch(d){b||(b=!0,c=d)}});if(b)throw c;}function Da(a){var b=!1,c=null;t.forEach(function(e){try{e.onInteractionScheduledWorkCompleted(a)}catch(d){b||(b=!0,c=d)}});if(b)throw c;}function Ea(a,b){var c=!1,e=null;t.forEach(function(d){try{d.onWorkScheduled(a,b)}catch(l){c||(c=!0,e=l)}});if(c)throw e;}function Fa(a,b){var c=!1,e=null;t.forEach(function(d){try{d.onWorkStarted(a,b)}catch(l){c||(c=!0,e=l)}});if(c)throw e;
-}function Ga(a,b){var c=!1,e=null;t.forEach(function(d){try{d.onWorkStopped(a,b)}catch(l){c||(c=!0,e=l)}});if(c)throw e;}function Ha(a,b){var c=!1,e=null;t.forEach(function(d){try{d.onWorkCanceled(a,b)}catch(l){c||(c=!0,e=l)}});if(c)throw e;}var B=60103,la=60106;f.Fragment=60107;f.StrictMode=60108;f.Profiler=60114;var oa=60109,pa=60110,qa=60112;f.Suspense=60113;var ra=60115,sa=60116;if("function"===typeof Symbol&&Symbol.for){var g=Symbol.for;B=g("react.element");la=g("react.portal");f.Fragment=g("react.fragment");
-f.StrictMode=g("react.strict_mode");f.Profiler=g("react.profiler");oa=g("react.provider");pa=g("react.context");qa=g("react.forward_ref");f.Suspense=g("react.suspense");ra=g("react.memo");sa=g("react.lazy")}var da="function"===typeof Symbol&&Symbol.iterator,Ia=Object.prototype.hasOwnProperty,Z=Object.assign||function(a,b){if(null==a)throw new TypeError("Object.assign target cannot be null or undefined");for(var c=Object(a),e=1;e<arguments.length;e++){var d=arguments[e];if(null!=d){var f=void 0;d=
-Object(d);for(f in d)Ia.call(d,f)&&(c[f]=d[f])}}return c},fa={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,e){},enqueueSetState:function(a,b,c,e){}},ea={};A.prototype.isReactComponent={};A.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(D(85));this.updater.enqueueSetState(this,a,b,"setState")};A.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};ha.prototype=
-A.prototype;g=P.prototype=new ha;g.constructor=P;Z(g,A.prototype);g.isPureReactComponent=!0;var Q={current:null},ja=Object.prototype.hasOwnProperty,ka={key:!0,ref:!0,__self:!0,__source:!0},ma=/\/+/g,na={current:null},aa;if("object"===typeof performance&&"function"===typeof performance.now){var Ja=performance;var x=function(){return Ja.now()}}else{var ta=Date,Ka=ta.now();x=function(){return ta.now()-Ka}}if("undefined"===typeof window||"function"!==typeof MessageChannel){var G=null,ua=null,va=function(){if(null!==
-G)try{var a=x();G(!0,a);G=null}catch(b){throw setTimeout(va,0),b;}};var F=function(a){null!==G?setTimeout(F,0,a):(G=a,setTimeout(va,0))};var L=function(a,b){ua=setTimeout(a,b)};var X=function(){clearTimeout(ua)};var Y=function(){return!1};g=aa=function(){}}else{var La=window.setTimeout,Ma=window.clearTimeout;"undefined"!==typeof console&&(g=window.cancelAnimationFrame,"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),
-"function"!==typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"));var N=!1,O=null,ba=-1,wa=5,xa=0;Y=function(){return x()>=xa};g=function(){};aa=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):wa=0<a?Math.floor(1E3/a):5};var ya=new MessageChannel,ca=ya.port2;ya.port1.onmessage=
-function(){if(null!==O){var a=x();xa=a+wa;try{O(!0,a)?ca.postMessage(null):(N=!1,O=null)}catch(b){throw ca.postMessage(null),b;}}else N=!1};F=function(a){O=a;N||(N=!0,ca.postMessage(null))};L=function(a,b){ba=La(function(){a(x())},b)};X=function(){Ma(ba);ba=-1}}var u=[],w=[],Na=1,q=null,m=3,M=!1,z=!1,E=!1;g={__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;
-default:a=3}var c=m;m=a;try{return b()}finally{m=c}},unstable_next:function(a){switch(m){case 1:case 2:case 3:var b=3;break;default:b=m}var c=m;m=b;try{return a()}finally{m=c}},unstable_scheduleCallback:function(a,b,c){var e=x();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?e+c:e):c=e;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:Na++,callback:b,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};
-c>e?(a.sortIndex=c,T(w,a),null===r(u)&&a===r(w)&&(E?X():E=!0,L(V,c-e))):(a.sortIndex=d,T(u,a),z||M||(z=!0,F(W)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=m;return function(){var c=m;m=b;try{return a.apply(this,arguments)}finally{m=c}}},unstable_getCurrentPriorityLevel:function(){return m},get unstable_shouldYield(){return Y},unstable_requestPaint:g,unstable_continueExecution:function(){z||M||(z=!0,F(W))},unstable_pauseExecution:function(){},
-unstable_getFirstCallbackNode:function(){return r(u)},get unstable_now(){return x},get unstable_forceFrameRate(){return aa},unstable_Profiling:null};var Oa=0,Pa=0,p=null,y=null;p={current:new Set};y={current:null};var t=null;t=new Set;g={ReactCurrentDispatcher:na,ReactCurrentOwner:Q,IsSomeRendererActing:{current:!1},ReactCurrentBatchConfig:{transition:0},assign:Z,Scheduler:g,SchedulerTracing:{__proto__:null,get __interactionsRef(){return p},get __subscriberRef(){return y},unstable_clear:function(a){var b=
-p.current;p.current=new Set;try{return a()}finally{p.current=b}},unstable_getCurrent:function(){return p.current},unstable_getThreadID:function(){return++Pa},unstable_trace:function(a,b,c){var e=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,d={__count:1,id:Oa++,name:a,timestamp:b},f=p.current,h=new Set(f);h.add(d);p.current=h;var k=y.current;try{if(null!==k)k.onInteractionTraced(d)}finally{try{if(null!==k)k.onWorkStarted(h,e)}finally{try{var n=c()}finally{p.current=f;try{if(null!==k)k.onWorkStopped(h,
-e)}finally{if(d.__count--,null!==k&&0===d.__count)k.onInteractionScheduledWorkCompleted(d)}}}}return n},unstable_wrap:function(a){function b(){var b=p.current;p.current=e;d=y.current;try{try{if(null!==d)d.onWorkStarted(e,c)}finally{try{var k=a.apply(void 0,arguments)}finally{if(p.current=b,null!==d)d.onWorkStopped(e,c)}}return k}finally{f||(f=!0,e.forEach(function(a){a.__count--;if(null!==d&&0===a.__count)d.onInteractionScheduledWorkCompleted(a)}))}}var c=1<arguments.length&&void 0!==arguments[1]?
-arguments[1]:0,e=p.current,d=y.current;if(null!==d)d.onWorkScheduled(e,c);e.forEach(function(a){a.__count++});var f=!1;b.cancel=function(){d=y.current;try{if(null!==d)d.onWorkCanceled(e,c)}finally{e.forEach(function(a){a.__count--;if(d&&0===a.__count)d.onInteractionScheduledWorkCompleted(a)})}};return b},unstable_subscribe:function(a){t.add(a);1===t.size&&(y.current={onInteractionScheduledWorkCompleted:Da,onInteractionTraced:Ca,onWorkCanceled:Ha,onWorkScheduled:Ea,onWorkStarted:Fa,onWorkStopped:Ga})},
-unstable_unsubscribe:function(a){t.delete(a);0===t.size&&(y.current=null)}}};f.Children={map:I,forEach:function(a,b,c){I(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;I(a,function(){b++});return b},toArray:function(a){return I(a,function(a){return a})||[]},only:function(a){if(!R(a))throw Error(D(143));return a}};f.Component=A;f.PureComponent=P;f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g;f.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error(D(267,a));var e=
-Z({},a.props),d=a.key,f=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(f=b.ref,h=Q.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var k=a.type.defaultProps;for(g in b)ja.call(b,g)&&!ka.hasOwnProperty(g)&&(e[g]=void 0===b[g]&&void 0!==k?k[g]:b[g])}var g=arguments.length-2;if(1===g)e.children=c;else if(1<g){k=Array(g);for(var m=0;m<g;m++)k[m]=arguments[m+2];e.children=k}return{$$typeof:B,type:a.type,key:d,ref:f,props:e,_owner:h}};f.createContext=function(a,b){void 0===b&&(b=null);
-a={$$typeof:pa,_calculateChangedBits:b,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:oa,_context:a};return a.Consumer=a};f.createElement=ia;f.createFactory=function(a){var b=ia.bind(null,a);b.type=a;return b};f.createRef=function(){return{current:null}};f.forwardRef=function(a){return{$$typeof:qa,render:a}};f.isValidElement=R;f.lazy=function(a){return{$$typeof:sa,_payload:{_status:-1,_result:a},_init:Ba}};f.memo=function(a,b){return{$$typeof:ra,
-type:a,compare:void 0===b?null:b}};f.useCallback=function(a,b){return v().useCallback(a,b)};f.useContext=function(a,b){return v().useContext(a,b)};f.useDebugValue=function(a,b){};f.useEffect=function(a,b){return v().useEffect(a,b)};f.useImperativeHandle=function(a,b,c){return v().useImperativeHandle(a,b,c)};f.useLayoutEffect=function(a,b){return v().useLayoutEffect(a,b)};f.useMemo=function(a,b){return v().useMemo(a,b)};f.useReducer=function(a,b,c){return v().useReducer(a,b,c)};f.useRef=function(a){return v().useRef(a)};
-f.useState=function(a){return v().useState(a)};f.version="17.0.2"});
-})();
diff --git a/node_modules/scheduler/LICENSE b/node_modules/scheduler/LICENSE
deleted file mode 100644
index b96dcb0..0000000
--- a/node_modules/scheduler/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) Facebook, Inc. and its affiliates.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
diff --git a/node_modules/scheduler/README.md b/node_modules/scheduler/README.md
deleted file mode 100644
index 10e4937..0000000
--- a/node_modules/scheduler/README.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# `scheduler`
-
-This is a package for cooperative scheduling in a browser environment. It is currently used internally by React, but we plan to make it more generic.
-
-The public API for this package is not yet finalized.
-
-### Thanks
-
-The React team thanks [Anton Podviaznikov](https://podviaznikov.com/) for donating the `scheduler` package name.
diff --git a/node_modules/scheduler/build-info.json b/node_modules/scheduler/build-info.json
deleted file mode 100644
index db5dbe5..0000000
--- a/node_modules/scheduler/build-info.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "branch": "pull/21051",
- "buildNumber": "287151",
- "checksum": "94f5c65",
- "commit": "12adaffef",
- "environment": "ci",
- "reactVersion": "17.0.0-12adaffef"
-}
diff --git a/node_modules/scheduler/cjs/scheduler-tracing.development.js b/node_modules/scheduler/cjs/scheduler-tracing.development.js
deleted file mode 100644
index 327d8a5..0000000
--- a/node_modules/scheduler/cjs/scheduler-tracing.development.js
+++ /dev/null
@@ -1,347 +0,0 @@
-/** @license React v0.20.2
- * scheduler-tracing.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var DEFAULT_THREAD_ID = 0; // Counters used to generate unique IDs.
-
-var interactionIDCounter = 0;
-var threadIDCounter = 0; // Set of currently traced interactions.
-// Interactions "stack"–
-// Meaning that newly traced interactions are appended to the previously active set.
-// When an interaction goes out of scope, the previous set (if any) is restored.
-
-exports.__interactionsRef = null; // Listener(s) to notify when interactions begin and end.
-
-exports.__subscriberRef = null;
-
-{
- exports.__interactionsRef = {
- current: new Set()
- };
- exports.__subscriberRef = {
- current: null
- };
-}
-function unstable_clear(callback) {
-
- var prevInteractions = exports.__interactionsRef.current;
- exports.__interactionsRef.current = new Set();
-
- try {
- return callback();
- } finally {
- exports.__interactionsRef.current = prevInteractions;
- }
-}
-function unstable_getCurrent() {
- {
- return exports.__interactionsRef.current;
- }
-}
-function unstable_getThreadID() {
- return ++threadIDCounter;
-}
-function unstable_trace(name, timestamp, callback) {
- var threadID = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : DEFAULT_THREAD_ID;
-
- var interaction = {
- __count: 1,
- id: interactionIDCounter++,
- name: name,
- timestamp: timestamp
- };
- var prevInteractions = exports.__interactionsRef.current; // Traced interactions should stack/accumulate.
- // To do that, clone the current interactions.
- // The previous set will be restored upon completion.
-
- var interactions = new Set(prevInteractions);
- interactions.add(interaction);
- exports.__interactionsRef.current = interactions;
- var subscriber = exports.__subscriberRef.current;
- var returnValue;
-
- try {
- if (subscriber !== null) {
- subscriber.onInteractionTraced(interaction);
- }
- } finally {
- try {
- if (subscriber !== null) {
- subscriber.onWorkStarted(interactions, threadID);
- }
- } finally {
- try {
- returnValue = callback();
- } finally {
- exports.__interactionsRef.current = prevInteractions;
-
- try {
- if (subscriber !== null) {
- subscriber.onWorkStopped(interactions, threadID);
- }
- } finally {
- interaction.__count--; // If no async work was scheduled for this interaction,
- // Notify subscribers that it's completed.
-
- if (subscriber !== null && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- }
- }
- }
- }
-
- return returnValue;
-}
-function unstable_wrap(callback) {
- var threadID = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_THREAD_ID;
-
- var wrappedInteractions = exports.__interactionsRef.current;
- var subscriber = exports.__subscriberRef.current;
-
- if (subscriber !== null) {
- subscriber.onWorkScheduled(wrappedInteractions, threadID);
- } // Update the pending async work count for the current interactions.
- // Update after calling subscribers in case of error.
-
-
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count++;
- });
- var hasRun = false;
-
- function wrapped() {
- var prevInteractions = exports.__interactionsRef.current;
- exports.__interactionsRef.current = wrappedInteractions;
- subscriber = exports.__subscriberRef.current;
-
- try {
- var returnValue;
-
- try {
- if (subscriber !== null) {
- subscriber.onWorkStarted(wrappedInteractions, threadID);
- }
- } finally {
- try {
- returnValue = callback.apply(undefined, arguments);
- } finally {
- exports.__interactionsRef.current = prevInteractions;
-
- if (subscriber !== null) {
- subscriber.onWorkStopped(wrappedInteractions, threadID);
- }
- }
- }
-
- return returnValue;
- } finally {
- if (!hasRun) {
- // We only expect a wrapped function to be executed once,
- // But in the event that it's executed more than once–
- // Only decrement the outstanding interaction counts once.
- hasRun = true; // Update pending async counts for all wrapped interactions.
- // If this was the last scheduled async work for any of them,
- // Mark them as completed.
-
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count--;
-
- if (subscriber !== null && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- });
- }
- }
- }
-
- wrapped.cancel = function cancel() {
- subscriber = exports.__subscriberRef.current;
-
- try {
- if (subscriber !== null) {
- subscriber.onWorkCanceled(wrappedInteractions, threadID);
- }
- } finally {
- // Update pending async counts for all wrapped interactions.
- // If this was the last scheduled async work for any of them,
- // Mark them as completed.
- wrappedInteractions.forEach(function (interaction) {
- interaction.__count--;
-
- if (subscriber && interaction.__count === 0) {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- }
- });
- }
- };
-
- return wrapped;
-}
-
-var subscribers = null;
-
-{
- subscribers = new Set();
-}
-
-function unstable_subscribe(subscriber) {
- {
- subscribers.add(subscriber);
-
- if (subscribers.size === 1) {
- exports.__subscriberRef.current = {
- onInteractionScheduledWorkCompleted: onInteractionScheduledWorkCompleted,
- onInteractionTraced: onInteractionTraced,
- onWorkCanceled: onWorkCanceled,
- onWorkScheduled: onWorkScheduled,
- onWorkStarted: onWorkStarted,
- onWorkStopped: onWorkStopped
- };
- }
- }
-}
-function unstable_unsubscribe(subscriber) {
- {
- subscribers.delete(subscriber);
-
- if (subscribers.size === 0) {
- exports.__subscriberRef.current = null;
- }
- }
-}
-
-function onInteractionTraced(interaction) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onInteractionTraced(interaction);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
-}
-
-function onInteractionScheduledWorkCompleted(interaction) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onInteractionScheduledWorkCompleted(interaction);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
-}
-
-function onWorkScheduled(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkScheduled(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
-}
-
-function onWorkStarted(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkStarted(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
-}
-
-function onWorkStopped(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkStopped(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
-}
-
-function onWorkCanceled(interactions, threadID) {
- var didCatchError = false;
- var caughtError = null;
- subscribers.forEach(function (subscriber) {
- try {
- subscriber.onWorkCanceled(interactions, threadID);
- } catch (error) {
- if (!didCatchError) {
- didCatchError = true;
- caughtError = error;
- }
- }
- });
-
- if (didCatchError) {
- throw caughtError;
- }
-}
-
-exports.unstable_clear = unstable_clear;
-exports.unstable_getCurrent = unstable_getCurrent;
-exports.unstable_getThreadID = unstable_getThreadID;
-exports.unstable_subscribe = unstable_subscribe;
-exports.unstable_trace = unstable_trace;
-exports.unstable_unsubscribe = unstable_unsubscribe;
-exports.unstable_wrap = unstable_wrap;
- })();
-}
diff --git a/node_modules/scheduler/cjs/scheduler-tracing.production.min.js b/node_modules/scheduler/cjs/scheduler-tracing.production.min.js
deleted file mode 100644
index b8a3c78..0000000
--- a/node_modules/scheduler/cjs/scheduler-tracing.production.min.js
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @license React v0.20.2
- * scheduler-tracing.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var b=0;exports.__interactionsRef=null;exports.__subscriberRef=null;exports.unstable_clear=function(a){return a()};exports.unstable_getCurrent=function(){return null};exports.unstable_getThreadID=function(){return++b};exports.unstable_subscribe=function(){};exports.unstable_trace=function(a,d,c){return c()};exports.unstable_unsubscribe=function(){};exports.unstable_wrap=function(a){return a};
diff --git a/node_modules/scheduler/cjs/scheduler-tracing.profiling.min.js b/node_modules/scheduler/cjs/scheduler-tracing.profiling.min.js
deleted file mode 100644
index a0565a0..0000000
--- a/node_modules/scheduler/cjs/scheduler-tracing.profiling.min.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/** @license React v0.20.2
- * scheduler-tracing.profiling.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var g=0,l=0;exports.__interactionsRef=null;exports.__subscriberRef=null;exports.__interactionsRef={current:new Set};exports.__subscriberRef={current:null};var m=null;m=new Set;function n(e){var d=!1,a=null;m.forEach(function(c){try{c.onInteractionTraced(e)}catch(b){d||(d=!0,a=b)}});if(d)throw a;}function p(e){var d=!1,a=null;m.forEach(function(c){try{c.onInteractionScheduledWorkCompleted(e)}catch(b){d||(d=!0,a=b)}});if(d)throw a;}
-function q(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkScheduled(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function r(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkStarted(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function t(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkStopped(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}function u(e,d){var a=!1,c=null;m.forEach(function(b){try{b.onWorkCanceled(e,d)}catch(f){a||(a=!0,c=f)}});if(a)throw c;}
-exports.unstable_clear=function(e){var d=exports.__interactionsRef.current;exports.__interactionsRef.current=new Set;try{return e()}finally{exports.__interactionsRef.current=d}};exports.unstable_getCurrent=function(){return exports.__interactionsRef.current};exports.unstable_getThreadID=function(){return++l};
-exports.unstable_subscribe=function(e){m.add(e);1===m.size&&(exports.__subscriberRef.current={onInteractionScheduledWorkCompleted:p,onInteractionTraced:n,onWorkCanceled:u,onWorkScheduled:q,onWorkStarted:r,onWorkStopped:t})};
-exports.unstable_trace=function(e,d,a){var c=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,b={__count:1,id:g++,name:e,timestamp:d},f=exports.__interactionsRef.current,k=new Set(f);k.add(b);exports.__interactionsRef.current=k;var h=exports.__subscriberRef.current;try{if(null!==h)h.onInteractionTraced(b)}finally{try{if(null!==h)h.onWorkStarted(k,c)}finally{try{var v=a()}finally{exports.__interactionsRef.current=f;try{if(null!==h)h.onWorkStopped(k,c)}finally{if(b.__count--,null!==h&&0===b.__count)h.onInteractionScheduledWorkCompleted(b)}}}}return v};
-exports.unstable_unsubscribe=function(e){m.delete(e);0===m.size&&(exports.__subscriberRef.current=null)};
-exports.unstable_wrap=function(e){function d(){var d=exports.__interactionsRef.current;exports.__interactionsRef.current=c;b=exports.__subscriberRef.current;try{try{if(null!==b)b.onWorkStarted(c,a)}finally{try{var h=e.apply(void 0,arguments)}finally{if(exports.__interactionsRef.current=d,null!==b)b.onWorkStopped(c,a)}}return h}finally{f||(f=!0,c.forEach(function(a){a.__count--;if(null!==b&&0===a.__count)b.onInteractionScheduledWorkCompleted(a)}))}}var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:
-0,c=exports.__interactionsRef.current,b=exports.__subscriberRef.current;if(null!==b)b.onWorkScheduled(c,a);c.forEach(function(a){a.__count++});var f=!1;d.cancel=function(){b=exports.__subscriberRef.current;try{if(null!==b)b.onWorkCanceled(c,a)}finally{c.forEach(function(a){a.__count--;if(b&&0===a.__count)b.onInteractionScheduledWorkCompleted(a)})}};return d};
diff --git a/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js b/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js
deleted file mode 100644
index 9f0da52..0000000
--- a/node_modules/scheduler/cjs/scheduler-unstable_mock.development.js
+++ /dev/null
@@ -1,665 +0,0 @@
-/** @license React v0.20.2
- * scheduler-unstable_mock.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var enableSchedulerDebugging = false;
-var enableProfiling = false;
-
-var currentTime = 0;
-var scheduledCallback = null;
-var scheduledTimeout = null;
-var timeoutTime = -1;
-var yieldedValues = null;
-var expectedNumberOfYields = -1;
-var didStop = false;
-var isFlushing = false;
-var needsPaint = false;
-var shouldYieldForPaint = false;
-function requestHostCallback(callback) {
- scheduledCallback = callback;
-}
-function requestHostTimeout(callback, ms) {
- scheduledTimeout = callback;
- timeoutTime = currentTime + ms;
-}
-function cancelHostTimeout() {
- scheduledTimeout = null;
- timeoutTime = -1;
-}
-function shouldYieldToHost() {
- if (expectedNumberOfYields !== -1 && yieldedValues !== null && yieldedValues.length >= expectedNumberOfYields || shouldYieldForPaint && needsPaint) {
- // We yielded at least as many values as expected. Stop flushing.
- didStop = true;
- return true;
- }
-
- return false;
-}
-function getCurrentTime() {
- return currentTime;
-}
-function forceFrameRate() {// No-op
-}
-
-function unstable_flushNumberOfYields(count) {
- if (isFlushing) {
- throw new Error('Already flushing work.');
- }
-
- if (scheduledCallback !== null) {
- var cb = scheduledCallback;
- expectedNumberOfYields = count;
- isFlushing = true;
-
- try {
- var hasMoreWork = true;
-
- do {
- hasMoreWork = cb(true, currentTime);
- } while (hasMoreWork && !didStop);
-
- if (!hasMoreWork) {
- scheduledCallback = null;
- }
- } finally {
- expectedNumberOfYields = -1;
- didStop = false;
- isFlushing = false;
- }
- }
-}
-function unstable_flushUntilNextPaint() {
- if (isFlushing) {
- throw new Error('Already flushing work.');
- }
-
- if (scheduledCallback !== null) {
- var cb = scheduledCallback;
- shouldYieldForPaint = true;
- needsPaint = false;
- isFlushing = true;
-
- try {
- var hasMoreWork = true;
-
- do {
- hasMoreWork = cb(true, currentTime);
- } while (hasMoreWork && !didStop);
-
- if (!hasMoreWork) {
- scheduledCallback = null;
- }
- } finally {
- shouldYieldForPaint = false;
- didStop = false;
- isFlushing = false;
- }
- }
-}
-function unstable_flushExpired() {
- if (isFlushing) {
- throw new Error('Already flushing work.');
- }
-
- if (scheduledCallback !== null) {
- isFlushing = true;
-
- try {
- var hasMoreWork = scheduledCallback(false, currentTime);
-
- if (!hasMoreWork) {
- scheduledCallback = null;
- }
- } finally {
- isFlushing = false;
- }
- }
-}
-function unstable_flushAllWithoutAsserting() {
- // Returns false if no work was flushed.
- if (isFlushing) {
- throw new Error('Already flushing work.');
- }
-
- if (scheduledCallback !== null) {
- var cb = scheduledCallback;
- isFlushing = true;
-
- try {
- var hasMoreWork = true;
-
- do {
- hasMoreWork = cb(true, currentTime);
- } while (hasMoreWork);
-
- if (!hasMoreWork) {
- scheduledCallback = null;
- }
-
- return true;
- } finally {
- isFlushing = false;
- }
- } else {
- return false;
- }
-}
-function unstable_clearYields() {
- if (yieldedValues === null) {
- return [];
- }
-
- var values = yieldedValues;
- yieldedValues = null;
- return values;
-}
-function unstable_flushAll() {
- if (yieldedValues !== null) {
- throw new Error('Log is not empty. Assert on the log of yielded values before ' + 'flushing additional work.');
- }
-
- unstable_flushAllWithoutAsserting();
-
- if (yieldedValues !== null) {
- throw new Error('While flushing work, something yielded a value. Use an ' + 'assertion helper to assert on the log of yielded values, e.g. ' + 'expect(Scheduler).toFlushAndYield([...])');
- }
-}
-function unstable_yieldValue(value) {
- // eslint-disable-next-line react-internal/no-production-logging
- if (console.log.name === 'disabledLog') {
- // If console.log has been patched, we assume we're in render
- // replaying and we ignore any values yielding in the second pass.
- return;
- }
-
- if (yieldedValues === null) {
- yieldedValues = [value];
- } else {
- yieldedValues.push(value);
- }
-}
-function unstable_advanceTime(ms) {
- // eslint-disable-next-line react-internal/no-production-logging
- if (console.log.name === 'disabledLog') {
- // If console.log has been patched, we assume we're in render
- // replaying and we ignore any time advancing in the second pass.
- return;
- }
-
- currentTime += ms;
-
- if (scheduledTimeout !== null && timeoutTime <= currentTime) {
- scheduledTimeout(currentTime);
- timeoutTime = -1;
- scheduledTimeout = null;
- }
-}
-function requestPaint() {
- needsPaint = true;
-}
-
-function push(heap, node) {
- var index = heap.length;
- heap.push(node);
- siftUp(heap, node, index);
-}
-function peek(heap) {
- var first = heap[0];
- return first === undefined ? null : first;
-}
-function pop(heap) {
- var first = heap[0];
-
- if (first !== undefined) {
- var last = heap.pop();
-
- if (last !== first) {
- heap[0] = last;
- siftDown(heap, last, 0);
- }
-
- return first;
- } else {
- return null;
- }
-}
-
-function siftUp(heap, node, i) {
- var index = i;
-
- while (true) {
- var parentIndex = index - 1 >>> 1;
- var parent = heap[parentIndex];
-
- if (parent !== undefined && compare(parent, node) > 0) {
- // The parent is larger. Swap positions.
- heap[parentIndex] = node;
- heap[index] = parent;
- index = parentIndex;
- } else {
- // The parent is smaller. Exit.
- return;
- }
- }
-}
-
-function siftDown(heap, node, i) {
- var index = i;
- var length = heap.length;
-
- while (index < length) {
- var leftIndex = (index + 1) * 2 - 1;
- var left = heap[leftIndex];
- var rightIndex = leftIndex + 1;
- var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
-
- if (left !== undefined && compare(left, node) < 0) {
- if (right !== undefined && compare(right, left) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- heap[index] = left;
- heap[leftIndex] = node;
- index = leftIndex;
- }
- } else if (right !== undefined && compare(right, node) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- // Neither child is smaller. Exit.
- return;
- }
- }
-}
-
-function compare(a, b) {
- // Compare sort index first, then task id.
- var diff = a.sortIndex - b.sortIndex;
- return diff !== 0 ? diff : a.id - b.id;
-}
-
-// TODO: Use symbols?
-var ImmediatePriority = 1;
-var UserBlockingPriority = 2;
-var NormalPriority = 3;
-var LowPriority = 4;
-var IdlePriority = 5;
-
-function markTaskErrored(task, ms) {
-}
-
-/* eslint-disable no-var */
-// Math.pow(2, 30) - 1
-// 0b111111111111111111111111111111
-
-var maxSigned31BitInt = 1073741823; // Times out immediately
-
-var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
-
-var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
-var NORMAL_PRIORITY_TIMEOUT = 5000;
-var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
-
-var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap
-
-var taskQueue = [];
-var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
-
-var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
-var currentTask = null;
-var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.
-
-var isPerformingWork = false;
-var isHostCallbackScheduled = false;
-var isHostTimeoutScheduled = false;
-
-function advanceTimers(currentTime) {
- // Check for tasks that are no longer delayed and add them to the queue.
- var timer = peek(timerQueue);
-
- while (timer !== null) {
- if (timer.callback === null) {
- // Timer was cancelled.
- pop(timerQueue);
- } else if (timer.startTime <= currentTime) {
- // Timer fired. Transfer to the task queue.
- pop(timerQueue);
- timer.sortIndex = timer.expirationTime;
- push(taskQueue, timer);
- } else {
- // Remaining timers are pending.
- return;
- }
-
- timer = peek(timerQueue);
- }
-}
-
-function handleTimeout(currentTime) {
- isHostTimeoutScheduled = false;
- advanceTimers(currentTime);
-
- if (!isHostCallbackScheduled) {
- if (peek(taskQueue) !== null) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- } else {
- var firstTimer = peek(timerQueue);
-
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
- }
- }
-}
-
-function flushWork(hasTimeRemaining, initialTime) {
-
-
- isHostCallbackScheduled = false;
-
- if (isHostTimeoutScheduled) {
- // We scheduled a timeout but it's no longer needed. Cancel it.
- isHostTimeoutScheduled = false;
- cancelHostTimeout();
- }
-
- isPerformingWork = true;
- var previousPriorityLevel = currentPriorityLevel;
-
- try {
- if (enableProfiling) {
- try {
- return workLoop(hasTimeRemaining, initialTime);
- } catch (error) {
- if (currentTask !== null) {
- var currentTime = getCurrentTime();
- markTaskErrored(currentTask, currentTime);
- currentTask.isQueued = false;
- }
-
- throw error;
- }
- } else {
- // No catch in prod code path.
- return workLoop(hasTimeRemaining, initialTime);
- }
- } finally {
- currentTask = null;
- currentPriorityLevel = previousPriorityLevel;
- isPerformingWork = false;
- }
-}
-
-function workLoop(hasTimeRemaining, initialTime) {
- var currentTime = initialTime;
- advanceTimers(currentTime);
- currentTask = peek(taskQueue);
-
- while (currentTask !== null && !(enableSchedulerDebugging )) {
- if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
- // This currentTask hasn't expired, and we've reached the deadline.
- break;
- }
-
- var callback = currentTask.callback;
-
- if (typeof callback === 'function') {
- currentTask.callback = null;
- currentPriorityLevel = currentTask.priorityLevel;
- var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
-
- var continuationCallback = callback(didUserCallbackTimeout);
- currentTime = getCurrentTime();
-
- if (typeof continuationCallback === 'function') {
- currentTask.callback = continuationCallback;
- } else {
-
- if (currentTask === peek(taskQueue)) {
- pop(taskQueue);
- }
- }
-
- advanceTimers(currentTime);
- } else {
- pop(taskQueue);
- }
-
- currentTask = peek(taskQueue);
- } // Return whether there's additional work
-
-
- if (currentTask !== null) {
- return true;
- } else {
- var firstTimer = peek(timerQueue);
-
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
-
- return false;
- }
-}
-
-function unstable_runWithPriority(priorityLevel, eventHandler) {
- switch (priorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- case LowPriority:
- case IdlePriority:
- break;
-
- default:
- priorityLevel = NormalPriority;
- }
-
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
-
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
-}
-
-function unstable_next(eventHandler) {
- var priorityLevel;
-
- switch (currentPriorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- // Shift down to normal priority
- priorityLevel = NormalPriority;
- break;
-
- default:
- // Anything lower than normal priority should remain at the current level.
- priorityLevel = currentPriorityLevel;
- break;
- }
-
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
-
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
-}
-
-function unstable_wrapCallback(callback) {
- var parentPriorityLevel = currentPriorityLevel;
- return function () {
- // This is a fork of runWithPriority, inlined for performance.
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = parentPriorityLevel;
-
- try {
- return callback.apply(this, arguments);
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- };
-}
-
-function unstable_scheduleCallback(priorityLevel, callback, options) {
- var currentTime = getCurrentTime();
- var startTime;
-
- if (typeof options === 'object' && options !== null) {
- var delay = options.delay;
-
- if (typeof delay === 'number' && delay > 0) {
- startTime = currentTime + delay;
- } else {
- startTime = currentTime;
- }
- } else {
- startTime = currentTime;
- }
-
- var timeout;
-
- switch (priorityLevel) {
- case ImmediatePriority:
- timeout = IMMEDIATE_PRIORITY_TIMEOUT;
- break;
-
- case UserBlockingPriority:
- timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
- break;
-
- case IdlePriority:
- timeout = IDLE_PRIORITY_TIMEOUT;
- break;
-
- case LowPriority:
- timeout = LOW_PRIORITY_TIMEOUT;
- break;
-
- case NormalPriority:
- default:
- timeout = NORMAL_PRIORITY_TIMEOUT;
- break;
- }
-
- var expirationTime = startTime + timeout;
- var newTask = {
- id: taskIdCounter++,
- callback: callback,
- priorityLevel: priorityLevel,
- startTime: startTime,
- expirationTime: expirationTime,
- sortIndex: -1
- };
-
- if (startTime > currentTime) {
- // This is a delayed task.
- newTask.sortIndex = startTime;
- push(timerQueue, newTask);
-
- if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
- // All tasks are delayed, and this is the task with the earliest delay.
- if (isHostTimeoutScheduled) {
- // Cancel an existing timeout.
- cancelHostTimeout();
- } else {
- isHostTimeoutScheduled = true;
- } // Schedule a timeout.
-
-
- requestHostTimeout(handleTimeout, startTime - currentTime);
- }
- } else {
- newTask.sortIndex = expirationTime;
- push(taskQueue, newTask);
- // wait until the next time we yield.
-
-
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
- }
-
- return newTask;
-}
-
-function unstable_pauseExecution() {
-}
-
-function unstable_continueExecution() {
-
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
-}
-
-function unstable_getFirstCallbackNode() {
- return peek(taskQueue);
-}
-
-function unstable_cancelCallback(task) {
- // remove from the queue because you can't remove arbitrary nodes from an
- // array based heap, only the first one.)
-
-
- task.callback = null;
-}
-
-function unstable_getCurrentPriorityLevel() {
- return currentPriorityLevel;
-}
-
-var unstable_requestPaint = requestPaint;
-var unstable_Profiling = null;
-
-exports.unstable_IdlePriority = IdlePriority;
-exports.unstable_ImmediatePriority = ImmediatePriority;
-exports.unstable_LowPriority = LowPriority;
-exports.unstable_NormalPriority = NormalPriority;
-exports.unstable_Profiling = unstable_Profiling;
-exports.unstable_UserBlockingPriority = UserBlockingPriority;
-exports.unstable_advanceTime = unstable_advanceTime;
-exports.unstable_cancelCallback = unstable_cancelCallback;
-exports.unstable_clearYields = unstable_clearYields;
-exports.unstable_continueExecution = unstable_continueExecution;
-exports.unstable_flushAll = unstable_flushAll;
-exports.unstable_flushAllWithoutAsserting = unstable_flushAllWithoutAsserting;
-exports.unstable_flushExpired = unstable_flushExpired;
-exports.unstable_flushNumberOfYields = unstable_flushNumberOfYields;
-exports.unstable_flushUntilNextPaint = unstable_flushUntilNextPaint;
-exports.unstable_forceFrameRate = forceFrameRate;
-exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
-exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
-exports.unstable_next = unstable_next;
-exports.unstable_now = getCurrentTime;
-exports.unstable_pauseExecution = unstable_pauseExecution;
-exports.unstable_requestPaint = unstable_requestPaint;
-exports.unstable_runWithPriority = unstable_runWithPriority;
-exports.unstable_scheduleCallback = unstable_scheduleCallback;
-exports.unstable_shouldYield = shouldYieldToHost;
-exports.unstable_wrapCallback = unstable_wrapCallback;
-exports.unstable_yieldValue = unstable_yieldValue;
- })();
-}
diff --git a/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js b/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js
deleted file mode 100644
index d9bb788..0000000
--- a/node_modules/scheduler/cjs/scheduler-unstable_mock.production.min.js
+++ /dev/null
@@ -1,19 +0,0 @@
-/** @license React v0.20.2
- * scheduler-unstable_mock.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var f=0,g=null,h=null,k=-1,l=null,m=-1,n=!1,p=!1,q=!1,r=!1;function t(){return-1!==m&&null!==l&&l.length>=m||r&&q?n=!0:!1}function x(){if(p)throw Error("Already flushing work.");if(null!==g){var a=g;p=!0;try{var b=!0;do b=a(!0,f);while(b);b||(g=null);return!0}finally{p=!1}}else return!1}function z(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<A(e,b))a[d]=b,a[c]=e,c=d;else break a}}function B(a){a=a[0];return void 0===a?null:a}
-function C(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var u=2*(d+1)-1,v=a[u],w=u+1,y=a[w];if(void 0!==v&&0>A(v,c))void 0!==y&&0>A(y,v)?(a[d]=y,a[w]=c,d=w):(a[d]=v,a[u]=c,d=u);else if(void 0!==y&&0>A(y,c))a[d]=y,a[w]=c,d=w;else break a}}return b}return null}function A(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var D=[],E=[],F=1,G=null,H=3,I=!1,J=!1,K=!1;
-function L(a){for(var b=B(E);null!==b;){if(null===b.callback)C(E);else if(b.startTime<=a)C(E),b.sortIndex=b.expirationTime,z(D,b);else break;b=B(E)}}function M(a){K=!1;L(a);if(!J)if(null!==B(D))J=!0,g=N;else{var b=B(E);null!==b&&(a=b.startTime-a,h=M,k=f+a)}}
-function N(a,b){J=!1;K&&(K=!1,h=null,k=-1);I=!0;var c=H;try{L(b);for(G=B(D);null!==G&&(!(G.expirationTime>b)||a&&!t());){var d=G.callback;if("function"===typeof d){G.callback=null;H=G.priorityLevel;var e=d(G.expirationTime<=b);b=f;"function"===typeof e?G.callback=e:G===B(D)&&C(D);L(b)}else C(D);G=B(D)}if(null!==G)var u=!0;else{var v=B(E);if(null!==v){var w=v.startTime-b;h=M;k=f+w}u=!1}return u}finally{G=null,H=c,I=!1}}exports.unstable_IdlePriority=5;exports.unstable_ImmediatePriority=1;
-exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_advanceTime=function(a){"disabledLog"!==console.log.name&&(f+=a,null!==h&&k<=f&&(h(f),k=-1,h=null))};exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_clearYields=function(){if(null===l)return[];var a=l;l=null;return a};exports.unstable_continueExecution=function(){J||I||(J=!0,g=N)};
-exports.unstable_flushAll=function(){if(null!==l)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");x();if(null!==l)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])");};exports.unstable_flushAllWithoutAsserting=x;
-exports.unstable_flushExpired=function(){if(p)throw Error("Already flushing work.");if(null!==g){p=!0;try{g(!1,f)||(g=null)}finally{p=!1}}};exports.unstable_flushNumberOfYields=function(a){if(p)throw Error("Already flushing work.");if(null!==g){var b=g;m=a;p=!0;try{a=!0;do a=b(!0,f);while(a&&!n);a||(g=null)}finally{m=-1,p=n=!1}}};
-exports.unstable_flushUntilNextPaint=function(){if(p)throw Error("Already flushing work.");if(null!==g){var a=g;r=!0;q=!1;p=!0;try{var b=!0;do b=a(!0,f);while(b&&!n);b||(g=null)}finally{p=n=r=!1}}};exports.unstable_forceFrameRate=function(){};exports.unstable_getCurrentPriorityLevel=function(){return H};exports.unstable_getFirstCallbackNode=function(){return B(D)};exports.unstable_next=function(a){switch(H){case 1:case 2:case 3:var b=3;break;default:b=H}var c=H;H=b;try{return a()}finally{H=c}};
-exports.unstable_now=function(){return f};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=function(){q=!0};exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=H;H=a;try{return b()}finally{H=c}};
-exports.unstable_scheduleCallback=function(a,b,c){var d=f;"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:F++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,z(E,a),null===B(D)&&a===B(E)&&(K?(h=null,k=-1):K=!0,h=M,k=f+(c-d))):(a.sortIndex=e,z(D,a),J||I||(J=!0,g=N));return a};exports.unstable_shouldYield=t;
-exports.unstable_wrapCallback=function(a){var b=H;return function(){var c=H;H=b;try{return a.apply(this,arguments)}finally{H=c}}};exports.unstable_yieldValue=function(a){"disabledLog"!==console.log.name&&(null===l?l=[a]:l.push(a))};
diff --git a/node_modules/scheduler/cjs/scheduler.development.js b/node_modules/scheduler/cjs/scheduler.development.js
deleted file mode 100644
index 200e838..0000000
--- a/node_modules/scheduler/cjs/scheduler.development.js
+++ /dev/null
@@ -1,646 +0,0 @@
-/** @license React v0.20.2
- * scheduler.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-if (process.env.NODE_ENV !== "production") {
- (function() {
-'use strict';
-
-var enableSchedulerDebugging = false;
-var enableProfiling = false;
-
-var requestHostCallback;
-var requestHostTimeout;
-var cancelHostTimeout;
-var requestPaint;
-var hasPerformanceNow = typeof performance === 'object' && typeof performance.now === 'function';
-
-if (hasPerformanceNow) {
- var localPerformance = performance;
-
- exports.unstable_now = function () {
- return localPerformance.now();
- };
-} else {
- var localDate = Date;
- var initialTime = localDate.now();
-
- exports.unstable_now = function () {
- return localDate.now() - initialTime;
- };
-}
-
-if ( // If Scheduler runs in a non-DOM environment, it falls back to a naive
-// implementation using setTimeout.
-typeof window === 'undefined' || // Check if MessageChannel is supported, too.
-typeof MessageChannel !== 'function') {
- // If this accidentally gets imported in a non-browser environment, e.g. JavaScriptCore,
- // fallback to a naive implementation.
- var _callback = null;
- var _timeoutID = null;
-
- var _flushCallback = function () {
- if (_callback !== null) {
- try {
- var currentTime = exports.unstable_now();
- var hasRemainingTime = true;
-
- _callback(hasRemainingTime, currentTime);
-
- _callback = null;
- } catch (e) {
- setTimeout(_flushCallback, 0);
- throw e;
- }
- }
- };
-
- requestHostCallback = function (cb) {
- if (_callback !== null) {
- // Protect against re-entrancy.
- setTimeout(requestHostCallback, 0, cb);
- } else {
- _callback = cb;
- setTimeout(_flushCallback, 0);
- }
- };
-
- requestHostTimeout = function (cb, ms) {
- _timeoutID = setTimeout(cb, ms);
- };
-
- cancelHostTimeout = function () {
- clearTimeout(_timeoutID);
- };
-
- exports.unstable_shouldYield = function () {
- return false;
- };
-
- requestPaint = exports.unstable_forceFrameRate = function () {};
-} else {
- // Capture local references to native APIs, in case a polyfill overrides them.
- var _setTimeout = window.setTimeout;
- var _clearTimeout = window.clearTimeout;
-
- if (typeof console !== 'undefined') {
- // TODO: Scheduler no longer requires these methods to be polyfilled. But
- // maybe we want to continue warning if they don't exist, to preserve the
- // option to rely on it in the future?
- var requestAnimationFrame = window.requestAnimationFrame;
- var cancelAnimationFrame = window.cancelAnimationFrame;
-
- if (typeof requestAnimationFrame !== 'function') {
- // Using console['error'] to evade Babel and ESLint
- console['error']("This browser doesn't support requestAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
- }
-
- if (typeof cancelAnimationFrame !== 'function') {
- // Using console['error'] to evade Babel and ESLint
- console['error']("This browser doesn't support cancelAnimationFrame. " + 'Make sure that you load a ' + 'polyfill in older browsers. https://reactjs.org/link/react-polyfills');
- }
- }
-
- var isMessageLoopRunning = false;
- var scheduledHostCallback = null;
- var taskTimeoutID = -1; // Scheduler periodically yields in case there is other work on the main
- // thread, like user events. By default, it yields multiple times per frame.
- // It does not attempt to align with frame boundaries, since most tasks don't
- // need to be frame aligned; for those that do, use requestAnimationFrame.
-
- var yieldInterval = 5;
- var deadline = 0; // TODO: Make this configurable
-
- {
- // `isInputPending` is not available. Since we have no way of knowing if
- // there's pending input, always yield at the end of the frame.
- exports.unstable_shouldYield = function () {
- return exports.unstable_now() >= deadline;
- }; // Since we yield every frame regardless, `requestPaint` has no effect.
-
-
- requestPaint = function () {};
- }
-
- exports.unstable_forceFrameRate = function (fps) {
- if (fps < 0 || fps > 125) {
- // Using console['error'] to evade Babel and ESLint
- console['error']('forceFrameRate takes a positive int between 0 and 125, ' + 'forcing frame rates higher than 125 fps is not supported');
- return;
- }
-
- if (fps > 0) {
- yieldInterval = Math.floor(1000 / fps);
- } else {
- // reset the framerate
- yieldInterval = 5;
- }
- };
-
- var performWorkUntilDeadline = function () {
- if (scheduledHostCallback !== null) {
- var currentTime = exports.unstable_now(); // Yield after `yieldInterval` ms, regardless of where we are in the vsync
- // cycle. This means there's always time remaining at the beginning of
- // the message event.
-
- deadline = currentTime + yieldInterval;
- var hasTimeRemaining = true;
-
- try {
- var hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
-
- if (!hasMoreWork) {
- isMessageLoopRunning = false;
- scheduledHostCallback = null;
- } else {
- // If there's more work, schedule the next message event at the end
- // of the preceding one.
- port.postMessage(null);
- }
- } catch (error) {
- // If a scheduler task throws, exit the current browser task so the
- // error can be observed.
- port.postMessage(null);
- throw error;
- }
- } else {
- isMessageLoopRunning = false;
- } // Yielding to the browser will give it a chance to paint, so we can
- };
-
- var channel = new MessageChannel();
- var port = channel.port2;
- channel.port1.onmessage = performWorkUntilDeadline;
-
- requestHostCallback = function (callback) {
- scheduledHostCallback = callback;
-
- if (!isMessageLoopRunning) {
- isMessageLoopRunning = true;
- port.postMessage(null);
- }
- };
-
- requestHostTimeout = function (callback, ms) {
- taskTimeoutID = _setTimeout(function () {
- callback(exports.unstable_now());
- }, ms);
- };
-
- cancelHostTimeout = function () {
- _clearTimeout(taskTimeoutID);
-
- taskTimeoutID = -1;
- };
-}
-
-function push(heap, node) {
- var index = heap.length;
- heap.push(node);
- siftUp(heap, node, index);
-}
-function peek(heap) {
- var first = heap[0];
- return first === undefined ? null : first;
-}
-function pop(heap) {
- var first = heap[0];
-
- if (first !== undefined) {
- var last = heap.pop();
-
- if (last !== first) {
- heap[0] = last;
- siftDown(heap, last, 0);
- }
-
- return first;
- } else {
- return null;
- }
-}
-
-function siftUp(heap, node, i) {
- var index = i;
-
- while (true) {
- var parentIndex = index - 1 >>> 1;
- var parent = heap[parentIndex];
-
- if (parent !== undefined && compare(parent, node) > 0) {
- // The parent is larger. Swap positions.
- heap[parentIndex] = node;
- heap[index] = parent;
- index = parentIndex;
- } else {
- // The parent is smaller. Exit.
- return;
- }
- }
-}
-
-function siftDown(heap, node, i) {
- var index = i;
- var length = heap.length;
-
- while (index < length) {
- var leftIndex = (index + 1) * 2 - 1;
- var left = heap[leftIndex];
- var rightIndex = leftIndex + 1;
- var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
-
- if (left !== undefined && compare(left, node) < 0) {
- if (right !== undefined && compare(right, left) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- heap[index] = left;
- heap[leftIndex] = node;
- index = leftIndex;
- }
- } else if (right !== undefined && compare(right, node) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- // Neither child is smaller. Exit.
- return;
- }
- }
-}
-
-function compare(a, b) {
- // Compare sort index first, then task id.
- var diff = a.sortIndex - b.sortIndex;
- return diff !== 0 ? diff : a.id - b.id;
-}
-
-// TODO: Use symbols?
-var ImmediatePriority = 1;
-var UserBlockingPriority = 2;
-var NormalPriority = 3;
-var LowPriority = 4;
-var IdlePriority = 5;
-
-function markTaskErrored(task, ms) {
-}
-
-/* eslint-disable no-var */
-// Math.pow(2, 30) - 1
-// 0b111111111111111111111111111111
-
-var maxSigned31BitInt = 1073741823; // Times out immediately
-
-var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
-
-var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
-var NORMAL_PRIORITY_TIMEOUT = 5000;
-var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
-
-var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap
-
-var taskQueue = [];
-var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
-
-var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
-var currentTask = null;
-var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.
-
-var isPerformingWork = false;
-var isHostCallbackScheduled = false;
-var isHostTimeoutScheduled = false;
-
-function advanceTimers(currentTime) {
- // Check for tasks that are no longer delayed and add them to the queue.
- var timer = peek(timerQueue);
-
- while (timer !== null) {
- if (timer.callback === null) {
- // Timer was cancelled.
- pop(timerQueue);
- } else if (timer.startTime <= currentTime) {
- // Timer fired. Transfer to the task queue.
- pop(timerQueue);
- timer.sortIndex = timer.expirationTime;
- push(taskQueue, timer);
- } else {
- // Remaining timers are pending.
- return;
- }
-
- timer = peek(timerQueue);
- }
-}
-
-function handleTimeout(currentTime) {
- isHostTimeoutScheduled = false;
- advanceTimers(currentTime);
-
- if (!isHostCallbackScheduled) {
- if (peek(taskQueue) !== null) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- } else {
- var firstTimer = peek(timerQueue);
-
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
- }
- }
-}
-
-function flushWork(hasTimeRemaining, initialTime) {
-
-
- isHostCallbackScheduled = false;
-
- if (isHostTimeoutScheduled) {
- // We scheduled a timeout but it's no longer needed. Cancel it.
- isHostTimeoutScheduled = false;
- cancelHostTimeout();
- }
-
- isPerformingWork = true;
- var previousPriorityLevel = currentPriorityLevel;
-
- try {
- if (enableProfiling) {
- try {
- return workLoop(hasTimeRemaining, initialTime);
- } catch (error) {
- if (currentTask !== null) {
- var currentTime = exports.unstable_now();
- markTaskErrored(currentTask, currentTime);
- currentTask.isQueued = false;
- }
-
- throw error;
- }
- } else {
- // No catch in prod code path.
- return workLoop(hasTimeRemaining, initialTime);
- }
- } finally {
- currentTask = null;
- currentPriorityLevel = previousPriorityLevel;
- isPerformingWork = false;
- }
-}
-
-function workLoop(hasTimeRemaining, initialTime) {
- var currentTime = initialTime;
- advanceTimers(currentTime);
- currentTask = peek(taskQueue);
-
- while (currentTask !== null && !(enableSchedulerDebugging )) {
- if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || exports.unstable_shouldYield())) {
- // This currentTask hasn't expired, and we've reached the deadline.
- break;
- }
-
- var callback = currentTask.callback;
-
- if (typeof callback === 'function') {
- currentTask.callback = null;
- currentPriorityLevel = currentTask.priorityLevel;
- var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
-
- var continuationCallback = callback(didUserCallbackTimeout);
- currentTime = exports.unstable_now();
-
- if (typeof continuationCallback === 'function') {
- currentTask.callback = continuationCallback;
- } else {
-
- if (currentTask === peek(taskQueue)) {
- pop(taskQueue);
- }
- }
-
- advanceTimers(currentTime);
- } else {
- pop(taskQueue);
- }
-
- currentTask = peek(taskQueue);
- } // Return whether there's additional work
-
-
- if (currentTask !== null) {
- return true;
- } else {
- var firstTimer = peek(timerQueue);
-
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
-
- return false;
- }
-}
-
-function unstable_runWithPriority(priorityLevel, eventHandler) {
- switch (priorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- case LowPriority:
- case IdlePriority:
- break;
-
- default:
- priorityLevel = NormalPriority;
- }
-
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
-
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
-}
-
-function unstable_next(eventHandler) {
- var priorityLevel;
-
- switch (currentPriorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- // Shift down to normal priority
- priorityLevel = NormalPriority;
- break;
-
- default:
- // Anything lower than normal priority should remain at the current level.
- priorityLevel = currentPriorityLevel;
- break;
- }
-
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
-
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
-}
-
-function unstable_wrapCallback(callback) {
- var parentPriorityLevel = currentPriorityLevel;
- return function () {
- // This is a fork of runWithPriority, inlined for performance.
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = parentPriorityLevel;
-
- try {
- return callback.apply(this, arguments);
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- };
-}
-
-function unstable_scheduleCallback(priorityLevel, callback, options) {
- var currentTime = exports.unstable_now();
- var startTime;
-
- if (typeof options === 'object' && options !== null) {
- var delay = options.delay;
-
- if (typeof delay === 'number' && delay > 0) {
- startTime = currentTime + delay;
- } else {
- startTime = currentTime;
- }
- } else {
- startTime = currentTime;
- }
-
- var timeout;
-
- switch (priorityLevel) {
- case ImmediatePriority:
- timeout = IMMEDIATE_PRIORITY_TIMEOUT;
- break;
-
- case UserBlockingPriority:
- timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
- break;
-
- case IdlePriority:
- timeout = IDLE_PRIORITY_TIMEOUT;
- break;
-
- case LowPriority:
- timeout = LOW_PRIORITY_TIMEOUT;
- break;
-
- case NormalPriority:
- default:
- timeout = NORMAL_PRIORITY_TIMEOUT;
- break;
- }
-
- var expirationTime = startTime + timeout;
- var newTask = {
- id: taskIdCounter++,
- callback: callback,
- priorityLevel: priorityLevel,
- startTime: startTime,
- expirationTime: expirationTime,
- sortIndex: -1
- };
-
- if (startTime > currentTime) {
- // This is a delayed task.
- newTask.sortIndex = startTime;
- push(timerQueue, newTask);
-
- if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
- // All tasks are delayed, and this is the task with the earliest delay.
- if (isHostTimeoutScheduled) {
- // Cancel an existing timeout.
- cancelHostTimeout();
- } else {
- isHostTimeoutScheduled = true;
- } // Schedule a timeout.
-
-
- requestHostTimeout(handleTimeout, startTime - currentTime);
- }
- } else {
- newTask.sortIndex = expirationTime;
- push(taskQueue, newTask);
- // wait until the next time we yield.
-
-
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
- }
-
- return newTask;
-}
-
-function unstable_pauseExecution() {
-}
-
-function unstable_continueExecution() {
-
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
-}
-
-function unstable_getFirstCallbackNode() {
- return peek(taskQueue);
-}
-
-function unstable_cancelCallback(task) {
- // remove from the queue because you can't remove arbitrary nodes from an
- // array based heap, only the first one.)
-
-
- task.callback = null;
-}
-
-function unstable_getCurrentPriorityLevel() {
- return currentPriorityLevel;
-}
-
-var unstable_requestPaint = requestPaint;
-var unstable_Profiling = null;
-
-exports.unstable_IdlePriority = IdlePriority;
-exports.unstable_ImmediatePriority = ImmediatePriority;
-exports.unstable_LowPriority = LowPriority;
-exports.unstable_NormalPriority = NormalPriority;
-exports.unstable_Profiling = unstable_Profiling;
-exports.unstable_UserBlockingPriority = UserBlockingPriority;
-exports.unstable_cancelCallback = unstable_cancelCallback;
-exports.unstable_continueExecution = unstable_continueExecution;
-exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
-exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
-exports.unstable_next = unstable_next;
-exports.unstable_pauseExecution = unstable_pauseExecution;
-exports.unstable_requestPaint = unstable_requestPaint;
-exports.unstable_runWithPriority = unstable_runWithPriority;
-exports.unstable_scheduleCallback = unstable_scheduleCallback;
-exports.unstable_wrapCallback = unstable_wrapCallback;
- })();
-}
diff --git a/node_modules/scheduler/cjs/scheduler.production.min.js b/node_modules/scheduler/cjs/scheduler.production.min.js
deleted file mode 100644
index 15bb77f..0000000
--- a/node_modules/scheduler/cjs/scheduler.production.min.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/** @license React v0.20.2
- * scheduler.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-'use strict';var f,g,h,k;if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}
-if("undefined"===typeof window||"function"!==typeof MessageChannel){var t=null,u=null,w=function(){if(null!==t)try{var a=exports.unstable_now();t(!0,a);t=null}catch(b){throw setTimeout(w,0),b;}};f=function(a){null!==t?setTimeout(f,0,a):(t=a,setTimeout(w,0))};g=function(a,b){u=setTimeout(a,b)};h=function(){clearTimeout(u)};exports.unstable_shouldYield=function(){return!1};k=exports.unstable_forceFrameRate=function(){}}else{var x=window.setTimeout,y=window.clearTimeout;if("undefined"!==typeof console){var z=
-window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");"function"!==typeof z&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var A=!1,B=null,C=-1,D=5,E=0;exports.unstable_shouldYield=function(){return exports.unstable_now()>=
-E};k=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<a?Math.floor(1E3/a):5};var F=new MessageChannel,G=F.port2;F.port1.onmessage=function(){if(null!==B){var a=exports.unstable_now();E=a+D;try{B(!0,a)?G.postMessage(null):(A=!1,B=null)}catch(b){throw G.postMessage(null),b;}}else A=!1};f=function(a){B=a;A||(A=!0,G.postMessage(null))};g=function(a,b){C=
-x(function(){a(exports.unstable_now())},b)};h=function(){y(C);C=-1}}function H(a,b){var c=a.length;a.push(b);a:for(;;){var d=c-1>>>1,e=a[d];if(void 0!==e&&0<I(e,b))a[d]=b,a[c]=e,c=d;else break a}}function J(a){a=a[0];return void 0===a?null:a}
-function K(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>I(n,c))void 0!==r&&0>I(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>I(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function I(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var L=[],M=[],N=1,O=null,P=3,Q=!1,R=!1,S=!1;
-function T(a){for(var b=J(M);null!==b;){if(null===b.callback)K(M);else if(b.startTime<=a)K(M),b.sortIndex=b.expirationTime,H(L,b);else break;b=J(M)}}function U(a){S=!1;T(a);if(!R)if(null!==J(L))R=!0,f(V);else{var b=J(M);null!==b&&g(U,b.startTime-a)}}
-function V(a,b){R=!1;S&&(S=!1,h());Q=!0;var c=P;try{T(b);for(O=J(L);null!==O&&(!(O.expirationTime>b)||a&&!exports.unstable_shouldYield());){var d=O.callback;if("function"===typeof d){O.callback=null;P=O.priorityLevel;var e=d(O.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?O.callback=e:O===J(L)&&K(L);T(b)}else K(L);O=J(L)}if(null!==O)var m=!0;else{var n=J(M);null!==n&&g(U,n.startTime-b);m=!1}return m}finally{O=null,P=c,Q=!1}}var W=k;exports.unstable_IdlePriority=5;
-exports.unstable_ImmediatePriority=1;exports.unstable_LowPriority=4;exports.unstable_NormalPriority=3;exports.unstable_Profiling=null;exports.unstable_UserBlockingPriority=2;exports.unstable_cancelCallback=function(a){a.callback=null};exports.unstable_continueExecution=function(){R||Q||(R=!0,f(V))};exports.unstable_getCurrentPriorityLevel=function(){return P};exports.unstable_getFirstCallbackNode=function(){return J(L)};
-exports.unstable_next=function(a){switch(P){case 1:case 2:case 3:var b=3;break;default:b=P}var c=P;P=b;try{return a()}finally{P=c}};exports.unstable_pauseExecution=function(){};exports.unstable_requestPaint=W;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=P;P=a;try{return b()}finally{P=c}};
-exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?d+c:d):c=d;switch(a){case 1:var e=-1;break;case 2:e=250;break;case 5:e=1073741823;break;case 4:e=1E4;break;default:e=5E3}e=c+e;a={id:N++,callback:b,priorityLevel:a,startTime:c,expirationTime:e,sortIndex:-1};c>d?(a.sortIndex=c,H(M,a),null===J(L)&&a===J(M)&&(S?h():S=!0,g(U,c-d))):(a.sortIndex=e,H(L,a),R||Q||(R=!0,f(V)));return a};
-exports.unstable_wrapCallback=function(a){var b=P;return function(){var c=P;P=b;try{return a.apply(this,arguments)}finally{P=c}}};
diff --git a/node_modules/scheduler/index.js b/node_modules/scheduler/index.js
deleted file mode 100644
index 77770b0..0000000
--- a/node_modules/scheduler/index.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/scheduler.production.min.js');
-} else {
- module.exports = require('./cjs/scheduler.development.js');
-}
diff --git a/node_modules/scheduler/package.json b/node_modules/scheduler/package.json
deleted file mode 100644
index ed02650..0000000
--- a/node_modules/scheduler/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "scheduler",
- "version": "0.20.2",
- "description": "Cooperative scheduler for the browser environment.",
- "main": "index.js",
- "repository": {
- "type": "git",
- "url": "https://github.com/facebook/react.git",
- "directory": "packages/scheduler"
- },
- "license": "MIT",
- "keywords": [
- "react"
- ],
- "bugs": {
- "url": "https://github.com/facebook/react/issues"
- },
- "homepage": "https://reactjs.org/",
- "dependencies": {
- "loose-envify": "^1.1.0",
- "object-assign": "^4.1.1"
- },
- "files": [
- "LICENSE",
- "README.md",
- "build-info.json",
- "index.js",
- "tracing.js",
- "tracing-profiling.js",
- "unstable_mock.js",
- "unstable_post_task.js",
- "cjs/",
- "umd/"
- ],
- "browserify": {
- "transform": [
- "loose-envify"
- ]
- }
-}
diff --git a/node_modules/scheduler/tracing-profiling.js b/node_modules/scheduler/tracing-profiling.js
deleted file mode 100644
index cb2d20c..0000000
--- a/node_modules/scheduler/tracing-profiling.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/scheduler-tracing.profiling.min.js');
-} else {
- module.exports = require('./cjs/scheduler-tracing.development.js');
-}
diff --git a/node_modules/scheduler/tracing.js b/node_modules/scheduler/tracing.js
deleted file mode 100644
index 1e318bd..0000000
--- a/node_modules/scheduler/tracing.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/scheduler-tracing.production.min.js');
-} else {
- module.exports = require('./cjs/scheduler-tracing.development.js');
-}
diff --git a/node_modules/scheduler/umd/scheduler-tracing.development.js b/node_modules/scheduler/umd/scheduler-tracing.development.js
deleted file mode 100644
index a81bf8f..0000000
--- a/node_modules/scheduler/umd/scheduler-tracing.development.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @license React
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-(function(global, factory) {
- // eslint-disable-next-line no-unused-expressions
- typeof exports === 'object' && typeof module !== 'undefined'
- ? (module.exports = factory(require('react')))
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
- ? define(['react'], factory) // eslint-disable-line no-undef
- : (global.SchedulerTracing = factory(global));
-})(this, function(global) {
- function unstable_clear() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_clear.apply(
- this,
- arguments
- );
- }
-
- function unstable_getCurrent() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getCurrent.apply(
- this,
- arguments
- );
- }
-
- function unstable_getThreadID() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getThreadID.apply(
- this,
- arguments
- );
- }
-
- function unstable_subscribe() {
- // eslint-disable-next-line max-len
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_subscribe.apply(
- this,
- arguments
- );
- }
-
- function unstable_trace() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_trace.apply(
- this,
- arguments
- );
- }
-
- function unstable_unsubscribe() {
- // eslint-disable-next-line max-len
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_unsubscribe.apply(
- this,
- arguments
- );
- }
-
- function unstable_wrap() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_wrap.apply(
- this,
- arguments
- );
- }
-
- return Object.freeze({
- unstable_clear: unstable_clear,
- unstable_getCurrent: unstable_getCurrent,
- unstable_getThreadID: unstable_getThreadID,
- unstable_subscribe: unstable_subscribe,
- unstable_trace: unstable_trace,
- unstable_unsubscribe: unstable_unsubscribe,
- unstable_wrap: unstable_wrap,
- });
-});
diff --git a/node_modules/scheduler/umd/scheduler-tracing.production.min.js b/node_modules/scheduler/umd/scheduler-tracing.production.min.js
deleted file mode 100644
index a81bf8f..0000000
--- a/node_modules/scheduler/umd/scheduler-tracing.production.min.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @license React
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-(function(global, factory) {
- // eslint-disable-next-line no-unused-expressions
- typeof exports === 'object' && typeof module !== 'undefined'
- ? (module.exports = factory(require('react')))
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
- ? define(['react'], factory) // eslint-disable-line no-undef
- : (global.SchedulerTracing = factory(global));
-})(this, function(global) {
- function unstable_clear() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_clear.apply(
- this,
- arguments
- );
- }
-
- function unstable_getCurrent() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getCurrent.apply(
- this,
- arguments
- );
- }
-
- function unstable_getThreadID() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getThreadID.apply(
- this,
- arguments
- );
- }
-
- function unstable_subscribe() {
- // eslint-disable-next-line max-len
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_subscribe.apply(
- this,
- arguments
- );
- }
-
- function unstable_trace() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_trace.apply(
- this,
- arguments
- );
- }
-
- function unstable_unsubscribe() {
- // eslint-disable-next-line max-len
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_unsubscribe.apply(
- this,
- arguments
- );
- }
-
- function unstable_wrap() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_wrap.apply(
- this,
- arguments
- );
- }
-
- return Object.freeze({
- unstable_clear: unstable_clear,
- unstable_getCurrent: unstable_getCurrent,
- unstable_getThreadID: unstable_getThreadID,
- unstable_subscribe: unstable_subscribe,
- unstable_trace: unstable_trace,
- unstable_unsubscribe: unstable_unsubscribe,
- unstable_wrap: unstable_wrap,
- });
-});
diff --git a/node_modules/scheduler/umd/scheduler-tracing.profiling.min.js b/node_modules/scheduler/umd/scheduler-tracing.profiling.min.js
deleted file mode 100644
index a81bf8f..0000000
--- a/node_modules/scheduler/umd/scheduler-tracing.profiling.min.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * @license React
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-'use strict';
-
-(function(global, factory) {
- // eslint-disable-next-line no-unused-expressions
- typeof exports === 'object' && typeof module !== 'undefined'
- ? (module.exports = factory(require('react')))
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
- ? define(['react'], factory) // eslint-disable-line no-undef
- : (global.SchedulerTracing = factory(global));
-})(this, function(global) {
- function unstable_clear() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_clear.apply(
- this,
- arguments
- );
- }
-
- function unstable_getCurrent() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getCurrent.apply(
- this,
- arguments
- );
- }
-
- function unstable_getThreadID() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_getThreadID.apply(
- this,
- arguments
- );
- }
-
- function unstable_subscribe() {
- // eslint-disable-next-line max-len
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_subscribe.apply(
- this,
- arguments
- );
- }
-
- function unstable_trace() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_trace.apply(
- this,
- arguments
- );
- }
-
- function unstable_unsubscribe() {
- // eslint-disable-next-line max-len
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_unsubscribe.apply(
- this,
- arguments
- );
- }
-
- function unstable_wrap() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.SchedulerTracing.unstable_wrap.apply(
- this,
- arguments
- );
- }
-
- return Object.freeze({
- unstable_clear: unstable_clear,
- unstable_getCurrent: unstable_getCurrent,
- unstable_getThreadID: unstable_getThreadID,
- unstable_subscribe: unstable_subscribe,
- unstable_trace: unstable_trace,
- unstable_unsubscribe: unstable_unsubscribe,
- unstable_wrap: unstable_wrap,
- });
-});
diff --git a/node_modules/scheduler/umd/scheduler-unstable_mock.development.js b/node_modules/scheduler/umd/scheduler-unstable_mock.development.js
deleted file mode 100644
index add6fa4..0000000
--- a/node_modules/scheduler/umd/scheduler-unstable_mock.development.js
+++ /dev/null
@@ -1,664 +0,0 @@
-/** @license React v0.20.2
- * scheduler-unstable_mock.development.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
- typeof define === 'function' && define.amd ? define(['exports'], factory) :
- (global = global || self, factory(global.SchedulerMock = {}));
-}(this, (function (exports) { 'use strict';
-
- var enableSchedulerDebugging = false;
- var enableProfiling = false;
-
- var currentTime = 0;
- var scheduledCallback = null;
- var scheduledTimeout = null;
- var timeoutTime = -1;
- var yieldedValues = null;
- var expectedNumberOfYields = -1;
- var didStop = false;
- var isFlushing = false;
- var needsPaint = false;
- var shouldYieldForPaint = false;
- function requestHostCallback(callback) {
- scheduledCallback = callback;
- }
- function requestHostTimeout(callback, ms) {
- scheduledTimeout = callback;
- timeoutTime = currentTime + ms;
- }
- function cancelHostTimeout() {
- scheduledTimeout = null;
- timeoutTime = -1;
- }
- function shouldYieldToHost() {
- if (expectedNumberOfYields !== -1 && yieldedValues !== null && yieldedValues.length >= expectedNumberOfYields || shouldYieldForPaint && needsPaint) {
- // We yielded at least as many values as expected. Stop flushing.
- didStop = true;
- return true;
- }
-
- return false;
- }
- function getCurrentTime() {
- return currentTime;
- }
- function forceFrameRate() {// No-op
- }
-
- function unstable_flushNumberOfYields(count) {
- if (isFlushing) {
- throw new Error('Already flushing work.');
- }
-
- if (scheduledCallback !== null) {
- var cb = scheduledCallback;
- expectedNumberOfYields = count;
- isFlushing = true;
-
- try {
- var hasMoreWork = true;
-
- do {
- hasMoreWork = cb(true, currentTime);
- } while (hasMoreWork && !didStop);
-
- if (!hasMoreWork) {
- scheduledCallback = null;
- }
- } finally {
- expectedNumberOfYields = -1;
- didStop = false;
- isFlushing = false;
- }
- }
- }
- function unstable_flushUntilNextPaint() {
- if (isFlushing) {
- throw new Error('Already flushing work.');
- }
-
- if (scheduledCallback !== null) {
- var cb = scheduledCallback;
- shouldYieldForPaint = true;
- needsPaint = false;
- isFlushing = true;
-
- try {
- var hasMoreWork = true;
-
- do {
- hasMoreWork = cb(true, currentTime);
- } while (hasMoreWork && !didStop);
-
- if (!hasMoreWork) {
- scheduledCallback = null;
- }
- } finally {
- shouldYieldForPaint = false;
- didStop = false;
- isFlushing = false;
- }
- }
- }
- function unstable_flushExpired() {
- if (isFlushing) {
- throw new Error('Already flushing work.');
- }
-
- if (scheduledCallback !== null) {
- isFlushing = true;
-
- try {
- var hasMoreWork = scheduledCallback(false, currentTime);
-
- if (!hasMoreWork) {
- scheduledCallback = null;
- }
- } finally {
- isFlushing = false;
- }
- }
- }
- function unstable_flushAllWithoutAsserting() {
- // Returns false if no work was flushed.
- if (isFlushing) {
- throw new Error('Already flushing work.');
- }
-
- if (scheduledCallback !== null) {
- var cb = scheduledCallback;
- isFlushing = true;
-
- try {
- var hasMoreWork = true;
-
- do {
- hasMoreWork = cb(true, currentTime);
- } while (hasMoreWork);
-
- if (!hasMoreWork) {
- scheduledCallback = null;
- }
-
- return true;
- } finally {
- isFlushing = false;
- }
- } else {
- return false;
- }
- }
- function unstable_clearYields() {
- if (yieldedValues === null) {
- return [];
- }
-
- var values = yieldedValues;
- yieldedValues = null;
- return values;
- }
- function unstable_flushAll() {
- if (yieldedValues !== null) {
- throw new Error('Log is not empty. Assert on the log of yielded values before ' + 'flushing additional work.');
- }
-
- unstable_flushAllWithoutAsserting();
-
- if (yieldedValues !== null) {
- throw new Error('While flushing work, something yielded a value. Use an ' + 'assertion helper to assert on the log of yielded values, e.g. ' + 'expect(Scheduler).toFlushAndYield([...])');
- }
- }
- function unstable_yieldValue(value) {
- // eslint-disable-next-line react-internal/no-production-logging
- if (console.log.name === 'disabledLog') {
- // If console.log has been patched, we assume we're in render
- // replaying and we ignore any values yielding in the second pass.
- return;
- }
-
- if (yieldedValues === null) {
- yieldedValues = [value];
- } else {
- yieldedValues.push(value);
- }
- }
- function unstable_advanceTime(ms) {
- // eslint-disable-next-line react-internal/no-production-logging
- if (console.log.name === 'disabledLog') {
- // If console.log has been patched, we assume we're in render
- // replaying and we ignore any time advancing in the second pass.
- return;
- }
-
- currentTime += ms;
-
- if (scheduledTimeout !== null && timeoutTime <= currentTime) {
- scheduledTimeout(currentTime);
- timeoutTime = -1;
- scheduledTimeout = null;
- }
- }
- function requestPaint() {
- needsPaint = true;
- }
-
- function push(heap, node) {
- var index = heap.length;
- heap.push(node);
- siftUp(heap, node, index);
- }
- function peek(heap) {
- var first = heap[0];
- return first === undefined ? null : first;
- }
- function pop(heap) {
- var first = heap[0];
-
- if (first !== undefined) {
- var last = heap.pop();
-
- if (last !== first) {
- heap[0] = last;
- siftDown(heap, last, 0);
- }
-
- return first;
- } else {
- return null;
- }
- }
-
- function siftUp(heap, node, i) {
- var index = i;
-
- while (true) {
- var parentIndex = index - 1 >>> 1;
- var parent = heap[parentIndex];
-
- if (parent !== undefined && compare(parent, node) > 0) {
- // The parent is larger. Swap positions.
- heap[parentIndex] = node;
- heap[index] = parent;
- index = parentIndex;
- } else {
- // The parent is smaller. Exit.
- return;
- }
- }
- }
-
- function siftDown(heap, node, i) {
- var index = i;
- var length = heap.length;
-
- while (index < length) {
- var leftIndex = (index + 1) * 2 - 1;
- var left = heap[leftIndex];
- var rightIndex = leftIndex + 1;
- var right = heap[rightIndex]; // If the left or right node is smaller, swap with the smaller of those.
-
- if (left !== undefined && compare(left, node) < 0) {
- if (right !== undefined && compare(right, left) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- heap[index] = left;
- heap[leftIndex] = node;
- index = leftIndex;
- }
- } else if (right !== undefined && compare(right, node) < 0) {
- heap[index] = right;
- heap[rightIndex] = node;
- index = rightIndex;
- } else {
- // Neither child is smaller. Exit.
- return;
- }
- }
- }
-
- function compare(a, b) {
- // Compare sort index first, then task id.
- var diff = a.sortIndex - b.sortIndex;
- return diff !== 0 ? diff : a.id - b.id;
- }
-
- // TODO: Use symbols?
- var ImmediatePriority = 1;
- var UserBlockingPriority = 2;
- var NormalPriority = 3;
- var LowPriority = 4;
- var IdlePriority = 5;
-
- function markTaskErrored(task, ms) {
- }
-
- /* eslint-disable no-var */
- // Math.pow(2, 30) - 1
- // 0b111111111111111111111111111111
-
- var maxSigned31BitInt = 1073741823; // Times out immediately
-
- var IMMEDIATE_PRIORITY_TIMEOUT = -1; // Eventually times out
-
- var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
- var NORMAL_PRIORITY_TIMEOUT = 5000;
- var LOW_PRIORITY_TIMEOUT = 10000; // Never times out
-
- var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt; // Tasks are stored on a min heap
-
- var taskQueue = [];
- var timerQueue = []; // Incrementing id counter. Used to maintain insertion order.
-
- var taskIdCounter = 1; // Pausing the scheduler is useful for debugging.
- var currentTask = null;
- var currentPriorityLevel = NormalPriority; // This is set while performing work, to prevent re-entrancy.
-
- var isPerformingWork = false;
- var isHostCallbackScheduled = false;
- var isHostTimeoutScheduled = false;
-
- function advanceTimers(currentTime) {
- // Check for tasks that are no longer delayed and add them to the queue.
- var timer = peek(timerQueue);
-
- while (timer !== null) {
- if (timer.callback === null) {
- // Timer was cancelled.
- pop(timerQueue);
- } else if (timer.startTime <= currentTime) {
- // Timer fired. Transfer to the task queue.
- pop(timerQueue);
- timer.sortIndex = timer.expirationTime;
- push(taskQueue, timer);
- } else {
- // Remaining timers are pending.
- return;
- }
-
- timer = peek(timerQueue);
- }
- }
-
- function handleTimeout(currentTime) {
- isHostTimeoutScheduled = false;
- advanceTimers(currentTime);
-
- if (!isHostCallbackScheduled) {
- if (peek(taskQueue) !== null) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- } else {
- var firstTimer = peek(timerQueue);
-
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
- }
- }
- }
-
- function flushWork(hasTimeRemaining, initialTime) {
-
-
- isHostCallbackScheduled = false;
-
- if (isHostTimeoutScheduled) {
- // We scheduled a timeout but it's no longer needed. Cancel it.
- isHostTimeoutScheduled = false;
- cancelHostTimeout();
- }
-
- isPerformingWork = true;
- var previousPriorityLevel = currentPriorityLevel;
-
- try {
- if (enableProfiling) {
- try {
- return workLoop(hasTimeRemaining, initialTime);
- } catch (error) {
- if (currentTask !== null) {
- var currentTime = getCurrentTime();
- markTaskErrored(currentTask, currentTime);
- currentTask.isQueued = false;
- }
-
- throw error;
- }
- } else {
- // No catch in prod code path.
- return workLoop(hasTimeRemaining, initialTime);
- }
- } finally {
- currentTask = null;
- currentPriorityLevel = previousPriorityLevel;
- isPerformingWork = false;
- }
- }
-
- function workLoop(hasTimeRemaining, initialTime) {
- var currentTime = initialTime;
- advanceTimers(currentTime);
- currentTask = peek(taskQueue);
-
- while (currentTask !== null && !(enableSchedulerDebugging )) {
- if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
- // This currentTask hasn't expired, and we've reached the deadline.
- break;
- }
-
- var callback = currentTask.callback;
-
- if (typeof callback === 'function') {
- currentTask.callback = null;
- currentPriorityLevel = currentTask.priorityLevel;
- var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
-
- var continuationCallback = callback(didUserCallbackTimeout);
- currentTime = getCurrentTime();
-
- if (typeof continuationCallback === 'function') {
- currentTask.callback = continuationCallback;
- } else {
-
- if (currentTask === peek(taskQueue)) {
- pop(taskQueue);
- }
- }
-
- advanceTimers(currentTime);
- } else {
- pop(taskQueue);
- }
-
- currentTask = peek(taskQueue);
- } // Return whether there's additional work
-
-
- if (currentTask !== null) {
- return true;
- } else {
- var firstTimer = peek(timerQueue);
-
- if (firstTimer !== null) {
- requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
- }
-
- return false;
- }
- }
-
- function unstable_runWithPriority(priorityLevel, eventHandler) {
- switch (priorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- case LowPriority:
- case IdlePriority:
- break;
-
- default:
- priorityLevel = NormalPriority;
- }
-
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
-
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- }
-
- function unstable_next(eventHandler) {
- var priorityLevel;
-
- switch (currentPriorityLevel) {
- case ImmediatePriority:
- case UserBlockingPriority:
- case NormalPriority:
- // Shift down to normal priority
- priorityLevel = NormalPriority;
- break;
-
- default:
- // Anything lower than normal priority should remain at the current level.
- priorityLevel = currentPriorityLevel;
- break;
- }
-
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = priorityLevel;
-
- try {
- return eventHandler();
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- }
-
- function unstable_wrapCallback(callback) {
- var parentPriorityLevel = currentPriorityLevel;
- return function () {
- // This is a fork of runWithPriority, inlined for performance.
- var previousPriorityLevel = currentPriorityLevel;
- currentPriorityLevel = parentPriorityLevel;
-
- try {
- return callback.apply(this, arguments);
- } finally {
- currentPriorityLevel = previousPriorityLevel;
- }
- };
- }
-
- function unstable_scheduleCallback(priorityLevel, callback, options) {
- var currentTime = getCurrentTime();
- var startTime;
-
- if (typeof options === 'object' && options !== null) {
- var delay = options.delay;
-
- if (typeof delay === 'number' && delay > 0) {
- startTime = currentTime + delay;
- } else {
- startTime = currentTime;
- }
- } else {
- startTime = currentTime;
- }
-
- var timeout;
-
- switch (priorityLevel) {
- case ImmediatePriority:
- timeout = IMMEDIATE_PRIORITY_TIMEOUT;
- break;
-
- case UserBlockingPriority:
- timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
- break;
-
- case IdlePriority:
- timeout = IDLE_PRIORITY_TIMEOUT;
- break;
-
- case LowPriority:
- timeout = LOW_PRIORITY_TIMEOUT;
- break;
-
- case NormalPriority:
- default:
- timeout = NORMAL_PRIORITY_TIMEOUT;
- break;
- }
-
- var expirationTime = startTime + timeout;
- var newTask = {
- id: taskIdCounter++,
- callback: callback,
- priorityLevel: priorityLevel,
- startTime: startTime,
- expirationTime: expirationTime,
- sortIndex: -1
- };
-
- if (startTime > currentTime) {
- // This is a delayed task.
- newTask.sortIndex = startTime;
- push(timerQueue, newTask);
-
- if (peek(taskQueue) === null && newTask === peek(timerQueue)) {
- // All tasks are delayed, and this is the task with the earliest delay.
- if (isHostTimeoutScheduled) {
- // Cancel an existing timeout.
- cancelHostTimeout();
- } else {
- isHostTimeoutScheduled = true;
- } // Schedule a timeout.
-
-
- requestHostTimeout(handleTimeout, startTime - currentTime);
- }
- } else {
- newTask.sortIndex = expirationTime;
- push(taskQueue, newTask);
- // wait until the next time we yield.
-
-
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
- }
-
- return newTask;
- }
-
- function unstable_pauseExecution() {
- }
-
- function unstable_continueExecution() {
-
- if (!isHostCallbackScheduled && !isPerformingWork) {
- isHostCallbackScheduled = true;
- requestHostCallback(flushWork);
- }
- }
-
- function unstable_getFirstCallbackNode() {
- return peek(taskQueue);
- }
-
- function unstable_cancelCallback(task) {
- // remove from the queue because you can't remove arbitrary nodes from an
- // array based heap, only the first one.)
-
-
- task.callback = null;
- }
-
- function unstable_getCurrentPriorityLevel() {
- return currentPriorityLevel;
- }
-
- var unstable_requestPaint = requestPaint;
- var unstable_Profiling = null;
-
- exports.unstable_IdlePriority = IdlePriority;
- exports.unstable_ImmediatePriority = ImmediatePriority;
- exports.unstable_LowPriority = LowPriority;
- exports.unstable_NormalPriority = NormalPriority;
- exports.unstable_Profiling = unstable_Profiling;
- exports.unstable_UserBlockingPriority = UserBlockingPriority;
- exports.unstable_advanceTime = unstable_advanceTime;
- exports.unstable_cancelCallback = unstable_cancelCallback;
- exports.unstable_clearYields = unstable_clearYields;
- exports.unstable_continueExecution = unstable_continueExecution;
- exports.unstable_flushAll = unstable_flushAll;
- exports.unstable_flushAllWithoutAsserting = unstable_flushAllWithoutAsserting;
- exports.unstable_flushExpired = unstable_flushExpired;
- exports.unstable_flushNumberOfYields = unstable_flushNumberOfYields;
- exports.unstable_flushUntilNextPaint = unstable_flushUntilNextPaint;
- exports.unstable_forceFrameRate = forceFrameRate;
- exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
- exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
- exports.unstable_next = unstable_next;
- exports.unstable_now = getCurrentTime;
- exports.unstable_pauseExecution = unstable_pauseExecution;
- exports.unstable_requestPaint = unstable_requestPaint;
- exports.unstable_runWithPriority = unstable_runWithPriority;
- exports.unstable_scheduleCallback = unstable_scheduleCallback;
- exports.unstable_shouldYield = shouldYieldToHost;
- exports.unstable_wrapCallback = unstable_wrapCallback;
- exports.unstable_yieldValue = unstable_yieldValue;
-
-})));
diff --git a/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js b/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js
deleted file mode 100644
index a8221dd..0000000
--- a/node_modules/scheduler/umd/scheduler-unstable_mock.production.min.js
+++ /dev/null
@@ -1,18 +0,0 @@
-/** @license React v0.20.2
- * scheduler-unstable_mock.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-(function(){'use strict';(function(a,v){"object"===typeof exports&&"undefined"!==typeof module?v(exports):"function"===typeof define&&define.amd?define(["exports"],v):(a=a||self,v(a.SchedulerMock={}))})(this,function(a){function v(){return-1!==y&&null!==k&&k.length>=y||C&&D?r=!0:!1}function I(){if(f)throw Error("Already flushing work.");if(null!==e){var b=e;f=!0;try{var h=!0;do h=b(!0,g);while(h);h||(e=null);return!0}finally{f=!1}}else return!1}function E(b,h){var c=b.length;b.push(h);a:for(;;){var a=c-1>>>1,
-w=b[a];if(void 0!==w&&0<z(w,h))b[a]=h,b[c]=w,c=a;else break a}}function m(b){b=b[0];return void 0===b?null:b}function A(b){var h=b[0];if(void 0!==h){var c=b.pop();if(c!==h){b[0]=c;a:for(var a=0,w=b.length;a<w;){var d=2*(a+1)-1,e=b[d],g=d+1,f=b[g];if(void 0!==e&&0>z(e,c))void 0!==f&&0>z(f,e)?(b[a]=f,b[g]=c,a=g):(b[a]=e,b[d]=c,a=d);else if(void 0!==f&&0>z(f,c))b[a]=f,b[g]=c,a=g;else break a}}return h}return null}function z(b,h){var a=b.sortIndex-h.sortIndex;return 0!==a?a:b.id-h.id}function F(b){for(var a=
-m(p);null!==a;){if(null===a.callback)A(p);else if(a.startTime<=b)A(p),a.sortIndex=a.expirationTime,E(n,a);else break;a=m(p)}}function G(b){x=!1;F(b);if(!t)if(null!==m(n))t=!0,e=H;else{var a=m(p);null!==a&&(b=a.startTime-b,q=G,u=g+b)}}function H(b,a){t=!1;x&&(x=!1,q=null,u=-1);B=!0;var c=d;try{F(a);for(l=m(n);null!==l&&(!(l.expirationTime>a)||b&&!v());){var h=l.callback;if("function"===typeof h){l.callback=null;d=l.priorityLevel;var e=h(l.expirationTime<=a);a=g;"function"===typeof e?l.callback=e:l===
-m(n)&&A(n);F(a)}else A(n);l=m(n)}if(null!==l)var f=!0;else{var k=m(p);if(null!==k){var r=k.startTime-a;q=G;u=g+r}f=!1}return f}finally{l=null,d=c,B=!1}}var g=0,e=null,q=null,u=-1,k=null,y=-1,r=!1,f=!1,D=!1,C=!1,n=[],p=[],J=1,l=null,d=3,B=!1,t=!1,x=!1;a.unstable_IdlePriority=5;a.unstable_ImmediatePriority=1;a.unstable_LowPriority=4;a.unstable_NormalPriority=3;a.unstable_Profiling=null;a.unstable_UserBlockingPriority=2;a.unstable_advanceTime=function(b){"disabledLog"!==console.log.name&&(g+=b,null!==
-q&&u<=g&&(q(g),u=-1,q=null))};a.unstable_cancelCallback=function(b){b.callback=null};a.unstable_clearYields=function(){if(null===k)return[];var b=k;k=null;return b};a.unstable_continueExecution=function(){t||B||(t=!0,e=H)};a.unstable_flushAll=function(){if(null!==k)throw Error("Log is not empty. Assert on the log of yielded values before flushing additional work.");I();if(null!==k)throw Error("While flushing work, something yielded a value. Use an assertion helper to assert on the log of yielded values, e.g. expect(Scheduler).toFlushAndYield([...])");
-};a.unstable_flushAllWithoutAsserting=I;a.unstable_flushExpired=function(){if(f)throw Error("Already flushing work.");if(null!==e){f=!0;try{e(!1,g)||(e=null)}finally{f=!1}}};a.unstable_flushNumberOfYields=function(b){if(f)throw Error("Already flushing work.");if(null!==e){var a=e;y=b;f=!0;try{b=!0;do b=a(!0,g);while(b&&!r);b||(e=null)}finally{y=-1,f=r=!1}}};a.unstable_flushUntilNextPaint=function(){if(f)throw Error("Already flushing work.");if(null!==e){var b=e;C=!0;D=!1;f=!0;try{var a=!0;do a=b(!0,
-g);while(a&&!r);a||(e=null)}finally{f=r=C=!1}}};a.unstable_forceFrameRate=function(){};a.unstable_getCurrentPriorityLevel=function(){return d};a.unstable_getFirstCallbackNode=function(){return m(n)};a.unstable_next=function(b){switch(d){case 1:case 2:case 3:var a=3;break;default:a=d}var c=d;d=a;try{return b()}finally{d=c}};a.unstable_now=function(){return g};a.unstable_pauseExecution=function(){};a.unstable_requestPaint=function(){D=!0};a.unstable_runWithPriority=function(a,e){switch(a){case 1:case 2:case 3:case 4:case 5:break;
-default:a=3}var b=d;d=a;try{return e()}finally{d=b}};a.unstable_scheduleCallback=function(a,f,c){var b=g;"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?b+c:b):c=b;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:J++,callback:f,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>b?(a.sortIndex=c,E(p,a),null===m(n)&&a===m(p)&&(x?(q=null,u=-1):x=!0,q=G,u=g+(c-b))):(a.sortIndex=d,E(n,a),t||B||(t=!0,
-e=H));return a};a.unstable_shouldYield=v;a.unstable_wrapCallback=function(a){var b=d;return function(){var c=d;d=b;try{return a.apply(this,arguments)}finally{d=c}}};a.unstable_yieldValue=function(a){"disabledLog"!==console.log.name&&(null===k?k=[a]:k.push(a))}});
-})();
diff --git a/node_modules/scheduler/umd/scheduler.development.js b/node_modules/scheduler/umd/scheduler.development.js
deleted file mode 100644
index b960dc9..0000000
--- a/node_modules/scheduler/umd/scheduler.development.js
+++ /dev/null
@@ -1,152 +0,0 @@
-/**
- * @license React
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/* eslint-disable max-len */
-
-'use strict';
-
-(function(global, factory) {
- // eslint-disable-next-line no-unused-expressions
- typeof exports === 'object' && typeof module !== 'undefined'
- ? (module.exports = factory(require('react')))
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
- ? define(['react'], factory) // eslint-disable-line no-undef
- : (global.Scheduler = factory(global));
-})(this, function(global) {
- function unstable_now() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
- this,
- arguments
- );
- }
-
- function unstable_scheduleCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_cancelCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_shouldYield() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
- this,
- arguments
- );
- }
-
- function unstable_requestPaint() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
- this,
- arguments
- );
- }
-
- function unstable_runWithPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
- this,
- arguments
- );
- }
-
- function unstable_next() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
- this,
- arguments
- );
- }
-
- function unstable_wrapCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_getCurrentPriorityLevel() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
- this,
- arguments
- );
- }
-
- function unstable_getFirstCallbackNode() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
- this,
- arguments
- );
- }
-
- function unstable_pauseExecution() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_pauseExecution.apply(
- this,
- arguments
- );
- }
-
- function unstable_continueExecution() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_continueExecution.apply(
- this,
- arguments
- );
- }
-
- function unstable_forceFrameRate() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
- this,
- arguments
- );
- }
-
- return Object.freeze({
- unstable_now: unstable_now,
- unstable_scheduleCallback: unstable_scheduleCallback,
- unstable_cancelCallback: unstable_cancelCallback,
- unstable_shouldYield: unstable_shouldYield,
- unstable_requestPaint: unstable_requestPaint,
- unstable_runWithPriority: unstable_runWithPriority,
- unstable_next: unstable_next,
- unstable_wrapCallback: unstable_wrapCallback,
- unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
- unstable_continueExecution: unstable_continueExecution,
- unstable_pauseExecution: unstable_pauseExecution,
- unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
- unstable_forceFrameRate: unstable_forceFrameRate,
- get unstable_IdlePriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_IdlePriority;
- },
- get unstable_ImmediatePriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_ImmediatePriority;
- },
- get unstable_LowPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_LowPriority;
- },
- get unstable_NormalPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_NormalPriority;
- },
- get unstable_UserBlockingPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_UserBlockingPriority;
- },
- get unstable_Profiling() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_Profiling;
- },
- });
-});
diff --git a/node_modules/scheduler/umd/scheduler.production.min.js b/node_modules/scheduler/umd/scheduler.production.min.js
deleted file mode 100644
index 0c25843..0000000
--- a/node_modules/scheduler/umd/scheduler.production.min.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * @license React
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/* eslint-disable max-len */
-
-'use strict';
-
-(function(global, factory) {
- // eslint-disable-next-line no-unused-expressions
- typeof exports === 'object' && typeof module !== 'undefined'
- ? (module.exports = factory(require('react')))
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
- ? define(['react'], factory) // eslint-disable-line no-undef
- : (global.Scheduler = factory(global));
-})(this, function(global) {
- function unstable_now() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
- this,
- arguments
- );
- }
-
- function unstable_scheduleCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_cancelCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_shouldYield() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
- this,
- arguments
- );
- }
-
- function unstable_requestPaint() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
- this,
- arguments
- );
- }
-
- function unstable_runWithPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
- this,
- arguments
- );
- }
-
- function unstable_next() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
- this,
- arguments
- );
- }
-
- function unstable_wrapCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_getCurrentPriorityLevel() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
- this,
- arguments
- );
- }
-
- function unstable_getFirstCallbackNode() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
- this,
- arguments
- );
- }
-
- function unstable_pauseExecution() {
- return undefined;
- }
-
- function unstable_continueExecution() {
- return undefined;
- }
-
- function unstable_forceFrameRate() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
- this,
- arguments
- );
- }
-
- return Object.freeze({
- unstable_now: unstable_now,
- unstable_scheduleCallback: unstable_scheduleCallback,
- unstable_cancelCallback: unstable_cancelCallback,
- unstable_shouldYield: unstable_shouldYield,
- unstable_requestPaint: unstable_requestPaint,
- unstable_runWithPriority: unstable_runWithPriority,
- unstable_next: unstable_next,
- unstable_wrapCallback: unstable_wrapCallback,
- unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
- unstable_continueExecution: unstable_continueExecution,
- unstable_pauseExecution: unstable_pauseExecution,
- unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
- unstable_forceFrameRate: unstable_forceFrameRate,
- get unstable_IdlePriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_IdlePriority;
- },
- get unstable_ImmediatePriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_ImmediatePriority;
- },
- get unstable_LowPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_LowPriority;
- },
- get unstable_NormalPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_NormalPriority;
- },
- get unstable_UserBlockingPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_UserBlockingPriority;
- },
- get unstable_Profiling() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_Profiling;
- },
- });
-});
diff --git a/node_modules/scheduler/umd/scheduler.profiling.min.js b/node_modules/scheduler/umd/scheduler.profiling.min.js
deleted file mode 100644
index 0c25843..0000000
--- a/node_modules/scheduler/umd/scheduler.profiling.min.js
+++ /dev/null
@@ -1,146 +0,0 @@
-/**
- * @license React
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */
-
-/* eslint-disable max-len */
-
-'use strict';
-
-(function(global, factory) {
- // eslint-disable-next-line no-unused-expressions
- typeof exports === 'object' && typeof module !== 'undefined'
- ? (module.exports = factory(require('react')))
- : typeof define === 'function' && define.amd // eslint-disable-line no-undef
- ? define(['react'], factory) // eslint-disable-line no-undef
- : (global.Scheduler = factory(global));
-})(this, function(global) {
- function unstable_now() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_now.apply(
- this,
- arguments
- );
- }
-
- function unstable_scheduleCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_scheduleCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_cancelCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_cancelCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_shouldYield() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_shouldYield.apply(
- this,
- arguments
- );
- }
-
- function unstable_requestPaint() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_requestPaint.apply(
- this,
- arguments
- );
- }
-
- function unstable_runWithPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_runWithPriority.apply(
- this,
- arguments
- );
- }
-
- function unstable_next() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_next.apply(
- this,
- arguments
- );
- }
-
- function unstable_wrapCallback() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_wrapCallback.apply(
- this,
- arguments
- );
- }
-
- function unstable_getCurrentPriorityLevel() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getCurrentPriorityLevel.apply(
- this,
- arguments
- );
- }
-
- function unstable_getFirstCallbackNode() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_getFirstCallbackNode.apply(
- this,
- arguments
- );
- }
-
- function unstable_pauseExecution() {
- return undefined;
- }
-
- function unstable_continueExecution() {
- return undefined;
- }
-
- function unstable_forceFrameRate() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler.unstable_forceFrameRate.apply(
- this,
- arguments
- );
- }
-
- return Object.freeze({
- unstable_now: unstable_now,
- unstable_scheduleCallback: unstable_scheduleCallback,
- unstable_cancelCallback: unstable_cancelCallback,
- unstable_shouldYield: unstable_shouldYield,
- unstable_requestPaint: unstable_requestPaint,
- unstable_runWithPriority: unstable_runWithPriority,
- unstable_next: unstable_next,
- unstable_wrapCallback: unstable_wrapCallback,
- unstable_getCurrentPriorityLevel: unstable_getCurrentPriorityLevel,
- unstable_continueExecution: unstable_continueExecution,
- unstable_pauseExecution: unstable_pauseExecution,
- unstable_getFirstCallbackNode: unstable_getFirstCallbackNode,
- unstable_forceFrameRate: unstable_forceFrameRate,
- get unstable_IdlePriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_IdlePriority;
- },
- get unstable_ImmediatePriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_ImmediatePriority;
- },
- get unstable_LowPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_LowPriority;
- },
- get unstable_NormalPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_NormalPriority;
- },
- get unstable_UserBlockingPriority() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_UserBlockingPriority;
- },
- get unstable_Profiling() {
- return global.React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
- .Scheduler.unstable_Profiling;
- },
- });
-});
diff --git a/node_modules/scheduler/unstable_mock.js b/node_modules/scheduler/unstable_mock.js
deleted file mode 100644
index e72ea31..0000000
--- a/node_modules/scheduler/unstable_mock.js
+++ /dev/null
@@ -1,7 +0,0 @@
-'use strict';
-
-if (process.env.NODE_ENV === 'production') {
- module.exports = require('./cjs/scheduler-unstable_mock.production.min.js');
-} else {
- module.exports = require('./cjs/scheduler-unstable_mock.development.js');
-}
diff --git a/node_modules/xterm/LICENSE b/node_modules/xterm/LICENSE
deleted file mode 100644
index 4472336..0000000
--- a/node_modules/xterm/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-Copyright (c) 2017-2019, The xterm.js authors (https://github.com/xtermjs/xterm.js)
-Copyright (c) 2014-2016, SourceLair Private Company (https://www.sourcelair.com)
-Copyright (c) 2012-2013, Christopher Jeffrey (https://github.com/chjj/)
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/node_modules/xterm/README.md b/node_modules/xterm/README.md
deleted file mode 100644
index 94494c7..0000000
--- a/node_modules/xterm/README.md
+++ /dev/null
@@ -1,222 +0,0 @@
-# [![xterm.js logo](logo-full.png)](https://xtermjs.org)
-
-[![Build Status](https://dev.azure.com/xtermjs/xterm.js/_apis/build/status/xtermjs.xterm.js)](https://dev.azure.com/xtermjs/xterm.js/_build/latest?definitionId=3)
-
-Xterm.js is a front-end component written in TypeScript that lets applications bring fully-featured terminals to their users in the browser. It's used by popular projects such as VS Code, Hyper and Theia.
-
-## Features
-
-- **Terminal apps just work**: Xterm.js works with most terminal apps such as `bash`, `vim`, and `tmux`, including support for curses-based apps and mouse events.
-- **Performant**: Xterm.js is *really* fast, it even includes a GPU-accelerated renderer.
-- **Rich Unicode support**: Supports CJK, emojis, and IMEs.
-- **Self-contained**: Requires zero dependencies to work.
-- **Accessible**: Screen reader and minimum contrast ratio support can be turned on.
-- **And much more**: Links, theming, addons, well documented API, etc.
-
-## What xterm.js is not
-
-- Xterm.js is not a terminal application that you can download and use on your computer.
-- Xterm.js is not `bash`. Xterm.js can be connected to processes like `bash` and let you interact with them (provide input, receive output).
-
-## Getting Started
-
-First, you need to install the module, we ship exclusively through [npm](https://www.npmjs.com/), so you need that installed and then add xterm.js as a dependency by running:
-
-```bash
-npm install xterm
-```
-
-To start using xterm.js on your browser, add the `xterm.js` and `xterm.css` to the head of your HTML page. Then create a `<div id="terminal"></div>` onto which xterm can attach itself. Finally, instantiate the `Terminal` object and then call the `open` function with the DOM object of the `div`.
-
-```html
-<!doctype html>
- <html>
- <head>
- <link rel="stylesheet" href="node_modules/xterm/css/xterm.css" />
- <script src="node_modules/xterm/lib/xterm.js"></script>
- </head>
- <body>
- <div id="terminal"></div>
- <script>
- var term = new Terminal();
- term.open(document.getElementById('terminal'));
- term.write('Hello from \x1B[1;3;31mxterm.js\x1B[0m $ ')
- </script>
- </body>
- </html>
-```
-
-### Importing
-
-The recommended way to load xterm.js is via the ES6 module syntax:
-
-```javascript
-import { Terminal } from 'xterm';
-```
-
-### Addons
-
-⚠️ *This section describes the new addon format introduced in v3.14.0, see [here](https://github.com/xtermjs/xterm.js/blob/3.14.2/README.md#addons) for the instructions on the old format*
-
-Addons are separate modules that extend the `Terminal` by building on the [xterm.js API](https://github.com/xtermjs/xterm.js/blob/master/typings/xterm.d.ts). To use an addon, you first need to install it in your project:
-
-```bash
-npm i -S xterm-addon-web-links
-```
-
-Then import the addon, instantiate it and call `Terminal.loadAddon`:
-
-```ts
-import { Terminal } from 'xterm';
-import { WebLinksAddon } from 'xterm-addon-web-links';
-
-const terminal = new Terminal();
-// Load WebLinksAddon on terminal, this is all that's needed to get web links
-// working in the terminal.
-terminal.loadAddon(new WebLinksAddon());
-```
-
-The xterm.js team maintains the following addons, but anyone can build them:
-
-- [`xterm-addon-attach`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-attach): Attaches to a server running a process via a websocket
-- [`xterm-addon-fit`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-fit): Fits the terminal to the containing element
-- [`xterm-addon-search`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-search): Adds search functionality
-- [`xterm-addon-web-links`](https://github.com/xtermjs/xterm.js/tree/master/addons/xterm-addon-web-links): Adds web link detection and interaction
-
-## Browser Support
-
-Since xterm.js is typically implemented as a developer tool, only modern browsers are supported officially. Specifically the latest versions of *Chrome*, *Edge*, *Firefox*, and *Safari*.
-
-We also partially support *Internet Explorer 11*, meaning xterm.js should work for the most part, but we reserve the right to not provide workarounds specifically for it unless it's absolutely necessary to get the basic input/output flow working.
-
-Xterm.js works seamlessly in [Electron](https://electronjs.org/) apps and may even work on earlier versions of the browsers. These are the versions we strive to keep working.
-
-### Node.js Support
-
-We also publish [`xterm-headless`](https://www.npmjs.com/package/xterm-headless) which is a stripped down version of xterm.js that runs in Node.js. An example use case for this is to keep track of a terminal's state where the process is running and using the serialize addon so it can get all state restored upon reconnection.
-
-## API
-
-The full API for xterm.js is contained within the [TypeScript declaration file](https://github.com/xtermjs/xterm.js/blob/master/typings/xterm.d.ts), use the branch/tag picker in GitHub (`w`) to navigate to the correct version of the API.
-
-Note that some APIs are marked *experimental*, these are added to enable experimentation with new ideas without committing to support it like a normal [semver](https://semver.org/) API. Note that these APIs can change radically between versions, so be sure to read release notes if you plan on using experimental APIs.
-
-## Real-world uses
-Xterm.js is used in several world-class applications to provide great terminal experiences.
-
-- [**SourceLair**](https://www.sourcelair.com/): In-browser IDE that provides its users with fully-featured Linux terminals based on xterm.js.
-- [**Microsoft Visual Studio Code**](http://code.visualstudio.com/): Modern, versatile, and powerful open source code editor that provides an integrated terminal based on xterm.js.
-- [**ttyd**](https://github.com/tsl0922/ttyd): A command-line tool for sharing terminal over the web, with fully-featured terminal emulation based on xterm.js.
-- [**Katacoda**](https://www.katacoda.com/): Katacoda is an Interactive Learning Platform for software developers, covering the latest Cloud Native technologies.
-- [**Eclipse Che**](http://www.eclipse.org/che): Developer workspace server, cloud IDE, and Eclipse next-generation IDE.
-- [**Codenvy**](http://www.codenvy.com): Cloud workspaces for development teams.
-- [**CoderPad**](https://coderpad.io): Online interviewing platform for programmers. Run code in many programming languages, with results displayed by xterm.js.
-- [**WebSSH2**](https://github.com/billchurch/WebSSH2): A web based SSH2 client using xterm.js, socket.io, and ssh2.
-- [**Spyder Terminal**](https://github.com/spyder-ide/spyder-terminal): A full fledged system terminal embedded on Spyder IDE.
-- [**Cloud Commander**](https://cloudcmd.io "Cloud Commander"): Orthodox web file manager with console and editor.
-- [**Next Tech**](https://next.tech "Next Tech"): Online platform for interactive coding and web development courses. Live container-backed terminal uses xterm.js.
-- [**RStudio**](https://www.rstudio.com/products/RStudio "RStudio"): RStudio is an integrated development environment (IDE) for R.
-- [**Terminal for Atom**](https://github.com/jsmecham/atom-terminal-tab): A simple terminal for the Atom text editor.
-- [**Eclipse Orion**](https://orionhub.org): A modern, open source software development environment that runs in the cloud. Code, deploy, and run in the cloud.
-- [**Gravitational Teleport**](https://github.com/gravitational/teleport): Gravitational Teleport is a modern SSH server for remotely accessing clusters of Linux servers via SSH or HTTPS.
-- [**Hexlet**](https://en.hexlet.io): Practical programming courses (JavaScript, PHP, Unix, databases, functional programming). A steady path from the first line of code to the first job.
-- [**Selenoid UI**](https://github.com/aerokube/selenoid-ui): Simple UI for the scalable golang implementation of Selenium Hub named Selenoid. We use XTerm for streaming logs over websockets from docker containers.
-- [**Portainer**](https://portainer.io): Simple management UI for Docker.
-- [**SSHy**](https://github.com/stuicey/SSHy): HTML5 Based SSHv2 Web Client with E2E encryption utilising xterm.js, SJCL & websockets.
-- [**JupyterLab**](https://github.com/jupyterlab/jupyterlab): An extensible computational environment for Jupyter, supporting interactive data science and scientific computing across all programming languages.
-- [**Theia**](https://github.com/theia-ide/theia): Theia is a cloud & desktop IDE framework implemented in TypeScript.
-- [**Opshell**](https://github.com/ricktbaker/opshell) Ops Helper tool to make life easier working with AWS instances across multiple organizations.
-- [**Proxmox VE**](https://www.proxmox.com/en/proxmox-ve): Proxmox VE is a complete open-source platform for enterprise virtualization. It uses xterm.js for container terminals and the host shell.
-- [**Script Runner**](https://github.com/ioquatix/script-runner): Run scripts (or a shell) in Atom.
-- [**Whack Whack Terminal**](https://github.com/Microsoft/WhackWhackTerminal): Terminal emulator for Visual Studio 2017.
-- [**VTerm**](https://github.com/vterm/vterm): Extensible terminal emulator based on Electron and React.
-- [**electerm**](http://electerm.html5beta.com): electerm is a terminal/ssh/sftp client(mac, win, linux) based on electron/node-pty/xterm.
-- [**Kubebox**](https://github.com/astefanutti/kubebox): Terminal console for Kubernetes clusters.
-- [**Azure Cloud Shell**](https://shell.azure.com): Azure Cloud Shell is a Microsoft-managed admin machine built on Azure, for Azure.
-- [**atom-xterm**](https://atom.io/packages/atom-xterm): Atom plugin for providing terminals inside your Atom workspace.
-- [**rtty**](https://github.com/zhaojh329/rtty): Access your terminals from anywhere via the web.
-- [**Pisth**](https://github.com/ColdGrub1384/Pisth): An SFTP and SSH client for iOS.
-- [**abstruse**](https://github.com/bleenco/abstruse): Abstruse CI is a continuous integration platform based on Node.JS and Docker.
-- [**Azure Data Studio**](https://github.com/Microsoft/azuredatastudio): A data management tool that enables working with SQL Server, Azure SQL DB and SQL DW from Windows, macOS and Linux.
-- [**FreeMAN**](https://github.com/matthew-matvei/freeman): A free, cross-platform file manager for power users.
-- [**Fluent Terminal**](https://github.com/felixse/FluentTerminal): A terminal emulator based on UWP and web technologies.
-- [**Hyper**](https://hyper.is): A terminal built on web technologies.
-- [**Diag**](https://diag.ai): A better way to troubleshoot problems faster. Capture, share and reapply troubleshooting knowledge so you can focus on solving problems that matter.
-- [**GoTTY**](https://github.com/yudai/gotty): A simple command line tool that shares your terminal as a web application based on xterm.js.
-- [**genact**](https://github.com/svenstaro/genact): A nonsense activity generator.
-- [**cPanel & WHM**](https://cpanel.com): The hosting platform of choice.
-- [**Nutanix**](https://github.com/nutanix): Nutanix Enterprise Cloud uses xterm in the webssh functionality within Nutanix Calm, and is also looking to move our old noserial (termjs) functionality to xterm.js.
-- [**SSH Web Client**](https://github.com/roke22/PHP-SSH2-Web-Client): SSH Web Client with PHP.
-- [**Juno**](http://junolab.org/): A flexible Julia IDE, based on Atom.
-- [**webssh**](https://github.com/huashengdun/webssh): Web based ssh client.
-- [**info-beamer hosted**](https://info-beamer.com): Uses xterm.js to manage digital signage devices from the web dashboard.
-- [**Jumpserver**](https://github.com/jumpserver/luna): Jumpserver Luna project, Jumpserver is a bastion server project, Luna use xterm.js for web terminal emulation.
-- [**LxdMosaic**](https://github.com/turtle0x1/LxdMosaic): Uses xterm.js to give terminal access to containers through LXD
-- [**CodeInterview.io**](https://codeinterview.io): A coding interview platform in 25+ languages and many web frameworks. Uses xterm.js to provide shell access.
-- [**Bastillion**](https://www.bastillion.io): Bastillion is an open-source web-based SSH console that centrally manages administrative access to systems.
-- [**PHP App Server**](https://github.com/cubiclesoft/php-app-server/): Create lightweight, installable almost-native applications for desktop OSes. ExecTerminal (nicely wraps the xterm.js Terminal), TerminalManager, and RunProcessSDK are self-contained, reusable ES5+ compliant Javascript components.
-- [**NgTerminal**](https://github.com/qwefgh90/ng-terminal): NgTerminal is a web terminal that leverages xterm.js on Angular 7+. You can easily add it into your application by adding `<ng-terminal></ng-terminal>` into your component.
-- [**tty-share**](https://tty-share.com): Extremely simple terminal sharing over the Internet.
-- [**Ten Hands**](https://github.com/saisandeepvaddi/ten-hands): One place to run your command-line tasks.
-- [**WebAssembly.sh**](https://webassembly.sh): A WebAssembly WASI browser terminal
-- [**Gus**](https://gus.jp): A shared coding pad where you can run Python with xterm.js
-- [**Linode**](https://linode.com): Linode uses xterm.js to provide users a web console for their Linode instances.
-- [**FluffOS**](https://www.fluffos.info): Active maintained LPMUD driver with websocket support.
-- [**x-terminal**](https://atom.io/packages/x-terminal): Atom plugin for providing terminals inside your Atom workspace.
-- [**CoCalc**](https://cocalc.com/): Lots of free software pre-installed, to chat, collaborate, develop, program, publish, research, share, teach, in C++, HTML, Julia, Jupyter, LaTeX, Markdown, Python, R, SageMath, Scala, ...
-- [**Dank Domain**](https://www.DDgame.us/): Open source multiuser medieval game supporting old & new terminal emulation.
-- [**DockerStacks**](https://docker-stacks.com/): Local LAMP/LEMP development studio
-- [**Codecademy**](https://codecademy.com/): Uses xterm.js in its courses on Bash.
-- [**Laravel Ssh Web Client**](https://github.com/roke22/Laravel-ssh-client): Laravel server inventory with ssh web client to connect at server using xterm.js
-- [**Repl.it**](https://repl.it): Collaborative browser based IDE with support for 50+ different languages.
-- [**TeleType**](https://github.com/akshaykmr/TeleType): cli tool that allows you to share your terminal online conveniently. Show off mad cli-fu, help a colleague, teach, or troubleshoot.
-- [**Intervue**](https://www.intervue.io): Pair programming for interviews. Multiple programming languages are supported, with results displayed by xterm.js.
-- [**TRASA**](https://trasa.io): Zero trust access to Web, SSH, RDP, and Database services.
-- [**Commas**](https://github.com/CyanSalt/commas): Commas is a hackable terminal and command runner.
-- [**Devtron**](https://github.com/devtron-labs/devtron): Software Delivery Workflow For Kubernetes.
-- [**NxShell**](https://github.com/nxshell/nxshell): An easy to use new terminal for SSH.
-- [**gifcast**](https://dstein64.github.io/gifcast/): Converts an asciinema cast to an animated GIF.
-- [**WizardWebssh**](https://gitlab.com/mikeramsey/wizardwebssh): A terminal with Pyqt5 Widget for embedding, which can be used as an ssh client to connect to your ssh servers. It is written in Python, based on tornado, paramiko, and xterm.js.
-- [**Wizard Assistant**](https://wizardassistant.com/): Wizard Assistant comes with advanced automation tools, preloaded common and special time-saving commands, and a built-in SSH terminal. Now you can remotely administer, troubleshoot, and analyze any system with ease.
-- [**ucli**](https://github.com/tsadarsh/ucli): Command Line for everyone :family_man_woman_girl_boy: at [www.ucli.tech](https://www.ucli.tech).
-- [**Tess**](https://github.com/SquitchYT/Tess/): Simple Terminal Fully Customizable for Everyone. Discover more at [tessapp.dev](https://tessapp.dev)
-- [**HashiCorp Nomad**](https://www.nomadproject.io/): A container orchestrator with the ability to connect to remote tasks via a web interface using websockets and xterm.js.
-- [**TermPair**](https://github.com/cs01/termpair): View and control terminals from your browser with end-to-end encryption
-- [**gdbgui**](https://github.com/cs01/gdbgui): Browser-based frontend to gdb (gnu debugger)
-- [**goormIDE**](https://ide.goorm.io/): Run almost every programming languages with real-time collaboration, live pair programming, and built-in messenger.
-- [**FleetDeck**](https://fleetdeck.io): Remote desktop & virtual terminal
-- [**OpenSumi**](https://github.com/opensumi/core): A framework helps you quickly build Cloud or Desktop IDE products.
-- [**KubeSail**](https://kubesail.com): The Self-Hosting Company - uses xterm to allow users to exec into kubernetes pods and build github apps
-- [**WiTTY**](https://github.com/syssecfsu/witty): Web-based interactive terminal emulator that allows users to easily record, share, and replay console sessions.
-- [**libv86 Terminal Forwarding**](https://github.com/hello-smile6/libv86-terminal-forwarding): Peer-to-peer SSH for the web, using WebRTC via [Bugout](https://github.com/chr15m/bugout) for data transfer and [v86](https://github.com/copy/v86) for web-based virtualization.
-- [And much more...](https://github.com/xtermjs/xterm.js/network/dependents?package_id=UGFja2FnZS0xNjYzMjc4OQ%3D%3D)
-
-Do you use xterm.js in your application as well? Please [open a Pull Request](https://github.com/sourcelair/xterm.js/pulls) to include it here. We would love to have it on our list. Note: Please add any new contributions to the end of the list only.
-
-## Releases
-
-Xterm.js follows a monthly release cycle roughly.
-
-All current and past releases are available on this repo's [Releases page](https://github.com/sourcelair/xterm.js/releases), you can view the [high-level roadmap on the wiki](https://github.com/xtermjs/xterm.js/wiki/Roadmap) and see what we're working on now by looking through [Milestones](https://github.com/sourcelair/xterm.js/milestones).
-
-### Beta builds
-
-Our CI releases beta builds to npm for every change that goes into master. Install the latest beta build with:
-
-```bash
-npm install -S xterm@beta
-```
-
-These should generally be stable, but some bugs may slip in. We recommend using the beta build primarily to test out new features and to verify bug fixes.
-
-## Contributing
-
-You can read the [guide on the wiki](https://github.com/xtermjs/xterm.js/wiki/Contributing) to learn how to contribute and set up xterm.js for development.
-
-## License Agreement
-
-If you contribute code to this project, you implicitly allow your code to be distributed under the MIT license. You are also implicitly verifying that all code is your original work.
-
-Copyright (c) 2017-2019, [The xterm.js authors](https://github.com/xtermjs/xterm.js/graphs/contributors) (MIT License)<br>
-Copyright (c) 2014-2017, SourceLair, Private Company ([www.sourcelair.com](https://www.sourcelair.com/home)) (MIT License)<br>
-Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
diff --git a/node_modules/xterm/css/xterm.css b/node_modules/xterm/css/xterm.css
deleted file mode 100644
index ab3965b..0000000
--- a/node_modules/xterm/css/xterm.css
+++ /dev/null
@@ -1,180 +0,0 @@
-/**
- * Copyright (c) 2014 The xterm.js authors. All rights reserved.
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- * https://github.com/chjj/term.js
- * @license MIT
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- *
- * Originally forked from (with the author's permission):
- * Fabrice Bellard's javascript vt100 for jslinux:
- * http://bellard.org/jslinux/
- * Copyright (c) 2011 Fabrice Bellard
- * The original design remains. The terminal itself
- * has been extended to include xterm CSI codes, among
- * other features.
- */
-
-/**
- * Default styles for xterm.js
- */
-
-.xterm {
- position: relative;
- user-select: none;
- -ms-user-select: none;
- -webkit-user-select: none;
-}
-
-.xterm.focus,
-.xterm:focus {
- outline: none;
-}
-
-.xterm .xterm-helpers {
- position: absolute;
- top: 0;
- /**
- * The z-index of the helpers must be higher than the canvases in order for
- * IMEs to appear on top.
- */
- z-index: 5;
-}
-
-.xterm .xterm-helper-textarea {
- padding: 0;
- border: 0;
- margin: 0;
- /* Move textarea out of the screen to the far left, so that the cursor is not visible */
- position: absolute;
- opacity: 0;
- left: -9999em;
- top: 0;
- width: 0;
- height: 0;
- z-index: -5;
- /** Prevent wrapping so the IME appears against the textarea at the correct position */
- white-space: nowrap;
- overflow: hidden;
- resize: none;
-}
-
-.xterm .composition-view {
- /* TODO: Composition position got messed up somewhere */
- background: #000;
- color: #FFF;
- display: none;
- position: absolute;
- white-space: nowrap;
- z-index: 1;
-}
-
-.xterm .composition-view.active {
- display: block;
-}
-
-.xterm .xterm-viewport {
- /* On OS X this is required in order for the scroll bar to appear fully opaque */
- background-color: #000;
- overflow-y: scroll;
- cursor: default;
- position: absolute;
- right: 0;
- left: 0;
- top: 0;
- bottom: 0;
-}
-
-.xterm .xterm-screen {
- position: relative;
-}
-
-.xterm .xterm-screen canvas {
- position: absolute;
- left: 0;
- top: 0;
-}
-
-.xterm .xterm-scroll-area {
- visibility: hidden;
-}
-
-.xterm-char-measure-element {
- display: inline-block;
- visibility: hidden;
- position: absolute;
- top: 0;
- left: -9999em;
- line-height: normal;
-}
-
-.xterm {
- cursor: text;
-}
-
-.xterm.enable-mouse-events {
- /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
- cursor: default;
-}
-
-.xterm.xterm-cursor-pointer,
-.xterm .xterm-cursor-pointer {
- cursor: pointer;
-}
-
-.xterm.column-select.focus {
- /* Column selection mode */
- cursor: crosshair;
-}
-
-.xterm .xterm-accessibility,
-.xterm .xterm-message {
- position: absolute;
- left: 0;
- top: 0;
- bottom: 0;
- right: 0;
- z-index: 10;
- color: transparent;
-}
-
-.xterm .live-region {
- position: absolute;
- left: -9999px;
- width: 1px;
- height: 1px;
- overflow: hidden;
-}
-
-.xterm-dim {
- opacity: 0.5;
-}
-
-.xterm-underline {
- text-decoration: underline;
-}
-
-.xterm-strikethrough {
- text-decoration: line-through;
-}
-
-.xterm-screen .xterm-decoration-container .xterm-decoration {
- z-index: 6;
- position: absolute;
-}
diff --git a/node_modules/xterm/lib/xterm.js b/node_modules/xterm/lib/xterm.js
deleted file mode 100644
index 277b295..0000000
--- a/node_modules/xterm/lib/xterm.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(self,(function(){return(()=>{"use strict";var e={4567:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AccessibilityManager=void 0;var o=r(9042),s=r(6114),a=r(9924),c=r(3656),l=r(844),h=r(5596),u=r(9631),f=function(e){function t(t,r){var i=e.call(this)||this;i._terminal=t,i._renderService=r,i._liveRegionLineCount=0,i._charsToConsume=[],i._charsToAnnounce="",i._accessibilityTreeRoot=document.createElement("div"),i._accessibilityTreeRoot.classList.add("xterm-accessibility"),i._accessibilityTreeRoot.tabIndex=0,i._rowContainer=document.createElement("div"),i._rowContainer.setAttribute("role","list"),i._rowContainer.classList.add("xterm-accessibility-tree"),i._rowElements=[];for(var n=0;n<i._terminal.rows;n++)i._rowElements[n]=i._createAccessibilityTreeNode(),i._rowContainer.appendChild(i._rowElements[n]);if(i._topBoundaryFocusListener=function(e){return i._onBoundaryFocus(e,0)},i._bottomBoundaryFocusListener=function(e){return i._onBoundaryFocus(e,1)},i._rowElements[0].addEventListener("focus",i._topBoundaryFocusListener),i._rowElements[i._rowElements.length-1].addEventListener("focus",i._bottomBoundaryFocusListener),i._refreshRowsDimensions(),i._accessibilityTreeRoot.appendChild(i._rowContainer),i._renderRowsDebouncer=new a.TimeBasedDebouncer(i._renderRows.bind(i)),i._refreshRows(),i._liveRegion=document.createElement("div"),i._liveRegion.classList.add("live-region"),i._liveRegion.setAttribute("aria-live","assertive"),i._accessibilityTreeRoot.appendChild(i._liveRegion),!i._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return i._terminal.element.insertAdjacentElement("afterbegin",i._accessibilityTreeRoot),i.register(i._renderRowsDebouncer),i.register(i._terminal.onResize((function(e){return i._onResize(e.rows)}))),i.register(i._terminal.onRender((function(e){return i._refreshRows(e.start,e.end)}))),i.register(i._terminal.onScroll((function(){return i._refreshRows()}))),i.register(i._terminal.onA11yChar((function(e){return i._onChar(e)}))),i.register(i._terminal.onLineFeed((function(){return i._onChar("\n")}))),i.register(i._terminal.onA11yTab((function(e){return i._onTab(e)}))),i.register(i._terminal.onKey((function(e){return i._onKey(e.key)}))),i.register(i._terminal.onBlur((function(){return i._clearLiveRegion()}))),i.register(i._renderService.onDimensionsChange((function(){return i._refreshRowsDimensions()}))),i._screenDprMonitor=new h.ScreenDprMonitor,i.register(i._screenDprMonitor),i._screenDprMonitor.setListener((function(){return i._refreshRowsDimensions()})),i.register((0,c.addDisposableDomListener)(window,"resize",(function(){return i._refreshRowsDimensions()}))),i}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),(0,u.removeElementFromParent)(this._accessibilityTreeRoot),this._rowElements.length=0},t.prototype._onBoundaryFocus=function(e,t){var r=e.target,i=this._rowElements[0===t?1:this._rowElements.length-2];if(r.getAttribute("aria-posinset")!==(0===t?"1":""+this._terminal.buffer.lines.length)&&e.relatedTarget===i){var n,o;if(0===t?(n=r,o=this._rowElements.pop(),this._rowContainer.removeChild(o)):(n=this._rowElements.shift(),o=r,this._rowContainer.removeChild(n)),n.removeEventListener("focus",this._topBoundaryFocusListener),o.removeEventListener("focus",this._bottomBoundaryFocusListener),0===t){var s=this._createAccessibilityTreeNode();this._rowElements.unshift(s),this._rowContainer.insertAdjacentElement("afterbegin",s)}else s=this._createAccessibilityTreeNode(),this._rowElements.push(s),this._rowContainer.appendChild(s);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===t?-1:1),this._rowElements[0===t?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}},t.prototype._onResize=function(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},t.prototype._createAccessibilityTreeNode=function(){var e=document.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e},t.prototype._onTab=function(e){for(var t=0;t<e;t++)this._onChar(" ")},t.prototype._onChar=function(e){var t=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,"\n"===e&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=o.tooMuchOutput)),s.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((function(){t._accessibilityTreeRoot.appendChild(t._liveRegion)}),0))},t.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,s.isMac&&(0,u.removeElementFromParent)(this._liveRegion)},t.prototype._onKey=function(e){this._clearLiveRegion(),this._charsToConsume.push(e)},t.prototype._refreshRows=function(e,t){this._renderRowsDebouncer.refresh(e,t,this._terminal.rows)},t.prototype._renderRows=function(e,t){for(var r=this._terminal.buffer,i=r.lines.length.toString(),n=e;n<=t;n++){var o=r.translateBufferLineToString(r.ydisp+n,!0),s=(r.ydisp+n+1).toString(),a=this._rowElements[n];a&&(0===o.length?a.innerText=" ":a.textContent=o,a.setAttribute("aria-posinset",s),a.setAttribute("aria-setsize",i))}this._announceCharacters()},t.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}},t.prototype._refreshRowDimensions=function(e){e.style.height=this._renderService.dimensions.actualCellHeight+"px"},t.prototype._announceCharacters=function(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},t}(l.Disposable);t.AccessibilityManager=f},3614:(e,t)=>{function r(e){return e.replace(/\r?\n/g,"\r")}function i(e,t){return t?"[200~"+e+"[201~":e}function n(e,t,n){e=i(e=r(e),n.decPrivateModes.bracketedPasteMode),n.triggerDataEvent(e,!0),t.value=""}function o(e,t,r){var i=r.getBoundingClientRect(),n=e.clientX-i.left-10,o=e.clientY-i.top-10;t.style.width="20px",t.style.height="20px",t.style.left=n+"px",t.style.top=o+"px",t.style.zIndex="1000",t.focus()}Object.defineProperty(t,"__esModule",{value:!0}),t.rightClickHandler=t.moveTextAreaUnderMouseCursor=t.paste=t.handlePasteEvent=t.copyHandler=t.bracketTextForPaste=t.prepareTextForTerminal=void 0,t.prepareTextForTerminal=r,t.bracketTextForPaste=i,t.copyHandler=function(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()},t.handlePasteEvent=function(e,t,r){e.stopPropagation(),e.clipboardData&&n(e.clipboardData.getData("text/plain"),t,r)},t.paste=n,t.moveTextAreaUnderMouseCursor=o,t.rightClickHandler=function(e,t,r,i,n){o(e,t,r),n&&i.rightClickSelect(e),t.value=i.selectionText,t.select()}},4774:(e,t)=>{var r,i,n,o;function s(e){var t=e.toString(16);return t.length<2?"0"+t:t}function a(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}Object.defineProperty(t,"__esModule",{value:!0}),t.contrastRatio=t.toPaddedHex=t.rgba=t.rgb=t.css=t.color=t.channels=void 0,function(e){e.toCss=function(e,t,r,i){return void 0!==i?"#"+s(e)+s(t)+s(r)+s(i):"#"+s(e)+s(t)+s(r)},e.toRgba=function(e,t,r,i){return void 0===i&&(i=255),(e<<24|t<<16|r<<8|i)>>>0}}(r=t.channels||(t.channels={})),(i=t.color||(t.color={})).blend=function(e,t){var i=(255&t.rgba)/255;if(1===i)return{css:t.css,rgba:t.rgba};var n=t.rgba>>24&255,o=t.rgba>>16&255,s=t.rgba>>8&255,a=e.rgba>>24&255,c=e.rgba>>16&255,l=e.rgba>>8&255,h=a+Math.round((n-a)*i),u=c+Math.round((o-c)*i),f=l+Math.round((s-l)*i);return{css:r.toCss(h,u,f),rgba:r.toRgba(h,u,f)}},i.isOpaque=function(e){return 255==(255&e.rgba)},i.ensureContrastRatio=function(e,t,r){var i=o.ensureContrastRatio(e.rgba,t.rgba,r);if(i)return o.toColor(i>>24&255,i>>16&255,i>>8&255)},i.opaque=function(e){var t=(255|e.rgba)>>>0,i=o.toChannels(t),n=i[0],s=i[1],a=i[2];return{css:r.toCss(n,s,a),rgba:t}},i.opacity=function(e,t){var i=Math.round(255*t),n=o.toChannels(e.rgba),s=n[0],a=n[1],c=n[2];return{css:r.toCss(s,a,c,i),rgba:r.toRgba(s,a,c,i)}},i.toColorRGB=function(e){return[e.rgba>>24&255,e.rgba>>16&255,e.rgba>>8&255]},(t.css||(t.css={})).toColor=function(e){switch(e.length){case 7:return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0};case 9:return{css:e,rgba:parseInt(e.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(e){function t(e,t,r){var i=e/255,n=t/255,o=r/255;return.2126*(i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))}e.relativeLuminance=function(e){return t(e>>16&255,e>>8&255,255&e)},e.relativeLuminance2=t}(n=t.rgb||(t.rgb={})),function(e){function t(e,t,r){for(var i=e>>24&255,o=e>>16&255,s=e>>8&255,c=t>>24&255,l=t>>16&255,h=t>>8&255,u=a(n.relativeLuminance2(c,h,l),n.relativeLuminance2(i,o,s));u<r&&(c>0||l>0||h>0);)c-=Math.max(0,Math.ceil(.1*c)),l-=Math.max(0,Math.ceil(.1*l)),h-=Math.max(0,Math.ceil(.1*h)),u=a(n.relativeLuminance2(c,h,l),n.relativeLuminance2(i,o,s));return(c<<24|l<<16|h<<8|255)>>>0}function i(e,t,r){for(var i=e>>24&255,o=e>>16&255,s=e>>8&255,c=t>>24&255,l=t>>16&255,h=t>>8&255,u=a(n.relativeLuminance2(c,h,l),n.relativeLuminance2(i,o,s));u<r&&(c<255||l<255||h<255);)c=Math.min(255,c+Math.ceil(.1*(255-c))),l=Math.min(255,l+Math.ceil(.1*(255-l))),h=Math.min(255,h+Math.ceil(.1*(255-h))),u=a(n.relativeLuminance2(c,h,l),n.relativeLuminance2(i,o,s));return(c<<24|l<<16|h<<8|255)>>>0}e.ensureContrastRatio=function(e,r,o){var s=n.relativeLuminance(e>>8),c=n.relativeLuminance(r>>8);if(a(s,c)<o)return c<s?t(e,r,o):i(e,r,o)},e.reduceLuminance=t,e.increaseLuminance=i,e.toChannels=function(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]},e.toColor=function(e,t,i){return{css:r.toCss(e,t,i),rgba:r.toRgba(e,t,i)}}}(o=t.rgba||(t.rgba={})),t.toPaddedHex=s,t.contrastRatio=a},7239:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ColorContrastCache=void 0;var r=function(){function e(){this._color={},this._rgba={}}return e.prototype.clear=function(){this._color={},this._rgba={}},e.prototype.setCss=function(e,t,r){this._rgba[e]||(this._rgba[e]={}),this._rgba[e][t]=r},e.prototype.getCss=function(e,t){return this._rgba[e]?this._rgba[e][t]:void 0},e.prototype.setColor=function(e,t,r){this._color[e]||(this._color[e]={}),this._color[e][t]=r},e.prototype.getColor=function(e,t){return this._color[e]?this._color[e][t]:void 0},e}();t.ColorContrastCache=r},5680:function(e,t,r){var i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.ColorManager=t.DEFAULT_ANSI_COLORS=void 0;var n=r(4774),o=r(7239),s=n.css.toColor("#ffffff"),a=n.css.toColor("#000000"),c=n.css.toColor("#ffffff"),l=n.css.toColor("#000000"),h={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};t.DEFAULT_ANSI_COLORS=Object.freeze(function(){for(var e=[n.css.toColor("#2e3436"),n.css.toColor("#cc0000"),n.css.toColor("#4e9a06"),n.css.toColor("#c4a000"),n.css.toColor("#3465a4"),n.css.toColor("#75507b"),n.css.toColor("#06989a"),n.css.toColor("#d3d7cf"),n.css.toColor("#555753"),n.css.toColor("#ef2929"),n.css.toColor("#8ae234"),n.css.toColor("#fce94f"),n.css.toColor("#729fcf"),n.css.toColor("#ad7fa8"),n.css.toColor("#34e2e2"),n.css.toColor("#eeeeec")],t=[0,95,135,175,215,255],r=0;r<216;r++){var i=t[r/36%6|0],o=t[r/6%6|0],s=t[r%6];e.push({css:n.channels.toCss(i,o,s),rgba:n.channels.toRgba(i,o,s)})}for(r=0;r<24;r++){var a=8+10*r;e.push({css:n.channels.toCss(a,a,a),rgba:n.channels.toRgba(a,a,a)})}return e}());var u=function(){function e(e,r){this.allowTransparency=r;var i=e.createElement("canvas");i.width=1,i.height=1;var u=i.getContext("2d");if(!u)throw new Error("Could not get rendering context");this._ctx=u,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new o.ColorContrastCache,this.colors={foreground:s,background:a,cursor:c,cursorAccent:l,selectionTransparent:h,selectionOpaque:n.color.blend(a,h),ansi:t.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache},this._updateRestoreColors()}return e.prototype.onOptionsChange=function(e){"minimumContrastRatio"===e&&this._contrastCache.clear()},e.prototype.setTheme=function(e){void 0===e&&(e={}),this.colors.foreground=this._parseColor(e.foreground,s),this.colors.background=this._parseColor(e.background,a),this.colors.cursor=this._parseColor(e.cursor,c,!0),this.colors.cursorAccent=this._parseColor(e.cursorAccent,l,!0),this.colors.selectionTransparent=this._parseColor(e.selection,h,!0),this.colors.selectionOpaque=n.color.blend(this.colors.background,this.colors.selectionTransparent),n.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=n.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(e.black,t.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(e.red,t.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(e.green,t.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(e.yellow,t.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(e.blue,t.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(e.magenta,t.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(e.cyan,t.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(e.white,t.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(e.brightBlack,t.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(e.brightRed,t.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(e.brightGreen,t.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(e.brightYellow,t.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(e.brightBlue,t.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(e.brightMagenta,t.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(e.brightCyan,t.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(e.brightWhite,t.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear(),this._updateRestoreColors()},e.prototype.restoreColor=function(e){if(void 0!==e)switch(e){case 256:this.colors.foreground=this._restoreColors.foreground;break;case 257:this.colors.background=this._restoreColors.background;break;case 258:this.colors.cursor=this._restoreColors.cursor;break;default:this.colors.ansi[e]=this._restoreColors.ansi[e]}else for(var t=0;t<this._restoreColors.ansi.length;++t)this.colors.ansi[t]=this._restoreColors.ansi[t]},e.prototype._updateRestoreColors=function(){this._restoreColors={foreground:this.colors.foreground,background:this.colors.background,cursor:this.colors.cursor,ansi:i([],this.colors.ansi,!0)}},e.prototype._parseColor=function(e,t,r){if(void 0===r&&(r=this.allowTransparency),void 0===e)return t;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=e,"string"!=typeof this._ctx.fillStyle)return console.warn("Color: "+e+" is invalid using fallback "+t.css),t;this._ctx.fillRect(0,0,1,1);var i=this._ctx.getImageData(0,0,1,1).data;if(255!==i[3]){if(!r)return console.warn("Color: "+e+" is using transparency, but allowTransparency is false. Using fallback "+t.css+"."),t;var o=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map((function(e){return Number(e)})),s=o[0],a=o[1],c=o[2],l=o[3],h=Math.round(255*l);return{rgba:n.channels.toRgba(s,a,c,h),css:e}}return{css:this._ctx.fillStyle,rgba:n.channels.toRgba(i[0],i[1],i[2],i[3])}},e}();t.ColorManager=u},9631:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeElementFromParent=void 0,t.removeElementFromParent=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var i=0,n=t;i<n.length;i++){var o=n[i];null===(e=null==o?void 0:o.parentElement)||void 0===e||e.removeChild(o)}}},3656:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addDisposableDomListener=void 0,t.addDisposableDomListener=function(e,t,r,i){e.addEventListener(t,r,i);var n=!1;return{dispose:function(){n||(n=!0,e.removeEventListener(t,r,i))}}}},3551:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseZone=t.Linkifier=void 0;var o=r(8460),s=r(2585),a=function(){function e(e,t,r){this._bufferService=e,this._logService=t,this._unicodeService=r,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new o.EventEmitter,this._onHideLinkUnderline=new o.EventEmitter,this._onLinkTooltip=new o.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(e.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),e.prototype.attachToDom=function(e,t){this._element=e,this._mouseZoneManager=t},e.prototype.linkifyRows=function(t,r){var i=this;this._mouseZoneManager&&(void 0===this._rowsToLinkify.start||void 0===this._rowsToLinkify.end?(this._rowsToLinkify.start=t,this._rowsToLinkify.end=r):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,t),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,r)),this._mouseZoneManager.clearAll(t,r),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout((function(){return i._linkifyRows()}),e._timeBeforeLatency))},e.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var e=this._bufferService.buffer;if(void 0!==this._rowsToLinkify.start&&void 0!==this._rowsToLinkify.end){var t=e.ydisp+this._rowsToLinkify.start;if(!(t>=e.lines.length)){for(var r=e.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,i=Math.ceil(2e3/this._bufferService.cols),n=this._bufferService.buffer.iterator(!1,t,r,i,i);n.hasNext();)for(var o=n.next(),s=0;s<this._linkMatchers.length;s++)this._doLinkifyRow(o.range.first,o.content,this._linkMatchers[s]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},e.prototype.registerLinkMatcher=function(e,t,r){if(void 0===r&&(r={}),!t)throw new Error("handler must be defined");var i={id:this._nextLinkMatcherId++,regex:e,handler:t,matchIndex:r.matchIndex,validationCallback:r.validationCallback,hoverTooltipCallback:r.tooltipCallback,hoverLeaveCallback:r.leaveCallback,willLinkActivate:r.willLinkActivate,priority:r.priority||0};return this._addLinkMatcherToList(i),i.id},e.prototype._addLinkMatcherToList=function(e){if(0!==this._linkMatchers.length){for(var t=this._linkMatchers.length-1;t>=0;t--)if(e.priority<=this._linkMatchers[t].priority)return void this._linkMatchers.splice(t+1,0,e);this._linkMatchers.splice(0,0,e)}else this._linkMatchers.push(e)},e.prototype.deregisterLinkMatcher=function(e){for(var t=0;t<this._linkMatchers.length;t++)if(this._linkMatchers[t].id===e)return this._linkMatchers.splice(t,1),!0;return!1},e.prototype._doLinkifyRow=function(e,t,r){for(var i,n=this,o=new RegExp(r.regex.source,(r.regex.flags||"")+"g"),s=-1,a=function(){var a=i["number"!=typeof r.matchIndex?0:r.matchIndex];if(!a)return c._logService.debug("match found without corresponding matchIndex",i,r),"break";if(s=t.indexOf(a,s+1),o.lastIndex=s+a.length,s<0)return"break";var l=c._bufferService.buffer.stringIndexToBufferIndex(e,s);if(l[0]<0)return"break";var h=c._bufferService.buffer.lines.get(l[0]);if(!h)return"break";var u=h.getFg(l[1]),f=u?u>>9&511:void 0;r.validationCallback?r.validationCallback(a,(function(e){n._rowsTimeoutId||e&&n._addLink(l[1],l[0]-n._bufferService.buffer.ydisp,a,r,f)})):c._addLink(l[1],l[0]-c._bufferService.buffer.ydisp,a,r,f)},c=this;null!==(i=o.exec(t))&&"break"!==a(););},e.prototype._addLink=function(e,t,r,i,n){var o=this;if(this._mouseZoneManager&&this._element){var s=this._unicodeService.getStringCellWidth(r),a=e%this._bufferService.cols,l=t+Math.floor(e/this._bufferService.cols),h=(a+s)%this._bufferService.cols,u=l+Math.floor((a+s)/this._bufferService.cols);0===h&&(h=this._bufferService.cols,u--),this._mouseZoneManager.add(new c(a+1,l+1,h+1,u+1,(function(e){if(i.handler)return i.handler(e,r);var t=window.open();t?(t.opener=null,t.location.href=r):console.warn("Opening link blocked as opener could not be cleared")}),(function(){o._onShowLinkUnderline.fire(o._createLinkHoverEvent(a,l,h,u,n)),o._element.classList.add("xterm-cursor-pointer")}),(function(e){o._onLinkTooltip.fire(o._createLinkHoverEvent(a,l,h,u,n)),i.hoverTooltipCallback&&i.hoverTooltipCallback(e,r,{start:{x:a,y:l},end:{x:h,y:u}})}),(function(){o._onHideLinkUnderline.fire(o._createLinkHoverEvent(a,l,h,u,n)),o._element.classList.remove("xterm-cursor-pointer"),i.hoverLeaveCallback&&i.hoverLeaveCallback()}),(function(e){return!i.willLinkActivate||i.willLinkActivate(e,r)})))}},e.prototype._createLinkHoverEvent=function(e,t,r,i,n){return{x1:e,y1:t,x2:r,y2:i,cols:this._bufferService.cols,fg:n}},e._timeBeforeLatency=200,e=i([n(0,s.IBufferService),n(1,s.ILogService),n(2,s.IUnicodeService)],e)}();t.Linkifier=a;var c=function(e,t,r,i,n,o,s,a,c){this.x1=e,this.y1=t,this.x2=r,this.y2=i,this.clickCallback=n,this.hoverCallback=o,this.tooltipCallback=s,this.leaveCallback=a,this.willLinkActivate=c};t.MouseZone=c},6465:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Linkifier2=void 0;var a=r(2585),c=r(8460),l=r(844),h=r(3656),u=function(e){function t(t){var r=e.call(this)||this;return r._bufferService=t,r._linkProviders=[],r._linkCacheDisposables=[],r._isMouseOut=!0,r._activeLine=-1,r._onShowLinkUnderline=r.register(new c.EventEmitter),r._onHideLinkUnderline=r.register(new c.EventEmitter),r.register((0,l.getDisposeArrayDisposable)(r._linkCacheDisposables)),r}return n(t,e),Object.defineProperty(t.prototype,"currentLink",{get:function(){return this._currentLink},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),t.prototype.registerLinkProvider=function(e){var t=this;return this._linkProviders.push(e),{dispose:function(){var r=t._linkProviders.indexOf(e);-1!==r&&t._linkProviders.splice(r,1)}}},t.prototype.attachToDom=function(e,t,r){var i=this;this._element=e,this._mouseService=t,this._renderService=r,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(function(){i._isMouseOut=!0,i._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._onMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"click",this._onClick.bind(this)))},t.prototype._onMouseMove=function(e){if(this._lastMouseEvent=e,this._element&&this._mouseService){var t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(t){this._isMouseOut=!1;for(var r=e.composedPath(),i=0;i<r.length;i++){var n=r[i];if(n.classList.contains("xterm"))break;if(n.classList.contains("xterm-hover"))return}this._lastBufferCell&&t.x===this._lastBufferCell.x&&t.y===this._lastBufferCell.y||(this._onHover(t),this._lastBufferCell=t)}}},t.prototype._onHover=function(e){if(this._activeLine!==e.y)return this._clearCurrentLink(),void this._askForLink(e,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))},t.prototype._askForLink=function(e,t){var r,i=this;this._activeProviderReplies&&t||(null===(r=this._activeProviderReplies)||void 0===r||r.forEach((function(e){null==e||e.forEach((function(e){e.link.dispose&&e.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=e.y);var n=!1;this._linkProviders.forEach((function(r,o){var s;t?(null===(s=i._activeProviderReplies)||void 0===s?void 0:s.get(o))&&(n=i._checkLinkProviderResult(o,e,n)):r.provideLinks(e.y,(function(t){var r,s;if(!i._isMouseOut){var a=null==t?void 0:t.map((function(e){return{link:e}}));null===(r=i._activeProviderReplies)||void 0===r||r.set(o,a),n=i._checkLinkProviderResult(o,e,n),(null===(s=i._activeProviderReplies)||void 0===s?void 0:s.size)===i._linkProviders.length&&i._removeIntersectingLinks(e.y,i._activeProviderReplies)}}))}))},t.prototype._removeIntersectingLinks=function(e,t){for(var r=new Set,i=0;i<t.size;i++){var n=t.get(i);if(n)for(var o=0;o<n.length;o++)for(var s=n[o],a=s.link.range.start.y<e?0:s.link.range.start.x,c=s.link.range.end.y>e?this._bufferService.cols:s.link.range.end.x,l=a;l<=c;l++){if(r.has(l)){n.splice(o--,1);break}r.add(l)}}},t.prototype._checkLinkProviderResult=function(e,t,r){var i,n=this;if(!this._activeProviderReplies)return r;for(var o=this._activeProviderReplies.get(e),s=!1,a=0;a<e;a++)this._activeProviderReplies.has(a)&&!this._activeProviderReplies.get(a)||(s=!0);if(!s&&o){var c=o.find((function(e){return n._linkAtPosition(e.link,t)}));c&&(r=!0,this._handleNewLink(c))}if(this._activeProviderReplies.size===this._linkProviders.length&&!r)for(a=0;a<this._activeProviderReplies.size;a++){var l=null===(i=this._activeProviderReplies.get(a))||void 0===i?void 0:i.find((function(e){return n._linkAtPosition(e.link,t)}));if(l){r=!0,this._handleNewLink(l);break}}return r},t.prototype._onClick=function(e){if(this._element&&this._mouseService&&this._currentLink){var t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}},t.prototype._clearCurrentLink=function(e,t){this._element&&this._currentLink&&this._lastMouseEvent&&(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,l.disposeArray)(this._linkCacheDisposables))},t.prototype._handleNewLink=function(e){var t=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var r=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);r&&this._linkAtPosition(e.link,r)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:void 0===e.link.decorations||e.link.decorations.underline,pointerCursor:void 0===e.link.decorations||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:function(){var e,r;return null===(r=null===(e=t._currentLink)||void 0===e?void 0:e.state)||void 0===r?void 0:r.decorations.pointerCursor},set:function(e){var r,i;(null===(r=t._currentLink)||void 0===r?void 0:r.state)&&t._currentLink.state.decorations.pointerCursor!==e&&(t._currentLink.state.decorations.pointerCursor=e,t._currentLink.state.isHovered&&(null===(i=t._element)||void 0===i||i.classList.toggle("xterm-cursor-pointer",e)))}},underline:{get:function(){var e,r;return null===(r=null===(e=t._currentLink)||void 0===e?void 0:e.state)||void 0===r?void 0:r.decorations.underline},set:function(r){var i,n,o;(null===(i=t._currentLink)||void 0===i?void 0:i.state)&&(null===(o=null===(n=t._currentLink)||void 0===n?void 0:n.state)||void 0===o?void 0:o.decorations.underline)!==r&&(t._currentLink.state.decorations.underline=r,t._currentLink.state.isHovered&&t._fireUnderlineEvent(e.link,r))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange((function(e){var r=0===e.start?0:e.start+1+t._bufferService.buffer.ydisp;t._clearCurrentLink(r,e.end+1+t._bufferService.buffer.ydisp)}))))}},t.prototype._linkHover=function(e,t,r){var i;(null===(i=this._currentLink)||void 0===i?void 0:i.state)&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(r,t.text)},t.prototype._fireUnderlineEvent=function(e,t){var r=e.range,i=this._bufferService.buffer.ydisp,n=this._createLinkUnderlineEvent(r.start.x-1,r.start.y-i-1,r.end.x,r.end.y-i-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(n)},t.prototype._linkLeave=function(e,t,r){var i;(null===(i=this._currentLink)||void 0===i?void 0:i.state)&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(r,t.text)},t.prototype._linkAtPosition=function(e,t){var r=e.range.start.y===e.range.end.y,i=e.range.start.y<t.y,n=e.range.end.y>t.y;return(r&&e.range.start.x<=t.x&&e.range.end.x>=t.x||i&&e.range.end.x>=t.x||n&&e.range.start.x<=t.x||i&&n)&&e.range.start.y<=t.y&&e.range.end.y>=t.y},t.prototype._positionFromMouseEvent=function(e,t,r){var i=r.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(i)return{x:i[0],y:i[1]+this._bufferService.buffer.ydisp}},t.prototype._createLinkUnderlineEvent=function(e,t,r,i,n){return{x1:e,y1:t,x2:r,y2:i,cols:this._bufferService.cols,fg:n}},o([s(0,a.IBufferService)],t)}(l.Disposable);t.Linkifier2=u},9042:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.tooMuchOutput=t.promptLabel=void 0,t.promptLabel="Terminal input",t.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},6954:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseZoneManager=void 0;var a=r(844),c=r(3656),l=r(4725),h=r(2585),u=function(e){function t(t,r,i,n,o,s){var a=e.call(this)||this;return a._element=t,a._screenElement=r,a._bufferService=i,a._mouseService=n,a._selectionService=o,a._optionsService=s,a._zones=[],a._areZonesActive=!1,a._lastHoverCoords=[void 0,void 0],a._initialSelectionLength=0,a.register((0,c.addDisposableDomListener)(a._element,"mousedown",(function(e){return a._onMouseDown(e)}))),a._mouseMoveListener=function(e){return a._onMouseMove(e)},a._mouseLeaveListener=function(e){return a._onMouseLeave(e)},a._clickListener=function(e){return a._onClick(e)},a}return n(t,e),t.prototype.dispose=function(){e.prototype.dispose.call(this),this._deactivate()},t.prototype.add=function(e){this._zones.push(e),1===this._zones.length&&this._activate()},t.prototype.clearAll=function(e,t){if(0!==this._zones.length){e&&t||(e=0,t=this._bufferService.rows-1);for(var r=0;r<this._zones.length;r++){var i=this._zones[r];(i.y1>e&&i.y1<=t+1||i.y2>e&&i.y2<=t+1||i.y1<e&&i.y2>t+1)&&(this._currentZone&&this._currentZone===i&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(r--,1))}0===this._zones.length&&this._deactivate()}},t.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},t.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},t.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},t.prototype._onHover=function(e){var t=this,r=this._findZoneEventAt(e);r!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),r&&(this._currentZone=r,r.hoverCallback&&r.hoverCallback(e),this._tooltipTimeout=window.setTimeout((function(){return t._onTooltip(e)}),this._optionsService.rawOptions.linkTooltipHoverDuration)))},t.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);null==t||t.tooltipCallback(e)},t.prototype._onMouseDown=function(e){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var t=this._findZoneEventAt(e);(null==t?void 0:t.willLinkActivate(e))&&(e.preventDefault(),e.stopImmediatePropagation())}},t.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},t.prototype._onClick=function(e){var t=this._findZoneEventAt(e),r=this._getSelectionLength();t&&r===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},t.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},t.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var r=t[0],i=t[1],n=0;n<this._zones.length;n++){var o=this._zones[n];if(o.y1===o.y2){if(i===o.y1&&r>=o.x1&&r<o.x2)return o}else if(i===o.y1&&r>=o.x1||i===o.y2&&r<o.x2||i>o.y1&&i<o.y2)return o}},o([s(2,h.IBufferService),s(3,l.IMouseService),s(4,l.ISelectionService),s(5,h.IOptionsService)],t)}(a.Disposable);t.MouseZoneManager=u},6193:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RenderDebouncer=void 0;var r=function(){function e(e){this._renderCallback=e}return e.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.refresh=function(e,t,r){var i=this;this._rowCount=r,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t,this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){return i._innerRefresh()})))},e.prototype._innerRefresh=function(){if(void 0!==this._rowStart&&void 0!==this._rowEnd&&void 0!==this._rowCount){var e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(e,t)}},e}();t.RenderDebouncer=r},5596:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ScreenDprMonitor=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._currentDevicePixelRatio=window.devicePixelRatio,t}return n(t,e),t.prototype.setListener=function(e){var t=this;this._listener&&this.clearListener(),this._listener=e,this._outerListener=function(){t._listener&&(t._listener(window.devicePixelRatio,t._currentDevicePixelRatio),t._updateDpr())},this._updateDpr()},t.prototype.dispose=function(){e.prototype.dispose.call(this),this.clearListener()},t.prototype._updateDpr=function(){var e;this._outerListener&&(null===(e=this._resolutionMediaMatchList)||void 0===e||e.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},t.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},t}(r(844).Disposable);t.ScreenDprMonitor=o},3236:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;var o=r(2950),s=r(1680),a=r(3614),c=r(2584),l=r(5435),h=r(3525),u=r(3551),f=r(9312),_=r(6114),d=r(3656),p=r(9042),v=r(357),g=r(6954),y=r(4567),m=r(1296),S=r(7399),C=r(8460),b=r(8437),w=r(5680),L=r(3230),E=r(4725),x=r(428),k=r(8934),M=r(6465),A=r(5114),R=r(8969),O=r(4774),T=r(4269),D=r(5941),B=r(7641),P="undefined"!=typeof window?window.document:null,I=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,t)||this;return r.browser=_,r._keyDownHandled=!1,r._keyPressHandled=!1,r._unprocessedDeadKey=!1,r._onCursorMove=new C.EventEmitter,r._onKey=new C.EventEmitter,r._onRender=new C.EventEmitter,r._onSelectionChange=new C.EventEmitter,r._onTitleChange=new C.EventEmitter,r._onBell=new C.EventEmitter,r._onFocus=new C.EventEmitter,r._onBlur=new C.EventEmitter,r._onA11yCharEmitter=new C.EventEmitter,r._onA11yTabEmitter=new C.EventEmitter,r._setup(),r.linkifier=r._instantiationService.createInstance(u.Linkifier),r.linkifier2=r.register(r._instantiationService.createInstance(M.Linkifier2)),r.decorationService=r.register(r._instantiationService.createInstance(B.DecorationService)),r.register(r._inputHandler.onRequestBell((function(){return r.bell()}))),r.register(r._inputHandler.onRequestRefreshRows((function(e,t){return r.refresh(e,t)}))),r.register(r._inputHandler.onRequestSendFocus((function(){return r._reportFocus()}))),r.register(r._inputHandler.onRequestReset((function(){return r.reset()}))),r.register(r._inputHandler.onRequestWindowsOptionsReport((function(e){return r._reportWindowsOptions(e)}))),r.register(r._inputHandler.onColor((function(e){return r._handleColorEvent(e)}))),r.register((0,C.forwardEvent)(r._inputHandler.onCursorMove,r._onCursorMove)),r.register((0,C.forwardEvent)(r._inputHandler.onTitleChange,r._onTitleChange)),r.register((0,C.forwardEvent)(r._inputHandler.onA11yChar,r._onA11yCharEmitter)),r.register((0,C.forwardEvent)(r._inputHandler.onA11yTab,r._onA11yTabEmitter)),r.register(r._bufferService.onResize((function(e){return r._afterResize(e.cols,e.rows)}))),r}return n(t,e),Object.defineProperty(t.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBell",{get:function(){return this._onBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),t.prototype._handleColorEvent=function(e){var t,r;if(this._colorManager){for(var i=0,n=e;i<n.length;i++){var o=n[i],s=void 0,a="";switch(o.index){case 256:s="foreground",a="10";break;case 257:s="background",a="11";break;case 258:s="cursor",a="12";break;default:s="ansi",a="4;"+o.index}if(s)switch(o.type){case 0:var l=O.color.toColorRGB("ansi"===s?this._colorManager.colors.ansi[o.index]:this._colorManager.colors[s]);this.coreService.triggerDataEvent(c.C0.ESC+"]"+a+";"+(0,D.toRgbString)(l)+c.C0.BEL);break;case 1:"ansi"===s?this._colorManager.colors.ansi[o.index]=O.rgba.toColor.apply(O.rgba,o.color):this._colorManager.colors[s]=O.rgba.toColor.apply(O.rgba,o.color);break;case 2:this._colorManager.restoreColor(o.index)}}null===(t=this._renderService)||void 0===t||t.setColors(this._colorManager.colors),null===(r=this.viewport)||void 0===r||r.onThemeChange(this._colorManager.colors)}},t.prototype.dispose=function(){var t,r,i;this._isDisposed||(e.prototype.dispose.call(this),null===(t=this._renderService)||void 0===t||t.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},null===(i=null===(r=this.element)||void 0===r?void 0:r.parentNode)||void 0===i||i.removeChild(this.element))},t.prototype._setup=function(){e.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(t.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),t.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},t.prototype._updateOptions=function(t){var r,i,n,o;switch(e.prototype._updateOptions.call(this,t),t){case"fontFamily":case"fontSize":null===(r=this._renderService)||void 0===r||r.clear(),null===(i=this._charSizeService)||void 0===i||i.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"customGlyphs":case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":null===(n=this.viewport)||void 0===n||n.syncScrollArea();break;case"screenReaderMode":this.optionsService.rawOptions.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new y.AccessibilityManager(this,this._renderService)):(null===(o=this._accessibilityManager)||void 0===o||o.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.rawOptions.theme)}},t.prototype._onTextAreaFocus=function(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(c.C0.ESC+"[I"),this.updateCursorStyle(e),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},t.prototype.blur=function(){var e;return null===(e=this.textarea)||void 0===e?void 0:e.blur()},t.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(c.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},t.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing&&this._renderService){var e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(t){var r=Math.min(this.buffer.x,this.cols-1),i=this._renderService.dimensions.actualCellHeight,n=t.getWidth(r),o=this._renderService.dimensions.actualCellWidth*n,s=this.buffer.y*this._renderService.dimensions.actualCellHeight,a=r*this._renderService.dimensions.actualCellWidth;this.textarea.style.left=a+"px",this.textarea.style.top=s+"px",this.textarea.style.width=o+"px",this.textarea.style.height=i+"px",this.textarea.style.lineHeight=i+"px",this.textarea.style.zIndex="-5"}}},t.prototype._initGlobal=function(){var e=this;this._bindKeys(),this.register((0,d.addDisposableDomListener)(this.element,"copy",(function(t){e.hasSelection()&&(0,a.copyHandler)(t,e._selectionService)})));var t=function(t){return(0,a.handlePasteEvent)(t,e.textarea,e.coreService)};this.register((0,d.addDisposableDomListener)(this.textarea,"paste",t)),this.register((0,d.addDisposableDomListener)(this.element,"paste",t)),_.isFirefox?this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(function(t){2===t.button&&(0,a.rightClickHandler)(t,e.textarea,e.screenElement,e._selectionService,e.options.rightClickSelectsWord)}))):this.register((0,d.addDisposableDomListener)(this.element,"contextmenu",(function(t){(0,a.rightClickHandler)(t,e.textarea,e.screenElement,e._selectionService,e.options.rightClickSelectsWord)}))),_.isLinux&&this.register((0,d.addDisposableDomListener)(this.element,"auxclick",(function(t){1===t.button&&(0,a.moveTextAreaUnderMouseCursor)(t,e.textarea,e.screenElement)})))},t.prototype._bindKeys=function(){var e=this;this.register((0,d.addDisposableDomListener)(this.textarea,"keyup",(function(t){return e._keyUp(t)}),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keydown",(function(t){return e._keyDown(t)}),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"keypress",(function(t){return e._keyPress(t)}),!0)),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionstart",(function(){return e._compositionHelper.compositionstart()}))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionupdate",(function(t){return e._compositionHelper.compositionupdate(t)}))),this.register((0,d.addDisposableDomListener)(this.textarea,"compositionend",(function(){return e._compositionHelper.compositionend()}))),this.register((0,d.addDisposableDomListener)(this.textarea,"input",(function(t){return e._inputEvent(t)}),!0)),this.register(this.onRender((function(){return e._compositionHelper.updateCompositionElements()}))),this.register(this.onRender((function(t){return e._queueLinkification(t.start,t.end)})))},t.prototype.open=function(e){var t=this;if(!e)throw new Error("Terminal requires a parent element.");e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=e.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),e.appendChild(this.element);var r=P.createDocumentFragment();this._viewportElement=P.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),r.appendChild(this._viewportElement),this._viewportScrollArea=P.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=P.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=P.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),r.appendChild(this.screenElement),this.textarea=P.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register((0,d.addDisposableDomListener)(this.textarea,"focus",(function(e){return t._onTextAreaFocus(e)}))),this.register((0,d.addDisposableDomListener)(this.textarea,"blur",(function(){return t._onTextAreaBlur()}))),this._helperContainer.appendChild(this.textarea);var i=this._instantiationService.createInstance(A.CoreBrowserService,this.textarea);this._instantiationService.setService(E.ICoreBrowserService,i),this._charSizeService=this._instantiationService.createInstance(x.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(E.ICharSizeService,this._charSizeService),this._theme=this.options.theme||this._theme,this._colorManager=new w.ColorManager(P,this.options.allowTransparency),this.register(this.optionsService.onOptionChange((function(e){return t._colorManager.onOptionsChange(e)}))),this._colorManager.setTheme(this._theme),this._characterJoinerService=this._instantiationService.createInstance(T.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService);var n=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(L.RenderService,n,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange((function(e){return t._onRender.fire(e)}))),this.onResize((function(e){return t._renderService.resize(e.cols,e.rows)})),this._compositionView=P.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(o.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(r),this._soundService=this._instantiationService.createInstance(v.SoundService),this._instantiationService.setService(E.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(k.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(s.Viewport,(function(e){return t.scrollLines(e,!0,1)}),this._viewportElement,this._viewportScrollArea,this.element),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar((function(){return t.viewport.syncScrollArea()}))),this.register(this.viewport),this.register(this.onCursorMove((function(){t._renderService.onCursorMove(),t._syncTextArea()}))),this.register(this.onResize((function(){return t._renderService.onResize(t.cols,t.rows)}))),this.register(this.onBlur((function(){return t._renderService.onBlur()}))),this.register(this.onFocus((function(){return t._renderService.onFocus()}))),this.register(this._renderService.onDimensionsChange((function(){return t.viewport.syncScrollArea()}))),this._selectionService=this.register(this._instantiationService.createInstance(f.SelectionService,this.element,this.screenElement,this.linkifier2)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((function(e){return t.scrollLines(e.amount,e.suppressScrollEvent)}))),this.register(this._selectionService.onSelectionChange((function(){return t._onSelectionChange.fire()}))),this.register(this._selectionService.onRequestRedraw((function(e){return t._renderService.onSelectionChanged(e.start,e.end,e.columnSelectMode)}))),this.register(this._selectionService.onLinuxMouseSelection((function(e){t.textarea.value=e,t.textarea.focus(),t.textarea.select()}))),this.register(this._onScroll.event((function(e){t.viewport.syncScrollArea(),t._selectionService.refresh()}))),this.register((0,d.addDisposableDomListener)(this._viewportElement,"scroll",(function(){return t._selectionService.refresh()}))),this._mouseZoneManager=this._instantiationService.createInstance(g.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll((function(){return t._mouseZoneManager.clearAll()}))),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.decorationService.attachToDom(this.screenElement,this._renderService,this._bufferService),this.register((0,d.addDisposableDomListener)(this.element,"mousedown",(function(e){return t._selectionService.onMouseDown(e)}))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new y.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},t.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(h.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(m.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},t.prototype._setTheme=function(e){var t,r,i;this._theme=e,null===(t=this._colorManager)||void 0===t||t.setTheme(e),null===(r=this._renderService)||void 0===r||r.setColors(this._colorManager.colors),null===(i=this.viewport)||void 0===i||i.onThemeChange(this._colorManager.colors)},t.prototype.bindMouse=function(){var e=this,t=this,r=this.element;function i(e){var r,i,n=t._mouseService.getRawByteCoords(e,t.screenElement,t.cols,t.rows);if(!n)return!1;switch(e.overrideType||e.type){case"mousemove":i=32,void 0===e.buttons?(r=3,void 0!==e.button&&(r=e.button<3?e.button:3)):r=1&e.buttons?0:4&e.buttons?1:2&e.buttons?2:3;break;case"mouseup":i=0,r=e.button<3?e.button:3;break;case"mousedown":i=1,r=e.button<3?e.button:3;break;case"wheel":0!==e.deltaY&&(i=e.deltaY<0?0:1),r=4;break;default:return!1}return!(void 0===i||void 0===r||r>4)&&t.coreMouseService.triggerMouseEvent({col:n.x-33,row:n.y-33,button:r,action:i,ctrl:e.ctrlKey,alt:e.altKey,shift:e.shiftKey})}var n={mouseup:null,wheel:null,mousedrag:null,mousemove:null},o=function(t){return i(t),t.buttons||(e._document.removeEventListener("mouseup",n.mouseup),n.mousedrag&&e._document.removeEventListener("mousemove",n.mousedrag)),e.cancel(t)},s=function(t){return i(t),e.cancel(t,!0)},a=function(e){e.buttons&&i(e)},l=function(e){e.buttons||i(e)};this.register(this.coreMouseService.onProtocolChange((function(t){t?("debug"===e.optionsService.rawOptions.logLevel&&e._logService.debug("Binding to mouse events:",e.coreMouseService.explainEvents(t)),e.element.classList.add("enable-mouse-events"),e._selectionService.disable()):(e._logService.debug("Unbinding from mouse events."),e.element.classList.remove("enable-mouse-events"),e._selectionService.enable()),8&t?n.mousemove||(r.addEventListener("mousemove",l),n.mousemove=l):(r.removeEventListener("mousemove",n.mousemove),n.mousemove=null),16&t?n.wheel||(r.addEventListener("wheel",s,{passive:!1}),n.wheel=s):(r.removeEventListener("wheel",n.wheel),n.wheel=null),2&t?n.mouseup||(n.mouseup=o):(e._document.removeEventListener("mouseup",n.mouseup),n.mouseup=null),4&t?n.mousedrag||(n.mousedrag=a):(e._document.removeEventListener("mousemove",n.mousedrag),n.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,d.addDisposableDomListener)(r,"mousedown",(function(t){if(t.preventDefault(),e.focus(),e.coreMouseService.areMouseEventsActive&&!e._selectionService.shouldForceSelection(t))return i(t),n.mouseup&&e._document.addEventListener("mouseup",n.mouseup),n.mousedrag&&e._document.addEventListener("mousemove",n.mousedrag),e.cancel(t)}))),this.register((0,d.addDisposableDomListener)(r,"wheel",(function(t){if(!n.wheel){if(!e.buffer.hasScrollback){var r=e.viewport.getLinesScrolled(t);if(0===r)return;for(var i=c.C0.ESC+(e.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(t.deltaY<0?"A":"B"),o="",s=0;s<Math.abs(r);s++)o+=i;return e.coreService.triggerDataEvent(o,!0),e.cancel(t,!0)}return e.viewport.onWheel(t)?e.cancel(t):void 0}}),{passive:!1})),this.register((0,d.addDisposableDomListener)(r,"touchstart",(function(t){if(!e.coreMouseService.areMouseEventsActive)return e.viewport.onTouchStart(t),e.cancel(t)}),{passive:!0})),this.register((0,d.addDisposableDomListener)(r,"touchmove",(function(t){if(!e.coreMouseService.areMouseEventsActive)return e.viewport.onTouchMove(t)?void 0:e.cancel(t)}),{passive:!1}))},t.prototype.refresh=function(e,t){var r;null===(r=this._renderService)||void 0===r||r.refreshRows(e,t)},t.prototype._queueLinkification=function(e,t){var r;null===(r=this.linkifier)||void 0===r||r.linkifyRows(e,t)},t.prototype.updateCursorStyle=function(e){var t;(null===(t=this._selectionService)||void 0===t?void 0:t.shouldColumnSelect(e))?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},t.prototype._showCursor=function(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},t.prototype.scrollLines=function(t,r,i){void 0===i&&(i=0),e.prototype.scrollLines.call(this,t,r,i),this.refresh(0,this.rows-1)},t.prototype.paste=function(e){(0,a.paste)(e,this.textarea,this.coreService)},t.prototype.attachCustomKeyEventHandler=function(e){this._customKeyEventHandler=e},t.prototype.registerLinkMatcher=function(e,t,r){var i=this.linkifier.registerLinkMatcher(e,t,r);return this.refresh(0,this.rows-1),i},t.prototype.deregisterLinkMatcher=function(e){this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},t.prototype.registerLinkProvider=function(e){return this.linkifier2.registerLinkProvider(e)},t.prototype.registerCharacterJoiner=function(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");var t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t},t.prototype.deregisterCharacterJoiner=function(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)},Object.defineProperty(t.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),t.prototype.addMarker=function(e){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)},t.prototype.registerDecoration=function(e){return this.decorationService.registerDecoration(e)},t.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},t.prototype.select=function(e,t,r){this._selectionService.setSelection(e,t,r)},t.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},t.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},t.prototype.clearSelection=function(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()},t.prototype.selectAll=function(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()},t.prototype.selectLines=function(e,t){var r;null===(r=this._selectionService)||void 0===r||r.selectLines(e,t)},t.prototype._keyDown=function(e){if(this._keyDownHandled=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(!this._compositionHelper.keydown(e))return this.buffer.ybase!==this.buffer.ydisp&&this._bufferService.scrollToBottom(),!1;"Dead"!==e.key&&"AltGraph"!==e.key||(this._unprocessedDeadKey=!0);var t=(0,S.evaluateKeyboardEvent)(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3===t.type||2===t.type){var r=this.rows-1;return this.scrollLines(2===t.type?-r:r),this.cancel(e,!0)}return 1===t.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(t.cancel&&this.cancel(e,!0),!t.key||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(t.key!==c.C0.ETX&&t.key!==c.C0.CR||(this.textarea.value=""),this._onKey.fire({key:t.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t.key,!0),this.optionsService.rawOptions.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(e,!0))))},t.prototype._isThirdLevelShift=function(e,t){var r=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return"keypress"===t.type?r:r&&(!t.keyCode||t.keyCode>47)},t.prototype._keyUp=function(e){this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(function(e){return 16===e.keyCode||17===e.keyCode||18===e.keyCode}(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)},t.prototype._keyPress=function(e){var t;if(this._keyPressHandled=!1,this._keyDownHandled)return!1;if(this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(null===e.which||void 0===e.which)t=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;t=e.which}return!(!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)||(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))},t.prototype._inputEvent=function(e){if(e.data&&"insertText"===e.inputType&&!e.composed&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;var t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1},t.prototype.bell=function(){var e;this._soundBell()&&(null===(e=this._soundService)||void 0===e||e.playBellSound()),this._onBell.fire()},t.prototype.resize=function(t,r){t!==this.cols||r!==this.rows?e.prototype.resize.call(this,t,r):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},t.prototype._afterResize=function(e,t){var r,i;null===(r=this._charSizeService)||void 0===r||r.measure(),null===(i=this.viewport)||void 0===i||i.syncScrollArea(!0)},t.prototype.clear=function(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.clearMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(b.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire({position:this.buffer.ydisp,source:0})}},t.prototype.reset=function(){var t,r;this.options.rows=this.rows,this.options.cols=this.cols;var i=this._customKeyEventHandler;this._setup(),e.prototype.reset.call(this),null===(t=this._selectionService)||void 0===t||t.reset(),this._customKeyEventHandler=i,this.refresh(0,this.rows-1),null===(r=this.viewport)||void 0===r||r.syncScrollArea()},t.prototype.clearTextureAtlas=function(){var e;null===(e=this._renderService)||void 0===e||e.clearTextureAtlas()},t.prototype._reportFocus=function(){var e;(null===(e=this.element)||void 0===e?void 0:e.classList.contains("focus"))?this.coreService.triggerDataEvent(c.C0.ESC+"[I"):this.coreService.triggerDataEvent(c.C0.ESC+"[O")},t.prototype._reportWindowsOptions=function(e){if(this._renderService)switch(e){case l.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var t=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),r=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this.coreService.triggerDataEvent(c.C0.ESC+"[4;"+r+";"+t+"t");break;case l.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var i=this._renderService.dimensions.scaledCellWidth.toFixed(0),n=this._renderService.dimensions.scaledCellHeight.toFixed(0);this.coreService.triggerDataEvent(c.C0.ESC+"[6;"+n+";"+i+"t")}},t.prototype.cancel=function(e,t){if(this.options.cancelEvents||t)return e.preventDefault(),e.stopPropagation(),!1},t.prototype._visualBell=function(){return!1},t.prototype._soundBell=function(){return"sound"===this.options.bellStyle},t}(R.CoreTerminal);t.Terminal=I},9924:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeBasedDebouncer=void 0;var r=function(){function e(e,t){void 0===t&&(t=1e3),this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}return e.prototype.dispose=function(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)},e.prototype.refresh=function(e,t,r){var i=this;this._rowCount=r,e=void 0!==e?e:0,t=void 0!==t?t:this._rowCount-1,this._rowStart=void 0!==this._rowStart?Math.min(this._rowStart,e):e,this._rowEnd=void 0!==this._rowEnd?Math.max(this._rowEnd,t):t;var n=Date.now();if(n-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=n,this._innerRefresh();else if(!this._additionalRefreshRequested){var o=n-this._lastRefreshMs,s=this._debounceThresholdMS-o;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((function(){i._lastRefreshMs=Date.now(),i._innerRefresh(),i._additionalRefreshRequested=!1,i._refreshTimeoutID=void 0}),s)}},e.prototype._innerRefresh=function(){if(void 0!==this._rowStart&&void 0!==this._rowEnd&&void 0!==this._rowCount){var e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},e}();t.TimeBasedDebouncer=r},1680:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Viewport=void 0;var a=r(844),c=r(3656),l=r(4725),h=r(2585),u=function(e){function t(t,r,i,n,o,s,a,l){var h=e.call(this)||this;return h._scrollLines=t,h._viewportElement=r,h._scrollArea=i,h._element=n,h._bufferService=o,h._optionsService=s,h._charSizeService=a,h._renderService=l,h.scrollBarWidth=0,h._currentRowHeight=0,h._currentScaledCellHeight=0,h._lastRecordedBufferLength=0,h._lastRecordedViewportHeight=0,h._lastRecordedBufferHeight=0,h._lastTouchY=0,h._lastScrollTop=0,h._lastHadScrollBar=!1,h._wheelPartialScroll=0,h._refreshAnimationFrame=null,h._ignoreNextScrollEvent=!1,h.scrollBarWidth=h._viewportElement.offsetWidth-h._scrollArea.offsetWidth||15,h._lastHadScrollBar=!0,h.register((0,c.addDisposableDomListener)(h._viewportElement,"scroll",h._onScroll.bind(h))),h._activeBuffer=h._bufferService.buffer,h.register(h._bufferService.buffers.onBufferActivate((function(e){return h._activeBuffer=e.activeBuffer}))),h._renderDimensions=h._renderService.dimensions,h.register(h._renderService.onDimensionsChange((function(e){return h._renderDimensions=e}))),setTimeout((function(){return h.syncScrollArea()}),0),h}return n(t,e),t.prototype.onThemeChange=function(e){this._viewportElement.style.backgroundColor=e.background.css},t.prototype._refresh=function(e){var t=this;if(e)return this._innerRefresh(),void(null!==this._refreshAnimationFrame&&cancelAnimationFrame(this._refreshAnimationFrame));null===this._refreshAnimationFrame&&(this._refreshAnimationFrame=requestAnimationFrame((function(){return t._innerRefresh()})))},t.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._currentScaledCellHeight=this._renderService.dimensions.scaledCellHeight,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var e=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==e&&(this._lastRecordedBufferHeight=e,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var t=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==t&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=t),0===this._optionsService.rawOptions.scrollback?this.scrollBarWidth=0:this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this._lastHadScrollBar=this.scrollBarWidth>0;var r=window.getComputedStyle(this._element),i=parseInt(r.paddingLeft)+parseInt(r.paddingRight);this._viewportElement.style.width=(this._renderService.dimensions.actualCellWidth*this._bufferService.cols+this.scrollBarWidth+(this._lastHadScrollBar?i:0)).toString()+"px",this._refreshAnimationFrame=null},t.prototype.syncScrollArea=function(e){if(void 0===e&&(e=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(e);this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.scaledCellHeight===this._currentScaledCellHeight?this._lastHadScrollBar!==this._optionsService.rawOptions.scrollback>0&&this._refresh(e):this._refresh(e)},t.prototype._onScroll=function(e){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent){if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._scrollLines(0);var t=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(t)}},t.prototype._bubbleScroll=function(e,t){var r=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(t<0&&0!==this._viewportElement.scrollTop||t>0&&r<this._lastRecordedBufferHeight)||(e.cancelable&&e.preventDefault(),!1)},t.prototype.onWheel=function(e){var t=this._getPixelsScrolled(e);return 0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},t.prototype._getPixelsScrolled=function(e){if(0===e.deltaY||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_LINE?t*=this._currentRowHeight:e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._currentRowHeight*this._bufferService.rows),t},t.prototype.getLinesScrolled=function(e){if(0===e.deltaY||e.shiftKey)return 0;var t=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(t/=this._currentRowHeight+0,this._wheelPartialScroll+=t,t=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(t*=this._bufferService.rows),t},t.prototype._applyScrollModifier=function(e,t){var r=this._optionsService.rawOptions.fastScrollModifier;return"alt"===r&&t.altKey||"ctrl"===r&&t.ctrlKey||"shift"===r&&t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity},t.prototype.onTouchStart=function(e){this._lastTouchY=e.touches[0].pageY},t.prototype.onTouchMove=function(e){var t=this._lastTouchY-e.touches[0].pageY;return this._lastTouchY=e.touches[0].pageY,0!==t&&(this._viewportElement.scrollTop+=t,this._bubbleScroll(e,t))},o([s(4,h.IBufferService),s(5,h.IOptionsService),s(6,l.ICharSizeService),s(7,l.IRenderService)],t)}(a.Disposable);t.Viewport=u},2950:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CompositionHelper=void 0;var o=r(4725),s=r(2585),a=function(){function e(e,t,r,i,n,o){this._textarea=e,this._compositionView=t,this._bufferService=r,this._optionsService=i,this._coreService=n,this._renderService=o,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}return Object.defineProperty(e.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),e.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")},e.prototype.compositionupdate=function(e){var t=this;this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout((function(){t._compositionPosition.end=t._textarea.value.length}),0)},e.prototype.compositionend=function(){this._finalizeComposition(!0)},e.prototype.keydown=function(e){if(this._isComposing||this._isSendingComposition){if(229===e.keyCode)return!1;if(16===e.keyCode||17===e.keyCode||18===e.keyCode)return!1;this._finalizeComposition(!1)}return 229!==e.keyCode||(this._handleAnyTextareaChanges(),!1)},e.prototype._finalizeComposition=function(e){var t=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){var r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((function(){if(t._isSendingComposition){t._isSendingComposition=!1;var e;r.start+=t._dataAlreadySent.length,(e=t._isComposing?t._textarea.value.substring(r.start,r.end):t._textarea.value.substring(r.start)).length>0&&t._coreService.triggerDataEvent(e,!0)}}),0)}else{this._isSendingComposition=!1;var i=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(i,!0)}},e.prototype._handleAnyTextareaChanges=function(){var e=this,t=this._textarea.value;setTimeout((function(){if(!e._isComposing){var r=e._textarea.value.replace(t,"");r.length>0&&(e._dataAlreadySent=r,e._coreService.triggerDataEvent(r,!0))}}),0)},e.prototype.updateCompositionElements=function(e){var t=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.actualCellHeight,n=this._bufferService.buffer.y*this._renderService.dimensions.actualCellHeight,o=r*this._renderService.dimensions.actualCellWidth;this._compositionView.style.left=o+"px",this._compositionView.style.top=n+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var s=this._compositionView.getBoundingClientRect();this._textarea.style.left=o+"px",this._textarea.style.top=n+"px",this._textarea.style.width=Math.max(s.width,1)+"px",this._textarea.style.height=Math.max(s.height,1)+"px",this._textarea.style.lineHeight=s.height+"px"}e||setTimeout((function(){return t.updateCompositionElements(!0)}),0)}},i([n(2,s.IBufferService),n(3,s.IOptionsService),n(4,s.ICoreService),n(5,o.IRenderService)],e)}();t.CompositionHelper=a},9806:(e,t)=>{function r(e,t){var r=t.getBoundingClientRect();return[e.clientX-r.left,e.clientY-r.top]}Object.defineProperty(t,"__esModule",{value:!0}),t.getRawByteCoords=t.getCoords=t.getCoordsRelativeToElement=void 0,t.getCoordsRelativeToElement=r,t.getCoords=function(e,t,i,n,o,s,a,c){if(o){var l=r(e,t);if(l)return l[0]=Math.ceil((l[0]+(c?s/2:0))/s),l[1]=Math.ceil(l[1]/a),l[0]=Math.min(Math.max(l[0],1),i+(c?1:0)),l[1]=Math.min(Math.max(l[1],1),n),l}},t.getRawByteCoords=function(e){if(e)return{x:e[0]+32,y:e[1]+32}}},9504:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.moveToCellSequence=void 0;var i=r(2584);function n(e,t,r,i){var n=e-o(r,e),a=t-o(r,t),h=Math.abs(n-a)-function(e,t,r){for(var i=0,n=e-o(r,e),a=t-o(r,t),c=0;c<Math.abs(n-a);c++){var l="A"===s(e,t)?-1:1,h=r.buffer.lines.get(n+l*c);(null==h?void 0:h.isWrapped)&&i++}return i}(e,t,r);return l(h,c(s(e,t),i))}function o(e,t){for(var r=0,i=e.buffer.lines.get(t),n=null==i?void 0:i.isWrapped;n&&t>=0&&t<e.rows;)r++,n=null==(i=e.buffer.lines.get(--t))?void 0:i.isWrapped;return r}function s(e,t){return e>t?"A":"B"}function a(e,t,r,i,n,o){for(var s=e,a=t,c="";s!==r||a!==i;)s+=n?1:-1,n&&s>o.cols-1?(c+=o.buffer.translateBufferLineToString(a,!1,e,s),s=0,e=0,a++):!n&&s<0&&(c+=o.buffer.translateBufferLineToString(a,!1,0,e+1),e=s=o.cols-1,a--);return c+o.buffer.translateBufferLineToString(a,!1,e,s)}function c(e,t){var r=t?"O":"[";return i.C0.ESC+r+e}function l(e,t){e=Math.floor(e);for(var r="",i=0;i<e;i++)r+=t;return r}t.moveToCellSequence=function(e,t,r,i){var s,h=r.buffer.x,u=r.buffer.y;if(!r.buffer.hasScrollback)return function(e,t,r,i,s,h){return 0===n(t,i,s,h).length?"":l(a(e,t,e,t-o(s,t),!1,s).length,c("D",h))}(h,u,0,t,r,i)+n(u,t,r,i)+function(e,t,r,i,s,h){var u;u=n(t,i,s,h).length>0?i-o(s,i):t;var f=i,_=function(e,t,r,i,s,a){var c;return c=n(r,i,s,a).length>0?i-o(s,i):t,e<r&&c<=i||e>=r&&c<i?"C":"D"}(e,t,r,i,s,h);return l(a(e,u,r,f,"C"===_,s).length,c(_,h))}(h,u,e,t,r,i);if(u===t)return s=h>e?"D":"C",l(Math.abs(h-e),c(s,i));s=u>t?"D":"C";var f=Math.abs(u-t);return l(function(e,t){return t.cols-e}(u>t?e:h,r)+(f-1)*r.cols+1+((u>t?h:e)-1),c(s,i))}},4389:function(e,t,r){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.Terminal=void 0;var n=r(3236),o=r(9042),s=r(7975),a=r(7090),c=r(5741),l=r(8285),h=["cols","rows"],u=function(){function e(e){var t=this;this._core=new n.Terminal(e),this._addonManager=new c.AddonManager,this._publicOptions=i({},this._core.options);var r=function(e){return t._core.options[e]},o=function(e,r){t._checkReadonlyOptions(e),t._core.options[e]=r};for(var s in this._core.options){var a={get:r.bind(this,s),set:o.bind(this,s)};Object.defineProperty(this._publicOptions,s,a)}}return e.prototype._checkReadonlyOptions=function(e){if(h.includes(e))throw new Error('Option "'+e+'" can only be set in the constructor')},e.prototype._checkProposedApi=function(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(e.prototype,"onBell",{get:function(){return this._core.onBell},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new s.ParserApi(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"unicode",{get:function(){return this._checkProposedApi(),new a.UnicodeApi(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"buffer",{get:function(){return this._checkProposedApi(),this._buffer||(this._buffer=new l.BufferNamespaceApi(this._core)),this._buffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modes",{get:function(){var e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,wraparoundMode:e.wraparound}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this._publicOptions},set:function(e){for(var t in e)this._publicOptions[t]=e[t]},enumerable:!1,configurable:!0}),e.prototype.blur=function(){this._core.blur()},e.prototype.focus=function(){this._core.focus()},e.prototype.resize=function(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)},e.prototype.open=function(e){this._core.open(e)},e.prototype.attachCustomKeyEventHandler=function(e){this._core.attachCustomKeyEventHandler(e)},e.prototype.registerLinkMatcher=function(e,t,r){return this._checkProposedApi(),this._core.registerLinkMatcher(e,t,r)},e.prototype.deregisterLinkMatcher=function(e){this._checkProposedApi(),this._core.deregisterLinkMatcher(e)},e.prototype.registerLinkProvider=function(e){return this._checkProposedApi(),this._core.registerLinkProvider(e)},e.prototype.registerCharacterJoiner=function(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)},e.prototype.deregisterCharacterJoiner=function(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)},e.prototype.registerMarker=function(e){return void 0===e&&(e=0),this._checkProposedApi(),this._verifyIntegers(e),this._core.addMarker(e)},e.prototype.registerDecoration=function(e){var t,r,i;return this._checkProposedApi(),this._verifyPositiveIntegers(null!==(t=e.x)&&void 0!==t?t:0,null!==(r=e.width)&&void 0!==r?r:0,null!==(i=e.height)&&void 0!==i?i:0),this._core.registerDecoration(e)},e.prototype.addMarker=function(e){return this.registerMarker(e)},e.prototype.hasSelection=function(){return this._core.hasSelection()},e.prototype.select=function(e,t,r){this._verifyIntegers(e,t,r),this._core.select(e,t,r)},e.prototype.getSelection=function(){return this._core.getSelection()},e.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},e.prototype.clearSelection=function(){this._core.clearSelection()},e.prototype.selectAll=function(){this._core.selectAll()},e.prototype.selectLines=function(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)},e.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},e.prototype.scrollLines=function(e){this._verifyIntegers(e),this._core.scrollLines(e)},e.prototype.scrollPages=function(e){this._verifyIntegers(e),this._core.scrollPages(e)},e.prototype.scrollToTop=function(){this._core.scrollToTop()},e.prototype.scrollToBottom=function(){this._core.scrollToBottom()},e.prototype.scrollToLine=function(e){this._verifyIntegers(e),this._core.scrollToLine(e)},e.prototype.clear=function(){this._core.clear()},e.prototype.write=function(e,t){this._core.write(e,t)},e.prototype.writeUtf8=function(e,t){this._core.write(e,t)},e.prototype.writeln=function(e,t){this._core.write(e),this._core.write("\r\n",t)},e.prototype.paste=function(e){this._core.paste(e)},e.prototype.getOption=function(e){return this._core.optionsService.getOption(e)},e.prototype.setOption=function(e,t){this._checkReadonlyOptions(e),this._core.optionsService.setOption(e,t)},e.prototype.refresh=function(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)},e.prototype.reset=function(){this._core.reset()},e.prototype.clearTextureAtlas=function(){this._core.clearTextureAtlas()},e.prototype.loadAddon=function(e){return this._addonManager.loadAddon(this,e)},Object.defineProperty(e,"strings",{get:function(){return o},enumerable:!1,configurable:!0}),e.prototype._verifyIntegers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,i=e;r<i.length;r++){var n=i[r];if(n===1/0||isNaN(n)||n%1!=0)throw new Error("This API only accepts integers")}},e.prototype._verifyPositiveIntegers=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r=0,i=e;r<i.length;r++){var n=i[r];if(n&&(n===1/0||isNaN(n)||n%1!=0||n<0))throw new Error("This API only accepts positive integers")}},e}();t.Terminal=u},1546:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseRenderLayer=void 0;var i=r(643),n=r(8803),o=r(1420),s=r(3734),a=r(1752),c=r(4774),l=r(9631),h=r(8978),u=function(){function e(e,t,r,i,n,o,s,a){this._container=e,this._alpha=i,this._colors=n,this._rendererId=o,this._bufferService=s,this._optionsService=a,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=r.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return e.prototype.dispose=function(){var e;(0,l.removeElementFromParent)(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()},e.prototype._initCanvas=function(){this._ctx=(0,a.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},e.prototype.onOptionsChanged=function(){},e.prototype.onBlur=function(){},e.prototype.onFocus=function(){},e.prototype.onCursorMove=function(){},e.prototype.onGridChanged=function(e,t){},e.prototype.onSelectionChanged=function(e,t,r){void 0===r&&(r=!1)},e.prototype.setColors=function(e){this._refreshCharAtlas(e)},e.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},e.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=(0,o.acquireCharAtlas)(this._optionsService.rawOptions,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},e.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},e.prototype.clearTextureAtlas=function(){var e;null===(e=this._charAtlas)||void 0===e||e.clear()},e.prototype._fillCells=function(e,t,r,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight)},e.prototype._fillMiddleLineAtCells=function(e,t,r){void 0===r&&(r=1);var i=Math.ceil(.5*this._scaledCellHeight);this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-i-window.devicePixelRatio,r*this._scaledCellWidth,window.devicePixelRatio)},e.prototype._fillBottomLineAtCells=function(e,t,r){void 0===r&&(r=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,r*this._scaledCellWidth,window.devicePixelRatio)},e.prototype._fillLeftLineAtCell=function(e,t,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*r,this._scaledCellHeight)},e.prototype._strokeRectAtCell=function(e,t,r,i){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,r*this._scaledCellWidth-window.devicePixelRatio,i*this._scaledCellHeight-window.devicePixelRatio)},e.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},e.prototype._clearCells=function(e,t,r,i){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,r*this._scaledCellWidth,i*this._scaledCellHeight))},e.prototype._fillCharTrueColor=function(e,t,r){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline=n.TEXT_BASELINE,this._clipRow(r);var i=!1;!1!==this._optionsService.rawOptions.customGlyphs&&(i=(0,h.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,r*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),i||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight)},e.prototype._drawChars=function(e,t,r){var o,s,a,c=this._getContrastColor(e);c||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,t,r,c):(e.isInverse()?(s=e.isBgDefault()?n.INVERTED_DEFAULT_COLOR:e.getBgColor(),a=e.isFgDefault()?n.INVERTED_DEFAULT_COLOR:e.getFgColor()):(a=e.isBgDefault()?i.DEFAULT_COLOR:e.getBgColor(),s=e.isFgDefault()?i.DEFAULT_COLOR:e.getFgColor()),s+=this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&s<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||i.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||i.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=a,this._currentGlyphIdentifier.fg=s,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),(null===(o=this._charAtlas)||void 0===o?void 0:o.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop))||this._drawUncachedChars(e,t,r))},e.prototype._drawUncachedChars=function(e,t,r,i){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline=n.TEXT_BASELINE,e.isInverse())if(i)this._ctx.fillStyle=i.css;else if(e.isBgDefault())this._ctx.fillStyle=c.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+s.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var o=e.getBgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&o<8&&(o+=8),this._ctx.fillStyle=this._colors.ansi[o].css}else if(i)this._ctx.fillStyle=i.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+s.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var a=e.getFgColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&a<8&&(a+=8),this._ctx.fillStyle=this._colors.ansi[a].css}this._clipRow(r),e.isDim()&&(this._ctx.globalAlpha=n.DIM_OPACITY);var l=!1;!1!==this._optionsService.rawOptions.customGlyphs&&(l=(0,h.tryDrawCustomChar)(this._ctx,e.getChars(),t*this._scaledCellWidth,r*this._scaledCellHeight,this._scaledCellWidth,this._scaledCellHeight)),l||this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,r*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight),this._ctx.restore()},e.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},e.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.rawOptions.fontWeightBold:this._optionsService.rawOptions.fontWeight)+" "+this._optionsService.rawOptions.fontSize*window.devicePixelRatio+"px "+this._optionsService.rawOptions.fontFamily},e.prototype._getContrastColor=function(e){if(1!==this._optionsService.rawOptions.minimumContrastRatio){var t=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==t)return t||void 0;var r=e.getFgColor(),i=e.getFgColorMode(),n=e.getBgColor(),o=e.getBgColorMode(),s=!!e.isInverse(),a=!!e.isInverse();if(s){var l=r;r=n,n=l;var h=i;i=o,o=h}var u=this._resolveBackgroundRgba(o,n,s),f=this._resolveForegroundRgba(i,r,s,a),_=c.rgba.ensureContrastRatio(u,f,this._optionsService.rawOptions.minimumContrastRatio);if(_){var d={css:c.channels.toCss(_>>24&255,_>>16&255,_>>8&255),rgba:_};return this._colors.contrastCache.setColor(e.bg,e.fg,d),d}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},e.prototype._resolveBackgroundRgba=function(e,t,r){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return r?this._colors.foreground.rgba:this._colors.background.rgba}},e.prototype._resolveForegroundRgba=function(e,t,r,i){switch(e){case 16777216:case 33554432:return this._optionsService.rawOptions.drawBoldTextInBrightColors&&i&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;default:return r?this._colors.background.rgba:this._colors.foreground.rgba}},e}();t.BaseRenderLayer=u},2512:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CursorRenderLayer=void 0;var a=r(1546),c=r(511),l=r(2585),h=r(4725),u=600,f=function(e){function t(t,r,i,n,o,s,a,l,h){var u=e.call(this,t,"cursor",r,!0,i,n,s,a)||this;return u._onRequestRedraw=o,u._coreService=l,u._coreBrowserService=h,u._cell=new c.CellData,u._state={x:0,y:0,isFocused:!1,style:"",width:0},u._cursorRenderers={bar:u._renderBarCursor.bind(u),block:u._renderBlockCursor.bind(u),underline:u._renderUnderlineCursor.bind(u)},u}return n(t,e),t.prototype.dispose=function(){this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0),e.prototype.dispose.call(this)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},t.prototype.reset=function(){var e;this._clearCursor(),null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation(),this.onOptionsChanged()},t.prototype.onBlur=function(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onFocus=function(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.resume(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onOptionsChanged=function(){var e,t=this;this._optionsService.rawOptions.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new _(this._coreBrowserService.isFocused,(function(){t._render(!0)}))):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},t.prototype.onCursorMove=function(){var e;null===(e=this._cursorBlinkStateManager)||void 0===e||e.restartBlinkAnimation()},t.prototype.onGridChanged=function(e,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},t.prototype._render=function(e){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,r=t-this._bufferService.buffer.ydisp;if(r<0||r>=this._bufferService.rows)this._clearCursor();else{var i=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(t).loadCell(i,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var n=this._optionsService.rawOptions.cursorStyle;return n&&"block"!==n?this._cursorRenderers[n](i,r,this._cell):this._renderBlurCursor(i,r,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=r,this._state.isFocused=!1,this._state.style=n,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===i&&this._state.y===r&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.rawOptions.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.rawOptions.cursorStyle||"block"](i,r,this._cell),this._ctx.restore(),this._state.x=i,this._state.y=r,this._state.isFocused=!1,this._state.style=this._optionsService.rawOptions.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},t.prototype._clearCursor=function(){this._state&&(window.devicePixelRatio<1?this._clearAll():this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},t.prototype._renderBarCursor=function(e,t,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,t,this._optionsService.rawOptions.cursorWidth),this._ctx.restore()},t.prototype._renderBlockCursor=function(e,t,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,t,r.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(r,e,t),this._ctx.restore()},t.prototype._renderUnderlineCursor=function(e,t,r){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,t),this._ctx.restore()},t.prototype._renderBlurCursor=function(e,t,r){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,t,r.getWidth(),1),this._ctx.restore()},o([s(5,l.IBufferService),s(6,l.IOptionsService),s(7,l.ICoreService),s(8,h.ICoreBrowserService)],t)}(a.BaseRenderLayer);t.CursorRenderLayer=f;var _=function(){function e(e,t){this._renderCallback=t,this.isCursorVisible=!0,e&&this._restartInterval()}return Object.defineProperty(e.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.restartBlinkAnimation=function(){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame((function(){e._renderCallback(),e._animationFrame=void 0}))))},e.prototype._restartInterval=function(e){var t=this;void 0===e&&(e=u),this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=window.setTimeout((function(){if(t._animationTimeRestarted){var e=u-(Date.now()-t._animationTimeRestarted);if(t._animationTimeRestarted=void 0,e>0)return void t._restartInterval(e)}t.isCursorVisible=!1,t._animationFrame=window.requestAnimationFrame((function(){t._renderCallback(),t._animationFrame=void 0})),t._blinkInterval=window.setInterval((function(){if(t._animationTimeRestarted){var e=u-(Date.now()-t._animationTimeRestarted);return t._animationTimeRestarted=void 0,void t._restartInterval(e)}t.isCursorVisible=!t.isCursorVisible,t._animationFrame=window.requestAnimationFrame((function(){t._renderCallback(),t._animationFrame=void 0}))}),u)}),e)},e.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},e.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},e}()},8978:(e,t,r)=>{var i,n,o,s,a,c,l,h,u,f,_,d,p,v,g,y,m,S,C,b,w,L,E,x,k,M,A,R,O,T,D,B,P,I,H,F,j,W,U,q,N,z,K,G,V,X,Y,Z,J,$,Q,ee,te,re,ie,ne,oe,se,ae,ce,le,he,ue,fe,_e,de,pe,ve,ge,ye,me,Se,Ce,be,we,Le,Ee,xe,ke,Me,Ae,Re,Oe,Te,De,Be,Pe,Ie,He,Fe,je,We,Ue,qe,Ne,ze,Ke,Ge,Ve,Xe,Ye,Ze,Je,$e,Qe,et,tt,rt,it,nt,ot,st,at,ct,lt,ht,ut,ft,_t,dt,pt,vt,gt,yt,mt,St,Ct,bt;Object.defineProperty(t,"__esModule",{value:!0}),t.tryDrawCustomChar=t.boxDrawingDefinitions=t.blockElementDefinitions=void 0;var wt=r(1752);t.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:9,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:0,y:0,w:4,h:8}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};var Lt={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};t.boxDrawingDefinitions={"─":(i={},i[1]="M0,.5 L1,.5",i),"━":(n={},n[3]="M0,.5 L1,.5",n),"│":(o={},o[1]="M.5,0 L.5,1",o),"┃":(s={},s[3]="M.5,0 L.5,1",s),"┌":(a={},a[1]="M0.5,1 L.5,.5 L1,.5",a),"┏":(c={},c[3]="M0.5,1 L.5,.5 L1,.5",c),"┐":(l={},l[1]="M0,.5 L.5,.5 L.5,1",l),"┓":(h={},h[3]="M0,.5 L.5,.5 L.5,1",h),"└":(u={},u[1]="M.5,0 L.5,.5 L1,.5",u),"┗":(f={},f[3]="M.5,0 L.5,.5 L1,.5",f),"┘":(_={},_[1]="M.5,0 L.5,.5 L0,.5",_),"┛":(d={},d[3]="M.5,0 L.5,.5 L0,.5",d),"├":(p={},p[1]="M.5,0 L.5,1 M.5,.5 L1,.5",p),"┣":(v={},v[3]="M.5,0 L.5,1 M.5,.5 L1,.5",v),"┤":(g={},g[1]="M.5,0 L.5,1 M.5,.5 L0,.5",g),"┫":(y={},y[3]="M.5,0 L.5,1 M.5,.5 L0,.5",y),"┬":(m={},m[1]="M0,.5 L1,.5 M.5,.5 L.5,1",m),"┳":(S={},S[3]="M0,.5 L1,.5 M.5,.5 L.5,1",S),"┴":(C={},C[1]="M0,.5 L1,.5 M.5,.5 L.5,0",C),"┻":(b={},b[3]="M0,.5 L1,.5 M.5,.5 L.5,0",b),"┼":(w={},w[1]="M0,.5 L1,.5 M.5,0 L.5,1",w),"╋":(L={},L[3]="M0,.5 L1,.5 M.5,0 L.5,1",L),"╴":(E={},E[1]="M.5,.5 L0,.5",E),"╸":(x={},x[3]="M.5,.5 L0,.5",x),"╵":(k={},k[1]="M.5,.5 L.5,0",k),"╹":(M={},M[3]="M.5,.5 L.5,0",M),"╶":(A={},A[1]="M.5,.5 L1,.5",A),"╺":(R={},R[3]="M.5,.5 L1,.5",R),"╷":(O={},O[1]="M.5,.5 L.5,1",O),"╻":(T={},T[3]="M.5,.5 L.5,1",T),"═":(D={},D[1]=function(e,t){return"M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L1,"+(.5+t)},D),"║":(B={},B[1]=function(e,t){return"M"+(.5-e)+",0 L"+(.5-e)+",1 M"+(.5+e)+",0 L"+(.5+e)+",1"},B),"╒":(P={},P[1]=function(e,t){return"M.5,1 L.5,"+(.5-t)+" L1,"+(.5-t)+" M.5,"+(.5+t)+" L1,"+(.5+t)},P),"╓":(I={},I[1]=function(e,t){return"M"+(.5-e)+",1 L"+(.5-e)+",.5 L1,.5 M"+(.5+e)+",.5 L"+(.5+e)+",1"},I),"╔":(H={},H[1]=function(e,t){return"M1,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",1 M1,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",1"},H),"╕":(F={},F[1]=function(e,t){return"M0,"+(.5-t)+" L.5,"+(.5-t)+" L.5,1 M0,"+(.5+t)+" L.5,"+(.5+t)},F),"╖":(j={},j[1]=function(e,t){return"M"+(.5+e)+",1 L"+(.5+e)+",.5 L0,.5 M"+(.5-e)+",.5 L"+(.5-e)+",1"},j),"╗":(W={},W[1]=function(e,t){return"M0,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",1 M0,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",1"},W),"╘":(U={},U[1]=function(e,t){return"M.5,0 L.5,"+(.5+t)+" L1,"+(.5+t)+" M.5,"+(.5-t)+" L1,"+(.5-t)},U),"╙":(q={},q[1]=function(e,t){return"M1,.5 L"+(.5-e)+",.5 L"+(.5-e)+",0 M"+(.5+e)+",.5 L"+(.5+e)+",0"},q),"╚":(N={},N[1]=function(e,t){return"M1,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",0 M1,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",0"},N),"╛":(z={},z[1]=function(e,t){return"M0,"+(.5+t)+" L.5,"+(.5+t)+" L.5,0 M0,"+(.5-t)+" L.5,"+(.5-t)},z),"╜":(K={},K[1]=function(e,t){return"M0,.5 L"+(.5+e)+",.5 L"+(.5+e)+",0 M"+(.5-e)+",.5 L"+(.5-e)+",0"},K),"╝":(G={},G[1]=function(e,t){return"M0,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",0 M0,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",0"},G),"╞":(V={},V[1]=function(e,t){return"M.5,0 L.5,1 M.5,"+(.5-t)+" L1,"+(.5-t)+" M.5,"+(.5+t)+" L1,"+(.5+t)},V),"╟":(X={},X[1]=function(e,t){return"M"+(.5-e)+",0 L"+(.5-e)+",1 M"+(.5+e)+",0 L"+(.5+e)+",1 M"+(.5+e)+",.5 L1,.5"},X),"╠":(Y={},Y[1]=function(e,t){return"M"+(.5-e)+",0 L"+(.5-e)+",1 M1,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",1 M1,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",0"},Y),"╡":(Z={},Z[1]=function(e,t){return"M.5,0 L.5,1 M0,"+(.5-t)+" L.5,"+(.5-t)+" M0,"+(.5+t)+" L.5,"+(.5+t)},Z),"╢":(J={},J[1]=function(e,t){return"M0,.5 L"+(.5-e)+",.5 M"+(.5-e)+",0 L"+(.5-e)+",1 M"+(.5+e)+",0 L"+(.5+e)+",1"},J),"╣":($={},$[1]=function(e,t){return"M"+(.5+e)+",0 L"+(.5+e)+",1 M0,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",1 M0,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",0"},$),"╤":(Q={},Q[1]=function(e,t){return"M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L1,"+(.5+t)+" M.5,"+(.5+t)+" L.5,1"},Q),"╥":(ee={},ee[1]=function(e,t){return"M0,.5 L1,.5 M"+(.5-e)+",.5 L"+(.5-e)+",1 M"+(.5+e)+",.5 L"+(.5+e)+",1"},ee),"╦":(te={},te[1]=function(e,t){return"M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",1 M1,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",1"},te),"╧":(re={},re[1]=function(e,t){return"M.5,0 L.5,"+(.5-t)+" M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L1,"+(.5+t)},re),"╨":(ie={},ie[1]=function(e,t){return"M0,.5 L1,.5 M"+(.5-e)+",.5 L"+(.5-e)+",0 M"+(.5+e)+",.5 L"+(.5+e)+",0"},ie),"╩":(ne={},ne[1]=function(e,t){return"M0,"+(.5+t)+" L1,"+(.5+t)+" M0,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",0 M1,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",0"},ne),"╪":(oe={},oe[1]=function(e,t){return"M.5,0 L.5,1 M0,"+(.5-t)+" L1,"+(.5-t)+" M0,"+(.5+t)+" L1,"+(.5+t)},oe),"╫":(se={},se[1]=function(e,t){return"M0,.5 L1,.5 M"+(.5-e)+",0 L"+(.5-e)+",1 M"+(.5+e)+",0 L"+(.5+e)+",1"},se),"╬":(ae={},ae[1]=function(e,t){return"M0,"+(.5+t)+" L"+(.5-e)+","+(.5+t)+" L"+(.5-e)+",1 M1,"+(.5+t)+" L"+(.5+e)+","+(.5+t)+" L"+(.5+e)+",1 M0,"+(.5-t)+" L"+(.5-e)+","+(.5-t)+" L"+(.5-e)+",0 M1,"+(.5-t)+" L"+(.5+e)+","+(.5-t)+" L"+(.5+e)+",0"},ae),"╱":(ce={},ce[1]="M1,0 L0,1",ce),"╲":(le={},le[1]="M0,0 L1,1",le),"╳":(he={},he[1]="M1,0 L0,1 M0,0 L1,1",he),"╼":(ue={},ue[1]="M.5,.5 L0,.5",ue[3]="M.5,.5 L1,.5",ue),"╽":(fe={},fe[1]="M.5,.5 L.5,0",fe[3]="M.5,.5 L.5,1",fe),"╾":(_e={},_e[1]="M.5,.5 L1,.5",_e[3]="M.5,.5 L0,.5",_e),"╿":(de={},de[1]="M.5,.5 L.5,1",de[3]="M.5,.5 L.5,0",de),"┍":(pe={},pe[1]="M.5,.5 L.5,1",pe[3]="M.5,.5 L1,.5",pe),"┎":(ve={},ve[1]="M.5,.5 L1,.5",ve[3]="M.5,.5 L.5,1",ve),"┑":(ge={},ge[1]="M.5,.5 L.5,1",ge[3]="M.5,.5 L0,.5",ge),"┒":(ye={},ye[1]="M.5,.5 L0,.5",ye[3]="M.5,.5 L.5,1",ye),"┕":(me={},me[1]="M.5,.5 L.5,0",me[3]="M.5,.5 L1,.5",me),"┖":(Se={},Se[1]="M.5,.5 L1,.5",Se[3]="M.5,.5 L.5,0",Se),"┙":(Ce={},Ce[1]="M.5,.5 L.5,0",Ce[3]="M.5,.5 L0,.5",Ce),"┚":(be={},be[1]="M.5,.5 L0,.5",be[3]="M.5,.5 L.5,0",be),"┝":(we={},we[1]="M.5,0 L.5,1",we[3]="M.5,.5 L1,.5",we),"┞":(Le={},Le[1]="M0.5,1 L.5,.5 L1,.5",Le[3]="M.5,.5 L.5,0",Le),"┟":(Ee={},Ee[1]="M.5,0 L.5,.5 L1,.5",Ee[3]="M.5,.5 L.5,1",Ee),"┠":(xe={},xe[1]="M.5,.5 L1,.5",xe[3]="M.5,0 L.5,1",xe),"┡":(ke={},ke[1]="M.5,.5 L.5,1",ke[3]="M.5,0 L.5,.5 L1,.5",ke),"┢":(Me={},Me[1]="M.5,.5 L.5,0",Me[3]="M0.5,1 L.5,.5 L1,.5",Me),"┥":(Ae={},Ae[1]="M.5,0 L.5,1",Ae[3]="M.5,.5 L0,.5",Ae),"┦":(Re={},Re[1]="M0,.5 L.5,.5 L.5,1",Re[3]="M.5,.5 L.5,0",Re),"┧":(Oe={},Oe[1]="M.5,0 L.5,.5 L0,.5",Oe[3]="M.5,.5 L.5,1",Oe),"┨":(Te={},Te[1]="M.5,.5 L0,.5",Te[3]="M.5,0 L.5,1",Te),"┩":(De={},De[1]="M.5,.5 L.5,1",De[3]="M.5,0 L.5,.5 L0,.5",De),"┪":(Be={},Be[1]="M.5,.5 L.5,0",Be[3]="M0,.5 L.5,.5 L.5,1",Be),"┭":(Pe={},Pe[1]="M0.5,1 L.5,.5 L1,.5",Pe[3]="M.5,.5 L0,.5",Pe),"┮":(Ie={},Ie[1]="M0,.5 L.5,.5 L.5,1",Ie[3]="M.5,.5 L1,.5",Ie),"┯":(He={},He[1]="M.5,.5 L.5,1",He[3]="M0,.5 L1,.5",He),"┰":(Fe={},Fe[1]="M0,.5 L1,.5",Fe[3]="M.5,.5 L.5,1",Fe),"┱":(je={},je[1]="M.5,.5 L1,.5",je[3]="M0,.5 L.5,.5 L.5,1",je),"┲":(We={},We[1]="M.5,.5 L0,.5",We[3]="M0.5,1 L.5,.5 L1,.5",We),"┵":(Ue={},Ue[1]="M.5,0 L.5,.5 L1,.5",Ue[3]="M.5,.5 L0,.5",Ue),"┶":(qe={},qe[1]="M.5,0 L.5,.5 L0,.5",qe[3]="M.5,.5 L1,.5",qe),"┷":(Ne={},Ne[1]="M.5,.5 L.5,0",Ne[3]="M0,.5 L1,.5",Ne),"┸":(ze={},ze[1]="M0,.5 L1,.5",ze[3]="M.5,.5 L.5,0",ze),"┹":(Ke={},Ke[1]="M.5,.5 L1,.5",Ke[3]="M.5,0 L.5,.5 L0,.5",Ke),"┺":(Ge={},Ge[1]="M.5,.5 L0,.5",Ge[3]="M.5,0 L.5,.5 L1,.5",Ge),"┽":(Ve={},Ve[1]="M.5,0 L.5,1 M.5,.5 L1,.5",Ve[3]="M.5,.5 L0,.5",Ve),"┾":(Xe={},Xe[1]="M.5,0 L.5,1 M.5,.5 L0,.5",Xe[3]="M.5,.5 L1,.5",Xe),"┿":(Ye={},Ye[1]="M.5,0 L.5,1",Ye[3]="M0,.5 L1,.5",Ye),"╀":(Ze={},Ze[1]="M0,.5 L1,.5 M.5,.5 L.5,1",Ze[3]="M.5,.5 L.5,0",Ze),"╁":(Je={},Je[1]="M.5,.5 L.5,0 M0,.5 L1,.5",Je[3]="M.5,.5 L.5,1",Je),"╂":($e={},$e[1]="M0,.5 L1,.5",$e[3]="M.5,0 L.5,1",$e),"╃":(Qe={},Qe[1]="M0.5,1 L.5,.5 L1,.5",Qe[3]="M.5,0 L.5,.5 L0,.5",Qe),"╄":(et={},et[1]="M0,.5 L.5,.5 L.5,1",et[3]="M.5,0 L.5,.5 L1,.5",et),"╅":(tt={},tt[1]="M.5,0 L.5,.5 L1,.5",tt[3]="M0,.5 L.5,.5 L.5,1",tt),"╆":(rt={},rt[1]="M.5,0 L.5,.5 L0,.5",rt[3]="M0.5,1 L.5,.5 L1,.5",rt),"╇":(it={},it[1]="M.5,.5 L.5,1",it[3]="M.5,.5 L.5,0 M0,.5 L1,.5",it),"╈":(nt={},nt[1]="M.5,.5 L.5,0",nt[3]="M0,.5 L1,.5 M.5,.5 L.5,1",nt),"╉":(ot={},ot[1]="M.5,.5 L1,.5",ot[3]="M.5,0 L.5,1 M.5,.5 L0,.5",ot),"╊":(st={},st[1]="M.5,.5 L0,.5",st[3]="M.5,0 L.5,1 M.5,.5 L1,.5",st),"╌":(at={},at[1]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",at),"╍":(ct={},ct[3]="M.1,.5 L.4,.5 M.6,.5 L.9,.5",ct),"┄":(lt={},lt[1]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",lt),"┅":(ht={},ht[3]="M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5",ht),"┈":(ut={},ut[1]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",ut),"┉":(ft={},ft[3]="M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5",ft),"╎":(_t={},_t[1]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",_t),"╏":(dt={},dt[3]="M.5,.1 L.5,.4 M.5,.6 L.5,.9",dt),"┆":(pt={},pt[1]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",pt),"┇":(vt={},vt[3]="M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333",vt),"┊":(gt={},gt[1]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",gt),"┋":(yt={},yt[3]="M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95",yt),"╭":(mt={},mt[1]="C.5,1,.5,.5,1,.5",mt),"╮":(St={},St[1]="C.5,1,.5,.5,0,.5",St),"╯":(Ct={},Ct[1]="C.5,0,.5,.5,0,.5",Ct),"╰":(bt={},bt[1]="C.5,0,.5,.5,1,.5",bt)},t.tryDrawCustomChar=function(e,r,i,n,o,s){var a=t.blockElementDefinitions[r];if(a)return function(e,t,r,i,n,o){for(var s=0;s<t.length;s++){var a=t[s],c=n/8,l=o/8;e.fillRect(r+a.x*c,i+a.y*l,a.w*c,a.h*l)}}(e,a,i,n,o,s),!0;var c=Lt[r];if(c)return function(e,t,r,i,n,o){var s,a=Et.get(t);a||(a=new Map,Et.set(t,a));var c=e.fillStyle;if("string"!=typeof c)throw new Error('Unexpected fillStyle type "'+c+'"');var l=a.get(c);if(!l){var h=t[0].length,u=t.length,f=document.createElement("canvas");f.width=h,f.height=u;var _=(0,wt.throwIfFalsy)(f.getContext("2d")),d=new ImageData(h,u),p=void 0,v=void 0,g=void 0,y=void 0;if(c.startsWith("#"))p=parseInt(c.substr(1,2),16),v=parseInt(c.substr(3,2),16),g=parseInt(c.substr(5,2),16),y=c.length>7&&parseInt(c.substr(7,2),16)||1;else{if(!c.startsWith("rgba"))throw new Error('Unexpected fillStyle color format "'+c+'" when drawing pattern glyph');p=(s=c.substring(5,c.length-1).split(",").map((function(e){return parseFloat(e)})))[0],v=s[1],g=s[2],y=s[3]}for(var m=0;m<u;m++)for(var S=0;S<h;S++)d.data[4*(m*h+S)]=p,d.data[4*(m*h+S)+1]=v,d.data[4*(m*h+S)+2]=g,d.data[4*(m*h+S)+3]=t[m][S]*(255*y);_.putImageData(d,0,0),l=(0,wt.throwIfFalsy)(e.createPattern(f,null)),a.set(c,l)}e.fillStyle=l,e.fillRect(r,i,n,o)}(e,c,i,n,o,s),!0;var l=t.boxDrawingDefinitions[r];return!!l&&(function(e,t,r,i,n,o){e.strokeStyle=e.fillStyle;for(var s=0,a=Object.entries(t);s<a.length;s++){var c=a[s],l=c[0],h=c[1];e.beginPath(),e.lineWidth=window.devicePixelRatio*Number.parseInt(l);for(var u=0,f=("function"==typeof h?h(.15,.15/o*n):h).split(" ");u<f.length;u++){var _=f[u],d=_[0],p=kt[d];if(p){var v=_.substring(1).split(",");v[0]&&v[1]&&p(e,Mt(v,n,o,r,i))}else console.error('Could not find drawing instructions for "'+d+'"')}e.stroke(),e.closePath()}}(e,l,i,n,o,s),!0)};var Et=new Map;function xt(e,t,r){return void 0===r&&(r=0),Math.max(Math.min(e,t),r)}var kt={C:function(e,t){return e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5])},L:function(e,t){return e.lineTo(t[0],t[1])},M:function(e,t){return e.moveTo(t[0],t[1])}};function Mt(e,t,r,i,n){var o=e.map((function(e){return parseFloat(e)||parseInt(e)}));if(o.length<2)throw new Error("Too few arguments for instruction");for(var s=0;s<o.length;s+=2)o[s]*=t,0!==o[s]&&(o[s]=xt(Math.round(o[s]+.5)-.5,t,0)),o[s]+=i;for(var a=1;a<o.length;a+=2)o[a]*=r,0!==o[a]&&(o[a]=xt(Math.round(o[a]+.5)-.5,r,0)),o[a]+=n;return o}},3700:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridCache=void 0;var r=function(){function e(){this.cache=[]}return e.prototype.resize=function(e,t){for(var r=0;r<e;r++){this.cache.length<=r&&this.cache.push([]);for(var i=this.cache[r].length;i<t;i++)this.cache[r].push(void 0);this.cache[r].length=t}this.cache.length=e},e.prototype.clear=function(){for(var e=0;e<this.cache.length;e++)for(var t=0;t<this.cache[e].length;t++)this.cache[e][t]=void 0},e}();t.GridCache=r},5098:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkRenderLayer=void 0;var a=r(1546),c=r(8803),l=r(2040),h=r(2585),u=function(e){function t(t,r,i,n,o,s,a,c){var l=e.call(this,t,"link",r,!0,i,n,a,c)||this;return o.onShowLinkUnderline((function(e){return l._onShowLinkUnderline(e)})),o.onHideLinkUnderline((function(e){return l._onHideLinkUnderline(e)})),s.onShowLinkUnderline((function(e){return l._onShowLinkUnderline(e)})),s.onHideLinkUnderline((function(e){return l._onHideLinkUnderline(e)})),l}return n(t,e),t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._state=void 0},t.prototype.reset=function(){this._clearCurrentLink()},t.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var e=this._state.y2-this._state.y1-1;e>0&&this._clearCells(0,this._state.y1+1,this._state.cols,e),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},t.prototype._onShowLinkUnderline=function(e){if(e.fg===c.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:e.fg&&(0,l.is256Color)(e.fg)?this._ctx.fillStyle=this._colors.ansi[e.fg].css:this._ctx.fillStyle=this._colors.foreground.css,e.y1===e.y2)this._fillBottomLineAtCells(e.x1,e.y1,e.x2-e.x1);else{this._fillBottomLineAtCells(e.x1,e.y1,e.cols-e.x1);for(var t=e.y1+1;t<e.y2;t++)this._fillBottomLineAtCells(0,t,e.cols);this._fillBottomLineAtCells(0,e.y2,e.x2)}this._state=e},t.prototype._onHideLinkUnderline=function(e){this._clearCurrentLink()},o([s(6,h.IBufferService),s(7,h.IOptionsService)],t)}(a.BaseRenderLayer);t.LinkRenderLayer=u},3525:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Renderer=void 0;var a=r(9596),c=r(4149),l=r(2512),h=r(5098),u=r(844),f=r(4725),_=r(2585),d=r(1420),p=r(8460),v=1,g=function(e){function t(t,r,i,n,o,s,u,f){var _=e.call(this)||this;_._colors=t,_._screenElement=r,_._bufferService=s,_._charSizeService=u,_._optionsService=f,_._id=v++,_._onRequestRedraw=new p.EventEmitter;var d=_._optionsService.rawOptions.allowTransparency;return _._renderLayers=[o.createInstance(a.TextRenderLayer,_._screenElement,0,_._colors,d,_._id),o.createInstance(c.SelectionRenderLayer,_._screenElement,1,_._colors,_._id),o.createInstance(h.LinkRenderLayer,_._screenElement,2,_._colors,_._id,i,n),o.createInstance(l.CursorRenderLayer,_._screenElement,3,_._colors,_._id,_._onRequestRedraw)],_.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},_._devicePixelRatio=window.devicePixelRatio,_._updateDimensions(),_.onOptionsChanged(),_}return n(t,e),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){for(var t=0,r=this._renderLayers;t<r.length;t++)r[t].dispose();e.prototype.dispose.call(this),(0,d.removeTerminalFromCache)(this._id)},t.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},t.prototype.setColors=function(e){this._colors=e;for(var t=0,r=this._renderLayers;t<r.length;t++){var i=r[t];i.setColors(this._colors),i.reset()}},t.prototype.onResize=function(e,t){this._updateDimensions();for(var r=0,i=this._renderLayers;r<i.length;r++)i[r].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},t.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},t.prototype.onBlur=function(){this._runOperation((function(e){return e.onBlur()}))},t.prototype.onFocus=function(){this._runOperation((function(e){return e.onFocus()}))},t.prototype.onSelectionChanged=function(e,t,r){void 0===r&&(r=!1),this._runOperation((function(i){return i.onSelectionChanged(e,t,r)}))},t.prototype.onCursorMove=function(){this._runOperation((function(e){return e.onCursorMove()}))},t.prototype.onOptionsChanged=function(){this._runOperation((function(e){return e.onOptionsChanged()}))},t.prototype.clear=function(){this._runOperation((function(e){return e.reset()}))},t.prototype._runOperation=function(e){for(var t=0,r=this._renderLayers;t<r.length;t++)e(r[t])},t.prototype.renderRows=function(e,t){for(var r=0,i=this._renderLayers;r<i.length;r++)i[r].onGridChanged(e,t)},t.prototype.clearTextureAtlas=function(){for(var e=0,t=this._renderLayers;e<t.length;e++)t[e].clearTextureAtlas()},t.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharTop=1===this._optionsService.rawOptions.lineHeight?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},o([s(4,_.IInstantiationService),s(5,_.IBufferService),s(6,f.ICharSizeService),s(7,_.IOptionsService)],t)}(u.Disposable);t.Renderer=g},1752:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfFalsy=void 0,t.throwIfFalsy=function(e){if(!e)throw new Error("value must not be falsy");return e}},4149:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionRenderLayer=void 0;var a=r(1546),c=r(2585),l=function(e){function t(t,r,i,n,o,s){var a=e.call(this,t,"selection",r,!0,i,n,o,s)||this;return a._clearState(),a}return n(t,e),t.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this._clearState()},t.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},t.prototype.onSelectionChanged=function(e,t,r){if(this._didStateChange(e,t,r,this._bufferService.buffer.ydisp))if(this._clearAll(),e&&t){var i=e[1]-this._bufferService.buffer.ydisp,n=t[1]-this._bufferService.buffer.ydisp,o=Math.max(i,0),s=Math.min(n,this._bufferService.rows-1);if(o>=this._bufferService.rows||s<0)this._state.ydisp=this._bufferService.buffer.ydisp;else{if(this._ctx.fillStyle=this._colors.selectionTransparent.css,r){var a=e[0],c=t[0]-a,l=s-o+1;this._fillCells(a,o,c,l)}else{a=i===o?e[0]:0;var h=o===n?t[0]:this._bufferService.cols;this._fillCells(a,o,h-a,1);var u=Math.max(s-o-1,0);if(this._fillCells(0,o+1,this._bufferService.cols,u),o!==s){var f=n===s?t[0]:this._bufferService.cols;this._fillCells(0,s,f,1)}}this._state.start=[e[0],e[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=r,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},t.prototype._didStateChange=function(e,t,r,i){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||r!==this._state.columnSelectMode||i!==this._state.ydisp},t.prototype._areCoordinatesEqual=function(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]},o([s(4,c.IBufferService),s(5,c.IOptionsService)],t)}(a.BaseRenderLayer);t.SelectionRenderLayer=l},9596:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.TextRenderLayer=void 0;var a=r(3700),c=r(1546),l=r(3734),h=r(643),u=r(511),f=r(2585),_=r(4725),d=r(4269),p=function(e){function t(t,r,i,n,o,s,c,l){var h=e.call(this,t,"text",r,n,i,o,s,c)||this;return h._characterJoinerService=l,h._characterWidth=0,h._characterFont="",h._characterOverlapCache={},h._workCell=new u.CellData,h._state=new a.GridCache,h}return n(t,e),t.prototype.resize=function(t){e.prototype.resize.call(this,t);var r=this._getFont(!1,!1);this._characterWidth===t.scaledCharWidth&&this._characterFont===r||(this._characterWidth=t.scaledCharWidth,this._characterFont=r,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},t.prototype.reset=function(){this._state.clear(),this._clearAll()},t.prototype._forEachCell=function(e,t,r){for(var i=e;i<=t;i++)for(var n=i+this._bufferService.buffer.ydisp,o=this._bufferService.buffer.lines.get(n),s=this._characterJoinerService.getJoinedCharacters(n),a=0;a<this._bufferService.cols;a++){o.loadCell(a,this._workCell);var c=this._workCell,l=!1,u=a;if(0!==c.getWidth()){if(s.length>0&&a===s[0][0]){l=!0;var f=s.shift();c=new d.JoinedCellData(this._workCell,o.translateToString(!0,f[0],f[1]),f[1]-f[0]),u=f[1]-1}!l&&this._isOverlapping(c)&&u<o.length-1&&o.getCodePoint(u+1)===h.NULL_CELL_CODE&&(c.content&=-12582913,c.content|=2<<22),r(c,a,i),a=u}}},t.prototype._drawBackground=function(e,t){var r=this,i=this._ctx,n=this._bufferService.cols,o=0,s=0,a=null;i.save(),this._forEachCell(e,t,(function(e,t,c){var h=null;e.isInverse()?h=e.isFgDefault()?r._colors.foreground.css:e.isFgRGB()?"rgb("+l.AttributeData.toColorRGB(e.getFgColor()).join(",")+")":r._colors.ansi[e.getFgColor()].css:e.isBgRGB()?h="rgb("+l.AttributeData.toColorRGB(e.getBgColor()).join(",")+")":e.isBgPalette()&&(h=r._colors.ansi[e.getBgColor()].css),null===a&&(o=t,s=c),c!==s?(i.fillStyle=a||"",r._fillCells(o,s,n-o,1),o=t,s=c):a!==h&&(i.fillStyle=a||"",r._fillCells(o,s,t-o,1),o=t,s=c),a=h})),null!==a&&(i.fillStyle=a,this._fillCells(o,s,n-o,1)),i.restore()},t.prototype._drawForeground=function(e,t){var r=this;this._forEachCell(e,t,(function(e,t,i){if(!e.isInvisible()&&(r._drawChars(e,t,i),e.isUnderline()||e.isStrikethrough())){if(r._ctx.save(),e.isInverse())if(e.isBgDefault())r._ctx.fillStyle=r._colors.background.css;else if(e.isBgRGB())r._ctx.fillStyle="rgb("+l.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var n=e.getBgColor();r._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&n<8&&(n+=8),r._ctx.fillStyle=r._colors.ansi[n].css}else if(e.isFgDefault())r._ctx.fillStyle=r._colors.foreground.css;else if(e.isFgRGB())r._ctx.fillStyle="rgb("+l.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var o=e.getFgColor();r._optionsService.rawOptions.drawBoldTextInBrightColors&&e.isBold()&&o<8&&(o+=8),r._ctx.fillStyle=r._colors.ansi[o].css}e.isStrikethrough()&&r._fillMiddleLineAtCells(t,i,e.getWidth()),e.isUnderline()&&r._fillBottomLineAtCells(t,i,e.getWidth()),r._ctx.restore()}}))},t.prototype.onGridChanged=function(e,t){0!==this._state.cache.length&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,e,this._bufferService.cols,t-e+1),this._drawBackground(e,t),this._drawForeground(e,t))},t.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.rawOptions.allowTransparency)},t.prototype._isOverlapping=function(e){if(1!==e.getWidth())return!1;if(e.getCode()<256)return!1;var t=e.getChars();if(this._characterOverlapCache.hasOwnProperty(t))return this._characterOverlapCache[t];this._ctx.save(),this._ctx.font=this._characterFont;var r=Math.floor(this._ctx.measureText(t).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=r,r},o([s(5,f.IBufferService),s(6,f.IOptionsService),s(7,_.ICharacterJoinerService)],t)}(c.BaseRenderLayer);t.TextRenderLayer=p},9616:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BaseCharAtlas=void 0;var r=function(){function e(){this._didWarmUp=!1}return e.prototype.dispose=function(){},e.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},e.prototype._doWarmUp=function(){},e.prototype.clear=function(){},e.prototype.beginFrame=function(){},e}();t.BaseCharAtlas=r},1420:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.removeTerminalFromCache=t.acquireCharAtlas=void 0;var i=r(2040),n=r(1906),o=[];t.acquireCharAtlas=function(e,t,r,s,a){for(var c=(0,i.generateConfig)(s,a,e,r),l=0;l<o.length;l++){var h=(u=o[l]).ownedBy.indexOf(t);if(h>=0){if((0,i.configEquals)(u.config,c))return u.atlas;1===u.ownedBy.length?(u.atlas.dispose(),o.splice(l,1)):u.ownedBy.splice(h,1);break}}for(l=0;l<o.length;l++){var u=o[l];if((0,i.configEquals)(u.config,c))return u.ownedBy.push(t),u.atlas}var f={atlas:new n.DynamicCharAtlas(document,c),config:c,ownedBy:[t]};return o.push(f),f.atlas},t.removeTerminalFromCache=function(e){for(var t=0;t<o.length;t++){var r=o[t].ownedBy.indexOf(e);if(-1!==r){1===o[t].ownedBy.length?(o[t].atlas.dispose(),o.splice(t,1)):o[t].ownedBy.splice(r,1);break}}}},2040:function(e,t,r){var i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.is256Color=t.configEquals=t.generateConfig=void 0;var n=r(643);t.generateConfig=function(e,t,r,n){var o={foreground:n.foreground,background:n.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:i([],n.ansi,!0)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:e,scaledCharHeight:t,fontFamily:r.fontFamily,fontSize:r.fontSize,fontWeight:r.fontWeight,fontWeightBold:r.fontWeightBold,allowTransparency:r.allowTransparency,colors:o}},t.configEquals=function(e,t){for(var r=0;r<e.colors.ansi.length;r++)if(e.colors.ansi[r].rgba!==t.colors.ansi[r].rgba)return!1;return e.devicePixelRatio===t.devicePixelRatio&&e.fontFamily===t.fontFamily&&e.fontSize===t.fontSize&&e.fontWeight===t.fontWeight&&e.fontWeightBold===t.fontWeightBold&&e.allowTransparency===t.allowTransparency&&e.scaledCharWidth===t.scaledCharWidth&&e.scaledCharHeight===t.scaledCharHeight&&e.colors.foreground===t.colors.foreground&&e.colors.background===t.colors.background},t.is256Color=function(e){return e<n.DEFAULT_COLOR}},8803:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CHAR_ATLAS_CELL_SPACING=t.TEXT_BASELINE=t.DIM_OPACITY=t.INVERTED_DEFAULT_COLOR=void 0;var i=r(6114);t.INVERTED_DEFAULT_COLOR=257,t.DIM_OPACITY=.5,t.TEXT_BASELINE=i.isFirefox||i.isLegacyEdge?"bottom":"ideographic",t.CHAR_ATLAS_CELL_SPACING=1},1906:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.NoneCharAtlas=t.DynamicCharAtlas=t.getGlyphCacheKey=void 0;var o=r(8803),s=r(9616),a=r(5680),c=r(7001),l=r(6114),h=r(1752),u=r(4774),f=1024,_=1024,d={css:"rgba(0, 0, 0, 0)",rgba:0};function p(e){return e.code<<21|e.bg<<12|e.fg<<3|(e.bold?0:4)+(e.dim?0:2)+(e.italic?0:1)}t.getGlyphCacheKey=p;var v=function(e){function t(t,r){var i=e.call(this)||this;i._config=r,i._drawToCacheCount=0,i._glyphsWaitingOnBitmap=[],i._bitmapCommitTimeout=null,i._bitmap=null,i._cacheCanvas=t.createElement("canvas"),i._cacheCanvas.width=f,i._cacheCanvas.height=_,i._cacheCtx=(0,h.throwIfFalsy)(i._cacheCanvas.getContext("2d",{alpha:!0}));var n=t.createElement("canvas");n.width=i._config.scaledCharWidth,n.height=i._config.scaledCharHeight,i._tmpCtx=(0,h.throwIfFalsy)(n.getContext("2d",{alpha:i._config.allowTransparency})),i._width=Math.floor(f/i._config.scaledCharWidth),i._height=Math.floor(_/i._config.scaledCharHeight);var o=i._width*i._height;return i._cacheMap=new c.LRUMap(o),i._cacheMap.prealloc(o),i}return n(t,e),t.prototype.dispose=function(){null!==this._bitmapCommitTimeout&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},t.prototype.beginFrame=function(){this._drawToCacheCount=0},t.prototype.clear=function(){if(this._cacheMap.size>0){var e=this._width*this._height;this._cacheMap=new c.LRUMap(e),this._cacheMap.prealloc(e)}this._cacheCtx.clearRect(0,0,f,_),this._tmpCtx.clearRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight)},t.prototype.draw=function(e,t,r,i){if(32===t.code)return!0;if(!this._canCache(t))return!1;var n=p(t),o=this._cacheMap.get(n);if(null!=o)return this._drawFromCache(e,o,r,i),!0;if(this._drawToCacheCount<100){var s;s=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var a=this._drawToCache(t,s);return this._cacheMap.set(n,a),this._drawFromCache(e,a,r,i),!0}return!1},t.prototype._canCache=function(e){return e.code<256},t.prototype._toCoordinateX=function(e){return e%this._width*this._config.scaledCharWidth},t.prototype._toCoordinateY=function(e){return Math.floor(e/this._width)*this._config.scaledCharHeight},t.prototype._drawFromCache=function(e,t,r,i){if(!t.isEmpty){var n=this._toCoordinateX(t.index),o=this._toCoordinateY(t.index);e.drawImage(t.inBitmap?this._bitmap:this._cacheCanvas,n,o,this._config.scaledCharWidth,this._config.scaledCharHeight,r,i,this._config.scaledCharWidth,this._config.scaledCharHeight)}},t.prototype._getColorFromAnsiIndex=function(e){return e<this._config.colors.ansi.length?this._config.colors.ansi[e]:a.DEFAULT_ANSI_COLORS[e]},t.prototype._getBackgroundColor=function(e){return this._config.allowTransparency?d:e.bg===o.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:e.bg<256?this._getColorFromAnsiIndex(e.bg):this._config.colors.background},t.prototype._getForegroundColor=function(e){return e.fg===o.INVERTED_DEFAULT_COLOR?u.color.opaque(this._config.colors.background):e.fg<256?this._getColorFromAnsiIndex(e.fg):this._config.colors.foreground},t.prototype._drawToCache=function(e,t){this._drawToCacheCount++,this._tmpCtx.save();var r=this._getBackgroundColor(e);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=r.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var i=e.bold?this._config.fontWeightBold:this._config.fontWeight,n=e.italic?"italic":"";this._tmpCtx.font=n+" "+i+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline=o.TEXT_BASELINE,this._tmpCtx.fillStyle=this._getForegroundColor(e).css,e.dim&&(this._tmpCtx.globalAlpha=o.DIM_OPACITY),this._tmpCtx.fillText(e.chars,0,this._config.scaledCharHeight);var s=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),a=!1;if(this._config.allowTransparency||(a=y(s,r)),a&&"_"===e.chars&&!this._config.allowTransparency)for(var c=1;c<=5&&(this._tmpCtx.fillText(e.chars,0,this._config.scaledCharHeight-c),a=y(s=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),r));c++);this._tmpCtx.restore();var l=this._toCoordinateX(t),h=this._toCoordinateY(t);this._cacheCtx.putImageData(s,l,h);var u={index:t,isEmpty:a,inBitmap:!1};return this._addGlyphToBitmap(u),u},t.prototype._addGlyphToBitmap=function(e){var t=this;!("createImageBitmap"in window)||l.isFirefox||l.isSafari||(this._glyphsWaitingOnBitmap.push(e),null===this._bitmapCommitTimeout&&(this._bitmapCommitTimeout=window.setTimeout((function(){return t._generateBitmap()}),100)))},t.prototype._generateBitmap=function(){var e=this,t=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then((function(r){e._bitmap=r;for(var i=0;i<t.length;i++)t[i].inBitmap=!0})),this._bitmapCommitTimeout=null},t}(s.BaseCharAtlas);t.DynamicCharAtlas=v;var g=function(e){function t(t,r){return e.call(this)||this}return n(t,e),t.prototype.draw=function(e,t,r,i){return!1},t}(s.BaseCharAtlas);function y(e,t){for(var r=!0,i=t.rgba>>>24,n=t.rgba>>>16&255,o=t.rgba>>>8&255,s=0;s<e.data.length;s+=4)e.data[s]===i&&e.data[s+1]===n&&e.data[s+2]===o?e.data[s+3]=0:r=!1;return r}t.NoneCharAtlas=g},7001:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LRUMap=void 0;var r=function(){function e(e){this.capacity=e,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return e.prototype._unlinkNode=function(e){var t=e.prev,r=e.next;e===this._head&&(this._head=r),e===this._tail&&(this._tail=t),null!==t&&(t.next=r),null!==r&&(r.prev=t)},e.prototype._appendNode=function(e){var t=this._tail;null!==t&&(t.next=e),e.prev=t,e.next=null,this._tail=e,null===this._head&&(this._head=e)},e.prototype.prealloc=function(e){for(var t=this._nodePool,r=0;r<e;r++)t.push({prev:null,next:null,key:null,value:null})},e.prototype.get=function(e){var t=this._map[e];return void 0!==t?(this._unlinkNode(t),this._appendNode(t),t.value):null},e.prototype.peekValue=function(e){var t=this._map[e];return void 0!==t?t.value:null},e.prototype.peek=function(){var e=this._head;return null===e?null:e.value},e.prototype.set=function(e,t){var r=this._map[e];if(void 0!==r)r=this._map[e],this._unlinkNode(r),r.value=t;else if(this.size>=this.capacity)r=this._head,this._unlinkNode(r),delete this._map[r.key],r.key=e,r.value=t,this._map[e]=r;else{var i=this._nodePool;i.length>0?((r=i.pop()).key=e,r.value=t):r={prev:null,next:null,key:e,value:t},this._map[e]=r,this.size++}this._appendNode(r)},e}();t.LRUMap=r},1296:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRenderer=void 0;var a=r(3787),c=r(8803),l=r(844),h=r(4725),u=r(2585),f=r(8460),_=r(4774),d=r(9631),p="xterm-dom-renderer-owner-",v="xterm-fg-",g="xterm-bg-",y="xterm-focus",m=1,S=function(e){function t(t,r,i,n,o,s,c,l,h,u){var f=e.call(this)||this;return f._colors=t,f._element=r,f._screenElement=i,f._viewportElement=n,f._linkifier=o,f._linkifier2=s,f._charSizeService=l,f._optionsService=h,f._bufferService=u,f._terminalClass=m++,f._rowElements=[],f._rowContainer=document.createElement("div"),f._rowContainer.classList.add("xterm-rows"),f._rowContainer.style.lineHeight="normal",f._rowContainer.setAttribute("aria-hidden","true"),f._refreshRowElements(f._bufferService.cols,f._bufferService.rows),f._selectionContainer=document.createElement("div"),f._selectionContainer.classList.add("xterm-selection"),f._selectionContainer.setAttribute("aria-hidden","true"),f.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},f._updateDimensions(),f._injectCss(),f._rowFactory=c.createInstance(a.DomRendererRowFactory,document,f._colors),f._element.classList.add(p+f._terminalClass),f._screenElement.appendChild(f._rowContainer),f._screenElement.appendChild(f._selectionContainer),f._linkifier.onShowLinkUnderline((function(e){return f._onLinkHover(e)})),f._linkifier.onHideLinkUnderline((function(e){return f._onLinkLeave(e)})),f._linkifier2.onShowLinkUnderline((function(e){return f._onLinkHover(e)})),f._linkifier2.onHideLinkUnderline((function(e){return f._onLinkLeave(e)})),f}return n(t,e),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return(new f.EventEmitter).event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._element.classList.remove(p+this._terminalClass),(0,d.removeElementFromParent)(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),e.prototype.dispose.call(this)},t.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.rawOptions.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var e=0,t=this._rowElements;e<t.length;e++){var r=t[e];r.style.width=this.dimensions.canvasWidth+"px",r.style.height=this.dimensions.actualCellHeight+"px",r.style.lineHeight=this.dimensions.actualCellHeight+"px",r.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var i=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.textContent=i,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},t.prototype.setColors=function(e){this._colors=e,this._injectCss()},t.prototype._injectCss=function(){var e=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var t=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.rawOptions.fontFamily+"; font-size: "+this._optionsService.rawOptions.fontSize+"px;}";t+=this._terminalSelector+" span:not(."+a.BOLD_CLASS+") { font-weight: "+this._optionsService.rawOptions.fontWeight+";}"+this._terminalSelector+" span."+a.BOLD_CLASS+" { font-weight: "+this._optionsService.rawOptions.fontWeightBold+";}"+this._terminalSelector+" span."+a.ITALIC_CLASS+" { font-style: italic;}",t+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",t+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",t+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+a.CURSOR_CLASS+"."+a.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+a.CURSOR_CLASS+"."+a.CURSOR_BLINK_CLASS+":not(."+a.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+a.CURSOR_CLASS+"."+a.CURSOR_BLINK_CLASS+"."+a.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+a.CURSOR_CLASS+"."+a.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+a.CURSOR_CLASS+"."+a.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.rawOptions.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+a.CURSOR_CLASS+"."+a.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",t+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach((function(r,i){t+=e._terminalSelector+" ."+v+i+" { color: "+r.css+"; }"+e._terminalSelector+" ."+g+i+" { background-color: "+r.css+"; }"})),t+=this._terminalSelector+" ."+v+c.INVERTED_DEFAULT_COLOR+" { color: "+_.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" ."+g+c.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.textContent=t},t.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},t.prototype._refreshRowElements=function(e,t){for(var r=this._rowElements.length;r<=t;r++){var i=document.createElement("div");this._rowContainer.appendChild(i),this._rowElements.push(i)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())},t.prototype.onResize=function(e,t){this._refreshRowElements(e,t),this._updateDimensions()},t.prototype.onCharSizeChanged=function(){this._updateDimensions()},t.prototype.onBlur=function(){this._rowContainer.classList.remove(y)},t.prototype.onFocus=function(){this._rowContainer.classList.add(y)},t.prototype.onSelectionChanged=function(e,t,r){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(e&&t){var i=e[1]-this._bufferService.buffer.ydisp,n=t[1]-this._bufferService.buffer.ydisp,o=Math.max(i,0),s=Math.min(n,this._bufferService.rows-1);if(!(o>=this._bufferService.rows||s<0)){var a=document.createDocumentFragment();if(r)a.appendChild(this._createSelectionElement(o,e[0],t[0],s-o+1));else{var c=i===o?e[0]:0,l=o===n?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(o,c,l));var h=s-o-1;if(a.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,h)),o!==s){var u=n===s?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(s,0,u))}}this._selectionContainer.appendChild(a)}}},t.prototype._createSelectionElement=function(e,t,r,i){void 0===i&&(i=1);var n=document.createElement("div");return n.style.height=i*this.dimensions.actualCellHeight+"px",n.style.top=e*this.dimensions.actualCellHeight+"px",n.style.left=t*this.dimensions.actualCellWidth+"px",n.style.width=this.dimensions.actualCellWidth*(r-t)+"px",n},t.prototype.onCursorMove=function(){},t.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},t.prototype.clear=function(){for(var e=0,t=this._rowElements;e<t.length;e++)t[e].innerText=""},t.prototype.renderRows=function(e,t){for(var r=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),n=this._optionsService.rawOptions.cursorBlink,o=e;o<=t;o++){var s=this._rowElements[o];s.innerText="";var a=o+this._bufferService.buffer.ydisp,c=this._bufferService.buffer.lines.get(a),l=this._optionsService.rawOptions.cursorStyle;s.appendChild(this._rowFactory.createRow(c,a,a===r,l,i,n,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(t.prototype,"_terminalSelector",{get:function(){return"."+p+this._terminalClass},enumerable:!1,configurable:!0}),t.prototype._onLinkHover=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)},t.prototype._onLinkLeave=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)},t.prototype._setCellUnderline=function(e,t,r,i,n,o){for(;e!==t||r!==i;){var s=this._rowElements[r];if(!s)return;var a=s.children[e];a&&(a.style.textDecoration=o?"underline":"none"),++e>=n&&(e=0,r++)}},o([s(6,u.IInstantiationService),s(7,h.ICharSizeService),s(8,u.IOptionsService),s(9,u.IBufferService)],t)}(l.Disposable);t.DomRenderer=S},3787:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DomRendererRowFactory=t.CURSOR_STYLE_UNDERLINE_CLASS=t.CURSOR_STYLE_BAR_CLASS=t.CURSOR_STYLE_BLOCK_CLASS=t.CURSOR_BLINK_CLASS=t.CURSOR_CLASS=t.STRIKETHROUGH_CLASS=t.UNDERLINE_CLASS=t.ITALIC_CLASS=t.DIM_CLASS=t.BOLD_CLASS=void 0;var o=r(8803),s=r(643),a=r(511),c=r(2585),l=r(4774),h=r(4725),u=r(4269);t.BOLD_CLASS="xterm-bold",t.DIM_CLASS="xterm-dim",t.ITALIC_CLASS="xterm-italic",t.UNDERLINE_CLASS="xterm-underline",t.STRIKETHROUGH_CLASS="xterm-strikethrough",t.CURSOR_CLASS="xterm-cursor",t.CURSOR_BLINK_CLASS="xterm-cursor-blink",t.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",t.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",t.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var f=function(){function e(e,t,r,i,n){this._document=e,this._colors=t,this._characterJoinerService=r,this._optionsService=i,this._coreService=n,this._workCell=new a.CellData}return e.prototype.setColors=function(e){this._colors=e},e.prototype.createRow=function(e,r,i,n,a,c,h,f){for(var d=this._document.createDocumentFragment(),p=this._characterJoinerService.getJoinedCharacters(r),v=0,g=Math.min(e.length,f)-1;g>=0;g--)if(e.loadCell(g,this._workCell).getCode()!==s.NULL_CELL_CODE||i&&g===a){v=g+1;break}for(g=0;g<v;g++){e.loadCell(g,this._workCell);var y=this._workCell.getWidth();if(0!==y){var m=!1,S=g,C=this._workCell;if(p.length>0&&g===p[0][0]){m=!0;var b=p.shift();C=new u.JoinedCellData(this._workCell,e.translateToString(!0,b[0],b[1]),b[1]-b[0]),S=b[1]-1,y=C.getWidth()}var w=this._document.createElement("span");if(y>1&&(w.style.width=h*y+"px"),m&&(w.style.display="inline",a>=g&&a<=S&&(a=g)),!this._coreService.isCursorHidden&&i&&g===a)switch(w.classList.add(t.CURSOR_CLASS),c&&w.classList.add(t.CURSOR_BLINK_CLASS),n){case"bar":w.classList.add(t.CURSOR_STYLE_BAR_CLASS);break;case"underline":w.classList.add(t.CURSOR_STYLE_UNDERLINE_CLASS);break;default:w.classList.add(t.CURSOR_STYLE_BLOCK_CLASS)}C.isBold()&&w.classList.add(t.BOLD_CLASS),C.isItalic()&&w.classList.add(t.ITALIC_CLASS),C.isDim()&&w.classList.add(t.DIM_CLASS),C.isUnderline()&&w.classList.add(t.UNDERLINE_CLASS),C.isInvisible()?w.textContent=s.WHITESPACE_CELL_CHAR:w.textContent=C.getChars()||s.WHITESPACE_CELL_CHAR,C.isStrikethrough()&&w.classList.add(t.STRIKETHROUGH_CLASS);var L=C.getFgColor(),E=C.getFgColorMode(),x=C.getBgColor(),k=C.getBgColorMode(),M=!!C.isInverse();if(M){var A=L;L=x,x=A;var R=E;E=k,k=R}switch(E){case 16777216:case 33554432:C.isBold()&&L<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(L+=8),this._applyMinimumContrast(w,this._colors.background,this._colors.ansi[L])||w.classList.add("xterm-fg-"+L);break;case 50331648:var O=l.rgba.toColor(L>>16&255,L>>8&255,255&L);this._applyMinimumContrast(w,this._colors.background,O)||this._addStyle(w,"color:#"+_(L.toString(16),"0",6));break;default:this._applyMinimumContrast(w,this._colors.background,this._colors.foreground)||M&&w.classList.add("xterm-fg-"+o.INVERTED_DEFAULT_COLOR)}switch(k){case 16777216:case 33554432:w.classList.add("xterm-bg-"+x);break;case 50331648:this._addStyle(w,"background-color:#"+_(x.toString(16),"0",6));break;default:M&&w.classList.add("xterm-bg-"+o.INVERTED_DEFAULT_COLOR)}d.appendChild(w),g=S}}return d},e.prototype._applyMinimumContrast=function(e,t,r){if(1===this._optionsService.rawOptions.minimumContrastRatio)return!1;var i=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return void 0===i&&(i=l.color.ensureContrastRatio(t,r,this._optionsService.rawOptions.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=i?i:null)),!!i&&(this._addStyle(e,"color:"+i.css),!0)},e.prototype._addStyle=function(e,t){e.setAttribute("style",""+(e.getAttribute("style")||"")+t+";")},i([n(2,h.ICharacterJoinerService),n(3,c.IOptionsService),n(4,c.ICoreService)],e)}();function _(e,t,r){for(;e.length<r;)e=t+e;return e}t.DomRendererRowFactory=f},456:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionModel=void 0;var r=function(){function e(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}return e.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(e.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),e.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])},e.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},e}();t.SelectionModel=r},428:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharSizeService=void 0;var o=r(2585),s=r(8460),a=function(){function e(e,t,r){this._optionsService=r,this.width=0,this.height=0,this._onCharSizeChange=new s.EventEmitter,this._measureStrategy=new c(e,t,this._optionsService)}return Object.defineProperty(e.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),e.prototype.measure=function(){var e=this._measureStrategy.measure();e.width===this.width&&e.height===this.height||(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())},i([n(2,o.IOptionsService)],e)}();t.CharSizeService=a;var c=function(){function e(e,t,r){this._document=e,this._parentElement=t,this._optionsService=r,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return e.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=this._optionsService.rawOptions.fontSize+"px";var e=this._measureElement.getBoundingClientRect();return 0!==e.width&&0!==e.height&&(this._result.width=e.width,this._result.height=Math.ceil(e.height)),this._result},e}()},4269:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CharacterJoinerService=t.JoinedCellData=void 0;var a=r(3734),c=r(643),l=r(511),h=r(2585),u=function(e){function t(t,r,i){var n=e.call(this)||this;return n.content=0,n.combinedData="",n.fg=t.fg,n.bg=t.bg,n.combinedData=r,n._width=i,n}return n(t,e),t.prototype.isCombined=function(){return 2097152},t.prototype.getWidth=function(){return this._width},t.prototype.getChars=function(){return this.combinedData},t.prototype.getCode=function(){return 2097151},t.prototype.setFromCharData=function(e){throw new Error("not implemented")},t.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},t}(a.AttributeData);t.JoinedCellData=u;var f=function(){function e(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new l.CellData}return e.prototype.register=function(e){var t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id},e.prototype.deregister=function(e){for(var t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1},e.prototype.getJoinedCharacters=function(e){if(0===this._characterJoiners.length)return[];var t=this._bufferService.buffer.lines.get(e);if(!t||0===t.length)return[];for(var r=[],i=t.translateToString(!0),n=0,o=0,s=0,a=t.getFg(0),l=t.getBg(0),h=0;h<t.getTrimmedLength();h++)if(t.loadCell(h,this._workCell),0!==this._workCell.getWidth()){if(this._workCell.fg!==a||this._workCell.bg!==l){if(h-n>1)for(var u=this._getJoinedRanges(i,s,o,t,n),f=0;f<u.length;f++)r.push(u[f]);n=h,s=o,a=this._workCell.fg,l=this._workCell.bg}o+=this._workCell.getChars().length||c.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-n>1)for(u=this._getJoinedRanges(i,s,o,t,n),f=0;f<u.length;f++)r.push(u[f]);return r},e.prototype._getJoinedRanges=function(t,r,i,n,o){var s=t.substring(r,i),a=[];try{a=this._characterJoiners[0].handler(s)}catch(e){console.error(e)}for(var c=1;c<this._characterJoiners.length;c++)try{for(var l=this._characterJoiners[c].handler(s),h=0;h<l.length;h++)e._mergeRanges(a,l[h])}catch(e){console.error(e)}return this._stringRangesToCellRanges(a,n,o),a},e.prototype._stringRangesToCellRanges=function(e,t,r){var i=0,n=!1,o=0,s=e[i];if(s){for(var a=r;a<this._bufferService.cols;a++){var l=t.getWidth(a),h=t.getString(a).length||c.WHITESPACE_CELL_CHAR.length;if(0!==l){if(!n&&s[0]<=o&&(s[0]=a,n=!0),s[1]<=o){if(s[1]=a,!(s=e[++i]))break;s[0]<=o?(s[0]=a,n=!0):n=!1}o+=h}}s&&(s[1]=this._bufferService.cols)}},e._mergeRanges=function(e,t){for(var r=!1,i=0;i<e.length;i++){var n=e[i];if(r){if(t[1]<=n[0])return e[i-1][1]=t[1],e;if(t[1]<=n[1])return e[i-1][1]=Math.max(t[1],n[1]),e.splice(i,1),e;e.splice(i,1),i--}else{if(t[1]<=n[0])return e.splice(i,0,t),e;if(t[1]<=n[1])return n[0]=Math.min(t[0],n[0]),e;t[0]<n[1]&&(n[0]=Math.min(t[0],n[0]),r=!0)}}return r?e[e.length-1][1]=t[1]:e.push(t),e},e=o([s(0,h.IBufferService)],e)}();t.CharacterJoinerService=f},5114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CoreBrowserService=void 0;var r=function(){function e(e){this._textarea=e}return Object.defineProperty(e.prototype,"isFocused",{get:function(){return(this._textarea.getRootNode?this._textarea.getRootNode():document).activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),e}();t.CoreBrowserService=r},7641:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.Decoration=t.DecorationService=void 0;var a=r(8460),c=r(844),l=r(2585),h=function(e){function t(t){var r=e.call(this)||this;return r._instantiationService=t,r._decorations=[],r}return n(t,e),t.prototype.attachToDom=function(e,t){var r=this;this._renderService=t,this._screenElement=e,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),e.appendChild(this._container),this.register(this._renderService.onRenderedBufferChange((function(){return r.refresh()}))),this.register(this._renderService.onDimensionsChange((function(){return r.refresh(!0)})))},t.prototype.registerDecoration=function(e){var t=this;if(!e.marker.isDisposed&&this._container){var r=this._instantiationService.createInstance(u,e,this._container);return this._decorations.push(r),r.onDispose((function(){return t._decorations.splice(t._decorations.indexOf(r),1)})),this._queueRefresh(),r}},t.prototype._queueRefresh=function(){var e=this;void 0===this._animationFrame&&(this._animationFrame=window.requestAnimationFrame((function(){e.refresh(),e._animationFrame=void 0})))},t.prototype.refresh=function(e){if(this._renderService)for(var t=0,r=this._decorations;t<r.length;t++)r[t].render(this._renderService,e)},t.prototype.dispose=function(){for(var e=0,t=this._decorations;e<t.length;e++)t[e].dispose();this._screenElement&&this._container&&this._screenElement.contains(this._container)&&this._screenElement.removeChild(this._container)},o([s(0,l.IInstantiationService)],t)}(c.Disposable);t.DecorationService=h;var u=function(e){function t(t,r,i){var n,o=e.call(this)||this;return o._container=r,o._bufferService=i,o.isDisposed=!1,o._onDispose=new a.EventEmitter,o._onRender=new a.EventEmitter,o.x=null!==(n=t.x)&&void 0!==n?n:0,o._marker=t.marker,o._marker.onDispose((function(){return o.dispose()})),o.anchor=t.anchor||"left",o.width=t.width||1,o.height=t.height||1,o}return n(t,e),Object.defineProperty(t.prototype,"element",{get:function(){return this._element},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"marker",{get:function(){return this._marker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),t.prototype.render=function(e,t){this._element&&!t||this._createElement(e,t),this._container&&this._element&&!this._container.contains(this._element)&&this._container.append(this._element),this._refreshStyle(e),this._element&&this._onRender.fire(this._element)},t.prototype._createElement=function(e,t){t&&this._element&&this._container.contains(this._element)&&this._container.removeChild(this._element),this._element=document.createElement("div"),this._element.classList.add("xterm-decoration"),this._element.style.width=this.width*e.dimensions.actualCellWidth+"px",this._element.style.height=this.height*e.dimensions.actualCellHeight+"px",this._element.style.top=(this.marker.line-this._bufferService.buffers.active.ydisp)*e.dimensions.actualCellHeight+"px",this._element.style.lineHeight=e.dimensions.actualCellHeight+"px",this.x&&this.x>this._bufferService.cols&&(this._element.style.display="none"),"right"===this.anchor?this._element.style.right=this.x?this.x*e.dimensions.actualCellWidth+"px":"":this._element.style.left=this.x?this.x*e.dimensions.actualCellWidth+"px":""},t.prototype._refreshStyle=function(e){if(this._element){var t=this.marker.line-this._bufferService.buffers.active.ydisp;t<0||t>this._bufferService.rows?this._element.style.display="none":(this._element.style.top=t*e.dimensions.actualCellHeight+"px",this._element.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block")}},t.prototype.dispose=function(){this.isDisposed||(this._element&&this._container.contains(this._element)&&this._container.removeChild(this._element),this.isDisposed=!0,this._onDispose.fire())},o([s(2,l.IBufferService)],t)}(c.Disposable);t.Decoration=u},8934:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.MouseService=void 0;var o=r(4725),s=r(9806),a=function(){function e(e,t){this._renderService=e,this._charSizeService=t}return e.prototype.getCoords=function(e,t,r,i,n){return(0,s.getCoords)(e,t,r,i,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,n)},e.prototype.getRawByteCoords=function(e,t,r,i){var n=this.getCoords(e,t,r,i);return(0,s.getRawByteCoords)(n)},i([n(0,o.IRenderService),n(1,o.ICharSizeService)],e)}();t.MouseService=a},3230:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.RenderService=void 0;var a=r(6193),c=r(8460),l=r(844),h=r(5596),u=r(3656),f=r(2585),_=r(4725),d=function(e){function t(t,r,i,n,o,s){var l=e.call(this)||this;if(l._renderer=t,l._rowCount=r,l._charSizeService=o,l._isPaused=!1,l._needsFullRefresh=!1,l._isNextRenderRedrawOnly=!0,l._needsSelectionRefresh=!1,l._canvasWidth=0,l._canvasHeight=0,l._selectionState={start:void 0,end:void 0,columnSelectMode:!1},l._onDimensionsChange=new c.EventEmitter,l._onRender=new c.EventEmitter,l._onRefreshRequest=new c.EventEmitter,l.register({dispose:function(){return l._renderer.dispose()}}),l._renderDebouncer=new a.RenderDebouncer((function(e,t){return l._renderRows(e,t)})),l.register(l._renderDebouncer),l._screenDprMonitor=new h.ScreenDprMonitor,l._screenDprMonitor.setListener((function(){return l.onDevicePixelRatioChange()})),l.register(l._screenDprMonitor),l.register(s.onResize((function(){return l._fullRefresh()}))),l.register(s.buffers.onBufferActivate((function(){var e;return null===(e=l._renderer)||void 0===e?void 0:e.clear()}))),l.register(n.onOptionChange((function(){return l._renderer.onOptionsChanged()}))),l.register(l._charSizeService.onCharSizeChange((function(){return l.onCharSizeChanged()}))),l._renderer.onRequestRedraw((function(e){return l.refreshRows(e.start,e.end,!0)})),l.register((0,u.addDisposableDomListener)(window,"resize",(function(){return l.onDevicePixelRatioChange()}))),"IntersectionObserver"in window){var f=new IntersectionObserver((function(e){return l._onIntersectionChange(e[e.length-1])}),{threshold:0});f.observe(i),l.register({dispose:function(){return f.disconnect()}})}return l}return n(t,e),Object.defineProperty(t.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),t.prototype._onIntersectionChange=function(e){this._isPaused=void 0===e.isIntersecting?0===e.intersectionRatio:!e.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},t.prototype.refreshRows=function(e,t,r){void 0===r&&(r=!1),this._isPaused?this._needsFullRefresh=!0:(r||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount))},t.prototype._renderRows=function(e,t){this._renderer.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0},t.prototype.resize=function(e,t){this._rowCount=t,this._fireOnCanvasResize()},t.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},t.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype.setRenderer=function(e){var t=this;this._renderer.dispose(),this._renderer=e,this._renderer.onRequestRedraw((function(e){return t.refreshRows(e.start,e.end,!0)})),this._needsSelectionRefresh=!0,this._fullRefresh()},t.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},t.prototype.clearTextureAtlas=function(){var e,t;null===(t=null===(e=this._renderer)||void 0===e?void 0:e.clearTextureAtlas)||void 0===t||t.call(e),this._fullRefresh()},t.prototype.setColors=function(e){this._renderer.setColors(e),this._fullRefresh()},t.prototype.onDevicePixelRatioChange=function(){this._charSizeService.measure(),this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},t.prototype.onResize=function(e,t){this._renderer.onResize(e,t),this._fullRefresh()},t.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},t.prototype.onBlur=function(){this._renderer.onBlur()},t.prototype.onFocus=function(){this._renderer.onFocus()},t.prototype.onSelectionChanged=function(e,t,r){this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=r,this._renderer.onSelectionChanged(e,t,r)},t.prototype.onCursorMove=function(){this._renderer.onCursorMove()},t.prototype.clear=function(){this._renderer.clear()},o([s(3,f.IOptionsService),s(4,_.ICharSizeService),s(5,f.IBufferService)],t)}(l.Disposable);t.RenderService=d},9312:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionService=void 0;var a=r(6114),c=r(456),l=r(511),h=r(8460),u=r(4725),f=r(2585),_=r(9806),d=r(9504),p=r(844),v=r(4841),g=String.fromCharCode(160),y=new RegExp(g,"g"),m=function(e){function t(t,r,i,n,o,s,a,u){var f=e.call(this)||this;return f._element=t,f._screenElement=r,f._linkifier=i,f._bufferService=n,f._coreService=o,f._mouseService=s,f._optionsService=a,f._renderService=u,f._dragScrollAmount=0,f._enabled=!0,f._workCell=new l.CellData,f._mouseDownTimeStamp=0,f._oldHasSelection=!1,f._oldSelectionStart=void 0,f._oldSelectionEnd=void 0,f._onLinuxMouseSelection=f.register(new h.EventEmitter),f._onRedrawRequest=f.register(new h.EventEmitter),f._onSelectionChange=f.register(new h.EventEmitter),f._onRequestScrollLines=f.register(new h.EventEmitter),f._mouseMoveListener=function(e){return f._onMouseMove(e)},f._mouseUpListener=function(e){return f._onMouseUp(e)},f._coreService.onUserInput((function(){f.hasSelection&&f.clearSelection()})),f._trimListener=f._bufferService.buffer.lines.onTrim((function(e){return f._onTrim(e)})),f.register(f._bufferService.buffers.onBufferActivate((function(e){return f._onBufferActivate(e)}))),f.enable(),f._model=new c.SelectionModel(f._bufferService),f._activeSelectionMode=0,f}return n(t,e),Object.defineProperty(t.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this._removeMouseDownListeners()},t.prototype.reset=function(){this.clearSelection()},t.prototype.disable=function(){this.clearSelection(),this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},Object.defineProperty(t.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasSelection",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!(!e||!t||e[0]===t[0]&&e[1]===t[1])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectionText",{get:function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";var r=this._bufferService.buffer,i=[];if(3===this._activeSelectionMode){if(e[0]===t[0])return"";for(var n=e[1];n<=t[1];n++){var o=r.translateBufferLineToString(n,!0,e[0],t[0]);i.push(o)}}else{var s=e[1]===t[1]?t[0]:void 0;for(i.push(r.translateBufferLineToString(e[1],!0,e[0],s)),n=e[1]+1;n<=t[1]-1;n++){var c=r.lines.get(n);o=r.translateBufferLineToString(n,!0),(null==c?void 0:c.isWrapped)?i[i.length-1]+=o:i.push(o)}e[1]!==t[1]&&(c=r.lines.get(t[1]),o=r.translateBufferLineToString(t[1],!0,0,t[0]),c&&c.isWrapped?i[i.length-1]+=o:i.push(o))}return i.map((function(e){return e.replace(y," ")})).join(a.isWindows?"\r\n":"\n")},enumerable:!1,configurable:!0}),t.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},t.prototype.refresh=function(e){var t=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame((function(){return t._refresh()}))),a.isLinux&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},t.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:3===this._activeSelectionMode})},t.prototype._isClickInSelection=function(e){var t=this._getMouseBufferCoords(e),r=this._model.finalSelectionStart,i=this._model.finalSelectionEnd;return!!(r&&i&&t)&&this._areCoordsInSelection(t,r,i)},t.prototype._areCoordsInSelection=function(e,t,r){return e[1]>t[1]&&e[1]<r[1]||t[1]===r[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<r[0]||t[1]<r[1]&&e[1]===r[1]&&e[0]<r[0]||t[1]<r[1]&&e[1]===t[1]&&e[0]>=t[0]},t.prototype._selectWordAtCursor=function(e,t){var r,i,n=null===(i=null===(r=this._linkifier.currentLink)||void 0===r?void 0:r.link)||void 0===i?void 0:i.range;if(n)return this._model.selectionStart=[n.start.x-1,n.start.y-1],this._model.selectionStartLength=(0,v.getRangeLength)(n,this._bufferService.cols),this._model.selectionEnd=void 0,!0;var o=this._getMouseBufferCoords(e);return!!o&&(this._selectWordAt(o,t),this._model.selectionEnd=void 0,!0)},t.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},t.prototype.selectLines=function(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()},t.prototype._onTrim=function(e){this._model.onTrim(e)&&this.refresh()},t.prototype._getMouseBufferCoords=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t},t.prototype._getMouseEventScrollAmount=function(e){var t=(0,_.getCoordsRelativeToElement)(e,this._screenElement)[1],r=this._renderService.dimensions.canvasHeight;return t>=0&&t<=r?0:(t>r&&(t-=r),t=Math.min(Math.max(t,-50),50),(t/=50)/Math.abs(t)+Math.round(14*t))},t.prototype.shouldForceSelection=function(e){return a.isMac?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey},t.prototype.onMouseDown=function(e){if(this._mouseDownTimeStamp=e.timeStamp,(2!==e.button||!this.hasSelection)&&0===e.button){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._onIncrementalClick(e):1===e.detail?this._onSingleClick(e):2===e.detail?this._onDoubleClick(e):3===e.detail&&this._onTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}},t.prototype._addMouseDownListeners=function(){var e=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval((function(){return e._dragScroll()}),50)},t.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},t.prototype._onIncrementalClick=function(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))},t.prototype._onSingleClick=function(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),this._model.selectionStart){this._model.selectionEnd=void 0;var t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&0===t.hasWidth(this._model.selectionStart[0])&&this._model.selectionStart[0]++}},t.prototype._onDoubleClick=function(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)},t.prototype._onTripleClick=function(e){var t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))},t.prototype.shouldColumnSelect=function(e){return e.altKey&&!(a.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)},t.prototype._onMouseMove=function(e){if(e.stopImmediatePropagation(),this._model.selectionStart){var t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),this._model.selectionEnd){2===this._activeSelectionMode?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:1===this._activeSelectionMode&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),3!==this._activeSelectionMode&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var r=this._bufferService.buffer;if(this._model.selectionEnd[1]<r.lines.length){var i=r.lines.get(this._model.selectionEnd[1]);i&&0===i.hasWidth(this._model.selectionEnd[0])&&this._model.selectionEnd[0]++}t&&t[0]===this._model.selectionEnd[0]&&t[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},t.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var e=this._bufferService.buffer;this._dragScrollAmount>0?(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(3!==this._activeSelectionMode&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}},t.prototype._onMouseUp=function(e){var t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<500&&e.altKey&&this._optionsService.getOption("altClickMovesCursor")){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var r=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(r&&void 0!==r[0]&&void 0!==r[1]){var i=(0,d.moveToCellSequence)(r[0]-1,r[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(i,!0)}}}else this._fireEventIfSelectionChanged()},t.prototype._fireEventIfSelectionChanged=function(){var e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,r=!(!e||!t||e[0]===t[0]&&e[1]===t[1]);r?e&&t&&(this._oldSelectionStart&&this._oldSelectionEnd&&e[0]===this._oldSelectionStart[0]&&e[1]===this._oldSelectionStart[1]&&t[0]===this._oldSelectionEnd[0]&&t[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(e,t,r)):this._oldHasSelection&&this._fireOnSelectionChange(e,t,r)},t.prototype._fireOnSelectionChange=function(e,t,r){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=r,this._onSelectionChange.fire()},t.prototype._onBufferActivate=function(e){var t=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim((function(e){return t._onTrim(e)}))},t.prototype._convertViewportColToCharacterIndex=function(e,t){for(var r=t[0],i=0;t[0]>=i;i++){var n=e.loadCell(i,this._workCell).getChars().length;0===this._workCell.getWidth()?r--:n>1&&t[0]!==i&&(r+=n-1)}return r},t.prototype.setSelection=function(e,t,r){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=r,this.refresh()},t.prototype.rightClickSelect=function(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())},t.prototype._getWordAt=function(e,t,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),!(e[0]>=this._bufferService.cols)){var n=this._bufferService.buffer,o=n.lines.get(e[1]);if(o){var s=n.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(o,e),c=a,l=e[0]-a,h=0,u=0,f=0,_=0;if(" "===s.charAt(a)){for(;a>0&&" "===s.charAt(a-1);)a--;for(;c<s.length&&" "===s.charAt(c+1);)c++}else{var d=e[0],p=e[0];0===o.getWidth(d)&&(h++,d--),2===o.getWidth(p)&&(u++,p++);var v=o.getString(p).length;for(v>1&&(_+=v-1,c+=v-1);d>0&&a>0&&!this._isCharWordSeparator(o.loadCell(d-1,this._workCell));){o.loadCell(d-1,this._workCell);var g=this._workCell.getChars().length;0===this._workCell.getWidth()?(h++,d--):g>1&&(f+=g-1,a-=g-1),a--,d--}for(;p<o.length&&c+1<s.length&&!this._isCharWordSeparator(o.loadCell(p+1,this._workCell));){o.loadCell(p+1,this._workCell);var y=this._workCell.getChars().length;2===this._workCell.getWidth()?(u++,p++):y>1&&(_+=y-1,c+=y-1),c++,p++}}c++;var m=a+l-h+f,S=Math.min(this._bufferService.cols,c-a+h+u-f-_);if(t||""!==s.slice(a,c).trim()){if(r&&0===m&&32!==o.getCodePoint(0)){var C=n.lines.get(e[1]-1);if(C&&o.isWrapped&&32!==C.getCodePoint(this._bufferService.cols-1)){var b=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(b){var w=this._bufferService.cols-b.start;m-=w,S+=w}}}if(i&&m+S===this._bufferService.cols&&32!==o.getCodePoint(this._bufferService.cols-1)){var L=n.lines.get(e[1]+1);if((null==L?void 0:L.isWrapped)&&32!==L.getCodePoint(0)){var E=this._getWordAt([0,e[1]+1],!1,!1,!0);E&&(S+=E.length)}}return{start:m,length:S}}}}},t.prototype._selectWordAt=function(e,t){var r=this._getWordAt(e,t);if(r){for(;r.start<0;)r.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[r.start,e[1]],this._model.selectionStartLength=r.length}},t.prototype._selectToWordAt=function(e){var t=this._getWordAt(e,!0);if(t){for(var r=e[1];t.start<0;)t.start+=this._bufferService.cols,r--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,r++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,r]}},t.prototype._isCharWordSeparator=function(e){return 0!==e.getWidth()&&this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0},t.prototype._selectLineAt=function(e){var t=this._bufferService.buffer.getWrappedRangeForLine(e);this._model.selectionStart=[0,t.first],this._model.selectionEnd=[this._bufferService.cols,t.last],this._model.selectionStartLength=0},o([s(3,f.IBufferService),s(4,f.ICoreService),s(5,u.IMouseService),s(6,f.IOptionsService),s(7,u.IRenderService)],t)}(p.Disposable);t.SelectionService=m},4725:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IDecorationService=t.ICharacterJoinerService=t.ISoundService=t.ISelectionService=t.IRenderService=t.IMouseService=t.ICoreBrowserService=t.ICharSizeService=void 0;var i=r(8343);t.ICharSizeService=(0,i.createDecorator)("CharSizeService"),t.ICoreBrowserService=(0,i.createDecorator)("CoreBrowserService"),t.IMouseService=(0,i.createDecorator)("MouseService"),t.IRenderService=(0,i.createDecorator)("RenderService"),t.ISelectionService=(0,i.createDecorator)("SelectionService"),t.ISoundService=(0,i.createDecorator)("SoundService"),t.ICharacterJoinerService=(0,i.createDecorator)("CharacterJoinerService"),t.IDecorationService=(0,i.createDecorator)("DecorationService")},357:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.SoundService=void 0;var o=r(2585),s=function(){function e(e){this._optionsService=e}return Object.defineProperty(e,"audioContext",{get:function(){if(!e._audioContext){var t=window.AudioContext||window.webkitAudioContext;if(!t)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;e._audioContext=new t}return e._audioContext},enumerable:!1,configurable:!0}),e.prototype.playBellSound=function(){var t=e.audioContext;if(t){var r=t.createBufferSource();t.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)),(function(e){r.buffer=e,r.connect(t.destination),r.start(0)}))}},e.prototype._base64ToArrayBuffer=function(e){for(var t=window.atob(e),r=t.length,i=new Uint8Array(r),n=0;n<r;n++)i[n]=t.charCodeAt(n);return i.buffer},e.prototype._removeMimeType=function(e){return e.split(",")[1]},e=i([n(0,o.IOptionsService)],e)}();t.SoundService=s},6349:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CircularList=void 0;var i=r(8460),n=function(){function e(e){this._maxLength=e,this.onDeleteEmitter=new i.EventEmitter,this.onInsertEmitter=new i.EventEmitter,this.onTrimEmitter=new i.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(e.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){if(this._maxLength!==e){for(var t=new Array(e),r=0;r<Math.min(e,this.length);r++)t[r]=this._array[this._getCyclicIndex(r)];this._array=t,this._maxLength=e,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},set:function(e){if(e>this._length)for(var t=this._length;t<e;t++)this._array[t]=void 0;this._length=e},enumerable:!1,configurable:!0}),e.prototype.get=function(e){return this._array[this._getCyclicIndex(e)]},e.prototype.set=function(e,t){this._array[this._getCyclicIndex(e)]=t},e.prototype.push=function(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},e.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(e.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),e.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},e.prototype.splice=function(e,t){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];if(t){for(var n=e;n<this._length-t;n++)this._array[this._getCyclicIndex(n)]=this._array[this._getCyclicIndex(n+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(n=this._length-1;n>=e;n--)this._array[this._getCyclicIndex(n+r.length)]=this._array[this._getCyclicIndex(n)];for(n=0;n<r.length;n++)this._array[this._getCyclicIndex(e+n)]=r[n];if(r.length&&this.onInsertEmitter.fire({index:e,amount:r.length}),this._length+r.length>this._maxLength){var o=this._length+r.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=r.length},e.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)},e.prototype.shiftElements=function(e,t,r){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+r<0)throw new Error("Cannot shift elements in list beyond index 0");if(r>0){for(var i=t-1;i>=0;i--)this.set(e+i+r,this.get(e+i));var n=e+t+r-this._length;if(n>0)for(this._length+=n;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(i=0;i<t;i++)this.set(e+i+r,this.get(e+i))}},e.prototype._getCyclicIndex=function(e){return(this._startIndex+e)%this._maxLength},e}();t.CircularList=n},1439:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.clone=void 0,t.clone=function e(t,r){if(void 0===r&&(r=5),"object"!=typeof t)return t;var i=Array.isArray(t)?[]:{};for(var n in t)i[n]=r<=1?t[n]:t[n]&&e(t[n],r-1);return i}},8969:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.CoreTerminal=void 0;var o=r(844),s=r(2585),a=r(4348),c=r(7866),l=r(744),h=r(7302),u=r(6975),f=r(8460),_=r(1753),d=r(3730),p=r(1480),v=r(7994),g=r(9282),y=r(5435),m=r(5981),S=!1,C=function(e){function t(t){var r=e.call(this)||this;return r._onBinary=new f.EventEmitter,r._onData=new f.EventEmitter,r._onLineFeed=new f.EventEmitter,r._onResize=new f.EventEmitter,r._onScroll=new f.EventEmitter,r._instantiationService=new a.InstantiationService,r.optionsService=new h.OptionsService(t),r._instantiationService.setService(s.IOptionsService,r.optionsService),r._bufferService=r.register(r._instantiationService.createInstance(l.BufferService)),r._instantiationService.setService(s.IBufferService,r._bufferService),r._logService=r._instantiationService.createInstance(c.LogService),r._instantiationService.setService(s.ILogService,r._logService),r.coreService=r.register(r._instantiationService.createInstance(u.CoreService,(function(){return r.scrollToBottom()}))),r._instantiationService.setService(s.ICoreService,r.coreService),r.coreMouseService=r._instantiationService.createInstance(_.CoreMouseService),r._instantiationService.setService(s.ICoreMouseService,r.coreMouseService),r._dirtyRowService=r._instantiationService.createInstance(d.DirtyRowService),r._instantiationService.setService(s.IDirtyRowService,r._dirtyRowService),r.unicodeService=r._instantiationService.createInstance(p.UnicodeService),r._instantiationService.setService(s.IUnicodeService,r.unicodeService),r._charsetService=r._instantiationService.createInstance(v.CharsetService),r._instantiationService.setService(s.ICharsetService,r._charsetService),r._inputHandler=new y.InputHandler(r._bufferService,r._charsetService,r.coreService,r._dirtyRowService,r._logService,r.optionsService,r.coreMouseService,r.unicodeService),r.register((0,f.forwardEvent)(r._inputHandler.onLineFeed,r._onLineFeed)),r.register(r._inputHandler),r.register((0,f.forwardEvent)(r._bufferService.onResize,r._onResize)),r.register((0,f.forwardEvent)(r.coreService.onData,r._onData)),r.register((0,f.forwardEvent)(r.coreService.onBinary,r._onBinary)),r.register(r.optionsService.onOptionChange((function(e){return r._updateOptions(e)}))),r.register(r._bufferService.onScroll((function(e){r._onScroll.fire({position:r._bufferService.buffer.ydisp,source:0}),r._dirtyRowService.markRangeDirty(r._bufferService.buffer.scrollTop,r._bufferService.buffer.scrollBottom)}))),r.register(r._inputHandler.onScroll((function(e){r._onScroll.fire({position:r._bufferService.buffer.ydisp,source:0}),r._dirtyRowService.markRangeDirty(r._bufferService.buffer.scrollTop,r._bufferService.buffer.scrollBottom)}))),r._writeBuffer=new m.WriteBuffer((function(e,t){return r._inputHandler.parse(e,t)})),r}return n(t,e),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){var e=this;return this._onScrollApi||(this._onScrollApi=new f.EventEmitter,this.register(this._onScroll.event((function(t){var r;null===(r=e._onScrollApi)||void 0===r||r.fire(t.position)})))),this._onScrollApi.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.optionsService.options},set:function(e){for(var t in e)this.optionsService.options[t]=e[t]},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){var t;this._isDisposed||(e.prototype.dispose.call(this),null===(t=this._windowsMode)||void 0===t||t.dispose(),this._windowsMode=void 0)},t.prototype.write=function(e,t){this._writeBuffer.write(e,t)},t.prototype.writeSync=function(e,t){this._logService.logLevel<=s.LogLevelEnum.WARN&&!S&&(this._logService.warn("writeSync is unreliable and will be removed soon."),S=!0),this._writeBuffer.writeSync(e,t)},t.prototype.resize=function(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,l.MINIMUM_COLS),t=Math.max(t,l.MINIMUM_ROWS),this._bufferService.resize(e,t))},t.prototype.scroll=function(e,t){void 0===t&&(t=!1),this._bufferService.scroll(e,t)},t.prototype.scrollLines=function(e,t,r){this._bufferService.scrollLines(e,t,r)},t.prototype.scrollPages=function(e){this._bufferService.scrollPages(e)},t.prototype.scrollToTop=function(){this._bufferService.scrollToTop()},t.prototype.scrollToBottom=function(){this._bufferService.scrollToBottom()},t.prototype.scrollToLine=function(e){this._bufferService.scrollToLine(e)},t.prototype.registerEscHandler=function(e,t){return this._inputHandler.registerEscHandler(e,t)},t.prototype.registerDcsHandler=function(e,t){return this._inputHandler.registerDcsHandler(e,t)},t.prototype.registerCsiHandler=function(e,t){return this._inputHandler.registerCsiHandler(e,t)},t.prototype.registerOscHandler=function(e,t){return this._inputHandler.registerOscHandler(e,t)},t.prototype._setup=function(){this.optionsService.rawOptions.windowsMode&&this._enableWindowsMode()},t.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()},t.prototype._updateOptions=function(e){var t;switch(e){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.rawOptions.windowsMode?this._enableWindowsMode():(null===(t=this._windowsMode)||void 0===t||t.dispose(),this._windowsMode=void 0)}},t.prototype._enableWindowsMode=function(){var e=this;if(!this._windowsMode){var t=[];t.push(this.onLineFeed(g.updateWindowsModeWrappedState.bind(null,this._bufferService))),t.push(this.registerCsiHandler({final:"H"},(function(){return(0,g.updateWindowsModeWrappedState)(e._bufferService),!1}))),this._windowsMode={dispose:function(){for(var e=0,r=t;e<r.length;e++)r[e].dispose()}}}},t}(o.Disposable);t.CoreTerminal=C},8460:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.forwardEvent=t.EventEmitter=void 0;var r=function(){function e(){this._listeners=[],this._disposed=!1}return Object.defineProperty(e.prototype,"event",{get:function(){var e=this;return this._event||(this._event=function(t){return e._listeners.push(t),{dispose:function(){if(!e._disposed)for(var r=0;r<e._listeners.length;r++)if(e._listeners[r]===t)return void e._listeners.splice(r,1)}}}),this._event},enumerable:!1,configurable:!0}),e.prototype.fire=function(e,t){for(var r=[],i=0;i<this._listeners.length;i++)r.push(this._listeners[i]);for(i=0;i<r.length;i++)r[i].call(void 0,e,t)},e.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},e}();t.EventEmitter=r,t.forwardEvent=function(e,t){return e((function(e){return t.fire(e)}))}},5435:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.InputHandler=t.WindowsOptionsReportType=void 0;var o,s=r(2584),a=r(7116),c=r(2015),l=r(844),h=r(8273),u=r(482),f=r(8437),_=r(8460),d=r(643),p=r(511),v=r(3734),g=r(2585),y=r(6242),m=r(6351),S=r(5941),C={"(":0,")":1,"*":2,"+":3,"-":1,".":2},b=131072;function w(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}!function(e){e[e.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",e[e.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"}(o=t.WindowsOptionsReportType||(t.WindowsOptionsReportType={}));var L=function(){function e(e,t,r,i){this._bufferService=e,this._coreService=t,this._logService=r,this._optionsService=i,this._data=new Uint32Array(0)}return e.prototype.hook=function(e){this._data=new Uint32Array(0)},e.prototype.put=function(e,t,r){this._data=(0,h.concat)(this._data,e.subarray(t,r))},e.prototype.unhook=function(e){if(!e)return this._data=new Uint32Array(0),!0;var t=(0,u.utf32ToString)(this._data);switch(this._data=new Uint32Array(0),t){case'"q':this._coreService.triggerDataEvent(s.C0.ESC+'P1$r0"q'+s.C0.ESC+"\\");break;case'"p':this._coreService.triggerDataEvent(s.C0.ESC+'P1$r61;1"p'+s.C0.ESC+"\\");break;case"r":var r=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";this._coreService.triggerDataEvent(s.C0.ESC+"P1$r"+r+s.C0.ESC+"\\");break;case"m":this._coreService.triggerDataEvent(s.C0.ESC+"P1$r0m"+s.C0.ESC+"\\");break;case" q":var i={block:2,underline:4,bar:6}[this._optionsService.rawOptions.cursorStyle];i-=this._optionsService.rawOptions.cursorBlink?1:0,this._coreService.triggerDataEvent(s.C0.ESC+"P1$r"+i+" q"+s.C0.ESC+"\\");break;default:this._logService.debug("Unknown DCS $q %s",t),this._coreService.triggerDataEvent(s.C0.ESC+"P0$r"+s.C0.ESC+"\\")}return!0},e}(),E=function(e){function t(t,r,i,n,o,l,h,d,v){void 0===v&&(v=new c.EscapeSequenceParser);var g=e.call(this)||this;g._bufferService=t,g._charsetService=r,g._coreService=i,g._dirtyRowService=n,g._logService=o,g._optionsService=l,g._coreMouseService=h,g._unicodeService=d,g._parser=v,g._parseBuffer=new Uint32Array(4096),g._stringDecoder=new u.StringToUtf32,g._utf8Decoder=new u.Utf8ToUtf32,g._workCell=new p.CellData,g._windowTitle="",g._iconName="",g._windowTitleStack=[],g._iconNameStack=[],g._curAttrData=f.DEFAULT_ATTR_DATA.clone(),g._eraseAttrDataInternal=f.DEFAULT_ATTR_DATA.clone(),g._onRequestBell=new _.EventEmitter,g._onRequestRefreshRows=new _.EventEmitter,g._onRequestReset=new _.EventEmitter,g._onRequestSendFocus=new _.EventEmitter,g._onRequestSyncScrollBar=new _.EventEmitter,g._onRequestWindowsOptionsReport=new _.EventEmitter,g._onA11yChar=new _.EventEmitter,g._onA11yTab=new _.EventEmitter,g._onCursorMove=new _.EventEmitter,g._onLineFeed=new _.EventEmitter,g._onScroll=new _.EventEmitter,g._onTitleChange=new _.EventEmitter,g._onColor=new _.EventEmitter,g._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},g._specialColors=[256,257,258],g.register(g._parser),g._activeBuffer=g._bufferService.buffer,g.register(g._bufferService.buffers.onBufferActivate((function(e){return g._activeBuffer=e.activeBuffer}))),g._parser.setCsiHandlerFallback((function(e,t){g._logService.debug("Unknown CSI code: ",{identifier:g._parser.identToString(e),params:t.toArray()})})),g._parser.setEscHandlerFallback((function(e){g._logService.debug("Unknown ESC code: ",{identifier:g._parser.identToString(e)})})),g._parser.setExecuteHandlerFallback((function(e){g._logService.debug("Unknown EXECUTE code: ",{code:e})})),g._parser.setOscHandlerFallback((function(e,t,r){g._logService.debug("Unknown OSC code: ",{identifier:e,action:t,data:r})})),g._parser.setDcsHandlerFallback((function(e,t,r){"HOOK"===t&&(r=r.toArray()),g._logService.debug("Unknown DCS code: ",{identifier:g._parser.identToString(e),action:t,payload:r})})),g._parser.setPrintHandler((function(e,t,r){return g.print(e,t,r)})),g._parser.registerCsiHandler({final:"@"},(function(e){return g.insertChars(e)})),g._parser.registerCsiHandler({intermediates:" ",final:"@"},(function(e){return g.scrollLeft(e)})),g._parser.registerCsiHandler({final:"A"},(function(e){return g.cursorUp(e)})),g._parser.registerCsiHandler({intermediates:" ",final:"A"},(function(e){return g.scrollRight(e)})),g._parser.registerCsiHandler({final:"B"},(function(e){return g.cursorDown(e)})),g._parser.registerCsiHandler({final:"C"},(function(e){return g.cursorForward(e)})),g._parser.registerCsiHandler({final:"D"},(function(e){return g.cursorBackward(e)})),g._parser.registerCsiHandler({final:"E"},(function(e){return g.cursorNextLine(e)})),g._parser.registerCsiHandler({final:"F"},(function(e){return g.cursorPrecedingLine(e)})),g._parser.registerCsiHandler({final:"G"},(function(e){return g.cursorCharAbsolute(e)})),g._parser.registerCsiHandler({final:"H"},(function(e){return g.cursorPosition(e)})),g._parser.registerCsiHandler({final:"I"},(function(e){return g.cursorForwardTab(e)})),g._parser.registerCsiHandler({final:"J"},(function(e){return g.eraseInDisplay(e)})),g._parser.registerCsiHandler({prefix:"?",final:"J"},(function(e){return g.eraseInDisplay(e)})),g._parser.registerCsiHandler({final:"K"},(function(e){return g.eraseInLine(e)})),g._parser.registerCsiHandler({prefix:"?",final:"K"},(function(e){return g.eraseInLine(e)})),g._parser.registerCsiHandler({final:"L"},(function(e){return g.insertLines(e)})),g._parser.registerCsiHandler({final:"M"},(function(e){return g.deleteLines(e)})),g._parser.registerCsiHandler({final:"P"},(function(e){return g.deleteChars(e)})),g._parser.registerCsiHandler({final:"S"},(function(e){return g.scrollUp(e)})),g._parser.registerCsiHandler({final:"T"},(function(e){return g.scrollDown(e)})),g._parser.registerCsiHandler({final:"X"},(function(e){return g.eraseChars(e)})),g._parser.registerCsiHandler({final:"Z"},(function(e){return g.cursorBackwardTab(e)})),g._parser.registerCsiHandler({final:"`"},(function(e){return g.charPosAbsolute(e)})),g._parser.registerCsiHandler({final:"a"},(function(e){return g.hPositionRelative(e)})),g._parser.registerCsiHandler({final:"b"},(function(e){return g.repeatPrecedingCharacter(e)})),g._parser.registerCsiHandler({final:"c"},(function(e){return g.sendDeviceAttributesPrimary(e)})),g._parser.registerCsiHandler({prefix:">",final:"c"},(function(e){return g.sendDeviceAttributesSecondary(e)})),g._parser.registerCsiHandler({final:"d"},(function(e){return g.linePosAbsolute(e)})),g._parser.registerCsiHandler({final:"e"},(function(e){return g.vPositionRelative(e)})),g._parser.registerCsiHandler({final:"f"},(function(e){return g.hVPosition(e)})),g._parser.registerCsiHandler({final:"g"},(function(e){return g.tabClear(e)})),g._parser.registerCsiHandler({final:"h"},(function(e){return g.setMode(e)})),g._parser.registerCsiHandler({prefix:"?",final:"h"},(function(e){return g.setModePrivate(e)})),g._parser.registerCsiHandler({final:"l"},(function(e){return g.resetMode(e)})),g._parser.registerCsiHandler({prefix:"?",final:"l"},(function(e){return g.resetModePrivate(e)})),g._parser.registerCsiHandler({final:"m"},(function(e){return g.charAttributes(e)})),g._parser.registerCsiHandler({final:"n"},(function(e){return g.deviceStatus(e)})),g._parser.registerCsiHandler({prefix:"?",final:"n"},(function(e){return g.deviceStatusPrivate(e)})),g._parser.registerCsiHandler({intermediates:"!",final:"p"},(function(e){return g.softReset(e)})),g._parser.registerCsiHandler({intermediates:" ",final:"q"},(function(e){return g.setCursorStyle(e)})),g._parser.registerCsiHandler({final:"r"},(function(e){return g.setScrollRegion(e)})),g._parser.registerCsiHandler({final:"s"},(function(e){return g.saveCursor(e)})),g._parser.registerCsiHandler({final:"t"},(function(e){return g.windowOptions(e)})),g._parser.registerCsiHandler({final:"u"},(function(e){return g.restoreCursor(e)})),g._parser.registerCsiHandler({intermediates:"'",final:"}"},(function(e){return g.insertColumns(e)})),g._parser.registerCsiHandler({intermediates:"'",final:"~"},(function(e){return g.deleteColumns(e)})),g._parser.setExecuteHandler(s.C0.BEL,(function(){return g.bell()})),g._parser.setExecuteHandler(s.C0.LF,(function(){return g.lineFeed()})),g._parser.setExecuteHandler(s.C0.VT,(function(){return g.lineFeed()})),g._parser.setExecuteHandler(s.C0.FF,(function(){return g.lineFeed()})),g._parser.setExecuteHandler(s.C0.CR,(function(){return g.carriageReturn()})),g._parser.setExecuteHandler(s.C0.BS,(function(){return g.backspace()})),g._parser.setExecuteHandler(s.C0.HT,(function(){return g.tab()})),g._parser.setExecuteHandler(s.C0.SO,(function(){return g.shiftOut()})),g._parser.setExecuteHandler(s.C0.SI,(function(){return g.shiftIn()})),g._parser.setExecuteHandler(s.C1.IND,(function(){return g.index()})),g._parser.setExecuteHandler(s.C1.NEL,(function(){return g.nextLine()})),g._parser.setExecuteHandler(s.C1.HTS,(function(){return g.tabSet()})),g._parser.registerOscHandler(0,new y.OscHandler((function(e){return g.setTitle(e),g.setIconName(e),!0}))),g._parser.registerOscHandler(1,new y.OscHandler((function(e){return g.setIconName(e)}))),g._parser.registerOscHandler(2,new y.OscHandler((function(e){return g.setTitle(e)}))),g._parser.registerOscHandler(4,new y.OscHandler((function(e){return g.setOrReportIndexedColor(e)}))),g._parser.registerOscHandler(10,new y.OscHandler((function(e){return g.setOrReportFgColor(e)}))),g._parser.registerOscHandler(11,new y.OscHandler((function(e){return g.setOrReportBgColor(e)}))),g._parser.registerOscHandler(12,new y.OscHandler((function(e){return g.setOrReportCursorColor(e)}))),g._parser.registerOscHandler(104,new y.OscHandler((function(e){return g.restoreIndexedColor(e)}))),g._parser.registerOscHandler(110,new y.OscHandler((function(e){return g.restoreFgColor(e)}))),g._parser.registerOscHandler(111,new y.OscHandler((function(e){return g.restoreBgColor(e)}))),g._parser.registerOscHandler(112,new y.OscHandler((function(e){return g.restoreCursorColor(e)}))),g._parser.registerEscHandler({final:"7"},(function(){return g.saveCursor()})),g._parser.registerEscHandler({final:"8"},(function(){return g.restoreCursor()})),g._parser.registerEscHandler({final:"D"},(function(){return g.index()})),g._parser.registerEscHandler({final:"E"},(function(){return g.nextLine()})),g._parser.registerEscHandler({final:"H"},(function(){return g.tabSet()})),g._parser.registerEscHandler({final:"M"},(function(){return g.reverseIndex()})),g._parser.registerEscHandler({final:"="},(function(){return g.keypadApplicationMode()})),g._parser.registerEscHandler({final:">"},(function(){return g.keypadNumericMode()})),g._parser.registerEscHandler({final:"c"},(function(){return g.fullReset()})),g._parser.registerEscHandler({final:"n"},(function(){return g.setgLevel(2)})),g._parser.registerEscHandler({final:"o"},(function(){return g.setgLevel(3)})),g._parser.registerEscHandler({final:"|"},(function(){return g.setgLevel(3)})),g._parser.registerEscHandler({final:"}"},(function(){return g.setgLevel(2)})),g._parser.registerEscHandler({final:"~"},(function(){return g.setgLevel(1)})),g._parser.registerEscHandler({intermediates:"%",final:"@"},(function(){return g.selectDefaultCharset()})),g._parser.registerEscHandler({intermediates:"%",final:"G"},(function(){return g.selectDefaultCharset()}));var m=function(e){S._parser.registerEscHandler({intermediates:"(",final:e},(function(){return g.selectCharset("("+e)})),S._parser.registerEscHandler({intermediates:")",final:e},(function(){return g.selectCharset(")"+e)})),S._parser.registerEscHandler({intermediates:"*",final:e},(function(){return g.selectCharset("*"+e)})),S._parser.registerEscHandler({intermediates:"+",final:e},(function(){return g.selectCharset("+"+e)})),S._parser.registerEscHandler({intermediates:"-",final:e},(function(){return g.selectCharset("-"+e)})),S._parser.registerEscHandler({intermediates:".",final:e},(function(){return g.selectCharset("."+e)})),S._parser.registerEscHandler({intermediates:"/",final:e},(function(){return g.selectCharset("/"+e)}))},S=this;for(var C in a.CHARSETS)m(C);return g._parser.registerEscHandler({intermediates:"#",final:"8"},(function(){return g.screenAlignmentPattern()})),g._parser.setErrorHandler((function(e){return g._logService.error("Parsing error: ",e),e})),g._parser.registerDcsHandler({intermediates:"$",final:"q"},new L(g._bufferService,g._coreService,g._logService,g._optionsService)),g}return n(t,e),Object.defineProperty(t.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestSendFocus",{get:function(){return this._onRequestSendFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onColor",{get:function(){return this._onColor.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){e.prototype.dispose.call(this)},t.prototype._preserveStack=function(e,t,r,i){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=r,this._parseStack.position=i},t.prototype._logSlowResolvingAsync=function(e){this._logService.logLevel<=g.LogLevelEnum.WARN&&Promise.race([e,new Promise((function(e,t){return setTimeout((function(){return t("#SLOW_TIMEOUT")}),5e3)}))]).catch((function(e){if("#SLOW_TIMEOUT"!==e)throw e;console.warn("async parser handler taking longer than 5000 ms")}))},t.prototype.parse=function(e,t){var r,i=this._activeBuffer.x,n=this._activeBuffer.y,o=0,s=this._parseStack.paused;if(s){if(r=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(r),r;i=this._parseStack.cursorStartX,n=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>b&&(o=this._parseStack.position+b)}if(this._logService.logLevel<=g.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+("string"==typeof e?' "'+e+'"':' "'+Array.prototype.map.call(e,(function(e){return String.fromCharCode(e)})).join("")+'"'),"string"==typeof e?e.split("").map((function(e){return e.charCodeAt(0)})):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<b&&(this._parseBuffer=new Uint32Array(Math.min(e.length,b))),s||this._dirtyRowService.clearRange(),e.length>b)for(var a=o;a<e.length;a+=b){var c=a+b<e.length?a+b:e.length,l="string"==typeof e?this._stringDecoder.decode(e.substring(a,c),this._parseBuffer):this._utf8Decoder.decode(e.subarray(a,c),this._parseBuffer);if(r=this._parser.parse(this._parseBuffer,l))return this._preserveStack(i,n,l,a),this._logSlowResolvingAsync(r),r}else if(!s&&(l="string"==typeof e?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer),r=this._parser.parse(this._parseBuffer,l)))return this._preserveStack(i,n,l,0),this._logSlowResolvingAsync(r),r;this._activeBuffer.x===i&&this._activeBuffer.y===n||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},t.prototype.print=function(e,t,r){var i,n,o=this._charsetService.charset,s=this._optionsService.rawOptions.screenReaderMode,a=this._bufferService.cols,c=this._coreService.decPrivateModes.wraparound,l=this._coreService.modes.insertMode,h=this._curAttrData,f=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowService.markDirty(this._activeBuffer.y),this._activeBuffer.x&&r-t>0&&2===f.getWidth(this._activeBuffer.x-1)&&f.setCellFromCodePoint(this._activeBuffer.x-1,0,1,h.fg,h.bg,h.extended);for(var _=t;_<r;++_){if(i=e[_],n=this._unicodeService.wcwidth(i),i<127&&o){var p=o[String.fromCharCode(i)];p&&(i=p.charCodeAt(0))}if(s&&this._onA11yChar.fire((0,u.stringFromCodePoint)(i)),n||!this._activeBuffer.x){if(this._activeBuffer.x+n-1>=a)if(c){for(;this._activeBuffer.x<a;)f.setCellFromCodePoint(this._activeBuffer.x++,0,1,h.fg,h.bg,h.extended);this._activeBuffer.x=0,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),f=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=a-1,2===n)continue;if(l&&(f.insertCells(this._activeBuffer.x,n,this._activeBuffer.getNullCell(h),h),2===f.getWidth(a-1)&&f.setCellFromCodePoint(a-1,d.NULL_CELL_CODE,d.NULL_CELL_WIDTH,h.fg,h.bg,h.extended)),f.setCellFromCodePoint(this._activeBuffer.x++,i,n,h.fg,h.bg,h.extended),n>0)for(;--n;)f.setCellFromCodePoint(this._activeBuffer.x++,0,0,h.fg,h.bg,h.extended)}else f.getWidth(this._activeBuffer.x-1)?f.addCodepointToCell(this._activeBuffer.x-1,i):f.addCodepointToCell(this._activeBuffer.x-2,i)}r-t>0&&(f.loadCell(this._activeBuffer.x-1,this._workCell),2===this._workCell.getWidth()||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<a&&r-t>0&&0===f.getWidth(this._activeBuffer.x)&&!f.hasContent(this._activeBuffer.x)&&f.setCellFromCodePoint(this._activeBuffer.x,0,1,h.fg,h.bg,h.extended),this._dirtyRowService.markDirty(this._activeBuffer.y)},t.prototype.registerCsiHandler=function(e,t){var r=this;return"t"!==e.final||e.prefix||e.intermediates?this._parser.registerCsiHandler(e,t):this._parser.registerCsiHandler(e,(function(e){return!w(e.params[0],r._optionsService.rawOptions.windowOptions)||t(e)}))},t.prototype.registerDcsHandler=function(e,t){return this._parser.registerDcsHandler(e,new m.DcsHandler(t))},t.prototype.registerEscHandler=function(e,t){return this._parser.registerEscHandler(e,t)},t.prototype.registerOscHandler=function(e,t){return this._parser.registerOscHandler(e,new y.OscHandler(t))},t.prototype.bell=function(){return this._onRequestBell.fire(),!0},t.prototype.lineFeed=function(){return this._dirtyRowService.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowService.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0},t.prototype.carriageReturn=function(){return this._activeBuffer.x=0,!0},t.prototype.backspace=function(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(0===this._activeBuffer.x&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&(null===(e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))||void 0===e?void 0:e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0},t.prototype.tab=function(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;var e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0},t.prototype.shiftOut=function(){return this._charsetService.setgLevel(1),!0},t.prototype.shiftIn=function(){return this._charsetService.setgLevel(0),!0},t.prototype._restrictCursor=function(e){void 0===e&&(e=this._bufferService.cols-1),this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowService.markDirty(this._activeBuffer.y)},t.prototype._setCursor=function(e,t){this._dirtyRowService.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowService.markDirty(this._activeBuffer.y)},t.prototype._moveCursor=function(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)},t.prototype.cursorUp=function(e){var t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0},t.prototype.cursorDown=function(e){var t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0},t.prototype.cursorForward=function(e){return this._moveCursor(e.params[0]||1,0),!0},t.prototype.cursorBackward=function(e){return this._moveCursor(-(e.params[0]||1),0),!0},t.prototype.cursorNextLine=function(e){return this.cursorDown(e),this._activeBuffer.x=0,!0},t.prototype.cursorPrecedingLine=function(e){return this.cursorUp(e),this._activeBuffer.x=0,!0},t.prototype.cursorCharAbsolute=function(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0},t.prototype.cursorPosition=function(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0},t.prototype.charPosAbsolute=function(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0},t.prototype.hPositionRelative=function(e){return this._moveCursor(e.params[0]||1,0),!0},t.prototype.linePosAbsolute=function(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0},t.prototype.vPositionRelative=function(e){return this._moveCursor(0,e.params[0]||1),!0},t.prototype.hVPosition=function(e){return this.cursorPosition(e),!0},t.prototype.tabClear=function(e){var t=e.params[0];return 0===t?delete this._activeBuffer.tabs[this._activeBuffer.x]:3===t&&(this._activeBuffer.tabs={}),!0},t.prototype.cursorForwardTab=function(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var t=e.params[0]||1;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0},t.prototype.cursorBackwardTab=function(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;for(var t=e.params[0]||1;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0},t.prototype._eraseInBufferLine=function(e,t,r,i){void 0===i&&(i=!1);var n=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);n.replaceCells(t,r,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i&&(n.isWrapped=!1)},t.prototype._resetBufferLine=function(e){var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);t.fill(this._activeBuffer.getNullCell(this._eraseAttrData())),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),t.isWrapped=!1},t.prototype.eraseInDisplay=function(e){var t;switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:for(t=this._activeBuffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t++,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x);t<this._bufferService.rows;t++)this._resetBufferLine(t);this._dirtyRowService.markDirty(t);break;case 1:for(t=this._activeBuffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t,0,this._activeBuffer.x+1,!0),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowService.markDirty(t-1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 3:var r=this._activeBuffer.lines.length-this._bufferService.rows;r>0&&(this._activeBuffer.lines.trimStart(r),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-r,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-r,0),this._onScroll.fire(0))}return!0},t.prototype.eraseInLine=function(e){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,0===this._activeBuffer.x);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0)}return this._dirtyRowService.markDirty(this._activeBuffer.y),!0},t.prototype.insertLines=function(e){this._restrictCursor();var t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var r=this._activeBuffer.ybase+this._activeBuffer.y,i=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-i+1;t--;)this._activeBuffer.lines.splice(n-1,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},t.prototype.deleteLines=function(e){this._restrictCursor();var t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;var r,i=this._activeBuffer.ybase+this._activeBuffer.y;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0},t.prototype.insertChars=function(e){this._restrictCursor();var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},t.prototype.deleteChars=function(e){this._restrictCursor();var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},t.prototype.scrollUp=function(e){for(var t=e.params[0]||1;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.scrollDown=function(e){for(var t=e.params[0]||1;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(f.DEFAULT_ATTR_DATA));return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.scrollLeft=function(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var t=e.params[0]||1,r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){var i=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);i.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.scrollRight=function(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var t=e.params[0]||1,r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){var i=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);i.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.insertColumns=function(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var t=e.params[0]||1,r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){var i=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);i.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.deleteColumns=function(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;for(var t=e.params[0]||1,r=this._activeBuffer.scrollTop;r<=this._activeBuffer.scrollBottom;++r){var i=this._activeBuffer.lines.get(this._activeBuffer.ybase+r);i.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),i.isWrapped=!1}return this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0},t.prototype.eraseChars=function(e){this._restrictCursor();var t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._activeBuffer.y)),!0},t.prototype.repeatPrecedingCharacter=function(e){if(!this._parser.precedingCodepoint)return!0;for(var t=e.params[0]||1,r=new Uint32Array(t),i=0;i<t;++i)r[i]=this._parser.precedingCodepoint;return this.print(r,0,r.length),!0},t.prototype.sendDeviceAttributesPrimary=function(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(s.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(s.C0.ESC+"[?6c")),!0},t.prototype.sendDeviceAttributesSecondary=function(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(s.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(s.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(s.C0.ESC+"[>83;40003;0c")),!0},t.prototype._is=function(e){return 0===(this._optionsService.rawOptions.termName+"").indexOf(e)},t.prototype.setMode=function(e){for(var t=0;t<e.length;t++)4===e.params[t]&&(this._coreService.modes.insertMode=!0);return!0},t.prototype.setModePrivate=function(e){for(var t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,a.DEFAULT_CHARSET),this._charsetService.setgCharset(1,a.DEFAULT_CHARSET),this._charsetService.setgCharset(2,a.DEFAULT_CHARSET),this._charsetService.setgCharset(3,a.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0},t.prototype.resetMode=function(e){for(var t=0;t<e.length;t++)4===e.params[t]&&(this._coreService.modes.insertMode=!1);return!0},t.prototype.resetModePrivate=function(e){for(var t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),1049===e.params[t]&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0},t.prototype._updateAttrColor=function(e,t,r,i,n){return 2===t?(e|=50331648,e&=-16777216,e|=v.AttributeData.fromColorRGB([r,i,n])):5===t&&(e&=-50331904,e|=33554432|255&r),e},t.prototype._extractColor=function(e,t,r){var i=[0,0,-1,0,0,0],n=0,o=0;do{if(i[o+n]=e.params[t+o],e.hasSubParams(t+o)){var s=e.getSubParams(t+o),a=0;do{5===i[1]&&(n=1),i[o+a+1+n]=s[a]}while(++a<s.length&&a+o+1+n<i.length);break}if(5===i[1]&&o+n>=2||2===i[1]&&o+n>=5)break;i[1]&&(n=1)}while(++o+t<e.length&&o+n<i.length);for(a=2;a<i.length;++a)-1===i[a]&&(i[a]=0);switch(i[0]){case 38:r.fg=this._updateAttrColor(r.fg,i[1],i[3],i[4],i[5]);break;case 48:r.bg=this._updateAttrColor(r.bg,i[1],i[3],i[4],i[5]);break;case 58:r.extended=r.extended.clone(),r.extended.underlineColor=this._updateAttrColor(r.extended.underlineColor,i[1],i[3],i[4],i[5])}return o},t.prototype._processUnderline=function(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,0===e&&(t.fg&=-268435457),t.updateExtended()},t.prototype.charAttributes=function(e){if(1===e.length&&0===e.params[0])return this._curAttrData.fg=f.DEFAULT_ATTR_DATA.fg,this._curAttrData.bg=f.DEFAULT_ATTR_DATA.bg,!0;for(var t,r=e.length,i=this._curAttrData,n=0;n<r;n++)(t=e.params[n])>=30&&t<=37?(i.fg&=-50331904,i.fg|=16777216|t-30):t>=40&&t<=47?(i.bg&=-50331904,i.bg|=16777216|t-40):t>=90&&t<=97?(i.fg&=-50331904,i.fg|=16777224|t-90):t>=100&&t<=107?(i.bg&=-50331904,i.bg|=16777224|t-100):0===t?(i.fg=f.DEFAULT_ATTR_DATA.fg,i.bg=f.DEFAULT_ATTR_DATA.bg):1===t?i.fg|=134217728:3===t?i.bg|=67108864:4===t?(i.fg|=268435456,this._processUnderline(e.hasSubParams(n)?e.getSubParams(n)[0]:1,i)):5===t?i.fg|=536870912:7===t?i.fg|=67108864:8===t?i.fg|=1073741824:9===t?i.fg|=2147483648:2===t?i.bg|=134217728:21===t?this._processUnderline(2,i):22===t?(i.fg&=-134217729,i.bg&=-134217729):23===t?i.bg&=-67108865:24===t?i.fg&=-268435457:25===t?i.fg&=-536870913:27===t?i.fg&=-67108865:28===t?i.fg&=-1073741825:29===t?i.fg&=2147483647:39===t?(i.fg&=-67108864,i.fg|=16777215&f.DEFAULT_ATTR_DATA.fg):49===t?(i.bg&=-67108864,i.bg|=16777215&f.DEFAULT_ATTR_DATA.bg):38===t||48===t||58===t?n+=this._extractColor(e,n,i):59===t?(i.extended=i.extended.clone(),i.extended.underlineColor=-1,i.updateExtended()):100===t?(i.fg&=-67108864,i.fg|=16777215&f.DEFAULT_ATTR_DATA.fg,i.bg&=-67108864,i.bg|=16777215&f.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",t);return!0},t.prototype.deviceStatus=function(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(s.C0.ESC+"[0n");break;case 6:var t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(s.C0.ESC+"["+t+";"+r+"R")}return!0},t.prototype.deviceStatusPrivate=function(e){if(6===e.params[0]){var t=this._activeBuffer.y+1,r=this._activeBuffer.x+1;this._coreService.triggerDataEvent(s.C0.ESC+"[?"+t+";"+r+"R")}return!0},t.prototype.softReset=function(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=f.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0},t.prototype.setCursorStyle=function(e){var t=e.params[0]||1;switch(t){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var r=t%2==1;return this._optionsService.options.cursorBlink=r,!0},t.prototype.setScrollRegion=function(e){var t,r=e.params[0]||1;return(e.length<2||(t=e.params[1])>this._bufferService.rows||0===t)&&(t=this._bufferService.rows),t>r&&(this._activeBuffer.scrollTop=r-1,this._activeBuffer.scrollBottom=t-1,this._setCursor(0,0)),!0},t.prototype.windowOptions=function(e){if(!w(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;var t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:2!==t&&this._onRequestWindowsOptionsReport.fire(o.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(o.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(s.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:0!==t&&2!==t||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),0!==t&&1!==t||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:0!==t&&2!==t||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),0!==t&&1!==t||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0},t.prototype.saveCursor=function(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0},t.prototype.restoreCursor=function(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0},t.prototype.setTitle=function(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0},t.prototype.setIconName=function(e){return this._iconName=e,!0},t.prototype.setOrReportIndexedColor=function(e){for(var t=[],r=e.split(";");r.length>1;){var i=r.shift(),n=r.shift();if(/^\d+$/.exec(i)){var o=parseInt(i);if(0<=o&&o<256)if("?"===n)t.push({type:0,index:o});else{var s=(0,S.parseColor)(n);s&&t.push({type:1,index:o,color:s})}}}return t.length&&this._onColor.fire(t),!0},t.prototype._setOrReportSpecialColor=function(e,t){for(var r=e.split(";"),i=0;i<r.length&&!(t>=this._specialColors.length);++i,++t)if("?"===r[i])this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{var n=(0,S.parseColor)(r[i]);n&&this._onColor.fire([{type:1,index:this._specialColors[t],color:n}])}return!0},t.prototype.setOrReportFgColor=function(e){return this._setOrReportSpecialColor(e,0)},t.prototype.setOrReportBgColor=function(e){return this._setOrReportSpecialColor(e,1)},t.prototype.setOrReportCursorColor=function(e){return this._setOrReportSpecialColor(e,2)},t.prototype.restoreIndexedColor=function(e){if(!e)return this._onColor.fire([{type:2}]),!0;for(var t=[],r=e.split(";"),i=0;i<r.length;++i)if(/^\d+$/.exec(r[i])){var n=parseInt(r[i]);0<=n&&n<256&&t.push({type:2,index:n})}return t.length&&this._onColor.fire(t),!0},t.prototype.restoreFgColor=function(e){return this._onColor.fire([{type:2,index:256}]),!0},t.prototype.restoreBgColor=function(e){return this._onColor.fire([{type:2,index:257}]),!0},t.prototype.restoreCursorColor=function(e){return this._onColor.fire([{type:2,index:258}]),!0},t.prototype.nextLine=function(){return this._activeBuffer.x=0,this.index(),!0},t.prototype.keypadApplicationMode=function(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0},t.prototype.keypadNumericMode=function(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0},t.prototype.selectDefaultCharset=function(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,a.DEFAULT_CHARSET),!0},t.prototype.selectCharset=function(e){return 2!==e.length?(this.selectDefaultCharset(),!0):("/"===e[0]||this._charsetService.setgCharset(C[e[0]],a.CHARSETS[e[1]]||a.DEFAULT_CHARSET),!0)},t.prototype.index=function(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0},t.prototype.tabSet=function(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0},t.prototype.reverseIndex=function(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){var e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0},t.prototype.fullReset=function(){return this._parser.reset(),this._onRequestReset.fire(),!0},t.prototype.reset=function(){this._curAttrData=f.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=f.DEFAULT_ATTR_DATA.clone()},t.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},t.prototype.setgLevel=function(e){return this._charsetService.setgLevel(e),!0},t.prototype.screenAlignmentPattern=function(){var e=new p.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(var t=0;t<this._bufferService.rows;++t){var r=this._activeBuffer.ybase+this._activeBuffer.y+t,i=this._activeBuffer.lines.get(r);i&&(i.fill(e),i.isWrapped=!1)}return this._dirtyRowService.markAllDirty(),this._setCursor(0,0),!0},t}(l.Disposable);t.InputHandler=E},844:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getDisposeArrayDisposable=t.disposeArray=t.Disposable=void 0;var r=function(){function e(){this._disposables=[],this._isDisposed=!1}return e.prototype.dispose=function(){this._isDisposed=!0;for(var e=0,t=this._disposables;e<t.length;e++)t[e].dispose();this._disposables.length=0},e.prototype.register=function(e){return this._disposables.push(e),e},e.prototype.unregister=function(e){var t=this._disposables.indexOf(e);-1!==t&&this._disposables.splice(t,1)},e}();function i(e){for(var t=0,r=e;t<r.length;t++)r[t].dispose();e.length=0}t.Disposable=r,t.disposeArray=i,t.getDisposeArrayDisposable=function(e){return{dispose:function(){return i(e)}}}},6114:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isLinux=t.isWindows=t.isIphone=t.isIpad=t.isMac=t.isSafari=t.isLegacyEdge=t.isFirefox=void 0;var r="undefined"==typeof navigator,i=r?"node":navigator.userAgent,n=r?"node":navigator.platform;t.isFirefox=i.includes("Firefox"),t.isLegacyEdge=i.includes("Edge"),t.isSafari=/^((?!chrome|android).)*safari/i.test(i),t.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(n),t.isIpad="iPad"===n,t.isIphone="iPhone"===n,t.isWindows=["Windows","Win16","Win32","WinCE"].includes(n),t.isLinux=n.indexOf("Linux")>=0},8273:(e,t)=>{function r(e,t,r,i){if(void 0===r&&(r=0),void 0===i&&(i=e.length),r>=e.length)return e;r=(e.length+r)%e.length,i=i>=e.length?e.length:(e.length+i)%e.length;for(var n=r;n<i;++n)e[n]=t;return e}Object.defineProperty(t,"__esModule",{value:!0}),t.concat=t.fillFallback=t.fill=void 0,t.fill=function(e,t,i,n){return e.fill?e.fill(t,i,n):r(e,t,i,n)},t.fillFallback=r,t.concat=function(e,t){var r=new e.constructor(e.length+t.length);return r.set(e),r.set(t,e.length),r}},9282:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.updateWindowsModeWrappedState=void 0;var i=r(643);t.updateWindowsModeWrappedState=function(e){var t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1),r=null==t?void 0:t.get(e.cols-1),n=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);n&&r&&(n.isWrapped=r[i.CHAR_DATA_CODE_INDEX]!==i.NULL_CELL_CODE&&r[i.CHAR_DATA_CODE_INDEX]!==i.WHITESPACE_CELL_CODE)}},3734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExtendedAttrs=t.AttributeData=void 0;var r=function(){function e(){this.fg=0,this.bg=0,this.extended=new i}return e.toColorRGB=function(e){return[e>>>16&255,e>>>8&255,255&e]},e.fromColorRGB=function(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},e.prototype.clone=function(){var t=new e;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t},e.prototype.isInverse=function(){return 67108864&this.fg},e.prototype.isBold=function(){return 134217728&this.fg},e.prototype.isUnderline=function(){return 268435456&this.fg},e.prototype.isBlink=function(){return 536870912&this.fg},e.prototype.isInvisible=function(){return 1073741824&this.fg},e.prototype.isItalic=function(){return 67108864&this.bg},e.prototype.isDim=function(){return 134217728&this.bg},e.prototype.isStrikethrough=function(){return 2147483648&this.fg},e.prototype.getFgColorMode=function(){return 50331648&this.fg},e.prototype.getBgColorMode=function(){return 50331648&this.bg},e.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},e.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},e.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},e.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},e.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},e.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},e.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},e.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},e.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},e.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},e.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},e.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},e.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},e.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648==(50331648&this.extended.underlineColor):this.isFgRGB()},e.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?16777216==(50331648&this.extended.underlineColor)||33554432==(50331648&this.extended.underlineColor):this.isFgPalette()},e.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?0==(50331648&this.extended.underlineColor):this.isFgDefault()},e.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},e}();t.AttributeData=r;var i=function(){function e(e,t){void 0===e&&(e=0),void 0===t&&(t=-1),this.underlineStyle=e,this.underlineColor=t}return e.prototype.clone=function(){return new e(this.underlineStyle,this.underlineColor)},e.prototype.isEmpty=function(){return 0===this.underlineStyle},e}();t.ExtendedAttrs=i},9092:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferStringIterator=t.Buffer=t.MAX_BUFFER_SIZE=void 0;var i=r(6349),n=r(8437),o=r(511),s=r(643),a=r(4634),c=r(4863),l=r(7116),h=r(3734);t.MAX_BUFFER_SIZE=4294967295;var u=function(){function e(e,t,r){this._hasScrollback=e,this._optionsService=t,this._bufferService=r,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=n.DEFAULT_ATTR_DATA.clone(),this.savedCharset=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=o.CellData.fromCharData([0,s.NULL_CELL_CHAR,s.NULL_CELL_WIDTH,s.NULL_CELL_CODE]),this._whitespaceCell=o.CellData.fromCharData([0,s.WHITESPACE_CELL_CHAR,s.WHITESPACE_CELL_WIDTH,s.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new i.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return e.prototype.getNullCell=function(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell},e.prototype.getWhitespaceCell=function(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell},e.prototype.getBlankLine=function(e,t){return new n.BufferLine(this._bufferService.cols,this.getNullCell(e),t)},Object.defineProperty(e.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows},enumerable:!1,configurable:!0}),e.prototype._getCorrectBufferLength=function(e){if(!this._hasScrollback)return e;var r=e+this._optionsService.rawOptions.scrollback;return r>t.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:r},e.prototype.fillViewportRows=function(e){if(0===this.lines.length){void 0===e&&(e=n.DEFAULT_ATTR_DATA);for(var t=this._rows;t--;)this.lines.push(this.getBlankLine(e))}},e.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new i.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},e.prototype.resize=function(e,t){var r=this.getNullCell(n.DEFAULT_ATTR_DATA),i=this._getCorrectBufferLength(t);if(i>this.lines.maxLength&&(this.lines.maxLength=i),this.lines.length>0){if(this._cols<e)for(var o=0;o<this.lines.length;o++)this.lines.get(o).resize(e,r);var s=0;if(this._rows<t)for(var a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode?this.lines.push(new n.BufferLine(e,r)):this.ybase>0&&this.lines.length<=this.ybase+this.y+s+1?(this.ybase--,s++,this.ydisp>0&&this.ydisp--):this.lines.push(new n.BufferLine(e,r)));else for(a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(i<this.lines.maxLength){var c=this.lines.length-i;c>0&&(this.lines.trimStart(c),this.ybase=Math.max(this.ybase-c,0),this.ydisp=Math.max(this.ydisp-c,0),this.savedY=Math.max(this.savedY-c,0)),this.lines.maxLength=i}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),s&&(this.y+=s),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(o=0;o<this.lines.length;o++)this.lines.get(o).resize(e,r);this._cols=e,this._rows=t},Object.defineProperty(e.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.rawOptions.windowsMode},enumerable:!1,configurable:!0}),e.prototype._reflow=function(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))},e.prototype._reflowLarger=function(e,t){var r=(0,a.reflowLargerGetLinesToRemove)(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(n.DEFAULT_ATTR_DATA));if(r.length>0){var i=(0,a.reflowLargerCreateNewLayout)(this.lines,r);(0,a.reflowLargerApplyNewLayout)(this.lines,i.layout),this._reflowLargerAdjustViewport(e,t,i.countRemoved)}},e.prototype._reflowLargerAdjustViewport=function(e,t,r){for(var i=this.getNullCell(n.DEFAULT_ATTR_DATA),o=r;o-- >0;)0===this.ybase?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new n.BufferLine(e,i))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-r,0)},e.prototype._reflowSmaller=function(e,t){for(var r=this.getNullCell(n.DEFAULT_ATTR_DATA),i=[],o=0,s=this.lines.length-1;s>=0;s--){var c=this.lines.get(s);if(!(!c||!c.isWrapped&&c.getTrimmedLength()<=e)){for(var l=[c];c.isWrapped&&s>0;)c=this.lines.get(--s),l.unshift(c);var h=this.ybase+this.y;if(!(h>=s&&h<s+l.length)){var u,f=l[l.length-1].getTrimmedLength(),_=(0,a.reflowSmallerGetNewLineLengths)(l,this._cols,e),d=_.length-l.length;u=0===this.ybase&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+d):Math.max(0,this.lines.length-this.lines.maxLength+d);for(var p=[],v=0;v<d;v++){var g=this.getBlankLine(n.DEFAULT_ATTR_DATA,!0);p.push(g)}p.length>0&&(i.push({start:s+l.length+o,newLines:p}),o+=p.length),l.push.apply(l,p);var y=_.length-1,m=_[y];0===m&&(m=_[--y]);for(var S=l.length-d-1,C=f;S>=0;){var b=Math.min(C,m);if(void 0===l[y])break;if(l[y].copyCellsFrom(l[S],C-b,m-b,b,!0),0==(m-=b)&&(m=_[--y]),0==(C-=b)){S--;var w=Math.max(S,0);C=(0,a.getWrappedLineTrimmedLength)(l,w,this._cols)}}for(v=0;v<l.length;v++)_[v]<e&&l[v].setCell(_[v],r);for(var L=d-u;L-- >0;)0===this.ybase?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+o)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+d,this.ybase+t-1)}}}if(i.length>0){var E=[],x=[];for(v=0;v<this.lines.length;v++)x.push(this.lines.get(v));var k=this.lines.length,M=k-1,A=0,R=i[A];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+o);var O=0;for(v=Math.min(this.lines.maxLength-1,k+o-1);v>=0;v--)if(R&&R.start>M+O){for(var T=R.newLines.length-1;T>=0;T--)this.lines.set(v--,R.newLines[T]);v++,E.push({index:M+1,amount:R.newLines.length}),O+=R.newLines.length,R=i[++A]}else this.lines.set(v,x[M--]);var D=0;for(v=E.length-1;v>=0;v--)E[v].index+=D,this.lines.onInsertEmitter.fire(E[v]),D+=E[v].amount;var B=Math.max(0,k+o-this.lines.maxLength);B>0&&this.lines.onTrimEmitter.fire(B)}},e.prototype.stringIndexToBufferIndex=function(e,t,r){for(void 0===r&&(r=!1);t;){var i=this.lines.get(e);if(!i)return[-1,-1];for(var n=r?i.getTrimmedLength():i.length,o=0;o<n;++o)if(i.get(o)[s.CHAR_DATA_WIDTH_INDEX]&&(t-=i.get(o)[s.CHAR_DATA_CHAR_INDEX].length||1),t<0)return[e,o];e++}return[e,0]},e.prototype.translateBufferLineToString=function(e,t,r,i){void 0===r&&(r=0);var n=this.lines.get(e);return n?n.translateToString(t,r,i):""},e.prototype.getWrappedRangeForLine=function(e){for(var t=e,r=e;t>0&&this.lines.get(t).isWrapped;)t--;for(;r+1<this.lines.length&&this.lines.get(r+1).isWrapped;)r++;return{first:t,last:r}},e.prototype.setupTabStops=function(e){for(null!=e?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0},e.prototype.prevStop=function(e){for(null==e&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e},e.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e},e.prototype.clearMarkers=function(e){if(this._isClearing=!0,void 0!==e)for(var t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));else{for(var r=0,i=this.markers;r<i.length;r++)i[r].dispose();this.markers=[]}this._isClearing=!1},e.prototype.addMarker=function(e){var t=this,r=new c.Marker(e);return this.markers.push(r),r.register(this.lines.onTrim((function(e){r.line-=e,r.line<0&&r.dispose()}))),r.register(this.lines.onInsert((function(e){r.line>=e.index&&(r.line+=e.amount)}))),r.register(this.lines.onDelete((function(e){r.line>=e.index&&r.line<e.index+e.amount&&r.dispose(),r.line>e.index&&(r.line-=e.amount)}))),r.register(r.onDispose((function(){return t._removeMarker(r)}))),r},e.prototype._removeMarker=function(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)},e.prototype.iterator=function(e,t,r,i,n){return new f(this,e,t,r,i,n)},e}();t.Buffer=u;var f=function(){function e(e,t,r,i,n,o){void 0===r&&(r=0),void 0===i&&(i=e.lines.length),void 0===n&&(n=0),void 0===o&&(o=0),this._buffer=e,this._trimRight=t,this._startIndex=r,this._endIndex=i,this._startOverscan=n,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return e.prototype.hasNext=function(){return this._current<this._endIndex},e.prototype.next=function(){var e=this._buffer.getWrappedRangeForLine(this._current);e.first<this._startIndex-this._startOverscan&&(e.first=this._startIndex-this._startOverscan),e.last>this._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var t="",r=e.first;r<=e.last;++r)t+=this._buffer.translateBufferLineToString(r,this._trimRight);return this._current=e.last+1,{range:e,content:t}},e}();t.BufferStringIterator=f},8437:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLine=t.DEFAULT_ATTR_DATA=void 0;var i=r(482),n=r(643),o=r(511),s=r(3734);t.DEFAULT_ATTR_DATA=Object.freeze(new s.AttributeData);var a=function(){function e(e,t,r){void 0===r&&(r=!1),this.isWrapped=r,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*e);for(var i=t||o.CellData.fromCharData([0,n.NULL_CELL_CHAR,n.NULL_CELL_WIDTH,n.NULL_CELL_CODE]),s=0;s<e;++s)this.setCell(s,i);this.length=e}return e.prototype.get=function(e){var t=this._data[3*e+0],r=2097151&t;return[this._data[3*e+1],2097152&t?this._combined[e]:r?(0,i.stringFromCodePoint)(r):"",t>>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):r]},e.prototype.set=function(e,t){this._data[3*e+1]=t[n.CHAR_DATA_ATTR_INDEX],t[n.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[e]=t[1],this._data[3*e+0]=2097152|e|t[n.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*e+0]=t[n.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|t[n.CHAR_DATA_WIDTH_INDEX]<<22},e.prototype.getWidth=function(e){return this._data[3*e+0]>>22},e.prototype.hasWidth=function(e){return 12582912&this._data[3*e+0]},e.prototype.getFg=function(e){return this._data[3*e+1]},e.prototype.getBg=function(e){return this._data[3*e+2]},e.prototype.hasContent=function(e){return 4194303&this._data[3*e+0]},e.prototype.getCodePoint=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t},e.prototype.isCombined=function(e){return 2097152&this._data[3*e+0]},e.prototype.getString=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?(0,i.stringFromCodePoint)(2097151&t):""},e.prototype.loadCell=function(e,t){var r=3*e;return t.content=this._data[r+0],t.fg=this._data[r+1],t.bg=this._data[r+2],2097152&t.content&&(t.combinedData=this._combined[e]),268435456&t.bg&&(t.extended=this._extendedAttrs[e]),t},e.prototype.setCell=function(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),268435456&t.bg&&(this._extendedAttrs[e]=t.extended),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg},e.prototype.setCellFromCodePoint=function(e,t,r,i,n,o){268435456&n&&(this._extendedAttrs[e]=o),this._data[3*e+0]=t|r<<22,this._data[3*e+1]=i,this._data[3*e+2]=n},e.prototype.addCodepointToCell=function(e,t){var r=this._data[3*e+0];2097152&r?this._combined[e]+=(0,i.stringFromCodePoint)(t):(2097151&r?(this._combined[e]=(0,i.stringFromCodePoint)(2097151&r)+(0,i.stringFromCodePoint)(t),r&=-2097152,r|=2097152):r=t|1<<22,this._data[3*e+0]=r)},e.prototype.insertCells=function(e,t,r,i){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs),t<this.length-e){for(var n=new o.CellData,a=this.length-e-t-1;a>=0;--a)this.setCell(e+t+a,this.loadCell(e+a,n));for(a=0;a<t;++a)this.setCell(e+a,r)}else for(a=e;a<this.length;++a)this.setCell(a,r);2===this.getWidth(this.length-1)&&this.setCellFromCodePoint(this.length-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs)},e.prototype.deleteCells=function(e,t,r,i){if(e%=this.length,t<this.length-e){for(var n=new o.CellData,a=0;a<this.length-e-t;++a)this.setCell(e+a,this.loadCell(e+t+a,n));for(a=this.length-t;a<this.length;++a)this.setCell(a,r)}else for(a=e;a<this.length;++a)this.setCell(a,r);e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs),0!==this.getWidth(e)||this.hasContent(e)||this.setCellFromCodePoint(e,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs)},e.prototype.replaceCells=function(e,t,r,i){for(e&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs),t<this.length&&2===this.getWidth(t-1)&&this.setCellFromCodePoint(t,0,1,(null==i?void 0:i.fg)||0,(null==i?void 0:i.bg)||0,(null==i?void 0:i.extended)||new s.ExtendedAttrs);e<t&&e<this.length;)this.setCell(e++,r)},e.prototype.resize=function(e,t){if(e!==this.length){if(e>this.length){var r=new Uint32Array(3*e);this.length&&(3*e<this._data.length?r.set(this._data.subarray(0,3*e)):r.set(this._data)),this._data=r;for(var i=this.length;i<e;++i)this.setCell(i,t)}else if(e){(r=new Uint32Array(3*e)).set(this._data.subarray(0,3*e)),this._data=r;var n=Object.keys(this._combined);for(i=0;i<n.length;i++){var o=parseInt(n[i],10);o>=e&&delete this._combined[o]}}else this._data=new Uint32Array(0),this._combined={};this.length=e}},e.prototype.fill=function(e){this._combined={},this._extendedAttrs={};for(var t=0;t<this.length;++t)this.setCell(t,e)},e.prototype.copyFrom=function(e){for(var t in this.length!==e.length?this._data=new Uint32Array(e._data):this._data.set(e._data),this.length=e.length,this._combined={},e._combined)this._combined[t]=e._combined[t];for(var t in this._extendedAttrs={},e._extendedAttrs)this._extendedAttrs[t]=e._extendedAttrs[t];this.isWrapped=e.isWrapped},e.prototype.clone=function(){var t=new e(0);for(var r in t._data=new Uint32Array(this._data),t.length=this.length,this._combined)t._combined[r]=this._combined[r];for(var r in this._extendedAttrs)t._extendedAttrs[r]=this._extendedAttrs[r];return t.isWrapped=this.isWrapped,t},e.prototype.getTrimmedLength=function(){for(var e=this.length-1;e>=0;--e)if(4194303&this._data[3*e+0])return e+(this._data[3*e+0]>>22);return 0},e.prototype.copyCellsFrom=function(e,t,r,i,n){var o=e._data;if(n)for(var s=i-1;s>=0;s--)for(var a=0;a<3;a++)this._data[3*(r+s)+a]=o[3*(t+s)+a];else for(s=0;s<i;s++)for(a=0;a<3;a++)this._data[3*(r+s)+a]=o[3*(t+s)+a];var c=Object.keys(e._combined);for(a=0;a<c.length;a++){var l=parseInt(c[a],10);l>=t&&(this._combined[l-t+r]=e._combined[l])}},e.prototype.translateToString=function(e,t,r){void 0===e&&(e=!1),void 0===t&&(t=0),void 0===r&&(r=this.length),e&&(r=Math.min(r,this.getTrimmedLength()));for(var o="";t<r;){var s=this._data[3*t+0],a=2097151&s;o+=2097152&s?this._combined[t]:a?(0,i.stringFromCodePoint)(a):n.WHITESPACE_CELL_CHAR,t+=s>>22||1}return o},e}();t.BufferLine=a},4841:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getRangeLength=void 0,t.getRangeLength=function(e,t){if(e.start.y>e.end.y)throw new Error("Buffer range end ("+e.end.x+", "+e.end.y+") cannot be before start ("+e.start.x+", "+e.start.y+")");return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}},4634:(e,t)=>{function r(e,t,r){if(t===e.length-1)return e[t].getTrimmedLength();var i=!e[t].hasContent(r-1)&&1===e[t].getWidth(r-1),n=2===e[t+1].getWidth(0);return i&&n?r-1:r}Object.defineProperty(t,"__esModule",{value:!0}),t.getWrappedLineTrimmedLength=t.reflowSmallerGetNewLineLengths=t.reflowLargerApplyNewLayout=t.reflowLargerCreateNewLayout=t.reflowLargerGetLinesToRemove=void 0,t.reflowLargerGetLinesToRemove=function(e,t,i,n,o){for(var s=[],a=0;a<e.length-1;a++){var c=a,l=e.get(++c);if(l.isWrapped){for(var h=[e.get(a)];c<e.length&&l.isWrapped;)h.push(l),l=e.get(++c);if(n>=a&&n<c)a+=h.length-1;else{for(var u=0,f=r(h,u,t),_=1,d=0;_<h.length;){var p=r(h,_,t),v=p-d,g=i-f,y=Math.min(v,g);h[u].copyCellsFrom(h[_],d,f,y,!1),(f+=y)===i&&(u++,f=0),(d+=y)===p&&(_++,d=0),0===f&&0!==u&&2===h[u-1].getWidth(i-1)&&(h[u].copyCellsFrom(h[u-1],i-1,f++,1,!1),h[u-1].setCell(i-1,o))}h[u].replaceCells(f,i,o);for(var m=0,S=h.length-1;S>0&&(S>u||0===h[S].getTrimmedLength());S--)m++;m>0&&(s.push(a+h.length-m),s.push(m)),a+=h.length-1}}}return s},t.reflowLargerCreateNewLayout=function(e,t){for(var r=[],i=0,n=t[i],o=0,s=0;s<e.length;s++)if(n===s){var a=t[++i];e.onDeleteEmitter.fire({index:s-o,amount:a}),s+=a-1,o+=a,n=t[++i]}else r.push(s);return{layout:r,countRemoved:o}},t.reflowLargerApplyNewLayout=function(e,t){for(var r=[],i=0;i<t.length;i++)r.push(e.get(t[i]));for(i=0;i<r.length;i++)e.set(i,r[i]);e.length=t.length},t.reflowSmallerGetNewLineLengths=function(e,t,i){for(var n=[],o=e.map((function(i,n){return r(e,n,t)})).reduce((function(e,t){return e+t})),s=0,a=0,c=0;c<o;){if(o-c<i){n.push(o-c);break}s+=i;var l=r(e,a,t);s>l&&(s-=l,a++);var h=2===e[a].getWidth(s-1);h&&s--;var u=h?i-1:i;n.push(u),c+=u}return n},t.getWrappedLineTrimmedLength=r},5295:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BufferSet=void 0;var o=r(9092),s=r(8460),a=function(e){function t(t,r){var i=e.call(this)||this;return i._optionsService=t,i._bufferService=r,i._onBufferActivate=i.register(new s.EventEmitter),i.reset(),i}return n(t,e),Object.defineProperty(t.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this._normal=new o.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new o.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()},Object.defineProperty(t.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),t.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},t.prototype.activateAltBuffer=function(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},t.prototype.resize=function(e,t){this._normal.resize(e,t),this._alt.resize(e,t)},t.prototype.setupTabStops=function(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)},t}(r(844).Disposable);t.BufferSet=a},511:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.CellData=void 0;var o=r(482),s=r(643),a=r(3734),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.content=0,t.fg=0,t.bg=0,t.extended=new a.ExtendedAttrs,t.combinedData="",t}return n(t,e),t.fromCharData=function(e){var r=new t;return r.setFromCharData(e),r},t.prototype.isCombined=function(){return 2097152&this.content},t.prototype.getWidth=function(){return this.content>>22},t.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,o.stringFromCodePoint)(2097151&this.content):""},t.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},t.prototype.setFromCharData=function(e){this.fg=e[s.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(e[s.CHAR_DATA_CHAR_INDEX].length>2)t=!0;else if(2===e[s.CHAR_DATA_CHAR_INDEX].length){var r=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){var i=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=i&&i<=57343?this.content=1024*(r-55296)+i-56320+65536|e[s.CHAR_DATA_WIDTH_INDEX]<<22:t=!0}else t=!0}else this.content=e[s.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|e[s.CHAR_DATA_WIDTH_INDEX]<<22;t&&(this.combinedData=e[s.CHAR_DATA_CHAR_INDEX],this.content=2097152|e[s.CHAR_DATA_WIDTH_INDEX]<<22)},t.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},t}(a.AttributeData);t.CellData=c},643:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WHITESPACE_CELL_CODE=t.WHITESPACE_CELL_WIDTH=t.WHITESPACE_CELL_CHAR=t.NULL_CELL_CODE=t.NULL_CELL_WIDTH=t.NULL_CELL_CHAR=t.CHAR_DATA_CODE_INDEX=t.CHAR_DATA_WIDTH_INDEX=t.CHAR_DATA_CHAR_INDEX=t.CHAR_DATA_ATTR_INDEX=t.DEFAULT_ATTR=t.DEFAULT_COLOR=void 0,t.DEFAULT_COLOR=256,t.DEFAULT_ATTR=256|t.DEFAULT_COLOR<<9,t.CHAR_DATA_ATTR_INDEX=0,t.CHAR_DATA_CHAR_INDEX=1,t.CHAR_DATA_WIDTH_INDEX=2,t.CHAR_DATA_CODE_INDEX=3,t.NULL_CELL_CHAR="",t.NULL_CELL_WIDTH=1,t.NULL_CELL_CODE=0,t.WHITESPACE_CELL_CHAR=" ",t.WHITESPACE_CELL_WIDTH=1,t.WHITESPACE_CELL_CODE=32},4863:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Marker=void 0;var o=r(8460),s=function(e){function t(r){var i=e.call(this)||this;return i.line=r,i._id=t._nextId++,i.isDisposed=!1,i._onDispose=new o.EventEmitter,i}return n(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),e.prototype.dispose.call(this))},t._nextId=1,t}(r(844).Disposable);t.Marker=s},7116:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_CHARSET=t.CHARSETS=void 0,t.CHARSETS={},t.DEFAULT_CHARSET=t.CHARSETS.B,t.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},t.CHARSETS.A={"#":"£"},t.CHARSETS.B=void 0,t.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},t.CHARSETS.C=t.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},t.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},t.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},t.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},t.CHARSETS.E=t.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},t.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},t.CHARSETS.H=t.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},t.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(e,t)=>{var r,i;Object.defineProperty(t,"__esModule",{value:!0}),t.C1=t.C0=void 0,(i=t.C0||(t.C0={})).NUL="\0",i.SOH="",i.STX="",i.ETX="",i.EOT="",i.ENQ="",i.ACK="",i.BEL="",i.BS="\b",i.HT="\t",i.LF="\n",i.VT="\v",i.FF="\f",i.CR="\r",i.SO="",i.SI="",i.DLE="",i.DC1="",i.DC2="",i.DC3="",i.DC4="",i.NAK="",i.SYN="",i.ETB="",i.CAN="",i.EM="",i.SUB="",i.ESC="",i.FS="",i.GS="",i.RS="",i.US="",i.SP=" ",i.DEL="",(r=t.C1||(t.C1={})).PAD="€",r.HOP="",r.BPH="‚",r.NBH="ƒ",r.IND="„",r.NEL="…",r.SSA="†",r.ESA="‡",r.HTS="ˆ",r.HTJ="‰",r.VTS="Š",r.PLD="‹",r.PLU="Œ",r.RI="",r.SS2="Ž",r.SS3="",r.DCS="",r.PU1="‘",r.PU2="’",r.STS="“",r.CCH="”",r.MW="•",r.SPA="–",r.EPA="—",r.SOS="˜",r.SGCI="™",r.SCI="š",r.CSI="›",r.ST="œ",r.OSC="",r.PM="ž",r.APC="Ÿ"},7399:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.evaluateKeyboardEvent=void 0;var i=r(2584),n={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};t.evaluateKeyboardEvent=function(e,t,r,o){var s={type:0,cancel:!1,key:void 0},a=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?s.key=t?i.C0.ESC+"OA":i.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?s.key=t?i.C0.ESC+"OD":i.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?s.key=t?i.C0.ESC+"OC":i.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(s.key=t?i.C0.ESC+"OB":i.C0.ESC+"[B");break;case 8:if(e.shiftKey){s.key=i.C0.BS;break}if(e.altKey){s.key=i.C0.ESC+i.C0.DEL;break}s.key=i.C0.DEL;break;case 9:if(e.shiftKey){s.key=i.C0.ESC+"[Z";break}s.key=i.C0.HT,s.cancel=!0;break;case 13:s.key=e.altKey?i.C0.ESC+i.C0.CR:i.C0.CR,s.cancel=!0;break;case 27:s.key=i.C0.ESC,e.altKey&&(s.key=i.C0.ESC+i.C0.ESC),s.cancel=!0;break;case 37:if(e.metaKey)break;a?(s.key=i.C0.ESC+"[1;"+(a+1)+"D",s.key===i.C0.ESC+"[1;3D"&&(s.key=i.C0.ESC+(r?"b":"[1;5D"))):s.key=t?i.C0.ESC+"OD":i.C0.ESC+"[D";break;case 39:if(e.metaKey)break;a?(s.key=i.C0.ESC+"[1;"+(a+1)+"C",s.key===i.C0.ESC+"[1;3C"&&(s.key=i.C0.ESC+(r?"f":"[1;5C"))):s.key=t?i.C0.ESC+"OC":i.C0.ESC+"[C";break;case 38:if(e.metaKey)break;a?(s.key=i.C0.ESC+"[1;"+(a+1)+"A",r||s.key!==i.C0.ESC+"[1;3A"||(s.key=i.C0.ESC+"[1;5A")):s.key=t?i.C0.ESC+"OA":i.C0.ESC+"[A";break;case 40:if(e.metaKey)break;a?(s.key=i.C0.ESC+"[1;"+(a+1)+"B",r||s.key!==i.C0.ESC+"[1;3B"||(s.key=i.C0.ESC+"[1;5B")):s.key=t?i.C0.ESC+"OB":i.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(s.key=i.C0.ESC+"[2~");break;case 46:s.key=a?i.C0.ESC+"[3;"+(a+1)+"~":i.C0.ESC+"[3~";break;case 36:s.key=a?i.C0.ESC+"[1;"+(a+1)+"H":t?i.C0.ESC+"OH":i.C0.ESC+"[H";break;case 35:s.key=a?i.C0.ESC+"[1;"+(a+1)+"F":t?i.C0.ESC+"OF":i.C0.ESC+"[F";break;case 33:e.shiftKey?s.type=2:s.key=i.C0.ESC+"[5~";break;case 34:e.shiftKey?s.type=3:s.key=i.C0.ESC+"[6~";break;case 112:s.key=a?i.C0.ESC+"[1;"+(a+1)+"P":i.C0.ESC+"OP";break;case 113:s.key=a?i.C0.ESC+"[1;"+(a+1)+"Q":i.C0.ESC+"OQ";break;case 114:s.key=a?i.C0.ESC+"[1;"+(a+1)+"R":i.C0.ESC+"OR";break;case 115:s.key=a?i.C0.ESC+"[1;"+(a+1)+"S":i.C0.ESC+"OS";break;case 116:s.key=a?i.C0.ESC+"[15;"+(a+1)+"~":i.C0.ESC+"[15~";break;case 117:s.key=a?i.C0.ESC+"[17;"+(a+1)+"~":i.C0.ESC+"[17~";break;case 118:s.key=a?i.C0.ESC+"[18;"+(a+1)+"~":i.C0.ESC+"[18~";break;case 119:s.key=a?i.C0.ESC+"[19;"+(a+1)+"~":i.C0.ESC+"[19~";break;case 120:s.key=a?i.C0.ESC+"[20;"+(a+1)+"~":i.C0.ESC+"[20~";break;case 121:s.key=a?i.C0.ESC+"[21;"+(a+1)+"~":i.C0.ESC+"[21~";break;case 122:s.key=a?i.C0.ESC+"[23;"+(a+1)+"~":i.C0.ESC+"[23~";break;case 123:s.key=a?i.C0.ESC+"[24;"+(a+1)+"~":i.C0.ESC+"[24~";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if(r&&!o||!e.altKey||e.metaKey)!r||e.altKey||e.ctrlKey||e.shiftKey||!e.metaKey?e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&1===e.key.length?s.key=e.key:e.key&&e.ctrlKey&&"_"===e.key&&(s.key=i.C0.US):65===e.keyCode&&(s.type=1);else{var c=n[e.keyCode],l=null==c?void 0:c[e.shiftKey?1:0];if(l)s.key=i.C0.ESC+l;else if(e.keyCode>=65&&e.keyCode<=90){var h=e.ctrlKey?e.keyCode-64:e.keyCode+32;s.key=i.C0.ESC+String.fromCharCode(h)}}else e.keyCode>=65&&e.keyCode<=90?s.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?s.key=i.C0.NUL:e.keyCode>=51&&e.keyCode<=55?s.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?s.key=i.C0.DEL:219===e.keyCode?s.key=i.C0.ESC:220===e.keyCode?s.key=i.C0.FS:221===e.keyCode&&(s.key=i.C0.GS)}return s}},482:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Utf8ToUtf32=t.StringToUtf32=t.utf32ToString=t.stringFromCodePoint=void 0,t.stringFromCodePoint=function(e){return e>65535?(e-=65536,String.fromCharCode(55296+(e>>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t,r){void 0===t&&(t=0),void 0===r&&(r=e.length);for(var i="",n=t;n<r;++n){var o=e[n];o>65535?(o-=65536,i+=String.fromCharCode(55296+(o>>10))+String.fromCharCode(o%1024+56320)):i+=String.fromCharCode(o)}return i};var r=function(){function e(){this._interim=0}return e.prototype.clear=function(){this._interim=0},e.prototype.decode=function(e,t){var r=e.length;if(!r)return 0;var i=0,n=0;this._interim&&(56320<=(a=e.charCodeAt(n++))&&a<=57343?t[i++]=1024*(this._interim-55296)+a-56320+65536:(t[i++]=this._interim,t[i++]=a),this._interim=0);for(var o=n;o<r;++o){var s=e.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=r)return this._interim=s,i;var a;56320<=(a=e.charCodeAt(o))&&a<=57343?t[i++]=1024*(s-55296)+a-56320+65536:(t[i++]=s,t[i++]=a)}else 65279!==s&&(t[i++]=s)}return i},e}();t.StringToUtf32=r;var i=function(){function e(){this.interim=new Uint8Array(3)}return e.prototype.clear=function(){this.interim.fill(0)},e.prototype.decode=function(e,t){var r=e.length;if(!r)return 0;var i,n,o,s,a=0,c=0,l=0;if(this.interim[0]){var h=!1,u=this.interim[0];u&=192==(224&u)?31:224==(240&u)?15:7;for(var f=0,_=void 0;(_=63&this.interim[++f])&&f<4;)u<<=6,u|=_;for(var d=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,p=d-f;l<p;){if(l>=r)return 0;if(128!=(192&(_=e[l++]))){l--,h=!0;break}this.interim[f++]=_,u<<=6,u|=63&_}h||(2===d?u<128?l--:t[a++]=u:3===d?u<2048||u>=55296&&u<=57343||65279===u||(t[a++]=u):u<65536||u>1114111||(t[a++]=u)),this.interim.fill(0)}for(var v=r-4,g=l;g<r;){for(;!(!(g<v)||128&(i=e[g])||128&(n=e[g+1])||128&(o=e[g+2])||128&(s=e[g+3]));)t[a++]=i,t[a++]=n,t[a++]=o,t[a++]=s,g+=4;if((i=e[g++])<128)t[a++]=i;else if(192==(224&i)){if(g>=r)return this.interim[0]=i,a;if(128!=(192&(n=e[g++]))){g--;continue}if((c=(31&i)<<6|63&n)<128){g--;continue}t[a++]=c}else if(224==(240&i)){if(g>=r)return this.interim[0]=i,a;if(128!=(192&(n=e[g++]))){g--;continue}if(g>=r)return this.interim[0]=i,this.interim[1]=n,a;if(128!=(192&(o=e[g++]))){g--;continue}if((c=(15&i)<<12|(63&n)<<6|63&o)<2048||c>=55296&&c<=57343||65279===c)continue;t[a++]=c}else if(240==(248&i)){if(g>=r)return this.interim[0]=i,a;if(128!=(192&(n=e[g++]))){g--;continue}if(g>=r)return this.interim[0]=i,this.interim[1]=n,a;if(128!=(192&(o=e[g++]))){g--;continue}if(g>=r)return this.interim[0]=i,this.interim[1]=n,this.interim[2]=o,a;if(128!=(192&(s=e[g++]))){g--;continue}if((c=(7&i)<<18|(63&n)<<12|(63&o)<<6|63&s)<65536||c>1114111)continue;t[a++]=c}}return a},e}();t.Utf8ToUtf32=i},225:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeV6=void 0;var i,n=r(8273),o=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],s=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],a=function(){function e(){if(this.version="6",!i){i=new Uint8Array(65536),(0,n.fill)(i,1),i[0]=0,(0,n.fill)(i,0,1,32),(0,n.fill)(i,0,127,160),(0,n.fill)(i,2,4352,4448),i[9001]=2,i[9002]=2,(0,n.fill)(i,2,11904,42192),i[12351]=1,(0,n.fill)(i,2,44032,55204),(0,n.fill)(i,2,63744,64256),(0,n.fill)(i,2,65040,65050),(0,n.fill)(i,2,65072,65136),(0,n.fill)(i,2,65280,65377),(0,n.fill)(i,2,65504,65511);for(var e=0;e<o.length;++e)(0,n.fill)(i,0,o[e][0],o[e][1]+1)}}return e.prototype.wcwidth=function(e){return e<32?0:e<127?1:e<65536?i[e]:function(e,t){var r,i=0,n=t.length-1;if(e<t[0][0]||e>t[n][1])return!1;for(;n>=i;)if(e>t[r=i+n>>1][1])i=r+1;else{if(!(e<t[r][0]))return!0;n=r-1}return!1}(e,s)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1},e}();t.UnicodeV6=a},5981:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WriteBuffer=void 0;var r="undefined"==typeof queueMicrotask?function(e){Promise.resolve().then(e)}:queueMicrotask,i=function(){function e(e){this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0}return e.prototype.writeSync=function(e,t){if(void 0!==t&&this._syncCalls>t)this._syncCalls=0;else if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,!this._isSyncWriting){var r;for(this._isSyncWriting=!0;r=this._writeBuffer.shift();){this._action(r);var i=this._callbacks.shift();i&&i()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}},e.prototype.write=function(e,t){var r=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout((function(){return r._innerWrite()}))),this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)},e.prototype._innerWrite=function(e,t){var i=this;void 0===e&&(e=0),void 0===t&&(t=!0);for(var n=e||Date.now();this._writeBuffer.length>this._bufferOffset;){var o=this._writeBuffer[this._bufferOffset],s=this._action(o,t);if(s)return void s.catch((function(e){return r((function(){throw e})),Promise.resolve(!1)})).then((function(e){return Date.now()-n>=12?setTimeout((function(){return i._innerWrite(0,e)})):i._innerWrite(n,e)}));var a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-n>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((function(){return i._innerWrite()}))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0)},e}();t.WriteBuffer=i},5941:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRgbString=t.parseColor=void 0;var r=/^([\da-f]{1})\/([\da-f]{1})\/([\da-f]{1})$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,i=/^[\da-f]+$/;function n(e,t){var r=e.toString(16),i=r.length<2?"0"+r:r;switch(t){case 4:return r[0];case 8:return i;case 12:return(i+i).slice(0,3);default:return i+i}}t.parseColor=function(e){if(e){var t=e.toLowerCase();if(0===t.indexOf("rgb:")){t=t.slice(4);var n=r.exec(t);if(n){var o=n[1]?15:n[4]?255:n[7]?4095:65535;return[Math.round(parseInt(n[1]||n[4]||n[7]||n[10],16)/o*255),Math.round(parseInt(n[2]||n[5]||n[8]||n[11],16)/o*255),Math.round(parseInt(n[3]||n[6]||n[9]||n[12],16)/o*255)]}}else if(0===t.indexOf("#")&&(t=t.slice(1),i.exec(t)&&[3,6,9,12].includes(t.length))){for(var s=t.length/3,a=[0,0,0],c=0;c<3;++c){var l=parseInt(t.slice(s*c,s*c+s),16);a[c]=1===s?l<<4:2===s?l:3===s?l>>4:l>>8}return a}}},t.toRgbString=function(e,t){void 0===t&&(t=16);var r=e[0],i=e[1],o=e[2];return"rgb:"+n(r,t)+"/"+n(i,t)+"/"+n(o,t)}},5770:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=void 0,t.PAYLOAD_LIMIT=1e7},6351:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DcsHandler=t.DcsParser=void 0;var i=r(482),n=r(8742),o=r(5770),s=[],a=function(){function e(){this._handlers=Object.create(null),this._active=s,this._ident=0,this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return e.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=s},e.prototype.registerHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var r=this._handlers[e];return r.push(t),{dispose:function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}}},e.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},e.prototype.setHandlerFallback=function(e){this._handlerFb=e},e.prototype.reset=function(){if(this._active.length)for(var e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=s,this._ident=0},e.prototype.hook=function(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||s,this._active.length)for(var r=this._active.length-1;r>=0;r--)this._active[r].hook(t);else this._handlerFb(this._ident,"HOOK",t)},e.prototype.put=function(e,t,r){if(this._active.length)for(var n=this._active.length-1;n>=0;n--)this._active[n].put(e,t,r);else this._handlerFb(this._ident,"PUT",(0,i.utf32ToString)(e,t,r))},e.prototype.unhook=function(e,t){if(void 0===t&&(t=!0),this._active.length){var r=!1,i=this._active.length-1,n=!1;if(this._stack.paused&&(i=this._stack.loopPosition-1,r=t,n=this._stack.fallThrough,this._stack.paused=!1),!n&&!1===r){for(;i>=0&&!0!==(r=this._active[i].unhook(e));i--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=i,this._stack.fallThrough=!1,r;i--}for(;i>=0;i--)if((r=this._active[i].unhook(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=i,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",e);this._active=s,this._ident=0},e}();t.DcsParser=a;var c=new n.Params;c.addParam(0);var l=function(){function e(e){this._handler=e,this._data="",this._params=c,this._hitLimit=!1}return e.prototype.hook=function(e){this._params=e.length>1||e.params[0]?e.clone():c,this._data="",this._hitLimit=!1},e.prototype.put=function(e,t,r){this._hitLimit||(this._data+=(0,i.utf32ToString)(e,t,r),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},e.prototype.unhook=function(e){var t=this,r=!1;if(this._hitLimit)r=!1;else if(e&&(r=this._handler(this._data,this._params))instanceof Promise)return r.then((function(e){return t._params=c,t._data="",t._hitLimit=!1,e}));return this._params=c,this._data="",this._hitLimit=!1,r},e}();t.DcsHandler=l},2015:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EscapeSequenceParser=t.VT500_TRANSITION_TABLE=t.TransitionTable=void 0;var o=r(844),s=r(8273),a=r(8742),c=r(6242),l=r(6351),h=function(){function e(e){this.table=new Uint8Array(e)}return e.prototype.setDefault=function(e,t){(0,s.fill)(this.table,e<<4|t)},e.prototype.add=function(e,t,r,i){this.table[t<<8|e]=r<<4|i},e.prototype.addMany=function(e,t,r,i){for(var n=0;n<e.length;n++)this.table[t<<8|e[n]]=r<<4|i},e}();t.TransitionTable=h;var u=160;t.VT500_TRANSITION_TABLE=function(){var e=new h(4095),t=Array.apply(null,Array(256)).map((function(e,t){return t})),r=function(e,r){return t.slice(e,r)},i=r(32,127),n=r(0,24);n.push(25),n.push.apply(n,r(28,32));var o,s=r(0,14);for(o in e.setDefault(1,0),e.addMany(i,0,2,0),s)e.addMany([24,26,153,154],o,3,0),e.addMany(r(128,144),o,3,0),e.addMany(r(144,152),o,3,0),e.add(156,o,0,0),e.add(27,o,11,1),e.add(157,o,4,8),e.addMany([152,158,159],o,0,7),e.add(155,o,11,3),e.add(144,o,11,9);return e.addMany(n,0,3,0),e.addMany(n,1,3,1),e.add(127,1,0,1),e.addMany(n,8,0,8),e.addMany(n,3,3,3),e.add(127,3,0,3),e.addMany(n,4,3,4),e.add(127,4,0,4),e.addMany(n,6,3,6),e.addMany(n,5,3,5),e.add(127,5,0,5),e.addMany(n,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(i,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(r(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(i,7,0,7),e.addMany(n,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(r(64,127),3,7,0),e.addMany(r(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(r(48,60),4,8,4),e.addMany(r(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(r(32,64),6,0,6),e.add(127,6,0,6),e.addMany(r(64,127),6,0,0),e.addMany(r(32,48),3,9,5),e.addMany(r(32,48),5,9,5),e.addMany(r(48,64),5,0,6),e.addMany(r(64,127),5,7,0),e.addMany(r(32,48),4,9,5),e.addMany(r(32,48),1,9,2),e.addMany(r(32,48),2,9,2),e.addMany(r(48,127),2,10,0),e.addMany(r(48,80),1,10,0),e.addMany(r(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(r(96,127),1,10,0),e.add(80,1,11,9),e.addMany(n,9,0,9),e.add(127,9,0,9),e.addMany(r(28,32),9,0,9),e.addMany(r(32,48),9,9,12),e.addMany(r(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(n,11,0,11),e.addMany(r(32,128),11,0,11),e.addMany(r(28,32),11,0,11),e.addMany(n,10,0,10),e.add(127,10,0,10),e.addMany(r(28,32),10,0,10),e.addMany(r(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(r(32,48),10,9,12),e.addMany(n,12,0,12),e.add(127,12,0,12),e.addMany(r(28,32),12,0,12),e.addMany(r(32,48),12,9,12),e.addMany(r(48,64),12,0,11),e.addMany(r(64,127),12,12,13),e.addMany(r(64,127),10,12,13),e.addMany(r(64,127),9,12,13),e.addMany(n,13,13,13),e.addMany(i,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(u,0,2,0),e.add(u,8,5,8),e.add(u,6,0,6),e.add(u,11,0,11),e.add(u,13,13,13),e}();var f=function(e){function r(r){void 0===r&&(r=t.VT500_TRANSITION_TABLE);var i=e.call(this)||this;return i._transitions=r,i._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},i.initialState=0,i.currentState=i.initialState,i._params=new a.Params,i._params.addParam(0),i._collect=0,i.precedingCodepoint=0,i._printHandlerFb=function(e,t,r){},i._executeHandlerFb=function(e){},i._csiHandlerFb=function(e,t){},i._escHandlerFb=function(e){},i._errorHandlerFb=function(e){return e},i._printHandler=i._printHandlerFb,i._executeHandlers=Object.create(null),i._csiHandlers=Object.create(null),i._escHandlers=Object.create(null),i._oscParser=new c.OscParser,i._dcsParser=new l.DcsParser,i._errorHandler=i._errorHandlerFb,i.registerEscHandler({final:"\\"},(function(){return!0})),i}return n(r,e),r.prototype._identifier=function(e,t){void 0===t&&(t=[64,126]);var r=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if((r=e.prefix.charCodeAt(0))&&60>r||r>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var i=0;i<e.intermediates.length;++i){var n=e.intermediates.charCodeAt(i);if(32>n||n>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");r<<=8,r|=n}}if(1!==e.final.length)throw new Error("final must be a single byte");var o=e.final.charCodeAt(0);if(t[0]>o||o>t[1])throw new Error("final must be in range "+t[0]+" .. "+t[1]);return(r<<=8)|o},r.prototype.identToString=function(e){for(var t=[];e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")},r.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},r.prototype.setPrintHandler=function(e){this._printHandler=e},r.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},r.prototype.registerEscHandler=function(e,t){var r=this._identifier(e,[48,126]);void 0===this._escHandlers[r]&&(this._escHandlers[r]=[]);var i=this._escHandlers[r];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},r.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},r.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},r.prototype.setExecuteHandler=function(e,t){this._executeHandlers[e.charCodeAt(0)]=t},r.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},r.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},r.prototype.registerCsiHandler=function(e,t){var r=this._identifier(e);void 0===this._csiHandlers[r]&&(this._csiHandlers[r]=[]);var i=this._csiHandlers[r];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},r.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},r.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},r.prototype.registerDcsHandler=function(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)},r.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},r.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},r.prototype.registerOscHandler=function(e,t){return this._oscParser.registerHandler(e,t)},r.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},r.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},r.prototype.setErrorHandler=function(e){this._errorHandler=e},r.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},r.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,0!==this._parseStack.state&&(this._parseStack.state=2,this._parseStack.handlers=[])},r.prototype._preserveStack=function(e,t,r,i,n){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=r,this._parseStack.transition=i,this._parseStack.chunkPos=n},r.prototype.parse=function(e,t,r){var i,n=0,o=0,s=0;if(this._parseStack.state)if(2===this._parseStack.state)this._parseStack.state=0,s=this._parseStack.chunkPos+1;else{if(void 0===r||1===this._parseStack.state)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");var a=this._parseStack.handlers,c=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(!1===r&&c>-1)for(;c>=0&&!0!==(i=a[c](this._params));c--)if(i instanceof Promise)return this._parseStack.handlerPos=c,i;this._parseStack.handlers=[];break;case 4:if(!1===r&&c>-1)for(;c>=0&&!0!==(i=a[c]());c--)if(i instanceof Promise)return this._parseStack.handlerPos=c,i;this._parseStack.handlers=[];break;case 6:if(n=e[this._parseStack.chunkPos],i=this._dcsParser.unhook(24!==n&&26!==n,r))return i;27===n&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(n=e[this._parseStack.chunkPos],i=this._oscParser.end(24!==n&&26!==n,r))return i;27===n&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,s=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(var l=s;l<t;++l){switch(n=e[l],(o=this._transitions.table[this.currentState<<8|(n<160?n:u)])>>4){case 2:for(var h=l+1;;++h){if(h>=t||(n=e[h])<32||n>126&&n<u){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<u){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<u){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(n=e[h])<32||n>126&&n<u){this._printHandler(e,l,h),l=h-1;break}}break;case 3:this._executeHandlers[n]?this._executeHandlers[n]():this._executeHandlerFb(n),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:l,code:n,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:for(var f=(a=this._csiHandlers[this._collect<<8|n])?a.length-1:-1;f>=0&&!0!==(i=a[f](this._params));f--)if(i instanceof Promise)return this._preserveStack(3,a,f,o,l),i;f<0&&this._csiHandlerFb(this._collect<<8|n,this._params),this.precedingCodepoint=0;break;case 8:do{switch(n){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(n-48)}}while(++l<t&&(n=e[l])>47&&n<60);l--;break;case 9:this._collect<<=8,this._collect|=n;break;case 10:for(var _=this._escHandlers[this._collect<<8|n],d=_?_.length-1:-1;d>=0&&!0!==(i=_[d]());d--)if(i instanceof Promise)return this._preserveStack(4,_,d,o,l),i;d<0&&this._escHandlerFb(this._collect<<8|n),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|n,this._params);break;case 13:for(var p=l+1;;++p)if(p>=t||24===(n=e[p])||26===n||27===n||n>127&&n<u){this._dcsParser.put(e,l,p),l=p-1;break}break;case 14:if(i=this._dcsParser.unhook(24!==n&&26!==n))return this._preserveStack(6,[],0,o,l),i;27===n&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(var v=l+1;;v++)if(v>=t||(n=e[v])<32||n>127&&n<u){this._oscParser.put(e,l,v),l=v-1;break}break;case 6:if(i=this._oscParser.end(24!==n&&26!==n))return this._preserveStack(5,[],0,o,l),i;27===n&&(o|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&o}},r}(o.Disposable);t.EscapeSequenceParser=f},6242:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OscHandler=t.OscParser=void 0;var i=r(5770),n=r(482),o=[],s=function(){function e(){this._state=0,this._active=o,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}return e.prototype.registerHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var r=this._handlers[e];return r.push(t),{dispose:function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}}},e.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},e.prototype.setHandlerFallback=function(e){this._handlerFb=e},e.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){},this._active=o},e.prototype.reset=function(){if(2===this._state)for(var e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=o,this._id=-1,this._state=0},e.prototype._start=function(){if(this._active=this._handlers[this._id]||o,this._active.length)for(var e=this._active.length-1;e>=0;e--)this._active[e].start();else this._handlerFb(this._id,"START")},e.prototype._put=function(e,t,r){if(this._active.length)for(var i=this._active.length-1;i>=0;i--)this._active[i].put(e,t,r);else this._handlerFb(this._id,"PUT",(0,n.utf32ToString)(e,t,r))},e.prototype.start=function(){this.reset(),this._state=1},e.prototype.put=function(e,t,r){if(3!==this._state){if(1===this._state)for(;t<r;){var i=e[t++];if(59===i){this._state=2,this._start();break}if(i<48||57<i)return void(this._state=3);-1===this._id&&(this._id=0),this._id=10*this._id+i-48}2===this._state&&r-t>0&&this._put(e,t,r)}},e.prototype.end=function(e,t){if(void 0===t&&(t=!0),0!==this._state){if(3!==this._state)if(1===this._state&&this._start(),this._active.length){var r=!1,i=this._active.length-1,n=!1;if(this._stack.paused&&(i=this._stack.loopPosition-1,r=t,n=this._stack.fallThrough,this._stack.paused=!1),!n&&!1===r){for(;i>=0&&!0!==(r=this._active[i].end(e));i--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=i,this._stack.fallThrough=!1,r;i--}for(;i>=0;i--)if((r=this._active[i].end(!1))instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=i,this._stack.fallThrough=!0,r}else this._handlerFb(this._id,"END",e);this._active=o,this._id=-1,this._state=0}},e}();t.OscParser=s;var a=function(){function e(e){this._handler=e,this._data="",this._hitLimit=!1}return e.prototype.start=function(){this._data="",this._hitLimit=!1},e.prototype.put=function(e,t,r){this._hitLimit||(this._data+=(0,n.utf32ToString)(e,t,r),this._data.length>i.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},e.prototype.end=function(e){var t=this,r=!1;if(this._hitLimit)r=!1;else if(e&&(r=this._handler(this._data))instanceof Promise)return r.then((function(e){return t._data="",t._hitLimit=!1,e}));return this._data="",this._hitLimit=!1,r},e}();t.OscHandler=a},8742:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Params=void 0;var r=2147483647,i=function(){function e(e,t){if(void 0===e&&(e=32),void 0===t&&(t=32),this.maxLength=e,this.maxSubParamsLength=t,t>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(e),this.length=0,this._subParams=new Int32Array(t),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(e),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return e.fromArray=function(t){var r=new e;if(!t.length)return r;for(var i=Array.isArray(t[0])?1:0;i<t.length;++i){var n=t[i];if(Array.isArray(n))for(var o=0;o<n.length;++o)r.addSubParam(n[o]);else r.addParam(n)}return r},e.prototype.clone=function(){var t=new e(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t},e.prototype.toArray=function(){for(var e=[],t=0;t<this.length;++t){e.push(this.params[t]);var r=this._subParamsIdx[t]>>8,i=255&this._subParamsIdx[t];i-r>0&&e.push(Array.prototype.slice.call(this._subParams,r,i))}return e},e.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},e.prototype.addParam=function(e){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=e>r?r:e}},e.prototype.addSubParam=function(e){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=e>r?r:e,this._subParamsIdx[this.length-1]++}},e.prototype.hasSubParams=function(e){return(255&this._subParamsIdx[e])-(this._subParamsIdx[e]>>8)>0},e.prototype.getSubParams=function(e){var t=this._subParamsIdx[e]>>8,r=255&this._subParamsIdx[e];return r-t>0?this._subParams.subarray(t,r):null},e.prototype.getSubParamsAll=function(){for(var e={},t=0;t<this.length;++t){var r=this._subParamsIdx[t]>>8,i=255&this._subParamsIdx[t];i-r>0&&(e[t]=this._subParams.slice(r,i))}return e},e.prototype.addDigit=function(e){var t;if(!(this._rejectDigits||!(t=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var i=this._digitIsSub?this._subParams:this.params,n=i[t-1];i[t-1]=~n?Math.min(10*n+e,r):e}},e}();t.Params=i},5741:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AddonManager=void 0;var r=function(){function e(){this._addons=[]}return e.prototype.dispose=function(){for(var e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()},e.prototype.loadAddon=function(e,t){var r=this,i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=function(){return r._wrappedAddonDispose(i)},t.activate(e)},e.prototype._wrappedAddonDispose=function(e){if(!e.isDisposed){for(var t=-1,r=0;r<this._addons.length;r++)if(this._addons[r]===e){t=r;break}if(-1===t)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},e}();t.AddonManager=r},8771:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferApiView=void 0;var i=r(3785),n=r(511),o=function(){function e(e,t){this._buffer=e,this.type=t}return e.prototype.init=function(e){return this._buffer=e,this},Object.defineProperty(e.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),e.prototype.getLine=function(e){var t=this._buffer.lines.get(e);if(t)return new i.BufferLineApiView(t)},e.prototype.getNullCell=function(){return new n.CellData},e}();t.BufferApiView=o},3785:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferLineApiView=void 0;var i=r(511),n=function(){function e(e){this._line=e}return Object.defineProperty(e.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),e.prototype.getCell=function(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new i.CellData)},e.prototype.translateToString=function(e,t,r){return this._line.translateToString(e,t,r)},e}();t.BufferLineApiView=n},8285:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BufferNamespaceApi=void 0;var i=r(8771),n=r(8460),o=function(){function e(e){var t=this;this._core=e,this._onBufferChange=new n.EventEmitter,this._normal=new i.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new i.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((function(){return t._onBufferChange.fire(t.active)}))}return Object.defineProperty(e.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"normal",{get:function(){return this._normal.init(this._core.buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alternate",{get:function(){return this._alternate.init(this._core.buffers.alt)},enumerable:!1,configurable:!0}),e}();t.BufferNamespaceApi=o},7975:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParserApi=void 0;var r=function(){function e(e){this._core=e}return e.prototype.registerCsiHandler=function(e,t){return this._core.registerCsiHandler(e,(function(e){return t(e.toArray())}))},e.prototype.addCsiHandler=function(e,t){return this.registerCsiHandler(e,t)},e.prototype.registerDcsHandler=function(e,t){return this._core.registerDcsHandler(e,(function(e,r){return t(e,r.toArray())}))},e.prototype.addDcsHandler=function(e,t){return this.registerDcsHandler(e,t)},e.prototype.registerEscHandler=function(e,t){return this._core.registerEscHandler(e,t)},e.prototype.addEscHandler=function(e,t){return this.registerEscHandler(e,t)},e.prototype.registerOscHandler=function(e,t){return this._core.registerOscHandler(e,t)},e.prototype.addOscHandler=function(e,t){return this.registerOscHandler(e,t)},e}();t.ParserApi=r},7090:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeApi=void 0;var r=function(){function e(e){this._core=e}return e.prototype.register=function(e){this._core.unicodeService.register(e)},Object.defineProperty(e.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(e){this._core.unicodeService.activeVersion=e},enumerable:!1,configurable:!0}),e}();t.UnicodeApi=r},744:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferService=t.MINIMUM_ROWS=t.MINIMUM_COLS=void 0;var a=r(2585),c=r(5295),l=r(8460),h=r(844);t.MINIMUM_COLS=2,t.MINIMUM_ROWS=1;var u=function(e){function r(r){var i=e.call(this)||this;return i._optionsService=r,i.isUserScrolling=!1,i._onResize=new l.EventEmitter,i._onScroll=new l.EventEmitter,i.cols=Math.max(r.rawOptions.cols||0,t.MINIMUM_COLS),i.rows=Math.max(r.rawOptions.rows||0,t.MINIMUM_ROWS),i.buffers=new c.BufferSet(r,i),i}return n(r,e),Object.defineProperty(r.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){e.prototype.dispose.call(this),this.buffers.dispose()},r.prototype.resize=function(e,t){this.cols=e,this.rows=t,this.buffers.resize(e,t),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:e,rows:t})},r.prototype.reset=function(){this.buffers.reset(),this.isUserScrolling=!1},r.prototype.scroll=function(e,t){void 0===t&&(t=!1);var r,i=this.buffer;(r=this._cachedBlankLine)&&r.length===this.cols&&r.getFg(0)===e.fg&&r.getBg(0)===e.bg||(r=i.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;var n=i.ybase+i.scrollTop,o=i.ybase+i.scrollBottom;if(0===i.scrollTop){var s=i.lines.isFull;o===i.lines.length-1?s?i.lines.recycle().copyFrom(r):i.lines.push(r.clone()):i.lines.splice(o+1,0,r.clone()),s?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{var a=o-n+1;i.lines.shiftElements(n+1,a-1,-1),i.lines.set(o,r.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)},r.prototype.scrollLines=function(e,t,r){var i=this.buffer;if(e<0){if(0===i.ydisp)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);var n=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),n!==i.ydisp&&(t||this._onScroll.fire(i.ydisp))},r.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},r.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},r.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},r.prototype.scrollToLine=function(e){var t=e-this.buffer.ydisp;0!==t&&this.scrollLines(t)},o([s(0,a.IOptionsService)],r)}(h.Disposable);t.BufferService=u},7994:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharsetService=void 0;var r=function(){function e(){this.glevel=0,this._charsets=[]}return e.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},e.prototype.setgLevel=function(e){this.glevel=e,this.charset=this._charsets[e]},e.prototype.setgCharset=function(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)},e}();t.CharsetService=r},1753:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreMouseService=void 0;var o=r(2585),s=r(8460),a={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(e){return 4!==e.button&&1===e.action&&(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)}},VT200:{events:19,restrict:function(e){return 32!==e.action}},DRAG:{events:23,restrict:function(e){return 32!==e.action||3!==e.button}},ANY:{events:31,restrict:function(e){return!0}}};function c(e,t){var r=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return 4===e.button?(r|=64,r|=e.action):(r|=3&e.button,4&e.button&&(r|=64),8&e.button&&(r|=128),32===e.action?r|=32:0!==e.action||t||(r|=3)),r}var l=String.fromCharCode,h={DEFAULT:function(e){var t=[c(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":""+l(t[0])+l(t[1])+l(t[2])},SGR:function(e){var t=0===e.action&&4!==e.button?"m":"M";return"[<"+c(e,!0)+";"+e.col+";"+e.row+t}},u=function(){function e(e,t){this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new s.EventEmitter,this._lastEvent=null;for(var r=0,i=Object.keys(a);r<i.length;r++){var n=i[r];this.addProtocol(n,a[n])}for(var o=0,c=Object.keys(h);o<c.length;o++){var l=c[o];this.addEncoding(l,h[l])}this.reset()}return e.prototype.addProtocol=function(e,t){this._protocols[e]=t},e.prototype.addEncoding=function(e,t){this._encodings[e]=t},Object.defineProperty(e.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(e){if(!this._protocols[e])throw new Error('unknown protocol "'+e+'"');this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"areMouseEventsActive",{get:function(){return 0!==this._protocols[this._activeProtocol].events},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(e){if(!this._encodings[e])throw new Error('unknown encoding "'+e+'"');this._activeEncoding=e},enumerable:!1,configurable:!0}),e.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(e.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),e.prototype.triggerMouseEvent=function(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._compareEvents(this._lastEvent,e))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},e.prototype.explainEvents=function(e){return{down:!!(1&e),up:!!(2&e),drag:!!(4&e),move:!!(8&e),wheel:!!(16&e)}},e.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},i([n(0,o.IBufferService),n(1,o.ICoreService)],e)}();t.CoreMouseService=u},6975:function(e,t,r){var i,n=this&&this.__extends||(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},s=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreService=void 0;var a=r(2585),c=r(8460),l=r(1439),h=r(844),u=Object.freeze({insertMode:!1}),f=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),_=function(e){function t(t,r,i,n){var o=e.call(this)||this;return o._bufferService=r,o._logService=i,o._optionsService=n,o.isCursorInitialized=!1,o.isCursorHidden=!1,o._onData=o.register(new c.EventEmitter),o._onUserInput=o.register(new c.EventEmitter),o._onBinary=o.register(new c.EventEmitter),o._scrollToBottom=t,o.register({dispose:function(){return o._scrollToBottom=void 0}}),o.modes=(0,l.clone)(u),o.decPrivateModes=(0,l.clone)(f),o}return n(t,e),Object.defineProperty(t.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),t.prototype.reset=function(){this.modes=(0,l.clone)(u),this.decPrivateModes=(0,l.clone)(f)},t.prototype.triggerDataEvent=function(e,t){if(void 0===t&&(t=!1),!this._optionsService.rawOptions.disableStdin){var r=this._bufferService.buffer;r.ybase!==r.ydisp&&this._scrollToBottom(),t&&this._onUserInput.fire(),this._logService.debug('sending data "'+e+'"',(function(){return e.split("").map((function(e){return e.charCodeAt(0)}))})),this._onData.fire(e)}},t.prototype.triggerBinaryEvent=function(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug('sending binary "'+e+'"',(function(){return e.split("").map((function(e){return e.charCodeAt(0)}))})),this._onBinary.fire(e))},o([s(1,a.IBufferService),s(2,a.ILogService),s(3,a.IOptionsService)],t)}(h.Disposable);t.CoreService=_},3730:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}};Object.defineProperty(t,"__esModule",{value:!0}),t.DirtyRowService=void 0;var o=r(2585),s=function(){function e(e){this._bufferService=e,this.clearRange()}return Object.defineProperty(e.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),e.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},e.prototype.markDirty=function(e){e<this._start?this._start=e:e>this._end&&(this._end=e)},e.prototype.markRangeDirty=function(e,t){if(e>t){var r=e;e=t,t=r}e<this._start&&(this._start=e),t>this._end&&(this._end=t)},e.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},i([n(0,o.IBufferService)],e)}();t.DirtyRowService=s},4348:function(e,t,r){var i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.InstantiationService=t.ServiceCollection=void 0;var n=r(2585),o=r(8343),s=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._entries=new Map;for(var r=0,i=e;r<i.length;r++){var n=i[r],o=n[0],s=n[1];this.set(o,s)}}return e.prototype.set=function(e,t){var r=this._entries.get(e);return this._entries.set(e,t),r},e.prototype.forEach=function(e){this._entries.forEach((function(t,r){return e(r,t)}))},e.prototype.has=function(e){return this._entries.has(e)},e.prototype.get=function(e){return this._entries.get(e)},e}();t.ServiceCollection=s;var a=function(){function e(){this._services=new s,this._services.set(n.IInstantiationService,this)}return e.prototype.setService=function(e,t){this._services.set(e,t)},e.prototype.getService=function(e){return this._services.get(e)},e.prototype.createInstance=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=(0,o.getServiceDependencies)(e).sort((function(e,t){return e.index-t.index})),s=[],a=0,c=n;a<c.length;a++){var l=c[a],h=this._services.get(l.id);if(!h)throw new Error("[createInstance] "+e.name+" depends on UNKNOWN service "+l.id+".");s.push(h)}var u=n.length>0?n[0].index:t.length;if(t.length!==u)throw new Error("[createInstance] First service dependency of "+e.name+" at position "+(u+1)+" conflicts with "+t.length+" static arguments");return new(e.bind.apply(e,i([void 0],i(i([],t,!0),s,!0),!1)))},e}();t.InstantiationService=a},7866:function(e,t,r){var i=this&&this.__decorate||function(e,t,r,i){var n,o=arguments.length,s=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,i);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(s=(o<3?n(s):o>3?n(t,r,s):n(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s},n=this&&this.__param||function(e,t){return function(r,i){t(r,i,e)}},o=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var i,n=0,o=t.length;n<o;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))};Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;var s=r(2585),a={debug:s.LogLevelEnum.DEBUG,info:s.LogLevelEnum.INFO,warn:s.LogLevelEnum.WARN,error:s.LogLevelEnum.ERROR,off:s.LogLevelEnum.OFF},c=function(){function e(e){var t=this;this._optionsService=e,this.logLevel=s.LogLevelEnum.OFF,this._updateLogLevel(),this._optionsService.onOptionChange((function(e){"logLevel"===e&&t._updateLogLevel()}))}return e.prototype._updateLogLevel=function(){this.logLevel=a[this._optionsService.rawOptions.logLevel]},e.prototype._evalLazyOptionalParams=function(e){for(var t=0;t<e.length;t++)"function"==typeof e[t]&&(e[t]=e[t]())},e.prototype._log=function(e,t,r){this._evalLazyOptionalParams(r),e.call.apply(e,o([console,"xterm.js: "+t],r,!1))},e.prototype.debug=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.logLevel<=s.LogLevelEnum.DEBUG&&this._log(console.log,e,t)},e.prototype.info=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.logLevel<=s.LogLevelEnum.INFO&&this._log(console.info,e,t)},e.prototype.warn=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.logLevel<=s.LogLevelEnum.WARN&&this._log(console.warn,e,t)},e.prototype.error=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];this.logLevel<=s.LogLevelEnum.ERROR&&this._log(console.error,e,t)},i([n(0,s.IOptionsService)],e)}();t.LogService=c},7302:function(e,t,r){var i=this&&this.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsService=t.DEFAULT_OPTIONS=t.DEFAULT_BELL_SOUND=void 0;var n=r(8460),o=r(6114);t.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",t.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,customGlyphs:!0,bellSound:t.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:o.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1};var s=["normal","bold","100","200","300","400","500","600","700","800","900"],a=function(){function e(e){this._onOptionChange=new n.EventEmitter;var r=i({},t.DEFAULT_OPTIONS);for(var o in e)if(o in r)try{var s=e[o];r[o]=this._sanitizeAndValidateOption(o,s)}catch(e){console.error(e)}this.rawOptions=r,this.options=i({},r),this._setupOptions()}return Object.defineProperty(e.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),e.prototype._setupOptions=function(){var e=this,r=function(r){if(!(r in t.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');return e.rawOptions[r]},i=function(r,i){if(!(r in t.DEFAULT_OPTIONS))throw new Error('No option with key "'+r+'"');i=e._sanitizeAndValidateOption(r,i),e.rawOptions[r]!==i&&(e.rawOptions[r]=i,e._onOptionChange.fire(r))};for(var n in this.rawOptions){var o={get:r.bind(this,n),set:i.bind(this,n)};Object.defineProperty(this.options,n,o)}},e.prototype.setOption=function(e,t){this.options[e]=t},e.prototype._sanitizeAndValidateOption=function(e,r){switch(e){case"bellStyle":case"cursorStyle":case"rendererType":case"wordSeparator":r||(r=t.DEFAULT_OPTIONS[e]);break;case"fontWeight":case"fontWeightBold":if("number"==typeof r&&1<=r&&r<=1e3)break;r=s.includes(r)?r:t.DEFAULT_OPTIONS[e];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(e+" cannot be less than 1, value: "+r);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(e+" cannot be less than 0, value: "+r);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(e+" cannot be less than or equal to 0, value: "+r);case"rows":case"cols":if(!r&&0!==r)throw new Error(e+" must be numeric, value: "+r)}return r},e.prototype.getOption=function(e){return this.options[e]},e}();t.OptionsService=a},8343:(e,t)=>{function r(e,t,r){t.di$target===t?t.di$dependencies.push({id:e,index:r}):(t.di$dependencies=[{id:e,index:r}],t.di$target=t)}Object.defineProperty(t,"__esModule",{value:!0}),t.createDecorator=t.getServiceDependencies=t.serviceRegistry=void 0,t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e.di$dependencies||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);var i=function(e,t,n){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");r(i,e,n)};return i.toString=function(){return e},t.serviceRegistry.set(e,i),i}},2585:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IUnicodeService=t.IOptionsService=t.ILogService=t.LogLevelEnum=t.IInstantiationService=t.IDirtyRowService=t.ICharsetService=t.ICoreService=t.ICoreMouseService=t.IBufferService=void 0;var i,n=r(8343);t.IBufferService=(0,n.createDecorator)("BufferService"),t.ICoreMouseService=(0,n.createDecorator)("CoreMouseService"),t.ICoreService=(0,n.createDecorator)("CoreService"),t.ICharsetService=(0,n.createDecorator)("CharsetService"),t.IDirtyRowService=(0,n.createDecorator)("DirtyRowService"),t.IInstantiationService=(0,n.createDecorator)("InstantiationService"),(i=t.LogLevelEnum||(t.LogLevelEnum={}))[i.DEBUG=0]="DEBUG",i[i.INFO=1]="INFO",i[i.WARN=2]="WARN",i[i.ERROR=3]="ERROR",i[i.OFF=4]="OFF",t.ILogService=(0,n.createDecorator)("LogService"),t.IOptionsService=(0,n.createDecorator)("OptionsService"),t.IUnicodeService=(0,n.createDecorator)("UnicodeService")},1480:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UnicodeService=void 0;var i=r(8460),n=r(225),o=function(){function e(){this._providers=Object.create(null),this._active="",this._onChange=new i.EventEmitter;var e=new n.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}return Object.defineProperty(e.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeVersion",{get:function(){return this._active},set:function(e){if(!this._providers[e])throw new Error('unknown Unicode version "'+e+'"');this._active=e,this._activeProvider=this._providers[e],this._onChange.fire(e)},enumerable:!1,configurable:!0}),e.prototype.register=function(e){this._providers[e.version]=e},e.prototype.wcwidth=function(e){return this._activeProvider.wcwidth(e)},e.prototype.getStringCellWidth=function(e){for(var t=0,r=e.length,i=0;i<r;++i){var n=e.charCodeAt(i);if(55296<=n&&n<=56319){if(++i>=r)return t+this.wcwidth(n);var o=e.charCodeAt(i);56320<=o&&o<=57343?n=1024*(n-55296)+o-56320+65536:t+=this.wcwidth(o)}t+=this.wcwidth(n)}return t},e}();t.UnicodeService=o}},t={};return function r(i){var n=t[i];if(void 0!==n)return n.exports;var o=t[i]={exports:{}};return e[i].call(o.exports,o,o.exports,r),o.exports}(4389)})()}));
-//# sourceMappingURL=xterm.js.map \ No newline at end of file
diff --git a/node_modules/xterm/lib/xterm.js.map b/node_modules/xterm/lib/xterm.js.map
deleted file mode 100644
index 2fe19dc..0000000
--- a/node_modules/xterm/lib/xterm.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"xterm.js","mappings":"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,CAAC,IAAQ,KAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAAS,CAAC,KAAQ,MAC7C,CAA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","sources":["webpack://xterm/webpack/universalModuleDefinition","webpack://xterm/./src/browser/AccessibilityManager.ts","webpack://xterm/./src/browser/Clipboard.ts","webpack://xterm/./src/browser/Color.ts","webpack://xterm/./src/browser/ColorContrastCache.ts","webpack://xterm/./src/browser/ColorManager.ts","webpack://xterm/./src/browser/Dom.ts","webpack://xterm/./src/browser/Lifecycle.ts","webpack://xterm/./src/browser/Linkifier.ts","webpack://xterm/./src/browser/Linkifier2.ts","webpack://xterm/./src/browser/LocalizableStrings.ts","webpack://xterm/./src/browser/MouseZoneManager.ts","webpack://xterm/./src/browser/RenderDebouncer.ts","webpack://xterm/./src/browser/ScreenDprMonitor.ts","webpack://xterm/./src/browser/Terminal.ts","webpack://xterm/./src/browser/TimeBasedDebouncer.ts","webpack://xterm/./src/browser/Viewport.ts","webpack://xterm/./src/browser/input/CompositionHelper.ts","webpack://xterm/./src/browser/input/Mouse.ts","webpack://xterm/./src/browser/input/MoveToCell.ts","webpack://xterm/./src/browser/public/Terminal.ts","webpack://xterm/./src/browser/renderer/BaseRenderLayer.ts","webpack://xterm/./src/browser/renderer/CursorRenderLayer.ts","webpack://xterm/./src/browser/renderer/CustomGlyphs.ts","webpack://xterm/./src/browser/renderer/GridCache.ts","webpack://xterm/./src/browser/renderer/LinkRenderLayer.ts","webpack://xterm/./src/browser/renderer/Renderer.ts","webpack://xterm/./src/browser/renderer/RendererUtils.ts","webpack://xterm/./src/browser/renderer/SelectionRenderLayer.ts","webpack://xterm/./src/browser/renderer/TextRenderLayer.ts","webpack://xterm/./src/browser/renderer/atlas/BaseCharAtlas.ts","webpack://xterm/./src/browser/renderer/atlas/CharAtlasCache.ts","webpack://xterm/./src/browser/renderer/atlas/CharAtlasUtils.ts","webpack://xterm/./src/browser/renderer/atlas/Constants.ts","webpack://xterm/./src/browser/renderer/atlas/DynamicCharAtlas.ts","webpack://xterm/./src/browser/renderer/atlas/LRUMap.ts","webpack://xterm/./src/browser/renderer/dom/DomRenderer.ts","webpack://xterm/./src/browser/renderer/dom/DomRendererRowFactory.ts","webpack://xterm/./src/browser/selection/SelectionModel.ts","webpack://xterm/./src/browser/services/CharSizeService.ts","webpack://xterm/./src/browser/services/CharacterJoinerService.ts","webpack://xterm/./src/browser/services/CoreBrowserService.ts","webpack://xterm/./src/browser/services/DecorationService.ts","webpack://xterm/./src/browser/services/MouseService.ts","webpack://xterm/./src/browser/services/RenderService.ts","webpack://xterm/./src/browser/services/SelectionService.ts","webpack://xterm/./src/browser/services/Services.ts","webpack://xterm/./src/browser/services/SoundService.ts","webpack://xterm/./src/common/CircularList.ts","webpack://xterm/./src/common/Clone.ts","webpack://xterm/./src/common/CoreTerminal.ts","webpack://xterm/./src/common/EventEmitter.ts","webpack://xterm/./src/common/InputHandler.ts","webpack://xterm/./src/common/Lifecycle.ts","webpack://xterm/./src/common/Platform.ts","webpack://xterm/./src/common/TypedArrayUtils.ts","webpack://xterm/./src/common/WindowsMode.ts","webpack://xterm/./src/common/buffer/AttributeData.ts","webpack://xterm/./src/common/buffer/Buffer.ts","webpack://xterm/./src/common/buffer/BufferLine.ts","webpack://xterm/./src/common/buffer/BufferRange.ts","webpack://xterm/./src/common/buffer/BufferReflow.ts","webpack://xterm/./src/common/buffer/BufferSet.ts","webpack://xterm/./src/common/buffer/CellData.ts","webpack://xterm/./src/common/buffer/Constants.ts","webpack://xterm/./src/common/buffer/Marker.ts","webpack://xterm/./src/common/data/Charsets.ts","webpack://xterm/./src/common/data/EscapeSequences.ts","webpack://xterm/./src/common/input/Keyboard.ts","webpack://xterm/./src/common/input/TextDecoder.ts","webpack://xterm/./src/common/input/UnicodeV6.ts","webpack://xterm/./src/common/input/WriteBuffer.ts","webpack://xterm/./src/common/input/XParseColor.ts","webpack://xterm/./src/common/parser/Constants.ts","webpack://xterm/./src/common/parser/DcsParser.ts","webpack://xterm/./src/common/parser/EscapeSequenceParser.ts","webpack://xterm/./src/common/parser/OscParser.ts","webpack://xterm/./src/common/parser/Params.ts","webpack://xterm/./src/common/public/AddonManager.ts","webpack://xterm/./src/common/public/BufferApiView.ts","webpack://xterm/./src/common/public/BufferLineApiView.ts","webpack://xterm/./src/common/public/BufferNamespaceApi.ts","webpack://xterm/./src/common/public/ParserApi.ts","webpack://xterm/./src/common/public/UnicodeApi.ts","webpack://xterm/./src/common/services/BufferService.ts","webpack://xterm/./src/common/services/CharsetService.ts","webpack://xterm/./src/common/services/CoreMouseService.ts","webpack://xterm/./src/common/services/CoreService.ts","webpack://xterm/./src/common/services/DirtyRowService.ts","webpack://xterm/./src/common/services/InstantiationService.ts","webpack://xterm/./src/common/services/LogService.ts","webpack://xterm/./src/common/services/OptionsService.ts","webpack://xterm/./src/common/services/ServiceRegistry.ts","webpack://xterm/./src/common/services/Services.ts","webpack://xterm/./src/common/services/UnicodeService.ts","webpack://xterm/webpack/bootstrap","webpack://xterm/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(self, function() {\nreturn ","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport * as Strings from 'browser/LocalizableStrings';\nimport { ITerminal, IRenderDebouncer } from 'browser/Types';\nimport { IBuffer } from 'common/buffer/Types';\nimport { isMac } from 'common/Platform';\nimport { TimeBasedDebouncer } from 'browser/TimeBasedDebouncer';\nimport { addDisposableDomListener } from 'browser/Lifecycle';\nimport { Disposable } from 'common/Lifecycle';\nimport { ScreenDprMonitor } from 'browser/ScreenDprMonitor';\nimport { IRenderService } from 'browser/services/Services';\nimport { removeElementFromParent } from 'browser/Dom';\n\nconst MAX_ROWS_TO_READ = 20;\n\nconst enum BoundaryPosition {\n TOP,\n BOTTOM\n}\n\nexport class AccessibilityManager extends Disposable {\n private _accessibilityTreeRoot: HTMLElement;\n private _rowContainer: HTMLElement;\n private _rowElements: HTMLElement[];\n private _liveRegion: HTMLElement;\n private _liveRegionLineCount: number = 0;\n\n private _renderRowsDebouncer: IRenderDebouncer;\n private _screenDprMonitor: ScreenDprMonitor;\n\n private _topBoundaryFocusListener: (e: FocusEvent) => void;\n private _bottomBoundaryFocusListener: (e: FocusEvent) => void;\n\n /**\n * This queue has a character pushed to it for keys that are pressed, if the\n * next character added to the terminal is equal to the key char then it is\n * not announced (added to live region) because it has already been announced\n * by the textarea event (which cannot be canceled). There are some race\n * condition cases if there is typing while data is streaming, but this covers\n * the main case of typing into the prompt and inputting the answer to a\n * question (Y/N, etc.).\n */\n private _charsToConsume: string[] = [];\n\n private _charsToAnnounce: string = '';\n\n constructor(\n private readonly _terminal: ITerminal,\n private readonly _renderService: IRenderService\n ) {\n super();\n this._accessibilityTreeRoot = document.createElement('div');\n this._accessibilityTreeRoot.classList.add('xterm-accessibility');\n this._accessibilityTreeRoot.tabIndex = 0;\n\n this._rowContainer = document.createElement('div');\n this._rowContainer.setAttribute('role', 'list');\n this._rowContainer.classList.add('xterm-accessibility-tree');\n this._rowElements = [];\n for (let i = 0; i < this._terminal.rows; i++) {\n this._rowElements[i] = this._createAccessibilityTreeNode();\n this._rowContainer.appendChild(this._rowElements[i]);\n }\n\n this._topBoundaryFocusListener = e => this._onBoundaryFocus(e, BoundaryPosition.TOP);\n this._bottomBoundaryFocusListener = e => this._onBoundaryFocus(e, BoundaryPosition.BOTTOM);\n this._rowElements[0].addEventListener('focus', this._topBoundaryFocusListener);\n this._rowElements[this._rowElements.length - 1].addEventListener('focus', this._bottomBoundaryFocusListener);\n\n this._refreshRowsDimensions();\n this._accessibilityTreeRoot.appendChild(this._rowContainer);\n\n this._renderRowsDebouncer = new TimeBasedDebouncer(this._renderRows.bind(this));\n this._refreshRows();\n\n this._liveRegion = document.createElement('div');\n this._liveRegion.classList.add('live-region');\n this._liveRegion.setAttribute('aria-live', 'assertive');\n this._accessibilityTreeRoot.appendChild(this._liveRegion);\n\n if (!this._terminal.element) {\n throw new Error('Cannot enable accessibility before Terminal.open');\n }\n this._terminal.element.insertAdjacentElement('afterbegin', this._accessibilityTreeRoot);\n\n this.register(this._renderRowsDebouncer);\n this.register(this._terminal.onResize(e => this._onResize(e.rows)));\n this.register(this._terminal.onRender(e => this._refreshRows(e.start, e.end)));\n this.register(this._terminal.onScroll(() => this._refreshRows()));\n // Line feed is an issue as the prompt won't be read out after a command is run\n this.register(this._terminal.onA11yChar(char => this._onChar(char)));\n this.register(this._terminal.onLineFeed(() => this._onChar('\\n')));\n this.register(this._terminal.onA11yTab(spaceCount => this._onTab(spaceCount)));\n this.register(this._terminal.onKey(e => this._onKey(e.key)));\n this.register(this._terminal.onBlur(() => this._clearLiveRegion()));\n this.register(this._renderService.onDimensionsChange(() => this._refreshRowsDimensions()));\n\n this._screenDprMonitor = new ScreenDprMonitor();\n this.register(this._screenDprMonitor);\n this._screenDprMonitor.setListener(() => this._refreshRowsDimensions());\n // This shouldn't be needed on modern browsers but is present in case the\n // media query that drives the ScreenDprMonitor isn't supported\n this.register(addDisposableDomListener(window, 'resize', () => this._refreshRowsDimensions()));\n }\n\n public dispose(): void {\n super.dispose();\n removeElementFromParent(this._accessibilityTreeRoot);\n this._rowElements.length = 0;\n }\n\n private _onBoundaryFocus(e: FocusEvent, position: BoundaryPosition): void {\n const boundaryElement = e.target as HTMLElement;\n const beforeBoundaryElement = this._rowElements[position === BoundaryPosition.TOP ? 1 : this._rowElements.length - 2];\n\n // Don't scroll if the buffer top has reached the end in that direction\n const posInSet = boundaryElement.getAttribute('aria-posinset');\n const lastRowPos = position === BoundaryPosition.TOP ? '1' : `${this._terminal.buffer.lines.length}`;\n if (posInSet === lastRowPos) {\n return;\n }\n\n // Don't scroll when the last focused item was not the second row (focus is going the other\n // direction)\n if (e.relatedTarget !== beforeBoundaryElement) {\n return;\n }\n\n // Remove old boundary element from array\n let topBoundaryElement: HTMLElement;\n let bottomBoundaryElement: HTMLElement;\n if (position === BoundaryPosition.TOP) {\n topBoundaryElement = boundaryElement;\n bottomBoundaryElement = this._rowElements.pop()!;\n this._rowContainer.removeChild(bottomBoundaryElement);\n } else {\n topBoundaryElement = this._rowElements.shift()!;\n bottomBoundaryElement = boundaryElement;\n this._rowContainer.removeChild(topBoundaryElement);\n }\n\n // Remove listeners from old boundary elements\n topBoundaryElement.removeEventListener('focus', this._topBoundaryFocusListener);\n bottomBoundaryElement.removeEventListener('focus', this._bottomBoundaryFocusListener);\n\n // Add new element to array/DOM\n if (position === BoundaryPosition.TOP) {\n const newElement = this._createAccessibilityTreeNode();\n this._rowElements.unshift(newElement);\n this._rowContainer.insertAdjacentElement('afterbegin', newElement);\n } else {\n const newElement = this._createAccessibilityTreeNode();\n this._rowElements.push(newElement);\n this._rowContainer.appendChild(newElement);\n }\n\n // Add listeners to new boundary elements\n this._rowElements[0].addEventListener('focus', this._topBoundaryFocusListener);\n this._rowElements[this._rowElements.length - 1].addEventListener('focus', this._bottomBoundaryFocusListener);\n\n // Scroll up\n this._terminal.scrollLines(position === BoundaryPosition.TOP ? -1 : 1);\n\n // Focus new boundary before element\n this._rowElements[position === BoundaryPosition.TOP ? 1 : this._rowElements.length - 2].focus();\n\n // Prevent the standard behavior\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n\n private _onResize(rows: number): void {\n // Remove bottom boundary listener\n this._rowElements[this._rowElements.length - 1].removeEventListener('focus', this._bottomBoundaryFocusListener);\n\n // Grow rows as required\n for (let i = this._rowContainer.children.length; i < this._terminal.rows; i++) {\n this._rowElements[i] = this._createAccessibilityTreeNode();\n this._rowContainer.appendChild(this._rowElements[i]);\n }\n // Shrink rows as required\n while (this._rowElements.length > rows) {\n this._rowContainer.removeChild(this._rowElements.pop()!);\n }\n\n // Add bottom boundary listener\n this._rowElements[this._rowElements.length - 1].addEventListener('focus', this._bottomBoundaryFocusListener);\n\n this._refreshRowsDimensions();\n }\n\n private _createAccessibilityTreeNode(): HTMLElement {\n const element = document.createElement('div');\n element.setAttribute('role', 'listitem');\n element.tabIndex = -1;\n this._refreshRowDimensions(element);\n return element;\n }\n\n private _onTab(spaceCount: number): void {\n for (let i = 0; i < spaceCount; i++) {\n this._onChar(' ');\n }\n }\n\n private _onChar(char: string): void {\n if (this._liveRegionLineCount < MAX_ROWS_TO_READ + 1) {\n if (this._charsToConsume.length > 0) {\n // Have the screen reader ignore the char if it was just input\n const shiftedChar = this._charsToConsume.shift();\n if (shiftedChar !== char) {\n this._charsToAnnounce += char;\n }\n } else {\n this._charsToAnnounce += char;\n }\n\n if (char === '\\n') {\n this._liveRegionLineCount++;\n if (this._liveRegionLineCount === MAX_ROWS_TO_READ + 1) {\n this._liveRegion.textContent += Strings.tooMuchOutput;\n }\n }\n\n // Only detach/attach on mac as otherwise messages can go unaccounced\n if (isMac) {\n if (this._liveRegion.textContent && this._liveRegion.textContent.length > 0 && !this._liveRegion.parentNode) {\n setTimeout(() => {\n this._accessibilityTreeRoot.appendChild(this._liveRegion);\n }, 0);\n }\n }\n }\n }\n\n private _clearLiveRegion(): void {\n this._liveRegion.textContent = '';\n this._liveRegionLineCount = 0;\n\n // Only detach/attach on mac as otherwise messages can go unaccounced\n if (isMac) {\n removeElementFromParent(this._liveRegion);\n }\n }\n\n private _onKey(keyChar: string): void {\n this._clearLiveRegion();\n this._charsToConsume.push(keyChar);\n }\n\n private _refreshRows(start?: number, end?: number): void {\n this._renderRowsDebouncer.refresh(start, end, this._terminal.rows);\n }\n\n private _renderRows(start: number, end: number): void {\n const buffer: IBuffer = this._terminal.buffer;\n const setSize = buffer.lines.length.toString();\n for (let i = start; i <= end; i++) {\n const lineData = buffer.translateBufferLineToString(buffer.ydisp + i, true);\n const posInSet = (buffer.ydisp + i + 1).toString();\n const element = this._rowElements[i];\n if (element) {\n if (lineData.length === 0) {\n element.innerText = '\\u00a0';\n } else {\n element.textContent = lineData;\n }\n element.setAttribute('aria-posinset', posInSet);\n element.setAttribute('aria-setsize', setSize);\n }\n }\n this._announceCharacters();\n }\n\n private _refreshRowsDimensions(): void {\n if (!this._renderService.dimensions.actualCellHeight) {\n return;\n }\n if (this._rowElements.length !== this._terminal.rows) {\n this._onResize(this._terminal.rows);\n }\n for (let i = 0; i < this._terminal.rows; i++) {\n this._refreshRowDimensions(this._rowElements[i]);\n }\n }\n\n private _refreshRowDimensions(element: HTMLElement): void {\n element.style.height = `${this._renderService.dimensions.actualCellHeight}px`;\n }\n\n private _announceCharacters(): void {\n if (this._charsToAnnounce.length === 0) {\n return;\n }\n this._liveRegion.textContent += this._charsToAnnounce;\n this._charsToAnnounce = '';\n }\n}\n","/**\n * Copyright (c) 2016 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ISelectionService } from 'browser/services/Services';\nimport { ICoreService } from 'common/services/Services';\n\n/**\n * Prepares text to be pasted into the terminal by normalizing the line endings\n * @param text The pasted text that needs processing before inserting into the terminal\n */\nexport function prepareTextForTerminal(text: string): string {\n return text.replace(/\\r?\\n/g, '\\r');\n}\n\n/**\n * Bracket text for paste, if necessary, as per https://cirw.in/blog/bracketed-paste\n * @param text The pasted text to bracket\n */\nexport function bracketTextForPaste(text: string, bracketedPasteMode: boolean): string {\n if (bracketedPasteMode) {\n return '\\x1b[200~' + text + '\\x1b[201~';\n }\n return text;\n}\n\n/**\n * Binds copy functionality to the given terminal.\n * @param ev The original copy event to be handled\n */\nexport function copyHandler(ev: ClipboardEvent, selectionService: ISelectionService): void {\n if (ev.clipboardData) {\n ev.clipboardData.setData('text/plain', selectionService.selectionText);\n }\n // Prevent or the original text will be copied.\n ev.preventDefault();\n}\n\n/**\n * Redirect the clipboard's data to the terminal's input handler.\n * @param ev The original paste event to be handled\n * @param term The terminal on which to apply the handled paste event\n */\nexport function handlePasteEvent(ev: ClipboardEvent, textarea: HTMLTextAreaElement, coreService: ICoreService): void {\n ev.stopPropagation();\n if (ev.clipboardData) {\n const text = ev.clipboardData.getData('text/plain');\n paste(text, textarea, coreService);\n }\n}\n\nexport function paste(text: string, textarea: HTMLTextAreaElement, coreService: ICoreService): void {\n text = prepareTextForTerminal(text);\n text = bracketTextForPaste(text, coreService.decPrivateModes.bracketedPasteMode);\n coreService.triggerDataEvent(text, true);\n textarea.value = '';\n}\n\n/**\n * Moves the textarea under the mouse cursor and focuses it.\n * @param ev The original right click event to be handled.\n * @param textarea The terminal's textarea.\n */\nexport function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextAreaElement, screenElement: HTMLElement): void {\n\n // Calculate textarea position relative to the screen element\n const pos = screenElement.getBoundingClientRect();\n const left = ev.clientX - pos.left - 10;\n const top = ev.clientY - pos.top - 10;\n\n // Bring textarea at the cursor position\n textarea.style.width = '20px';\n textarea.style.height = '20px';\n textarea.style.left = `${left}px`;\n textarea.style.top = `${top}px`;\n textarea.style.zIndex = '1000';\n\n textarea.focus();\n}\n\n/**\n * Bind to right-click event and allow right-click copy and paste.\n * @param ev The original right click event to be handled.\n * @param textarea The terminal's textarea.\n * @param selectionService The terminal's selection manager.\n * @param shouldSelectWord If true and there is no selection the current word will be selected\n */\nexport function rightClickHandler(ev: MouseEvent, textarea: HTMLTextAreaElement, screenElement: HTMLElement, selectionService: ISelectionService, shouldSelectWord: boolean): void {\n moveTextAreaUnderMouseCursor(ev, textarea, screenElement);\n\n if (shouldSelectWord) {\n selectionService.rightClickSelect(ev);\n }\n\n // Get textarea ready to copy from the context menu\n textarea.value = selectionService.selectionText;\n textarea.select();\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IColor } from 'browser/Types';\nimport { IColorRGB } from 'common/Types';\n\n/**\n * Helper functions where the source type is \"channels\" (individual color channels as numbers).\n */\nexport namespace channels {\n export function toCss(r: number, g: number, b: number, a?: number): string {\n if (a !== undefined) {\n return `#${toPaddedHex(r)}${toPaddedHex(g)}${toPaddedHex(b)}${toPaddedHex(a)}`;\n }\n return `#${toPaddedHex(r)}${toPaddedHex(g)}${toPaddedHex(b)}`;\n }\n\n export function toRgba(r: number, g: number, b: number, a: number = 0xFF): number {\n // Note: The aggregated number is RGBA32 (BE), thus needs to be converted to ABGR32\n // on LE systems, before it can be used for direct 32-bit buffer writes.\n // >>> 0 forces an unsigned int\n return (r << 24 | g << 16 | b << 8 | a) >>> 0;\n }\n}\n\n/**\n * Helper functions where the source type is `IColor`.\n */\nexport namespace color {\n export function blend(bg: IColor, fg: IColor): IColor {\n const a = (fg.rgba & 0xFF) / 255;\n if (a === 1) {\n return {\n css: fg.css,\n rgba: fg.rgba\n };\n }\n const fgR = (fg.rgba >> 24) & 0xFF;\n const fgG = (fg.rgba >> 16) & 0xFF;\n const fgB = (fg.rgba >> 8) & 0xFF;\n const bgR = (bg.rgba >> 24) & 0xFF;\n const bgG = (bg.rgba >> 16) & 0xFF;\n const bgB = (bg.rgba >> 8) & 0xFF;\n const r = bgR + Math.round((fgR - bgR) * a);\n const g = bgG + Math.round((fgG - bgG) * a);\n const b = bgB + Math.round((fgB - bgB) * a);\n const css = channels.toCss(r, g, b);\n const rgba = channels.toRgba(r, g, b);\n return { css, rgba };\n }\n\n export function isOpaque(color: IColor): boolean {\n return (color.rgba & 0xFF) === 0xFF;\n }\n\n export function ensureContrastRatio(bg: IColor, fg: IColor, ratio: number): IColor | undefined {\n const result = rgba.ensureContrastRatio(bg.rgba, fg.rgba, ratio);\n if (!result) {\n return undefined;\n }\n return rgba.toColor(\n (result >> 24 & 0xFF),\n (result >> 16 & 0xFF),\n (result >> 8 & 0xFF)\n );\n }\n\n export function opaque(color: IColor): IColor {\n const rgbaColor = (color.rgba | 0xFF) >>> 0;\n const [r, g, b] = rgba.toChannels(rgbaColor);\n return {\n css: channels.toCss(r, g, b),\n rgba: rgbaColor\n };\n }\n\n export function opacity(color: IColor, opacity: number): IColor {\n const a = Math.round(opacity * 0xFF);\n const [r, g, b] = rgba.toChannels(color.rgba);\n return {\n css: channels.toCss(r, g, b, a),\n rgba: channels.toRgba(r, g, b, a)\n };\n }\n\n export function toColorRGB(color: IColor): IColorRGB {\n return [(color.rgba >> 24) & 0xFF, (color.rgba >> 16) & 0xFF, (color.rgba >> 8) & 0xFF];\n }\n}\n\n/**\n * Helper functions where the source type is \"css\" (string: '#rgb', '#rgba', '#rrggbb', '#rrggbbaa').\n */\nexport namespace css {\n export function toColor(css: string): IColor {\n switch (css.length) {\n case 7: // #rrggbb\n return {\n css,\n rgba: (parseInt(css.slice(1), 16) << 8 | 0xFF) >>> 0\n };\n case 9: // #rrggbbaa\n return {\n css,\n rgba: parseInt(css.slice(1), 16) >>> 0\n };\n }\n throw new Error('css.toColor: Unsupported css format');\n }\n}\n\n/**\n * Helper functions where the source type is \"rgb\" (number: 0xrrggbb).\n */\nexport namespace rgb {\n /**\n * Gets the relative luminance of an RGB color, this is useful in determining the contrast ratio\n * between two colors.\n * @param rgb The color to use.\n * @see https://www.w3.org/TR/WCAG20/#relativeluminancedef\n */\n export function relativeLuminance(rgb: number): number {\n return relativeLuminance2(\n (rgb >> 16) & 0xFF,\n (rgb >> 8 ) & 0xFF,\n (rgb ) & 0xFF);\n }\n\n /**\n * Gets the relative luminance of an RGB color, this is useful in determining the contrast ratio\n * between two colors.\n * @param r The red channel (0x00 to 0xFF).\n * @param g The green channel (0x00 to 0xFF).\n * @param b The blue channel (0x00 to 0xFF).\n * @see https://www.w3.org/TR/WCAG20/#relativeluminancedef\n */\n export function relativeLuminance2(r: number, g: number, b: number): number {\n const rs = r / 255;\n const gs = g / 255;\n const bs = b / 255;\n const rr = rs <= 0.03928 ? rs / 12.92 : Math.pow((rs + 0.055) / 1.055, 2.4);\n const rg = gs <= 0.03928 ? gs / 12.92 : Math.pow((gs + 0.055) / 1.055, 2.4);\n const rb = bs <= 0.03928 ? bs / 12.92 : Math.pow((bs + 0.055) / 1.055, 2.4);\n return rr * 0.2126 + rg * 0.7152 + rb * 0.0722;\n }\n}\n\n/**\n * Helper functions where the source type is \"rgba\" (number: 0xrrggbbaa).\n */\nexport namespace rgba {\n export function ensureContrastRatio(bgRgba: number, fgRgba: number, ratio: number): number | undefined {\n const bgL = rgb.relativeLuminance(bgRgba >> 8);\n const fgL = rgb.relativeLuminance(fgRgba >> 8);\n const cr = contrastRatio(bgL, fgL);\n if (cr < ratio) {\n if (fgL < bgL) {\n return reduceLuminance(bgRgba, fgRgba, ratio);\n }\n return increaseLuminance(bgRgba, fgRgba, ratio);\n }\n return undefined;\n }\n\n export function reduceLuminance(bgRgba: number, fgRgba: number, ratio: number): number {\n // This is a naive but fast approach to reducing luminance as converting to\n // HSL and back is expensive\n const bgR = (bgRgba >> 24) & 0xFF;\n const bgG = (bgRgba >> 16) & 0xFF;\n const bgB = (bgRgba >> 8) & 0xFF;\n let fgR = (fgRgba >> 24) & 0xFF;\n let fgG = (fgRgba >> 16) & 0xFF;\n let fgB = (fgRgba >> 8) & 0xFF;\n let cr = contrastRatio(rgb.relativeLuminance2(fgR, fgB, fgG), rgb.relativeLuminance2(bgR, bgG, bgB));\n while (cr < ratio && (fgR > 0 || fgG > 0 || fgB > 0)) {\n // Reduce by 10% until the ratio is hit\n fgR -= Math.max(0, Math.ceil(fgR * 0.1));\n fgG -= Math.max(0, Math.ceil(fgG * 0.1));\n fgB -= Math.max(0, Math.ceil(fgB * 0.1));\n cr = contrastRatio(rgb.relativeLuminance2(fgR, fgB, fgG), rgb.relativeLuminance2(bgR, bgG, bgB));\n }\n return (fgR << 24 | fgG << 16 | fgB << 8 | 0xFF) >>> 0;\n }\n\n export function increaseLuminance(bgRgba: number, fgRgba: number, ratio: number): number {\n // This is a naive but fast approach to increasing luminance as converting to\n // HSL and back is expensive\n const bgR = (bgRgba >> 24) & 0xFF;\n const bgG = (bgRgba >> 16) & 0xFF;\n const bgB = (bgRgba >> 8) & 0xFF;\n let fgR = (fgRgba >> 24) & 0xFF;\n let fgG = (fgRgba >> 16) & 0xFF;\n let fgB = (fgRgba >> 8) & 0xFF;\n let cr = contrastRatio(rgb.relativeLuminance2(fgR, fgB, fgG), rgb.relativeLuminance2(bgR, bgG, bgB));\n while (cr < ratio && (fgR < 0xFF || fgG < 0xFF || fgB < 0xFF)) {\n // Increase by 10% until the ratio is hit\n fgR = Math.min(0xFF, fgR + Math.ceil((255 - fgR) * 0.1));\n fgG = Math.min(0xFF, fgG + Math.ceil((255 - fgG) * 0.1));\n fgB = Math.min(0xFF, fgB + Math.ceil((255 - fgB) * 0.1));\n cr = contrastRatio(rgb.relativeLuminance2(fgR, fgB, fgG), rgb.relativeLuminance2(bgR, bgG, bgB));\n }\n return (fgR << 24 | fgG << 16 | fgB << 8 | 0xFF) >>> 0;\n }\n\n // FIXME: Move this to channels NS?\n export function toChannels(value: number): [number, number, number, number] {\n return [(value >> 24) & 0xFF, (value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF];\n }\n\n export function toColor(r: number, g: number, b: number): IColor {\n return {\n css: channels.toCss(r, g, b),\n rgba: channels.toRgba(r, g, b)\n };\n }\n}\n\nexport function toPaddedHex(c: number): string {\n const s = c.toString(16);\n return s.length < 2 ? '0' + s : s;\n}\n\n/**\n * Gets the contrast ratio between two relative luminance values.\n * @param l1 The first relative luminance.\n * @param l2 The first relative luminance.\n * @see https://www.w3.org/TR/WCAG20/#contrast-ratiodef\n */\nexport function contrastRatio(l1: number, l2: number): number {\n if (l1 < l2) {\n return (l2 + 0.05) / (l1 + 0.05);\n }\n return (l1 + 0.05) / (l2 + 0.05);\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IColor, IColorContrastCache } from 'browser/Types';\n\nexport class ColorContrastCache implements IColorContrastCache {\n private _color: { [bg: number]: { [fg: number]: IColor | null | undefined } | undefined } = {};\n private _rgba: { [bg: number]: { [fg: number]: string | null | undefined } | undefined } = {};\n\n public clear(): void {\n this._color = {};\n this._rgba = {};\n }\n\n public setCss(bg: number, fg: number, value: string | null): void {\n if (!this._rgba[bg]) {\n this._rgba[bg] = {};\n }\n this._rgba[bg]![fg] = value;\n }\n\n public getCss(bg: number, fg: number): string | null | undefined {\n return this._rgba[bg] ? this._rgba[bg]![fg] : undefined;\n }\n\n public setColor(bg: number, fg: number, value: IColor | null): void {\n if (!this._color[bg]) {\n this._color[bg] = {};\n }\n this._color[bg]![fg] = value;\n }\n\n public getColor(bg: number, fg: number): IColor | null | undefined {\n return this._color[bg] ? this._color[bg]![fg] : undefined;\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IColorManager, IColor, IColorSet, IColorContrastCache } from 'browser/Types';\nimport { ITheme } from 'common/services/Services';\nimport { channels, color, css } from 'browser/Color';\nimport { ColorContrastCache } from 'browser/ColorContrastCache';\nimport { ColorIndex } from 'common/Types';\n\n\ninterface IRestoreColorSet {\n foreground: IColor;\n background: IColor;\n cursor: IColor;\n ansi: IColor[];\n}\n\n\nconst DEFAULT_FOREGROUND = css.toColor('#ffffff');\nconst DEFAULT_BACKGROUND = css.toColor('#000000');\nconst DEFAULT_CURSOR = css.toColor('#ffffff');\nconst DEFAULT_CURSOR_ACCENT = css.toColor('#000000');\nconst DEFAULT_SELECTION = {\n css: 'rgba(255, 255, 255, 0.3)',\n rgba: 0xFFFFFF4D\n};\n\n// An IIFE to generate DEFAULT_ANSI_COLORS.\nexport const DEFAULT_ANSI_COLORS = Object.freeze((() => {\n const colors = [\n // dark:\n css.toColor('#2e3436'),\n css.toColor('#cc0000'),\n css.toColor('#4e9a06'),\n css.toColor('#c4a000'),\n css.toColor('#3465a4'),\n css.toColor('#75507b'),\n css.toColor('#06989a'),\n css.toColor('#d3d7cf'),\n // bright:\n css.toColor('#555753'),\n css.toColor('#ef2929'),\n css.toColor('#8ae234'),\n css.toColor('#fce94f'),\n css.toColor('#729fcf'),\n css.toColor('#ad7fa8'),\n css.toColor('#34e2e2'),\n css.toColor('#eeeeec')\n ];\n\n // Fill in the remaining 240 ANSI colors.\n // Generate colors (16-231)\n const v = [0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff];\n for (let i = 0; i < 216; i++) {\n const r = v[(i / 36) % 6 | 0];\n const g = v[(i / 6) % 6 | 0];\n const b = v[i % 6];\n colors.push({\n css: channels.toCss(r, g, b),\n rgba: channels.toRgba(r, g, b)\n });\n }\n\n // Generate greys (232-255)\n for (let i = 0; i < 24; i++) {\n const c = 8 + i * 10;\n colors.push({\n css: channels.toCss(c, c, c),\n rgba: channels.toRgba(c, c, c)\n });\n }\n\n return colors;\n})());\n\n/**\n * Manages the source of truth for a terminal's colors.\n */\nexport class ColorManager implements IColorManager {\n public colors: IColorSet;\n private _ctx: CanvasRenderingContext2D;\n private _litmusColor: CanvasGradient;\n private _contrastCache: IColorContrastCache;\n private _restoreColors!: IRestoreColorSet;\n\n constructor(document: Document, public allowTransparency: boolean) {\n const canvas = document.createElement('canvas');\n canvas.width = 1;\n canvas.height = 1;\n const ctx = canvas.getContext('2d');\n if (!ctx) {\n throw new Error('Could not get rendering context');\n }\n this._ctx = ctx;\n this._ctx.globalCompositeOperation = 'copy';\n this._litmusColor = this._ctx.createLinearGradient(0, 0, 1, 1);\n this._contrastCache = new ColorContrastCache();\n this.colors = {\n foreground: DEFAULT_FOREGROUND,\n background: DEFAULT_BACKGROUND,\n cursor: DEFAULT_CURSOR,\n cursorAccent: DEFAULT_CURSOR_ACCENT,\n selectionTransparent: DEFAULT_SELECTION,\n selectionOpaque: color.blend(DEFAULT_BACKGROUND, DEFAULT_SELECTION),\n ansi: DEFAULT_ANSI_COLORS.slice(),\n contrastCache: this._contrastCache\n };\n this._updateRestoreColors();\n }\n\n public onOptionsChange(key: string): void {\n if (key === 'minimumContrastRatio') {\n this._contrastCache.clear();\n }\n }\n\n /**\n * Sets the terminal's theme.\n * @param theme The theme to use. If a partial theme is provided then default\n * colors will be used where colors are not defined.\n */\n public setTheme(theme: ITheme = {}): void {\n this.colors.foreground = this._parseColor(theme.foreground, DEFAULT_FOREGROUND);\n this.colors.background = this._parseColor(theme.background, DEFAULT_BACKGROUND);\n this.colors.cursor = this._parseColor(theme.cursor, DEFAULT_CURSOR, true);\n this.colors.cursorAccent = this._parseColor(theme.cursorAccent, DEFAULT_CURSOR_ACCENT, true);\n this.colors.selectionTransparent = this._parseColor(theme.selection, DEFAULT_SELECTION, true);\n this.colors.selectionOpaque = color.blend(this.colors.background, this.colors.selectionTransparent);\n /**\n * If selection color is opaque, blend it with background with 0.3 opacity\n * Issue #2737\n */\n if (color.isOpaque(this.colors.selectionTransparent)) {\n const opacity = 0.3;\n this.colors.selectionTransparent = color.opacity(this.colors.selectionTransparent, opacity);\n }\n this.colors.ansi[0] = this._parseColor(theme.black, DEFAULT_ANSI_COLORS[0]);\n this.colors.ansi[1] = this._parseColor(theme.red, DEFAULT_ANSI_COLORS[1]);\n this.colors.ansi[2] = this._parseColor(theme.green, DEFAULT_ANSI_COLORS[2]);\n this.colors.ansi[3] = this._parseColor(theme.yellow, DEFAULT_ANSI_COLORS[3]);\n this.colors.ansi[4] = this._parseColor(theme.blue, DEFAULT_ANSI_COLORS[4]);\n this.colors.ansi[5] = this._parseColor(theme.magenta, DEFAULT_ANSI_COLORS[5]);\n this.colors.ansi[6] = this._parseColor(theme.cyan, DEFAULT_ANSI_COLORS[6]);\n this.colors.ansi[7] = this._parseColor(theme.white, DEFAULT_ANSI_COLORS[7]);\n this.colors.ansi[8] = this._parseColor(theme.brightBlack, DEFAULT_ANSI_COLORS[8]);\n this.colors.ansi[9] = this._parseColor(theme.brightRed, DEFAULT_ANSI_COLORS[9]);\n this.colors.ansi[10] = this._parseColor(theme.brightGreen, DEFAULT_ANSI_COLORS[10]);\n this.colors.ansi[11] = this._parseColor(theme.brightYellow, DEFAULT_ANSI_COLORS[11]);\n this.colors.ansi[12] = this._parseColor(theme.brightBlue, DEFAULT_ANSI_COLORS[12]);\n this.colors.ansi[13] = this._parseColor(theme.brightMagenta, DEFAULT_ANSI_COLORS[13]);\n this.colors.ansi[14] = this._parseColor(theme.brightCyan, DEFAULT_ANSI_COLORS[14]);\n this.colors.ansi[15] = this._parseColor(theme.brightWhite, DEFAULT_ANSI_COLORS[15]);\n // Clear our the cache\n this._contrastCache.clear();\n this._updateRestoreColors();\n }\n\n public restoreColor(slot?: ColorIndex): void {\n // unset slot restores all ansi colors\n if (slot === undefined) {\n for (let i = 0; i < this._restoreColors.ansi.length; ++i) {\n this.colors.ansi[i] = this._restoreColors.ansi[i];\n }\n return;\n }\n switch (slot) {\n case ColorIndex.FOREGROUND:\n this.colors.foreground = this._restoreColors.foreground;\n break;\n case ColorIndex.BACKGROUND:\n this.colors.background = this._restoreColors.background;\n break;\n case ColorIndex.CURSOR:\n this.colors.cursor = this._restoreColors.cursor;\n break;\n default:\n this.colors.ansi[slot] = this._restoreColors.ansi[slot];\n }\n }\n\n private _updateRestoreColors(): void {\n this._restoreColors = {\n foreground: this.colors.foreground,\n background: this.colors.background,\n cursor: this.colors.cursor,\n ansi: [...this.colors.ansi]\n };\n }\n\n private _parseColor(\n css: string | undefined,\n fallback: IColor,\n allowTransparency: boolean = this.allowTransparency\n ): IColor {\n if (css === undefined) {\n return fallback;\n }\n\n // If parsing the value results in failure, then it must be ignored, and the attribute must\n // retain its previous value.\n // -- https://html.spec.whatwg.org/multipage/canvas.html#fill-and-stroke-styles\n this._ctx.fillStyle = this._litmusColor;\n this._ctx.fillStyle = css;\n if (typeof this._ctx.fillStyle !== 'string') {\n console.warn(`Color: ${css} is invalid using fallback ${fallback.css}`);\n return fallback;\n }\n\n this._ctx.fillRect(0, 0, 1, 1);\n const data = this._ctx.getImageData(0, 0, 1, 1).data;\n\n // Check if the printed color was transparent\n if (data[3] !== 0xFF) {\n if (!allowTransparency) {\n // Ideally we'd just ignore the alpha channel, but...\n //\n // Browsers may not give back exactly the same RGB values we put in, because most/all\n // convert the color to a pre-multiplied representation. getImageData converts that back to\n // a un-premultipled representation, but the precision loss may make the RGB channels unuable\n // on their own.\n //\n // E.g. In Chrome #12345610 turns into #10305010, and in the extreme case, 0xFFFFFF00 turns\n // into 0x00000000.\n //\n // \"Note: Due to the lossy nature of converting to and from premultiplied alpha color values,\n // pixels that have just been set using putImageData() might be returned to an equivalent\n // getImageData() as different values.\"\n // -- https://html.spec.whatwg.org/multipage/canvas.html#pixel-manipulation\n //\n // So let's just use the fallback color in this case instead.\n console.warn(\n `Color: ${css} is using transparency, but allowTransparency is false. ` +\n `Using fallback ${fallback.css}.`\n );\n return fallback;\n }\n\n // https://html.spec.whatwg.org/multipage/canvas.html#serialisation-of-a-color\n // the color value has alpha less than 1.0, and the string is the color value in the CSS rgba()\n const [r, g, b, a] = this._ctx.fillStyle.substring(5, this._ctx.fillStyle.length - 1).split(',').map(component => Number(component));\n const alpha = Math.round(a * 255);\n const rgba: number = channels.toRgba(r, g, b, alpha);\n return {\n rgba,\n css\n };\n }\n\n return {\n // https://html.spec.whatwg.org/multipage/canvas.html#serialisation-of-a-color\n // if it has alpha equal to 1.0, then the string is a lowercase six-digit hex value, prefixed with a \"#\" character\n css: this._ctx.fillStyle,\n rgba: channels.toRgba(data[0], data[1], data[2], data[3])\n };\n }\n}\n","/**\n * Copyright (c) 2020 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nexport function removeElementFromParent(...elements: (HTMLElement | undefined)[]): void {\n for (const e of elements) {\n e?.parentElement?.removeChild(e);\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IDisposable } from 'common/Types';\n\n/**\n * Adds a disposable listener to a node in the DOM, returning the disposable.\n * @param type The event type.\n * @param handler The handler for the listener.\n */\nexport function addDisposableDomListener(\n node: Element | Window | Document,\n type: string,\n handler: (e: any) => void,\n options?: boolean | AddEventListenerOptions\n): IDisposable {\n node.addEventListener(type, handler, options);\n let disposed = false;\n return {\n dispose: () => {\n if (disposed) {\n return;\n }\n disposed = true;\n node.removeEventListener(type, handler, options);\n }\n };\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ILinkifierEvent, ILinkMatcher, LinkMatcherHandler, ILinkMatcherOptions, ILinkifier, IMouseZoneManager, IMouseZone, IRegisteredLinkMatcher } from 'browser/Types';\nimport { IBufferStringIteratorResult } from 'common/buffer/Types';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { ILogService, IBufferService, IOptionsService, IUnicodeService } from 'common/services/Services';\n\n/**\n * Limit of the unwrapping line expansion (overscan) at the top and bottom\n * of the actual viewport in ASCII characters.\n * A limit of 2000 should match most sane urls.\n */\nconst OVERSCAN_CHAR_LIMIT = 2000;\n\n/**\n * The Linkifier applies links to rows shortly after they have been refreshed.\n */\nexport class Linkifier implements ILinkifier {\n /**\n * The time to wait after a row is changed before it is linkified. This prevents\n * the costly operation of searching every row multiple times, potentially a\n * huge amount of times.\n */\n protected static _timeBeforeLatency = 200;\n\n protected _linkMatchers: IRegisteredLinkMatcher[] = [];\n\n private _mouseZoneManager: IMouseZoneManager | undefined;\n private _element: HTMLElement | undefined;\n\n private _rowsTimeoutId: number | undefined;\n private _nextLinkMatcherId = 0;\n private _rowsToLinkify: { start: number | undefined, end: number | undefined };\n\n private _onShowLinkUnderline = new EventEmitter<ILinkifierEvent>();\n public get onShowLinkUnderline(): IEvent<ILinkifierEvent> { return this._onShowLinkUnderline.event; }\n private _onHideLinkUnderline = new EventEmitter<ILinkifierEvent>();\n public get onHideLinkUnderline(): IEvent<ILinkifierEvent> { return this._onHideLinkUnderline.event; }\n private _onLinkTooltip = new EventEmitter<ILinkifierEvent>();\n public get onLinkTooltip(): IEvent<ILinkifierEvent> { return this._onLinkTooltip.event; }\n\n constructor(\n @IBufferService protected readonly _bufferService: IBufferService,\n @ILogService private readonly _logService: ILogService,\n @IUnicodeService private readonly _unicodeService: IUnicodeService\n ) {\n this._rowsToLinkify = {\n start: undefined,\n end: undefined\n };\n }\n\n /**\n * Attaches the linkifier to the DOM, enabling linkification.\n * @param mouseZoneManager The mouse zone manager to register link zones with.\n */\n public attachToDom(element: HTMLElement, mouseZoneManager: IMouseZoneManager): void {\n this._element = element;\n this._mouseZoneManager = mouseZoneManager;\n }\n\n /**\n * Queue linkification on a set of rows.\n * @param start The row to linkify from (inclusive).\n * @param end The row to linkify to (inclusive).\n */\n public linkifyRows(start: number, end: number): void {\n // Don't attempt linkify if not yet attached to DOM\n if (!this._mouseZoneManager) {\n return;\n }\n\n // Increase range to linkify\n if (this._rowsToLinkify.start === undefined || this._rowsToLinkify.end === undefined) {\n this._rowsToLinkify.start = start;\n this._rowsToLinkify.end = end;\n } else {\n this._rowsToLinkify.start = Math.min(this._rowsToLinkify.start, start);\n this._rowsToLinkify.end = Math.max(this._rowsToLinkify.end, end);\n }\n\n // Clear out any existing links on this row range\n this._mouseZoneManager.clearAll(start, end);\n\n // Restart timer\n if (this._rowsTimeoutId) {\n clearTimeout(this._rowsTimeoutId);\n }\n\n // Cannot use window.setTimeout since tests need to run in node\n this._rowsTimeoutId = setTimeout(() => this._linkifyRows(), Linkifier._timeBeforeLatency) as any as number;\n }\n\n /**\n * Linkifies the rows requested.\n */\n private _linkifyRows(): void {\n this._rowsTimeoutId = undefined;\n const buffer = this._bufferService.buffer;\n\n if (this._rowsToLinkify.start === undefined || this._rowsToLinkify.end === undefined) {\n this._logService.debug('_rowToLinkify was unset before _linkifyRows was called');\n return;\n }\n\n // Ensure the start row exists\n const absoluteRowIndexStart = buffer.ydisp + this._rowsToLinkify.start;\n if (absoluteRowIndexStart >= buffer.lines.length) {\n return;\n }\n\n // Invalidate bad end row values (if a resize happened)\n const absoluteRowIndexEnd = buffer.ydisp + Math.min(this._rowsToLinkify.end, this._bufferService.rows) + 1;\n\n // Iterate over the range of unwrapped content strings within start..end\n // (excluding).\n // _doLinkifyRow gets full unwrapped lines with the start row as buffer offset\n // for every matcher.\n // The unwrapping is needed to also match content that got wrapped across\n // several buffer lines. To avoid a worst case scenario where the whole buffer\n // contains just a single unwrapped string we limit this line expansion beyond\n // the viewport to +OVERSCAN_CHAR_LIMIT chars (overscan) at top and bottom.\n // This comes with the tradeoff that matches longer than OVERSCAN_CHAR_LIMIT\n // chars will not match anymore at the viewport borders.\n const overscanLineLimit = Math.ceil(OVERSCAN_CHAR_LIMIT / this._bufferService.cols);\n const iterator = this._bufferService.buffer.iterator(\n false, absoluteRowIndexStart, absoluteRowIndexEnd, overscanLineLimit, overscanLineLimit);\n while (iterator.hasNext()) {\n const lineData: IBufferStringIteratorResult = iterator.next();\n for (let i = 0; i < this._linkMatchers.length; i++) {\n this._doLinkifyRow(lineData.range.first, lineData.content, this._linkMatchers[i]);\n }\n }\n\n this._rowsToLinkify.start = undefined;\n this._rowsToLinkify.end = undefined;\n }\n\n /**\n * Registers a link matcher, allowing custom link patterns to be matched and\n * handled.\n * @param regex The regular expression to search for. Specifically, this\n * searches the textContent of the rows. You will want to use \\s to match a\n * space ' ' character for example.\n * @param handler The callback when the link is called.\n * @param options Options for the link matcher.\n * @return The ID of the new matcher, this can be used to deregister.\n */\n public registerLinkMatcher(regex: RegExp, handler: LinkMatcherHandler, options: ILinkMatcherOptions = {}): number {\n if (!handler) {\n throw new Error('handler must be defined');\n }\n const matcher: IRegisteredLinkMatcher = {\n id: this._nextLinkMatcherId++,\n regex,\n handler,\n matchIndex: options.matchIndex,\n validationCallback: options.validationCallback,\n hoverTooltipCallback: options.tooltipCallback,\n hoverLeaveCallback: options.leaveCallback,\n willLinkActivate: options.willLinkActivate,\n priority: options.priority || 0\n };\n this._addLinkMatcherToList(matcher);\n return matcher.id;\n }\n\n /**\n * Inserts a link matcher to the list in the correct position based on the\n * priority of each link matcher. New link matchers of equal priority are\n * considered after older link matchers.\n * @param matcher The link matcher to be added.\n */\n private _addLinkMatcherToList(matcher: IRegisteredLinkMatcher): void {\n if (this._linkMatchers.length === 0) {\n this._linkMatchers.push(matcher);\n return;\n }\n\n for (let i = this._linkMatchers.length - 1; i >= 0; i--) {\n if (matcher.priority <= this._linkMatchers[i].priority) {\n this._linkMatchers.splice(i + 1, 0, matcher);\n return;\n }\n }\n\n this._linkMatchers.splice(0, 0, matcher);\n }\n\n /**\n * Deregisters a link matcher if it has been registered.\n * @param matcherId The link matcher's ID (returned after register)\n * @return Whether a link matcher was found and deregistered.\n */\n public deregisterLinkMatcher(matcherId: number): boolean {\n for (let i = 0; i < this._linkMatchers.length; i++) {\n if (this._linkMatchers[i].id === matcherId) {\n this._linkMatchers.splice(i, 1);\n return true;\n }\n }\n return false;\n }\n\n /**\n * Linkifies a row given a specific handler.\n * @param rowIndex The row index to linkify (absolute index).\n * @param text string content of the unwrapped row.\n * @param matcher The link matcher for this line.\n */\n private _doLinkifyRow(rowIndex: number, text: string, matcher: ILinkMatcher): void {\n // clone regex to do a global search on text\n const rex = new RegExp(matcher.regex.source, (matcher.regex.flags || '') + 'g');\n let match;\n let stringIndex = -1;\n while ((match = rex.exec(text)) !== null) {\n const uri = match[typeof matcher.matchIndex !== 'number' ? 0 : matcher.matchIndex];\n if (!uri) {\n // something matched but does not comply with the given matchIndex\n // since this is most likely a bug the regex itself we simply do nothing here\n this._logService.debug('match found without corresponding matchIndex', match, matcher);\n break;\n }\n\n // Get index, match.index is for the outer match which includes negated chars\n // therefore we cannot use match.index directly, instead we search the position\n // of the match group in text again\n // also correct regex and string search offsets for the next loop run\n stringIndex = text.indexOf(uri, stringIndex + 1);\n rex.lastIndex = stringIndex + uri.length;\n if (stringIndex < 0) {\n // invalid stringIndex (should not have happened)\n break;\n }\n\n // get the buffer index as [absolute row, col] for the match\n const bufferIndex = this._bufferService.buffer.stringIndexToBufferIndex(rowIndex, stringIndex);\n if (bufferIndex[0] < 0) {\n // invalid bufferIndex (should not have happened)\n break;\n }\n\n const line = this._bufferService.buffer.lines.get(bufferIndex[0]);\n if (!line) {\n break;\n }\n\n const attr = line.getFg(bufferIndex[1]);\n const fg = attr ? (attr >> 9) & 0x1ff : undefined;\n\n if (matcher.validationCallback) {\n matcher.validationCallback(uri, isValid => {\n // Discard link if the line has already changed\n if (this._rowsTimeoutId) {\n return;\n }\n if (isValid) {\n this._addLink(bufferIndex[1], bufferIndex[0] - this._bufferService.buffer.ydisp, uri, matcher, fg);\n }\n });\n } else {\n this._addLink(bufferIndex[1], bufferIndex[0] - this._bufferService.buffer.ydisp, uri, matcher, fg);\n }\n }\n }\n\n /**\n * Registers a link to the mouse zone manager.\n * @param x The column the link starts.\n * @param y The row the link is on.\n * @param uri The URI of the link.\n * @param matcher The link matcher for the link.\n * @param fg The link color for hover event.\n */\n private _addLink(x: number, y: number, uri: string, matcher: ILinkMatcher, fg: number | undefined): void {\n if (!this._mouseZoneManager || !this._element) {\n return;\n }\n // FIXME: get cell length from buffer to avoid mismatch after Unicode version change\n const width = this._unicodeService.getStringCellWidth(uri);\n const x1 = x % this._bufferService.cols;\n const y1 = y + Math.floor(x / this._bufferService.cols);\n let x2 = (x1 + width) % this._bufferService.cols;\n let y2 = y1 + Math.floor((x1 + width) / this._bufferService.cols);\n if (x2 === 0) {\n x2 = this._bufferService.cols;\n y2--;\n }\n\n this._mouseZoneManager.add(new MouseZone(\n x1 + 1,\n y1 + 1,\n x2 + 1,\n y2 + 1,\n e => {\n if (matcher.handler) {\n return matcher.handler(e, uri);\n }\n const newWindow = window.open();\n if (newWindow) {\n newWindow.opener = null;\n newWindow.location.href = uri;\n } else {\n console.warn('Opening link blocked as opener could not be cleared');\n }\n },\n () => {\n this._onShowLinkUnderline.fire(this._createLinkHoverEvent(x1, y1, x2, y2, fg));\n this._element!.classList.add('xterm-cursor-pointer');\n },\n e => {\n this._onLinkTooltip.fire(this._createLinkHoverEvent(x1, y1, x2, y2, fg));\n if (matcher.hoverTooltipCallback) {\n // Note that IViewportRange use 1-based coordinates to align with escape sequences such\n // as CUP which use 1,1 as the default for row/col\n matcher.hoverTooltipCallback(e, uri, { start: { x: x1, y: y1 }, end: { x: x2, y: y2 } });\n }\n },\n () => {\n this._onHideLinkUnderline.fire(this._createLinkHoverEvent(x1, y1, x2, y2, fg));\n this._element!.classList.remove('xterm-cursor-pointer');\n if (matcher.hoverLeaveCallback) {\n matcher.hoverLeaveCallback();\n }\n },\n e => {\n if (matcher.willLinkActivate) {\n return matcher.willLinkActivate(e, uri);\n }\n return true;\n }\n ));\n }\n\n private _createLinkHoverEvent(x1: number, y1: number, x2: number, y2: number, fg: number | undefined): ILinkifierEvent {\n return { x1, y1, x2, y2, cols: this._bufferService.cols, fg };\n }\n}\n\nexport class MouseZone implements IMouseZone {\n constructor(\n public x1: number,\n public y1: number,\n public x2: number,\n public y2: number,\n public clickCallback: (e: MouseEvent) => any,\n public hoverCallback: (e: MouseEvent) => any,\n public tooltipCallback: (e: MouseEvent) => any,\n public leaveCallback: () => void,\n public willLinkActivate: (e: MouseEvent) => boolean\n ) {\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ILinkifier2, ILinkProvider, IBufferCellPosition, ILink, ILinkifierEvent, ILinkDecorations, ILinkWithState } from 'browser/Types';\nimport { IDisposable } from 'common/Types';\nimport { IMouseService, IRenderService } from './services/Services';\nimport { IBufferService } from 'common/services/Services';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { Disposable, getDisposeArrayDisposable, disposeArray } from 'common/Lifecycle';\nimport { addDisposableDomListener } from 'browser/Lifecycle';\n\nexport class Linkifier2 extends Disposable implements ILinkifier2 {\n private _element: HTMLElement | undefined;\n private _mouseService: IMouseService | undefined;\n private _renderService: IRenderService | undefined;\n private _linkProviders: ILinkProvider[] = [];\n public get currentLink(): ILinkWithState | undefined { return this._currentLink; }\n protected _currentLink: ILinkWithState | undefined;\n private _lastMouseEvent: MouseEvent | undefined;\n private _linkCacheDisposables: IDisposable[] = [];\n private _lastBufferCell: IBufferCellPosition | undefined;\n private _isMouseOut: boolean = true;\n private _activeProviderReplies: Map<Number, ILinkWithState[] | undefined> | undefined;\n private _activeLine: number = -1;\n\n private _onShowLinkUnderline = this.register(new EventEmitter<ILinkifierEvent>());\n public get onShowLinkUnderline(): IEvent<ILinkifierEvent> { return this._onShowLinkUnderline.event; }\n private _onHideLinkUnderline = this.register(new EventEmitter<ILinkifierEvent>());\n public get onHideLinkUnderline(): IEvent<ILinkifierEvent> { return this._onHideLinkUnderline.event; }\n\n constructor(\n @IBufferService private readonly _bufferService: IBufferService\n ) {\n super();\n this.register(getDisposeArrayDisposable(this._linkCacheDisposables));\n }\n\n public registerLinkProvider(linkProvider: ILinkProvider): IDisposable {\n this._linkProviders.push(linkProvider);\n return {\n dispose: () => {\n // Remove the link provider from the list\n const providerIndex = this._linkProviders.indexOf(linkProvider);\n\n if (providerIndex !== -1) {\n this._linkProviders.splice(providerIndex, 1);\n }\n }\n };\n }\n\n public attachToDom(element: HTMLElement, mouseService: IMouseService, renderService: IRenderService): void {\n this._element = element;\n this._mouseService = mouseService;\n this._renderService = renderService;\n\n this.register(addDisposableDomListener(this._element, 'mouseleave', () => {\n this._isMouseOut = true;\n this._clearCurrentLink();\n }));\n this.register(addDisposableDomListener(this._element, 'mousemove', this._onMouseMove.bind(this)));\n this.register(addDisposableDomListener(this._element, 'click', this._onClick.bind(this)));\n }\n\n private _onMouseMove(event: MouseEvent): void {\n this._lastMouseEvent = event;\n\n if (!this._element || !this._mouseService) {\n return;\n }\n\n const position = this._positionFromMouseEvent(event, this._element, this._mouseService);\n if (!position) {\n return;\n }\n this._isMouseOut = false;\n\n // Ignore the event if it's an embedder created hover widget\n const composedPath = event.composedPath() as HTMLElement[];\n for (let i = 0; i < composedPath.length; i++) {\n const target = composedPath[i];\n // Hit Terminal.element, break and continue\n if (target.classList.contains('xterm')) {\n break;\n }\n // It's a hover, don't respect hover event\n if (target.classList.contains('xterm-hover')) {\n return;\n }\n }\n\n if (!this._lastBufferCell || (position.x !== this._lastBufferCell.x || position.y !== this._lastBufferCell.y)) {\n this._onHover(position);\n this._lastBufferCell = position;\n }\n }\n\n private _onHover(position: IBufferCellPosition): void {\n // TODO: This currently does not cache link provider results across wrapped lines, activeLine should be something like `activeRange: {startY, endY}`\n // Check if we need to clear the link\n if (this._activeLine !== position.y) {\n this._clearCurrentLink();\n this._askForLink(position, false);\n return;\n }\n\n // Check the if the link is in the mouse position\n const isCurrentLinkInPosition = this._currentLink && this._linkAtPosition(this._currentLink.link, position);\n if (!isCurrentLinkInPosition) {\n this._clearCurrentLink();\n this._askForLink(position, true);\n }\n }\n\n private _askForLink(position: IBufferCellPosition, useLineCache: boolean): void {\n if (!this._activeProviderReplies || !useLineCache) {\n this._activeProviderReplies?.forEach(reply => {\n reply?.forEach(linkWithState => {\n if (linkWithState.link.dispose) {\n linkWithState.link.dispose();\n }\n });\n });\n this._activeProviderReplies = new Map();\n this._activeLine = position.y;\n }\n let linkProvided = false;\n\n // There is no link cached, so ask for one\n this._linkProviders.forEach((linkProvider, i) => {\n if (useLineCache) {\n const existingReply = this._activeProviderReplies?.get(i);\n // If there isn't a reply, the provider hasn't responded yet.\n\n // TODO: If there isn't a reply yet it means that the provider is still resolving. Ensuring\n // provideLinks isn't triggered again saves ILink.hover firing twice though. This probably\n // needs promises to get fixed\n if (existingReply) {\n linkProvided = this._checkLinkProviderResult(i, position, linkProvided);\n }\n } else {\n linkProvider.provideLinks(position.y, (links: ILink[] | undefined) => {\n if (this._isMouseOut) {\n return;\n }\n const linksWithState: ILinkWithState[] | undefined = links?.map(link => ({ link }));\n this._activeProviderReplies?.set(i, linksWithState);\n linkProvided = this._checkLinkProviderResult(i, position, linkProvided);\n\n // If all providers have responded, remove lower priority links that intersect ranges of\n // higher priority links\n if (this._activeProviderReplies?.size === this._linkProviders.length) {\n this._removeIntersectingLinks(position.y, this._activeProviderReplies);\n }\n });\n }\n });\n }\n\n private _removeIntersectingLinks(y: number, replies: Map<Number, ILinkWithState[] | undefined>): void {\n const occupiedCells = new Set<number>();\n for (let i = 0; i < replies.size; i++) {\n const providerReply = replies.get(i);\n if (!providerReply) {\n continue;\n }\n for (let i = 0; i < providerReply.length; i++) {\n const linkWithState = providerReply[i];\n const startX = linkWithState.link.range.start.y < y ? 0 : linkWithState.link.range.start.x;\n const endX = linkWithState.link.range.end.y > y ? this._bufferService.cols : linkWithState.link.range.end.x;\n for (let x = startX; x <= endX; x++) {\n if (occupiedCells.has(x)) {\n providerReply.splice(i--, 1);\n break;\n }\n occupiedCells.add(x);\n }\n }\n }\n }\n\n private _checkLinkProviderResult(index: number, position: IBufferCellPosition, linkProvided: boolean): boolean {\n if (!this._activeProviderReplies) {\n return linkProvided;\n }\n\n const links = this._activeProviderReplies.get(index);\n\n // Check if every provider before this one has come back undefined\n let hasLinkBefore = false;\n for (let j = 0; j < index; j++) {\n if (!this._activeProviderReplies.has(j) || this._activeProviderReplies.get(j)) {\n hasLinkBefore = true;\n }\n }\n\n // If all providers with higher priority came back undefined, then this provider's link for\n // the position should be used\n if (!hasLinkBefore && links) {\n const linkAtPosition = links.find(link => this._linkAtPosition(link.link, position));\n if (linkAtPosition) {\n linkProvided = true;\n this._handleNewLink(linkAtPosition);\n }\n }\n\n // Check if all the providers have responded\n if (this._activeProviderReplies.size === this._linkProviders.length && !linkProvided) {\n // Respect the order of the link providers\n for (let j = 0; j < this._activeProviderReplies.size; j++) {\n const currentLink = this._activeProviderReplies.get(j)?.find(link => this._linkAtPosition(link.link, position));\n if (currentLink) {\n linkProvided = true;\n this._handleNewLink(currentLink);\n break;\n }\n }\n }\n\n return linkProvided;\n }\n\n private _onClick(event: MouseEvent): void {\n if (!this._element || !this._mouseService || !this._currentLink) {\n return;\n }\n\n const position = this._positionFromMouseEvent(event, this._element, this._mouseService);\n\n if (!position) {\n return;\n }\n\n if (this._linkAtPosition(this._currentLink.link, position)) {\n this._currentLink.link.activate(event, this._currentLink.link.text);\n }\n }\n\n private _clearCurrentLink(startRow?: number, endRow?: number): void {\n if (!this._element || !this._currentLink || !this._lastMouseEvent) {\n return;\n }\n\n // If we have a start and end row, check that the link is within it\n if (!startRow || !endRow || (this._currentLink.link.range.start.y >= startRow && this._currentLink.link.range.end.y <= endRow)) {\n this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent);\n this._currentLink = undefined;\n disposeArray(this._linkCacheDisposables);\n }\n }\n\n private _handleNewLink(linkWithState: ILinkWithState): void {\n if (!this._element || !this._lastMouseEvent || !this._mouseService) {\n return;\n }\n\n const position = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);\n\n if (!position) {\n return;\n }\n\n // Trigger hover if the we have a link at the position\n if (this._linkAtPosition(linkWithState.link, position)) {\n this._currentLink = linkWithState;\n this._currentLink.state = {\n decorations: {\n underline: linkWithState.link.decorations === undefined ? true : linkWithState.link.decorations.underline,\n pointerCursor: linkWithState.link.decorations === undefined ? true : linkWithState.link.decorations.pointerCursor\n },\n isHovered: true\n };\n this._linkHover(this._element, linkWithState.link, this._lastMouseEvent);\n\n // Add listener for tracking decorations changes\n linkWithState.link.decorations = {} as ILinkDecorations;\n Object.defineProperties(linkWithState.link.decorations, {\n pointerCursor: {\n get: () => this._currentLink?.state?.decorations.pointerCursor,\n set: v => {\n if (this._currentLink?.state && this._currentLink.state.decorations.pointerCursor !== v) {\n this._currentLink.state.decorations.pointerCursor = v;\n if (this._currentLink.state.isHovered) {\n this._element?.classList.toggle('xterm-cursor-pointer', v);\n }\n }\n }\n },\n underline: {\n get: () => this._currentLink?.state?.decorations.underline,\n set: v => {\n if (this._currentLink?.state && this._currentLink?.state?.decorations.underline !== v) {\n this._currentLink.state.decorations.underline = v;\n if (this._currentLink.state.isHovered) {\n this._fireUnderlineEvent(linkWithState.link, v);\n }\n }\n }\n }\n });\n\n // Add listener for rerendering\n if (this._renderService) {\n this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(e => {\n // When start is 0 a scroll most likely occurred, make sure links above the fold also get\n // cleared.\n const start = e.start === 0 ? 0 : e.start + 1 + this._bufferService.buffer.ydisp;\n this._clearCurrentLink(start, e.end + 1 + this._bufferService.buffer.ydisp);\n }));\n }\n }\n }\n\n protected _linkHover(element: HTMLElement, link: ILink, event: MouseEvent): void {\n if (this._currentLink?.state) {\n this._currentLink.state.isHovered = true;\n if (this._currentLink.state.decorations.underline) {\n this._fireUnderlineEvent(link, true);\n }\n if (this._currentLink.state.decorations.pointerCursor) {\n element.classList.add('xterm-cursor-pointer');\n }\n }\n\n if (link.hover) {\n link.hover(event, link.text);\n }\n }\n\n private _fireUnderlineEvent(link: ILink, showEvent: boolean): void {\n const range = link.range;\n const scrollOffset = this._bufferService.buffer.ydisp;\n const event = this._createLinkUnderlineEvent(range.start.x - 1, range.start.y - scrollOffset - 1, range.end.x, range.end.y - scrollOffset - 1, undefined);\n const emitter = showEvent ? this._onShowLinkUnderline : this._onHideLinkUnderline;\n emitter.fire(event);\n }\n\n protected _linkLeave(element: HTMLElement, link: ILink, event: MouseEvent): void {\n if (this._currentLink?.state) {\n this._currentLink.state.isHovered = false;\n if (this._currentLink.state.decorations.underline) {\n this._fireUnderlineEvent(link, false);\n }\n if (this._currentLink.state.decorations.pointerCursor) {\n element.classList.remove('xterm-cursor-pointer');\n }\n }\n\n if (link.leave) {\n link.leave(event, link.text);\n }\n }\n\n /**\n * Check if the buffer position is within the link\n * @param link\n * @param position\n */\n private _linkAtPosition(link: ILink, position: IBufferCellPosition): boolean {\n const sameLine = link.range.start.y === link.range.end.y;\n const wrappedFromLeft = link.range.start.y < position.y;\n const wrappedToRight = link.range.end.y > position.y;\n\n // If the start and end have the same y, then the position must be between start and end x\n // If not, then handle each case seperately, depending on which way it wraps\n return ((sameLine && link.range.start.x <= position.x && link.range.end.x >= position.x) ||\n (wrappedFromLeft && link.range.end.x >= position.x) ||\n (wrappedToRight && link.range.start.x <= position.x) ||\n (wrappedFromLeft && wrappedToRight)) &&\n link.range.start.y <= position.y &&\n link.range.end.y >= position.y;\n }\n\n /**\n * Get the buffer position from a mouse event\n * @param event\n */\n private _positionFromMouseEvent(event: MouseEvent, element: HTMLElement, mouseService: IMouseService): IBufferCellPosition | undefined {\n const coords = mouseService.getCoords(event, element, this._bufferService.cols, this._bufferService.rows);\n if (!coords) {\n return;\n }\n\n return { x: coords[0], y: coords[1] + this._bufferService.buffer.ydisp };\n }\n\n private _createLinkUnderlineEvent(x1: number, y1: number, x2: number, y2: number, fg: number | undefined): ILinkifierEvent {\n return { x1, y1, x2, y2, cols: this._bufferService.cols, fg };\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\n// eslint-disable-next-line prefer-const\nexport let promptLabel = 'Terminal input';\n\n// eslint-disable-next-line prefer-const\nexport let tooMuchOutput = 'Too much output to announce, navigate to rows manually to read';\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { Disposable } from 'common/Lifecycle';\nimport { addDisposableDomListener } from 'browser/Lifecycle';\nimport { IMouseService, ISelectionService } from 'browser/services/Services';\nimport { IMouseZoneManager, IMouseZone } from 'browser/Types';\nimport { IBufferService, IOptionsService } from 'common/services/Services';\n\n/**\n * The MouseZoneManager allows components to register zones within the terminal\n * that trigger hover and click callbacks.\n *\n * This class was intentionally made not so robust initially as the only case it\n * needed to support was single-line links which never overlap. Improvements can\n * be made in the future.\n */\nexport class MouseZoneManager extends Disposable implements IMouseZoneManager {\n private _zones: IMouseZone[] = [];\n\n private _areZonesActive: boolean = false;\n private _mouseMoveListener: (e: MouseEvent) => any;\n private _mouseLeaveListener: (e: MouseEvent) => any;\n private _clickListener: (e: MouseEvent) => any;\n\n private _tooltipTimeout: number | undefined;\n private _currentZone: IMouseZone | undefined;\n private _lastHoverCoords: [number | undefined, number | undefined] = [undefined, undefined];\n private _initialSelectionLength: number = 0;\n\n constructor(\n private readonly _element: HTMLElement,\n private readonly _screenElement: HTMLElement,\n @IBufferService private readonly _bufferService: IBufferService,\n @IMouseService private readonly _mouseService: IMouseService,\n @ISelectionService private readonly _selectionService: ISelectionService,\n @IOptionsService private readonly _optionsService: IOptionsService\n ) {\n super();\n\n this.register(addDisposableDomListener(this._element, 'mousedown', e => this._onMouseDown(e)));\n\n // These events are expensive, only listen to it when mouse zones are active\n this._mouseMoveListener = e => this._onMouseMove(e);\n this._mouseLeaveListener = e => this._onMouseLeave(e);\n this._clickListener = e => this._onClick(e);\n }\n\n public dispose(): void {\n super.dispose();\n this._deactivate();\n }\n\n public add(zone: IMouseZone): void {\n this._zones.push(zone);\n if (this._zones.length === 1) {\n this._activate();\n }\n }\n\n public clearAll(start?: number, end?: number): void {\n // Exit if there's nothing to clear\n if (this._zones.length === 0) {\n return;\n }\n\n // Clear all if start/end weren't set\n if (!start || !end) {\n start = 0;\n end = this._bufferService.rows - 1;\n }\n\n // Iterate through zones and clear them out if they're within the range\n for (let i = 0; i < this._zones.length; i++) {\n const zone = this._zones[i];\n if ((zone.y1 > start && zone.y1 <= end + 1) ||\n (zone.y2 > start && zone.y2 <= end + 1) ||\n (zone.y1 < start && zone.y2 > end + 1)) {\n if (this._currentZone && this._currentZone === zone) {\n this._currentZone.leaveCallback();\n this._currentZone = undefined;\n }\n this._zones.splice(i--, 1);\n }\n }\n\n // Deactivate the mouse zone manager if all the zones have been removed\n if (this._zones.length === 0) {\n this._deactivate();\n }\n }\n\n private _activate(): void {\n if (!this._areZonesActive) {\n this._areZonesActive = true;\n this._element.addEventListener('mousemove', this._mouseMoveListener);\n this._element.addEventListener('mouseleave', this._mouseLeaveListener);\n this._element.addEventListener('click', this._clickListener);\n }\n }\n\n private _deactivate(): void {\n if (this._areZonesActive) {\n this._areZonesActive = false;\n this._element.removeEventListener('mousemove', this._mouseMoveListener);\n this._element.removeEventListener('mouseleave', this._mouseLeaveListener);\n this._element.removeEventListener('click', this._clickListener);\n }\n }\n\n private _onMouseMove(e: MouseEvent): void {\n // TODO: Ideally this would only clear the hover state when the mouse moves\n // outside of the mouse zone\n if (this._lastHoverCoords[0] !== e.pageX || this._lastHoverCoords[1] !== e.pageY) {\n this._onHover(e);\n // Record the current coordinates\n this._lastHoverCoords = [e.pageX, e.pageY];\n }\n }\n\n private _onHover(e: MouseEvent): void {\n const zone = this._findZoneEventAt(e);\n\n // Do nothing if the zone is the same\n if (zone === this._currentZone) {\n return;\n }\n\n // Fire the hover end callback and cancel any existing timer if a new zone\n // is being hovered\n if (this._currentZone) {\n this._currentZone.leaveCallback();\n this._currentZone = undefined;\n if (this._tooltipTimeout) {\n clearTimeout(this._tooltipTimeout);\n }\n }\n\n // Exit if there is not zone\n if (!zone) {\n return;\n }\n this._currentZone = zone;\n\n // Trigger the hover callback\n if (zone.hoverCallback) {\n zone.hoverCallback(e);\n }\n\n // Restart the tooltip timeout\n this._tooltipTimeout = window.setTimeout(() => this._onTooltip(e), this._optionsService.rawOptions.linkTooltipHoverDuration);\n }\n\n private _onTooltip(e: MouseEvent): void {\n this._tooltipTimeout = undefined;\n const zone = this._findZoneEventAt(e);\n zone?.tooltipCallback(e);\n }\n\n private _onMouseDown(e: MouseEvent): void {\n // Store current terminal selection length, to check if we're performing\n // a selection operation\n this._initialSelectionLength = this._getSelectionLength();\n\n // Ignore the event if there are no zones active\n if (!this._areZonesActive) {\n return;\n }\n\n // Find the active zone, prevent event propagation if found to prevent other\n // components from handling the mouse event.\n const zone = this._findZoneEventAt(e);\n if (zone?.willLinkActivate(e)) {\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n }\n\n private _onMouseLeave(e: MouseEvent): void {\n // Fire the hover end callback and cancel any existing timer if the mouse\n // leaves the terminal element\n if (this._currentZone) {\n this._currentZone.leaveCallback();\n this._currentZone = undefined;\n if (this._tooltipTimeout) {\n clearTimeout(this._tooltipTimeout);\n }\n }\n }\n\n private _onClick(e: MouseEvent): void {\n // Find the active zone and click it if found and no selection was\n // being performed\n const zone = this._findZoneEventAt(e);\n const currentSelectionLength = this._getSelectionLength();\n\n if (zone && currentSelectionLength === this._initialSelectionLength) {\n zone.clickCallback(e);\n e.preventDefault();\n e.stopImmediatePropagation();\n }\n }\n\n private _getSelectionLength(): number {\n const selectionText = this._selectionService.selectionText;\n return selectionText ? selectionText.length : 0;\n }\n\n private _findZoneEventAt(e: MouseEvent): IMouseZone | undefined {\n const coords = this._mouseService.getCoords(e, this._screenElement, this._bufferService.cols, this._bufferService.rows);\n if (!coords) {\n return undefined;\n }\n const x = coords[0];\n const y = coords[1];\n for (let i = 0; i < this._zones.length; i++) {\n const zone = this._zones[i];\n if (zone.y1 === zone.y2) {\n // Single line link\n if (y === zone.y1 && x >= zone.x1 && x < zone.x2) {\n return zone;\n }\n } else {\n // Multi-line link\n if ((y === zone.y1 && x >= zone.x1) ||\n (y === zone.y2 && x < zone.x2) ||\n (y > zone.y1 && y < zone.y2)) {\n return zone;\n }\n }\n }\n return undefined;\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderDebouncer } from 'browser/Types';\n\n/**\n * Debounces calls to render terminal rows using animation frames.\n */\nexport class RenderDebouncer implements IRenderDebouncer {\n private _rowStart: number | undefined;\n private _rowEnd: number | undefined;\n private _rowCount: number | undefined;\n private _animationFrame: number | undefined;\n\n constructor(\n private _renderCallback: (start: number, end: number) => void\n ) {\n }\n\n public dispose(): void {\n if (this._animationFrame) {\n window.cancelAnimationFrame(this._animationFrame);\n this._animationFrame = undefined;\n }\n }\n\n public refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void {\n this._rowCount = rowCount;\n // Get the min/max row start/end for the arg values\n rowStart = rowStart !== undefined ? rowStart : 0;\n rowEnd = rowEnd !== undefined ? rowEnd : this._rowCount - 1;\n // Set the properties to the updated values\n this._rowStart = this._rowStart !== undefined ? Math.min(this._rowStart, rowStart) : rowStart;\n this._rowEnd = this._rowEnd !== undefined ? Math.max(this._rowEnd, rowEnd) : rowEnd;\n\n if (this._animationFrame) {\n return;\n }\n\n this._animationFrame = window.requestAnimationFrame(() => this._innerRefresh());\n }\n\n private _innerRefresh(): void {\n // Make sure values are set\n if (this._rowStart === undefined || this._rowEnd === undefined || this._rowCount === undefined) {\n return;\n }\n\n // Clamp values\n const start = Math.max(this._rowStart, 0);\n const end = Math.min(this._rowEnd, this._rowCount - 1);\n\n // Reset debouncer (this happens before render callback as the render could trigger it again)\n this._rowStart = undefined;\n this._rowEnd = undefined;\n this._animationFrame = undefined;\n\n // Run render callback\n this._renderCallback(start, end);\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { Disposable } from 'common/Lifecycle';\n\nexport type ScreenDprListener = (newDevicePixelRatio?: number, oldDevicePixelRatio?: number) => void;\n\n/**\n * The screen device pixel ratio monitor allows listening for when the\n * window.devicePixelRatio value changes. This is done not with polling but with\n * the use of window.matchMedia to watch media queries. When the event fires,\n * the listener will be reattached using a different media query to ensure that\n * any further changes will register.\n *\n * The listener should fire on both window zoom changes and switching to a\n * monitor with a different DPI.\n */\nexport class ScreenDprMonitor extends Disposable {\n private _currentDevicePixelRatio: number = window.devicePixelRatio;\n private _outerListener: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | undefined;\n private _listener: ScreenDprListener | undefined;\n private _resolutionMediaMatchList: MediaQueryList | undefined;\n\n public setListener(listener: ScreenDprListener): void {\n if (this._listener) {\n this.clearListener();\n }\n this._listener = listener;\n this._outerListener = () => {\n if (!this._listener) {\n return;\n }\n this._listener(window.devicePixelRatio, this._currentDevicePixelRatio);\n this._updateDpr();\n };\n this._updateDpr();\n }\n\n public dispose(): void {\n super.dispose();\n this.clearListener();\n }\n\n private _updateDpr(): void {\n if (!this._outerListener) {\n return;\n }\n\n // Clear listeners for old DPR\n this._resolutionMediaMatchList?.removeListener(this._outerListener);\n\n // Add listeners for new DPR\n this._currentDevicePixelRatio = window.devicePixelRatio;\n this._resolutionMediaMatchList = window.matchMedia(`screen and (resolution: ${window.devicePixelRatio}dppx)`);\n this._resolutionMediaMatchList.addListener(this._outerListener);\n }\n\n public clearListener(): void {\n if (!this._resolutionMediaMatchList || !this._listener || !this._outerListener) {\n return;\n }\n this._resolutionMediaMatchList.removeListener(this._outerListener);\n this._resolutionMediaMatchList = undefined;\n this._listener = undefined;\n this._outerListener = undefined;\n }\n}\n","/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * @license MIT\n *\n * Originally forked from (with the author's permission):\n * Fabrice Bellard's javascript vt100 for jslinux:\n * http://bellard.org/jslinux/\n * Copyright (c) 2011 Fabrice Bellard\n * The original design remains. The terminal itself\n * has been extended to include xterm CSI codes, among\n * other features.\n *\n * Terminal Emulation References:\n * http://vt100.net/\n * http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt\n * http://invisible-island.net/xterm/ctlseqs/ctlseqs.html\n * http://invisible-island.net/vttest/\n * http://www.inwap.com/pdp10/ansicode.txt\n * http://linux.die.net/man/4/console_codes\n * http://linux.die.net/man/7/urxvt\n */\n\nimport { ICompositionHelper, ITerminal, IBrowser, CustomKeyEventHandler, ILinkifier, IMouseZoneManager, LinkMatcherHandler, ILinkMatcherOptions, IViewport, ILinkifier2, CharacterJoinerHandler } from 'browser/Types';\nimport { IRenderer } from 'browser/renderer/Types';\nimport { CompositionHelper } from 'browser/input/CompositionHelper';\nimport { Viewport } from 'browser/Viewport';\nimport { rightClickHandler, moveTextAreaUnderMouseCursor, handlePasteEvent, copyHandler, paste } from 'browser/Clipboard';\nimport { C0 } from 'common/data/EscapeSequences';\nimport { WindowsOptionsReportType } from '../common/InputHandler';\nimport { Renderer } from 'browser/renderer/Renderer';\nimport { Linkifier } from 'browser/Linkifier';\nimport { SelectionService } from 'browser/services/SelectionService';\nimport * as Browser from 'common/Platform';\nimport { addDisposableDomListener } from 'browser/Lifecycle';\nimport * as Strings from 'browser/LocalizableStrings';\nimport { SoundService } from 'browser/services/SoundService';\nimport { MouseZoneManager } from 'browser/MouseZoneManager';\nimport { AccessibilityManager } from './AccessibilityManager';\nimport { ITheme, IMarker, IDisposable, ISelectionPosition, ILinkProvider, IDecorationOptions, IDecoration } from 'xterm';\nimport { DomRenderer } from 'browser/renderer/dom/DomRenderer';\nimport { KeyboardResultType, CoreMouseEventType, CoreMouseButton, CoreMouseAction, ITerminalOptions, ScrollSource, IColorEvent, ColorIndex, ColorRequestType } from 'common/Types';\nimport { evaluateKeyboardEvent } from 'common/input/Keyboard';\nimport { EventEmitter, IEvent, forwardEvent } from 'common/EventEmitter';\nimport { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';\nimport { ColorManager } from 'browser/ColorManager';\nimport { RenderService } from 'browser/services/RenderService';\nimport { ICharSizeService, IRenderService, IMouseService, ISelectionService, ISoundService, ICoreBrowserService, ICharacterJoinerService, IDecorationService } from 'browser/services/Services';\nimport { CharSizeService } from 'browser/services/CharSizeService';\nimport { IBuffer } from 'common/buffer/Types';\nimport { MouseService } from 'browser/services/MouseService';\nimport { Linkifier2 } from 'browser/Linkifier2';\nimport { CoreBrowserService } from 'browser/services/CoreBrowserService';\nimport { CoreTerminal } from 'common/CoreTerminal';\nimport { color, rgba } from 'browser/Color';\nimport { CharacterJoinerService } from 'browser/services/CharacterJoinerService';\nimport { toRgbString } from 'common/input/XParseColor';\nimport { DecorationService } from 'browser/services/DecorationService';\n\n// Let it work inside Node.js for automated testing purposes.\nconst document: Document = (typeof window !== 'undefined') ? window.document : null as any;\n\nexport class Terminal extends CoreTerminal implements ITerminal {\n public textarea: HTMLTextAreaElement | undefined;\n public element: HTMLElement | undefined;\n public screenElement: HTMLElement | undefined;\n\n private _document: Document | undefined;\n private _viewportScrollArea: HTMLElement | undefined;\n private _viewportElement: HTMLElement | undefined;\n private _helperContainer: HTMLElement | undefined;\n private _compositionView: HTMLElement | undefined;\n\n // private _visualBellTimer: number;\n\n public browser: IBrowser = Browser as any;\n\n private _customKeyEventHandler: CustomKeyEventHandler | undefined;\n\n // browser services\n private _charSizeService: ICharSizeService | undefined;\n private _mouseService: IMouseService | undefined;\n private _renderService: IRenderService | undefined;\n private _characterJoinerService: ICharacterJoinerService | undefined;\n private _selectionService: ISelectionService | undefined;\n private _soundService: ISoundService | undefined;\n\n /**\n * Records whether the keydown event has already been handled and triggered a data event, if so\n * the keypress event should not trigger a data event but should still print to the textarea so\n * screen readers will announce it.\n */\n private _keyDownHandled: boolean = false;\n\n /**\n * Records whether the keypress event has already been handled and triggered a data event, if so\n * the input event should not trigger a data event but should still print to the textarea so\n * screen readers will announce it.\n */\n private _keyPressHandled: boolean = false;\n\n /**\n * Records whether there has been a keydown event for a dead key without a corresponding keydown\n * event for the composed/alternative character. If we cancel the keydown event for the dead key,\n * no events will be emitted for the final character.\n */\n private _unprocessedDeadKey: boolean = false;\n\n public linkifier: ILinkifier;\n public linkifier2: ILinkifier2;\n public viewport: IViewport | undefined;\n public decorationService: IDecorationService;\n private _compositionHelper: ICompositionHelper | undefined;\n private _mouseZoneManager: IMouseZoneManager | undefined;\n private _accessibilityManager: AccessibilityManager | undefined;\n private _colorManager: ColorManager | undefined;\n private _theme: ITheme | undefined;\n\n private _onCursorMove = new EventEmitter<void>();\n public get onCursorMove(): IEvent<void> { return this._onCursorMove.event; }\n private _onKey = new EventEmitter<{ key: string, domEvent: KeyboardEvent }>();\n public get onKey(): IEvent<{ key: string, domEvent: KeyboardEvent }> { return this._onKey.event; }\n private _onRender = new EventEmitter<{ start: number, end: number }>();\n public get onRender(): IEvent<{ start: number, end: number }> { return this._onRender.event; }\n private _onSelectionChange = new EventEmitter<void>();\n public get onSelectionChange(): IEvent<void> { return this._onSelectionChange.event; }\n private _onTitleChange = new EventEmitter<string>();\n public get onTitleChange(): IEvent<string> { return this._onTitleChange.event; }\n private _onBell = new EventEmitter<void>();\n public get onBell(): IEvent<void> { return this._onBell.event; }\n\n private _onFocus = new EventEmitter<void>();\n public get onFocus(): IEvent<void> { return this._onFocus.event; }\n private _onBlur = new EventEmitter<void>();\n public get onBlur(): IEvent<void> { return this._onBlur.event; }\n private _onA11yCharEmitter = new EventEmitter<string>();\n public get onA11yChar(): IEvent<string> { return this._onA11yCharEmitter.event; }\n private _onA11yTabEmitter = new EventEmitter<number>();\n public get onA11yTab(): IEvent<number> { return this._onA11yTabEmitter.event; }\n\n /**\n * Creates a new `Terminal` object.\n *\n * @param options An object containing a set of options, the available options are:\n * - `cursorBlink` (boolean): Whether the terminal cursor blinks\n * - `cols` (number): The number of columns of the terminal (horizontal size)\n * - `rows` (number): The number of rows of the terminal (vertical size)\n *\n * @public\n * @class Xterm Xterm\n * @alias module:xterm/src/xterm\n */\n constructor(\n options: Partial<ITerminalOptions> = {}\n ) {\n super(options);\n\n this._setup();\n\n this.linkifier = this._instantiationService.createInstance(Linkifier);\n this.linkifier2 = this.register(this._instantiationService.createInstance(Linkifier2));\n this.decorationService = this.register(this._instantiationService.createInstance(DecorationService));\n\n // Setup InputHandler listeners\n this.register(this._inputHandler.onRequestBell(() => this.bell()));\n this.register(this._inputHandler.onRequestRefreshRows((start, end) => this.refresh(start, end)));\n this.register(this._inputHandler.onRequestSendFocus(() => this._reportFocus()));\n this.register(this._inputHandler.onRequestReset(() => this.reset()));\n this.register(this._inputHandler.onRequestWindowsOptionsReport(type => this._reportWindowsOptions(type)));\n this.register(this._inputHandler.onColor((event) => this._handleColorEvent(event)));\n this.register(forwardEvent(this._inputHandler.onCursorMove, this._onCursorMove));\n this.register(forwardEvent(this._inputHandler.onTitleChange, this._onTitleChange));\n this.register(forwardEvent(this._inputHandler.onA11yChar, this._onA11yCharEmitter));\n this.register(forwardEvent(this._inputHandler.onA11yTab, this._onA11yTabEmitter));\n\n // Setup listeners\n this.register(this._bufferService.onResize(e => this._afterResize(e.cols, e.rows)));\n }\n\n /**\n * Handle color event from inputhandler for OSC 4|104 | 10|110 | 11|111 | 12|112.\n * An event from OSC 4|104 may contain multiple set or report requests, and multiple\n * or none restore requests (resetting all),\n * while an event from OSC 10|110 | 11|111 | 12|112 always contains a single request.\n */\n private _handleColorEvent(event: IColorEvent): void {\n if (!this._colorManager) return;\n for (const req of event) {\n let acc: 'foreground' | 'background' | 'cursor' | 'ansi' | undefined = undefined;\n let ident = '';\n switch (req.index) {\n case ColorIndex.FOREGROUND: // OSC 10 | 110\n acc = 'foreground';\n ident = '10';\n break;\n case ColorIndex.BACKGROUND: // OSC 11 | 111\n acc = 'background';\n ident = '11';\n break;\n case ColorIndex.CURSOR: // OSC 12 | 112\n acc = 'cursor';\n ident = '12';\n break;\n default: // OSC 4 | 104\n // we can skip the [0..255] range check here (already done in inputhandler)\n acc = 'ansi';\n ident = '4;' + req.index;\n }\n if (acc) {\n switch (req.type) {\n case ColorRequestType.REPORT:\n const channels = color.toColorRGB(acc === 'ansi'\n ? this._colorManager.colors.ansi[req.index]\n : this._colorManager.colors[acc]);\n this.coreService.triggerDataEvent(`${C0.ESC}]${ident};${toRgbString(channels)}${C0.BEL}`);\n break;\n case ColorRequestType.SET:\n if (acc === 'ansi') this._colorManager.colors.ansi[req.index] = rgba.toColor(...req.color);\n else this._colorManager.colors[acc] = rgba.toColor(...req.color);\n break;\n case ColorRequestType.RESTORE:\n this._colorManager.restoreColor(req.index);\n break;\n }\n }\n }\n this._renderService?.setColors(this._colorManager.colors);\n this.viewport?.onThemeChange(this._colorManager.colors);\n }\n\n public dispose(): void {\n if (this._isDisposed) {\n return;\n }\n super.dispose();\n this._renderService?.dispose();\n this._customKeyEventHandler = undefined;\n this.write = () => { };\n this.element?.parentNode?.removeChild(this.element);\n }\n\n protected _setup(): void {\n super._setup();\n\n this._customKeyEventHandler = undefined;\n }\n\n /**\n * Convenience property to active buffer.\n */\n public get buffer(): IBuffer {\n return this.buffers.active;\n }\n\n /**\n * Focus the terminal. Delegates focus handling to the terminal's DOM element.\n */\n public focus(): void {\n if (this.textarea) {\n this.textarea.focus({ preventScroll: true });\n }\n }\n\n protected _updateOptions(key: string): void {\n super._updateOptions(key);\n\n // TODO: These listeners should be owned by individual components\n switch (key) {\n case 'fontFamily':\n case 'fontSize':\n // When the font changes the size of the cells may change which requires a renderer clear\n this._renderService?.clear();\n this._charSizeService?.measure();\n break;\n case 'cursorBlink':\n case 'cursorStyle':\n // The DOM renderer needs a row refresh to update the cursor styles\n this.refresh(this.buffer.y, this.buffer.y);\n break;\n case 'customGlyphs':\n case 'drawBoldTextInBrightColors':\n case 'letterSpacing':\n case 'lineHeight':\n case 'fontWeight':\n case 'fontWeightBold':\n case 'minimumContrastRatio':\n // When the font changes the size of the cells may change which requires a renderer clear\n if (this._renderService) {\n this._renderService.clear();\n this._renderService.onResize(this.cols, this.rows);\n this.refresh(0, this.rows - 1);\n }\n break;\n case 'rendererType':\n if (this._renderService) {\n this._renderService.setRenderer(this._createRenderer());\n this._renderService.onResize(this.cols, this.rows);\n }\n break;\n case 'scrollback':\n this.viewport?.syncScrollArea();\n break;\n case 'screenReaderMode':\n if (this.optionsService.rawOptions.screenReaderMode) {\n if (!this._accessibilityManager && this._renderService) {\n this._accessibilityManager = new AccessibilityManager(this, this._renderService);\n }\n } else {\n this._accessibilityManager?.dispose();\n this._accessibilityManager = undefined;\n }\n break;\n case 'tabStopWidth': this.buffers.setupTabStops(); break;\n case 'theme':\n this._setTheme(this.optionsService.rawOptions.theme);\n break;\n }\n }\n\n /**\n * Binds the desired focus behavior on a given terminal object.\n */\n private _onTextAreaFocus(ev: KeyboardEvent): void {\n if (this.coreService.decPrivateModes.sendFocus) {\n this.coreService.triggerDataEvent(C0.ESC + '[I');\n }\n this.updateCursorStyle(ev);\n this.element!.classList.add('focus');\n this._showCursor();\n this._onFocus.fire();\n }\n\n /**\n * Blur the terminal, calling the blur function on the terminal's underlying\n * textarea.\n */\n public blur(): void {\n return this.textarea?.blur();\n }\n\n /**\n * Binds the desired blur behavior on a given terminal object.\n */\n private _onTextAreaBlur(): void {\n // Text can safely be removed on blur. Doing it earlier could interfere with\n // screen readers reading it out.\n this.textarea!.value = '';\n this.refresh(this.buffer.y, this.buffer.y);\n if (this.coreService.decPrivateModes.sendFocus) {\n this.coreService.triggerDataEvent(C0.ESC + '[O');\n }\n this.element!.classList.remove('focus');\n this._onBlur.fire();\n }\n\n private _syncTextArea(): void {\n if (!this.textarea || !this.buffer.isCursorInViewport || this._compositionHelper!.isComposing || !this._renderService) {\n return;\n }\n const cursorY = this.buffer.ybase + this.buffer.y;\n const bufferLine = this.buffer.lines.get(cursorY);\n if (!bufferLine) {\n return;\n }\n const cursorX = Math.min(this.buffer.x, this.cols - 1);\n const cellHeight = this._renderService.dimensions.actualCellHeight;\n const width = bufferLine.getWidth(cursorX);\n const cellWidth = this._renderService.dimensions.actualCellWidth * width;\n const cursorTop = this.buffer.y * this._renderService.dimensions.actualCellHeight;\n const cursorLeft = cursorX * this._renderService.dimensions.actualCellWidth;\n\n // Sync the textarea to the exact position of the composition view so the IME knows where the\n // text is.\n this.textarea.style.left = cursorLeft + 'px';\n this.textarea.style.top = cursorTop + 'px';\n this.textarea.style.width = cellWidth + 'px';\n this.textarea.style.height = cellHeight + 'px';\n this.textarea.style.lineHeight = cellHeight + 'px';\n this.textarea.style.zIndex = '-5';\n }\n\n /**\n * Initialize default behavior\n */\n private _initGlobal(): void {\n this._bindKeys();\n\n // Bind clipboard functionality\n this.register(addDisposableDomListener(this.element!, 'copy', (event: ClipboardEvent) => {\n // If mouse events are active it means the selection manager is disabled and\n // copy should be handled by the host program.\n if (!this.hasSelection()) {\n return;\n }\n copyHandler(event, this._selectionService!);\n }));\n const pasteHandlerWrapper = (event: ClipboardEvent): void => handlePasteEvent(event, this.textarea!, this.coreService);\n this.register(addDisposableDomListener(this.textarea!, 'paste', pasteHandlerWrapper));\n this.register(addDisposableDomListener(this.element!, 'paste', pasteHandlerWrapper));\n\n // Handle right click context menus\n if (Browser.isFirefox) {\n // Firefox doesn't appear to fire the contextmenu event on right click\n this.register(addDisposableDomListener(this.element!, 'mousedown', (event: MouseEvent) => {\n if (event.button === 2) {\n rightClickHandler(event, this.textarea!, this.screenElement!, this._selectionService!, this.options.rightClickSelectsWord);\n }\n }));\n } else {\n this.register(addDisposableDomListener(this.element!, 'contextmenu', (event: MouseEvent) => {\n rightClickHandler(event, this.textarea!, this.screenElement!, this._selectionService!, this.options.rightClickSelectsWord);\n }));\n }\n\n // Move the textarea under the cursor when middle clicking on Linux to ensure\n // middle click to paste selection works. This only appears to work in Chrome\n // at the time is writing.\n if (Browser.isLinux) {\n // Use auxclick event over mousedown the latter doesn't seem to work. Note\n // that the regular click event doesn't fire for the middle mouse button.\n this.register(addDisposableDomListener(this.element!, 'auxclick', (event: MouseEvent) => {\n if (event.button === 1) {\n moveTextAreaUnderMouseCursor(event, this.textarea!, this.screenElement!);\n }\n }));\n }\n }\n\n /**\n * Apply key handling to the terminal\n */\n private _bindKeys(): void {\n this.register(addDisposableDomListener(this.textarea!, 'keyup', (ev: KeyboardEvent) => this._keyUp(ev), true));\n this.register(addDisposableDomListener(this.textarea!, 'keydown', (ev: KeyboardEvent) => this._keyDown(ev), true));\n this.register(addDisposableDomListener(this.textarea!, 'keypress', (ev: KeyboardEvent) => this._keyPress(ev), true));\n this.register(addDisposableDomListener(this.textarea!, 'compositionstart', () => this._compositionHelper!.compositionstart()));\n this.register(addDisposableDomListener(this.textarea!, 'compositionupdate', (e: CompositionEvent) => this._compositionHelper!.compositionupdate(e)));\n this.register(addDisposableDomListener(this.textarea!, 'compositionend', () => this._compositionHelper!.compositionend()));\n this.register(addDisposableDomListener(this.textarea!, 'input', (ev: InputEvent) => this._inputEvent(ev), true));\n this.register(this.onRender(() => this._compositionHelper!.updateCompositionElements()));\n this.register(this.onRender(e => this._queueLinkification(e.start, e.end)));\n }\n\n /**\n * Opens the terminal within an element.\n *\n * @param parent The element to create the terminal within.\n */\n public open(parent: HTMLElement): void {\n if (!parent) {\n throw new Error('Terminal requires a parent element.');\n }\n\n if (!parent.isConnected) {\n this._logService.debug('Terminal.open was called on an element that was not attached to the DOM');\n }\n\n this._document = parent.ownerDocument!;\n\n // Create main element container\n this.element = this._document.createElement('div');\n this.element.dir = 'ltr'; // xterm.css assumes LTR\n this.element.classList.add('terminal');\n this.element.classList.add('xterm');\n this.element.setAttribute('tabindex', '0');\n parent.appendChild(this.element);\n\n // Performance: Use a document fragment to build the terminal\n // viewport and helper elements detached from the DOM\n const fragment = document.createDocumentFragment();\n this._viewportElement = document.createElement('div');\n this._viewportElement.classList.add('xterm-viewport');\n fragment.appendChild(this._viewportElement);\n this._viewportScrollArea = document.createElement('div');\n this._viewportScrollArea.classList.add('xterm-scroll-area');\n this._viewportElement.appendChild(this._viewportScrollArea);\n\n this.screenElement = document.createElement('div');\n this.screenElement.classList.add('xterm-screen');\n // Create the container that will hold helpers like the textarea for\n // capturing DOM Events. Then produce the helpers.\n this._helperContainer = document.createElement('div');\n this._helperContainer.classList.add('xterm-helpers');\n this.screenElement.appendChild(this._helperContainer);\n fragment.appendChild(this.screenElement);\n\n this.textarea = document.createElement('textarea');\n this.textarea.classList.add('xterm-helper-textarea');\n this.textarea.setAttribute('aria-label', Strings.promptLabel);\n this.textarea.setAttribute('aria-multiline', 'false');\n this.textarea.setAttribute('autocorrect', 'off');\n this.textarea.setAttribute('autocapitalize', 'off');\n this.textarea.setAttribute('spellcheck', 'false');\n this.textarea.tabIndex = 0;\n this.register(addDisposableDomListener(this.textarea, 'focus', (ev: KeyboardEvent) => this._onTextAreaFocus(ev)));\n this.register(addDisposableDomListener(this.textarea, 'blur', () => this._onTextAreaBlur()));\n this._helperContainer.appendChild(this.textarea);\n\n const coreBrowserService = this._instantiationService.createInstance(CoreBrowserService, this.textarea);\n this._instantiationService.setService(ICoreBrowserService, coreBrowserService);\n\n this._charSizeService = this._instantiationService.createInstance(CharSizeService, this._document, this._helperContainer);\n this._instantiationService.setService(ICharSizeService, this._charSizeService);\n\n this._theme = this.options.theme || this._theme;\n this._colorManager = new ColorManager(document, this.options.allowTransparency);\n this.register(this.optionsService.onOptionChange(e => this._colorManager!.onOptionsChange(e)));\n this._colorManager.setTheme(this._theme);\n\n this._characterJoinerService = this._instantiationService.createInstance(CharacterJoinerService);\n this._instantiationService.setService(ICharacterJoinerService, this._characterJoinerService);\n\n const renderer = this._createRenderer();\n this._renderService = this.register(this._instantiationService.createInstance(RenderService, renderer, this.rows, this.screenElement));\n this._instantiationService.setService(IRenderService, this._renderService);\n this.register(this._renderService.onRenderedBufferChange(e => this._onRender.fire(e)));\n this.onResize(e => this._renderService!.resize(e.cols, e.rows));\n\n this._compositionView = document.createElement('div');\n this._compositionView.classList.add('composition-view');\n this._compositionHelper = this._instantiationService.createInstance(CompositionHelper, this.textarea, this._compositionView);\n this._helperContainer.appendChild(this._compositionView);\n\n // Performance: Add viewport and helper elements from the fragment\n this.element.appendChild(fragment);\n\n this._soundService = this._instantiationService.createInstance(SoundService);\n this._instantiationService.setService(ISoundService, this._soundService);\n this._mouseService = this._instantiationService.createInstance(MouseService);\n this._instantiationService.setService(IMouseService, this._mouseService);\n\n this.viewport = this._instantiationService.createInstance(Viewport,\n (amount: number) => this.scrollLines(amount, true, ScrollSource.VIEWPORT),\n this._viewportElement,\n this._viewportScrollArea,\n this.element\n );\n this.viewport.onThemeChange(this._colorManager.colors);\n this.register(this._inputHandler.onRequestSyncScrollBar(() => this.viewport!.syncScrollArea()));\n this.register(this.viewport);\n\n this.register(this.onCursorMove(() => {\n this._renderService!.onCursorMove();\n this._syncTextArea();\n }));\n this.register(this.onResize(() => this._renderService!.onResize(this.cols, this.rows)));\n this.register(this.onBlur(() => this._renderService!.onBlur()));\n this.register(this.onFocus(() => this._renderService!.onFocus()));\n this.register(this._renderService.onDimensionsChange(() => this.viewport!.syncScrollArea()));\n\n this._selectionService = this.register(this._instantiationService.createInstance(SelectionService,\n this.element,\n this.screenElement,\n this.linkifier2\n ));\n this._instantiationService.setService(ISelectionService, this._selectionService);\n this.register(this._selectionService.onRequestScrollLines(e => this.scrollLines(e.amount, e.suppressScrollEvent)));\n this.register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire()));\n this.register(this._selectionService.onRequestRedraw(e => this._renderService!.onSelectionChanged(e.start, e.end, e.columnSelectMode)));\n this.register(this._selectionService.onLinuxMouseSelection(text => {\n // If there's a new selection, put it into the textarea, focus and select it\n // in order to register it as a selection on the OS. This event is fired\n // only on Linux to enable middle click to paste selection.\n this.textarea!.value = text;\n this.textarea!.focus();\n this.textarea!.select();\n }));\n this.register(this._onScroll.event(ev => {\n this.viewport!.syncScrollArea();\n this._selectionService!.refresh();\n }));\n this.register(addDisposableDomListener(this._viewportElement, 'scroll', () => this._selectionService!.refresh()));\n\n this._mouseZoneManager = this._instantiationService.createInstance(MouseZoneManager, this.element, this.screenElement);\n this.register(this._mouseZoneManager);\n this.register(this.onScroll(() => this._mouseZoneManager!.clearAll()));\n this.linkifier.attachToDom(this.element, this._mouseZoneManager);\n this.linkifier2.attachToDom(this.screenElement, this._mouseService, this._renderService);\n\n this.decorationService.attachToDom(this.screenElement, this._renderService, this._bufferService);\n // This event listener must be registered aftre MouseZoneManager is created\n this.register(addDisposableDomListener(this.element, 'mousedown', (e: MouseEvent) => this._selectionService!.onMouseDown(e)));\n\n // apply mouse event classes set by escape codes before terminal was attached\n if (this.coreMouseService.areMouseEventsActive) {\n this._selectionService.disable();\n this.element.classList.add('enable-mouse-events');\n } else {\n this._selectionService.enable();\n }\n\n if (this.options.screenReaderMode) {\n // Note that this must be done *after* the renderer is created in order to\n // ensure the correct order of the dprchange event\n this._accessibilityManager = new AccessibilityManager(this, this._renderService);\n }\n\n // Measure the character size\n this._charSizeService.measure();\n\n // Setup loop that draws to screen\n this.refresh(0, this.rows - 1);\n\n // Initialize global actions that need to be taken on the document.\n this._initGlobal();\n\n // Listen for mouse events and translate\n // them into terminal mouse protocols.\n this.bindMouse();\n }\n\n private _createRenderer(): IRenderer {\n switch (this.options.rendererType) {\n case 'canvas': return this._instantiationService.createInstance(Renderer, this._colorManager!.colors, this.screenElement!, this.linkifier, this.linkifier2);\n case 'dom': return this._instantiationService.createInstance(DomRenderer, this._colorManager!.colors, this.element!, this.screenElement!, this._viewportElement!, this.linkifier, this.linkifier2);\n default: throw new Error(`Unrecognized rendererType \"${this.options.rendererType}\"`);\n }\n }\n\n /**\n * Sets the theme on the renderer. The renderer must have been initialized.\n * @param theme The theme to set.\n */\n private _setTheme(theme: ITheme): void {\n this._theme = theme;\n this._colorManager?.setTheme(theme);\n this._renderService?.setColors(this._colorManager!.colors);\n this.viewport?.onThemeChange(this._colorManager!.colors);\n }\n\n /**\n * Bind certain mouse events to the terminal.\n * By default only 3 button + wheel up/down is ativated. For higher buttons\n * no mouse report will be created. Typically the standard actions will be active.\n *\n * There are several reasons not to enable support for higher buttons/wheel:\n * - Button 4 and 5 are typically used for history back and forward navigation,\n * there is no straight forward way to supress/intercept those standard actions.\n * - Support for higher buttons does not work in some platform/browser combinations.\n * - Left/right wheel was not tested.\n * - Emulators vary in mouse button support, typically only 3 buttons and\n * wheel up/down work reliable.\n *\n * TODO: Move mouse event code into its own file.\n */\n public bindMouse(): void {\n const self = this;\n const el = this.element!;\n\n // send event to CoreMouseService\n function sendEvent(ev: MouseEvent | WheelEvent): boolean {\n // get mouse coordinates\n const pos = self._mouseService!.getRawByteCoords(ev, self.screenElement!, self.cols, self.rows);\n if (!pos) {\n return false;\n }\n\n let but: CoreMouseButton;\n let action: CoreMouseAction | undefined;\n switch ((ev as any).overrideType || ev.type) {\n case 'mousemove':\n action = CoreMouseAction.MOVE;\n if (ev.buttons === undefined) {\n // buttons is not supported on macOS, try to get a value from button instead\n but = CoreMouseButton.NONE;\n if (ev.button !== undefined) {\n but = ev.button < 3 ? ev.button : CoreMouseButton.NONE;\n }\n } else {\n // according to MDN buttons only reports up to button 5 (AUX2)\n but = ev.buttons & 1 ? CoreMouseButton.LEFT :\n ev.buttons & 4 ? CoreMouseButton.MIDDLE :\n ev.buttons & 2 ? CoreMouseButton.RIGHT :\n CoreMouseButton.NONE; // fallback to NONE\n }\n break;\n case 'mouseup':\n action = CoreMouseAction.UP;\n but = ev.button < 3 ? ev.button : CoreMouseButton.NONE;\n break;\n case 'mousedown':\n action = CoreMouseAction.DOWN;\n but = ev.button < 3 ? ev.button : CoreMouseButton.NONE;\n break;\n case 'wheel':\n // only UP/DOWN wheel events are respected\n if ((ev as WheelEvent).deltaY !== 0) {\n action = (ev as WheelEvent).deltaY < 0 ? CoreMouseAction.UP : CoreMouseAction.DOWN;\n }\n but = CoreMouseButton.WHEEL;\n break;\n default:\n // dont handle other event types by accident\n return false;\n }\n\n // exit if we cannot determine valid button/action values\n // do nothing for higher buttons than wheel\n if (action === undefined || but === undefined || but > CoreMouseButton.WHEEL) {\n return false;\n }\n\n return self.coreMouseService.triggerMouseEvent({\n col: pos.x - 33, // FIXME: why -33 here?\n row: pos.y - 33,\n button: but,\n action,\n ctrl: ev.ctrlKey,\n alt: ev.altKey,\n shift: ev.shiftKey\n });\n }\n\n /**\n * Event listener state handling.\n * We listen to the onProtocolChange event of CoreMouseService and put\n * requested listeners in `requestedEvents`. With this the listeners\n * have all bits to do the event listener juggling.\n * Note: 'mousedown' currently is \"always on\" and not managed\n * by onProtocolChange.\n */\n const requestedEvents: { [key: string]: ((ev: Event) => void) | null } = {\n mouseup: null,\n wheel: null,\n mousedrag: null,\n mousemove: null\n };\n const eventListeners: { [key: string]: (ev: any) => void | boolean } = {\n mouseup: (ev: MouseEvent) => {\n sendEvent(ev);\n if (!ev.buttons) {\n // if no other button is held remove global handlers\n this._document!.removeEventListener('mouseup', requestedEvents.mouseup!);\n if (requestedEvents.mousedrag) {\n this._document!.removeEventListener('mousemove', requestedEvents.mousedrag);\n }\n }\n return this.cancel(ev);\n },\n wheel: (ev: WheelEvent) => {\n sendEvent(ev);\n return this.cancel(ev, true);\n },\n mousedrag: (ev: MouseEvent) => {\n // deal only with move while a button is held\n if (ev.buttons) {\n sendEvent(ev);\n }\n },\n mousemove: (ev: MouseEvent) => {\n // deal only with move without any button\n if (!ev.buttons) {\n sendEvent(ev);\n }\n }\n };\n this.register(this.coreMouseService.onProtocolChange(events => {\n // apply global changes on events\n if (events) {\n if (this.optionsService.rawOptions.logLevel === 'debug') {\n this._logService.debug('Binding to mouse events:', this.coreMouseService.explainEvents(events));\n }\n this.element!.classList.add('enable-mouse-events');\n this._selectionService!.disable();\n } else {\n this._logService.debug('Unbinding from mouse events.');\n this.element!.classList.remove('enable-mouse-events');\n this._selectionService!.enable();\n }\n\n // add/remove handlers from requestedEvents\n\n if (!(events & CoreMouseEventType.MOVE)) {\n el.removeEventListener('mousemove', requestedEvents.mousemove!);\n requestedEvents.mousemove = null;\n } else if (!requestedEvents.mousemove) {\n el.addEventListener('mousemove', eventListeners.mousemove);\n requestedEvents.mousemove = eventListeners.mousemove;\n }\n\n if (!(events & CoreMouseEventType.WHEEL)) {\n el.removeEventListener('wheel', requestedEvents.wheel!);\n requestedEvents.wheel = null;\n } else if (!requestedEvents.wheel) {\n el.addEventListener('wheel', eventListeners.wheel, { passive: false });\n requestedEvents.wheel = eventListeners.wheel;\n }\n\n if (!(events & CoreMouseEventType.UP)) {\n this._document!.removeEventListener('mouseup', requestedEvents.mouseup!);\n requestedEvents.mouseup = null;\n } else if (!requestedEvents.mouseup) {\n requestedEvents.mouseup = eventListeners.mouseup;\n }\n\n if (!(events & CoreMouseEventType.DRAG)) {\n this._document!.removeEventListener('mousemove', requestedEvents.mousedrag!);\n requestedEvents.mousedrag = null;\n } else if (!requestedEvents.mousedrag) {\n requestedEvents.mousedrag = eventListeners.mousedrag;\n }\n }));\n // force initial onProtocolChange so we dont miss early mouse requests\n this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol;\n\n /**\n * \"Always on\" event listeners.\n */\n this.register(addDisposableDomListener(el, 'mousedown', (ev: MouseEvent) => {\n ev.preventDefault();\n this.focus();\n\n // Don't send the mouse button to the pty if mouse events are disabled or\n // if the selection manager is having selection forced (ie. a modifier is\n // held).\n if (!this.coreMouseService.areMouseEventsActive || this._selectionService!.shouldForceSelection(ev)) {\n return;\n }\n\n sendEvent(ev);\n\n // Register additional global handlers which should keep reporting outside\n // of the terminal element.\n // Note: Other emulators also do this for 'mousedown' while a button\n // is held, we currently limit 'mousedown' to the terminal only.\n if (requestedEvents.mouseup) {\n this._document!.addEventListener('mouseup', requestedEvents.mouseup);\n }\n if (requestedEvents.mousedrag) {\n this._document!.addEventListener('mousemove', requestedEvents.mousedrag);\n }\n\n return this.cancel(ev);\n }));\n\n this.register(addDisposableDomListener(el, 'wheel', (ev: WheelEvent) => {\n // do nothing, if app side handles wheel itself\n if (requestedEvents.wheel) return;\n\n if (!this.buffer.hasScrollback) {\n // Convert wheel events into up/down events when the buffer does not have scrollback, this\n // enables scrolling in apps hosted in the alt buffer such as vim or tmux.\n const amount = this.viewport!.getLinesScrolled(ev);\n\n // Do nothing if there's no vertical scroll\n if (amount === 0) {\n return;\n }\n\n // Construct and send sequences\n const sequence = C0.ESC + (this.coreService.decPrivateModes.applicationCursorKeys ? 'O' : '[') + (ev.deltaY < 0 ? 'A' : 'B');\n let data = '';\n for (let i = 0; i < Math.abs(amount); i++) {\n data += sequence;\n }\n this.coreService.triggerDataEvent(data, true);\n return this.cancel(ev, true);\n }\n\n // normal viewport scrolling\n // conditionally stop event, if the viewport still had rows to scroll within\n if (this.viewport!.onWheel(ev)) {\n return this.cancel(ev);\n }\n }, { passive: false }));\n\n this.register(addDisposableDomListener(el, 'touchstart', (ev: TouchEvent) => {\n if (this.coreMouseService.areMouseEventsActive) return;\n this.viewport!.onTouchStart(ev);\n return this.cancel(ev);\n }, { passive: true }));\n\n this.register(addDisposableDomListener(el, 'touchmove', (ev: TouchEvent) => {\n if (this.coreMouseService.areMouseEventsActive) return;\n if (!this.viewport!.onTouchMove(ev)) {\n return this.cancel(ev);\n }\n }, { passive: false }));\n }\n\n\n /**\n * Tells the renderer to refresh terminal content between two rows (inclusive) at the next\n * opportunity.\n * @param start The row to start from (between 0 and this.rows - 1).\n * @param end The row to end at (between start and this.rows - 1).\n */\n public refresh(start: number, end: number): void {\n this._renderService?.refreshRows(start, end);\n }\n\n /**\n * Queues linkification for the specified rows.\n * @param start The row to start from (between 0 and this.rows - 1).\n * @param end The row to end at (between start and this.rows - 1).\n */\n private _queueLinkification(start: number, end: number): void {\n this.linkifier?.linkifyRows(start, end);\n }\n\n /**\n * Change the cursor style for different selection modes\n */\n public updateCursorStyle(ev: KeyboardEvent): void {\n if (this._selectionService?.shouldColumnSelect(ev)) {\n this.element!.classList.add('column-select');\n } else {\n this.element!.classList.remove('column-select');\n }\n }\n\n /**\n * Display the cursor element\n */\n private _showCursor(): void {\n if (!this.coreService.isCursorInitialized) {\n this.coreService.isCursorInitialized = true;\n this.refresh(this.buffer.y, this.buffer.y);\n }\n }\n\n public scrollLines(disp: number, suppressScrollEvent?: boolean, source = ScrollSource.TERMINAL): void {\n super.scrollLines(disp, suppressScrollEvent, source);\n this.refresh(0, this.rows - 1);\n }\n\n public paste(data: string): void {\n paste(data, this.textarea!, this.coreService);\n }\n\n /**\n * Attaches a custom key event handler which is run before keys are processed,\n * giving consumers of xterm.js ultimate control as to what keys should be\n * processed by the terminal and what keys should not.\n * @param customKeyEventHandler The custom KeyboardEvent handler to attach.\n * This is a function that takes a KeyboardEvent, allowing consumers to stop\n * propagation and/or prevent the default action. The function returns whether\n * the event should be processed by xterm.js.\n */\n public attachCustomKeyEventHandler(customKeyEventHandler: CustomKeyEventHandler): void {\n this._customKeyEventHandler = customKeyEventHandler;\n }\n\n /**\n * Registers a link matcher, allowing custom link patterns to be matched and\n * handled.\n * @param regex The regular expression to search for, specifically\n * this searches the textContent of the rows. You will want to use \\s to match\n * a space ' ' character for example.\n * @param handler The callback when the link is called.\n * @param options Options for the link matcher.\n * @return The ID of the new matcher, this can be used to deregister.\n */\n public registerLinkMatcher(regex: RegExp, handler: LinkMatcherHandler, options?: ILinkMatcherOptions): number {\n const matcherId = this.linkifier.registerLinkMatcher(regex, handler, options);\n this.refresh(0, this.rows - 1);\n return matcherId;\n }\n\n /**\n * Deregisters a link matcher if it has been registered.\n * @param matcherId The link matcher's ID (returned after register)\n */\n public deregisterLinkMatcher(matcherId: number): void {\n if (this.linkifier.deregisterLinkMatcher(matcherId)) {\n this.refresh(0, this.rows - 1);\n }\n }\n\n public registerLinkProvider(linkProvider: ILinkProvider): IDisposable {\n return this.linkifier2.registerLinkProvider(linkProvider);\n }\n\n public registerCharacterJoiner(handler: CharacterJoinerHandler): number {\n if (!this._characterJoinerService) {\n throw new Error('Terminal must be opened first');\n }\n const joinerId = this._characterJoinerService.register(handler);\n this.refresh(0, this.rows - 1);\n return joinerId;\n }\n\n public deregisterCharacterJoiner(joinerId: number): void {\n if (!this._characterJoinerService) {\n throw new Error('Terminal must be opened first');\n }\n if (this._characterJoinerService.deregister(joinerId)) {\n this.refresh(0, this.rows - 1);\n }\n }\n\n public get markers(): IMarker[] {\n return this.buffer.markers;\n }\n\n public addMarker(cursorYOffset: number): IMarker | undefined {\n // Disallow markers on the alt buffer\n if (this.buffer !== this.buffers.normal) {\n return;\n }\n\n return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + cursorYOffset);\n }\n\n public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {\n return this.decorationService!.registerDecoration(decorationOptions);\n }\n\n /**\n * Gets whether the terminal has an active selection.\n */\n public hasSelection(): boolean {\n return this._selectionService ? this._selectionService.hasSelection : false;\n }\n\n /**\n * Selects text within the terminal.\n * @param column The column the selection starts at..\n * @param row The row the selection starts at.\n * @param length The length of the selection.\n */\n public select(column: number, row: number, length: number): void {\n this._selectionService!.setSelection(column, row, length);\n }\n\n /**\n * Gets the terminal's current selection, this is useful for implementing copy\n * behavior outside of xterm.js.\n */\n public getSelection(): string {\n return this._selectionService ? this._selectionService.selectionText : '';\n }\n\n public getSelectionPosition(): ISelectionPosition | undefined {\n if (!this._selectionService || !this._selectionService.hasSelection) {\n return undefined;\n }\n\n return {\n startColumn: this._selectionService.selectionStart![0],\n startRow: this._selectionService.selectionStart![1],\n endColumn: this._selectionService.selectionEnd![0],\n endRow: this._selectionService.selectionEnd![1]\n };\n }\n\n /**\n * Clears the current terminal selection.\n */\n public clearSelection(): void {\n this._selectionService?.clearSelection();\n }\n\n /**\n * Selects all text within the terminal.\n */\n public selectAll(): void {\n this._selectionService?.selectAll();\n }\n\n public selectLines(start: number, end: number): void {\n this._selectionService?.selectLines(start, end);\n }\n\n /**\n * Handle a keydown event\n * Key Resources:\n * - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent\n * @param ev The keydown event to be handled.\n */\n protected _keyDown(event: KeyboardEvent): boolean | undefined {\n this._keyDownHandled = false;\n\n if (this._customKeyEventHandler && this._customKeyEventHandler(event) === false) {\n return false;\n }\n\n if (!this._compositionHelper!.keydown(event)) {\n if (this.buffer.ybase !== this.buffer.ydisp) {\n this._bufferService.scrollToBottom();\n }\n return false;\n }\n\n if (event.key === 'Dead' || event.key === 'AltGraph') {\n this._unprocessedDeadKey = true;\n }\n\n const result = evaluateKeyboardEvent(event, this.coreService.decPrivateModes.applicationCursorKeys, this.browser.isMac, this.options.macOptionIsMeta);\n\n this.updateCursorStyle(event);\n\n if (result.type === KeyboardResultType.PAGE_DOWN || result.type === KeyboardResultType.PAGE_UP) {\n const scrollCount = this.rows - 1;\n this.scrollLines(result.type === KeyboardResultType.PAGE_UP ? -scrollCount : scrollCount);\n return this.cancel(event, true);\n }\n\n if (result.type === KeyboardResultType.SELECT_ALL) {\n this.selectAll();\n }\n\n if (this._isThirdLevelShift(this.browser, event)) {\n return true;\n }\n\n if (result.cancel) {\n // The event is canceled at the end already, is this necessary?\n this.cancel(event, true);\n }\n\n if (!result.key) {\n return true;\n }\n\n if (this._unprocessedDeadKey) {\n this._unprocessedDeadKey = false;\n return true;\n }\n\n // If ctrl+c or enter is being sent, clear out the textarea. This is done so that screen readers\n // will announce deleted characters. This will not work 100% of the time but it should cover\n // most scenarios.\n if (result.key === C0.ETX || result.key === C0.CR) {\n this.textarea!.value = '';\n }\n\n this._onKey.fire({ key: result.key, domEvent: event });\n this._showCursor();\n this.coreService.triggerDataEvent(result.key, true);\n\n // Cancel events when not in screen reader mode so events don't get bubbled up and handled by\n // other listeners. When screen reader mode is enabled, this could cause issues if the event\n // is handled at a higher level, this is a compromise in order to echo keys to the screen\n // reader.\n if (!this.optionsService.rawOptions.screenReaderMode) {\n return this.cancel(event, true);\n }\n\n this._keyDownHandled = true;\n }\n\n private _isThirdLevelShift(browser: IBrowser, ev: KeyboardEvent): boolean {\n const thirdLevelKey =\n (browser.isMac && !this.options.macOptionIsMeta && ev.altKey && !ev.ctrlKey && !ev.metaKey) ||\n (browser.isWindows && ev.altKey && ev.ctrlKey && !ev.metaKey) ||\n (browser.isWindows && ev.getModifierState('AltGraph'));\n\n if (ev.type === 'keypress') {\n return thirdLevelKey;\n }\n\n // Don't invoke for arrows, pageDown, home, backspace, etc. (on non-keypress events)\n return thirdLevelKey && (!ev.keyCode || ev.keyCode > 47);\n }\n\n protected _keyUp(ev: KeyboardEvent): void {\n if (this._customKeyEventHandler && this._customKeyEventHandler(ev) === false) {\n return;\n }\n\n if (!wasModifierKeyOnlyEvent(ev)) {\n this.focus();\n }\n\n this.updateCursorStyle(ev);\n this._keyPressHandled = false;\n }\n\n /**\n * Handle a keypress event.\n * Key Resources:\n * - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent\n * @param ev The keypress event to be handled.\n */\n protected _keyPress(ev: KeyboardEvent): boolean {\n let key;\n\n this._keyPressHandled = false;\n\n if (this._keyDownHandled) {\n return false;\n }\n\n if (this._customKeyEventHandler && this._customKeyEventHandler(ev) === false) {\n return false;\n }\n\n this.cancel(ev);\n\n if (ev.charCode) {\n key = ev.charCode;\n } else if (ev.which === null || ev.which === undefined) {\n key = ev.keyCode;\n } else if (ev.which !== 0 && ev.charCode !== 0) {\n key = ev.which;\n } else {\n return false;\n }\n\n if (!key || (\n (ev.altKey || ev.ctrlKey || ev.metaKey) && !this._isThirdLevelShift(this.browser, ev)\n )) {\n return false;\n }\n\n key = String.fromCharCode(key);\n\n this._onKey.fire({ key, domEvent: ev });\n this._showCursor();\n this.coreService.triggerDataEvent(key, true);\n\n this._keyPressHandled = true;\n\n // The key was handled so clear the dead key state, otherwise certain keystrokes like arrow\n // keys could be ignored\n this._unprocessedDeadKey = false;\n\n return true;\n }\n\n /**\n * Handle an input event.\n * Key Resources:\n * - https://developer.mozilla.org/en-US/docs/Web/API/InputEvent\n * @param ev The input event to be handled.\n */\n protected _inputEvent(ev: InputEvent): boolean {\n // Only support emoji IMEs when screen reader mode is disabled as the event must bubble up to\n // support reading out character input which can doubling up input characters\n if (ev.data && ev.inputType === 'insertText' && !ev.composed && !this.optionsService.rawOptions.screenReaderMode) {\n if (this._keyPressHandled) {\n return false;\n }\n\n // The key was handled so clear the dead key state, otherwise certain keystrokes like arrow\n // keys could be ignored\n this._unprocessedDeadKey = false;\n\n const text = ev.data;\n this.coreService.triggerDataEvent(text, true);\n\n this.cancel(ev);\n return true;\n }\n\n return false;\n }\n\n /**\n * Ring the bell.\n * Note: We could do sweet things with webaudio here\n */\n public bell(): void {\n if (this._soundBell()) {\n this._soundService?.playBellSound();\n }\n\n this._onBell.fire();\n\n // if (this._visualBell()) {\n // this.element.classList.add('visual-bell-active');\n // clearTimeout(this._visualBellTimer);\n // this._visualBellTimer = window.setTimeout(() => {\n // this.element.classList.remove('visual-bell-active');\n // }, 200);\n // }\n }\n\n /**\n * Resizes the terminal.\n *\n * @param x The number of columns to resize to.\n * @param y The number of rows to resize to.\n */\n public resize(x: number, y: number): void {\n if (x === this.cols && y === this.rows) {\n // Check if we still need to measure the char size (fixes #785).\n if (this._charSizeService && !this._charSizeService.hasValidSize) {\n this._charSizeService.measure();\n }\n return;\n }\n\n super.resize(x, y);\n }\n\n private _afterResize(x: number, y: number): void {\n this._charSizeService?.measure();\n\n // Sync the scroll area to make sure scroll events don't fire and scroll the viewport to an\n // invalid location\n this.viewport?.syncScrollArea(true);\n }\n\n /**\n * Clear the entire buffer, making the prompt line the new first line.\n */\n public clear(): void {\n if (this.buffer.ybase === 0 && this.buffer.y === 0) {\n // Don't clear if it's already clear\n return;\n }\n this.buffer.clearMarkers();\n this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)!);\n this.buffer.lines.length = 1;\n this.buffer.ydisp = 0;\n this.buffer.ybase = 0;\n this.buffer.y = 0;\n for (let i = 1; i < this.rows; i++) {\n this.buffer.lines.push(this.buffer.getBlankLine(DEFAULT_ATTR_DATA));\n }\n this.refresh(0, this.rows - 1);\n this._onScroll.fire({ position: this.buffer.ydisp, source: ScrollSource.TERMINAL });\n }\n\n /**\n * Reset terminal.\n * Note: Calling this directly from JS is synchronous but does not clear\n * input buffers and does not reset the parser, thus the terminal will\n * continue to apply pending input data.\n * If you need in band reset (synchronous with input data) consider\n * using DECSTR (soft reset, CSI ! p) or RIS instead (hard reset, ESC c).\n */\n public reset(): void {\n /**\n * Since _setup handles a full terminal creation, we have to carry forward\n * a few things that should not reset.\n */\n this.options.rows = this.rows;\n this.options.cols = this.cols;\n const customKeyEventHandler = this._customKeyEventHandler;\n\n this._setup();\n super.reset();\n this._selectionService?.reset();\n\n // reattach\n this._customKeyEventHandler = customKeyEventHandler;\n\n // do a full screen refresh\n this.refresh(0, this.rows - 1);\n this.viewport?.syncScrollArea();\n }\n\n public clearTextureAtlas(): void {\n this._renderService?.clearTextureAtlas();\n }\n\n private _reportFocus(): void {\n if (this.element?.classList.contains('focus')) {\n this.coreService.triggerDataEvent(C0.ESC + '[I');\n } else {\n this.coreService.triggerDataEvent(C0.ESC + '[O');\n }\n }\n\n private _reportWindowsOptions(type: WindowsOptionsReportType): void {\n if (!this._renderService) {\n return;\n }\n\n switch (type) {\n case WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:\n const canvasWidth = this._renderService.dimensions.scaledCanvasWidth.toFixed(0);\n const canvasHeight = this._renderService.dimensions.scaledCanvasHeight.toFixed(0);\n this.coreService.triggerDataEvent(`${C0.ESC}[4;${canvasHeight};${canvasWidth}t`);\n break;\n case WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:\n const cellWidth = this._renderService.dimensions.scaledCellWidth.toFixed(0);\n const cellHeight = this._renderService.dimensions.scaledCellHeight.toFixed(0);\n this.coreService.triggerDataEvent(`${C0.ESC}[6;${cellHeight};${cellWidth}t`);\n break;\n }\n }\n\n // TODO: Remove cancel function and cancelEvents option\n public cancel(ev: Event, force?: boolean): boolean | undefined {\n if (!this.options.cancelEvents && !force) {\n return;\n }\n ev.preventDefault();\n ev.stopPropagation();\n return false;\n }\n\n private _visualBell(): boolean {\n return false;\n // return this.options.bellStyle === 'visual' ||\n // this.options.bellStyle === 'both';\n }\n\n private _soundBell(): boolean {\n return this.options.bellStyle === 'sound';\n // return this.options.bellStyle === 'sound' ||\n // this.options.bellStyle === 'both';\n }\n}\n\n/**\n * Helpers\n */\n\nfunction wasModifierKeyOnlyEvent(ev: KeyboardEvent): boolean {\n return ev.keyCode === 16 || // Shift\n ev.keyCode === 17 || // Ctrl\n ev.keyCode === 18; // Alt\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nconst RENDER_DEBOUNCE_THRESHOLD_MS = 1000; // 1 Second\n\nimport { IRenderDebouncer } from 'browser/Types';\n\n/**\n * Debounces calls to update screen readers to update at most once configurable interval of time.\n */\nexport class TimeBasedDebouncer implements IRenderDebouncer {\n private _rowStart: number | undefined;\n private _rowEnd: number | undefined;\n private _rowCount: number | undefined;\n\n // The last moment that the Terminal was refreshed at\n private _lastRefreshMs = 0;\n // Whether a trailing refresh should be triggered due to a refresh request that was throttled\n private _additionalRefreshRequested = false;\n\n private _refreshTimeoutID: number | undefined;\n\n constructor(\n private _renderCallback: (start: number, end: number) => void,\n private readonly _debounceThresholdMS = RENDER_DEBOUNCE_THRESHOLD_MS\n ) {\n }\n\n public dispose(): void {\n if (this._refreshTimeoutID) {\n clearTimeout(this._refreshTimeoutID);\n }\n }\n\n public refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void {\n this._rowCount = rowCount;\n // Get the min/max row start/end for the arg values\n rowStart = rowStart !== undefined ? rowStart : 0;\n rowEnd = rowEnd !== undefined ? rowEnd : this._rowCount - 1;\n // Set the properties to the updated values\n this._rowStart = this._rowStart !== undefined ? Math.min(this._rowStart, rowStart) : rowStart;\n this._rowEnd = this._rowEnd !== undefined ? Math.max(this._rowEnd, rowEnd) : rowEnd;\n\n // Only refresh if the time since last refresh is above a threshold, otherwise wait for\n // enough time to pass before refreshing again.\n const refreshRequestTime: number = Date.now();\n if (refreshRequestTime - this._lastRefreshMs >= this._debounceThresholdMS) {\n // Enough time has lapsed since the last refresh; refresh immediately\n this._lastRefreshMs = refreshRequestTime;\n this._innerRefresh();\n } else if (!this._additionalRefreshRequested) {\n // This is the first additional request throttled; set up trailing refresh\n const elapsed = refreshRequestTime - this._lastRefreshMs;\n const waitPeriodBeforeTrailingRefresh = this._debounceThresholdMS - elapsed;\n this._additionalRefreshRequested = true;\n\n this._refreshTimeoutID = window.setTimeout(() => {\n this._lastRefreshMs = Date.now();\n this._innerRefresh();\n this._additionalRefreshRequested = false;\n this._refreshTimeoutID = undefined; // No longer need to clear the timeout\n }, waitPeriodBeforeTrailingRefresh);\n }\n }\n\n private _innerRefresh(): void {\n // Make sure values are set\n if (this._rowStart === undefined || this._rowEnd === undefined || this._rowCount === undefined) {\n return;\n }\n\n // Clamp values\n const start = Math.max(this._rowStart, 0);\n const end = Math.min(this._rowEnd, this._rowCount - 1);\n\n // Reset debouncer (this happens before render callback as the render could trigger it again)\n this._rowStart = undefined;\n this._rowEnd = undefined;\n\n // Run render callback\n this._renderCallback(start, end);\n }\n}\n\n","/**\n * Copyright (c) 2016 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { Disposable } from 'common/Lifecycle';\nimport { addDisposableDomListener } from 'browser/Lifecycle';\nimport { IColorSet, IViewport } from 'browser/Types';\nimport { ICharSizeService, IRenderService } from 'browser/services/Services';\nimport { IBufferService, IOptionsService } from 'common/services/Services';\nimport { IBuffer } from 'common/buffer/Types';\nimport { IRenderDimensions } from 'browser/renderer/Types';\n\nconst FALLBACK_SCROLL_BAR_WIDTH = 15;\n\n/**\n * Represents the viewport of a terminal, the visible area within the larger buffer of output.\n * Logic for the virtual scroll bar is included in this object.\n */\nexport class Viewport extends Disposable implements IViewport {\n public scrollBarWidth: number = 0;\n private _currentRowHeight: number = 0;\n private _currentScaledCellHeight: number = 0;\n private _lastRecordedBufferLength: number = 0;\n private _lastRecordedViewportHeight: number = 0;\n private _lastRecordedBufferHeight: number = 0;\n private _lastTouchY: number = 0;\n private _lastScrollTop: number = 0;\n private _lastHadScrollBar: boolean = false;\n private _activeBuffer: IBuffer;\n private _renderDimensions: IRenderDimensions;\n\n // Stores a partial line amount when scrolling, this is used to keep track of how much of a line\n // is scrolled so we can \"scroll\" over partial lines and feel natural on touchpads. This is a\n // quick fix and could have a more robust solution in place that reset the value when needed.\n private _wheelPartialScroll: number = 0;\n\n private _refreshAnimationFrame: number | null = null;\n private _ignoreNextScrollEvent: boolean = false;\n\n constructor(\n private readonly _scrollLines: (amount: number) => void,\n private readonly _viewportElement: HTMLElement,\n private readonly _scrollArea: HTMLElement,\n private readonly _element: HTMLElement,\n @IBufferService private readonly _bufferService: IBufferService,\n @IOptionsService private readonly _optionsService: IOptionsService,\n @ICharSizeService private readonly _charSizeService: ICharSizeService,\n @IRenderService private readonly _renderService: IRenderService\n ) {\n super();\n\n // Measure the width of the scrollbar. If it is 0 we can assume it's an OSX overlay scrollbar.\n // Unfortunately the overlay scrollbar would be hidden underneath the screen element in that case,\n // therefore we account for a standard amount to make it visible\n this.scrollBarWidth = (this._viewportElement.offsetWidth - this._scrollArea.offsetWidth) || FALLBACK_SCROLL_BAR_WIDTH;\n this._lastHadScrollBar = true;\n this.register(addDisposableDomListener(this._viewportElement, 'scroll', this._onScroll.bind(this)));\n\n // Track properties used in performance critical code manually to avoid using slow getters\n this._activeBuffer = this._bufferService.buffer;\n this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer));\n this._renderDimensions = this._renderService.dimensions;\n this.register(this._renderService.onDimensionsChange(e => this._renderDimensions = e));\n\n // Perform this async to ensure the ICharSizeService is ready.\n setTimeout(() => this.syncScrollArea(), 0);\n }\n\n public onThemeChange(colors: IColorSet): void {\n this._viewportElement.style.backgroundColor = colors.background.css;\n }\n\n /**\n * Refreshes row height, setting line-height, viewport height and scroll area height if\n * necessary.\n */\n private _refresh(immediate: boolean): void {\n if (immediate) {\n this._innerRefresh();\n if (this._refreshAnimationFrame !== null) {\n cancelAnimationFrame(this._refreshAnimationFrame);\n }\n return;\n }\n if (this._refreshAnimationFrame === null) {\n this._refreshAnimationFrame = requestAnimationFrame(() => this._innerRefresh());\n }\n }\n\n private _innerRefresh(): void {\n if (this._charSizeService.height > 0) {\n this._currentRowHeight = this._renderService.dimensions.scaledCellHeight / window.devicePixelRatio;\n this._currentScaledCellHeight = this._renderService.dimensions.scaledCellHeight;\n this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;\n const newBufferHeight = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderService.dimensions.canvasHeight);\n if (this._lastRecordedBufferHeight !== newBufferHeight) {\n this._lastRecordedBufferHeight = newBufferHeight;\n this._scrollArea.style.height = this._lastRecordedBufferHeight + 'px';\n }\n }\n\n // Sync scrollTop\n const scrollTop = this._bufferService.buffer.ydisp * this._currentRowHeight;\n if (this._viewportElement.scrollTop !== scrollTop) {\n // Ignore the next scroll event which will be triggered by setting the scrollTop as we do not\n // want this event to scroll the terminal\n this._ignoreNextScrollEvent = true;\n this._viewportElement.scrollTop = scrollTop;\n }\n\n // Update scroll bar width\n if (this._optionsService.rawOptions.scrollback === 0) {\n this.scrollBarWidth = 0;\n } else {\n this.scrollBarWidth = (this._viewportElement.offsetWidth - this._scrollArea.offsetWidth) || FALLBACK_SCROLL_BAR_WIDTH;\n }\n this._lastHadScrollBar = this.scrollBarWidth > 0;\n\n const elementStyle = window.getComputedStyle(this._element);\n const elementPadding = parseInt(elementStyle.paddingLeft) + parseInt(elementStyle.paddingRight);\n this._viewportElement.style.width = (this._renderService.dimensions.actualCellWidth * (this._bufferService.cols) + this.scrollBarWidth + (this._lastHadScrollBar ? elementPadding : 0)).toString() + 'px';\n this._refreshAnimationFrame = null;\n }\n\n /**\n * Updates dimensions and synchronizes the scroll area if necessary.\n */\n public syncScrollArea(immediate: boolean = false): void {\n // If buffer height changed\n if (this._lastRecordedBufferLength !== this._bufferService.buffer.lines.length) {\n this._lastRecordedBufferLength = this._bufferService.buffer.lines.length;\n this._refresh(immediate);\n return;\n }\n\n // If viewport height changed\n if (this._lastRecordedViewportHeight !== this._renderService.dimensions.canvasHeight) {\n this._refresh(immediate);\n return;\n }\n\n // If the buffer position doesn't match last scroll top\n if (this._lastScrollTop !== this._activeBuffer.ydisp * this._currentRowHeight) {\n this._refresh(immediate);\n return;\n }\n\n // If row height changed\n if (this._renderDimensions.scaledCellHeight !== this._currentScaledCellHeight) {\n this._refresh(immediate);\n return;\n }\n\n // If the scroll bar visibility changed\n if (this._lastHadScrollBar !== (this._optionsService.rawOptions.scrollback > 0)) {\n this._refresh(immediate);\n }\n }\n\n /**\n * Handles scroll events on the viewport, calculating the new viewport and requesting the\n * terminal to scroll to it.\n * @param ev The scroll event.\n */\n private _onScroll(ev: Event): void {\n // Record current scroll top position\n this._lastScrollTop = this._viewportElement.scrollTop;\n\n // Don't attempt to scroll if the element is not visible, otherwise scrollTop will be corrupt\n // which causes the terminal to scroll the buffer to the top\n if (!this._viewportElement.offsetParent) {\n return;\n }\n\n // Ignore the event if it was flagged to ignore (when the source of the event is from Viewport)\n if (this._ignoreNextScrollEvent) {\n this._ignoreNextScrollEvent = false;\n // Still trigger the scroll so lines get refreshed\n this._scrollLines(0);\n return;\n }\n\n const newRow = Math.round(this._lastScrollTop / this._currentRowHeight);\n const diff = newRow - this._bufferService.buffer.ydisp;\n this._scrollLines(diff);\n }\n\n /**\n * Handles bubbling of scroll event in case the viewport has reached top or bottom\n * @param ev The scroll event.\n * @param amount The amount scrolled\n */\n private _bubbleScroll(ev: Event, amount: number): boolean {\n const scrollPosFromTop = this._viewportElement.scrollTop + this._lastRecordedViewportHeight;\n if ((amount < 0 && this._viewportElement.scrollTop !== 0) ||\n (amount > 0 && scrollPosFromTop < this._lastRecordedBufferHeight)) {\n if (ev.cancelable) {\n ev.preventDefault();\n }\n return false;\n }\n return true;\n }\n\n /**\n * Handles mouse wheel events by adjusting the viewport's scrollTop and delegating the actual\n * scrolling to `onScroll`, this event needs to be attached manually by the consumer of\n * `Viewport`.\n * @param ev The mouse wheel event.\n */\n public onWheel(ev: WheelEvent): boolean {\n const amount = this._getPixelsScrolled(ev);\n if (amount === 0) {\n return false;\n }\n this._viewportElement.scrollTop += amount;\n return this._bubbleScroll(ev, amount);\n }\n\n private _getPixelsScrolled(ev: WheelEvent): number {\n // Do nothing if it's not a vertical scroll event\n if (ev.deltaY === 0 || ev.shiftKey) {\n return 0;\n }\n\n // Fallback to WheelEvent.DOM_DELTA_PIXEL\n let amount = this._applyScrollModifier(ev.deltaY, ev);\n if (ev.deltaMode === WheelEvent.DOM_DELTA_LINE) {\n amount *= this._currentRowHeight;\n } else if (ev.deltaMode === WheelEvent.DOM_DELTA_PAGE) {\n amount *= this._currentRowHeight * this._bufferService.rows;\n }\n return amount;\n }\n\n /**\n * Gets the number of pixels scrolled by the mouse event taking into account what type of delta\n * is being used.\n * @param ev The mouse wheel event.\n */\n public getLinesScrolled(ev: WheelEvent): number {\n // Do nothing if it's not a vertical scroll event\n if (ev.deltaY === 0 || ev.shiftKey) {\n return 0;\n }\n\n // Fallback to WheelEvent.DOM_DELTA_LINE\n let amount = this._applyScrollModifier(ev.deltaY, ev);\n if (ev.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {\n amount /= this._currentRowHeight + 0.0; // Prevent integer division\n this._wheelPartialScroll += amount;\n amount = Math.floor(Math.abs(this._wheelPartialScroll)) * (this._wheelPartialScroll > 0 ? 1 : -1);\n this._wheelPartialScroll %= 1;\n } else if (ev.deltaMode === WheelEvent.DOM_DELTA_PAGE) {\n amount *= this._bufferService.rows;\n }\n return amount;\n }\n\n private _applyScrollModifier(amount: number, ev: WheelEvent): number {\n const modifier = this._optionsService.rawOptions.fastScrollModifier;\n // Multiply the scroll speed when the modifier is down\n if ((modifier === 'alt' && ev.altKey) ||\n (modifier === 'ctrl' && ev.ctrlKey) ||\n (modifier === 'shift' && ev.shiftKey)) {\n return amount * this._optionsService.rawOptions.fastScrollSensitivity * this._optionsService.rawOptions.scrollSensitivity;\n }\n\n return amount * this._optionsService.rawOptions.scrollSensitivity;\n }\n\n /**\n * Handles the touchstart event, recording the touch occurred.\n * @param ev The touch event.\n */\n public onTouchStart(ev: TouchEvent): void {\n this._lastTouchY = ev.touches[0].pageY;\n }\n\n /**\n * Handles the touchmove event, scrolling the viewport if the position shifted.\n * @param ev The touch event.\n */\n public onTouchMove(ev: TouchEvent): boolean {\n const deltaY = this._lastTouchY - ev.touches[0].pageY;\n this._lastTouchY = ev.touches[0].pageY;\n if (deltaY === 0) {\n return false;\n }\n this._viewportElement.scrollTop += deltaY;\n return this._bubbleScroll(ev, deltaY);\n }\n}\n","/**\n * Copyright (c) 2016 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderService } from 'browser/services/Services';\nimport { IBufferService, ICoreService, IOptionsService } from 'common/services/Services';\n\ninterface IPosition {\n start: number;\n end: number;\n}\n\n/**\n * Encapsulates the logic for handling compositionstart, compositionupdate and compositionend\n * events, displaying the in-progress composition to the UI and forwarding the final composition\n * to the handler.\n */\nexport class CompositionHelper {\n /**\n * Whether input composition is currently happening, eg. via a mobile keyboard, speech input or\n * IME. This variable determines whether the compositionText should be displayed on the UI.\n */\n private _isComposing: boolean;\n public get isComposing(): boolean { return this._isComposing; }\n\n /**\n * The position within the input textarea's value of the current composition.\n */\n private _compositionPosition: IPosition;\n\n /**\n * Whether a composition is in the process of being sent, setting this to false will cancel any\n * in-progress composition.\n */\n private _isSendingComposition: boolean;\n\n /**\n * Data already sent due to keydown event.\n */\n private _dataAlreadySent: string;\n\n constructor(\n private readonly _textarea: HTMLTextAreaElement,\n private readonly _compositionView: HTMLElement,\n @IBufferService private readonly _bufferService: IBufferService,\n @IOptionsService private readonly _optionsService: IOptionsService,\n @ICoreService private readonly _coreService: ICoreService,\n @IRenderService private readonly _renderService: IRenderService\n ) {\n this._isComposing = false;\n this._isSendingComposition = false;\n this._compositionPosition = { start: 0, end: 0 };\n this._dataAlreadySent = '';\n }\n\n /**\n * Handles the compositionstart event, activating the composition view.\n */\n public compositionstart(): void {\n this._isComposing = true;\n this._compositionPosition.start = this._textarea.value.length;\n this._compositionView.textContent = '';\n this._dataAlreadySent = '';\n this._compositionView.classList.add('active');\n }\n\n /**\n * Handles the compositionupdate event, updating the composition view.\n * @param ev The event.\n */\n public compositionupdate(ev: Pick<CompositionEvent, 'data'>): void {\n this._compositionView.textContent = ev.data;\n this.updateCompositionElements();\n setTimeout(() => {\n this._compositionPosition.end = this._textarea.value.length;\n }, 0);\n }\n\n /**\n * Handles the compositionend event, hiding the composition view and sending the composition to\n * the handler.\n */\n public compositionend(): void {\n this._finalizeComposition(true);\n }\n\n /**\n * Handles the keydown event, routing any necessary events to the CompositionHelper functions.\n * @param ev The keydown event.\n * @return Whether the Terminal should continue processing the keydown event.\n */\n public keydown(ev: KeyboardEvent): boolean {\n if (this._isComposing || this._isSendingComposition) {\n if (ev.keyCode === 229) {\n // Continue composing if the keyCode is the \"composition character\"\n return false;\n }\n if (ev.keyCode === 16 || ev.keyCode === 17 || ev.keyCode === 18) {\n // Continue composing if the keyCode is a modifier key\n return false;\n }\n // Finish composition immediately. This is mainly here for the case where enter is\n // pressed and the handler needs to be triggered before the command is executed.\n this._finalizeComposition(false);\n }\n\n if (ev.keyCode === 229) {\n // If the \"composition character\" is used but gets to this point it means a non-composition\n // character (eg. numbers and punctuation) was pressed when the IME was active.\n this._handleAnyTextareaChanges();\n return false;\n }\n\n return true;\n }\n\n /**\n * Finalizes the composition, resuming regular input actions. This is called when a composition\n * is ending.\n * @param waitForPropagation Whether to wait for events to propagate before sending\n * the input. This should be false if a non-composition keystroke is entered before the\n * compositionend event is triggered, such as enter, so that the composition is sent before\n * the command is executed.\n */\n private _finalizeComposition(waitForPropagation: boolean): void {\n this._compositionView.classList.remove('active');\n this._isComposing = false;\n\n if (!waitForPropagation) {\n // Cancel any delayed composition send requests and send the input immediately.\n this._isSendingComposition = false;\n const input = this._textarea.value.substring(this._compositionPosition.start, this._compositionPosition.end);\n this._coreService.triggerDataEvent(input, true);\n } else {\n // Make a deep copy of the composition position here as a new compositionstart event may\n // fire before the setTimeout executes.\n const currentCompositionPosition = {\n start: this._compositionPosition.start,\n end: this._compositionPosition.end\n };\n\n // Since composition* events happen before the changes take place in the textarea on most\n // browsers, use a setTimeout with 0ms time to allow the native compositionend event to\n // complete. This ensures the correct character is retrieved.\n // This solution was used because:\n // - The compositionend event's data property is unreliable, at least on Chromium\n // - The last compositionupdate event's data property does not always accurately describe\n // the character, a counter example being Korean where an ending consonsant can move to\n // the following character if the following input is a vowel.\n this._isSendingComposition = true;\n setTimeout(() => {\n // Ensure that the input has not already been sent\n if (this._isSendingComposition) {\n this._isSendingComposition = false;\n let input;\n // Add length of data already sent due to keydown event,\n // otherwise input characters can be duplicated. (Issue #3191)\n currentCompositionPosition.start += this._dataAlreadySent.length;\n if (this._isComposing) {\n // Use the end position to get the string if a new composition has started.\n input = this._textarea.value.substring(currentCompositionPosition.start, currentCompositionPosition.end);\n } else {\n // Don't use the end position here in order to pick up any characters after the\n // composition has finished, for example when typing a non-composition character\n // (eg. 2) after a composition character.\n input = this._textarea.value.substring(currentCompositionPosition.start);\n }\n if (input.length > 0) {\n this._coreService.triggerDataEvent(input, true);\n }\n }\n }, 0);\n }\n }\n\n /**\n * Apply any changes made to the textarea after the current event chain is allowed to complete.\n * This should be called when not currently composing but a keydown event with the \"composition\n * character\" (229) is triggered, in order to allow non-composition text to be entered when an\n * IME is active.\n */\n private _handleAnyTextareaChanges(): void {\n const oldValue = this._textarea.value;\n setTimeout(() => {\n // Ignore if a composition has started since the timeout\n if (!this._isComposing) {\n const newValue = this._textarea.value;\n const diff = newValue.replace(oldValue, '');\n if (diff.length > 0) {\n this._dataAlreadySent = diff;\n this._coreService.triggerDataEvent(diff, true);\n }\n }\n }, 0);\n }\n\n /**\n * Positions the composition view on top of the cursor and the textarea just below it (so the\n * IME helper dialog is positioned correctly).\n * @param dontRecurse Whether to use setTimeout to recursively trigger another update, this is\n * necessary as the IME events across browsers are not consistently triggered.\n */\n public updateCompositionElements(dontRecurse?: boolean): void {\n if (!this._isComposing) {\n return;\n }\n\n if (this._bufferService.buffer.isCursorInViewport) {\n const cursorX = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);\n\n const cellHeight = this._renderService.dimensions.actualCellHeight;\n const cursorTop = this._bufferService.buffer.y * this._renderService.dimensions.actualCellHeight;\n const cursorLeft = cursorX * this._renderService.dimensions.actualCellWidth;\n\n this._compositionView.style.left = cursorLeft + 'px';\n this._compositionView.style.top = cursorTop + 'px';\n this._compositionView.style.height = cellHeight + 'px';\n this._compositionView.style.lineHeight = cellHeight + 'px';\n this._compositionView.style.fontFamily = this._optionsService.rawOptions.fontFamily;\n this._compositionView.style.fontSize = this._optionsService.rawOptions.fontSize + 'px';\n // Sync the textarea to the exact position of the composition view so the IME knows where the\n // text is.\n const compositionViewBounds = this._compositionView.getBoundingClientRect();\n this._textarea.style.left = cursorLeft + 'px';\n this._textarea.style.top = cursorTop + 'px';\n // Ensure the text area is at least 1x1, otherwise certain IMEs may break\n this._textarea.style.width = Math.max(compositionViewBounds.width, 1) + 'px';\n this._textarea.style.height = Math.max(compositionViewBounds.height, 1) + 'px';\n this._textarea.style.lineHeight = compositionViewBounds.height + 'px';\n }\n\n if (!dontRecurse) {\n setTimeout(() => this.updateCompositionElements(true), 0);\n }\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nexport function getCoordsRelativeToElement(event: {clientX: number, clientY: number}, element: HTMLElement): [number, number] {\n const rect = element.getBoundingClientRect();\n return [event.clientX - rect.left, event.clientY - rect.top];\n}\n\n/**\n * Gets coordinates within the terminal for a particular mouse event. The result\n * is returned as an array in the form [x, y] instead of an object as it's a\n * little faster and this function is used in some low level code.\n * @param event The mouse event.\n * @param element The terminal's container element.\n * @param colCount The number of columns in the terminal.\n * @param rowCount The number of rows n the terminal.\n * @param isSelection Whether the request is for the selection or not. This will\n * apply an offset to the x value such that the left half of the cell will\n * select that cell and the right half will select the next cell.\n */\nexport function getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, hasValidCharSize: boolean, actualCellWidth: number, actualCellHeight: number, isSelection?: boolean): [number, number] | undefined {\n // Coordinates cannot be measured if there are no valid\n if (!hasValidCharSize) {\n return undefined;\n }\n\n const coords = getCoordsRelativeToElement(event, element);\n if (!coords) {\n return undefined;\n }\n\n coords[0] = Math.ceil((coords[0] + (isSelection ? actualCellWidth / 2 : 0)) / actualCellWidth);\n coords[1] = Math.ceil(coords[1] / actualCellHeight);\n\n // Ensure coordinates are within the terminal viewport. Note that selections\n // need an addition point of precision to cover the end point (as characters\n // cover half of one char and half of the next).\n coords[0] = Math.min(Math.max(coords[0], 1), colCount + (isSelection ? 1 : 0));\n coords[1] = Math.min(Math.max(coords[1], 1), rowCount);\n\n return coords;\n}\n\n/**\n * Gets coordinates within the terminal for a particular mouse event, wrapping\n * them to the bounds of the terminal and adding 32 to both the x and y values\n * as expected by xterm.\n */\nexport function getRawByteCoords(coords: [number, number] | undefined): { x: number, y: number } | undefined {\n if (!coords) {\n return undefined;\n }\n\n // xterm sends raw bytes and starts at 32 (SP) for each.\n return { x: coords[0] + 32, y: coords[1] + 32 };\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { C0 } from 'common/data/EscapeSequences';\nimport { IBufferService } from 'common/services/Services';\n\nconst enum Direction {\n UP = 'A',\n DOWN = 'B',\n RIGHT = 'C',\n LEFT = 'D'\n}\n\n/**\n * Concatenates all the arrow sequences together.\n * Resets the starting row to an unwrapped row, moves to the requested row,\n * then moves to requested col.\n */\nexport function moveToCellSequence(targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {\n const startX = bufferService.buffer.x;\n const startY = bufferService.buffer.y;\n\n // The alt buffer should try to navigate between rows\n if (!bufferService.buffer.hasScrollback) {\n return resetStartingRow(startX, startY, targetX, targetY, bufferService, applicationCursor) +\n moveToRequestedRow(startY, targetY, bufferService, applicationCursor) +\n moveToRequestedCol(startX, startY, targetX, targetY, bufferService, applicationCursor);\n }\n\n // Only move horizontally for the normal buffer\n let direction;\n if (startY === targetY) {\n direction = startX > targetX ? Direction.LEFT : Direction.RIGHT;\n return repeat(Math.abs(startX - targetX), sequence(direction, applicationCursor));\n }\n direction = startY > targetY ? Direction.LEFT : Direction.RIGHT;\n const rowDifference = Math.abs(startY - targetY);\n const cellsToMove = colsFromRowEnd(startY > targetY ? targetX : startX, bufferService) +\n (rowDifference - 1) * bufferService.cols + 1 /* wrap around 1 row */ +\n colsFromRowBeginning(startY > targetY ? startX : targetX, bufferService);\n return repeat(cellsToMove, sequence(direction, applicationCursor));\n}\n\n/**\n * Find the number of cols from a row beginning to a col.\n */\nfunction colsFromRowBeginning(currX: number, bufferService: IBufferService): number {\n return currX - 1;\n}\n\n/**\n * Find the number of cols from a col to row end.\n */\nfunction colsFromRowEnd(currX: number, bufferService: IBufferService): number {\n return bufferService.cols - currX;\n}\n\n/**\n * If the initial position of the cursor is on a row that is wrapped, move the\n * cursor up to the first row that is not wrapped to have accurate vertical\n * positioning.\n */\nfunction resetStartingRow(startX: number, startY: number, targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {\n if (moveToRequestedRow(startY, targetY, bufferService, applicationCursor).length === 0) {\n return '';\n }\n return repeat(bufferLine(\n startX, startY, startX,\n startY - wrappedRowsForRow(bufferService, startY), false, bufferService\n ).length, sequence(Direction.LEFT, applicationCursor));\n}\n\n/**\n * Using the reset starting and ending row, move to the requested row,\n * ignoring wrapped rows\n */\nfunction moveToRequestedRow(startY: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {\n const startRow = startY - wrappedRowsForRow(bufferService, startY);\n const endRow = targetY - wrappedRowsForRow(bufferService, targetY);\n\n const rowsToMove = Math.abs(startRow - endRow) - wrappedRowsCount(startY, targetY, bufferService);\n\n return repeat(rowsToMove, sequence(verticalDirection(startY, targetY), applicationCursor));\n}\n\n/**\n * Move to the requested col on the ending row\n */\nfunction moveToRequestedCol(startX: number, startY: number, targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {\n let startRow;\n if (moveToRequestedRow(startY, targetY, bufferService, applicationCursor).length > 0) {\n startRow = targetY - wrappedRowsForRow(bufferService, targetY);\n } else {\n startRow = startY;\n }\n\n const endRow = targetY;\n const direction = horizontalDirection(startX, startY, targetX, targetY, bufferService, applicationCursor);\n\n return repeat(bufferLine(\n startX, startRow, targetX, endRow,\n direction === Direction.RIGHT, bufferService\n ).length, sequence(direction, applicationCursor));\n}\n\n/**\n * Utility functions\n */\n\n/**\n * Calculates the number of wrapped rows between the unwrapped starting and\n * ending rows. These rows need to ignored since the cursor skips over them.\n */\nfunction wrappedRowsCount(startY: number, targetY: number, bufferService: IBufferService): number {\n let wrappedRows = 0;\n const startRow = startY - wrappedRowsForRow(bufferService, startY);\n const endRow = targetY - wrappedRowsForRow(bufferService, targetY);\n\n for (let i = 0; i < Math.abs(startRow - endRow); i++) {\n const direction = verticalDirection(startY, targetY) === Direction.UP ? -1 : 1;\n const line = bufferService.buffer.lines.get(startRow + (direction * i));\n if (line?.isWrapped) {\n wrappedRows++;\n }\n }\n\n return wrappedRows;\n}\n\n/**\n * Calculates the number of wrapped rows that make up a given row.\n * @param currentRow The row to determine how many wrapped rows make it up\n */\nfunction wrappedRowsForRow(bufferService: IBufferService, currentRow: number): number {\n let rowCount = 0;\n let line = bufferService.buffer.lines.get(currentRow);\n let lineWraps = line?.isWrapped;\n\n while (lineWraps && currentRow >= 0 && currentRow < bufferService.rows) {\n rowCount++;\n line = bufferService.buffer.lines.get(--currentRow);\n lineWraps = line?.isWrapped;\n }\n\n return rowCount;\n}\n\n/**\n * Direction determiners\n */\n\n/**\n * Determines if the right or left arrow is needed\n */\nfunction horizontalDirection(startX: number, startY: number, targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): Direction {\n let startRow;\n if (moveToRequestedRow(targetX, targetY, bufferService, applicationCursor).length > 0) {\n startRow = targetY - wrappedRowsForRow(bufferService, targetY);\n } else {\n startRow = startY;\n }\n\n if ((startX < targetX &&\n startRow <= targetY) || // down/right or same y/right\n (startX >= targetX &&\n startRow < targetY)) { // down/left or same y/left\n return Direction.RIGHT;\n }\n return Direction.LEFT;\n}\n\n/**\n * Determines if the up or down arrow is needed\n */\nfunction verticalDirection(startY: number, targetY: number): Direction {\n return startY > targetY ? Direction.UP : Direction.DOWN;\n}\n\n/**\n * Constructs the string of chars in the buffer from a starting row and col\n * to an ending row and col\n * @param startCol The starting column position\n * @param startRow The starting row position\n * @param endCol The ending column position\n * @param endRow The ending row position\n * @param forward Direction to move\n */\nfunction bufferLine(\n startCol: number,\n startRow: number,\n endCol: number,\n endRow: number,\n forward: boolean,\n bufferService: IBufferService\n): string {\n let currentCol = startCol;\n let currentRow = startRow;\n let bufferStr = '';\n\n while (currentCol !== endCol || currentRow !== endRow) {\n currentCol += forward ? 1 : -1;\n\n if (forward && currentCol > bufferService.cols - 1) {\n bufferStr += bufferService.buffer.translateBufferLineToString(\n currentRow, false, startCol, currentCol\n );\n currentCol = 0;\n startCol = 0;\n currentRow++;\n } else if (!forward && currentCol < 0) {\n bufferStr += bufferService.buffer.translateBufferLineToString(\n currentRow, false, 0, startCol + 1\n );\n currentCol = bufferService.cols - 1;\n startCol = currentCol;\n currentRow--;\n }\n }\n\n return bufferStr + bufferService.buffer.translateBufferLineToString(\n currentRow, false, startCol, currentCol\n );\n}\n\n/**\n * Constructs the escape sequence for clicking an arrow\n * @param direction The direction to move\n */\nfunction sequence(direction: Direction, applicationCursor: boolean): string {\n const mod = applicationCursor ? 'O' : '[';\n return C0.ESC + mod + direction;\n}\n\n/**\n * Returns a string repeated a given number of times\n * Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\n * @param count The number of times to repeat the string\n * @param string The string that is to be repeated\n */\nfunction repeat(count: number, str: string): string {\n count = Math.floor(count);\n let rpt = '';\n for (let i = 0; i < count; i++) {\n rpt += str;\n }\n return rpt;\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { Terminal as ITerminalApi, IMarker, IDisposable, ILinkMatcherOptions, ITheme, ILocalizableStrings, ITerminalAddon, ISelectionPosition, IBufferNamespace as IBufferNamespaceApi, IParser, ILinkProvider, IUnicodeHandling, FontWeight, IModes, IDecorationOptions, IDecoration } from 'xterm';\nimport { ITerminal } from 'browser/Types';\nimport { Terminal as TerminalCore } from 'browser/Terminal';\nimport * as Strings from 'browser/LocalizableStrings';\nimport { IEvent } from 'common/EventEmitter';\nimport { ParserApi } from 'common/public/ParserApi';\nimport { UnicodeApi } from 'common/public/UnicodeApi';\nimport { AddonManager } from 'common/public/AddonManager';\nimport { BufferNamespaceApi } from 'common/public/BufferNamespaceApi';\nimport { ITerminalOptions } from 'common/Types';\n\n/**\n * The set of options that only have an effect when set in the Terminal constructor.\n */\nconst CONSTRUCTOR_ONLY_OPTIONS = ['cols', 'rows'];\n\nexport class Terminal implements ITerminalApi {\n private _core: ITerminal;\n private _addonManager: AddonManager;\n private _parser: IParser | undefined;\n private _buffer: BufferNamespaceApi | undefined;\n private _publicOptions: ITerminalOptions;\n\n constructor(options?: ITerminalOptions) {\n this._core = new TerminalCore(options);\n this._addonManager = new AddonManager();\n\n this._publicOptions = { ... this._core.options };\n const getter = (propName: string): any => {\n return this._core.options[propName];\n };\n const setter = (propName: string, value: any): void => {\n this._checkReadonlyOptions(propName);\n this._core.options[propName] = value;\n };\n\n for (const propName in this._core.options) {\n const desc = {\n get: getter.bind(this, propName),\n set: setter.bind(this, propName)\n };\n Object.defineProperty(this._publicOptions, propName, desc);\n }\n }\n\n private _checkReadonlyOptions(propName: string): void {\n // Throw an error if any constructor only option is modified\n // from terminal.options\n // Modifications from anywhere else are allowed\n if (CONSTRUCTOR_ONLY_OPTIONS.includes(propName)) {\n throw new Error(`Option \"${propName}\" can only be set in the constructor`);\n }\n }\n\n private _checkProposedApi(): void {\n if (!this._core.optionsService.rawOptions.allowProposedApi) {\n throw new Error('You must set the allowProposedApi option to true to use proposed API');\n }\n }\n\n public get onBell(): IEvent<void> { return this._core.onBell; }\n public get onBinary(): IEvent<string> { return this._core.onBinary; }\n public get onCursorMove(): IEvent<void> { return this._core.onCursorMove; }\n public get onData(): IEvent<string> { return this._core.onData; }\n public get onKey(): IEvent<{ key: string, domEvent: KeyboardEvent }> { return this._core.onKey; }\n public get onLineFeed(): IEvent<void> { return this._core.onLineFeed; }\n public get onRender(): IEvent<{ start: number, end: number }> { return this._core.onRender; }\n public get onResize(): IEvent<{ cols: number, rows: number }> { return this._core.onResize; }\n public get onScroll(): IEvent<number> { return this._core.onScroll; }\n public get onSelectionChange(): IEvent<void> { return this._core.onSelectionChange; }\n public get onTitleChange(): IEvent<string> { return this._core.onTitleChange; }\n\n public get element(): HTMLElement | undefined { return this._core.element; }\n public get parser(): IParser {\n this._checkProposedApi();\n if (!this._parser) {\n this._parser = new ParserApi(this._core);\n }\n return this._parser;\n }\n public get unicode(): IUnicodeHandling {\n this._checkProposedApi();\n return new UnicodeApi(this._core);\n }\n public get textarea(): HTMLTextAreaElement | undefined { return this._core.textarea; }\n public get rows(): number { return this._core.rows; }\n public get cols(): number { return this._core.cols; }\n public get buffer(): IBufferNamespaceApi {\n this._checkProposedApi();\n if (!this._buffer) {\n this._buffer = new BufferNamespaceApi(this._core);\n }\n return this._buffer;\n }\n public get markers(): ReadonlyArray<IMarker> {\n this._checkProposedApi();\n return this._core.markers;\n }\n public get modes(): IModes {\n const m = this._core.coreService.decPrivateModes;\n let mouseTrackingMode: 'none' | 'x10' | 'vt200' | 'drag' | 'any' = 'none';\n switch (this._core.coreMouseService.activeProtocol) {\n case 'X10': mouseTrackingMode = 'x10'; break;\n case 'VT200': mouseTrackingMode = 'vt200'; break;\n case 'DRAG': mouseTrackingMode = 'drag'; break;\n case 'ANY': mouseTrackingMode = 'any'; break;\n }\n return {\n applicationCursorKeysMode: m.applicationCursorKeys,\n applicationKeypadMode: m.applicationKeypad,\n bracketedPasteMode: m.bracketedPasteMode,\n insertMode: this._core.coreService.modes.insertMode,\n mouseTrackingMode: mouseTrackingMode,\n originMode: m.origin,\n reverseWraparoundMode: m.reverseWraparound,\n sendFocusMode: m.sendFocus,\n wraparoundMode: m.wraparound\n };\n }\n public get options(): ITerminalOptions {\n return this._publicOptions;\n }\n public set options(options: ITerminalOptions) {\n for (const propName in options) {\n this._publicOptions[propName] = options[propName];\n }\n }\n public blur(): void {\n this._core.blur();\n }\n public focus(): void {\n this._core.focus();\n }\n public resize(columns: number, rows: number): void {\n this._verifyIntegers(columns, rows);\n this._core.resize(columns, rows);\n }\n public open(parent: HTMLElement): void {\n this._core.open(parent);\n }\n public attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void {\n this._core.attachCustomKeyEventHandler(customKeyEventHandler);\n }\n public registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => void, options?: ILinkMatcherOptions): number {\n this._checkProposedApi();\n return this._core.registerLinkMatcher(regex, handler, options);\n }\n public deregisterLinkMatcher(matcherId: number): void {\n this._checkProposedApi();\n this._core.deregisterLinkMatcher(matcherId);\n }\n public registerLinkProvider(linkProvider: ILinkProvider): IDisposable {\n this._checkProposedApi();\n return this._core.registerLinkProvider(linkProvider);\n }\n public registerCharacterJoiner(handler: (text: string) => [number, number][]): number {\n this._checkProposedApi();\n return this._core.registerCharacterJoiner(handler);\n }\n public deregisterCharacterJoiner(joinerId: number): void {\n this._checkProposedApi();\n this._core.deregisterCharacterJoiner(joinerId);\n }\n public registerMarker(cursorYOffset: number = 0): IMarker | undefined {\n this._checkProposedApi();\n this._verifyIntegers(cursorYOffset);\n return this._core.addMarker(cursorYOffset);\n }\n public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {\n this._checkProposedApi();\n this._verifyPositiveIntegers(decorationOptions.x ?? 0, decorationOptions.width ?? 0, decorationOptions.height ?? 0);\n return this._core.registerDecoration(decorationOptions);\n }\n public addMarker(cursorYOffset: number): IMarker | undefined {\n return this.registerMarker(cursorYOffset);\n }\n public hasSelection(): boolean {\n return this._core.hasSelection();\n }\n public select(column: number, row: number, length: number): void {\n this._verifyIntegers(column, row, length);\n this._core.select(column, row, length);\n }\n public getSelection(): string {\n return this._core.getSelection();\n }\n public getSelectionPosition(): ISelectionPosition | undefined {\n return this._core.getSelectionPosition();\n }\n public clearSelection(): void {\n this._core.clearSelection();\n }\n public selectAll(): void {\n this._core.selectAll();\n }\n public selectLines(start: number, end: number): void {\n this._verifyIntegers(start, end);\n this._core.selectLines(start, end);\n }\n public dispose(): void {\n this._addonManager.dispose();\n this._core.dispose();\n }\n public scrollLines(amount: number): void {\n this._verifyIntegers(amount);\n this._core.scrollLines(amount);\n }\n public scrollPages(pageCount: number): void {\n this._verifyIntegers(pageCount);\n this._core.scrollPages(pageCount);\n }\n public scrollToTop(): void {\n this._core.scrollToTop();\n }\n public scrollToBottom(): void {\n this._core.scrollToBottom();\n }\n public scrollToLine(line: number): void {\n this._verifyIntegers(line);\n this._core.scrollToLine(line);\n }\n public clear(): void {\n this._core.clear();\n }\n public write(data: string | Uint8Array, callback?: () => void): void {\n this._core.write(data, callback);\n }\n public writeUtf8(data: Uint8Array, callback?: () => void): void {\n this._core.write(data, callback);\n }\n public writeln(data: string | Uint8Array, callback?: () => void): void {\n this._core.write(data);\n this._core.write('\\r\\n', callback);\n }\n public paste(data: string): void {\n this._core.paste(data);\n }\n public getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string;\n public getOption(key: 'allowTransparency' | 'altClickMovesCursor' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'visualBell'): boolean;\n public getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number;\n public getOption(key: 'fontWeight' | 'fontWeightBold'): FontWeight;\n public getOption(key: string): any;\n public getOption(key: any): any {\n return this._core.optionsService.getOption(key);\n }\n public setOption(key: 'bellSound' | 'fontFamily' | 'termName' | 'wordSeparator', value: string): void;\n public setOption(key: 'fontWeight' | 'fontWeightBold', value: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | number): void;\n public setOption(key: 'logLevel', value: 'debug' | 'info' | 'warn' | 'error' | 'off'): void;\n public setOption(key: 'bellStyle', value: 'none' | 'visual' | 'sound' | 'both'): void;\n public setOption(key: 'cursorStyle', value: 'block' | 'underline' | 'bar'): void;\n public setOption(key: 'allowTransparency' | 'altClickMovesCursor' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'visualBell', value: boolean): void;\n public setOption(key: 'fontSize' | 'letterSpacing' | 'lineHeight' | 'tabStopWidth' | 'scrollback', value: number): void;\n public setOption(key: 'theme', value: ITheme): void;\n public setOption(key: 'cols' | 'rows', value: number): void;\n public setOption(key: string, value: any): void;\n public setOption(key: any, value: any): void {\n this._checkReadonlyOptions(key);\n this._core.optionsService.setOption(key, value);\n }\n public refresh(start: number, end: number): void {\n this._verifyIntegers(start, end);\n this._core.refresh(start, end);\n }\n public reset(): void {\n this._core.reset();\n }\n public clearTextureAtlas(): void {\n this._core.clearTextureAtlas();\n }\n public loadAddon(addon: ITerminalAddon): void {\n return this._addonManager.loadAddon(this, addon);\n }\n public static get strings(): ILocalizableStrings {\n return Strings;\n }\n\n private _verifyIntegers(...values: number[]): void {\n for (const value of values) {\n if (value === Infinity || isNaN(value) || value % 1 !== 0) {\n throw new Error('This API only accepts integers');\n }\n }\n }\n\n private _verifyPositiveIntegers(...values: number[]): void {\n for (const value of values) {\n if (value && (value === Infinity || isNaN(value) || value % 1 !== 0 || value < 0)) {\n throw new Error('This API only accepts positive integers');\n }\n }\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderDimensions, IRenderLayer } from 'browser/renderer/Types';\nimport { ICellData } from 'common/Types';\nimport { DEFAULT_COLOR, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_CODE, Attributes } from 'common/buffer/Constants';\nimport { IGlyphIdentifier } from 'browser/renderer/atlas/Types';\nimport { DIM_OPACITY, INVERTED_DEFAULT_COLOR, TEXT_BASELINE } from 'browser/renderer/atlas/Constants';\nimport { BaseCharAtlas } from 'browser/renderer/atlas/BaseCharAtlas';\nimport { acquireCharAtlas } from 'browser/renderer/atlas/CharAtlasCache';\nimport { AttributeData } from 'common/buffer/AttributeData';\nimport { IColorSet, IColor } from 'browser/Types';\nimport { CellData } from 'common/buffer/CellData';\nimport { IBufferService, IOptionsService } from 'common/services/Services';\nimport { throwIfFalsy } from 'browser/renderer/RendererUtils';\nimport { channels, color, rgba } from 'browser/Color';\nimport { removeElementFromParent } from 'browser/Dom';\nimport { tryDrawCustomChar } from 'browser/renderer/CustomGlyphs';\n\nexport abstract class BaseRenderLayer implements IRenderLayer {\n private _canvas: HTMLCanvasElement;\n protected _ctx!: CanvasRenderingContext2D;\n private _scaledCharWidth: number = 0;\n private _scaledCharHeight: number = 0;\n private _scaledCellWidth: number = 0;\n private _scaledCellHeight: number = 0;\n private _scaledCharLeft: number = 0;\n private _scaledCharTop: number = 0;\n\n protected _charAtlas: BaseCharAtlas | undefined;\n\n /**\n * An object that's reused when drawing glyphs in order to reduce GC.\n */\n private _currentGlyphIdentifier: IGlyphIdentifier = {\n chars: '',\n code: 0,\n bg: 0,\n fg: 0,\n bold: false,\n dim: false,\n italic: false\n };\n\n constructor(\n private _container: HTMLElement,\n id: string,\n zIndex: number,\n private _alpha: boolean,\n protected _colors: IColorSet,\n private _rendererId: number,\n protected readonly _bufferService: IBufferService,\n protected readonly _optionsService: IOptionsService\n ) {\n this._canvas = document.createElement('canvas');\n this._canvas.classList.add(`xterm-${id}-layer`);\n this._canvas.style.zIndex = zIndex.toString();\n this._initCanvas();\n this._container.appendChild(this._canvas);\n }\n\n public dispose(): void {\n removeElementFromParent(this._canvas);\n this._charAtlas?.dispose();\n }\n\n private _initCanvas(): void {\n this._ctx = throwIfFalsy(this._canvas.getContext('2d', { alpha: this._alpha }));\n // Draw the background if this is an opaque layer\n if (!this._alpha) {\n this._clearAll();\n }\n }\n\n public onOptionsChanged(): void {}\n public onBlur(): void {}\n public onFocus(): void {}\n public onCursorMove(): void {}\n public onGridChanged(startRow: number, endRow: number): void {}\n public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean = false): void {}\n\n public setColors(colorSet: IColorSet): void {\n this._refreshCharAtlas(colorSet);\n }\n\n protected _setTransparency(alpha: boolean): void {\n // Do nothing when alpha doesn't change\n if (alpha === this._alpha) {\n return;\n }\n\n // Create new canvas and replace old one\n const oldCanvas = this._canvas;\n this._alpha = alpha;\n // Cloning preserves properties\n this._canvas = this._canvas.cloneNode() as HTMLCanvasElement;\n this._initCanvas();\n this._container.replaceChild(this._canvas, oldCanvas);\n\n // Regenerate char atlas and force a full redraw\n this._refreshCharAtlas(this._colors);\n this.onGridChanged(0, this._bufferService.rows - 1);\n }\n\n /**\n * Refreshes the char atlas, aquiring a new one if necessary.\n * @param colorSet The color set to use for the char atlas.\n */\n private _refreshCharAtlas(colorSet: IColorSet): void {\n if (this._scaledCharWidth <= 0 && this._scaledCharHeight <= 0) {\n return;\n }\n this._charAtlas = acquireCharAtlas(this._optionsService.rawOptions, this._rendererId, colorSet, this._scaledCharWidth, this._scaledCharHeight);\n this._charAtlas.warmUp();\n }\n\n public resize(dim: IRenderDimensions): void {\n this._scaledCellWidth = dim.scaledCellWidth;\n this._scaledCellHeight = dim.scaledCellHeight;\n this._scaledCharWidth = dim.scaledCharWidth;\n this._scaledCharHeight = dim.scaledCharHeight;\n this._scaledCharLeft = dim.scaledCharLeft;\n this._scaledCharTop = dim.scaledCharTop;\n this._canvas.width = dim.scaledCanvasWidth;\n this._canvas.height = dim.scaledCanvasHeight;\n this._canvas.style.width = `${dim.canvasWidth}px`;\n this._canvas.style.height = `${dim.canvasHeight}px`;\n\n // Draw the background if this is an opaque layer\n if (!this._alpha) {\n this._clearAll();\n }\n\n this._refreshCharAtlas(this._colors);\n }\n\n public abstract reset(): void;\n\n public clearTextureAtlas(): void {\n this._charAtlas?.clear();\n }\n\n /**\n * Fills 1+ cells completely. This uses the existing fillStyle on the context.\n * @param x The column to start at.\n * @param y The row to start at\n * @param width The number of columns to fill.\n * @param height The number of rows to fill.\n */\n protected _fillCells(x: number, y: number, width: number, height: number): void {\n this._ctx.fillRect(\n x * this._scaledCellWidth,\n y * this._scaledCellHeight,\n width * this._scaledCellWidth,\n height * this._scaledCellHeight);\n }\n\n /**\n * Fills a 1px line (2px on HDPI) at the middle of the cell. This uses the\n * existing fillStyle on the context.\n * @param x The column to fill.\n * @param y The row to fill.\n */\n protected _fillMiddleLineAtCells(x: number, y: number, width: number = 1): void {\n const cellOffset = Math.ceil(this._scaledCellHeight * 0.5);\n this._ctx.fillRect(\n x * this._scaledCellWidth,\n (y + 1) * this._scaledCellHeight - cellOffset - window.devicePixelRatio,\n width * this._scaledCellWidth,\n window.devicePixelRatio);\n }\n\n /**\n * Fills a 1px line (2px on HDPI) at the bottom of the cell. This uses the\n * existing fillStyle on the context.\n * @param x The column to fill.\n * @param y The row to fill.\n */\n protected _fillBottomLineAtCells(x: number, y: number, width: number = 1): void {\n this._ctx.fillRect(\n x * this._scaledCellWidth,\n (y + 1) * this._scaledCellHeight - window.devicePixelRatio - 1 /* Ensure it's drawn within the cell */,\n width * this._scaledCellWidth,\n window.devicePixelRatio);\n }\n\n /**\n * Fills a 1px line (2px on HDPI) at the left of the cell. This uses the\n * existing fillStyle on the context.\n * @param x The column to fill.\n * @param y The row to fill.\n */\n protected _fillLeftLineAtCell(x: number, y: number, width: number): void {\n this._ctx.fillRect(\n x * this._scaledCellWidth,\n y * this._scaledCellHeight,\n window.devicePixelRatio * width,\n this._scaledCellHeight);\n }\n\n /**\n * Strokes a 1px rectangle (2px on HDPI) around a cell. This uses the existing\n * strokeStyle on the context.\n * @param x The column to fill.\n * @param y The row to fill.\n */\n protected _strokeRectAtCell(x: number, y: number, width: number, height: number): void {\n this._ctx.lineWidth = window.devicePixelRatio;\n this._ctx.strokeRect(\n x * this._scaledCellWidth + window.devicePixelRatio / 2,\n y * this._scaledCellHeight + (window.devicePixelRatio / 2),\n width * this._scaledCellWidth - window.devicePixelRatio,\n (height * this._scaledCellHeight) - window.devicePixelRatio);\n }\n\n /**\n * Clears the entire canvas.\n */\n protected _clearAll(): void {\n if (this._alpha) {\n this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height);\n } else {\n this._ctx.fillStyle = this._colors.background.css;\n this._ctx.fillRect(0, 0, this._canvas.width, this._canvas.height);\n }\n }\n\n /**\n * Clears 1+ cells completely.\n * @param x The column to start at.\n * @param y The row to start at.\n * @param width The number of columns to clear.\n * @param height The number of rows to clear.\n */\n protected _clearCells(x: number, y: number, width: number, height: number): void {\n if (this._alpha) {\n this._ctx.clearRect(\n x * this._scaledCellWidth,\n y * this._scaledCellHeight,\n width * this._scaledCellWidth,\n height * this._scaledCellHeight);\n } else {\n this._ctx.fillStyle = this._colors.background.css;\n this._ctx.fillRect(\n x * this._scaledCellWidth,\n y * this._scaledCellHeight,\n width * this._scaledCellWidth,\n height * this._scaledCellHeight);\n }\n }\n\n /**\n * Draws a truecolor character at the cell. The character will be clipped to\n * ensure that it fits with the cell, including the cell to the right if it's\n * a wide character. This uses the existing fillStyle on the context.\n * @param cell The cell data for the character to draw.\n * @param x The column to draw at.\n * @param y The row to draw at.\n * @param color The color of the character.\n */\n protected _fillCharTrueColor(cell: CellData, x: number, y: number): void {\n this._ctx.font = this._getFont(false, false);\n this._ctx.textBaseline = TEXT_BASELINE;\n this._clipRow(y);\n\n // Draw custom characters if applicable\n let drawSuccess = false;\n if (this._optionsService.rawOptions.customGlyphs !== false) {\n drawSuccess = tryDrawCustomChar(this._ctx, cell.getChars(), x * this._scaledCellWidth, y * this._scaledCellHeight, this._scaledCellWidth, this._scaledCellHeight);\n }\n\n // Draw the character\n if (!drawSuccess) {\n this._ctx.fillText(\n cell.getChars(),\n x * this._scaledCellWidth + this._scaledCharLeft,\n y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight);\n }\n }\n\n /**\n * Draws one or more characters at a cell. If possible this will draw using\n * the character atlas to reduce draw time.\n * @param chars The character or characters.\n * @param code The character code.\n * @param width The width of the characters.\n * @param x The column to draw at.\n * @param y The row to draw at.\n * @param fg The foreground color, in the format stored within the attributes.\n * @param bg The background color, in the format stored within the attributes.\n * This is used to validate whether a cached image can be used.\n * @param bold Whether the text is bold.\n */\n protected _drawChars(cell: ICellData, x: number, y: number): void {\n const contrastColor = this._getContrastColor(cell);\n\n // skip cache right away if we draw in RGB\n // Note: to avoid bad runtime JoinedCellData will be skipped\n // in the cache handler itself (atlasDidDraw == false) and\n // fall through to uncached later down below\n if (contrastColor || cell.isFgRGB() || cell.isBgRGB()) {\n this._drawUncachedChars(cell, x, y, contrastColor);\n return;\n }\n\n let fg;\n let bg;\n if (cell.isInverse()) {\n fg = (cell.isBgDefault()) ? INVERTED_DEFAULT_COLOR : cell.getBgColor();\n bg = (cell.isFgDefault()) ? INVERTED_DEFAULT_COLOR : cell.getFgColor();\n } else {\n bg = (cell.isBgDefault()) ? DEFAULT_COLOR : cell.getBgColor();\n fg = (cell.isFgDefault()) ? DEFAULT_COLOR : cell.getFgColor();\n }\n\n const drawInBrightColor = this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && fg < 8;\n\n fg += drawInBrightColor ? 8 : 0;\n this._currentGlyphIdentifier.chars = cell.getChars() || WHITESPACE_CELL_CHAR;\n this._currentGlyphIdentifier.code = cell.getCode() || WHITESPACE_CELL_CODE;\n this._currentGlyphIdentifier.bg = bg;\n this._currentGlyphIdentifier.fg = fg;\n this._currentGlyphIdentifier.bold = !!cell.isBold();\n this._currentGlyphIdentifier.dim = !!cell.isDim();\n this._currentGlyphIdentifier.italic = !!cell.isItalic();\n const atlasDidDraw = this._charAtlas?.draw(this._ctx, this._currentGlyphIdentifier, x * this._scaledCellWidth + this._scaledCharLeft, y * this._scaledCellHeight + this._scaledCharTop);\n\n if (!atlasDidDraw) {\n this._drawUncachedChars(cell, x, y);\n }\n }\n\n /**\n * Draws one or more characters at one or more cells. The character(s) will be\n * clipped to ensure that they fit with the cell(s), including the cell to the\n * right if the last character is a wide character.\n * @param chars The character.\n * @param width The width of the character.\n * @param fg The foreground color, in the format stored within the attributes.\n * @param x The column to draw at.\n * @param y The row to draw at.\n */\n private _drawUncachedChars(cell: ICellData, x: number, y: number, fgOverride?: IColor): void {\n this._ctx.save();\n this._ctx.font = this._getFont(!!cell.isBold(), !!cell.isItalic());\n this._ctx.textBaseline = TEXT_BASELINE;\n\n if (cell.isInverse()) {\n if (fgOverride) {\n this._ctx.fillStyle = fgOverride.css;\n } else if (cell.isBgDefault()) {\n this._ctx.fillStyle = color.opaque(this._colors.background).css;\n } else if (cell.isBgRGB()) {\n this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getBgColor()).join(',')})`;\n } else {\n let bg = cell.getBgColor();\n if (this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && bg < 8) {\n bg += 8;\n }\n this._ctx.fillStyle = this._colors.ansi[bg].css;\n }\n } else {\n if (fgOverride) {\n this._ctx.fillStyle = fgOverride.css;\n } else if (cell.isFgDefault()) {\n this._ctx.fillStyle = this._colors.foreground.css;\n } else if (cell.isFgRGB()) {\n this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getFgColor()).join(',')})`;\n } else {\n let fg = cell.getFgColor();\n if (this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && fg < 8) {\n fg += 8;\n }\n this._ctx.fillStyle = this._colors.ansi[fg].css;\n }\n }\n\n this._clipRow(y);\n\n // Apply alpha to dim the character\n if (cell.isDim()) {\n this._ctx.globalAlpha = DIM_OPACITY;\n }\n\n // Draw custom characters if applicable\n let drawSuccess = false;\n if (this._optionsService.rawOptions.customGlyphs !== false) {\n drawSuccess = tryDrawCustomChar(this._ctx, cell.getChars(), x * this._scaledCellWidth, y * this._scaledCellHeight, this._scaledCellWidth, this._scaledCellHeight);\n }\n\n // Draw the character\n if (!drawSuccess) {\n this._ctx.fillText(\n cell.getChars(),\n x * this._scaledCellWidth + this._scaledCharLeft,\n y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight);\n }\n\n this._ctx.restore();\n }\n\n\n /**\n * Clips a row to ensure no pixels will be drawn outside the cells in the row.\n * @param y The row to clip.\n */\n private _clipRow(y: number): void {\n this._ctx.beginPath();\n this._ctx.rect(\n 0,\n y * this._scaledCellHeight,\n this._bufferService.cols * this._scaledCellWidth,\n this._scaledCellHeight);\n this._ctx.clip();\n }\n\n /**\n * Gets the current font.\n * @param isBold If we should use the bold fontWeight.\n */\n protected _getFont(isBold: boolean, isItalic: boolean): string {\n const fontWeight = isBold ? this._optionsService.rawOptions.fontWeightBold : this._optionsService.rawOptions.fontWeight;\n const fontStyle = isItalic ? 'italic' : '';\n\n return `${fontStyle} ${fontWeight} ${this._optionsService.rawOptions.fontSize * window.devicePixelRatio}px ${this._optionsService.rawOptions.fontFamily}`;\n }\n\n private _getContrastColor(cell: CellData): IColor | undefined {\n if (this._optionsService.rawOptions.minimumContrastRatio === 1) {\n return undefined;\n }\n\n // Try get from cache first\n const adjustedColor = this._colors.contrastCache.getColor(cell.bg, cell.fg);\n if (adjustedColor !== undefined) {\n return adjustedColor || undefined;\n }\n\n let fgColor = cell.getFgColor();\n let fgColorMode = cell.getFgColorMode();\n let bgColor = cell.getBgColor();\n let bgColorMode = cell.getBgColorMode();\n const isInverse = !!cell.isInverse();\n const isBold = !!cell.isInverse();\n if (isInverse) {\n const temp = fgColor;\n fgColor = bgColor;\n bgColor = temp;\n const temp2 = fgColorMode;\n fgColorMode = bgColorMode;\n bgColorMode = temp2;\n }\n\n const bgRgba = this._resolveBackgroundRgba(bgColorMode, bgColor, isInverse);\n const fgRgba = this._resolveForegroundRgba(fgColorMode, fgColor, isInverse, isBold);\n const result = rgba.ensureContrastRatio(bgRgba, fgRgba, this._optionsService.rawOptions.minimumContrastRatio);\n\n if (!result) {\n this._colors.contrastCache.setColor(cell.bg, cell.fg, null);\n return undefined;\n }\n\n const color: IColor = {\n css: channels.toCss(\n (result >> 24) & 0xFF,\n (result >> 16) & 0xFF,\n (result >> 8) & 0xFF\n ),\n rgba: result\n };\n this._colors.contrastCache.setColor(cell.bg, cell.fg, color);\n\n return color;\n }\n\n private _resolveBackgroundRgba(bgColorMode: number, bgColor: number, inverse: boolean): number {\n switch (bgColorMode) {\n case Attributes.CM_P16:\n case Attributes.CM_P256:\n return this._colors.ansi[bgColor].rgba;\n case Attributes.CM_RGB:\n return bgColor << 8;\n case Attributes.CM_DEFAULT:\n default:\n if (inverse) {\n return this._colors.foreground.rgba;\n }\n return this._colors.background.rgba;\n }\n }\n\n private _resolveForegroundRgba(fgColorMode: number, fgColor: number, inverse: boolean, bold: boolean): number {\n switch (fgColorMode) {\n case Attributes.CM_P16:\n case Attributes.CM_P256:\n if (this._optionsService.rawOptions.drawBoldTextInBrightColors && bold && fgColor < 8) {\n fgColor += 8;\n }\n return this._colors.ansi[fgColor].rgba;\n case Attributes.CM_RGB:\n return fgColor << 8;\n case Attributes.CM_DEFAULT:\n default:\n if (inverse) {\n return this._colors.background.rgba;\n }\n return this._colors.foreground.rgba;\n }\n }\n}\n\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderDimensions, IRequestRedrawEvent } from 'browser/renderer/Types';\nimport { BaseRenderLayer } from 'browser/renderer/BaseRenderLayer';\nimport { ICellData } from 'common/Types';\nimport { CellData } from 'common/buffer/CellData';\nimport { IColorSet } from 'browser/Types';\nimport { IBufferService, IOptionsService, ICoreService } from 'common/services/Services';\nimport { IEventEmitter } from 'common/EventEmitter';\nimport { ICoreBrowserService } from 'browser/services/Services';\n\ninterface ICursorState {\n x: number;\n y: number;\n isFocused: boolean;\n style: string;\n width: number;\n}\n\n/**\n * The time between cursor blinks.\n */\nconst BLINK_INTERVAL = 600;\n\nexport class CursorRenderLayer extends BaseRenderLayer {\n private _state: ICursorState;\n private _cursorRenderers: {[key: string]: (x: number, y: number, cell: ICellData) => void};\n private _cursorBlinkStateManager: CursorBlinkStateManager | undefined;\n private _cell: ICellData = new CellData();\n\n constructor(\n container: HTMLElement,\n zIndex: number,\n colors: IColorSet,\n rendererId: number,\n private _onRequestRedraw: IEventEmitter<IRequestRedrawEvent>,\n @IBufferService bufferService: IBufferService,\n @IOptionsService optionsService: IOptionsService,\n @ICoreService private readonly _coreService: ICoreService,\n @ICoreBrowserService private readonly _coreBrowserService: ICoreBrowserService\n ) {\n super(container, 'cursor', zIndex, true, colors, rendererId, bufferService, optionsService);\n this._state = {\n x: 0,\n y: 0,\n isFocused: false,\n style: '',\n width: 0\n };\n this._cursorRenderers = {\n 'bar': this._renderBarCursor.bind(this),\n 'block': this._renderBlockCursor.bind(this),\n 'underline': this._renderUnderlineCursor.bind(this)\n };\n }\n\n public dispose(): void {\n if (this._cursorBlinkStateManager) {\n this._cursorBlinkStateManager.dispose();\n this._cursorBlinkStateManager = undefined;\n }\n super.dispose();\n }\n\n public resize(dim: IRenderDimensions): void {\n super.resize(dim);\n // Resizing the canvas discards the contents of the canvas so clear state\n this._state = {\n x: 0,\n y: 0,\n isFocused: false,\n style: '',\n width: 0\n };\n }\n\n public reset(): void {\n this._clearCursor();\n this._cursorBlinkStateManager?.restartBlinkAnimation();\n this.onOptionsChanged();\n }\n\n public onBlur(): void {\n this._cursorBlinkStateManager?.pause();\n this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });\n }\n\n public onFocus(): void {\n this._cursorBlinkStateManager?.resume();\n this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });\n }\n\n public onOptionsChanged(): void {\n if (this._optionsService.rawOptions.cursorBlink) {\n if (!this._cursorBlinkStateManager) {\n this._cursorBlinkStateManager = new CursorBlinkStateManager(this._coreBrowserService.isFocused, () => {\n this._render(true);\n });\n }\n } else {\n this._cursorBlinkStateManager?.dispose();\n this._cursorBlinkStateManager = undefined;\n }\n // Request a refresh from the terminal as management of rendering is being\n // moved back to the terminal\n this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });\n }\n\n public onCursorMove(): void {\n this._cursorBlinkStateManager?.restartBlinkAnimation();\n }\n\n public onGridChanged(startRow: number, endRow: number): void {\n if (!this._cursorBlinkStateManager || this._cursorBlinkStateManager.isPaused) {\n this._render(false);\n } else {\n this._cursorBlinkStateManager.restartBlinkAnimation();\n }\n }\n\n private _render(triggeredByAnimationFrame: boolean): void {\n // Don't draw the cursor if it's hidden\n if (!this._coreService.isCursorInitialized || this._coreService.isCursorHidden) {\n this._clearCursor();\n return;\n }\n\n const cursorY = this._bufferService.buffer.ybase + this._bufferService.buffer.y;\n const viewportRelativeCursorY = cursorY - this._bufferService.buffer.ydisp;\n\n // Don't draw the cursor if it's off-screen\n if (viewportRelativeCursorY < 0 || viewportRelativeCursorY >= this._bufferService.rows) {\n this._clearCursor();\n return;\n }\n\n // in case cursor.x == cols adjust visual cursor to cols - 1\n const cursorX = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);\n this._bufferService.buffer.lines.get(cursorY)!.loadCell(cursorX, this._cell);\n if (this._cell.content === undefined) {\n return;\n }\n\n if (!this._coreBrowserService.isFocused) {\n this._clearCursor();\n this._ctx.save();\n this._ctx.fillStyle = this._colors.cursor.css;\n const cursorStyle = this._optionsService.rawOptions.cursorStyle;\n if (cursorStyle && cursorStyle !== 'block') {\n this._cursorRenderers[cursorStyle](cursorX, viewportRelativeCursorY, this._cell);\n } else {\n this._renderBlurCursor(cursorX, viewportRelativeCursorY, this._cell);\n }\n this._ctx.restore();\n this._state.x = cursorX;\n this._state.y = viewportRelativeCursorY;\n this._state.isFocused = false;\n this._state.style = cursorStyle;\n this._state.width = this._cell.getWidth();\n return;\n }\n\n // Don't draw the cursor if it's blinking\n if (this._cursorBlinkStateManager && !this._cursorBlinkStateManager.isCursorVisible) {\n this._clearCursor();\n return;\n }\n\n if (this._state) {\n // The cursor is already in the correct spot, don't redraw\n if (this._state.x === cursorX &&\n this._state.y === viewportRelativeCursorY &&\n this._state.isFocused === this._coreBrowserService.isFocused &&\n this._state.style === this._optionsService.rawOptions.cursorStyle &&\n this._state.width === this._cell.getWidth()) {\n return;\n }\n this._clearCursor();\n }\n\n this._ctx.save();\n this._cursorRenderers[this._optionsService.rawOptions.cursorStyle || 'block'](cursorX, viewportRelativeCursorY, this._cell);\n this._ctx.restore();\n\n this._state.x = cursorX;\n this._state.y = viewportRelativeCursorY;\n this._state.isFocused = false;\n this._state.style = this._optionsService.rawOptions.cursorStyle;\n this._state.width = this._cell.getWidth();\n }\n\n private _clearCursor(): void {\n if (this._state) {\n // Avoid potential rounding errors when device pixel ratio is less than 1\n if (window.devicePixelRatio < 1) {\n this._clearAll();\n } else {\n this._clearCells(this._state.x, this._state.y, this._state.width, 1);\n }\n this._state = {\n x: 0,\n y: 0,\n isFocused: false,\n style: '',\n width: 0\n };\n }\n }\n\n private _renderBarCursor(x: number, y: number, cell: ICellData): void {\n this._ctx.save();\n this._ctx.fillStyle = this._colors.cursor.css;\n this._fillLeftLineAtCell(x, y, this._optionsService.rawOptions.cursorWidth);\n this._ctx.restore();\n }\n\n private _renderBlockCursor(x: number, y: number, cell: ICellData): void {\n this._ctx.save();\n this._ctx.fillStyle = this._colors.cursor.css;\n this._fillCells(x, y, cell.getWidth(), 1);\n this._ctx.fillStyle = this._colors.cursorAccent.css;\n this._fillCharTrueColor(cell, x, y);\n this._ctx.restore();\n }\n\n private _renderUnderlineCursor(x: number, y: number, cell: ICellData): void {\n this._ctx.save();\n this._ctx.fillStyle = this._colors.cursor.css;\n this._fillBottomLineAtCells(x, y);\n this._ctx.restore();\n }\n\n private _renderBlurCursor(x: number, y: number, cell: ICellData): void {\n this._ctx.save();\n this._ctx.strokeStyle = this._colors.cursor.css;\n this._strokeRectAtCell(x, y, cell.getWidth(), 1);\n this._ctx.restore();\n }\n}\n\nclass CursorBlinkStateManager {\n public isCursorVisible: boolean;\n\n private _animationFrame: number | undefined;\n private _blinkStartTimeout: number | undefined;\n private _blinkInterval: number | undefined;\n\n /**\n * The time at which the animation frame was restarted, this is used on the\n * next render to restart the timers so they don't need to restart the timers\n * multiple times over a short period.\n */\n private _animationTimeRestarted: number | undefined;\n\n constructor(\n isFocused: boolean,\n private _renderCallback: () => void\n ) {\n this.isCursorVisible = true;\n if (isFocused) {\n this._restartInterval();\n }\n }\n\n public get isPaused(): boolean { return !(this._blinkStartTimeout || this._blinkInterval); }\n\n public dispose(): void {\n if (this._blinkInterval) {\n window.clearInterval(this._blinkInterval);\n this._blinkInterval = undefined;\n }\n if (this._blinkStartTimeout) {\n window.clearTimeout(this._blinkStartTimeout);\n this._blinkStartTimeout = undefined;\n }\n if (this._animationFrame) {\n window.cancelAnimationFrame(this._animationFrame);\n this._animationFrame = undefined;\n }\n }\n\n public restartBlinkAnimation(): void {\n if (this.isPaused) {\n return;\n }\n // Save a timestamp so that the restart can be done on the next interval\n this._animationTimeRestarted = Date.now();\n // Force a cursor render to ensure it's visible and in the correct position\n this.isCursorVisible = true;\n if (!this._animationFrame) {\n this._animationFrame = window.requestAnimationFrame(() => {\n this._renderCallback();\n this._animationFrame = undefined;\n });\n }\n }\n\n private _restartInterval(timeToStart: number = BLINK_INTERVAL): void {\n // Clear any existing interval\n if (this._blinkInterval) {\n window.clearInterval(this._blinkInterval);\n this._blinkInterval = undefined;\n }\n\n // Setup the initial timeout which will hide the cursor, this is done before\n // the regular interval is setup in order to support restarting the blink\n // animation in a lightweight way (without thrashing clearInterval and\n // setInterval).\n this._blinkStartTimeout = window.setTimeout(() => {\n // Check if another animation restart was requested while this was being\n // started\n if (this._animationTimeRestarted) {\n const time = BLINK_INTERVAL - (Date.now() - this._animationTimeRestarted);\n this._animationTimeRestarted = undefined;\n if (time > 0) {\n this._restartInterval(time);\n return;\n }\n }\n\n // Hide the cursor\n this.isCursorVisible = false;\n this._animationFrame = window.requestAnimationFrame(() => {\n this._renderCallback();\n this._animationFrame = undefined;\n });\n\n // Setup the blink interval\n this._blinkInterval = window.setInterval(() => {\n // Adjust the animation time if it was restarted\n if (this._animationTimeRestarted) {\n // calc time diff\n // Make restart interval do a setTimeout initially?\n const time = BLINK_INTERVAL - (Date.now() - this._animationTimeRestarted);\n this._animationTimeRestarted = undefined;\n this._restartInterval(time);\n return;\n }\n\n // Invert visibility and render\n this.isCursorVisible = !this.isCursorVisible;\n this._animationFrame = window.requestAnimationFrame(() => {\n this._renderCallback();\n this._animationFrame = undefined;\n });\n }, BLINK_INTERVAL);\n }, timeToStart);\n }\n\n public pause(): void {\n this.isCursorVisible = true;\n if (this._blinkInterval) {\n window.clearInterval(this._blinkInterval);\n this._blinkInterval = undefined;\n }\n if (this._blinkStartTimeout) {\n window.clearTimeout(this._blinkStartTimeout);\n this._blinkStartTimeout = undefined;\n }\n if (this._animationFrame) {\n window.cancelAnimationFrame(this._animationFrame);\n this._animationFrame = undefined;\n }\n }\n\n public resume(): void {\n // Clear out any existing timers just in case\n this.pause();\n\n this._animationTimeRestarted = undefined;\n this._restartInterval();\n this.restartBlinkAnimation();\n }\n}\n","/**\n * Copyright (c) 2021 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { throwIfFalsy } from 'browser/renderer/RendererUtils';\n\ninterface IBlockVector {\n x: number;\n y: number;\n w: number;\n h: number;\n}\n\nexport const blockElementDefinitions: { [index: string]: IBlockVector[] | undefined } = {\n // Block elements (0x2580-0x2590)\n '▀': [{ x: 0, y: 0, w: 8, h: 4 }], // UPPER HALF BLOCK\n '▁': [{ x: 0, y: 7, w: 8, h: 1 }], // LOWER ONE EIGHTH BLOCK\n '▂': [{ x: 0, y: 6, w: 8, h: 2 }], // LOWER ONE QUARTER BLOCK\n '▃': [{ x: 0, y: 5, w: 8, h: 3 }], // LOWER THREE EIGHTHS BLOCK\n '▄': [{ x: 0, y: 4, w: 8, h: 4 }], // LOWER HALF BLOCK\n '▅': [{ x: 0, y: 3, w: 8, h: 5 }], // LOWER FIVE EIGHTHS BLOCK\n '▆': [{ x: 0, y: 2, w: 8, h: 6 }], // LOWER THREE QUARTERS BLOCK\n '▇': [{ x: 0, y: 1, w: 8, h: 7 }], // LOWER SEVEN EIGHTHS BLOCK\n '█': [{ x: 0, y: 0, w: 8, h: 8 }], // FULL BLOCK\n '▉': [{ x: 0, y: 0, w: 7, h: 8 }], // LEFT SEVEN EIGHTHS BLOCK\n '▊': [{ x: 0, y: 0, w: 6, h: 8 }], // LEFT THREE QUARTERS BLOCK\n '▋': [{ x: 0, y: 0, w: 5, h: 8 }], // LEFT FIVE EIGHTHS BLOCK\n '▌': [{ x: 0, y: 0, w: 4, h: 8 }], // LEFT HALF BLOCK\n '▍': [{ x: 0, y: 0, w: 3, h: 8 }], // LEFT THREE EIGHTHS BLOCK\n '▎': [{ x: 0, y: 0, w: 2, h: 8 }], // LEFT ONE QUARTER BLOCK\n '▏': [{ x: 0, y: 0, w: 1, h: 8 }], // LEFT ONE EIGHTH BLOCK\n '▐': [{ x: 4, y: 0, w: 4, h: 8 }], // RIGHT HALF BLOCK\n\n // Block elements (0x2594-0x2595)\n '▔': [{ x: 0, y: 0, w: 9, h: 1 }], // UPPER ONE EIGHTH BLOCK\n '▕': [{ x: 7, y: 0, w: 1, h: 8 }], // RIGHT ONE EIGHTH BLOCK\n\n // Terminal graphic characters (0x2596-0x259F)\n '▖': [{ x: 0, y: 4, w: 4, h: 4 }], // QUADRANT LOWER LEFT\n '▗': [{ x: 4, y: 4, w: 4, h: 4 }], // QUADRANT LOWER RIGHT\n '▘': [{ x: 0, y: 0, w: 4, h: 4 }], // QUADRANT UPPER LEFT\n '▙': [{ x: 0, y: 0, w: 4, h: 8 }, { x: 0, y: 4, w: 8, h: 4 }], // QUADRANT UPPER LEFT AND LOWER LEFT AND LOWER RIGHT\n '▚': [{ x: 0, y: 0, w: 4, h: 4 }, { x: 4, y: 4, w: 4, h: 4 }], // QUADRANT UPPER LEFT AND LOWER RIGHT\n '▛': [{ x: 0, y: 0, w: 4, h: 8 }, { x: 0, y: 0, w: 4, h: 8 }], // QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER LEFT\n '▜': [{ x: 0, y: 0, w: 8, h: 4 }, { x: 4, y: 0, w: 4, h: 8 }], // QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER RIGHT\n '▝': [{ x: 4, y: 0, w: 4, h: 4 }], // QUADRANT UPPER RIGHT\n '▞': [{ x: 4, y: 0, w: 4, h: 4 }, { x: 0, y: 4, w: 4, h: 4 }], // QUADRANT UPPER RIGHT AND LOWER LEFT\n '▟': [{ x: 4, y: 0, w: 4, h: 8 }, { x: 0, y: 4, w: 8, h: 4 }], // QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT\n\n // VERTICAL ONE EIGHTH BLOCK-2 through VERTICAL ONE EIGHTH BLOCK-7\n '\\u{1FB70}': [{ x: 1, y: 0, w: 1, h: 8 }],\n '\\u{1FB71}': [{ x: 2, y: 0, w: 1, h: 8 }],\n '\\u{1FB72}': [{ x: 3, y: 0, w: 1, h: 8 }],\n '\\u{1FB73}': [{ x: 4, y: 0, w: 1, h: 8 }],\n '\\u{1FB74}': [{ x: 5, y: 0, w: 1, h: 8 }],\n '\\u{1FB75}': [{ x: 6, y: 0, w: 1, h: 8 }],\n\n // HORIZONTAL ONE EIGHTH BLOCK-2 through HORIZONTAL ONE EIGHTH BLOCK-7\n '\\u{1FB76}': [{ x: 0, y: 1, w: 8, h: 1 }],\n '\\u{1FB77}': [{ x: 0, y: 2, w: 8, h: 1 }],\n '\\u{1FB78}': [{ x: 0, y: 3, w: 8, h: 1 }],\n '\\u{1FB79}': [{ x: 0, y: 4, w: 8, h: 1 }],\n '\\u{1FB7A}': [{ x: 0, y: 5, w: 8, h: 1 }],\n '\\u{1FB7B}': [{ x: 0, y: 6, w: 8, h: 1 }],\n\n // LEFT AND LOWER ONE EIGHTH BLOCK\n '\\u{1FB7C}': [{ x: 0, y: 0, w: 1, h: 8 }, { x: 0, y: 7, w: 8, h: 1 }],\n // LEFT AND UPPER ONE EIGHTH BLOCK\n '\\u{1FB7D}': [{ x: 0, y: 0, w: 1, h: 8 }, { x: 0, y: 0, w: 8, h: 1 }],\n // RIGHT AND UPPER ONE EIGHTH BLOCK\n '\\u{1FB7E}': [{ x: 7, y: 0, w: 1, h: 8 }, { x: 0, y: 0, w: 8, h: 1 }],\n // RIGHT AND LOWER ONE EIGHTH BLOCK\n '\\u{1FB7F}': [{ x: 7, y: 0, w: 1, h: 8 }, { x: 0, y: 7, w: 8, h: 1 }],\n // UPPER AND LOWER ONE EIGHTH BLOCK\n '\\u{1FB80}': [{ x: 0, y: 0, w: 8, h: 1 }, { x: 0, y: 7, w: 8, h: 1 }],\n // HORIZONTAL ONE EIGHTH BLOCK-1358\n '\\u{1FB81}': [{ x: 0, y: 0, w: 8, h: 1 }, { x: 0, y: 2, w: 8, h: 1 }, { x: 0, y: 4, w: 8, h: 1 }, { x: 0, y: 7, w: 8, h: 1 }],\n\n // UPPER ONE QUARTER BLOCK\n '\\u{1FB82}': [{ x: 0, y: 0, w: 8, h: 2 }],\n // UPPER THREE EIGHTHS BLOCK\n '\\u{1FB83}': [{ x: 0, y: 0, w: 8, h: 3 }],\n // UPPER FIVE EIGHTHS BLOCK\n '\\u{1FB84}': [{ x: 0, y: 0, w: 8, h: 5 }],\n // UPPER THREE QUARTERS BLOCK\n '\\u{1FB85}': [{ x: 0, y: 0, w: 8, h: 6 }],\n // UPPER SEVEN EIGHTHS BLOCK\n '\\u{1FB86}': [{ x: 0, y: 0, w: 8, h: 7 }],\n\n // RIGHT ONE QUARTER BLOCK\n '\\u{1FB87}': [{ x: 6, y: 0, w: 2, h: 8 }],\n // RIGHT THREE EIGHTHS B0OCK\n '\\u{1FB88}': [{ x: 5, y: 0, w: 3, h: 8 }],\n // RIGHT FIVE EIGHTHS BL0CK\n '\\u{1FB89}': [{ x: 3, y: 0, w: 5, h: 8 }],\n // RIGHT THREE QUARTERS 0LOCK\n '\\u{1FB8A}': [{ x: 2, y: 0, w: 6, h: 8 }],\n // RIGHT SEVEN EIGHTHS B0OCK\n '\\u{1FB8B}': [{ x: 1, y: 0, w: 7, h: 8 }],\n\n // CHECKER BOARD FILL\n '\\u{1FB95}': [\n { x: 0, y: 0, w: 2, h: 2 }, { x: 4, y: 0, w: 2, h: 2 },\n { x: 2, y: 2, w: 2, h: 2 }, { x: 6, y: 2, w: 2, h: 2 },\n { x: 0, y: 4, w: 2, h: 2 }, { x: 4, y: 4, w: 2, h: 2 },\n { x: 2, y: 6, w: 2, h: 2 }, { x: 6, y: 6, w: 2, h: 2 }\n ],\n // INVERSE CHECKER BOARD FILL\n '\\u{1FB96}': [\n { x: 2, y: 0, w: 2, h: 2 }, { x: 6, y: 0, w: 2, h: 2 },\n { x: 0, y: 2, w: 2, h: 2 }, { x: 4, y: 2, w: 2, h: 2 },\n { x: 2, y: 4, w: 2, h: 2 }, { x: 6, y: 4, w: 2, h: 2 },\n { x: 0, y: 6, w: 2, h: 2 }, { x: 4, y: 6, w: 2, h: 2 }\n ],\n // HEAVY HORIZONTAL FILL (upper middle and lower one quarter block)\n '\\u{1FB97}': [{ x: 0, y: 2, w: 8, h: 2 }, { x: 0, y: 6, w: 8, h: 2 }]\n};\n\ntype PatternDefinition = number[][];\n\n/**\n * Defines the repeating pattern used by special characters, the pattern is made up of a 2d array of\n * pixel values to be filled (1) or not filled (0).\n */\nconst patternCharacterDefinitions: { [key: string]: PatternDefinition | undefined } = {\n // Shade characters (0x2591-0x2593)\n '░': [ // LIGHT SHADE (25%)\n [1, 0, 0, 0],\n [0, 0, 0, 0],\n [0, 0, 1, 0],\n [0, 0, 0, 0]\n ],\n '▒': [ // MEDIUM SHADE (50%)\n [1, 0],\n [0, 0],\n [0, 1],\n [0, 0]\n ],\n '▓': [ // DARK SHADE (75%)\n [0, 1],\n [1, 1],\n [1, 0],\n [1, 1]\n ]\n};\n\nconst enum Shapes {\n /** │ */ TOP_TO_BOTTOM = 'M.5,0 L.5,1',\n /** ─ */ LEFT_TO_RIGHT = 'M0,.5 L1,.5',\n\n /** └ */ TOP_TO_RIGHT = 'M.5,0 L.5,.5 L1,.5',\n /** ┘ */ TOP_TO_LEFT = 'M.5,0 L.5,.5 L0,.5',\n /** ┐ */ LEFT_TO_BOTTOM = 'M0,.5 L.5,.5 L.5,1',\n /** ┌ */ RIGHT_TO_BOTTOM = 'M0.5,1 L.5,.5 L1,.5',\n\n /** ╵ */ MIDDLE_TO_TOP = 'M.5,.5 L.5,0',\n /** ╴ */ MIDDLE_TO_LEFT = 'M.5,.5 L0,.5',\n /** ╶ */ MIDDLE_TO_RIGHT = 'M.5,.5 L1,.5',\n /** ╷ */ MIDDLE_TO_BOTTOM = 'M.5,.5 L.5,1',\n\n /** ┴ */ T_TOP = 'M0,.5 L1,.5 M.5,.5 L.5,0',\n /** ┤ */ T_LEFT = 'M.5,0 L.5,1 M.5,.5 L0,.5',\n /** ├ */ T_RIGHT = 'M.5,0 L.5,1 M.5,.5 L1,.5',\n /** ┬ */ T_BOTTOM = 'M0,.5 L1,.5 M.5,.5 L.5,1',\n\n /** ┼ */ CROSS = 'M0,.5 L1,.5 M.5,0 L.5,1',\n\n /** ╌ */ TWO_DASHES_HORIZONTAL = 'M.1,.5 L.4,.5 M.6,.5 L.9,.5', // .2 empty, .3 filled\n /** ┄ */ THREE_DASHES_HORIZONTAL = 'M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5', // .1333 empty, .2 filled\n /** ┉ */ FOUR_DASHES_HORIZONTAL = 'M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5', // .1 empty, .15 filled\n /** ╎ */ TWO_DASHES_VERTICAL = 'M.5,.1 L.5,.4 M.5,.6 L.5,.9',\n /** ┆ */ THREE_DASHES_VERTICAL = 'M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333',\n /** ┊ */ FOUR_DASHES_VERTICAL = 'M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95',\n}\n\nconst enum Style {\n NORMAL = 1,\n BOLD = 3\n}\n\n/**\n * This contains the definitions of all box drawing characters in the format of SVG paths (ie. the\n * svg d attribute).\n */\nexport const boxDrawingDefinitions: { [character: string]: { [fontWeight: number]: string | ((xp: number, yp: number) => string) } | undefined } = {\n // Uniform normal and bold\n '─': { [Style.NORMAL]: Shapes.LEFT_TO_RIGHT },\n '━': { [Style.BOLD]: Shapes.LEFT_TO_RIGHT },\n '│': { [Style.NORMAL]: Shapes.TOP_TO_BOTTOM },\n '┃': { [Style.BOLD]: Shapes.TOP_TO_BOTTOM },\n '┌': { [Style.NORMAL]: Shapes.RIGHT_TO_BOTTOM },\n '┏': { [Style.BOLD]: Shapes.RIGHT_TO_BOTTOM },\n '┐': { [Style.NORMAL]: Shapes.LEFT_TO_BOTTOM },\n '┓': { [Style.BOLD]: Shapes.LEFT_TO_BOTTOM },\n '└': { [Style.NORMAL]: Shapes.TOP_TO_RIGHT },\n '┗': { [Style.BOLD]: Shapes.TOP_TO_RIGHT },\n '┘': { [Style.NORMAL]: Shapes.TOP_TO_LEFT },\n '┛': { [Style.BOLD]: Shapes.TOP_TO_LEFT },\n '├': { [Style.NORMAL]: Shapes.T_RIGHT },\n '┣': { [Style.BOLD]: Shapes.T_RIGHT },\n '┤': { [Style.NORMAL]: Shapes.T_LEFT },\n '┫': { [Style.BOLD]: Shapes.T_LEFT },\n '┬': { [Style.NORMAL]: Shapes.T_BOTTOM },\n '┳': { [Style.BOLD]: Shapes.T_BOTTOM },\n '┴': { [Style.NORMAL]: Shapes.T_TOP },\n '┻': { [Style.BOLD]: Shapes.T_TOP },\n '┼': { [Style.NORMAL]: Shapes.CROSS },\n '╋': { [Style.BOLD]: Shapes.CROSS },\n '╴': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT },\n '╸': { [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },\n '╵': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP },\n '╹': { [Style.BOLD]: Shapes.MIDDLE_TO_TOP },\n '╶': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT },\n '╺': { [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },\n '╷': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM },\n '╻': { [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },\n\n // Double border\n '═': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L1,${.5 + yp}` },\n '║': { [Style.NORMAL]: (xp, yp) => `M${.5 - xp},0 L${.5 - xp},1 M${.5 + xp},0 L${.5 + xp},1` },\n '╒': { [Style.NORMAL]: (xp, yp) => `M.5,1 L.5,${.5 - yp} L1,${.5 - yp} M.5,${.5 + yp} L1,${.5 + yp}` },\n '╓': { [Style.NORMAL]: (xp, yp) => `M${.5 - xp},1 L${.5 - xp},.5 L1,.5 M${.5 + xp},.5 L${.5 + xp},1` },\n '╔': { [Style.NORMAL]: (xp, yp) => `M1,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},1 M1,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},1` },\n '╕': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L.5,${.5 - yp} L.5,1 M0,${.5 + yp} L.5,${.5 + yp}` },\n '╖': { [Style.NORMAL]: (xp, yp) => `M${.5 + xp},1 L${.5 + xp},.5 L0,.5 M${.5 - xp},.5 L${.5 - xp},1` },\n '╗': { [Style.NORMAL]: (xp, yp) => `M0,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},1 M0,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},1` },\n '╘': { [Style.NORMAL]: (xp, yp) => `M.5,0 L.5,${.5 + yp} L1,${.5 + yp} M.5,${.5 - yp} L1,${.5 - yp}` },\n '╙': { [Style.NORMAL]: (xp, yp) => `M1,.5 L${.5 - xp},.5 L${.5 - xp},0 M${.5 + xp},.5 L${.5 + xp},0` },\n '╚': { [Style.NORMAL]: (xp, yp) => `M1,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},0 M1,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},0` },\n '╛': { [Style.NORMAL]: (xp, yp) => `M0,${.5 + yp} L.5,${.5 + yp} L.5,0 M0,${.5 - yp} L.5,${.5 - yp}` },\n '╜': { [Style.NORMAL]: (xp, yp) => `M0,.5 L${.5 + xp},.5 L${.5 + xp},0 M${.5 - xp},.5 L${.5 - xp},0` },\n '╝': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},0 M0,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},0` },\n '╞': { [Style.NORMAL]: (xp, yp) => `${Shapes.TOP_TO_BOTTOM} M.5,${.5 - yp} L1,${.5 - yp} M.5,${.5 + yp} L1,${.5 + yp}` },\n '╟': { [Style.NORMAL]: (xp, yp) => `M${.5 - xp},0 L${.5 - xp},1 M${.5 + xp},0 L${.5 + xp},1 M${.5 + xp},.5 L1,.5` },\n '╠': { [Style.NORMAL]: (xp, yp) => `M${.5 - xp},0 L${.5 - xp},1 M1,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},1 M1,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},0` },\n '╡': { [Style.NORMAL]: (xp, yp) => `${Shapes.TOP_TO_BOTTOM} M0,${.5 - yp} L.5,${.5 - yp} M0,${.5 + yp} L.5,${.5 + yp}` },\n '╢': { [Style.NORMAL]: (xp, yp) => `M0,.5 L${.5 - xp},.5 M${.5 - xp},0 L${.5 - xp},1 M${.5 + xp},0 L${.5 + xp},1` },\n '╣': { [Style.NORMAL]: (xp, yp) => `M${.5 + xp},0 L${.5 + xp},1 M0,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},1 M0,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},0` },\n '╤': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L1,${.5 + yp} M.5,${.5 + yp} L.5,1` },\n '╥': { [Style.NORMAL]: (xp, yp) => `${Shapes.LEFT_TO_RIGHT} M${.5 - xp},.5 L${.5 - xp},1 M${.5 + xp},.5 L${.5 + xp},1` },\n '╦': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},1 M1,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},1` },\n '╧': { [Style.NORMAL]: (xp, yp) => `M.5,0 L.5,${.5 - yp} M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L1,${.5 + yp}` },\n '╨': { [Style.NORMAL]: (xp, yp) => `${Shapes.LEFT_TO_RIGHT} M${.5 - xp},.5 L${.5 - xp},0 M${.5 + xp},.5 L${.5 + xp},0` },\n '╩': { [Style.NORMAL]: (xp, yp) => `M0,${.5 + yp} L1,${.5 + yp} M0,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},0 M1,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},0` },\n '╪': { [Style.NORMAL]: (xp, yp) => `${Shapes.TOP_TO_BOTTOM} M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L1,${.5 + yp}` },\n '╫': { [Style.NORMAL]: (xp, yp) => `${Shapes.LEFT_TO_RIGHT} M${.5 - xp},0 L${.5 - xp},1 M${.5 + xp},0 L${.5 + xp},1` },\n '╬': { [Style.NORMAL]: (xp, yp) => `M0,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},1 M1,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},1 M0,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},0 M1,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},0` },\n\n // Diagonal\n '╱': { [Style.NORMAL]: 'M1,0 L0,1' },\n '╲': { [Style.NORMAL]: 'M0,0 L1,1' },\n '╳': { [Style.NORMAL]: 'M1,0 L0,1 M0,0 L1,1' },\n\n // Mixed weight\n '╼': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },\n '╽': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },\n '╾': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },\n '╿': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },\n '┍': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },\n '┎': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },\n '┑': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },\n '┒': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },\n '┕': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },\n '┖': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },\n '┙': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },\n '┚': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },\n '┝': { [Style.NORMAL]: Shapes.TOP_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },\n '┞': { [Style.NORMAL]: Shapes.RIGHT_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },\n '┟': { [Style.NORMAL]: Shapes.TOP_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },\n '┠': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.TOP_TO_BOTTOM },\n '┡': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.TOP_TO_RIGHT },\n '┢': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.RIGHT_TO_BOTTOM },\n '┥': { [Style.NORMAL]: Shapes.TOP_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },\n '┦': { [Style.NORMAL]: Shapes.LEFT_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },\n '┧': { [Style.NORMAL]: Shapes.TOP_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },\n '┨': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.TOP_TO_BOTTOM },\n '┩': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.TOP_TO_LEFT },\n '┪': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.LEFT_TO_BOTTOM },\n '┭': { [Style.NORMAL]: Shapes.RIGHT_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },\n '┮': { [Style.NORMAL]: Shapes.LEFT_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },\n '┯': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.LEFT_TO_RIGHT },\n '┰': { [Style.NORMAL]: Shapes.LEFT_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },\n '┱': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.LEFT_TO_BOTTOM },\n '┲': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.RIGHT_TO_BOTTOM },\n '┵': { [Style.NORMAL]: Shapes.TOP_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },\n '┶': { [Style.NORMAL]: Shapes.TOP_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },\n '┷': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.LEFT_TO_RIGHT },\n '┸': { [Style.NORMAL]: Shapes.LEFT_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },\n '┹': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.TOP_TO_LEFT },\n '┺': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.TOP_TO_RIGHT },\n '┽': { [Style.NORMAL]: `${Shapes.TOP_TO_BOTTOM} ${Shapes.MIDDLE_TO_RIGHT}`, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },\n '┾': { [Style.NORMAL]: `${Shapes.TOP_TO_BOTTOM} ${Shapes.MIDDLE_TO_LEFT}`, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },\n '┿': { [Style.NORMAL]: Shapes.TOP_TO_BOTTOM, [Style.BOLD]: Shapes.LEFT_TO_RIGHT },\n '╀': { [Style.NORMAL]: `${Shapes.LEFT_TO_RIGHT} ${Shapes.MIDDLE_TO_BOTTOM}`, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },\n '╁': { [Style.NORMAL]: `${Shapes.MIDDLE_TO_TOP} ${Shapes.LEFT_TO_RIGHT}`, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },\n '╂': { [Style.NORMAL]: Shapes.LEFT_TO_RIGHT, [Style.BOLD]: Shapes.TOP_TO_BOTTOM },\n '╃': { [Style.NORMAL]: Shapes.RIGHT_TO_BOTTOM, [Style.BOLD]: Shapes.TOP_TO_LEFT },\n '╄': { [Style.NORMAL]: Shapes.LEFT_TO_BOTTOM, [Style.BOLD]: Shapes.TOP_TO_RIGHT },\n '╅': { [Style.NORMAL]: Shapes.TOP_TO_RIGHT, [Style.BOLD]: Shapes.LEFT_TO_BOTTOM },\n '╆': { [Style.NORMAL]: Shapes.TOP_TO_LEFT, [Style.BOLD]: Shapes.RIGHT_TO_BOTTOM },\n '╇': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: `${Shapes.MIDDLE_TO_TOP} ${Shapes.LEFT_TO_RIGHT}` },\n '╈': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: `${Shapes.LEFT_TO_RIGHT} ${Shapes.MIDDLE_TO_BOTTOM}` },\n '╉': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: `${Shapes.TOP_TO_BOTTOM} ${Shapes.MIDDLE_TO_LEFT}` },\n '╊': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: `${Shapes.TOP_TO_BOTTOM} ${Shapes.MIDDLE_TO_RIGHT}` },\n\n // Dashed\n '╌': { [Style.NORMAL]: Shapes.TWO_DASHES_HORIZONTAL },\n '╍': { [Style.BOLD]: Shapes.TWO_DASHES_HORIZONTAL },\n '┄': { [Style.NORMAL]: Shapes.THREE_DASHES_HORIZONTAL },\n '┅': { [Style.BOLD]: Shapes.THREE_DASHES_HORIZONTAL },\n '┈': { [Style.NORMAL]: Shapes.FOUR_DASHES_HORIZONTAL },\n '┉': { [Style.BOLD]: Shapes.FOUR_DASHES_HORIZONTAL },\n '╎': { [Style.NORMAL]: Shapes.TWO_DASHES_VERTICAL },\n '╏': { [Style.BOLD]: Shapes.TWO_DASHES_VERTICAL },\n '┆': { [Style.NORMAL]: Shapes.THREE_DASHES_VERTICAL },\n '┇': { [Style.BOLD]: Shapes.THREE_DASHES_VERTICAL },\n '┊': { [Style.NORMAL]: Shapes.FOUR_DASHES_VERTICAL },\n '┋': { [Style.BOLD]: Shapes.FOUR_DASHES_VERTICAL },\n\n // Curved\n '╭': { [Style.NORMAL]: 'C.5,1,.5,.5,1,.5' },\n '╮': { [Style.NORMAL]: 'C.5,1,.5,.5,0,.5' },\n '╯': { [Style.NORMAL]: 'C.5,0,.5,.5,0,.5' },\n '╰': { [Style.NORMAL]: 'C.5,0,.5,.5,1,.5' }\n};\n\n/**\n * Try drawing a custom block element or box drawing character, returning whether it was\n * successfully drawn.\n */\nexport function tryDrawCustomChar(\n ctx: CanvasRenderingContext2D,\n c: string,\n xOffset: number,\n yOffset: number,\n scaledCellWidth: number,\n scaledCellHeight: number\n): boolean {\n const blockElementDefinition = blockElementDefinitions[c];\n if (blockElementDefinition) {\n drawBlockElementChar(ctx, blockElementDefinition, xOffset, yOffset, scaledCellWidth, scaledCellHeight);\n return true;\n }\n\n const patternDefinition = patternCharacterDefinitions[c];\n if (patternDefinition) {\n drawPatternChar(ctx, patternDefinition, xOffset, yOffset, scaledCellWidth, scaledCellHeight);\n return true;\n }\n\n const boxDrawingDefinition = boxDrawingDefinitions[c];\n if (boxDrawingDefinition) {\n drawBoxDrawingChar(ctx, boxDrawingDefinition, xOffset, yOffset, scaledCellWidth, scaledCellHeight);\n return true;\n }\n\n return false;\n}\n\nfunction drawBlockElementChar(\n ctx: CanvasRenderingContext2D,\n charDefinition: IBlockVector[],\n xOffset: number,\n yOffset: number,\n scaledCellWidth: number,\n scaledCellHeight: number\n): void {\n for (let i = 0; i < charDefinition.length; i++) {\n const box = charDefinition[i];\n const xEighth = scaledCellWidth / 8;\n const yEighth = scaledCellHeight / 8;\n ctx.fillRect(\n xOffset + box.x * xEighth,\n yOffset + box.y * yEighth,\n box.w * xEighth,\n box.h * yEighth\n );\n }\n}\n\nconst cachedPatterns: Map<PatternDefinition, Map</* fillStyle */string, CanvasPattern>> = new Map();\n\nfunction drawPatternChar(\n ctx: CanvasRenderingContext2D,\n charDefinition: number[][],\n xOffset: number,\n yOffset: number,\n scaledCellWidth: number,\n scaledCellHeight: number\n): void {\n let patternSet = cachedPatterns.get(charDefinition);\n if (!patternSet) {\n patternSet = new Map();\n cachedPatterns.set(charDefinition, patternSet);\n }\n const fillStyle = ctx.fillStyle;\n if (typeof fillStyle !== 'string') {\n throw new Error(`Unexpected fillStyle type \"${fillStyle}\"`);\n }\n let pattern = patternSet.get(fillStyle);\n if (!pattern) {\n const width = charDefinition[0].length;\n const height = charDefinition.length;\n const tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = width;\n tmpCanvas.height = height;\n const tmpCtx = throwIfFalsy(tmpCanvas.getContext('2d'));\n const imageData = new ImageData(width, height);\n\n // Extract rgba from fillStyle\n let r: number;\n let g: number;\n let b: number;\n let a: number;\n if (fillStyle.startsWith('#')) {\n r = parseInt(fillStyle.substr(1, 2), 16);\n g = parseInt(fillStyle.substr(3, 2), 16);\n b = parseInt(fillStyle.substr(5, 2), 16);\n a = fillStyle.length > 7 && parseInt(fillStyle.substr(7, 2), 16) || 1;\n } else if (fillStyle.startsWith('rgba')) {\n ([r, g, b, a] = fillStyle.substring(5, fillStyle.length - 1).split(',').map(e => parseFloat(e)));\n } else {\n throw new Error(`Unexpected fillStyle color format \"${fillStyle}\" when drawing pattern glyph`);\n }\n\n for (let y = 0; y < height; y++) {\n for (let x = 0; x < width; x++) {\n imageData.data[(y * width + x) * 4 ] = r;\n imageData.data[(y * width + x) * 4 + 1] = g;\n imageData.data[(y * width + x) * 4 + 2] = b;\n imageData.data[(y * width + x) * 4 + 3] = charDefinition[y][x] * (a * 255);\n }\n }\n tmpCtx.putImageData(imageData, 0, 0);\n pattern = throwIfFalsy(ctx.createPattern(tmpCanvas, null));\n patternSet.set(fillStyle, pattern);\n }\n ctx.fillStyle = pattern;\n ctx.fillRect(xOffset, yOffset, scaledCellWidth, scaledCellHeight);\n}\n\n/**\n * Draws the following box drawing characters by mapping a subset of SVG d attribute instructions to\n * canvas draw calls.\n *\n * Box styles: ┎┰┒┍┯┑╓╥╖╒╤╕ ┏┳┓┌┲┓┌┬┐┏┱┐\n * ┌─┬─┐ ┏━┳━┓ ╔═╦═╗ ┠╂┨┝┿┥╟╫╢╞╪╡ ┡╇┩├╊┫┢╈┪┣╉┤\n * │ │ │ ┃ ┃ ┃ ║ ║ ║ ┖┸┚┕┷┙╙╨╜╘╧╛ └┴┘└┺┛┗┻┛┗┹┘\n * ├─┼─┤ ┣━╋━┫ ╠═╬═╣ ┏┱┐┌┲┓┌┬┐┌┬┐ ┏┳┓┌┮┓┌┬┐┏┭┐\n * │ │ │ ┃ ┃ ┃ ║ ║ ║ ┡╃┤├╄┩├╆┪┢╅┤ ┞╀┦├┾┫┟╁┧┣┽┤\n * └─┴─┘ ┗━┻━┛ ╚═╩═╝ └┴┘└┴┘└┺┛┗┹┘ └┴┘└┶┛┗┻┛┗┵┘\n *\n * Other:\n * ╭─╮ ╲ ╱ ╷╻╎╏┆┇┊┋ ╺╾╴ ╌╌╌ ┄┄┄ ┈┈┈\n * │ │ ╳ ╽╿╎╏┆┇┊┋ ╶╼╸ ╍╍╍ ┅┅┅ ┉┉┉\n * ╰─╯ ╱ ╲ ╹╵╎╏┆┇┊┋\n *\n * All box drawing characters:\n * ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏\n * ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟\n * ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯\n * ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿\n * ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏\n * ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟\n * ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯\n * ╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿\n *\n * ---\n *\n * Box drawing alignment tests: █\n * ▉\n * ╔══╦══╗ ┌──┬──┐ ╭──┬──╮ ╭──┬──╮ ┏━━┳━━┓ ┎┒┏┑ ╷ ╻ ┏┯┓ ┌┰┐ ▊ ╱╲╱╲╳╳╳\n * ║┌─╨─┐║ │╔═╧═╗│ │╒═╪═╕│ │╓─╁─╖│ ┃┌─╂─┐┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ ┝╋┥ ▋ ╲╱╲╱╳╳╳\n * ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╿ │┃ ┍╅╆┓ ╵ ╹ ┗┷┛ └┸┘ ▌ ╱╲╱╲╳╳╳\n * ╠╡ ╳ ╞╣ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┐ ╎ ┏┅┅┓ ┋ ▍ ╲╱╲╱╳╳╳\n * ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▎\n * ║└─╥─┘║ │╚═╤═╝│ │╘═╪═╛│ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▏\n * ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█\n *\n * Source: https://www.w3.org/2001/06/utf-8-test/UTF-8-demo.html\n */\nfunction drawBoxDrawingChar(\n ctx: CanvasRenderingContext2D,\n charDefinition: { [fontWeight: number]: string | ((xp: number, yp: number) => string) },\n xOffset: number,\n yOffset: number,\n scaledCellWidth: number,\n scaledCellHeight: number\n): void {\n ctx.strokeStyle = ctx.fillStyle;\n for (const [fontWeight, instructions] of Object.entries(charDefinition)) {\n ctx.beginPath();\n ctx.lineWidth = window.devicePixelRatio * Number.parseInt(fontWeight);\n let actualInstructions: string;\n if (typeof instructions === 'function') {\n const xp = .15;\n const yp = .15 / scaledCellHeight * scaledCellWidth;\n actualInstructions = instructions(xp, yp);\n } else {\n actualInstructions = instructions;\n }\n for (const instruction of actualInstructions.split(' ')) {\n const type = instruction[0];\n const f = svgToCanvasInstructionMap[type];\n if (!f) {\n console.error(`Could not find drawing instructions for \"${type}\"`);\n continue;\n }\n const args: string[] = instruction.substring(1).split(',');\n if (!args[0] || !args[1]) {\n continue;\n }\n f(ctx, translateArgs(args, scaledCellWidth, scaledCellHeight, xOffset, yOffset));\n }\n ctx.stroke();\n ctx.closePath();\n }\n}\n\nfunction clamp(value: number, max: number, min: number = 0): number {\n return Math.max(Math.min(value, max), min);\n}\n\nconst svgToCanvasInstructionMap: { [index: string]: any } = {\n 'C': (ctx: CanvasRenderingContext2D, args: number[]) => ctx.bezierCurveTo(args[0], args[1], args[2], args[3], args[4], args[5]),\n 'L': (ctx: CanvasRenderingContext2D, args: number[]) => ctx.lineTo(args[0], args[1]),\n 'M': (ctx: CanvasRenderingContext2D, args: number[]) => ctx.moveTo(args[0], args[1])\n};\n\nfunction translateArgs(args: string[], cellWidth: number, cellHeight: number, xOffset: number, yOffset: number): number[] {\n const result = args.map(e => parseFloat(e) || parseInt(e));\n\n if (result.length < 2) {\n throw new Error('Too few arguments for instruction');\n }\n\n for (let x = 0; x < result.length; x += 2) {\n // Translate from 0-1 to 0-cellWidth\n result[x] *= cellWidth;\n // Ensure coordinate doesn't escape cell bounds and round to the nearest 0.5 to ensure a crisp\n // line at 100% devicePixelRatio\n if (result[x] !== 0) {\n result[x] = clamp(Math.round(result[x] + 0.5) - 0.5, cellWidth, 0);\n }\n // Apply the cell's offset (ie. x*cellWidth)\n result[x] += xOffset;\n }\n\n for (let y = 1; y < result.length; y += 2) {\n // Translate from 0-1 to 0-cellHeight\n result[y] *= cellHeight;\n // Ensure coordinate doesn't escape cell bounds and round to the nearest 0.5 to ensure a crisp\n // line at 100% devicePixelRatio\n if (result[y] !== 0) {\n result[y] = clamp(Math.round(result[y] + 0.5) - 0.5, cellHeight, 0);\n }\n // Apply the cell's offset (ie. x*cellHeight)\n result[y] += yOffset;\n }\n\n return result;\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nexport class GridCache<T> {\n public cache: (T | undefined)[][];\n\n public constructor() {\n this.cache = [];\n }\n\n public resize(width: number, height: number): void {\n for (let x = 0; x < width; x++) {\n if (this.cache.length <= x) {\n this.cache.push([]);\n }\n for (let y = this.cache[x].length; y < height; y++) {\n this.cache[x].push(undefined);\n }\n this.cache[x].length = height;\n }\n this.cache.length = width;\n }\n\n public clear(): void {\n for (let x = 0; x < this.cache.length; x++) {\n for (let y = 0; y < this.cache[x].length; y++) {\n this.cache[x][y] = undefined;\n }\n }\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderDimensions } from 'browser/renderer/Types';\nimport { BaseRenderLayer } from './BaseRenderLayer';\nimport { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants';\nimport { is256Color } from 'browser/renderer/atlas/CharAtlasUtils';\nimport { IColorSet, ILinkifierEvent, ILinkifier, ILinkifier2 } from 'browser/Types';\nimport { IBufferService, IOptionsService } from 'common/services/Services';\n\nexport class LinkRenderLayer extends BaseRenderLayer {\n private _state: ILinkifierEvent | undefined;\n\n constructor(\n container: HTMLElement,\n zIndex: number,\n colors: IColorSet,\n rendererId: number,\n linkifier: ILinkifier,\n linkifier2: ILinkifier2,\n @IBufferService bufferService: IBufferService,\n @IOptionsService optionsService: IOptionsService\n ) {\n super(container, 'link', zIndex, true, colors, rendererId, bufferService, optionsService);\n linkifier.onShowLinkUnderline(e => this._onShowLinkUnderline(e));\n linkifier.onHideLinkUnderline(e => this._onHideLinkUnderline(e));\n\n linkifier2.onShowLinkUnderline(e => this._onShowLinkUnderline(e));\n linkifier2.onHideLinkUnderline(e => this._onHideLinkUnderline(e));\n }\n\n public resize(dim: IRenderDimensions): void {\n super.resize(dim);\n // Resizing the canvas discards the contents of the canvas so clear state\n this._state = undefined;\n }\n\n public reset(): void {\n this._clearCurrentLink();\n }\n\n private _clearCurrentLink(): void {\n if (this._state) {\n this._clearCells(this._state.x1, this._state.y1, this._state.cols - this._state.x1, 1);\n const middleRowCount = this._state.y2 - this._state.y1 - 1;\n if (middleRowCount > 0) {\n this._clearCells(0, this._state.y1 + 1, this._state.cols, middleRowCount);\n }\n this._clearCells(0, this._state.y2, this._state.x2, 1);\n this._state = undefined;\n }\n }\n\n private _onShowLinkUnderline(e: ILinkifierEvent): void {\n if (e.fg === INVERTED_DEFAULT_COLOR) {\n this._ctx.fillStyle = this._colors.background.css;\n } else if (e.fg && is256Color(e.fg)) {\n // 256 color support\n this._ctx.fillStyle = this._colors.ansi[e.fg].css;\n } else {\n this._ctx.fillStyle = this._colors.foreground.css;\n }\n\n if (e.y1 === e.y2) {\n // Single line link\n this._fillBottomLineAtCells(e.x1, e.y1, e.x2 - e.x1);\n } else {\n // Multi-line link\n this._fillBottomLineAtCells(e.x1, e.y1, e.cols - e.x1);\n for (let y = e.y1 + 1; y < e.y2; y++) {\n this._fillBottomLineAtCells(0, y, e.cols);\n }\n this._fillBottomLineAtCells(0, e.y2, e.x2);\n }\n this._state = e;\n }\n\n private _onHideLinkUnderline(e: ILinkifierEvent): void {\n this._clearCurrentLink();\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { TextRenderLayer } from 'browser/renderer/TextRenderLayer';\nimport { SelectionRenderLayer } from 'browser/renderer/SelectionRenderLayer';\nimport { CursorRenderLayer } from 'browser/renderer/CursorRenderLayer';\nimport { IRenderLayer, IRenderer, IRenderDimensions, IRequestRedrawEvent } from 'browser/renderer/Types';\nimport { LinkRenderLayer } from 'browser/renderer/LinkRenderLayer';\nimport { Disposable } from 'common/Lifecycle';\nimport { IColorSet, ILinkifier, ILinkifier2 } from 'browser/Types';\nimport { ICharSizeService } from 'browser/services/Services';\nimport { IBufferService, IOptionsService, IInstantiationService } from 'common/services/Services';\nimport { removeTerminalFromCache } from 'browser/renderer/atlas/CharAtlasCache';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { IDecorationOptions, IDecoration } from 'xterm';\n\nlet nextRendererId = 1;\n\nexport class Renderer extends Disposable implements IRenderer {\n private _id = nextRendererId++;\n\n private _renderLayers: IRenderLayer[];\n private _devicePixelRatio: number;\n\n public dimensions: IRenderDimensions;\n\n private _onRequestRedraw = new EventEmitter<IRequestRedrawEvent>();\n public get onRequestRedraw(): IEvent<IRequestRedrawEvent> { return this._onRequestRedraw.event; }\n\n constructor(\n private _colors: IColorSet,\n private readonly _screenElement: HTMLElement,\n linkifier: ILinkifier,\n linkifier2: ILinkifier2,\n @IInstantiationService instantiationService: IInstantiationService,\n @IBufferService private readonly _bufferService: IBufferService,\n @ICharSizeService private readonly _charSizeService: ICharSizeService,\n @IOptionsService private readonly _optionsService: IOptionsService\n ) {\n super();\n const allowTransparency = this._optionsService.rawOptions.allowTransparency;\n this._renderLayers = [\n instantiationService.createInstance(TextRenderLayer, this._screenElement, 0, this._colors, allowTransparency, this._id),\n instantiationService.createInstance(SelectionRenderLayer, this._screenElement, 1, this._colors, this._id),\n instantiationService.createInstance(LinkRenderLayer, this._screenElement, 2, this._colors, this._id, linkifier, linkifier2),\n instantiationService.createInstance(CursorRenderLayer, this._screenElement, 3, this._colors, this._id, this._onRequestRedraw)\n ];\n this.dimensions = {\n scaledCharWidth: 0,\n scaledCharHeight: 0,\n scaledCellWidth: 0,\n scaledCellHeight: 0,\n scaledCharLeft: 0,\n scaledCharTop: 0,\n scaledCanvasWidth: 0,\n scaledCanvasHeight: 0,\n canvasWidth: 0,\n canvasHeight: 0,\n actualCellWidth: 0,\n actualCellHeight: 0\n };\n this._devicePixelRatio = window.devicePixelRatio;\n this._updateDimensions();\n this.onOptionsChanged();\n }\n\n public dispose(): void {\n for (const l of this._renderLayers) {\n l.dispose();\n }\n super.dispose();\n removeTerminalFromCache(this._id);\n }\n\n public onDevicePixelRatioChange(): void {\n // If the device pixel ratio changed, the char atlas needs to be regenerated\n // and the terminal needs to refreshed\n if (this._devicePixelRatio !== window.devicePixelRatio) {\n this._devicePixelRatio = window.devicePixelRatio;\n this.onResize(this._bufferService.cols, this._bufferService.rows);\n }\n }\n\n public setColors(colors: IColorSet): void {\n this._colors = colors;\n // Clear layers and force a full render\n for (const l of this._renderLayers) {\n l.setColors(this._colors);\n l.reset();\n }\n }\n\n public onResize(cols: number, rows: number): void {\n // Update character and canvas dimensions\n this._updateDimensions();\n\n // Resize all render layers\n for (const l of this._renderLayers) {\n l.resize(this.dimensions);\n }\n\n // Resize the screen\n this._screenElement.style.width = `${this.dimensions.canvasWidth}px`;\n this._screenElement.style.height = `${this.dimensions.canvasHeight}px`;\n }\n\n public onCharSizeChanged(): void {\n this.onResize(this._bufferService.cols, this._bufferService.rows);\n }\n\n public onBlur(): void {\n this._runOperation(l => l.onBlur());\n }\n\n public onFocus(): void {\n this._runOperation(l => l.onFocus());\n }\n\n public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean = false): void {\n this._runOperation(l => l.onSelectionChanged(start, end, columnSelectMode));\n }\n\n public onCursorMove(): void {\n this._runOperation(l => l.onCursorMove());\n }\n\n public onOptionsChanged(): void {\n this._runOperation(l => l.onOptionsChanged());\n }\n\n public clear(): void {\n this._runOperation(l => l.reset());\n }\n\n private _runOperation(operation: (layer: IRenderLayer) => void): void {\n for (const l of this._renderLayers) {\n operation(l);\n }\n }\n\n /**\n * Performs the refresh loop callback, calling refresh only if a refresh is\n * necessary before queueing up the next one.\n */\n public renderRows(start: number, end: number): void {\n for (const l of this._renderLayers) {\n l.onGridChanged(start, end);\n }\n }\n\n public clearTextureAtlas(): void {\n for (const layer of this._renderLayers) {\n layer.clearTextureAtlas();\n }\n }\n\n /**\n * Recalculates the character and canvas dimensions.\n */\n private _updateDimensions(): void {\n if (!this._charSizeService.hasValidSize) {\n return;\n }\n\n // Calculate the scaled character width. Width is floored as it must be\n // drawn to an integer grid in order for the CharAtlas \"stamps\" to not be\n // blurry. When text is drawn to the grid not using the CharAtlas, it is\n // clipped to ensure there is no overlap with the next cell.\n this.dimensions.scaledCharWidth = Math.floor(this._charSizeService.width * window.devicePixelRatio);\n\n // Calculate the scaled character height. Height is ceiled in case\n // devicePixelRatio is a floating point number in order to ensure there is\n // enough space to draw the character to the cell.\n this.dimensions.scaledCharHeight = Math.ceil(this._charSizeService.height * window.devicePixelRatio);\n\n // Calculate the scaled cell height, if lineHeight is not 1 then the value\n // will be floored because since lineHeight can never be lower then 1, there\n // is a guarentee that the scaled line height will always be larger than\n // scaled char height.\n this.dimensions.scaledCellHeight = Math.floor(this.dimensions.scaledCharHeight * this._optionsService.rawOptions.lineHeight);\n\n // Calculate the y coordinate within a cell that text should draw from in\n // order to draw in the center of a cell.\n this.dimensions.scaledCharTop = this._optionsService.rawOptions.lineHeight === 1 ? 0 : Math.round((this.dimensions.scaledCellHeight - this.dimensions.scaledCharHeight) / 2);\n\n // Calculate the scaled cell width, taking the letterSpacing into account.\n this.dimensions.scaledCellWidth = this.dimensions.scaledCharWidth + Math.round(this._optionsService.rawOptions.letterSpacing);\n\n // Calculate the x coordinate with a cell that text should draw from in\n // order to draw in the center of a cell.\n this.dimensions.scaledCharLeft = Math.floor(this._optionsService.rawOptions.letterSpacing / 2);\n\n // Recalculate the canvas dimensions; scaled* define the actual number of\n // pixel in the canvas\n this.dimensions.scaledCanvasHeight = this._bufferService.rows * this.dimensions.scaledCellHeight;\n this.dimensions.scaledCanvasWidth = this._bufferService.cols * this.dimensions.scaledCellWidth;\n\n // The the size of the canvas on the page. It's very important that this\n // rounds to nearest integer and not ceils as browsers often set\n // window.devicePixelRatio as something like 1.100000023841858, when it's\n // actually 1.1. Ceiling causes blurriness as the backing canvas image is 1\n // pixel too large for the canvas element size.\n this.dimensions.canvasHeight = Math.round(this.dimensions.scaledCanvasHeight / window.devicePixelRatio);\n this.dimensions.canvasWidth = Math.round(this.dimensions.scaledCanvasWidth / window.devicePixelRatio);\n\n // Get the _actual_ dimensions of an individual cell. This needs to be\n // derived from the canvasWidth/Height calculated above which takes into\n // account window.devicePixelRatio. ICharSizeService.width/height by itself\n // is insufficient when the page is not at 100% zoom level as it's measured\n // in CSS pixels, but the actual char size on the canvas can differ.\n this.dimensions.actualCellHeight = this.dimensions.canvasHeight / this._bufferService.rows;\n this.dimensions.actualCellWidth = this.dimensions.canvasWidth / this._bufferService.cols;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nexport function throwIfFalsy<T>(value: T | undefined | null): T {\n if (!value) {\n throw new Error('value must not be falsy');\n }\n return value;\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderDimensions } from 'browser/renderer/Types';\nimport { BaseRenderLayer } from 'browser/renderer/BaseRenderLayer';\nimport { IColorSet } from 'browser/Types';\nimport { IBufferService, IOptionsService } from 'common/services/Services';\n\ninterface ISelectionState {\n start?: [number, number];\n end?: [number, number];\n columnSelectMode?: boolean;\n ydisp?: number;\n}\n\nexport class SelectionRenderLayer extends BaseRenderLayer {\n private _state!: ISelectionState;\n\n constructor(\n container: HTMLElement,\n zIndex: number,\n colors: IColorSet,\n rendererId: number,\n @IBufferService bufferService: IBufferService,\n @IOptionsService optionsService: IOptionsService\n ) {\n super(container, 'selection', zIndex, true, colors, rendererId, bufferService, optionsService);\n this._clearState();\n }\n\n private _clearState(): void {\n this._state = {\n start: undefined,\n end: undefined,\n columnSelectMode: undefined,\n ydisp: undefined\n };\n }\n\n public resize(dim: IRenderDimensions): void {\n super.resize(dim);\n // Resizing the canvas discards the contents of the canvas so clear state\n this._clearState();\n }\n\n public reset(): void {\n if (this._state.start && this._state.end) {\n this._clearState();\n this._clearAll();\n }\n }\n\n public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void {\n // Selection has not changed\n if (!this._didStateChange(start, end, columnSelectMode, this._bufferService.buffer.ydisp)) {\n return;\n }\n\n // Remove all selections\n this._clearAll();\n\n // Selection does not exist\n if (!start || !end) {\n this._clearState();\n return;\n }\n\n // Translate from buffer position to viewport position\n const viewportStartRow = start[1] - this._bufferService.buffer.ydisp;\n const viewportEndRow = end[1] - this._bufferService.buffer.ydisp;\n const viewportCappedStartRow = Math.max(viewportStartRow, 0);\n const viewportCappedEndRow = Math.min(viewportEndRow, this._bufferService.rows - 1);\n\n // No need to draw the selection\n if (viewportCappedStartRow >= this._bufferService.rows || viewportCappedEndRow < 0) {\n this._state.ydisp = this._bufferService.buffer.ydisp;\n return;\n }\n\n this._ctx.fillStyle = this._colors.selectionTransparent.css;\n\n if (columnSelectMode) {\n const startCol = start[0];\n const width = end[0] - startCol;\n const height = viewportCappedEndRow - viewportCappedStartRow + 1;\n this._fillCells(startCol, viewportCappedStartRow, width, height);\n } else {\n // Draw first row\n const startCol = viewportStartRow === viewportCappedStartRow ? start[0] : 0;\n const startRowEndCol = viewportCappedStartRow === viewportEndRow ? end[0] : this._bufferService.cols;\n this._fillCells(startCol, viewportCappedStartRow, startRowEndCol - startCol, 1);\n\n // Draw middle rows\n const middleRowsCount = Math.max(viewportCappedEndRow - viewportCappedStartRow - 1, 0);\n this._fillCells(0, viewportCappedStartRow + 1, this._bufferService.cols, middleRowsCount);\n\n // Draw final row\n if (viewportCappedStartRow !== viewportCappedEndRow) {\n // Only draw viewportEndRow if it's not the same as viewportStartRow\n const endCol = viewportEndRow === viewportCappedEndRow ? end[0] : this._bufferService.cols;\n this._fillCells(0, viewportCappedEndRow, endCol, 1);\n }\n }\n\n // Save state for next render\n this._state.start = [start[0], start[1]];\n this._state.end = [end[0], end[1]];\n this._state.columnSelectMode = columnSelectMode;\n this._state.ydisp = this._bufferService.buffer.ydisp;\n }\n\n private _didStateChange(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean, ydisp: number): boolean {\n return !this._areCoordinatesEqual(start, this._state.start) ||\n !this._areCoordinatesEqual(end, this._state.end) ||\n columnSelectMode !== this._state.columnSelectMode ||\n ydisp !== this._state.ydisp;\n }\n\n private _areCoordinatesEqual(coord1: [number, number] | undefined, coord2: [number, number] | undefined): boolean {\n if (!coord1 || !coord2) {\n return false;\n }\n\n return coord1[0] === coord2[0] && coord1[1] === coord2[1];\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderDimensions } from 'browser/renderer/Types';\nimport { CharData, ICellData } from 'common/Types';\nimport { GridCache } from 'browser/renderer/GridCache';\nimport { BaseRenderLayer } from 'browser/renderer/BaseRenderLayer';\nimport { AttributeData } from 'common/buffer/AttributeData';\nimport { NULL_CELL_CODE, Content } from 'common/buffer/Constants';\nimport { IColorSet } from 'browser/Types';\nimport { CellData } from 'common/buffer/CellData';\nimport { IOptionsService, IBufferService } from 'common/services/Services';\nimport { ICharacterJoinerService } from 'browser/services/Services';\nimport { JoinedCellData } from 'browser/services/CharacterJoinerService';\n\n/**\n * This CharData looks like a null character, which will forc a clear and render\n * when the character changes (a regular space ' ' character may not as it's\n * drawn state is a cleared cell).\n */\n// const OVERLAP_OWNED_CHAR_DATA: CharData = [null, '', 0, -1];\n\nexport class TextRenderLayer extends BaseRenderLayer {\n private _state: GridCache<CharData>;\n private _characterWidth: number = 0;\n private _characterFont: string = '';\n private _characterOverlapCache: { [key: string]: boolean } = {};\n private _workCell = new CellData();\n\n constructor(\n container: HTMLElement,\n zIndex: number,\n colors: IColorSet,\n alpha: boolean,\n rendererId: number,\n @IBufferService bufferService: IBufferService,\n @IOptionsService optionsService: IOptionsService,\n @ICharacterJoinerService private readonly _characterJoinerService: ICharacterJoinerService\n ) {\n super(container, 'text', zIndex, alpha, colors, rendererId, bufferService, optionsService);\n this._state = new GridCache<CharData>();\n }\n\n public resize(dim: IRenderDimensions): void {\n super.resize(dim);\n\n // Clear the character width cache if the font or width has changed\n const terminalFont = this._getFont(false, false);\n if (this._characterWidth !== dim.scaledCharWidth || this._characterFont !== terminalFont) {\n this._characterWidth = dim.scaledCharWidth;\n this._characterFont = terminalFont;\n this._characterOverlapCache = {};\n }\n // Resizing the canvas discards the contents of the canvas so clear state\n this._state.clear();\n this._state.resize(this._bufferService.cols, this._bufferService.rows);\n }\n\n public reset(): void {\n this._state.clear();\n this._clearAll();\n }\n\n private _forEachCell(\n firstRow: number,\n lastRow: number,\n callback: (\n cell: ICellData,\n x: number,\n y: number\n ) => void\n ): void {\n for (let y = firstRow; y <= lastRow; y++) {\n const row = y + this._bufferService.buffer.ydisp;\n const line = this._bufferService.buffer.lines.get(row);\n const joinedRanges = this._characterJoinerService.getJoinedCharacters(row);\n for (let x = 0; x < this._bufferService.cols; x++) {\n line!.loadCell(x, this._workCell);\n let cell = this._workCell;\n\n // If true, indicates that the current character(s) to draw were joined.\n let isJoined = false;\n let lastCharX = x;\n\n // The character to the left is a wide character, drawing is owned by\n // the char at x-1\n if (cell.getWidth() === 0) {\n continue;\n }\n\n // Process any joined character ranges as needed. Because of how the\n // ranges are produced, we know that they are valid for the characters\n // and attributes of our input.\n if (joinedRanges.length > 0 && x === joinedRanges[0][0]) {\n isJoined = true;\n const range = joinedRanges.shift()!;\n\n // We already know the exact start and end column of the joined range,\n // so we get the string and width representing it directly\n cell = new JoinedCellData(\n this._workCell,\n line!.translateToString(true, range[0], range[1]),\n range[1] - range[0]\n );\n\n // Skip over the cells occupied by this range in the loop\n lastCharX = range[1] - 1;\n }\n\n // If the character is an overlapping char and the character to the\n // right is a space, take ownership of the cell to the right. We skip\n // this check for joined characters because their rendering likely won't\n // yield the same result as rendering the last character individually.\n if (!isJoined && this._isOverlapping(cell)) {\n // If the character is overlapping, we want to force a re-render on every\n // frame. This is specifically to work around the case where two\n // overlaping chars `a` and `b` are adjacent, the cursor is moved to b and a\n // space is added. Without this, the first half of `b` would never\n // get removed, and `a` would not re-render because it thinks it's\n // already in the correct state.\n // this._state.cache[x][y] = OVERLAP_OWNED_CHAR_DATA;\n if (lastCharX < line!.length - 1 && line!.getCodePoint(lastCharX + 1) === NULL_CELL_CODE) {\n // patch width to 2\n cell.content &= ~Content.WIDTH_MASK;\n cell.content |= 2 << Content.WIDTH_SHIFT;\n // this._clearChar(x + 1, y);\n // The overlapping char's char data will force a clear and render when the\n // overlapping char is no longer to the left of the character and also when\n // the space changes to another character.\n // this._state.cache[x + 1][y] = OVERLAP_OWNED_CHAR_DATA;\n }\n }\n\n callback(\n cell,\n x,\n y\n );\n\n x = lastCharX;\n }\n }\n }\n\n /**\n * Draws the background for a specified range of columns. Tries to batch adjacent cells of the\n * same color together to reduce draw calls.\n */\n private _drawBackground(firstRow: number, lastRow: number): void {\n const ctx = this._ctx;\n const cols = this._bufferService.cols;\n let startX: number = 0;\n let startY: number = 0;\n let prevFillStyle: string | null = null;\n\n ctx.save();\n\n this._forEachCell(firstRow, lastRow, (cell, x, y) => {\n // libvte and xterm both draw the background (but not foreground) of invisible characters,\n // so we should too.\n let nextFillStyle = null; // null represents default background color\n\n if (cell.isInverse()) {\n if (cell.isFgDefault()) {\n nextFillStyle = this._colors.foreground.css;\n } else if (cell.isFgRGB()) {\n nextFillStyle = `rgb(${AttributeData.toColorRGB(cell.getFgColor()).join(',')})`;\n } else {\n nextFillStyle = this._colors.ansi[cell.getFgColor()].css;\n }\n } else if (cell.isBgRGB()) {\n nextFillStyle = `rgb(${AttributeData.toColorRGB(cell.getBgColor()).join(',')})`;\n } else if (cell.isBgPalette()) {\n nextFillStyle = this._colors.ansi[cell.getBgColor()].css;\n }\n\n if (prevFillStyle === null) {\n // This is either the first iteration, or the default background was set. Either way, we\n // don't need to draw anything.\n startX = x;\n startY = y;\n }\n\n if (y !== startY) {\n // our row changed, draw the previous row\n ctx.fillStyle = prevFillStyle || '';\n this._fillCells(startX, startY, cols - startX, 1);\n startX = x;\n startY = y;\n } else if (prevFillStyle !== nextFillStyle) {\n // our color changed, draw the previous characters in this row\n ctx.fillStyle = prevFillStyle || '';\n this._fillCells(startX, startY, x - startX, 1);\n startX = x;\n startY = y;\n }\n\n prevFillStyle = nextFillStyle;\n });\n\n // flush the last color we encountered\n if (prevFillStyle !== null) {\n ctx.fillStyle = prevFillStyle;\n this._fillCells(startX, startY, cols - startX, 1);\n }\n\n ctx.restore();\n }\n\n private _drawForeground(firstRow: number, lastRow: number): void {\n this._forEachCell(firstRow, lastRow, (cell, x, y) => {\n if (cell.isInvisible()) {\n return;\n }\n this._drawChars(cell, x, y);\n if (cell.isUnderline() || cell.isStrikethrough()) {\n this._ctx.save();\n\n if (cell.isInverse()) {\n if (cell.isBgDefault()) {\n this._ctx.fillStyle = this._colors.background.css;\n } else if (cell.isBgRGB()) {\n this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getBgColor()).join(',')})`;\n } else {\n let bg = cell.getBgColor();\n if (this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && bg < 8) {\n bg += 8;\n }\n this._ctx.fillStyle = this._colors.ansi[bg].css;\n }\n } else {\n if (cell.isFgDefault()) {\n this._ctx.fillStyle = this._colors.foreground.css;\n } else if (cell.isFgRGB()) {\n this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getFgColor()).join(',')})`;\n } else {\n let fg = cell.getFgColor();\n if (this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && fg < 8) {\n fg += 8;\n }\n this._ctx.fillStyle = this._colors.ansi[fg].css;\n }\n }\n\n if (cell.isStrikethrough()) {\n this._fillMiddleLineAtCells(x, y, cell.getWidth());\n }\n if (cell.isUnderline()) {\n this._fillBottomLineAtCells(x, y, cell.getWidth());\n }\n this._ctx.restore();\n }\n });\n }\n\n public onGridChanged(firstRow: number, lastRow: number): void {\n // Resize has not been called yet\n if (this._state.cache.length === 0) {\n return;\n }\n\n if (this._charAtlas) {\n this._charAtlas.beginFrame();\n }\n\n this._clearCells(0, firstRow, this._bufferService.cols, lastRow - firstRow + 1);\n this._drawBackground(firstRow, lastRow);\n this._drawForeground(firstRow, lastRow);\n }\n\n public onOptionsChanged(): void {\n this._setTransparency(this._optionsService.rawOptions.allowTransparency);\n }\n\n /**\n * Whether a character is overlapping to the next cell.\n */\n private _isOverlapping(cell: ICellData): boolean {\n // Only single cell characters can be overlapping, rendering issues can\n // occur without this check\n if (cell.getWidth() !== 1) {\n return false;\n }\n\n // We assume that any ascii character will not overlap\n if (cell.getCode() < 256) {\n return false;\n }\n\n const chars = cell.getChars();\n\n // Deliver from cache if available\n if (this._characterOverlapCache.hasOwnProperty(chars)) {\n return this._characterOverlapCache[chars];\n }\n\n // Setup the font\n this._ctx.save();\n this._ctx.font = this._characterFont;\n\n // Measure the width of the character, but Math.floor it\n // because that is what the renderer does when it calculates\n // the character dimensions we are comparing against\n const overlaps = Math.floor(this._ctx.measureText(chars).width) > this._characterWidth;\n\n // Restore the original context\n this._ctx.restore();\n\n // Cache and return\n this._characterOverlapCache[chars] = overlaps;\n return overlaps;\n }\n\n /**\n * Clear the charcater at the cell specified.\n * @param x The column of the char.\n * @param y The row of the char.\n */\n // private _clearChar(x: number, y: number): void {\n // let colsToClear = 1;\n // // Clear the adjacent character if it was wide\n // const state = this._state.cache[x][y];\n // if (state && state[CHAR_DATA_WIDTH_INDEX] === 2) {\n // colsToClear = 2;\n // }\n // this.clearCells(x, y, colsToClear, 1);\n // }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IGlyphIdentifier } from 'browser/renderer/atlas/Types';\nimport { IDisposable } from 'common/Types';\n\nexport abstract class BaseCharAtlas implements IDisposable {\n private _didWarmUp: boolean = false;\n\n public dispose(): void { }\n\n /**\n * Perform any work needed to warm the cache before it can be used. May be called multiple times.\n * Implement _doWarmUp instead if you only want to get called once.\n */\n public warmUp(): void {\n if (!this._didWarmUp) {\n this._doWarmUp();\n this._didWarmUp = true;\n }\n }\n\n /**\n * Perform any work needed to warm the cache before it can be used. Used by the default\n * implementation of warmUp(), and will only be called once.\n */\n private _doWarmUp(): void { }\n\n public clear(): void { }\n\n /**\n * Called when we start drawing a new frame.\n *\n * TODO: We rely on this getting called by TextRenderLayer. This should really be called by\n * Renderer instead, but we need to make Renderer the source-of-truth for the char atlas, instead\n * of BaseRenderLayer.\n */\n public beginFrame(): void { }\n\n /**\n * May be called before warmUp finishes, however it is okay for the implementation to\n * do nothing and return false in that case.\n *\n * @param ctx Where to draw the character onto.\n * @param glyph Information about what to draw\n * @param x The position on the context to start drawing at\n * @param y The position on the context to start drawing at\n * @returns The success state. True if we drew the character.\n */\n public abstract draw(\n ctx: CanvasRenderingContext2D,\n glyph: IGlyphIdentifier,\n x: number,\n y: number\n ): boolean;\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { generateConfig, configEquals } from 'browser/renderer/atlas/CharAtlasUtils';\nimport { BaseCharAtlas } from 'browser/renderer/atlas/BaseCharAtlas';\nimport { DynamicCharAtlas } from 'browser/renderer/atlas/DynamicCharAtlas';\nimport { ICharAtlasConfig } from 'browser/renderer/atlas/Types';\nimport { IColorSet } from 'browser/Types';\nimport { ITerminalOptions } from 'common/services/Services';\n\ninterface ICharAtlasCacheEntry {\n atlas: BaseCharAtlas;\n config: ICharAtlasConfig;\n // N.B. This implementation potentially holds onto copies of the terminal forever, so\n // this may cause memory leaks.\n ownedBy: number[];\n}\n\nconst charAtlasCache: ICharAtlasCacheEntry[] = [];\n\n/**\n * Acquires a char atlas, either generating a new one or returning an existing\n * one that is in use by another terminal.\n */\nexport function acquireCharAtlas(\n options: ITerminalOptions,\n rendererId: number,\n colors: IColorSet,\n scaledCharWidth: number,\n scaledCharHeight: number\n): BaseCharAtlas {\n const newConfig = generateConfig(scaledCharWidth, scaledCharHeight, options, colors);\n\n // Check to see if the renderer already owns this config\n for (let i = 0; i < charAtlasCache.length; i++) {\n const entry = charAtlasCache[i];\n const ownedByIndex = entry.ownedBy.indexOf(rendererId);\n if (ownedByIndex >= 0) {\n if (configEquals(entry.config, newConfig)) {\n return entry.atlas;\n }\n // The configs differ, release the renderer from the entry\n if (entry.ownedBy.length === 1) {\n entry.atlas.dispose();\n charAtlasCache.splice(i, 1);\n } else {\n entry.ownedBy.splice(ownedByIndex, 1);\n }\n break;\n }\n }\n\n // Try match a char atlas from the cache\n for (let i = 0; i < charAtlasCache.length; i++) {\n const entry = charAtlasCache[i];\n if (configEquals(entry.config, newConfig)) {\n // Add the renderer to the cache entry and return\n entry.ownedBy.push(rendererId);\n return entry.atlas;\n }\n }\n\n const newEntry: ICharAtlasCacheEntry = {\n atlas: new DynamicCharAtlas(\n document,\n newConfig\n ),\n config: newConfig,\n ownedBy: [rendererId]\n };\n charAtlasCache.push(newEntry);\n return newEntry.atlas;\n}\n\n/**\n * Removes a terminal reference from the cache, allowing its memory to be freed.\n */\nexport function removeTerminalFromCache(rendererId: number): void {\n for (let i = 0; i < charAtlasCache.length; i++) {\n const index = charAtlasCache[i].ownedBy.indexOf(rendererId);\n if (index !== -1) {\n if (charAtlasCache[i].ownedBy.length === 1) {\n // Remove the cache entry if it's the only renderer\n charAtlasCache[i].atlas.dispose();\n charAtlasCache.splice(i, 1);\n } else {\n // Remove the reference from the cache entry\n charAtlasCache[i].ownedBy.splice(index, 1);\n }\n break;\n }\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ICharAtlasConfig } from 'browser/renderer/atlas/Types';\nimport { DEFAULT_COLOR } from 'common/buffer/Constants';\nimport { IColorSet, IPartialColorSet } from 'browser/Types';\nimport { ITerminalOptions } from 'common/services/Services';\n\nexport function generateConfig(scaledCharWidth: number, scaledCharHeight: number, options: ITerminalOptions, colors: IColorSet): ICharAtlasConfig {\n // null out some fields that don't matter\n const clonedColors: IPartialColorSet = {\n foreground: colors.foreground,\n background: colors.background,\n cursor: undefined,\n cursorAccent: undefined,\n selection: undefined,\n ansi: [...colors.ansi]\n };\n return {\n devicePixelRatio: window.devicePixelRatio,\n scaledCharWidth,\n scaledCharHeight,\n fontFamily: options.fontFamily,\n fontSize: options.fontSize,\n fontWeight: options.fontWeight,\n fontWeightBold: options.fontWeightBold,\n allowTransparency: options.allowTransparency,\n colors: clonedColors\n };\n}\n\nexport function configEquals(a: ICharAtlasConfig, b: ICharAtlasConfig): boolean {\n for (let i = 0; i < a.colors.ansi.length; i++) {\n if (a.colors.ansi[i].rgba !== b.colors.ansi[i].rgba) {\n return false;\n }\n }\n return a.devicePixelRatio === b.devicePixelRatio &&\n a.fontFamily === b.fontFamily &&\n a.fontSize === b.fontSize &&\n a.fontWeight === b.fontWeight &&\n a.fontWeightBold === b.fontWeightBold &&\n a.allowTransparency === b.allowTransparency &&\n a.scaledCharWidth === b.scaledCharWidth &&\n a.scaledCharHeight === b.scaledCharHeight &&\n a.colors.foreground === b.colors.foreground &&\n a.colors.background === b.colors.background;\n}\n\nexport function is256Color(colorCode: number): boolean {\n return colorCode < DEFAULT_COLOR;\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { isFirefox, isLegacyEdge } from 'common/Platform';\n\nexport const INVERTED_DEFAULT_COLOR = 257;\nexport const DIM_OPACITY = 0.5;\n// The text baseline is set conditionally by browser. Using 'ideographic' for Firefox or Legacy Edge would\n// result in truncated text (Issue 3353). Using 'bottom' for Chrome would result in slightly\n// unaligned Powerline fonts (PR 3356#issuecomment-850928179).\nexport const TEXT_BASELINE: CanvasTextBaseline = isFirefox || isLegacyEdge ? 'bottom' : 'ideographic';\n\nexport const CHAR_ATLAS_CELL_SPACING = 1;\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { DIM_OPACITY, INVERTED_DEFAULT_COLOR, TEXT_BASELINE } from 'browser/renderer/atlas/Constants';\nimport { IGlyphIdentifier, ICharAtlasConfig } from 'browser/renderer/atlas/Types';\nimport { BaseCharAtlas } from 'browser/renderer/atlas/BaseCharAtlas';\nimport { DEFAULT_ANSI_COLORS } from 'browser/ColorManager';\nimport { LRUMap } from 'browser/renderer/atlas/LRUMap';\nimport { isFirefox, isSafari } from 'common/Platform';\nimport { IColor } from 'browser/Types';\nimport { throwIfFalsy } from 'browser/renderer/RendererUtils';\nimport { color } from 'browser/Color';\n\n// In practice we're probably never going to exhaust a texture this large. For debugging purposes,\n// however, it can be useful to set this to a really tiny value, to verify that LRU eviction works.\nconst TEXTURE_WIDTH = 1024;\nconst TEXTURE_HEIGHT = 1024;\n\nconst TRANSPARENT_COLOR = {\n css: 'rgba(0, 0, 0, 0)',\n rgba: 0\n};\n\n// Drawing to the cache is expensive: If we have to draw more than this number of glyphs to the\n// cache in a single frame, give up on trying to cache anything else, and try to finish the current\n// frame ASAP.\n//\n// This helps to limit the amount of damage a program can do when it would otherwise thrash the\n// cache.\nconst FRAME_CACHE_DRAW_LIMIT = 100;\n\n/**\n * The number of milliseconds to wait before generating the ImageBitmap, this is to debounce/batch\n * the operation as window.createImageBitmap is asynchronous.\n */\nconst GLYPH_BITMAP_COMMIT_DELAY = 100;\n\ninterface IGlyphCacheValue {\n index: number;\n isEmpty: boolean;\n inBitmap: boolean;\n}\n\nexport function getGlyphCacheKey(glyph: IGlyphIdentifier): number {\n // Note that this only returns a valid key when code < 256\n // Layout:\n // 0b00000000000000000000000000000001: italic (1)\n // 0b00000000000000000000000000000010: dim (1)\n // 0b00000000000000000000000000000100: bold (1)\n // 0b00000000000000000000111111111000: fg (9)\n // 0b00000000000111111111000000000000: bg (9)\n // 0b00011111111000000000000000000000: code (8)\n // 0b11100000000000000000000000000000: unused (3)\n return glyph.code << 21 | glyph.bg << 12 | glyph.fg << 3 | (glyph.bold ? 0 : 4) + (glyph.dim ? 0 : 2) + (glyph.italic ? 0 : 1);\n}\n\nexport class DynamicCharAtlas extends BaseCharAtlas {\n // An ordered map that we're using to keep track of where each glyph is in the atlas texture.\n // It's ordered so that we can determine when to remove the old entries.\n private _cacheMap: LRUMap<IGlyphCacheValue>;\n\n // The texture that the atlas is drawn to\n private _cacheCanvas: HTMLCanvasElement;\n private _cacheCtx: CanvasRenderingContext2D;\n\n // A temporary context that glyphs are drawn to before being transfered to the atlas.\n private _tmpCtx: CanvasRenderingContext2D;\n\n // The number of characters stored in the atlas by width/height\n private _width: number;\n private _height: number;\n\n private _drawToCacheCount: number = 0;\n\n // An array of glyph keys that are waiting on the bitmap to be generated.\n private _glyphsWaitingOnBitmap: IGlyphCacheValue[] = [];\n\n // The timeout that is used to batch bitmap generation so it's not requested for every new glyph.\n private _bitmapCommitTimeout: number | null = null;\n\n // The bitmap to draw from, this is much faster on other browsers than others.\n private _bitmap: ImageBitmap | null = null;\n\n constructor(document: Document, private _config: ICharAtlasConfig) {\n super();\n this._cacheCanvas = document.createElement('canvas');\n this._cacheCanvas.width = TEXTURE_WIDTH;\n this._cacheCanvas.height = TEXTURE_HEIGHT;\n // The canvas needs alpha because we use clearColor to convert the background color to alpha.\n // It might also contain some characters with transparent backgrounds if allowTransparency is\n // set.\n this._cacheCtx = throwIfFalsy(this._cacheCanvas.getContext('2d', { alpha: true }));\n\n const tmpCanvas = document.createElement('canvas');\n tmpCanvas.width = this._config.scaledCharWidth;\n tmpCanvas.height = this._config.scaledCharHeight;\n this._tmpCtx = throwIfFalsy(tmpCanvas.getContext('2d', { alpha: this._config.allowTransparency }));\n\n this._width = Math.floor(TEXTURE_WIDTH / this._config.scaledCharWidth);\n this._height = Math.floor(TEXTURE_HEIGHT / this._config.scaledCharHeight);\n const capacity = this._width * this._height;\n this._cacheMap = new LRUMap(capacity);\n this._cacheMap.prealloc(capacity);\n\n // This is useful for debugging\n // document.body.appendChild(this._cacheCanvas);\n }\n\n public dispose(): void {\n if (this._bitmapCommitTimeout !== null) {\n window.clearTimeout(this._bitmapCommitTimeout);\n this._bitmapCommitTimeout = null;\n }\n }\n\n public beginFrame(): void {\n this._drawToCacheCount = 0;\n }\n\n public clear(): void {\n if (this._cacheMap.size > 0) {\n const capacity = this._width * this._height;\n this._cacheMap = new LRUMap(capacity);\n this._cacheMap.prealloc(capacity);\n }\n this._cacheCtx.clearRect(0, 0, TEXTURE_WIDTH, TEXTURE_HEIGHT);\n this._tmpCtx.clearRect(0, 0, this._config.scaledCharWidth, this._config.scaledCharHeight);\n }\n\n public draw(\n ctx: CanvasRenderingContext2D,\n glyph: IGlyphIdentifier,\n x: number,\n y: number\n ): boolean {\n // Space is always an empty cell, special case this as it's so common\n if (glyph.code === 32) {\n return true;\n }\n\n // Exit early for uncachable glyphs\n if (!this._canCache(glyph)) {\n return false;\n }\n\n const glyphKey = getGlyphCacheKey(glyph);\n const cacheValue = this._cacheMap.get(glyphKey);\n if (cacheValue !== null && cacheValue !== undefined) {\n this._drawFromCache(ctx, cacheValue, x, y);\n return true;\n }\n if (this._drawToCacheCount < FRAME_CACHE_DRAW_LIMIT) {\n let index;\n if (this._cacheMap.size < this._cacheMap.capacity) {\n index = this._cacheMap.size;\n } else {\n // we're out of space, so our call to set will delete this item\n index = this._cacheMap.peek()!.index;\n }\n const cacheValue = this._drawToCache(glyph, index);\n this._cacheMap.set(glyphKey, cacheValue);\n this._drawFromCache(ctx, cacheValue, x, y);\n return true;\n }\n return false;\n }\n\n private _canCache(glyph: IGlyphIdentifier): boolean {\n // Only cache ascii and extended characters for now, to be safe. In the future, we could do\n // something more complicated to determine the expected width of a character.\n //\n // If we switch the renderer over to webgl at some point, we may be able to use blending modes\n // to draw overlapping glyphs from the atlas:\n // https://github.com/servo/webrender/issues/464#issuecomment-255632875\n // https://webglfundamentals.org/webgl/lessons/webgl-text-texture.html\n return glyph.code < 256;\n }\n\n private _toCoordinateX(index: number): number {\n return (index % this._width) * this._config.scaledCharWidth;\n }\n\n private _toCoordinateY(index: number): number {\n return Math.floor(index / this._width) * this._config.scaledCharHeight;\n }\n\n private _drawFromCache(\n ctx: CanvasRenderingContext2D,\n cacheValue: IGlyphCacheValue,\n x: number,\n y: number\n ): void {\n // We don't actually need to do anything if this is whitespace.\n if (cacheValue.isEmpty) {\n return;\n }\n const cacheX = this._toCoordinateX(cacheValue.index);\n const cacheY = this._toCoordinateY(cacheValue.index);\n ctx.drawImage(\n cacheValue.inBitmap ? this._bitmap! : this._cacheCanvas,\n cacheX,\n cacheY,\n this._config.scaledCharWidth,\n this._config.scaledCharHeight,\n x,\n y,\n this._config.scaledCharWidth,\n this._config.scaledCharHeight\n );\n }\n\n private _getColorFromAnsiIndex(idx: number): IColor {\n if (idx < this._config.colors.ansi.length) {\n return this._config.colors.ansi[idx];\n }\n return DEFAULT_ANSI_COLORS[idx];\n }\n\n private _getBackgroundColor(glyph: IGlyphIdentifier): IColor {\n if (this._config.allowTransparency) {\n // The background color might have some transparency, so we need to render it as fully\n // transparent in the atlas. Otherwise we'd end up drawing the transparent background twice\n // around the anti-aliased edges of the glyph, and it would look too dark.\n return TRANSPARENT_COLOR;\n }\n if (glyph.bg === INVERTED_DEFAULT_COLOR) {\n return this._config.colors.foreground;\n }\n if (glyph.bg < 256) {\n return this._getColorFromAnsiIndex(glyph.bg);\n }\n return this._config.colors.background;\n }\n\n private _getForegroundColor(glyph: IGlyphIdentifier): IColor {\n if (glyph.fg === INVERTED_DEFAULT_COLOR) {\n return color.opaque(this._config.colors.background);\n }\n if (glyph.fg < 256) {\n // 256 color support\n return this._getColorFromAnsiIndex(glyph.fg);\n }\n return this._config.colors.foreground;\n }\n\n // TODO: We do this (or something similar) in multiple places. We should split this off\n // into a shared function.\n private _drawToCache(glyph: IGlyphIdentifier, index: number): IGlyphCacheValue {\n this._drawToCacheCount++;\n\n this._tmpCtx.save();\n\n // draw the background\n const backgroundColor = this._getBackgroundColor(glyph);\n // Use a 'copy' composite operation to clear any existing glyph out of _tmpCtxWithAlpha, regardless of\n // transparency in backgroundColor\n this._tmpCtx.globalCompositeOperation = 'copy';\n this._tmpCtx.fillStyle = backgroundColor.css;\n this._tmpCtx.fillRect(0, 0, this._config.scaledCharWidth, this._config.scaledCharHeight);\n this._tmpCtx.globalCompositeOperation = 'source-over';\n\n // draw the foreground/glyph\n const fontWeight = glyph.bold ? this._config.fontWeightBold : this._config.fontWeight;\n const fontStyle = glyph.italic ? 'italic' : '';\n this._tmpCtx.font =\n `${fontStyle} ${fontWeight} ${this._config.fontSize * this._config.devicePixelRatio}px ${this._config.fontFamily}`;\n this._tmpCtx.textBaseline = TEXT_BASELINE;\n\n this._tmpCtx.fillStyle = this._getForegroundColor(glyph).css;\n\n // Apply alpha to dim the character\n if (glyph.dim) {\n this._tmpCtx.globalAlpha = DIM_OPACITY;\n }\n // Draw the character\n this._tmpCtx.fillText(glyph.chars, 0, this._config.scaledCharHeight);\n\n // clear the background from the character to avoid issues with drawing over the previous\n // character if it extends past it's bounds\n let imageData = this._tmpCtx.getImageData(\n 0, 0, this._config.scaledCharWidth, this._config.scaledCharHeight\n );\n let isEmpty = false;\n if (!this._config.allowTransparency) {\n isEmpty = clearColor(imageData, backgroundColor);\n }\n\n // If this charcater is underscore and empty, shift it up until it is visible, try for a maximum\n // of 5 pixels.\n if (isEmpty && glyph.chars === '_' && !this._config.allowTransparency) {\n for (let offset = 1; offset <= 5; offset++) {\n // Draw the character\n this._tmpCtx.fillText(glyph.chars, 0, this._config.scaledCharHeight - offset);\n\n // clear the background from the character to avoid issues with drawing over the previous\n // character if it extends past it's bounds\n imageData = this._tmpCtx.getImageData(\n 0, 0, this._config.scaledCharWidth, this._config.scaledCharHeight\n );\n isEmpty = clearColor(imageData, backgroundColor);\n if (!isEmpty) {\n break;\n }\n }\n }\n\n this._tmpCtx.restore();\n\n // copy the data from imageData to _cacheCanvas\n const x = this._toCoordinateX(index);\n const y = this._toCoordinateY(index);\n // putImageData doesn't do any blending, so it will overwrite any existing cache entry for us\n this._cacheCtx.putImageData(imageData, x, y);\n\n // Add the glyph and queue it to the bitmap (if the browser supports it)\n const cacheValue = {\n index,\n isEmpty,\n inBitmap: false\n };\n this._addGlyphToBitmap(cacheValue);\n\n return cacheValue;\n }\n\n private _addGlyphToBitmap(cacheValue: IGlyphCacheValue): void {\n // Support is patchy for createImageBitmap at the moment, pass a canvas back\n // if support is lacking as drawImage works there too. Firefox is also\n // included here as ImageBitmap appears both buggy and has horrible\n // performance (tested on v55).\n if (!('createImageBitmap' in window) || isFirefox || isSafari) {\n return;\n }\n\n // Add the glyph to the queue\n this._glyphsWaitingOnBitmap.push(cacheValue);\n\n // Check if bitmap generation timeout already exists\n if (this._bitmapCommitTimeout !== null) {\n return;\n }\n\n this._bitmapCommitTimeout = window.setTimeout(() => this._generateBitmap(), GLYPH_BITMAP_COMMIT_DELAY);\n }\n\n private _generateBitmap(): void {\n const glyphsMovingToBitmap = this._glyphsWaitingOnBitmap;\n this._glyphsWaitingOnBitmap = [];\n window.createImageBitmap(this._cacheCanvas).then(bitmap => {\n // Set bitmap\n this._bitmap = bitmap;\n\n // Mark all new glyphs as in bitmap, excluding glyphs that came in after\n // the bitmap was requested\n for (let i = 0; i < glyphsMovingToBitmap.length; i++) {\n const value = glyphsMovingToBitmap[i];\n // It doesn't matter if the value was already evicted, it will be\n // released from memory after this block if so.\n value.inBitmap = true;\n }\n });\n this._bitmapCommitTimeout = null;\n }\n}\n\n// This is used for debugging the renderer, just swap out `new DynamicCharAtlas` with\n// `new NoneCharAtlas`.\nexport class NoneCharAtlas extends BaseCharAtlas {\n constructor(document: Document, config: ICharAtlasConfig) {\n super();\n }\n\n public draw(\n ctx: CanvasRenderingContext2D,\n glyph: IGlyphIdentifier,\n x: number,\n y: number\n ): boolean {\n return false;\n }\n}\n\n/**\n * Makes a partiicular rgb color in an ImageData completely transparent.\n * @returns True if the result is \"empty\", meaning all pixels are fully transparent.\n */\nfunction clearColor(imageData: ImageData, color: IColor): boolean {\n let isEmpty = true;\n const r = color.rgba >>> 24;\n const g = color.rgba >>> 16 & 0xFF;\n const b = color.rgba >>> 8 & 0xFF;\n for (let offset = 0; offset < imageData.data.length; offset += 4) {\n if (imageData.data[offset] === r &&\n imageData.data[offset + 1] === g &&\n imageData.data[offset + 2] === b) {\n imageData.data[offset + 3] = 0;\n } else {\n isEmpty = false;\n }\n }\n return isEmpty;\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\ninterface ILinkedListNode<T> {\n prev: ILinkedListNode<T> | null;\n next: ILinkedListNode<T> | null;\n key: number | null;\n value: T | null;\n}\n\nexport class LRUMap<T> {\n private _map: { [key: number]: ILinkedListNode<T> } = {};\n private _head: ILinkedListNode<T> | null = null;\n private _tail: ILinkedListNode<T> | null = null;\n private _nodePool: ILinkedListNode<T>[] = [];\n public size: number = 0;\n\n constructor(public capacity: number) { }\n\n private _unlinkNode(node: ILinkedListNode<T>): void {\n const prev = node.prev;\n const next = node.next;\n if (node === this._head) {\n this._head = next;\n }\n if (node === this._tail) {\n this._tail = prev;\n }\n if (prev !== null) {\n prev.next = next;\n }\n if (next !== null) {\n next.prev = prev;\n }\n }\n\n private _appendNode(node: ILinkedListNode<T>): void {\n const tail = this._tail;\n if (tail !== null) {\n tail.next = node;\n }\n node.prev = tail;\n node.next = null;\n this._tail = node;\n if (this._head === null) {\n this._head = node;\n }\n }\n\n /**\n * Preallocate a bunch of linked-list nodes. Allocating these nodes ahead of time means that\n * they're more likely to live next to each other in memory, which seems to improve performance.\n *\n * Each empty object only consumes about 60 bytes of memory, so this is pretty cheap, even for\n * large maps.\n */\n public prealloc(count: number): void {\n const nodePool = this._nodePool;\n for (let i = 0; i < count; i++) {\n nodePool.push({\n prev: null,\n next: null,\n key: null,\n value: null\n });\n }\n }\n\n public get(key: number): T | null {\n // This is unsafe: We're assuming our keyspace doesn't overlap with Object.prototype. However,\n // it's faster than calling hasOwnProperty, and in our case, it would never overlap.\n const node = this._map[key];\n if (node !== undefined) {\n this._unlinkNode(node);\n this._appendNode(node);\n return node.value;\n }\n return null;\n }\n\n /**\n * Gets a value from a key without marking it as the most recently used item.\n */\n public peekValue(key: number): T | null {\n const node = this._map[key];\n if (node !== undefined) {\n return node.value;\n }\n return null;\n }\n\n public peek(): T | null {\n const head = this._head;\n return head === null ? null : head.value;\n }\n\n public set(key: number, value: T): void {\n // This is unsafe: See note above.\n let node = this._map[key];\n if (node !== undefined) {\n // already exists, we just need to mutate it and move it to the end of the list\n node = this._map[key];\n this._unlinkNode(node);\n node.value = value;\n } else if (this.size >= this.capacity) {\n // we're out of space: recycle the head node, move it to the tail\n node = this._head!;\n this._unlinkNode(node);\n delete this._map[node.key!];\n node.key = key;\n node.value = value;\n this._map[key] = node;\n } else {\n // make a new element\n const nodePool = this._nodePool;\n if (nodePool.length > 0) {\n // use a preallocated node if we can\n node = nodePool.pop()!;\n node.key = key;\n node.value = value;\n } else {\n node = {\n prev: null,\n next: null,\n key,\n value\n };\n }\n this._map[key] = node;\n this.size++;\n }\n this._appendNode(node);\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderer, IRenderDimensions, IRequestRedrawEvent } from 'browser/renderer/Types';\nimport { BOLD_CLASS, ITALIC_CLASS, CURSOR_CLASS, CURSOR_STYLE_BLOCK_CLASS, CURSOR_BLINK_CLASS, CURSOR_STYLE_BAR_CLASS, CURSOR_STYLE_UNDERLINE_CLASS, DomRendererRowFactory } from 'browser/renderer/dom/DomRendererRowFactory';\nimport { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants';\nimport { Disposable } from 'common/Lifecycle';\nimport { IColorSet, ILinkifierEvent, ILinkifier, ILinkifier2 } from 'browser/Types';\nimport { ICharSizeService } from 'browser/services/Services';\nimport { IOptionsService, IBufferService, IInstantiationService } from 'common/services/Services';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { color } from 'browser/Color';\nimport { removeElementFromParent } from 'browser/Dom';\n\nconst TERMINAL_CLASS_PREFIX = 'xterm-dom-renderer-owner-';\nconst ROW_CONTAINER_CLASS = 'xterm-rows';\nconst FG_CLASS_PREFIX = 'xterm-fg-';\nconst BG_CLASS_PREFIX = 'xterm-bg-';\nconst FOCUS_CLASS = 'xterm-focus';\nconst SELECTION_CLASS = 'xterm-selection';\n\nlet nextTerminalId = 1;\n\n/**\n * A fallback renderer for when canvas is slow. This is not meant to be\n * particularly fast or feature complete, more just stable and usable for when\n * canvas is not an option.\n */\nexport class DomRenderer extends Disposable implements IRenderer {\n private _rowFactory: DomRendererRowFactory;\n private _terminalClass: number = nextTerminalId++;\n\n private _themeStyleElement!: HTMLStyleElement;\n private _dimensionsStyleElement!: HTMLStyleElement;\n private _rowContainer: HTMLElement;\n private _rowElements: HTMLElement[] = [];\n private _selectionContainer: HTMLElement;\n\n public dimensions: IRenderDimensions;\n\n public get onRequestRedraw(): IEvent<IRequestRedrawEvent> { return new EventEmitter<IRequestRedrawEvent>().event; }\n\n constructor(\n private _colors: IColorSet,\n private readonly _element: HTMLElement,\n private readonly _screenElement: HTMLElement,\n private readonly _viewportElement: HTMLElement,\n private readonly _linkifier: ILinkifier,\n private readonly _linkifier2: ILinkifier2,\n @IInstantiationService instantiationService: IInstantiationService,\n @ICharSizeService private readonly _charSizeService: ICharSizeService,\n @IOptionsService private readonly _optionsService: IOptionsService,\n @IBufferService private readonly _bufferService: IBufferService\n ) {\n super();\n this._rowContainer = document.createElement('div');\n this._rowContainer.classList.add(ROW_CONTAINER_CLASS);\n this._rowContainer.style.lineHeight = 'normal';\n this._rowContainer.setAttribute('aria-hidden', 'true');\n this._refreshRowElements(this._bufferService.cols, this._bufferService.rows);\n this._selectionContainer = document.createElement('div');\n this._selectionContainer.classList.add(SELECTION_CLASS);\n this._selectionContainer.setAttribute('aria-hidden', 'true');\n\n this.dimensions = {\n scaledCharWidth: 0,\n scaledCharHeight: 0,\n scaledCellWidth: 0,\n scaledCellHeight: 0,\n scaledCharLeft: 0,\n scaledCharTop: 0,\n scaledCanvasWidth: 0,\n scaledCanvasHeight: 0,\n canvasWidth: 0,\n canvasHeight: 0,\n actualCellWidth: 0,\n actualCellHeight: 0\n };\n this._updateDimensions();\n this._injectCss();\n\n this._rowFactory = instantiationService.createInstance(DomRendererRowFactory, document, this._colors);\n\n this._element.classList.add(TERMINAL_CLASS_PREFIX + this._terminalClass);\n this._screenElement.appendChild(this._rowContainer);\n this._screenElement.appendChild(this._selectionContainer);\n\n this._linkifier.onShowLinkUnderline(e => this._onLinkHover(e));\n this._linkifier.onHideLinkUnderline(e => this._onLinkLeave(e));\n\n this._linkifier2.onShowLinkUnderline(e => this._onLinkHover(e));\n this._linkifier2.onHideLinkUnderline(e => this._onLinkLeave(e));\n }\n\n public dispose(): void {\n this._element.classList.remove(TERMINAL_CLASS_PREFIX + this._terminalClass);\n\n // Outside influences such as React unmounts may manipulate the DOM before our disposal.\n // https://github.com/xtermjs/xterm.js/issues/2960\n removeElementFromParent(this._rowContainer, this._selectionContainer, this._themeStyleElement, this._dimensionsStyleElement);\n\n super.dispose();\n }\n\n private _updateDimensions(): void {\n this.dimensions.scaledCharWidth = this._charSizeService.width * window.devicePixelRatio;\n this.dimensions.scaledCharHeight = Math.ceil(this._charSizeService.height * window.devicePixelRatio);\n this.dimensions.scaledCellWidth = this.dimensions.scaledCharWidth + Math.round(this._optionsService.rawOptions.letterSpacing);\n this.dimensions.scaledCellHeight = Math.floor(this.dimensions.scaledCharHeight * this._optionsService.rawOptions.lineHeight);\n this.dimensions.scaledCharLeft = 0;\n this.dimensions.scaledCharTop = 0;\n this.dimensions.scaledCanvasWidth = this.dimensions.scaledCellWidth * this._bufferService.cols;\n this.dimensions.scaledCanvasHeight = this.dimensions.scaledCellHeight * this._bufferService.rows;\n this.dimensions.canvasWidth = Math.round(this.dimensions.scaledCanvasWidth / window.devicePixelRatio);\n this.dimensions.canvasHeight = Math.round(this.dimensions.scaledCanvasHeight / window.devicePixelRatio);\n this.dimensions.actualCellWidth = this.dimensions.canvasWidth / this._bufferService.cols;\n this.dimensions.actualCellHeight = this.dimensions.canvasHeight / this._bufferService.rows;\n\n for (const element of this._rowElements) {\n element.style.width = `${this.dimensions.canvasWidth}px`;\n element.style.height = `${this.dimensions.actualCellHeight}px`;\n element.style.lineHeight = `${this.dimensions.actualCellHeight}px`;\n // Make sure rows don't overflow onto following row\n element.style.overflow = 'hidden';\n }\n\n if (!this._dimensionsStyleElement) {\n this._dimensionsStyleElement = document.createElement('style');\n this._screenElement.appendChild(this._dimensionsStyleElement);\n }\n\n const styles =\n `${this._terminalSelector} .${ROW_CONTAINER_CLASS} span {` +\n ` display: inline-block;` +\n ` height: 100%;` +\n ` vertical-align: top;` +\n ` width: ${this.dimensions.actualCellWidth}px` +\n `}`;\n\n this._dimensionsStyleElement.textContent = styles;\n\n this._selectionContainer.style.height = this._viewportElement.style.height;\n this._screenElement.style.width = `${this.dimensions.canvasWidth}px`;\n this._screenElement.style.height = `${this.dimensions.canvasHeight}px`;\n }\n\n public setColors(colors: IColorSet): void {\n this._colors = colors;\n this._injectCss();\n }\n\n private _injectCss(): void {\n if (!this._themeStyleElement) {\n this._themeStyleElement = document.createElement('style');\n this._screenElement.appendChild(this._themeStyleElement);\n }\n\n // Base CSS\n let styles =\n `${this._terminalSelector} .${ROW_CONTAINER_CLASS} {` +\n ` color: ${this._colors.foreground.css};` +\n ` font-family: ${this._optionsService.rawOptions.fontFamily};` +\n ` font-size: ${this._optionsService.rawOptions.fontSize}px;` +\n `}`;\n // Text styles\n styles +=\n `${this._terminalSelector} span:not(.${BOLD_CLASS}) {` +\n ` font-weight: ${this._optionsService.rawOptions.fontWeight};` +\n `}` +\n `${this._terminalSelector} span.${BOLD_CLASS} {` +\n ` font-weight: ${this._optionsService.rawOptions.fontWeightBold};` +\n `}` +\n `${this._terminalSelector} span.${ITALIC_CLASS} {` +\n ` font-style: italic;` +\n `}`;\n // Blink animation\n styles +=\n `@keyframes blink_box_shadow` + `_` + this._terminalClass + ` {` +\n ` 50% {` +\n ` box-shadow: none;` +\n ` }` +\n `}`;\n styles +=\n `@keyframes blink_block` + `_` + this._terminalClass + ` {` +\n ` 0% {` +\n ` background-color: ${this._colors.cursor.css};` +\n ` color: ${this._colors.cursorAccent.css};` +\n ` }` +\n ` 50% {` +\n ` background-color: ${this._colors.cursorAccent.css};` +\n ` color: ${this._colors.cursor.css};` +\n ` }` +\n `}`;\n // Cursor\n styles +=\n `${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} {` +\n ` outline: 1px solid ${this._colors.cursor.css};` +\n ` outline-offset: -1px;` +\n `}` +\n `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_BLINK_CLASS}:not(.${CURSOR_STYLE_BLOCK_CLASS}) {` +\n ` animation: blink_box_shadow` + `_` + this._terminalClass + ` 1s step-end infinite;` +\n `}` +\n `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_BLINK_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} {` +\n ` animation: blink_block` + `_` + this._terminalClass + ` 1s step-end infinite;` +\n `}` +\n `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} {` +\n ` background-color: ${this._colors.cursor.css};` +\n ` color: ${this._colors.cursorAccent.css};` +\n `}` +\n `${this._terminalSelector} .${ROW_CONTAINER_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_BAR_CLASS} {` +\n ` box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${this._colors.cursor.css} inset;` +\n `}` +\n `${this._terminalSelector} .${ROW_CONTAINER_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_UNDERLINE_CLASS} {` +\n ` box-shadow: 0 -1px 0 ${this._colors.cursor.css} inset;` +\n `}`;\n // Selection\n styles +=\n `${this._terminalSelector} .${SELECTION_CLASS} {` +\n ` position: absolute;` +\n ` top: 0;` +\n ` left: 0;` +\n ` z-index: 1;` +\n ` pointer-events: none;` +\n `}` +\n `${this._terminalSelector} .${SELECTION_CLASS} div {` +\n ` position: absolute;` +\n ` background-color: ${this._colors.selectionTransparent.css};` +\n `}`;\n // Colors\n this._colors.ansi.forEach((c, i) => {\n styles +=\n `${this._terminalSelector} .${FG_CLASS_PREFIX}${i} { color: ${c.css}; }` +\n `${this._terminalSelector} .${BG_CLASS_PREFIX}${i} { background-color: ${c.css}; }`;\n });\n styles +=\n `${this._terminalSelector} .${FG_CLASS_PREFIX}${INVERTED_DEFAULT_COLOR} { color: ${color.opaque(this._colors.background).css}; }` +\n `${this._terminalSelector} .${BG_CLASS_PREFIX}${INVERTED_DEFAULT_COLOR} { background-color: ${this._colors.foreground.css}; }`;\n\n this._themeStyleElement.textContent = styles;\n }\n\n public onDevicePixelRatioChange(): void {\n this._updateDimensions();\n }\n\n private _refreshRowElements(cols: number, rows: number): void {\n // Add missing elements\n for (let i = this._rowElements.length; i <= rows; i++) {\n const row = document.createElement('div');\n this._rowContainer.appendChild(row);\n this._rowElements.push(row);\n }\n // Remove excess elements\n while (this._rowElements.length > rows) {\n this._rowContainer.removeChild(this._rowElements.pop()!);\n }\n }\n\n public onResize(cols: number, rows: number): void {\n this._refreshRowElements(cols, rows);\n this._updateDimensions();\n }\n\n public onCharSizeChanged(): void {\n this._updateDimensions();\n }\n\n public onBlur(): void {\n this._rowContainer.classList.remove(FOCUS_CLASS);\n }\n\n public onFocus(): void {\n this._rowContainer.classList.add(FOCUS_CLASS);\n }\n\n public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void {\n // Remove all selections\n while (this._selectionContainer.children.length) {\n this._selectionContainer.removeChild(this._selectionContainer.children[0]);\n }\n\n // Selection does not exist\n if (!start || !end) {\n return;\n }\n\n // Translate from buffer position to viewport position\n const viewportStartRow = start[1] - this._bufferService.buffer.ydisp;\n const viewportEndRow = end[1] - this._bufferService.buffer.ydisp;\n const viewportCappedStartRow = Math.max(viewportStartRow, 0);\n const viewportCappedEndRow = Math.min(viewportEndRow, this._bufferService.rows - 1);\n\n // No need to draw the selection\n if (viewportCappedStartRow >= this._bufferService.rows || viewportCappedEndRow < 0) {\n return;\n }\n\n // Create the selections\n const documentFragment = document.createDocumentFragment();\n\n if (columnSelectMode) {\n documentFragment.appendChild(\n this._createSelectionElement(viewportCappedStartRow, start[0], end[0], viewportCappedEndRow - viewportCappedStartRow + 1)\n );\n } else {\n // Draw first row\n const startCol = viewportStartRow === viewportCappedStartRow ? start[0] : 0;\n const endCol = viewportCappedStartRow === viewportEndRow ? end[0] : this._bufferService.cols;\n documentFragment.appendChild(this._createSelectionElement(viewportCappedStartRow, startCol, endCol));\n // Draw middle rows\n const middleRowsCount = viewportCappedEndRow - viewportCappedStartRow - 1;\n documentFragment.appendChild(this._createSelectionElement(viewportCappedStartRow + 1, 0, this._bufferService.cols, middleRowsCount));\n // Draw final row\n if (viewportCappedStartRow !== viewportCappedEndRow) {\n // Only draw viewportEndRow if it's not the same as viewporttartRow\n const endCol = viewportEndRow === viewportCappedEndRow ? end[0] : this._bufferService.cols;\n documentFragment.appendChild(this._createSelectionElement(viewportCappedEndRow, 0, endCol));\n }\n }\n this._selectionContainer.appendChild(documentFragment);\n }\n\n /**\n * Creates a selection element at the specified position.\n * @param row The row of the selection.\n * @param colStart The start column.\n * @param colEnd The end columns.\n */\n private _createSelectionElement(row: number, colStart: number, colEnd: number, rowCount: number = 1): HTMLElement {\n const element = document.createElement('div');\n element.style.height = `${rowCount * this.dimensions.actualCellHeight}px`;\n element.style.top = `${row * this.dimensions.actualCellHeight}px`;\n element.style.left = `${colStart * this.dimensions.actualCellWidth}px`;\n element.style.width = `${this.dimensions.actualCellWidth * (colEnd - colStart)}px`;\n return element;\n }\n\n public onCursorMove(): void {\n // No-op, the cursor is drawn when rows are drawn\n }\n\n public onOptionsChanged(): void {\n // Force a refresh\n this._updateDimensions();\n this._injectCss();\n }\n\n public clear(): void {\n for (const e of this._rowElements) {\n e.innerText = '';\n }\n }\n\n public renderRows(start: number, end: number): void {\n const cursorAbsoluteY = this._bufferService.buffer.ybase + this._bufferService.buffer.y;\n const cursorX = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);\n const cursorBlink = this._optionsService.rawOptions.cursorBlink;\n\n for (let y = start; y <= end; y++) {\n const rowElement = this._rowElements[y];\n rowElement.innerText = '';\n\n const row = y + this._bufferService.buffer.ydisp;\n const lineData = this._bufferService.buffer.lines.get(row);\n const cursorStyle = this._optionsService.rawOptions.cursorStyle;\n rowElement.appendChild(this._rowFactory.createRow(lineData!, row, row === cursorAbsoluteY, cursorStyle, cursorX, cursorBlink, this.dimensions.actualCellWidth, this._bufferService.cols));\n }\n }\n\n private get _terminalSelector(): string {\n return `.${TERMINAL_CLASS_PREFIX}${this._terminalClass}`;\n }\n\n private _onLinkHover(e: ILinkifierEvent): void {\n this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, true);\n }\n\n private _onLinkLeave(e: ILinkifierEvent): void {\n this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, false);\n }\n\n private _setCellUnderline(x: number, x2: number, y: number, y2: number, cols: number, enabled: boolean): void {\n while (x !== x2 || y !== y2) {\n const row = this._rowElements[y];\n if (!row) {\n return;\n }\n const span = row.children[x] as HTMLElement;\n if (span) {\n span.style.textDecoration = enabled ? 'underline' : 'none';\n }\n if (++x >= cols) {\n x = 0;\n y++;\n }\n }\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBufferLine } from 'common/Types';\nimport { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants';\nimport { NULL_CELL_CODE, WHITESPACE_CELL_CHAR, Attributes } from 'common/buffer/Constants';\nimport { CellData } from 'common/buffer/CellData';\nimport { ICoreService, IOptionsService } from 'common/services/Services';\nimport { color, rgba } from 'browser/Color';\nimport { IColorSet, IColor } from 'browser/Types';\nimport { ICharacterJoinerService } from 'browser/services/Services';\nimport { JoinedCellData } from 'browser/services/CharacterJoinerService';\n\nexport const BOLD_CLASS = 'xterm-bold';\nexport const DIM_CLASS = 'xterm-dim';\nexport const ITALIC_CLASS = 'xterm-italic';\nexport const UNDERLINE_CLASS = 'xterm-underline';\nexport const STRIKETHROUGH_CLASS = 'xterm-strikethrough';\nexport const CURSOR_CLASS = 'xterm-cursor';\nexport const CURSOR_BLINK_CLASS = 'xterm-cursor-blink';\nexport const CURSOR_STYLE_BLOCK_CLASS = 'xterm-cursor-block';\nexport const CURSOR_STYLE_BAR_CLASS = 'xterm-cursor-bar';\nexport const CURSOR_STYLE_UNDERLINE_CLASS = 'xterm-cursor-underline';\n\nexport class DomRendererRowFactory {\n private _workCell: CellData = new CellData();\n\n constructor(\n private readonly _document: Document,\n private _colors: IColorSet,\n @ICharacterJoinerService private readonly _characterJoinerService: ICharacterJoinerService,\n @IOptionsService private readonly _optionsService: IOptionsService,\n @ICoreService private readonly _coreService: ICoreService\n ) {\n }\n\n public setColors(colors: IColorSet): void {\n this._colors = colors;\n }\n\n public createRow(lineData: IBufferLine, row: number, isCursorRow: boolean, cursorStyle: string | undefined, cursorX: number, cursorBlink: boolean, cellWidth: number, cols: number): DocumentFragment {\n const fragment = this._document.createDocumentFragment();\n\n const joinedRanges = this._characterJoinerService.getJoinedCharacters(row);\n // Find the line length first, this prevents the need to output a bunch of\n // empty cells at the end. This cannot easily be integrated into the main\n // loop below because of the colCount feature (which can be removed after we\n // properly support reflow and disallow data to go beyond the right-side of\n // the viewport).\n let lineLength = 0;\n for (let x = Math.min(lineData.length, cols) - 1; x >= 0; x--) {\n if (lineData.loadCell(x, this._workCell).getCode() !== NULL_CELL_CODE || (isCursorRow && x === cursorX)) {\n lineLength = x + 1;\n break;\n }\n }\n\n for (let x = 0; x < lineLength; x++) {\n lineData.loadCell(x, this._workCell);\n let width = this._workCell.getWidth();\n\n // The character to the left is a wide character, drawing is owned by the char at x-1\n if (width === 0) {\n continue;\n }\n\n // If true, indicates that the current character(s) to draw were joined.\n let isJoined = false;\n let lastCharX = x;\n\n // Process any joined character ranges as needed. Because of how the\n // ranges are produced, we know that they are valid for the characters\n // and attributes of our input.\n let cell = this._workCell;\n if (joinedRanges.length > 0 && x === joinedRanges[0][0]) {\n isJoined = true;\n const range = joinedRanges.shift()!;\n\n // We already know the exact start and end column of the joined range,\n // so we get the string and width representing it directly\n cell = new JoinedCellData(\n this._workCell,\n lineData.translateToString(true, range[0], range[1]),\n range[1] - range[0]\n );\n\n // Skip over the cells occupied by this range in the loop\n lastCharX = range[1] - 1;\n\n // Recalculate width\n width = cell.getWidth();\n }\n\n const charElement = this._document.createElement('span');\n if (width > 1) {\n charElement.style.width = `${cellWidth * width}px`;\n }\n\n if (isJoined) {\n // Ligatures in the DOM renderer must use display inline, as they may not show with\n // inline-block if they are outside the bounds of the element\n charElement.style.display = 'inline';\n\n // The DOM renderer colors the background of the cursor but for ligatures all cells are\n // joined. The workaround here is to show a cursor around the whole ligature so it shows up,\n // the cursor looks the same when on any character of the ligature though\n if (cursorX >= x && cursorX <= lastCharX) {\n cursorX = x;\n }\n }\n\n if (!this._coreService.isCursorHidden && isCursorRow && x === cursorX) {\n charElement.classList.add(CURSOR_CLASS);\n\n if (cursorBlink) {\n charElement.classList.add(CURSOR_BLINK_CLASS);\n }\n\n switch (cursorStyle) {\n case 'bar':\n charElement.classList.add(CURSOR_STYLE_BAR_CLASS);\n break;\n case 'underline':\n charElement.classList.add(CURSOR_STYLE_UNDERLINE_CLASS);\n break;\n default:\n charElement.classList.add(CURSOR_STYLE_BLOCK_CLASS);\n break;\n }\n }\n\n if (cell.isBold()) {\n charElement.classList.add(BOLD_CLASS);\n }\n\n if (cell.isItalic()) {\n charElement.classList.add(ITALIC_CLASS);\n }\n\n if (cell.isDim()) {\n charElement.classList.add(DIM_CLASS);\n }\n\n if (cell.isUnderline()) {\n charElement.classList.add(UNDERLINE_CLASS);\n }\n\n if (cell.isInvisible()) {\n charElement.textContent = WHITESPACE_CELL_CHAR;\n } else {\n charElement.textContent = cell.getChars() || WHITESPACE_CELL_CHAR;\n }\n\n if (cell.isStrikethrough()) {\n charElement.classList.add(STRIKETHROUGH_CLASS);\n }\n\n let fg = cell.getFgColor();\n let fgColorMode = cell.getFgColorMode();\n let bg = cell.getBgColor();\n let bgColorMode = cell.getBgColorMode();\n const isInverse = !!cell.isInverse();\n if (isInverse) {\n const temp = fg;\n fg = bg;\n bg = temp;\n const temp2 = fgColorMode;\n fgColorMode = bgColorMode;\n bgColorMode = temp2;\n }\n\n // Foreground\n switch (fgColorMode) {\n case Attributes.CM_P16:\n case Attributes.CM_P256:\n if (cell.isBold() && fg < 8 && this._optionsService.rawOptions.drawBoldTextInBrightColors) {\n fg += 8;\n }\n if (!this._applyMinimumContrast(charElement, this._colors.background, this._colors.ansi[fg])) {\n charElement.classList.add(`xterm-fg-${fg}`);\n }\n break;\n case Attributes.CM_RGB:\n const color = rgba.toColor(\n (fg >> 16) & 0xFF,\n (fg >> 8) & 0xFF,\n (fg ) & 0xFF\n );\n if (!this._applyMinimumContrast(charElement, this._colors.background, color)) {\n this._addStyle(charElement, `color:#${padStart(fg.toString(16), '0', 6)}`);\n }\n break;\n case Attributes.CM_DEFAULT:\n default:\n if (!this._applyMinimumContrast(charElement, this._colors.background, this._colors.foreground)) {\n if (isInverse) {\n charElement.classList.add(`xterm-fg-${INVERTED_DEFAULT_COLOR}`);\n }\n }\n }\n\n // Background\n switch (bgColorMode) {\n case Attributes.CM_P16:\n case Attributes.CM_P256:\n charElement.classList.add(`xterm-bg-${bg}`);\n break;\n case Attributes.CM_RGB:\n this._addStyle(charElement, `background-color:#${padStart(bg.toString(16), '0', 6)}`);\n break;\n case Attributes.CM_DEFAULT:\n default:\n if (isInverse) {\n charElement.classList.add(`xterm-bg-${INVERTED_DEFAULT_COLOR}`);\n }\n }\n\n fragment.appendChild(charElement);\n\n x = lastCharX;\n }\n return fragment;\n }\n\n private _applyMinimumContrast(element: HTMLElement, bg: IColor, fg: IColor): boolean {\n if (this._optionsService.rawOptions.minimumContrastRatio === 1) {\n return false;\n }\n\n // Try get from cache first\n let adjustedColor = this._colors.contrastCache.getColor(this._workCell.bg, this._workCell.fg);\n\n // Calculate and store in cache\n if (adjustedColor === undefined) {\n adjustedColor = color.ensureContrastRatio(bg, fg, this._optionsService.rawOptions.minimumContrastRatio);\n this._colors.contrastCache.setColor(this._workCell.bg, this._workCell.fg, adjustedColor ?? null);\n }\n\n if (adjustedColor) {\n this._addStyle(element, `color:${adjustedColor.css}`);\n return true;\n }\n\n return false;\n }\n\n private _addStyle(element: HTMLElement, style: string): void {\n element.setAttribute('style', `${element.getAttribute('style') || ''}${style};`);\n }\n}\n\nfunction padStart(text: string, padChar: string, length: number): string {\n while (text.length < length) {\n text = padChar + text;\n }\n return text;\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBufferService } from 'common/services/Services';\n\n/**\n * Represents a selection within the buffer. This model only cares about column\n * and row coordinates, not wide characters.\n */\nexport class SelectionModel {\n /**\n * Whether select all is currently active.\n */\n public isSelectAllActive: boolean = false;\n\n /**\n * The minimal length of the selection from the start position. When double\n * clicking on a word, the word will be selected which makes the selection\n * start at the start of the word and makes this variable the length.\n */\n public selectionStartLength: number = 0;\n\n /**\n * The [x, y] position the selection starts at.\n */\n public selectionStart: [number, number] | undefined;\n\n /**\n * The [x, y] position the selection ends at.\n */\n public selectionEnd: [number, number] | undefined;\n\n constructor(\n private _bufferService: IBufferService\n ) {\n }\n\n /**\n * Clears the current selection.\n */\n public clearSelection(): void {\n this.selectionStart = undefined;\n this.selectionEnd = undefined;\n this.isSelectAllActive = false;\n this.selectionStartLength = 0;\n }\n\n /**\n * The final selection start, taking into consideration select all.\n */\n public get finalSelectionStart(): [number, number] | undefined {\n if (this.isSelectAllActive) {\n return [0, 0];\n }\n\n if (!this.selectionEnd || !this.selectionStart) {\n return this.selectionStart;\n }\n\n return this.areSelectionValuesReversed() ? this.selectionEnd : this.selectionStart;\n }\n\n /**\n * The final selection end, taking into consideration select all, double click\n * word selection and triple click line selection.\n */\n public get finalSelectionEnd(): [number, number] | undefined {\n if (this.isSelectAllActive) {\n return [this._bufferService.cols, this._bufferService.buffer.ybase + this._bufferService.rows - 1];\n }\n\n if (!this.selectionStart) {\n return undefined;\n }\n\n // Use the selection start + length if the end doesn't exist or they're reversed\n if (!this.selectionEnd || this.areSelectionValuesReversed()) {\n const startPlusLength = this.selectionStart[0] + this.selectionStartLength;\n if (startPlusLength > this._bufferService.cols) {\n // Ensure the trailing EOL isn't included when the selection ends on the right edge\n if (startPlusLength % this._bufferService.cols === 0) {\n return [this._bufferService.cols, this.selectionStart[1] + Math.floor(startPlusLength / this._bufferService.cols) - 1];\n }\n return [startPlusLength % this._bufferService.cols, this.selectionStart[1] + Math.floor(startPlusLength / this._bufferService.cols)];\n }\n return [startPlusLength, this.selectionStart[1]];\n }\n\n // Ensure the the word/line is selected after a double/triple click\n if (this.selectionStartLength) {\n // Select the larger of the two when start and end are on the same line\n if (this.selectionEnd[1] === this.selectionStart[1]) {\n return [Math.max(this.selectionStart[0] + this.selectionStartLength, this.selectionEnd[0]), this.selectionEnd[1]];\n }\n }\n return this.selectionEnd;\n }\n\n /**\n * Returns whether the selection start and end are reversed.\n */\n public areSelectionValuesReversed(): boolean {\n const start = this.selectionStart;\n const end = this.selectionEnd;\n if (!start || !end) {\n return false;\n }\n return start[1] > end[1] || (start[1] === end[1] && start[0] > end[0]);\n }\n\n /**\n * Handle the buffer being trimmed, adjust the selection position.\n * @param amount The amount the buffer is being trimmed.\n * @return Whether a refresh is necessary.\n */\n public onTrim(amount: number): boolean {\n // Adjust the selection position based on the trimmed amount.\n if (this.selectionStart) {\n this.selectionStart[1] -= amount;\n }\n if (this.selectionEnd) {\n this.selectionEnd[1] -= amount;\n }\n\n // The selection has moved off the buffer, clear it.\n if (this.selectionEnd && this.selectionEnd[1] < 0) {\n this.clearSelection();\n return true;\n }\n\n // If the selection start is trimmed, ensure the start column is 0.\n if (this.selectionStart && this.selectionStart[1] < 0) {\n this.selectionStart[1] = 0;\n }\n return false;\n }\n}\n","/**\n * Copyright (c) 2016 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IOptionsService } from 'common/services/Services';\nimport { IEvent, EventEmitter } from 'common/EventEmitter';\nimport { ICharSizeService } from 'browser/services/Services';\n\nexport class CharSizeService implements ICharSizeService {\n public serviceBrand: undefined;\n\n public width: number = 0;\n public height: number = 0;\n private _measureStrategy: IMeasureStrategy;\n\n public get hasValidSize(): boolean { return this.width > 0 && this.height > 0; }\n\n private _onCharSizeChange = new EventEmitter<void>();\n public get onCharSizeChange(): IEvent<void> { return this._onCharSizeChange.event; }\n\n constructor(\n document: Document,\n parentElement: HTMLElement,\n @IOptionsService private readonly _optionsService: IOptionsService\n ) {\n this._measureStrategy = new DomMeasureStrategy(document, parentElement, this._optionsService);\n }\n\n public measure(): void {\n const result = this._measureStrategy.measure();\n if (result.width !== this.width || result.height !== this.height) {\n this.width = result.width;\n this.height = result.height;\n this._onCharSizeChange.fire();\n }\n }\n}\n\ninterface IMeasureStrategy {\n measure(): IReadonlyMeasureResult;\n}\n\ninterface IReadonlyMeasureResult {\n readonly width: number;\n readonly height: number;\n}\n\ninterface IMeasureResult {\n width: number;\n height: number;\n}\n\n// TODO: For supporting browsers we should also provide a CanvasCharDimensionsProvider that uses ctx.measureText\nclass DomMeasureStrategy implements IMeasureStrategy {\n private _result: IMeasureResult = { width: 0, height: 0 };\n private _measureElement: HTMLElement;\n\n constructor(\n private _document: Document,\n private _parentElement: HTMLElement,\n private _optionsService: IOptionsService\n ) {\n this._measureElement = this._document.createElement('span');\n this._measureElement.classList.add('xterm-char-measure-element');\n this._measureElement.textContent = 'W';\n this._measureElement.setAttribute('aria-hidden', 'true');\n this._parentElement.appendChild(this._measureElement);\n }\n\n public measure(): IReadonlyMeasureResult {\n this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily;\n this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`;\n\n // Note that this triggers a synchronous layout\n const geometry = this._measureElement.getBoundingClientRect();\n\n // If values are 0 then the element is likely currently display:none, in which case we should\n // retain the previous value.\n if (geometry.width !== 0 && geometry.height !== 0) {\n this._result.width = geometry.width;\n this._result.height = Math.ceil(geometry.height);\n }\n\n return this._result;\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBufferLine, ICellData, CharData } from 'common/Types';\nimport { ICharacterJoiner } from 'browser/Types';\nimport { AttributeData } from 'common/buffer/AttributeData';\nimport { WHITESPACE_CELL_CHAR, Content } from 'common/buffer/Constants';\nimport { CellData } from 'common/buffer/CellData';\nimport { IBufferService } from 'common/services/Services';\nimport { ICharacterJoinerService } from 'browser/services/Services';\n\nexport class JoinedCellData extends AttributeData implements ICellData {\n private _width: number;\n // .content carries no meaning for joined CellData, simply nullify it\n // thus we have to overload all other .content accessors\n public content: number = 0;\n public fg: number;\n public bg: number;\n public combinedData: string = '';\n\n constructor(firstCell: ICellData, chars: string, width: number) {\n super();\n this.fg = firstCell.fg;\n this.bg = firstCell.bg;\n this.combinedData = chars;\n this._width = width;\n }\n\n public isCombined(): number {\n // always mark joined cell data as combined\n return Content.IS_COMBINED_MASK;\n }\n\n public getWidth(): number {\n return this._width;\n }\n\n public getChars(): string {\n return this.combinedData;\n }\n\n public getCode(): number {\n // code always gets the highest possible fake codepoint (read as -1)\n // this is needed as code is used by caches as identifier\n return 0x1FFFFF;\n }\n\n public setFromCharData(value: CharData): void {\n throw new Error('not implemented');\n }\n\n public getAsCharData(): CharData {\n return [this.fg, this.getChars(), this.getWidth(), this.getCode()];\n }\n}\n\nexport class CharacterJoinerService implements ICharacterJoinerService {\n public serviceBrand: undefined;\n\n private _characterJoiners: ICharacterJoiner[] = [];\n private _nextCharacterJoinerId: number = 0;\n private _workCell: CellData = new CellData();\n\n constructor(\n @IBufferService private _bufferService: IBufferService\n ) { }\n\n public register(handler: (text: string) => [number, number][]): number {\n const joiner: ICharacterJoiner = {\n id: this._nextCharacterJoinerId++,\n handler\n };\n\n this._characterJoiners.push(joiner);\n return joiner.id;\n }\n\n public deregister(joinerId: number): boolean {\n for (let i = 0; i < this._characterJoiners.length; i++) {\n if (this._characterJoiners[i].id === joinerId) {\n this._characterJoiners.splice(i, 1);\n return true;\n }\n }\n\n return false;\n }\n\n public getJoinedCharacters(row: number): [number, number][] {\n if (this._characterJoiners.length === 0) {\n return [];\n }\n\n const line = this._bufferService.buffer.lines.get(row);\n if (!line || line.length === 0) {\n return [];\n }\n\n const ranges: [number, number][] = [];\n const lineStr = line.translateToString(true);\n\n // Because some cells can be represented by multiple javascript characters,\n // we track the cell and the string indexes separately. This allows us to\n // translate the string ranges we get from the joiners back into cell ranges\n // for use when rendering\n let rangeStartColumn = 0;\n let currentStringIndex = 0;\n let rangeStartStringIndex = 0;\n let rangeAttrFG = line.getFg(0);\n let rangeAttrBG = line.getBg(0);\n\n for (let x = 0; x < line.getTrimmedLength(); x++) {\n line.loadCell(x, this._workCell);\n\n if (this._workCell.getWidth() === 0) {\n // If this character is of width 0, skip it.\n continue;\n }\n\n // End of range\n if (this._workCell.fg !== rangeAttrFG || this._workCell.bg !== rangeAttrBG) {\n // If we ended up with a sequence of more than one character,\n // look for ranges to join.\n if (x - rangeStartColumn > 1) {\n const joinedRanges = this._getJoinedRanges(\n lineStr,\n rangeStartStringIndex,\n currentStringIndex,\n line,\n rangeStartColumn\n );\n for (let i = 0; i < joinedRanges.length; i++) {\n ranges.push(joinedRanges[i]);\n }\n }\n\n // Reset our markers for a new range.\n rangeStartColumn = x;\n rangeStartStringIndex = currentStringIndex;\n rangeAttrFG = this._workCell.fg;\n rangeAttrBG = this._workCell.bg;\n }\n\n currentStringIndex += this._workCell.getChars().length || WHITESPACE_CELL_CHAR.length;\n }\n\n // Process any trailing ranges.\n if (this._bufferService.cols - rangeStartColumn > 1) {\n const joinedRanges = this._getJoinedRanges(\n lineStr,\n rangeStartStringIndex,\n currentStringIndex,\n line,\n rangeStartColumn\n );\n for (let i = 0; i < joinedRanges.length; i++) {\n ranges.push(joinedRanges[i]);\n }\n }\n\n return ranges;\n }\n\n /**\n * Given a segment of a line of text, find all ranges of text that should be\n * joined in a single rendering unit. Ranges are internally converted to\n * column ranges, rather than string ranges.\n * @param line String representation of the full line of text\n * @param startIndex Start position of the range to search in the string (inclusive)\n * @param endIndex End position of the range to search in the string (exclusive)\n */\n private _getJoinedRanges(line: string, startIndex: number, endIndex: number, lineData: IBufferLine, startCol: number): [number, number][] {\n const text = line.substring(startIndex, endIndex);\n // At this point we already know that there is at least one joiner so\n // we can just pull its value and assign it directly rather than\n // merging it into an empty array, which incurs unnecessary writes.\n let allJoinedRanges: [number, number][] = [];\n try {\n allJoinedRanges = this._characterJoiners[0].handler(text);\n } catch (error) {\n console.error(error);\n }\n for (let i = 1; i < this._characterJoiners.length; i++) {\n // We merge any overlapping ranges across the different joiners\n try {\n const joinerRanges = this._characterJoiners[i].handler(text);\n for (let j = 0; j < joinerRanges.length; j++) {\n CharacterJoinerService._mergeRanges(allJoinedRanges, joinerRanges[j]);\n }\n } catch (error) {\n console.error(error);\n }\n }\n this._stringRangesToCellRanges(allJoinedRanges, lineData, startCol);\n return allJoinedRanges;\n }\n\n /**\n * Modifies the provided ranges in-place to adjust for variations between\n * string length and cell width so that the range represents a cell range,\n * rather than the string range the joiner provides.\n * @param ranges String ranges containing start (inclusive) and end (exclusive) index\n * @param line Cell data for the relevant line in the terminal\n * @param startCol Offset within the line to start from\n */\n private _stringRangesToCellRanges(ranges: [number, number][], line: IBufferLine, startCol: number): void {\n let currentRangeIndex = 0;\n let currentRangeStarted = false;\n let currentStringIndex = 0;\n let currentRange = ranges[currentRangeIndex];\n\n // If we got through all of the ranges, stop searching\n if (!currentRange) {\n return;\n }\n\n for (let x = startCol; x < this._bufferService.cols; x++) {\n const width = line.getWidth(x);\n const length = line.getString(x).length || WHITESPACE_CELL_CHAR.length;\n\n // We skip zero-width characters when creating the string to join the text\n // so we do the same here\n if (width === 0) {\n continue;\n }\n\n // Adjust the start of the range\n if (!currentRangeStarted && currentRange[0] <= currentStringIndex) {\n currentRange[0] = x;\n currentRangeStarted = true;\n }\n\n // Adjust the end of the range\n if (currentRange[1] <= currentStringIndex) {\n currentRange[1] = x;\n\n // We're finished with this range, so we move to the next one\n currentRange = ranges[++currentRangeIndex];\n\n // If there are no more ranges left, stop searching\n if (!currentRange) {\n break;\n }\n\n // Ranges can be on adjacent characters. Because the end index of the\n // ranges are exclusive, this means that the index for the start of a\n // range can be the same as the end index of the previous range. To\n // account for the start of the next range, we check here just in case.\n if (currentRange[0] <= currentStringIndex) {\n currentRange[0] = x;\n currentRangeStarted = true;\n } else {\n currentRangeStarted = false;\n }\n }\n\n // Adjust the string index based on the character length to line up with\n // the column adjustment\n currentStringIndex += length;\n }\n\n // If there is still a range left at the end, it must extend all the way to\n // the end of the line.\n if (currentRange) {\n currentRange[1] = this._bufferService.cols;\n }\n }\n\n /**\n * Merges the range defined by the provided start and end into the list of\n * existing ranges. The merge is done in place on the existing range for\n * performance and is also returned.\n * @param ranges Existing range list\n * @param newRange Tuple of two numbers representing the new range to merge in.\n * @returns The ranges input with the new range merged in place\n */\n private static _mergeRanges(ranges: [number, number][], newRange: [number, number]): [number, number][] {\n let inRange = false;\n for (let i = 0; i < ranges.length; i++) {\n const range = ranges[i];\n if (!inRange) {\n if (newRange[1] <= range[0]) {\n // Case 1: New range is before the search range\n ranges.splice(i, 0, newRange);\n return ranges;\n }\n\n if (newRange[1] <= range[1]) {\n // Case 2: New range is either wholly contained within the\n // search range or overlaps with the front of it\n range[0] = Math.min(newRange[0], range[0]);\n return ranges;\n }\n\n if (newRange[0] < range[1]) {\n // Case 3: New range either wholly contains the search range\n // or overlaps with the end of it\n range[0] = Math.min(newRange[0], range[0]);\n inRange = true;\n }\n\n // Case 4: New range starts after the search range\n continue;\n } else {\n if (newRange[1] <= range[0]) {\n // Case 5: New range extends from previous range but doesn't\n // reach the current one\n ranges[i - 1][1] = newRange[1];\n return ranges;\n }\n\n if (newRange[1] <= range[1]) {\n // Case 6: New range extends from prvious range into the\n // current range\n ranges[i - 1][1] = Math.max(newRange[1], range[1]);\n ranges.splice(i, 1);\n return ranges;\n }\n\n // Case 7: New range extends from previous range past the\n // end of the current range\n ranges.splice(i, 1);\n i--;\n }\n }\n\n if (inRange) {\n // Case 8: New range extends past the last existing range\n ranges[ranges.length - 1][1] = newRange[1];\n } else {\n // Case 9: New range starts after the last existing range\n ranges.push(newRange);\n }\n\n return ranges;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ICoreBrowserService } from './Services';\n\nexport class CoreBrowserService implements ICoreBrowserService {\n public serviceBrand: undefined;\n\n constructor(\n private _textarea: HTMLTextAreaElement\n ) {\n }\n\n public get isFocused(): boolean {\n const docOrShadowRoot = this._textarea.getRootNode ? this._textarea.getRootNode() as Document | ShadowRoot : document;\n return docOrShadowRoot.activeElement === this._textarea && document.hasFocus();\n }\n}\n","/**\n * Copyright (c) 2022 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IDecorationService, IRenderService } from 'browser/services/Services';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { Disposable } from 'common/Lifecycle';\nimport { IBufferService, IInstantiationService } from 'common/services/Services';\nimport { IDecorationOptions, IDecoration, IMarker } from 'xterm';\n\nexport class DecorationService extends Disposable implements IDecorationService {\n\n private readonly _decorations: Decoration[] = [];\n private _container: HTMLElement | undefined;\n private _screenElement: HTMLElement | undefined;\n private _renderService: IRenderService | undefined;\n private _animationFrame: number | undefined;\n\n constructor(@IInstantiationService private readonly _instantiationService: IInstantiationService) { super(); }\n\n public attachToDom(screenElement: HTMLElement, renderService: IRenderService): void {\n this._renderService = renderService;\n this._screenElement = screenElement;\n this._container = document.createElement('div');\n this._container.classList.add('xterm-decoration-container');\n screenElement.appendChild(this._container);\n this.register(this._renderService.onRenderedBufferChange(() => this.refresh()));\n this.register(this._renderService.onDimensionsChange(() => this.refresh(true)));\n }\n\n public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {\n if (decorationOptions.marker.isDisposed || !this._container) {\n return undefined;\n }\n const decoration = this._instantiationService.createInstance(Decoration, decorationOptions, this._container);\n this._decorations.push(decoration);\n decoration.onDispose(() => this._decorations.splice(this._decorations.indexOf(decoration), 1));\n this._queueRefresh();\n return decoration;\n }\n\n private _queueRefresh(): void {\n if (this._animationFrame !== undefined) {\n return;\n }\n this._animationFrame = window.requestAnimationFrame(() => {\n this.refresh();\n this._animationFrame = undefined;\n });\n }\n\n public refresh(shouldRecreate?: boolean): void {\n if (!this._renderService) {\n return;\n }\n for (const decoration of this._decorations) {\n decoration.render(this._renderService, shouldRecreate);\n }\n }\n\n public dispose(): void {\n for (const decoration of this._decorations) {\n decoration.dispose();\n }\n if (this._screenElement && this._container && this._screenElement.contains(this._container)) {\n this._screenElement.removeChild(this._container);\n }\n }\n}\nexport class Decoration extends Disposable implements IDecoration {\n private readonly _marker: IMarker;\n private _element: HTMLElement | undefined;\n\n public isDisposed: boolean = false;\n\n public get element(): HTMLElement | undefined { return this._element; }\n public get marker(): IMarker { return this._marker; }\n\n private _onDispose = new EventEmitter<void>();\n public get onDispose(): IEvent<void> { return this._onDispose.event; }\n\n private _onRender = new EventEmitter<HTMLElement>();\n public get onRender(): IEvent<HTMLElement> { return this._onRender.event; }\n\n public x: number;\n public anchor: 'left' | 'right';\n public width: number;\n public height: number;\n\n constructor(\n options: IDecorationOptions,\n private readonly _container: HTMLElement,\n @IBufferService private readonly _bufferService: IBufferService\n ) {\n super();\n this.x = options.x ?? 0;\n this._marker = options.marker;\n this._marker.onDispose(() => this.dispose());\n this.anchor = options.anchor || 'left';\n this.width = options.width || 1;\n this.height = options.height || 1;\n }\n\n public render(renderService: IRenderService, shouldRecreate?: boolean): void {\n if (!this._element || shouldRecreate) {\n this._createElement(renderService, shouldRecreate);\n }\n if (this._container && this._element && !this._container.contains(this._element)) {\n this._container.append(this._element);\n }\n this._refreshStyle(renderService);\n if (this._element) {\n this._onRender.fire(this._element);\n }\n }\n\n private _createElement(renderService: IRenderService, shouldRecreate?: boolean): void {\n if (shouldRecreate && this._element && this._container.contains(this._element)) {\n this._container.removeChild(this._element);\n }\n this._element = document.createElement('div');\n this._element.classList.add('xterm-decoration');\n this._element.style.width = `${this.width * renderService.dimensions.actualCellWidth}px`;\n this._element.style.height = `${this.height * renderService.dimensions.actualCellHeight}px`;\n this._element.style.top = `${(this.marker.line - this._bufferService.buffers.active.ydisp) * renderService.dimensions.actualCellHeight}px`;\n this._element.style.lineHeight = `${renderService.dimensions.actualCellHeight}px`;\n\n if (this.x && this.x > this._bufferService.cols) {\n // exceeded the container width, so hide\n this._element.style.display = 'none';\n }\n if (this.anchor === 'right') {\n this._element.style.right = this.x ? `${this.x * renderService.dimensions.actualCellWidth}px` : '';\n } else {\n this._element.style.left = this.x ? `${this.x * renderService.dimensions.actualCellWidth}px` : '';\n }\n }\n\n private _refreshStyle(renderService: IRenderService): void {\n if (!this._element) {\n return;\n }\n const line = this.marker.line - this._bufferService.buffers.active.ydisp;\n if (line < 0 || line > this._bufferService.rows) {\n // outside of viewport\n this._element.style.display = 'none';\n } else {\n this._element.style.top = `${line * renderService.dimensions.actualCellHeight}px`;\n this._element.style.display = this._bufferService.buffer === this._bufferService.buffers.alt ? 'none' : 'block';\n }\n }\n\n public override dispose(): void {\n if (this.isDisposed) {\n return;\n }\n if (this._element && this._container.contains(this._element)) {\n this._container.removeChild(this._element);\n }\n this.isDisposed = true;\n this._onDispose.fire();\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ICharSizeService, IRenderService, IMouseService } from './Services';\nimport { getCoords, getRawByteCoords } from 'browser/input/Mouse';\n\nexport class MouseService implements IMouseService {\n public serviceBrand: undefined;\n\n constructor(\n @IRenderService private readonly _renderService: IRenderService,\n @ICharSizeService private readonly _charSizeService: ICharSizeService\n ) {\n }\n\n public getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, isSelection?: boolean): [number, number] | undefined {\n return getCoords(\n event,\n element,\n colCount,\n rowCount,\n this._charSizeService.hasValidSize,\n this._renderService.dimensions.actualCellWidth,\n this._renderService.dimensions.actualCellHeight,\n isSelection\n );\n }\n\n public getRawByteCoords(event: MouseEvent, element: HTMLElement, colCount: number, rowCount: number): { x: number, y: number } | undefined {\n const coords = this.getCoords(event, element, colCount, rowCount);\n return getRawByteCoords(coords);\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IRenderer, IRenderDimensions } from 'browser/renderer/Types';\nimport { RenderDebouncer } from 'browser/RenderDebouncer';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { Disposable } from 'common/Lifecycle';\nimport { ScreenDprMonitor } from 'browser/ScreenDprMonitor';\nimport { addDisposableDomListener } from 'browser/Lifecycle';\nimport { IColorSet, IRenderDebouncer } from 'browser/Types';\nimport { IOptionsService, IBufferService } from 'common/services/Services';\nimport { ICharSizeService, IRenderService } from 'browser/services/Services';\n\ninterface ISelectionState {\n start: [number, number] | undefined;\n end: [number, number] | undefined;\n columnSelectMode: boolean;\n}\n\nexport class RenderService extends Disposable implements IRenderService {\n public serviceBrand: undefined;\n\n private _renderDebouncer: IRenderDebouncer;\n private _screenDprMonitor: ScreenDprMonitor;\n\n private _isPaused: boolean = false;\n private _needsFullRefresh: boolean = false;\n private _isNextRenderRedrawOnly: boolean = true;\n private _needsSelectionRefresh: boolean = false;\n private _canvasWidth: number = 0;\n private _canvasHeight: number = 0;\n private _selectionState: ISelectionState = {\n start: undefined,\n end: undefined,\n columnSelectMode: false\n };\n\n private _onDimensionsChange = new EventEmitter<IRenderDimensions>();\n public get onDimensionsChange(): IEvent<IRenderDimensions> { return this._onDimensionsChange.event; }\n private _onRender = new EventEmitter<{ start: number, end: number }>();\n public get onRenderedBufferChange(): IEvent<{ start: number, end: number }> { return this._onRender.event; }\n private _onRefreshRequest = new EventEmitter<{ start: number, end: number }>();\n public get onRefreshRequest(): IEvent<{ start: number, end: number }> { return this._onRefreshRequest.event; }\n\n public get dimensions(): IRenderDimensions { return this._renderer.dimensions; }\n\n constructor(\n private _renderer: IRenderer,\n private _rowCount: number,\n screenElement: HTMLElement,\n @IOptionsService optionsService: IOptionsService,\n @ICharSizeService private readonly _charSizeService: ICharSizeService,\n @IBufferService bufferService: IBufferService\n ) {\n super();\n\n this.register({ dispose: () => this._renderer.dispose() });\n\n this._renderDebouncer = new RenderDebouncer((start, end) => this._renderRows(start, end));\n this.register(this._renderDebouncer);\n\n this._screenDprMonitor = new ScreenDprMonitor();\n this._screenDprMonitor.setListener(() => this.onDevicePixelRatioChange());\n this.register(this._screenDprMonitor);\n\n this.register(bufferService.onResize(() => this._fullRefresh()));\n this.register(bufferService.buffers.onBufferActivate(() => this._renderer?.clear()));\n this.register(optionsService.onOptionChange(() => this._renderer.onOptionsChanged()));\n this.register(this._charSizeService.onCharSizeChange(() => this.onCharSizeChanged()));\n\n // No need to register this as renderer is explicitly disposed in RenderService.dispose\n this._renderer.onRequestRedraw(e => this.refreshRows(e.start, e.end, true));\n\n // dprchange should handle this case, we need this as well for browsers that don't support the\n // matchMedia query.\n this.register(addDisposableDomListener(window, 'resize', () => this.onDevicePixelRatioChange()));\n\n // Detect whether IntersectionObserver is detected and enable renderer pause\n // and resume based on terminal visibility if so\n if ('IntersectionObserver' in window) {\n const observer = new IntersectionObserver(e => this._onIntersectionChange(e[e.length - 1]), { threshold: 0 });\n observer.observe(screenElement);\n this.register({ dispose: () => observer.disconnect() });\n }\n }\n\n private _onIntersectionChange(entry: IntersectionObserverEntry): void {\n this._isPaused = entry.isIntersecting === undefined ? (entry.intersectionRatio === 0) : !entry.isIntersecting;\n\n // Terminal was hidden on open\n if (!this._isPaused && !this._charSizeService.hasValidSize) {\n this._charSizeService.measure();\n }\n\n if (!this._isPaused && this._needsFullRefresh) {\n this.refreshRows(0, this._rowCount - 1);\n this._needsFullRefresh = false;\n }\n }\n\n public refreshRows(start: number, end: number, isRedrawOnly: boolean = false): void {\n if (this._isPaused) {\n this._needsFullRefresh = true;\n return;\n }\n if (!isRedrawOnly) {\n this._isNextRenderRedrawOnly = false;\n }\n this._renderDebouncer.refresh(start, end, this._rowCount);\n }\n\n private _renderRows(start: number, end: number): void {\n this._renderer.renderRows(start, end);\n\n // Update selection if needed\n if (this._needsSelectionRefresh) {\n this._renderer.onSelectionChanged(this._selectionState.start, this._selectionState.end, this._selectionState.columnSelectMode);\n this._needsSelectionRefresh = false;\n }\n\n // Fire render event only if it was not a redraw\n if (!this._isNextRenderRedrawOnly) {\n this._onRender.fire({ start, end });\n }\n this._isNextRenderRedrawOnly = true;\n }\n\n public resize(cols: number, rows: number): void {\n this._rowCount = rows;\n this._fireOnCanvasResize();\n }\n\n public changeOptions(): void {\n this._renderer.onOptionsChanged();\n this.refreshRows(0, this._rowCount - 1);\n this._fireOnCanvasResize();\n }\n\n private _fireOnCanvasResize(): void {\n // Don't fire the event if the dimensions haven't changed\n if (this._renderer.dimensions.canvasWidth === this._canvasWidth && this._renderer.dimensions.canvasHeight === this._canvasHeight) {\n return;\n }\n this._onDimensionsChange.fire(this._renderer.dimensions);\n }\n\n public dispose(): void {\n super.dispose();\n }\n\n public setRenderer(renderer: IRenderer): void {\n // TODO: RenderService should be the only one to dispose the renderer\n this._renderer.dispose();\n this._renderer = renderer;\n this._renderer.onRequestRedraw(e => this.refreshRows(e.start, e.end, true));\n\n // Force a refresh\n this._needsSelectionRefresh = true;\n this._fullRefresh();\n }\n\n private _fullRefresh(): void {\n if (this._isPaused) {\n this._needsFullRefresh = true;\n } else {\n this.refreshRows(0, this._rowCount - 1);\n }\n }\n\n public clearTextureAtlas(): void {\n this._renderer?.clearTextureAtlas?.();\n this._fullRefresh();\n }\n\n public setColors(colors: IColorSet): void {\n this._renderer.setColors(colors);\n this._fullRefresh();\n }\n\n public onDevicePixelRatioChange(): void {\n // Force char size measurement as DomMeasureStrategy(getBoundingClientRect) is not stable\n // when devicePixelRatio changes\n this._charSizeService.measure();\n\n this._renderer.onDevicePixelRatioChange();\n this.refreshRows(0, this._rowCount - 1);\n }\n\n public onResize(cols: number, rows: number): void {\n this._renderer.onResize(cols, rows);\n this._fullRefresh();\n }\n\n // TODO: Is this useful when we have onResize?\n public onCharSizeChanged(): void {\n this._renderer.onCharSizeChanged();\n }\n\n public onBlur(): void {\n this._renderer.onBlur();\n }\n\n public onFocus(): void {\n this._renderer.onFocus();\n }\n\n public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void {\n this._selectionState.start = start;\n this._selectionState.end = end;\n this._selectionState.columnSelectMode = columnSelectMode;\n this._renderer.onSelectionChanged(start, end, columnSelectMode);\n }\n\n public onCursorMove(): void {\n this._renderer.onCursorMove();\n }\n\n public clear(): void {\n this._renderer.clear();\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ISelectionRedrawRequestEvent, ISelectionRequestScrollLinesEvent } from 'browser/selection/Types';\nimport { IBuffer } from 'common/buffer/Types';\nimport { IBufferLine, IDisposable } from 'common/Types';\nimport * as Browser from 'common/Platform';\nimport { SelectionModel } from 'browser/selection/SelectionModel';\nimport { CellData } from 'common/buffer/CellData';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { IMouseService, ISelectionService, IRenderService } from 'browser/services/Services';\nimport { ILinkifier2 } from 'browser/Types';\nimport { IBufferService, IOptionsService, ICoreService } from 'common/services/Services';\nimport { getCoordsRelativeToElement } from 'browser/input/Mouse';\nimport { moveToCellSequence } from 'browser/input/MoveToCell';\nimport { Disposable } from 'common/Lifecycle';\nimport { getRangeLength } from 'common/buffer/BufferRange';\n\n/**\n * The number of pixels the mouse needs to be above or below the viewport in\n * order to scroll at the maximum speed.\n */\nconst DRAG_SCROLL_MAX_THRESHOLD = 50;\n\n/**\n * The maximum scrolling speed\n */\nconst DRAG_SCROLL_MAX_SPEED = 15;\n\n/**\n * The number of milliseconds between drag scroll updates.\n */\nconst DRAG_SCROLL_INTERVAL = 50;\n\n/**\n * The maximum amount of time that can have elapsed for an alt click to move the\n * cursor.\n */\nconst ALT_CLICK_MOVE_CURSOR_TIME = 500;\n\nconst NON_BREAKING_SPACE_CHAR = String.fromCharCode(160);\nconst ALL_NON_BREAKING_SPACE_REGEX = new RegExp(NON_BREAKING_SPACE_CHAR, 'g');\n\n/**\n * Represents a position of a word on a line.\n */\ninterface IWordPosition {\n start: number;\n length: number;\n}\n\n/**\n * A selection mode, this drives how the selection behaves on mouse move.\n */\nexport const enum SelectionMode {\n NORMAL,\n WORD,\n LINE,\n COLUMN\n}\n\n/**\n * A class that manages the selection of the terminal. With help from\n * SelectionModel, SelectionService handles with all logic associated with\n * dealing with the selection, including handling mouse interaction, wide\n * characters and fetching the actual text within the selection. Rendering is\n * not handled by the SelectionService but the onRedrawRequest event is fired\n * when the selection is ready to be redrawn (on an animation frame).\n */\nexport class SelectionService extends Disposable implements ISelectionService {\n public serviceBrand: undefined;\n\n protected _model: SelectionModel;\n\n /**\n * The amount to scroll every drag scroll update (depends on how far the mouse\n * drag is above or below the terminal).\n */\n private _dragScrollAmount: number = 0;\n\n /**\n * The current selection mode.\n */\n protected _activeSelectionMode: SelectionMode;\n\n /**\n * A setInterval timer that is active while the mouse is down whose callback\n * scrolls the viewport when necessary.\n */\n private _dragScrollIntervalTimer: number | undefined;\n\n /**\n * The animation frame ID used for refreshing the selection.\n */\n private _refreshAnimationFrame: number | undefined;\n\n /**\n * Whether selection is enabled.\n */\n private _enabled = true;\n\n private _mouseMoveListener: EventListener;\n private _mouseUpListener: EventListener;\n private _trimListener: IDisposable;\n private _workCell: CellData = new CellData();\n\n private _mouseDownTimeStamp: number = 0;\n private _oldHasSelection: boolean = false;\n private _oldSelectionStart: [number, number] | undefined = undefined;\n private _oldSelectionEnd: [number, number] | undefined = undefined;\n\n private _onLinuxMouseSelection = this.register(new EventEmitter<string>());\n public get onLinuxMouseSelection(): IEvent<string> { return this._onLinuxMouseSelection.event; }\n private _onRedrawRequest = this.register(new EventEmitter<ISelectionRedrawRequestEvent>());\n public get onRequestRedraw(): IEvent<ISelectionRedrawRequestEvent> { return this._onRedrawRequest.event; }\n private _onSelectionChange = this.register(new EventEmitter<void>());\n public get onSelectionChange(): IEvent<void> { return this._onSelectionChange.event; }\n private _onRequestScrollLines = this.register(new EventEmitter<ISelectionRequestScrollLinesEvent>());\n public get onRequestScrollLines(): IEvent<ISelectionRequestScrollLinesEvent> { return this._onRequestScrollLines.event; }\n\n constructor(\n private readonly _element: HTMLElement,\n private readonly _screenElement: HTMLElement,\n private readonly _linkifier: ILinkifier2,\n @IBufferService private readonly _bufferService: IBufferService,\n @ICoreService private readonly _coreService: ICoreService,\n @IMouseService private readonly _mouseService: IMouseService,\n @IOptionsService private readonly _optionsService: IOptionsService,\n @IRenderService private readonly _renderService: IRenderService\n ) {\n super();\n\n // Init listeners\n this._mouseMoveListener = event => this._onMouseMove(event as MouseEvent);\n this._mouseUpListener = event => this._onMouseUp(event as MouseEvent);\n this._coreService.onUserInput(() => {\n if (this.hasSelection) {\n this.clearSelection();\n }\n });\n this._trimListener = this._bufferService.buffer.lines.onTrim(amount => this._onTrim(amount));\n this.register(this._bufferService.buffers.onBufferActivate(e => this._onBufferActivate(e)));\n\n this.enable();\n\n this._model = new SelectionModel(this._bufferService);\n this._activeSelectionMode = SelectionMode.NORMAL;\n }\n\n public dispose(): void {\n this._removeMouseDownListeners();\n }\n\n public reset(): void {\n this.clearSelection();\n }\n\n /**\n * Disables the selection manager. This is useful for when terminal mouse\n * are enabled.\n */\n public disable(): void {\n this.clearSelection();\n this._enabled = false;\n }\n\n /**\n * Enable the selection manager.\n */\n public enable(): void {\n this._enabled = true;\n }\n\n public get selectionStart(): [number, number] | undefined { return this._model.finalSelectionStart; }\n public get selectionEnd(): [number, number] | undefined { return this._model.finalSelectionEnd; }\n\n /**\n * Gets whether there is an active text selection.\n */\n public get hasSelection(): boolean {\n const start = this._model.finalSelectionStart;\n const end = this._model.finalSelectionEnd;\n if (!start || !end) {\n return false;\n }\n return start[0] !== end[0] || start[1] !== end[1];\n }\n\n /**\n * Gets the text currently selected.\n */\n public get selectionText(): string {\n const start = this._model.finalSelectionStart;\n const end = this._model.finalSelectionEnd;\n if (!start || !end) {\n return '';\n }\n\n const buffer = this._bufferService.buffer;\n const result: string[] = [];\n\n if (this._activeSelectionMode === SelectionMode.COLUMN) {\n // Ignore zero width selections\n if (start[0] === end[0]) {\n return '';\n }\n\n for (let i = start[1]; i <= end[1]; i++) {\n const lineText = buffer.translateBufferLineToString(i, true, start[0], end[0]);\n result.push(lineText);\n }\n } else {\n // Get first row\n const startRowEndCol = start[1] === end[1] ? end[0] : undefined;\n result.push(buffer.translateBufferLineToString(start[1], true, start[0], startRowEndCol));\n\n // Get middle rows\n for (let i = start[1] + 1; i <= end[1] - 1; i++) {\n const bufferLine = buffer.lines.get(i);\n const lineText = buffer.translateBufferLineToString(i, true);\n if (bufferLine?.isWrapped) {\n result[result.length - 1] += lineText;\n } else {\n result.push(lineText);\n }\n }\n\n // Get final row\n if (start[1] !== end[1]) {\n const bufferLine = buffer.lines.get(end[1]);\n const lineText = buffer.translateBufferLineToString(end[1], true, 0, end[0]);\n if (bufferLine && bufferLine!.isWrapped) {\n result[result.length - 1] += lineText;\n } else {\n result.push(lineText);\n }\n }\n }\n\n // Format string by replacing non-breaking space chars with regular spaces\n // and joining the array into a multi-line string.\n const formattedResult = result.map(line => {\n return line.replace(ALL_NON_BREAKING_SPACE_REGEX, ' ');\n }).join(Browser.isWindows ? '\\r\\n' : '\\n');\n\n return formattedResult;\n }\n\n /**\n * Clears the current terminal selection.\n */\n public clearSelection(): void {\n this._model.clearSelection();\n this._removeMouseDownListeners();\n this.refresh();\n this._onSelectionChange.fire();\n }\n\n /**\n * Queues a refresh, redrawing the selection on the next opportunity.\n * @param isLinuxMouseSelection Whether the selection should be registered as a new\n * selection on Linux.\n */\n public refresh(isLinuxMouseSelection?: boolean): void {\n // Queue the refresh for the renderer\n if (!this._refreshAnimationFrame) {\n this._refreshAnimationFrame = window.requestAnimationFrame(() => this._refresh());\n }\n\n // If the platform is Linux and the refresh call comes from a mouse event,\n // we need to update the selection for middle click to paste selection.\n if (Browser.isLinux && isLinuxMouseSelection) {\n const selectionText = this.selectionText;\n if (selectionText.length) {\n this._onLinuxMouseSelection.fire(this.selectionText);\n }\n }\n }\n\n /**\n * Fires the refresh event, causing consumers to pick it up and redraw the\n * selection state.\n */\n private _refresh(): void {\n this._refreshAnimationFrame = undefined;\n this._onRedrawRequest.fire({\n start: this._model.finalSelectionStart,\n end: this._model.finalSelectionEnd,\n columnSelectMode: this._activeSelectionMode === SelectionMode.COLUMN\n });\n }\n\n /**\n * Checks if the current click was inside the current selection\n * @param event The mouse event\n */\n private _isClickInSelection(event: MouseEvent): boolean {\n const coords = this._getMouseBufferCoords(event);\n const start = this._model.finalSelectionStart;\n const end = this._model.finalSelectionEnd;\n\n if (!start || !end || !coords) {\n return false;\n }\n\n return this._areCoordsInSelection(coords, start, end);\n }\n\n protected _areCoordsInSelection(coords: [number, number], start: [number, number], end: [number, number]): boolean {\n return (coords[1] > start[1] && coords[1] < end[1]) ||\n (start[1] === end[1] && coords[1] === start[1] && coords[0] >= start[0] && coords[0] < end[0]) ||\n (start[1] < end[1] && coords[1] === end[1] && coords[0] < end[0]) ||\n (start[1] < end[1] && coords[1] === start[1] && coords[0] >= start[0]);\n }\n\n /**\n * Selects word at the current mouse event coordinates.\n * @param event The mouse event.\n */\n private _selectWordAtCursor(event: MouseEvent, allowWhitespaceOnlySelection: boolean): boolean {\n // Check if there is a link under the cursor first and select that if so\n const range = this._linkifier.currentLink?.link?.range;\n if (range) {\n this._model.selectionStart = [range.start.x - 1, range.start.y - 1];\n this._model.selectionStartLength = getRangeLength(range, this._bufferService.cols);\n this._model.selectionEnd = undefined;\n return true;\n }\n\n const coords = this._getMouseBufferCoords(event);\n if (coords) {\n this._selectWordAt(coords, allowWhitespaceOnlySelection);\n this._model.selectionEnd = undefined;\n return true;\n }\n return false;\n }\n\n /**\n * Selects all text within the terminal.\n */\n public selectAll(): void {\n this._model.isSelectAllActive = true;\n this.refresh();\n this._onSelectionChange.fire();\n }\n\n public selectLines(start: number, end: number): void {\n this._model.clearSelection();\n start = Math.max(start, 0);\n end = Math.min(end, this._bufferService.buffer.lines.length - 1);\n this._model.selectionStart = [0, start];\n this._model.selectionEnd = [this._bufferService.cols, end];\n this.refresh();\n this._onSelectionChange.fire();\n }\n\n /**\n * Handle the buffer being trimmed, adjust the selection position.\n * @param amount The amount the buffer is being trimmed.\n */\n private _onTrim(amount: number): void {\n const needsRefresh = this._model.onTrim(amount);\n if (needsRefresh) {\n this.refresh();\n }\n }\n\n /**\n * Gets the 0-based [x, y] buffer coordinates of the current mouse event.\n * @param event The mouse event.\n */\n private _getMouseBufferCoords(event: MouseEvent): [number, number] | undefined {\n const coords = this._mouseService.getCoords(event, this._screenElement, this._bufferService.cols, this._bufferService.rows, true);\n if (!coords) {\n return undefined;\n }\n\n // Convert to 0-based\n coords[0]--;\n coords[1]--;\n\n // Convert viewport coords to buffer coords\n coords[1] += this._bufferService.buffer.ydisp;\n return coords;\n }\n\n /**\n * Gets the amount the viewport should be scrolled based on how far out of the\n * terminal the mouse is.\n * @param event The mouse event.\n */\n private _getMouseEventScrollAmount(event: MouseEvent): number {\n let offset = getCoordsRelativeToElement(event, this._screenElement)[1];\n const terminalHeight = this._renderService.dimensions.canvasHeight;\n if (offset >= 0 && offset <= terminalHeight) {\n return 0;\n }\n if (offset > terminalHeight) {\n offset -= terminalHeight;\n }\n\n offset = Math.min(Math.max(offset, -DRAG_SCROLL_MAX_THRESHOLD), DRAG_SCROLL_MAX_THRESHOLD);\n offset /= DRAG_SCROLL_MAX_THRESHOLD;\n return (offset / Math.abs(offset)) + Math.round(offset * (DRAG_SCROLL_MAX_SPEED - 1));\n }\n\n /**\n * Returns whether the selection manager should force selection, regardless of\n * whether the terminal is in mouse events mode.\n * @param event The mouse event.\n */\n public shouldForceSelection(event: MouseEvent): boolean {\n if (Browser.isMac) {\n return event.altKey && this._optionsService.rawOptions.macOptionClickForcesSelection;\n }\n\n return event.shiftKey;\n }\n\n /**\n * Handles te mousedown event, setting up for a new selection.\n * @param event The mousedown event.\n */\n public onMouseDown(event: MouseEvent): void {\n this._mouseDownTimeStamp = event.timeStamp;\n // If we have selection, we want the context menu on right click even if the\n // terminal is in mouse mode.\n if (event.button === 2 && this.hasSelection) {\n return;\n }\n\n // Only action the primary button\n if (event.button !== 0) {\n return;\n }\n\n // Allow selection when using a specific modifier key, even when disabled\n if (!this._enabled) {\n if (!this.shouldForceSelection(event)) {\n return;\n }\n\n // Don't send the mouse down event to the current process, we want to select\n event.stopPropagation();\n }\n\n // Tell the browser not to start a regular selection\n event.preventDefault();\n\n // Reset drag scroll state\n this._dragScrollAmount = 0;\n\n if (this._enabled && event.shiftKey) {\n this._onIncrementalClick(event);\n } else {\n if (event.detail === 1) {\n this._onSingleClick(event);\n } else if (event.detail === 2) {\n this._onDoubleClick(event);\n } else if (event.detail === 3) {\n this._onTripleClick(event);\n }\n }\n\n this._addMouseDownListeners();\n this.refresh(true);\n }\n\n /**\n * Adds listeners when mousedown is triggered.\n */\n private _addMouseDownListeners(): void {\n // Listen on the document so that dragging outside of viewport works\n if (this._screenElement.ownerDocument) {\n this._screenElement.ownerDocument.addEventListener('mousemove', this._mouseMoveListener);\n this._screenElement.ownerDocument.addEventListener('mouseup', this._mouseUpListener);\n }\n this._dragScrollIntervalTimer = window.setInterval(() => this._dragScroll(), DRAG_SCROLL_INTERVAL);\n }\n\n /**\n * Removes the listeners that are registered when mousedown is triggered.\n */\n private _removeMouseDownListeners(): void {\n if (this._screenElement.ownerDocument) {\n this._screenElement.ownerDocument.removeEventListener('mousemove', this._mouseMoveListener);\n this._screenElement.ownerDocument.removeEventListener('mouseup', this._mouseUpListener);\n }\n clearInterval(this._dragScrollIntervalTimer);\n this._dragScrollIntervalTimer = undefined;\n }\n\n /**\n * Performs an incremental click, setting the selection end position to the mouse\n * position.\n * @param event The mouse event.\n */\n private _onIncrementalClick(event: MouseEvent): void {\n if (this._model.selectionStart) {\n this._model.selectionEnd = this._getMouseBufferCoords(event);\n }\n }\n\n /**\n * Performs a single click, resetting relevant state and setting the selection\n * start position.\n * @param event The mouse event.\n */\n private _onSingleClick(event: MouseEvent): void {\n this._model.selectionStartLength = 0;\n this._model.isSelectAllActive = false;\n this._activeSelectionMode = this.shouldColumnSelect(event) ? SelectionMode.COLUMN : SelectionMode.NORMAL;\n\n // Initialize the new selection\n this._model.selectionStart = this._getMouseBufferCoords(event);\n if (!this._model.selectionStart) {\n return;\n }\n this._model.selectionEnd = undefined;\n\n // Ensure the line exists\n const line = this._bufferService.buffer.lines.get(this._model.selectionStart[1]);\n if (!line) {\n return;\n }\n\n // Return early if the click event is not in the buffer (eg. in scroll bar)\n if (line.length === this._model.selectionStart[0]) {\n return;\n }\n\n // If the mouse is over the second half of a wide character, adjust the\n // selection to cover the whole character\n if (line.hasWidth(this._model.selectionStart[0]) === 0) {\n this._model.selectionStart[0]++;\n }\n }\n\n /**\n * Performs a double click, selecting the current word.\n * @param event The mouse event.\n */\n private _onDoubleClick(event: MouseEvent): void {\n if (this._selectWordAtCursor(event, true)) {\n this._activeSelectionMode = SelectionMode.WORD;\n }\n }\n\n /**\n * Performs a triple click, selecting the current line and activating line\n * select mode.\n * @param event The mouse event.\n */\n private _onTripleClick(event: MouseEvent): void {\n const coords = this._getMouseBufferCoords(event);\n if (coords) {\n this._activeSelectionMode = SelectionMode.LINE;\n this._selectLineAt(coords[1]);\n }\n }\n\n /**\n * Returns whether the selection manager should operate in column select mode\n * @param event the mouse or keyboard event\n */\n public shouldColumnSelect(event: KeyboardEvent | MouseEvent): boolean {\n return event.altKey && !(Browser.isMac && this._optionsService.rawOptions.macOptionClickForcesSelection);\n }\n\n /**\n * Handles the mousemove event when the mouse button is down, recording the\n * end of the selection and refreshing the selection.\n * @param event The mousemove event.\n */\n private _onMouseMove(event: MouseEvent): void {\n // If the mousemove listener is active it means that a selection is\n // currently being made, we should stop propagation to prevent mouse events\n // to be sent to the pty.\n event.stopImmediatePropagation();\n\n // Do nothing if there is no selection start, this can happen if the first\n // click in the terminal is an incremental click\n if (!this._model.selectionStart) {\n return;\n }\n\n // Record the previous position so we know whether to redraw the selection\n // at the end.\n const previousSelectionEnd = this._model.selectionEnd ? [this._model.selectionEnd[0], this._model.selectionEnd[1]] : null;\n\n // Set the initial selection end based on the mouse coordinates\n this._model.selectionEnd = this._getMouseBufferCoords(event);\n if (!this._model.selectionEnd) {\n this.refresh(true);\n return;\n }\n\n // Select the entire line if line select mode is active.\n if (this._activeSelectionMode === SelectionMode.LINE) {\n if (this._model.selectionEnd[1] < this._model.selectionStart[1]) {\n this._model.selectionEnd[0] = 0;\n } else {\n this._model.selectionEnd[0] = this._bufferService.cols;\n }\n } else if (this._activeSelectionMode === SelectionMode.WORD) {\n this._selectToWordAt(this._model.selectionEnd);\n }\n\n // Determine the amount of scrolling that will happen.\n this._dragScrollAmount = this._getMouseEventScrollAmount(event);\n\n // If the cursor was above or below the viewport, make sure it's at the\n // start or end of the viewport respectively. This should only happen when\n // NOT in column select mode.\n if (this._activeSelectionMode !== SelectionMode.COLUMN) {\n if (this._dragScrollAmount > 0) {\n this._model.selectionEnd[0] = this._bufferService.cols;\n } else if (this._dragScrollAmount < 0) {\n this._model.selectionEnd[0] = 0;\n }\n }\n\n // If the character is a wide character include the cell to the right in the\n // selection. Note that selections at the very end of the line will never\n // have a character.\n const buffer = this._bufferService.buffer;\n if (this._model.selectionEnd[1] < buffer.lines.length) {\n const line = buffer.lines.get(this._model.selectionEnd[1]);\n if (line && line.hasWidth(this._model.selectionEnd[0]) === 0) {\n this._model.selectionEnd[0]++;\n }\n }\n\n // Only draw here if the selection changes.\n if (!previousSelectionEnd ||\n previousSelectionEnd[0] !== this._model.selectionEnd[0] ||\n previousSelectionEnd[1] !== this._model.selectionEnd[1]) {\n this.refresh(true);\n }\n }\n\n /**\n * The callback that occurs every DRAG_SCROLL_INTERVAL ms that does the\n * scrolling of the viewport.\n */\n private _dragScroll(): void {\n if (!this._model.selectionEnd || !this._model.selectionStart) {\n return;\n }\n if (this._dragScrollAmount) {\n this._onRequestScrollLines.fire({ amount: this._dragScrollAmount, suppressScrollEvent: false });\n // Re-evaluate selection\n // If the cursor was above or below the viewport, make sure it's at the\n // start or end of the viewport respectively. This should only happen when\n // NOT in column select mode.\n const buffer = this._bufferService.buffer;\n if (this._dragScrollAmount > 0) {\n if (this._activeSelectionMode !== SelectionMode.COLUMN) {\n this._model.selectionEnd[0] = this._bufferService.cols;\n }\n this._model.selectionEnd[1] = Math.min(buffer.ydisp + this._bufferService.rows, buffer.lines.length - 1);\n } else {\n if (this._activeSelectionMode !== SelectionMode.COLUMN) {\n this._model.selectionEnd[0] = 0;\n }\n this._model.selectionEnd[1] = buffer.ydisp;\n }\n this.refresh();\n }\n }\n\n /**\n * Handles the mouseup event, removing the mousedown listeners.\n * @param event The mouseup event.\n */\n private _onMouseUp(event: MouseEvent): void {\n const timeElapsed = event.timeStamp - this._mouseDownTimeStamp;\n\n this._removeMouseDownListeners();\n\n if (this.selectionText.length <= 1 && timeElapsed < ALT_CLICK_MOVE_CURSOR_TIME && event.altKey && this._optionsService.getOption('altClickMovesCursor')) {\n if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {\n const coordinates = this._mouseService.getCoords(\n event,\n this._element,\n this._bufferService.cols,\n this._bufferService.rows,\n false\n );\n if (coordinates && coordinates[0] !== undefined && coordinates[1] !== undefined) {\n const sequence = moveToCellSequence(coordinates[0] - 1, coordinates[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);\n this._coreService.triggerDataEvent(sequence, true);\n }\n }\n } else {\n this._fireEventIfSelectionChanged();\n }\n }\n\n private _fireEventIfSelectionChanged(): void {\n const start = this._model.finalSelectionStart;\n const end = this._model.finalSelectionEnd;\n const hasSelection = !!start && !!end && (start[0] !== end[0] || start[1] !== end[1]);\n\n if (!hasSelection) {\n if (this._oldHasSelection) {\n this._fireOnSelectionChange(start, end, hasSelection);\n }\n return;\n }\n\n // Sanity check, these should not be undefined as there is a selection\n if (!start || !end) {\n return;\n }\n\n if (!this._oldSelectionStart || !this._oldSelectionEnd || (\n start[0] !== this._oldSelectionStart[0] || start[1] !== this._oldSelectionStart[1] ||\n end[0] !== this._oldSelectionEnd[0] || end[1] !== this._oldSelectionEnd[1])) {\n\n this._fireOnSelectionChange(start, end, hasSelection);\n }\n }\n\n private _fireOnSelectionChange(start: [number, number] | undefined, end: [number, number] | undefined, hasSelection: boolean): void {\n this._oldSelectionStart = start;\n this._oldSelectionEnd = end;\n this._oldHasSelection = hasSelection;\n this._onSelectionChange.fire();\n }\n\n private _onBufferActivate(e: {activeBuffer: IBuffer, inactiveBuffer: IBuffer}): void {\n this.clearSelection();\n // Only adjust the selection on trim, shiftElements is rarely used (only in\n // reverseIndex) and delete in a splice is only ever used when the same\n // number of elements was just added. Given this is could actually be\n // beneficial to leave the selection as is for these cases.\n this._trimListener.dispose();\n this._trimListener = e.activeBuffer.lines.onTrim(amount => this._onTrim(amount));\n }\n\n /**\n * Converts a viewport column to the character index on the buffer line, the\n * latter takes into account wide characters.\n * @param coords The coordinates to find the 2 index for.\n */\n private _convertViewportColToCharacterIndex(bufferLine: IBufferLine, coords: [number, number]): number {\n let charIndex = coords[0];\n for (let i = 0; coords[0] >= i; i++) {\n const length = bufferLine.loadCell(i, this._workCell).getChars().length;\n if (this._workCell.getWidth() === 0) {\n // Wide characters aren't included in the line string so decrement the\n // index so the index is back on the wide character.\n charIndex--;\n } else if (length > 1 && coords[0] !== i) {\n // Emojis take up multiple characters, so adjust accordingly. For these\n // we don't want ot include the character at the column as we're\n // returning the start index in the string, not the end index.\n charIndex += length - 1;\n }\n }\n return charIndex;\n }\n\n public setSelection(col: number, row: number, length: number): void {\n this._model.clearSelection();\n this._removeMouseDownListeners();\n this._model.selectionStart = [col, row];\n this._model.selectionStartLength = length;\n this.refresh();\n }\n\n public rightClickSelect(ev: MouseEvent): void {\n if (!this._isClickInSelection(ev)) {\n if (this._selectWordAtCursor(ev, false)) {\n this.refresh(true);\n }\n this._fireEventIfSelectionChanged();\n }\n }\n\n /**\n * Gets positional information for the word at the coordinated specified.\n * @param coords The coordinates to get the word at.\n */\n private _getWordAt(coords: [number, number], allowWhitespaceOnlySelection: boolean, followWrappedLinesAbove: boolean = true, followWrappedLinesBelow: boolean = true): IWordPosition | undefined {\n // Ensure coords are within viewport (eg. not within scroll bar)\n if (coords[0] >= this._bufferService.cols) {\n return undefined;\n }\n\n const buffer = this._bufferService.buffer;\n const bufferLine = buffer.lines.get(coords[1]);\n if (!bufferLine) {\n return undefined;\n }\n\n const line = buffer.translateBufferLineToString(coords[1], false);\n\n // Get actual index, taking into consideration wide characters\n let startIndex = this._convertViewportColToCharacterIndex(bufferLine, coords);\n let endIndex = startIndex;\n\n // Record offset to be used later\n const charOffset = coords[0] - startIndex;\n let leftWideCharCount = 0;\n let rightWideCharCount = 0;\n let leftLongCharOffset = 0;\n let rightLongCharOffset = 0;\n\n if (line.charAt(startIndex) === ' ') {\n // Expand until non-whitespace is hit\n while (startIndex > 0 && line.charAt(startIndex - 1) === ' ') {\n startIndex--;\n }\n while (endIndex < line.length && line.charAt(endIndex + 1) === ' ') {\n endIndex++;\n }\n } else {\n // Expand until whitespace is hit. This algorithm works by scanning left\n // and right from the starting position, keeping both the index format\n // (line) and the column format (bufferLine) in sync. When a wide\n // character is hit, it is recorded and the column index is adjusted.\n let startCol = coords[0];\n let endCol = coords[0];\n\n // Consider the initial position, skip it and increment the wide char\n // variable\n if (bufferLine.getWidth(startCol) === 0) {\n leftWideCharCount++;\n startCol--;\n }\n if (bufferLine.getWidth(endCol) === 2) {\n rightWideCharCount++;\n endCol++;\n }\n\n // Adjust the end index for characters whose length are > 1 (emojis)\n const length = bufferLine.getString(endCol).length;\n if (length > 1) {\n rightLongCharOffset += length - 1;\n endIndex += length - 1;\n }\n\n // Expand the string in both directions until a space is hit\n while (startCol > 0 && startIndex > 0 && !this._isCharWordSeparator(bufferLine.loadCell(startCol - 1, this._workCell))) {\n bufferLine.loadCell(startCol - 1, this._workCell);\n const length = this._workCell.getChars().length;\n if (this._workCell.getWidth() === 0) {\n // If the next character is a wide char, record it and skip the column\n leftWideCharCount++;\n startCol--;\n } else if (length > 1) {\n // If the next character's string is longer than 1 char (eg. emoji),\n // adjust the index\n leftLongCharOffset += length - 1;\n startIndex -= length - 1;\n }\n startIndex--;\n startCol--;\n }\n while (endCol < bufferLine.length && endIndex + 1 < line.length && !this._isCharWordSeparator(bufferLine.loadCell(endCol + 1, this._workCell))) {\n bufferLine.loadCell(endCol + 1, this._workCell);\n const length = this._workCell.getChars().length;\n if (this._workCell.getWidth() === 2) {\n // If the next character is a wide char, record it and skip the column\n rightWideCharCount++;\n endCol++;\n } else if (length > 1) {\n // If the next character's string is longer than 1 char (eg. emoji),\n // adjust the index\n rightLongCharOffset += length - 1;\n endIndex += length - 1;\n }\n endIndex++;\n endCol++;\n }\n }\n\n // Incremenet the end index so it is at the start of the next character\n endIndex++;\n\n // Calculate the start _column_, converting the the string indexes back to\n // column coordinates.\n let start =\n startIndex // The index of the selection's start char in the line string\n + charOffset // The difference between the initial char's column and index\n - leftWideCharCount // The number of wide chars left of the initial char\n + leftLongCharOffset; // The number of additional chars left of the initial char added by columns with strings longer than 1 (emojis)\n\n // Calculate the length in _columns_, converting the the string indexes back\n // to column coordinates.\n let length = Math.min(this._bufferService.cols, // Disallow lengths larger than the terminal cols\n endIndex // The index of the selection's end char in the line string\n - startIndex // The index of the selection's start char in the line string\n + leftWideCharCount // The number of wide chars left of the initial char\n + rightWideCharCount // The number of wide chars right of the initial char (inclusive)\n - leftLongCharOffset // The number of additional chars left of the initial char added by columns with strings longer than 1 (emojis)\n - rightLongCharOffset); // The number of additional chars right of the initial char (inclusive) added by columns with strings longer than 1 (emojis)\n\n if (!allowWhitespaceOnlySelection && line.slice(startIndex, endIndex).trim() === '') {\n return undefined;\n }\n\n // Recurse upwards if the line is wrapped and the word wraps to the above line\n if (followWrappedLinesAbove) {\n if (start === 0 && bufferLine.getCodePoint(0) !== 32 /* ' ' */) {\n const previousBufferLine = buffer.lines.get(coords[1] - 1);\n if (previousBufferLine && bufferLine.isWrapped && previousBufferLine.getCodePoint(this._bufferService.cols - 1) !== 32 /* ' ' */) {\n const previousLineWordPosition = this._getWordAt([this._bufferService.cols - 1, coords[1] - 1], false, true, false);\n if (previousLineWordPosition) {\n const offset = this._bufferService.cols - previousLineWordPosition.start;\n start -= offset;\n length += offset;\n }\n }\n }\n }\n\n // Recurse downwards if the line is wrapped and the word wraps to the next line\n if (followWrappedLinesBelow) {\n if (start + length === this._bufferService.cols && bufferLine.getCodePoint(this._bufferService.cols - 1) !== 32 /* ' ' */) {\n const nextBufferLine = buffer.lines.get(coords[1] + 1);\n if (nextBufferLine?.isWrapped && nextBufferLine.getCodePoint(0) !== 32 /* ' ' */) {\n const nextLineWordPosition = this._getWordAt([0, coords[1] + 1], false, false, true);\n if (nextLineWordPosition) {\n length += nextLineWordPosition.length;\n }\n }\n }\n }\n\n return { start, length };\n }\n\n /**\n * Selects the word at the coordinates specified.\n * @param coords The coordinates to get the word at.\n * @param allowWhitespaceOnlySelection If whitespace should be selected\n */\n protected _selectWordAt(coords: [number, number], allowWhitespaceOnlySelection: boolean): void {\n const wordPosition = this._getWordAt(coords, allowWhitespaceOnlySelection);\n if (wordPosition) {\n // Adjust negative start value\n while (wordPosition.start < 0) {\n wordPosition.start += this._bufferService.cols;\n coords[1]--;\n }\n this._model.selectionStart = [wordPosition.start, coords[1]];\n this._model.selectionStartLength = wordPosition.length;\n }\n }\n\n /**\n * Sets the selection end to the word at the coordinated specified.\n * @param coords The coordinates to get the word at.\n */\n private _selectToWordAt(coords: [number, number]): void {\n const wordPosition = this._getWordAt(coords, true);\n if (wordPosition) {\n let endRow = coords[1];\n\n // Adjust negative start value\n while (wordPosition.start < 0) {\n wordPosition.start += this._bufferService.cols;\n endRow--;\n }\n\n // Adjust wrapped length value, this only needs to happen when values are reversed as in that\n // case we're interested in the start of the word, not the end\n if (!this._model.areSelectionValuesReversed()) {\n while (wordPosition.start + wordPosition.length > this._bufferService.cols) {\n wordPosition.length -= this._bufferService.cols;\n endRow++;\n }\n }\n\n this._model.selectionEnd = [this._model.areSelectionValuesReversed() ? wordPosition.start : wordPosition.start + wordPosition.length, endRow];\n }\n }\n\n /**\n * Gets whether the character is considered a word separator by the select\n * word logic.\n * @param char The character to check.\n */\n private _isCharWordSeparator(cell: CellData): boolean {\n // Zero width characters are never separators as they are always to the\n // right of wide characters\n if (cell.getWidth() === 0) {\n return false;\n }\n return this._optionsService.rawOptions.wordSeparator.indexOf(cell.getChars()) >= 0;\n }\n\n /**\n * Selects the line specified.\n * @param line The line index.\n */\n protected _selectLineAt(line: number): void {\n const wrappedRange = this._bufferService.buffer.getWrappedRangeForLine(line);\n this._model.selectionStart = [0, wrappedRange.first];\n this._model.selectionEnd = [this._bufferService.cols, wrappedRange.last];\n this._model.selectionStartLength = 0;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IEvent } from 'common/EventEmitter';\nimport { IRenderDimensions, IRenderer } from 'browser/renderer/Types';\nimport { IColorSet } from 'browser/Types';\nimport { ISelectionRedrawRequestEvent as ISelectionRequestRedrawEvent, ISelectionRequestScrollLinesEvent } from 'browser/selection/Types';\nimport { createDecorator } from 'common/services/ServiceRegistry';\nimport { IDisposable } from 'common/Types';\nimport { IDecorationOptions, IDecoration } from 'xterm';\nimport { IBufferService } from 'common/services/Services';\n\nexport const ICharSizeService = createDecorator<ICharSizeService>('CharSizeService');\nexport interface ICharSizeService {\n serviceBrand: undefined;\n\n readonly width: number;\n readonly height: number;\n readonly hasValidSize: boolean;\n\n readonly onCharSizeChange: IEvent<void>;\n\n measure(): void;\n}\n\nexport const ICoreBrowserService = createDecorator<ICoreBrowserService>('CoreBrowserService');\nexport interface ICoreBrowserService {\n serviceBrand: undefined;\n\n readonly isFocused: boolean;\n}\n\nexport const IMouseService = createDecorator<IMouseService>('MouseService');\nexport interface IMouseService {\n serviceBrand: undefined;\n\n getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, isSelection?: boolean): [number, number] | undefined;\n getRawByteCoords(event: MouseEvent, element: HTMLElement, colCount: number, rowCount: number): { x: number, y: number } | undefined;\n}\n\nexport const IRenderService = createDecorator<IRenderService>('RenderService');\nexport interface IRenderService extends IDisposable {\n serviceBrand: undefined;\n\n onDimensionsChange: IEvent<IRenderDimensions>;\n /**\n * Fires when buffer changes are rendered. This does not fire when only cursor\n * or selections are rendered.\n */\n onRenderedBufferChange: IEvent<{ start: number, end: number }>;\n onRefreshRequest: IEvent<{ start: number, end: number }>;\n\n dimensions: IRenderDimensions;\n\n refreshRows(start: number, end: number): void;\n clearTextureAtlas(): void;\n resize(cols: number, rows: number): void;\n changeOptions(): void;\n setRenderer(renderer: IRenderer): void;\n setColors(colors: IColorSet): void;\n onDevicePixelRatioChange(): void;\n onResize(cols: number, rows: number): void;\n // TODO: Is this useful when we have onResize?\n onCharSizeChanged(): void;\n onBlur(): void;\n onFocus(): void;\n onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void;\n onCursorMove(): void;\n clear(): void;\n}\n\nexport const ISelectionService = createDecorator<ISelectionService>('SelectionService');\nexport interface ISelectionService {\n serviceBrand: undefined;\n\n readonly selectionText: string;\n readonly hasSelection: boolean;\n readonly selectionStart: [number, number] | undefined;\n readonly selectionEnd: [number, number] | undefined;\n\n readonly onLinuxMouseSelection: IEvent<string>;\n readonly onRequestRedraw: IEvent<ISelectionRequestRedrawEvent>;\n readonly onRequestScrollLines: IEvent<ISelectionRequestScrollLinesEvent>;\n readonly onSelectionChange: IEvent<void>;\n\n disable(): void;\n enable(): void;\n reset(): void;\n setSelection(row: number, col: number, length: number): void;\n selectAll(): void;\n selectLines(start: number, end: number): void;\n clearSelection(): void;\n rightClickSelect(event: MouseEvent): void;\n shouldColumnSelect(event: KeyboardEvent | MouseEvent): boolean;\n shouldForceSelection(event: MouseEvent): boolean;\n refresh(isLinuxMouseSelection?: boolean): void;\n onMouseDown(event: MouseEvent): void;\n}\n\nexport const ISoundService = createDecorator<ISoundService>('SoundService');\nexport interface ISoundService {\n serviceBrand: undefined;\n\n playBellSound(): void;\n}\n\n\nexport const ICharacterJoinerService = createDecorator<ICharacterJoinerService>('CharacterJoinerService');\nexport interface ICharacterJoinerService {\n serviceBrand: undefined;\n\n register(handler: (text: string) => [number, number][]): number;\n deregister(joinerId: number): boolean;\n getJoinedCharacters(row: number): [number, number][];\n}\n\n\nexport const IDecorationService = createDecorator<IDecorationService>('DecorationService');\nexport interface IDecorationService extends IDisposable {\n registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;\n refresh(): void;\n attachToDom(screenElement: HTMLElement, renderService: IRenderService, bufferService: IBufferService): void;\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IOptionsService } from 'common/services/Services';\nimport { ISoundService } from 'browser/services/Services';\n\nexport class SoundService implements ISoundService {\n public serviceBrand: undefined;\n\n private static _audioContext: AudioContext;\n\n public static get audioContext(): AudioContext | null {\n if (!SoundService._audioContext) {\n const audioContextCtor: typeof AudioContext = (window as any).AudioContext || (window as any).webkitAudioContext;\n if (!audioContextCtor) {\n console.warn('Web Audio API is not supported by this browser. Consider upgrading to the latest version');\n return null;\n }\n SoundService._audioContext = new audioContextCtor();\n }\n return SoundService._audioContext;\n }\n\n constructor(\n @IOptionsService private _optionsService: IOptionsService\n ) {\n }\n\n public playBellSound(): void {\n const ctx = SoundService.audioContext;\n if (!ctx) {\n return;\n }\n const bellAudioSource = ctx.createBufferSource();\n ctx.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)), (buffer) => {\n bellAudioSource.buffer = buffer;\n bellAudioSource.connect(ctx.destination);\n bellAudioSource.start(0);\n });\n }\n\n private _base64ToArrayBuffer(base64: string): ArrayBuffer {\n const binaryString = window.atob(base64);\n const len = binaryString.length;\n const bytes = new Uint8Array(len);\n\n for (let i = 0; i < len; i++) {\n bytes[i] = binaryString.charCodeAt(i);\n }\n\n return bytes.buffer;\n }\n\n private _removeMimeType(dataURI: string): string {\n // Split the input to get the mime-type and the data itself\n const splitUri = dataURI.split(',');\n\n // Return only the data\n return splitUri[1];\n }\n}\n","/**\n * Copyright (c) 2016 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ICircularList } from 'common/Types';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\n\nexport interface IInsertEvent {\n index: number;\n amount: number;\n}\n\nexport interface IDeleteEvent {\n index: number;\n amount: number;\n}\n\n/**\n * Represents a circular list; a list with a maximum size that wraps around when push is called,\n * overriding values at the start of the list.\n */\nexport class CircularList<T> implements ICircularList<T> {\n protected _array: (T | undefined)[];\n private _startIndex: number;\n private _length: number;\n\n public onDeleteEmitter = new EventEmitter<IDeleteEvent>();\n public get onDelete(): IEvent<IDeleteEvent> { return this.onDeleteEmitter.event; }\n public onInsertEmitter = new EventEmitter<IInsertEvent>();\n public get onInsert(): IEvent<IInsertEvent> { return this.onInsertEmitter.event; }\n public onTrimEmitter = new EventEmitter<number>();\n public get onTrim(): IEvent<number> { return this.onTrimEmitter.event; }\n\n constructor(\n private _maxLength: number\n ) {\n this._array = new Array<T>(this._maxLength);\n this._startIndex = 0;\n this._length = 0;\n }\n\n public get maxLength(): number {\n return this._maxLength;\n }\n\n public set maxLength(newMaxLength: number) {\n // There was no change in maxLength, return early.\n if (this._maxLength === newMaxLength) {\n return;\n }\n\n // Reconstruct array, starting at index 0. Only transfer values from the\n // indexes 0 to length.\n const newArray = new Array<T | undefined>(newMaxLength);\n for (let i = 0; i < Math.min(newMaxLength, this.length); i++) {\n newArray[i] = this._array[this._getCyclicIndex(i)];\n }\n this._array = newArray;\n this._maxLength = newMaxLength;\n this._startIndex = 0;\n }\n\n public get length(): number {\n return this._length;\n }\n\n public set length(newLength: number) {\n if (newLength > this._length) {\n for (let i = this._length; i < newLength; i++) {\n this._array[i] = undefined;\n }\n }\n this._length = newLength;\n }\n\n /**\n * Gets the value at an index.\n *\n * Note that for performance reasons there is no bounds checking here, the index reference is\n * circular so this should always return a value and never throw.\n * @param index The index of the value to get.\n * @return The value corresponding to the index.\n */\n public get(index: number): T | undefined {\n return this._array[this._getCyclicIndex(index)];\n }\n\n /**\n * Sets the value at an index.\n *\n * Note that for performance reasons there is no bounds checking here, the index reference is\n * circular so this should always return a value and never throw.\n * @param index The index to set.\n * @param value The value to set.\n */\n public set(index: number, value: T | undefined): void {\n this._array[this._getCyclicIndex(index)] = value;\n }\n\n /**\n * Pushes a new value onto the list, wrapping around to the start of the array, overriding index 0\n * if the maximum length is reached.\n * @param value The value to push onto the list.\n */\n public push(value: T): void {\n this._array[this._getCyclicIndex(this._length)] = value;\n if (this._length === this._maxLength) {\n this._startIndex = ++this._startIndex % this._maxLength;\n this.onTrimEmitter.fire(1);\n } else {\n this._length++;\n }\n }\n\n /**\n * Advance ringbuffer index and return current element for recycling.\n * Note: The buffer must be full for this method to work.\n * @throws When the buffer is not full.\n */\n public recycle(): T {\n if (this._length !== this._maxLength) {\n throw new Error('Can only recycle when the buffer is full');\n }\n this._startIndex = ++this._startIndex % this._maxLength;\n this.onTrimEmitter.fire(1);\n return this._array[this._getCyclicIndex(this._length - 1)]!;\n }\n\n /**\n * Ringbuffer is at max length.\n */\n public get isFull(): boolean {\n return this._length === this._maxLength;\n }\n\n /**\n * Removes and returns the last value on the list.\n * @return The popped value.\n */\n public pop(): T | undefined {\n return this._array[this._getCyclicIndex(this._length-- - 1)];\n }\n\n /**\n * Deletes and/or inserts items at a particular index (in that order). Unlike\n * Array.prototype.splice, this operation does not return the deleted items as a new array in\n * order to save creating a new array. Note that this operation may shift all values in the list\n * in the worst case.\n * @param start The index to delete and/or insert.\n * @param deleteCount The number of elements to delete.\n * @param items The items to insert.\n */\n public splice(start: number, deleteCount: number, ...items: T[]): void {\n // Delete items\n if (deleteCount) {\n for (let i = start; i < this._length - deleteCount; i++) {\n this._array[this._getCyclicIndex(i)] = this._array[this._getCyclicIndex(i + deleteCount)];\n }\n this._length -= deleteCount;\n this.onDeleteEmitter.fire({ index: start, amount: deleteCount });\n }\n\n // Add items\n for (let i = this._length - 1; i >= start; i--) {\n this._array[this._getCyclicIndex(i + items.length)] = this._array[this._getCyclicIndex(i)];\n }\n for (let i = 0; i < items.length; i++) {\n this._array[this._getCyclicIndex(start + i)] = items[i];\n }\n if (items.length) {\n this.onInsertEmitter.fire({ index: start, amount: items.length });\n }\n\n // Adjust length as needed\n if (this._length + items.length > this._maxLength) {\n const countToTrim = (this._length + items.length) - this._maxLength;\n this._startIndex += countToTrim;\n this._length = this._maxLength;\n this.onTrimEmitter.fire(countToTrim);\n } else {\n this._length += items.length;\n }\n }\n\n /**\n * Trims a number of items from the start of the list.\n * @param count The number of items to remove.\n */\n public trimStart(count: number): void {\n if (count > this._length) {\n count = this._length;\n }\n this._startIndex += count;\n this._length -= count;\n this.onTrimEmitter.fire(count);\n }\n\n public shiftElements(start: number, count: number, offset: number): void {\n if (count <= 0) {\n return;\n }\n if (start < 0 || start >= this._length) {\n throw new Error('start argument out of range');\n }\n if (start + offset < 0) {\n throw new Error('Cannot shift elements in list beyond index 0');\n }\n\n if (offset > 0) {\n for (let i = count - 1; i >= 0; i--) {\n this.set(start + i + offset, this.get(start + i));\n }\n const expandListBy = (start + count + offset) - this._length;\n if (expandListBy > 0) {\n this._length += expandListBy;\n while (this._length > this._maxLength) {\n this._length--;\n this._startIndex++;\n this.onTrimEmitter.fire(1);\n }\n }\n } else {\n for (let i = 0; i < count; i++) {\n this.set(start + i + offset, this.get(start + i));\n }\n }\n }\n\n /**\n * Gets the cyclic index for the specified regular index. The cyclic index can then be used on the\n * backing array to get the element associated with the regular index.\n * @param index The regular index.\n * @returns The cyclic index.\n */\n private _getCyclicIndex(index: number): number {\n return (this._startIndex + index) % this._maxLength;\n }\n}\n","/**\n * Copyright (c) 2016 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\n/*\n * A simple utility for cloning values\n */\nexport function clone<T>(val: T, depth: number = 5): T {\n if (typeof val !== 'object') {\n return val;\n }\n\n // If we're cloning an array, use an array as the base, otherwise use an object\n const clonedObject: any = Array.isArray(val) ? [] : {};\n\n for (const key in val) {\n // Recursively clone eack item unless we're at the maximum depth\n clonedObject[key] = depth <= 1 ? val[key] : (val[key] && clone(val[key], depth - 1));\n }\n\n return clonedObject as T;\n}\n","/**\n * Copyright (c) 2014-2020 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * @license MIT\n *\n * Originally forked from (with the author's permission):\n * Fabrice Bellard's javascript vt100 for jslinux:\n * http://bellard.org/jslinux/\n * Copyright (c) 2011 Fabrice Bellard\n * The original design remains. The terminal itself\n * has been extended to include xterm CSI codes, among\n * other features.\n *\n * Terminal Emulation References:\n * http://vt100.net/\n * http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt\n * http://invisible-island.net/xterm/ctlseqs/ctlseqs.html\n * http://invisible-island.net/vttest/\n * http://www.inwap.com/pdp10/ansicode.txt\n * http://linux.die.net/man/4/console_codes\n * http://linux.die.net/man/7/urxvt\n */\n\nimport { Disposable } from 'common/Lifecycle';\nimport { IInstantiationService, IOptionsService, IBufferService, ILogService, ICharsetService, ICoreService, ICoreMouseService, IUnicodeService, IDirtyRowService, LogLevelEnum, ITerminalOptions } from 'common/services/Services';\nimport { InstantiationService } from 'common/services/InstantiationService';\nimport { LogService } from 'common/services/LogService';\nimport { BufferService, MINIMUM_COLS, MINIMUM_ROWS } from 'common/services/BufferService';\nimport { OptionsService } from 'common/services/OptionsService';\nimport { IDisposable, IBufferLine, IAttributeData, ICoreTerminal, IKeyboardEvent, IScrollEvent, ScrollSource, ITerminalOptions as IPublicTerminalOptions } from 'common/Types';\nimport { CoreService } from 'common/services/CoreService';\nimport { EventEmitter, IEvent, forwardEvent } from 'common/EventEmitter';\nimport { CoreMouseService } from 'common/services/CoreMouseService';\nimport { DirtyRowService } from 'common/services/DirtyRowService';\nimport { UnicodeService } from 'common/services/UnicodeService';\nimport { CharsetService } from 'common/services/CharsetService';\nimport { updateWindowsModeWrappedState } from 'common/WindowsMode';\nimport { IFunctionIdentifier, IParams } from 'common/parser/Types';\nimport { IBufferSet } from 'common/buffer/Types';\nimport { InputHandler } from 'common/InputHandler';\nimport { WriteBuffer } from 'common/input/WriteBuffer';\n\n// Only trigger this warning a single time per session\nlet hasWriteSyncWarnHappened = false;\n\nexport abstract class CoreTerminal extends Disposable implements ICoreTerminal {\n protected readonly _instantiationService: IInstantiationService;\n protected readonly _bufferService: IBufferService;\n protected readonly _logService: ILogService;\n protected readonly _charsetService: ICharsetService;\n protected readonly _dirtyRowService: IDirtyRowService;\n\n public readonly coreMouseService: ICoreMouseService;\n public readonly coreService: ICoreService;\n public readonly unicodeService: IUnicodeService;\n public readonly optionsService: IOptionsService;\n\n protected _inputHandler: InputHandler;\n private _writeBuffer: WriteBuffer;\n private _windowsMode: IDisposable | undefined;\n\n private _onBinary = new EventEmitter<string>();\n public get onBinary(): IEvent<string> { return this._onBinary.event; }\n private _onData = new EventEmitter<string>();\n public get onData(): IEvent<string> { return this._onData.event; }\n protected _onLineFeed = new EventEmitter<void>();\n public get onLineFeed(): IEvent<void> { return this._onLineFeed.event; }\n private _onResize = new EventEmitter<{ cols: number, rows: number }>();\n public get onResize(): IEvent<{ cols: number, rows: number }> { return this._onResize.event; }\n protected _onScroll = new EventEmitter<IScrollEvent, void>();\n /**\n * Internally we track the source of the scroll but this is meaningless outside the library so\n * it's filtered out.\n */\n protected _onScrollApi?: EventEmitter<number, void>;\n public get onScroll(): IEvent<number, void> {\n if (!this._onScrollApi) {\n this._onScrollApi = new EventEmitter<number, void>();\n this.register(this._onScroll.event(ev => {\n this._onScrollApi?.fire(ev.position);\n }));\n }\n return this._onScrollApi.event;\n }\n\n public get cols(): number { return this._bufferService.cols; }\n public get rows(): number { return this._bufferService.rows; }\n public get buffers(): IBufferSet { return this._bufferService.buffers; }\n public get options(): ITerminalOptions { return this.optionsService.options; }\n public set options(options: ITerminalOptions) {\n for (const key in options) {\n this.optionsService.options[key] = options[key];\n }\n }\n\n constructor(\n options: Partial<ITerminalOptions>\n ) {\n super();\n\n // Setup and initialize services\n this._instantiationService = new InstantiationService();\n this.optionsService = new OptionsService(options);\n this._instantiationService.setService(IOptionsService, this.optionsService);\n this._bufferService = this.register(this._instantiationService.createInstance(BufferService));\n this._instantiationService.setService(IBufferService, this._bufferService);\n this._logService = this._instantiationService.createInstance(LogService);\n this._instantiationService.setService(ILogService, this._logService);\n this.coreService = this.register(this._instantiationService.createInstance(CoreService, () => this.scrollToBottom()));\n this._instantiationService.setService(ICoreService, this.coreService);\n this.coreMouseService = this._instantiationService.createInstance(CoreMouseService);\n this._instantiationService.setService(ICoreMouseService, this.coreMouseService);\n this._dirtyRowService = this._instantiationService.createInstance(DirtyRowService);\n this._instantiationService.setService(IDirtyRowService, this._dirtyRowService);\n this.unicodeService = this._instantiationService.createInstance(UnicodeService);\n this._instantiationService.setService(IUnicodeService, this.unicodeService);\n this._charsetService = this._instantiationService.createInstance(CharsetService);\n this._instantiationService.setService(ICharsetService, this._charsetService);\n\n // Register input handler and handle/forward events\n this._inputHandler = new InputHandler(this._bufferService, this._charsetService, this.coreService, this._dirtyRowService, this._logService, this.optionsService, this.coreMouseService, this.unicodeService);\n this.register(forwardEvent(this._inputHandler.onLineFeed, this._onLineFeed));\n this.register(this._inputHandler);\n\n // Setup listeners\n this.register(forwardEvent(this._bufferService.onResize, this._onResize));\n this.register(forwardEvent(this.coreService.onData, this._onData));\n this.register(forwardEvent(this.coreService.onBinary, this._onBinary));\n this.register(this.optionsService.onOptionChange(key => this._updateOptions(key)));\n this.register(this._bufferService.onScroll(event => {\n this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: ScrollSource.TERMINAL });\n this._dirtyRowService.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);\n }));\n this.register(this._inputHandler.onScroll(event => {\n this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: ScrollSource.TERMINAL });\n this._dirtyRowService.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);\n }));\n\n // Setup WriteBuffer\n this._writeBuffer = new WriteBuffer((data, promiseResult) => this._inputHandler.parse(data, promiseResult));\n }\n\n public dispose(): void {\n if (this._isDisposed) {\n return;\n }\n super.dispose();\n this._windowsMode?.dispose();\n this._windowsMode = undefined;\n }\n\n public write(data: string | Uint8Array, callback?: () => void): void {\n this._writeBuffer.write(data, callback);\n }\n\n /**\n * Write data to terminal synchonously.\n *\n * This method is unreliable with async parser handlers, thus should not\n * be used anymore. If you need blocking semantics on data input consider\n * `write` with a callback instead.\n *\n * @deprecated Unreliable, will be removed soon.\n */\n public writeSync(data: string | Uint8Array, maxSubsequentCalls?: number): void {\n if (this._logService.logLevel <= LogLevelEnum.WARN && !hasWriteSyncWarnHappened) {\n this._logService.warn('writeSync is unreliable and will be removed soon.');\n hasWriteSyncWarnHappened = true;\n }\n this._writeBuffer.writeSync(data, maxSubsequentCalls);\n }\n\n public resize(x: number, y: number): void {\n if (isNaN(x) || isNaN(y)) {\n return;\n }\n\n x = Math.max(x, MINIMUM_COLS);\n y = Math.max(y, MINIMUM_ROWS);\n\n this._bufferService.resize(x, y);\n }\n\n /**\n * Scroll the terminal down 1 row, creating a blank line.\n * @param isWrapped Whether the new line is wrapped from the previous line.\n */\n public scroll(eraseAttr: IAttributeData, isWrapped: boolean = false): void {\n this._bufferService.scroll(eraseAttr, isWrapped);\n }\n\n /**\n * Scroll the display of the terminal\n * @param disp The number of lines to scroll down (negative scroll up).\n * @param suppressScrollEvent Don't emit the scroll event as scrollLines. This is used\n * to avoid unwanted events being handled by the viewport when the event was triggered from the\n * viewport originally.\n */\n public scrollLines(disp: number, suppressScrollEvent?: boolean, source?: ScrollSource): void {\n this._bufferService.scrollLines(disp, suppressScrollEvent, source);\n }\n\n /**\n * Scroll the display of the terminal by a number of pages.\n * @param pageCount The number of pages to scroll (negative scrolls up).\n */\n public scrollPages(pageCount: number): void {\n this._bufferService.scrollPages(pageCount);\n }\n\n /**\n * Scrolls the display of the terminal to the top.\n */\n public scrollToTop(): void {\n this._bufferService.scrollToTop();\n }\n\n /**\n * Scrolls the display of the terminal to the bottom.\n */\n public scrollToBottom(): void {\n this._bufferService.scrollToBottom();\n }\n\n public scrollToLine(line: number): void {\n this._bufferService.scrollToLine(line);\n }\n\n /** Add handler for ESC escape sequence. See xterm.d.ts for details. */\n public registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable {\n return this._inputHandler.registerEscHandler(id, callback);\n }\n\n /** Add handler for DCS escape sequence. See xterm.d.ts for details. */\n public registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable {\n return this._inputHandler.registerDcsHandler(id, callback);\n }\n\n /** Add handler for CSI escape sequence. See xterm.d.ts for details. */\n public registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable {\n return this._inputHandler.registerCsiHandler(id, callback);\n }\n\n /** Add handler for OSC escape sequence. See xterm.d.ts for details. */\n public registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable {\n return this._inputHandler.registerOscHandler(ident, callback);\n }\n\n protected _setup(): void {\n if (this.optionsService.rawOptions.windowsMode) {\n this._enableWindowsMode();\n }\n }\n\n public reset(): void {\n this._inputHandler.reset();\n this._bufferService.reset();\n this._charsetService.reset();\n this.coreService.reset();\n this.coreMouseService.reset();\n }\n\n protected _updateOptions(key: string): void {\n // TODO: These listeners should be owned by individual components\n switch (key) {\n case 'scrollback':\n this.buffers.resize(this.cols, this.rows);\n break;\n case 'windowsMode':\n if (this.optionsService.rawOptions.windowsMode) {\n this._enableWindowsMode();\n } else {\n this._windowsMode?.dispose();\n this._windowsMode = undefined;\n }\n break;\n }\n }\n\n protected _enableWindowsMode(): void {\n if (!this._windowsMode) {\n const disposables: IDisposable[] = [];\n disposables.push(this.onLineFeed(updateWindowsModeWrappedState.bind(null, this._bufferService)));\n disposables.push(this.registerCsiHandler({ final: 'H' }, () => {\n updateWindowsModeWrappedState(this._bufferService);\n return false;\n }));\n this._windowsMode = {\n dispose: () => {\n for (const d of disposables) {\n d.dispose();\n }\n }\n };\n }\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IDisposable } from 'common/Types';\n\ninterface IListener<T, U = void> {\n (arg1: T, arg2: U): void;\n}\n\nexport interface IEvent<T, U = void> {\n (listener: (arg1: T, arg2: U) => any): IDisposable;\n}\n\nexport interface IEventEmitter<T, U = void> {\n event: IEvent<T, U>;\n fire(arg1: T, arg2: U): void;\n dispose(): void;\n}\n\nexport class EventEmitter<T, U = void> implements IEventEmitter<T, U> {\n private _listeners: IListener<T, U>[] = [];\n private _event?: IEvent<T, U>;\n private _disposed: boolean = false;\n\n public get event(): IEvent<T, U> {\n if (!this._event) {\n this._event = (listener: (arg1: T, arg2: U) => any) => {\n this._listeners.push(listener);\n const disposable = {\n dispose: () => {\n if (!this._disposed) {\n for (let i = 0; i < this._listeners.length; i++) {\n if (this._listeners[i] === listener) {\n this._listeners.splice(i, 1);\n return;\n }\n }\n }\n }\n };\n return disposable;\n };\n }\n return this._event;\n }\n\n public fire(arg1: T, arg2: U): void {\n const queue: IListener<T, U>[] = [];\n for (let i = 0; i < this._listeners.length; i++) {\n queue.push(this._listeners[i]);\n }\n for (let i = 0; i < queue.length; i++) {\n queue[i].call(undefined, arg1, arg2);\n }\n }\n\n public dispose(): void {\n if (this._listeners) {\n this._listeners.length = 0;\n }\n this._disposed = true;\n }\n}\n\nexport function forwardEvent<T>(from: IEvent<T>, to: IEventEmitter<T>): IDisposable {\n return from(e => to.fire(e));\n}\n","/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * @license MIT\n */\n\nimport { IInputHandler, IAttributeData, IDisposable, IWindowOptions, IColorEvent, IParseStack, ColorIndex, ColorRequestType } from 'common/Types';\nimport { C0, C1 } from 'common/data/EscapeSequences';\nimport { CHARSETS, DEFAULT_CHARSET } from 'common/data/Charsets';\nimport { EscapeSequenceParser } from 'common/parser/EscapeSequenceParser';\nimport { Disposable } from 'common/Lifecycle';\nimport { concat } from 'common/TypedArrayUtils';\nimport { StringToUtf32, stringFromCodePoint, utf32ToString, Utf8ToUtf32 } from 'common/input/TextDecoder';\nimport { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { IParsingState, IDcsHandler, IEscapeSequenceParser, IParams, IFunctionIdentifier } from 'common/parser/Types';\nimport { NULL_CELL_CODE, NULL_CELL_WIDTH, Attributes, FgFlags, BgFlags, Content, UnderlineStyle } from 'common/buffer/Constants';\nimport { CellData } from 'common/buffer/CellData';\nimport { AttributeData } from 'common/buffer/AttributeData';\nimport { ICoreService, IBufferService, IOptionsService, ILogService, IDirtyRowService, ICoreMouseService, ICharsetService, IUnicodeService, LogLevelEnum } from 'common/services/Services';\nimport { OscHandler } from 'common/parser/OscParser';\nimport { DcsHandler } from 'common/parser/DcsParser';\nimport { IBuffer } from 'common/buffer/Types';\nimport { parseColor } from 'common/input/XParseColor';\n\n/**\n * Map collect to glevel. Used in `selectCharset`.\n */\nconst GLEVEL: { [key: string]: number } = { '(': 0, ')': 1, '*': 2, '+': 3, '-': 1, '.': 2 };\n\n/**\n * VT commands done by the parser - FIXME: move this to the parser?\n */\n// @vt: #Y ESC CSI \"Control Sequence Introducer\" \"ESC [\" \"Start of a CSI sequence.\"\n// @vt: #Y ESC OSC \"Operating System Command\" \"ESC ]\" \"Start of an OSC sequence.\"\n// @vt: #Y ESC DCS \"Device Control String\" \"ESC P\" \"Start of a DCS sequence.\"\n// @vt: #Y ESC ST \"String Terminator\" \"ESC \\\" \"Terminator used for string type sequences.\"\n// @vt: #Y ESC PM \"Privacy Message\" \"ESC ^\" \"Start of a privacy message.\"\n// @vt: #Y ESC APC \"Application Program Command\" \"ESC _\" \"Start of an APC sequence.\"\n// @vt: #Y C1 CSI \"Control Sequence Introducer\" \"\\x9B\" \"Start of a CSI sequence.\"\n// @vt: #Y C1 OSC \"Operating System Command\" \"\\x9D\" \"Start of an OSC sequence.\"\n// @vt: #Y C1 DCS \"Device Control String\" \"\\x90\" \"Start of a DCS sequence.\"\n// @vt: #Y C1 ST \"String Terminator\" \"\\x9C\" \"Terminator used for string type sequences.\"\n// @vt: #Y C1 PM \"Privacy Message\" \"\\x9E\" \"Start of a privacy message.\"\n// @vt: #Y C1 APC \"Application Program Command\" \"\\x9F\" \"Start of an APC sequence.\"\n// @vt: #Y C0 NUL \"Null\" \"\\0, \\x00\" \"NUL is ignored.\"\n// @vt: #Y C0 ESC \"Escape\" \"\\e, \\x1B\" \"Start of a sequence. Cancels any other sequence.\"\n\n/**\n * Document common VT features here that are currently unsupported\n */\n// @vt: #N DCS SIXEL \"SIXEL Graphics\" \"DCS Ps ; Ps ; Ps ; q \tPt ST\" \"Draw SIXEL image starting at cursor position.\"\n// @vt: #N OSC 1 \"Set Icon Name\" \"OSC 1 ; Pt BEL\" \"Set icon name.\"\n\n/**\n * Max length of the UTF32 input buffer. Real memory consumption is 4 times higher.\n */\nconst MAX_PARSEBUFFER_LENGTH = 131072;\n\n/**\n * Limit length of title and icon name stacks.\n */\nconst STACK_LIMIT = 10;\n\n// map params to window option\nfunction paramToWindowOption(n: number, opts: IWindowOptions): boolean {\n if (n > 24) {\n return opts.setWinLines || false;\n }\n switch (n) {\n case 1: return !!opts.restoreWin;\n case 2: return !!opts.minimizeWin;\n case 3: return !!opts.setWinPosition;\n case 4: return !!opts.setWinSizePixels;\n case 5: return !!opts.raiseWin;\n case 6: return !!opts.lowerWin;\n case 7: return !!opts.refreshWin;\n case 8: return !!opts.setWinSizeChars;\n case 9: return !!opts.maximizeWin;\n case 10: return !!opts.fullscreenWin;\n case 11: return !!opts.getWinState;\n case 13: return !!opts.getWinPosition;\n case 14: return !!opts.getWinSizePixels;\n case 15: return !!opts.getScreenSizePixels;\n case 16: return !!opts.getCellSizePixels;\n case 18: return !!opts.getWinSizeChars;\n case 19: return !!opts.getScreenSizeChars;\n case 20: return !!opts.getIconTitle;\n case 21: return !!opts.getWinTitle;\n case 22: return !!opts.pushTitle;\n case 23: return !!opts.popTitle;\n case 24: return !!opts.setWinLines;\n }\n return false;\n}\n\nexport enum WindowsOptionsReportType {\n GET_WIN_SIZE_PIXELS = 0,\n GET_CELL_SIZE_PIXELS = 1\n}\n\n// create a warning log if an async handler takes longer than the limit (in ms)\nconst SLOW_ASYNC_LIMIT = 5000;\n\n/**\n * DCS subparser implementations\n */\n\n/**\n * DCS $ q Pt ST\n * DECRQSS (https://vt100.net/docs/vt510-rm/DECRQSS.html)\n * Request Status String (DECRQSS), VT420 and up.\n * Response: DECRPSS (https://vt100.net/docs/vt510-rm/DECRPSS.html)\n *\n * @vt: #P[See limited support below.] DCS DECRQSS \"Request Selection or Setting\" \"DCS $ q Pt ST\" \"Request several terminal settings.\"\n * Response is in the form `ESC P 1 $ r Pt ST` for valid requests, where `Pt` contains the corresponding CSI string,\n * `ESC P 0 ST` for invalid requests.\n *\n * Supported requests and responses:\n *\n * | Type | Request | Response (`Pt`) |\n * | -------------------------------- | ----------------- | ----------------------------------------------------- |\n * | Graphic Rendition (SGR) | `DCS $ q m ST` | always reporting `0m` (currently broken) |\n * | Top and Bottom Margins (DECSTBM) | `DCS $ q r ST` | `Ps ; Ps r` |\n * | Cursor Style (DECSCUSR) | `DCS $ q SP q ST` | `Ps SP q` |\n * | Protection Attribute (DECSCA) | `DCS $ q \" q ST` | always reporting `0 \" q` (DECSCA is unsupported) |\n * | Conformance Level (DECSCL) | `DCS $ q \" p ST` | always reporting `61 ; 1 \" p` (DECSCL is unsupported) |\n *\n *\n * TODO:\n * - fix SGR report\n * - either implement DECSCA or remove the report\n * - either check which conformance is better suited or remove the report completely\n * --> we are currently a mixture of all up to VT400 but dont follow anyone strictly\n */\nclass DECRQSS implements IDcsHandler {\n private _data: Uint32Array = new Uint32Array(0);\n\n constructor(\n private _bufferService: IBufferService,\n private _coreService: ICoreService,\n private _logService: ILogService,\n private _optionsService: IOptionsService\n ) { }\n\n public hook(params: IParams): void {\n this._data = new Uint32Array(0);\n }\n\n public put(data: Uint32Array, start: number, end: number): void {\n this._data = concat(this._data, data.subarray(start, end));\n }\n\n public unhook(success: boolean): boolean {\n if (!success) {\n this._data = new Uint32Array(0);\n return true;\n }\n const data = utf32ToString(this._data);\n this._data = new Uint32Array(0);\n switch (data) {\n // valid: DCS 1 $ r Pt ST (xterm)\n case '\"q': // DECSCA\n this._coreService.triggerDataEvent(`${C0.ESC}P1$r0\"q${C0.ESC}\\\\`);\n break;\n case '\"p': // DECSCL\n this._coreService.triggerDataEvent(`${C0.ESC}P1$r61;1\"p${C0.ESC}\\\\`);\n break;\n case 'r': // DECSTBM\n const pt = '' + (this._bufferService.buffer.scrollTop + 1) +\n ';' + (this._bufferService.buffer.scrollBottom + 1) + 'r';\n this._coreService.triggerDataEvent(`${C0.ESC}P1$r${pt}${C0.ESC}\\\\`);\n break;\n case 'm': // SGR\n // TODO: report real settings instead of 0m\n this._coreService.triggerDataEvent(`${C0.ESC}P1$r0m${C0.ESC}\\\\`);\n break;\n case ' q': // DECSCUSR\n const STYLES: { [key: string]: number } = { 'block': 2, 'underline': 4, 'bar': 6 };\n let style = STYLES[this._optionsService.rawOptions.cursorStyle];\n style -= this._optionsService.rawOptions.cursorBlink ? 1 : 0;\n this._coreService.triggerDataEvent(`${C0.ESC}P1$r${style} q${C0.ESC}\\\\`);\n break;\n default:\n // invalid: DCS 0 $ r Pt ST (xterm)\n this._logService.debug('Unknown DCS $q %s', data);\n this._coreService.triggerDataEvent(`${C0.ESC}P0$r${C0.ESC}\\\\`);\n }\n return true;\n }\n}\n\n/**\n * DCS Ps; Ps| Pt ST\n * DECUDK (https://vt100.net/docs/vt510-rm/DECUDK.html)\n * not supported\n *\n * @vt: #N DCS DECUDK \"User Defined Keys\" \"DCS Ps ; Ps | Pt ST\" \"Definitions for user-defined keys.\"\n */\n\n/**\n * DCS + q Pt ST (xterm)\n * Request Terminfo String\n * not implemented\n *\n * @vt: #N DCS XTGETTCAP \"Request Terminfo String\" \"DCS + q Pt ST\" \"Request Terminfo String.\"\n */\n\n/**\n * DCS + p Pt ST (xterm)\n * Set Terminfo Data\n * not supported\n *\n * @vt: #N DCS XTSETTCAP \"Set Terminfo Data\" \"DCS + p Pt ST\" \"Set Terminfo Data.\"\n */\n\n\n\n/**\n * The terminal's standard implementation of IInputHandler, this handles all\n * input from the Parser.\n *\n * Refer to http://invisible-island.net/xterm/ctlseqs/ctlseqs.html to understand\n * each function's header comment.\n */\nexport class InputHandler extends Disposable implements IInputHandler {\n private _parseBuffer: Uint32Array = new Uint32Array(4096);\n private _stringDecoder: StringToUtf32 = new StringToUtf32();\n private _utf8Decoder: Utf8ToUtf32 = new Utf8ToUtf32();\n private _workCell: CellData = new CellData();\n private _windowTitle = '';\n private _iconName = '';\n protected _windowTitleStack: string[] = [];\n protected _iconNameStack: string[] = [];\n\n private _curAttrData: IAttributeData = DEFAULT_ATTR_DATA.clone();\n private _eraseAttrDataInternal: IAttributeData = DEFAULT_ATTR_DATA.clone();\n\n private _activeBuffer: IBuffer;\n\n private _onRequestBell = new EventEmitter<void>();\n public get onRequestBell(): IEvent<void> { return this._onRequestBell.event; }\n private _onRequestRefreshRows = new EventEmitter<number, number>();\n public get onRequestRefreshRows(): IEvent<number, number> { return this._onRequestRefreshRows.event; }\n private _onRequestReset = new EventEmitter<void>();\n public get onRequestReset(): IEvent<void> { return this._onRequestReset.event; }\n private _onRequestSendFocus = new EventEmitter<void>();\n public get onRequestSendFocus(): IEvent<void> { return this._onRequestSendFocus.event; }\n private _onRequestSyncScrollBar = new EventEmitter<void>();\n public get onRequestSyncScrollBar(): IEvent<void> { return this._onRequestSyncScrollBar.event; }\n private _onRequestWindowsOptionsReport = new EventEmitter<WindowsOptionsReportType>();\n public get onRequestWindowsOptionsReport(): IEvent<WindowsOptionsReportType> { return this._onRequestWindowsOptionsReport.event; }\n\n private _onA11yChar = new EventEmitter<string>();\n public get onA11yChar(): IEvent<string> { return this._onA11yChar.event; }\n private _onA11yTab = new EventEmitter<number>();\n public get onA11yTab(): IEvent<number> { return this._onA11yTab.event; }\n private _onCursorMove = new EventEmitter<void>();\n public get onCursorMove(): IEvent<void> { return this._onCursorMove.event; }\n private _onLineFeed = new EventEmitter<void>();\n public get onLineFeed(): IEvent<void> { return this._onLineFeed.event; }\n private _onScroll = new EventEmitter<number>();\n public get onScroll(): IEvent<number> { return this._onScroll.event; }\n private _onTitleChange = new EventEmitter<string>();\n public get onTitleChange(): IEvent<string> { return this._onTitleChange.event; }\n private _onColor = new EventEmitter<IColorEvent>();\n public get onColor(): IEvent<IColorEvent> { return this._onColor.event; }\n\n private _parseStack: IParseStack = {\n paused: false,\n cursorStartX: 0,\n cursorStartY: 0,\n decodedLength: 0,\n position: 0\n };\n\n constructor(\n private readonly _bufferService: IBufferService,\n private readonly _charsetService: ICharsetService,\n private readonly _coreService: ICoreService,\n private readonly _dirtyRowService: IDirtyRowService,\n private readonly _logService: ILogService,\n private readonly _optionsService: IOptionsService,\n private readonly _coreMouseService: ICoreMouseService,\n private readonly _unicodeService: IUnicodeService,\n private readonly _parser: IEscapeSequenceParser = new EscapeSequenceParser()\n ) {\n super();\n this.register(this._parser);\n\n // Track properties used in performance critical code manually to avoid using slow getters\n this._activeBuffer = this._bufferService.buffer;\n this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer));\n\n /**\n * custom fallback handlers\n */\n this._parser.setCsiHandlerFallback((ident, params) => {\n this._logService.debug('Unknown CSI code: ', { identifier: this._parser.identToString(ident), params: params.toArray() });\n });\n this._parser.setEscHandlerFallback(ident => {\n this._logService.debug('Unknown ESC code: ', { identifier: this._parser.identToString(ident) });\n });\n this._parser.setExecuteHandlerFallback(code => {\n this._logService.debug('Unknown EXECUTE code: ', { code });\n });\n this._parser.setOscHandlerFallback((identifier, action, data) => {\n this._logService.debug('Unknown OSC code: ', { identifier, action, data });\n });\n this._parser.setDcsHandlerFallback((ident, action, payload) => {\n if (action === 'HOOK') {\n payload = payload.toArray();\n }\n this._logService.debug('Unknown DCS code: ', { identifier: this._parser.identToString(ident), action, payload });\n });\n\n /**\n * print handler\n */\n this._parser.setPrintHandler((data, start, end) => this.print(data, start, end));\n\n /**\n * CSI handler\n */\n this._parser.registerCsiHandler({ final: '@' }, params => this.insertChars(params));\n this._parser.registerCsiHandler({ intermediates: ' ', final: '@' }, params => this.scrollLeft(params));\n this._parser.registerCsiHandler({ final: 'A' }, params => this.cursorUp(params));\n this._parser.registerCsiHandler({ intermediates: ' ', final: 'A' }, params => this.scrollRight(params));\n this._parser.registerCsiHandler({ final: 'B' }, params => this.cursorDown(params));\n this._parser.registerCsiHandler({ final: 'C' }, params => this.cursorForward(params));\n this._parser.registerCsiHandler({ final: 'D' }, params => this.cursorBackward(params));\n this._parser.registerCsiHandler({ final: 'E' }, params => this.cursorNextLine(params));\n this._parser.registerCsiHandler({ final: 'F' }, params => this.cursorPrecedingLine(params));\n this._parser.registerCsiHandler({ final: 'G' }, params => this.cursorCharAbsolute(params));\n this._parser.registerCsiHandler({ final: 'H' }, params => this.cursorPosition(params));\n this._parser.registerCsiHandler({ final: 'I' }, params => this.cursorForwardTab(params));\n this._parser.registerCsiHandler({ final: 'J' }, params => this.eraseInDisplay(params));\n this._parser.registerCsiHandler({ prefix: '?', final: 'J' }, params => this.eraseInDisplay(params));\n this._parser.registerCsiHandler({ final: 'K' }, params => this.eraseInLine(params));\n this._parser.registerCsiHandler({ prefix: '?', final: 'K' }, params => this.eraseInLine(params));\n this._parser.registerCsiHandler({ final: 'L' }, params => this.insertLines(params));\n this._parser.registerCsiHandler({ final: 'M' }, params => this.deleteLines(params));\n this._parser.registerCsiHandler({ final: 'P' }, params => this.deleteChars(params));\n this._parser.registerCsiHandler({ final: 'S' }, params => this.scrollUp(params));\n this._parser.registerCsiHandler({ final: 'T' }, params => this.scrollDown(params));\n this._parser.registerCsiHandler({ final: 'X' }, params => this.eraseChars(params));\n this._parser.registerCsiHandler({ final: 'Z' }, params => this.cursorBackwardTab(params));\n this._parser.registerCsiHandler({ final: '`' }, params => this.charPosAbsolute(params));\n this._parser.registerCsiHandler({ final: 'a' }, params => this.hPositionRelative(params));\n this._parser.registerCsiHandler({ final: 'b' }, params => this.repeatPrecedingCharacter(params));\n this._parser.registerCsiHandler({ final: 'c' }, params => this.sendDeviceAttributesPrimary(params));\n this._parser.registerCsiHandler({ prefix: '>', final: 'c' }, params => this.sendDeviceAttributesSecondary(params));\n this._parser.registerCsiHandler({ final: 'd' }, params => this.linePosAbsolute(params));\n this._parser.registerCsiHandler({ final: 'e' }, params => this.vPositionRelative(params));\n this._parser.registerCsiHandler({ final: 'f' }, params => this.hVPosition(params));\n this._parser.registerCsiHandler({ final: 'g' }, params => this.tabClear(params));\n this._parser.registerCsiHandler({ final: 'h' }, params => this.setMode(params));\n this._parser.registerCsiHandler({ prefix: '?', final: 'h' }, params => this.setModePrivate(params));\n this._parser.registerCsiHandler({ final: 'l' }, params => this.resetMode(params));\n this._parser.registerCsiHandler({ prefix: '?', final: 'l' }, params => this.resetModePrivate(params));\n this._parser.registerCsiHandler({ final: 'm' }, params => this.charAttributes(params));\n this._parser.registerCsiHandler({ final: 'n' }, params => this.deviceStatus(params));\n this._parser.registerCsiHandler({ prefix: '?', final: 'n' }, params => this.deviceStatusPrivate(params));\n this._parser.registerCsiHandler({ intermediates: '!', final: 'p' }, params => this.softReset(params));\n this._parser.registerCsiHandler({ intermediates: ' ', final: 'q' }, params => this.setCursorStyle(params));\n this._parser.registerCsiHandler({ final: 'r' }, params => this.setScrollRegion(params));\n this._parser.registerCsiHandler({ final: 's' }, params => this.saveCursor(params));\n this._parser.registerCsiHandler({ final: 't' }, params => this.windowOptions(params));\n this._parser.registerCsiHandler({ final: 'u' }, params => this.restoreCursor(params));\n this._parser.registerCsiHandler({ intermediates: '\\'', final: '}' }, params => this.insertColumns(params));\n this._parser.registerCsiHandler({ intermediates: '\\'', final: '~' }, params => this.deleteColumns(params));\n\n /**\n * execute handler\n */\n this._parser.setExecuteHandler(C0.BEL, () => this.bell());\n this._parser.setExecuteHandler(C0.LF, () => this.lineFeed());\n this._parser.setExecuteHandler(C0.VT, () => this.lineFeed());\n this._parser.setExecuteHandler(C0.FF, () => this.lineFeed());\n this._parser.setExecuteHandler(C0.CR, () => this.carriageReturn());\n this._parser.setExecuteHandler(C0.BS, () => this.backspace());\n this._parser.setExecuteHandler(C0.HT, () => this.tab());\n this._parser.setExecuteHandler(C0.SO, () => this.shiftOut());\n this._parser.setExecuteHandler(C0.SI, () => this.shiftIn());\n // FIXME: What do to with missing? Old code just added those to print.\n\n this._parser.setExecuteHandler(C1.IND, () => this.index());\n this._parser.setExecuteHandler(C1.NEL, () => this.nextLine());\n this._parser.setExecuteHandler(C1.HTS, () => this.tabSet());\n\n /**\n * OSC handler\n */\n // 0 - icon name + title\n this._parser.registerOscHandler(0, new OscHandler(data => { this.setTitle(data); this.setIconName(data); return true; }));\n // 1 - icon name\n this._parser.registerOscHandler(1, new OscHandler(data => this.setIconName(data)));\n // 2 - title\n this._parser.registerOscHandler(2, new OscHandler(data => this.setTitle(data)));\n // 3 - set property X in the form \"prop=value\"\n // 4 - Change Color Number\n this._parser.registerOscHandler(4, new OscHandler(data => this.setOrReportIndexedColor(data)));\n // 5 - Change Special Color Number\n // 6 - Enable/disable Special Color Number c\n // 7 - current directory? (not in xterm spec, see https://gitlab.com/gnachman/iterm2/issues/3939)\n // 10 - Change VT100 text foreground color to Pt.\n this._parser.registerOscHandler(10, new OscHandler(data => this.setOrReportFgColor(data)));\n // 11 - Change VT100 text background color to Pt.\n this._parser.registerOscHandler(11, new OscHandler(data => this.setOrReportBgColor(data)));\n // 12 - Change text cursor color to Pt.\n this._parser.registerOscHandler(12, new OscHandler(data => this.setOrReportCursorColor(data)));\n // 13 - Change mouse foreground color to Pt.\n // 14 - Change mouse background color to Pt.\n // 15 - Change Tektronix foreground color to Pt.\n // 16 - Change Tektronix background color to Pt.\n // 17 - Change highlight background color to Pt.\n // 18 - Change Tektronix cursor color to Pt.\n // 19 - Change highlight foreground color to Pt.\n // 46 - Change Log File to Pt.\n // 50 - Set Font to Pt.\n // 51 - reserved for Emacs shell.\n // 52 - Manipulate Selection Data.\n // 104 ; c - Reset Color Number c.\n this._parser.registerOscHandler(104, new OscHandler(data => this.restoreIndexedColor(data)));\n // 105 ; c - Reset Special Color Number c.\n // 106 ; c; f - Enable/disable Special Color Number c.\n // 110 - Reset VT100 text foreground color.\n this._parser.registerOscHandler(110, new OscHandler(data => this.restoreFgColor(data)));\n // 111 - Reset VT100 text background color.\n this._parser.registerOscHandler(111, new OscHandler(data => this.restoreBgColor(data)));\n // 112 - Reset text cursor color.\n this._parser.registerOscHandler(112, new OscHandler(data => this.restoreCursorColor(data)));\n // 113 - Reset mouse foreground color.\n // 114 - Reset mouse background color.\n // 115 - Reset Tektronix foreground color.\n // 116 - Reset Tektronix background color.\n // 117 - Reset highlight color.\n // 118 - Reset Tektronix cursor color.\n // 119 - Reset highlight foreground color.\n\n /**\n * ESC handlers\n */\n this._parser.registerEscHandler({ final: '7' }, () => this.saveCursor());\n this._parser.registerEscHandler({ final: '8' }, () => this.restoreCursor());\n this._parser.registerEscHandler({ final: 'D' }, () => this.index());\n this._parser.registerEscHandler({ final: 'E' }, () => this.nextLine());\n this._parser.registerEscHandler({ final: 'H' }, () => this.tabSet());\n this._parser.registerEscHandler({ final: 'M' }, () => this.reverseIndex());\n this._parser.registerEscHandler({ final: '=' }, () => this.keypadApplicationMode());\n this._parser.registerEscHandler({ final: '>' }, () => this.keypadNumericMode());\n this._parser.registerEscHandler({ final: 'c' }, () => this.fullReset());\n this._parser.registerEscHandler({ final: 'n' }, () => this.setgLevel(2));\n this._parser.registerEscHandler({ final: 'o' }, () => this.setgLevel(3));\n this._parser.registerEscHandler({ final: '|' }, () => this.setgLevel(3));\n this._parser.registerEscHandler({ final: '}' }, () => this.setgLevel(2));\n this._parser.registerEscHandler({ final: '~' }, () => this.setgLevel(1));\n this._parser.registerEscHandler({ intermediates: '%', final: '@' }, () => this.selectDefaultCharset());\n this._parser.registerEscHandler({ intermediates: '%', final: 'G' }, () => this.selectDefaultCharset());\n for (const flag in CHARSETS) {\n this._parser.registerEscHandler({ intermediates: '(', final: flag }, () => this.selectCharset('(' + flag));\n this._parser.registerEscHandler({ intermediates: ')', final: flag }, () => this.selectCharset(')' + flag));\n this._parser.registerEscHandler({ intermediates: '*', final: flag }, () => this.selectCharset('*' + flag));\n this._parser.registerEscHandler({ intermediates: '+', final: flag }, () => this.selectCharset('+' + flag));\n this._parser.registerEscHandler({ intermediates: '-', final: flag }, () => this.selectCharset('-' + flag));\n this._parser.registerEscHandler({ intermediates: '.', final: flag }, () => this.selectCharset('.' + flag));\n this._parser.registerEscHandler({ intermediates: '/', final: flag }, () => this.selectCharset('/' + flag)); // TODO: supported?\n }\n this._parser.registerEscHandler({ intermediates: '#', final: '8' }, () => this.screenAlignmentPattern());\n\n /**\n * error handler\n */\n this._parser.setErrorHandler((state: IParsingState) => {\n this._logService.error('Parsing error: ', state);\n return state;\n });\n\n /**\n * DCS handler\n */\n this._parser.registerDcsHandler({ intermediates: '$', final: 'q' }, new DECRQSS(this._bufferService, this._coreService, this._logService, this._optionsService));\n }\n\n public dispose(): void {\n super.dispose();\n }\n\n /**\n * Async parse support.\n */\n private _preserveStack(cursorStartX: number, cursorStartY: number, decodedLength: number, position: number): void {\n this._parseStack.paused = true;\n this._parseStack.cursorStartX = cursorStartX;\n this._parseStack.cursorStartY = cursorStartY;\n this._parseStack.decodedLength = decodedLength;\n this._parseStack.position = position;\n }\n\n private _logSlowResolvingAsync(p: Promise<boolean>): void {\n // log a limited warning about an async handler taking too long\n if (this._logService.logLevel <= LogLevelEnum.WARN) {\n Promise.race([p, new Promise((res, rej) => setTimeout(() => rej('#SLOW_TIMEOUT'), SLOW_ASYNC_LIMIT))])\n .catch(err => {\n if (err !== '#SLOW_TIMEOUT') {\n throw err;\n }\n console.warn(`async parser handler taking longer than ${SLOW_ASYNC_LIMIT} ms`);\n });\n }\n }\n\n /**\n * Parse call with async handler support.\n *\n * Whether the stack state got preserved for the next call, is indicated by the return value:\n * - undefined (void):\n * all handlers were sync, no stack save, continue normally with next chunk\n * - Promise\\<boolean\\>:\n * execution stopped at async handler, stack saved, continue with\n * same chunk and the promise resolve value as `promiseResult` until the method returns `undefined`\n *\n * Note: This method should only be called by `Terminal.write` to ensure correct execution order and\n * proper continuation of async parser handlers.\n */\n public parse(data: string | Uint8Array, promiseResult?: boolean): void | Promise<boolean> {\n let result: void | Promise<boolean>;\n let cursorStartX = this._activeBuffer.x;\n let cursorStartY = this._activeBuffer.y;\n let start = 0;\n const wasPaused = this._parseStack.paused;\n\n if (wasPaused) {\n // assumption: _parseBuffer never mutates between async calls\n if (result = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, promiseResult)) {\n this._logSlowResolvingAsync(result);\n return result;\n }\n cursorStartX = this._parseStack.cursorStartX;\n cursorStartY = this._parseStack.cursorStartY;\n this._parseStack.paused = false;\n if (data.length > MAX_PARSEBUFFER_LENGTH) {\n start = this._parseStack.position + MAX_PARSEBUFFER_LENGTH;\n }\n }\n\n // Log debug data, the log level gate is to prevent extra work in this hot path\n if (this._logService.logLevel <= LogLevelEnum.DEBUG) {\n this._logService.debug(`parsing data${typeof data === 'string' ? ` \"${data}\"` : ` \"${Array.prototype.map.call(data, e => String.fromCharCode(e)).join('')}\"`}`, typeof data === 'string'\n ? data.split('').map(e => e.charCodeAt(0))\n : data\n );\n }\n\n // resize input buffer if needed\n if (this._parseBuffer.length < data.length) {\n if (this._parseBuffer.length < MAX_PARSEBUFFER_LENGTH) {\n this._parseBuffer = new Uint32Array(Math.min(data.length, MAX_PARSEBUFFER_LENGTH));\n }\n }\n\n // Clear the dirty row service so we know which lines changed as a result of parsing\n // Important: do not clear between async calls, otherwise we lost pending update information.\n if (!wasPaused) {\n this._dirtyRowService.clearRange();\n }\n\n // process big data in smaller chunks\n if (data.length > MAX_PARSEBUFFER_LENGTH) {\n for (let i = start; i < data.length; i += MAX_PARSEBUFFER_LENGTH) {\n const end = i + MAX_PARSEBUFFER_LENGTH < data.length ? i + MAX_PARSEBUFFER_LENGTH : data.length;\n const len = (typeof data === 'string')\n ? this._stringDecoder.decode(data.substring(i, end), this._parseBuffer)\n : this._utf8Decoder.decode(data.subarray(i, end), this._parseBuffer);\n if (result = this._parser.parse(this._parseBuffer, len)) {\n this._preserveStack(cursorStartX, cursorStartY, len, i);\n this._logSlowResolvingAsync(result);\n return result;\n }\n }\n } else {\n if (!wasPaused) {\n const len = (typeof data === 'string')\n ? this._stringDecoder.decode(data, this._parseBuffer)\n : this._utf8Decoder.decode(data, this._parseBuffer);\n if (result = this._parser.parse(this._parseBuffer, len)) {\n this._preserveStack(cursorStartX, cursorStartY, len, 0);\n this._logSlowResolvingAsync(result);\n return result;\n }\n }\n }\n\n if (this._activeBuffer.x !== cursorStartX || this._activeBuffer.y !== cursorStartY) {\n this._onCursorMove.fire();\n }\n\n // Refresh any dirty rows accumulated as part of parsing\n this._onRequestRefreshRows.fire(this._dirtyRowService.start, this._dirtyRowService.end);\n }\n\n public print(data: Uint32Array, start: number, end: number): void {\n let code: number;\n let chWidth: number;\n const charset = this._charsetService.charset;\n const screenReaderMode = this._optionsService.rawOptions.screenReaderMode;\n const cols = this._bufferService.cols;\n const wraparoundMode = this._coreService.decPrivateModes.wraparound;\n const insertMode = this._coreService.modes.insertMode;\n const curAttr = this._curAttrData;\n let bufferRow = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!;\n\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n\n // handle wide chars: reset start_cell-1 if we would overwrite the second cell of a wide char\n if (this._activeBuffer.x && end - start > 0 && bufferRow.getWidth(this._activeBuffer.x - 1) === 2) {\n bufferRow.setCellFromCodePoint(this._activeBuffer.x - 1, 0, 1, curAttr.fg, curAttr.bg, curAttr.extended);\n }\n\n for (let pos = start; pos < end; ++pos) {\n code = data[pos];\n\n // calculate print space\n // expensive call, therefore we save width in line buffer\n chWidth = this._unicodeService.wcwidth(code);\n\n // get charset replacement character\n // charset is only defined for ASCII, therefore we only\n // search for an replacement char if code < 127\n if (code < 127 && charset) {\n const ch = charset[String.fromCharCode(code)];\n if (ch) {\n code = ch.charCodeAt(0);\n }\n }\n\n if (screenReaderMode) {\n this._onA11yChar.fire(stringFromCodePoint(code));\n }\n\n // insert combining char at last cursor position\n // this._activeBuffer.x should never be 0 for a combining char\n // since they always follow a cell consuming char\n // therefore we can test for this._activeBuffer.x to avoid overflow left\n if (!chWidth && this._activeBuffer.x) {\n if (!bufferRow.getWidth(this._activeBuffer.x - 1)) {\n // found empty cell after fullwidth, need to go 2 cells back\n // it is save to step 2 cells back here\n // since an empty cell is only set by fullwidth chars\n bufferRow.addCodepointToCell(this._activeBuffer.x - 2, code);\n } else {\n bufferRow.addCodepointToCell(this._activeBuffer.x - 1, code);\n }\n continue;\n }\n\n // goto next line if ch would overflow\n // NOTE: To avoid costly width checks here,\n // the terminal does not allow a cols < 2.\n if (this._activeBuffer.x + chWidth - 1 >= cols) {\n // autowrap - DECAWM\n // automatically wraps to the beginning of the next line\n if (wraparoundMode) {\n // clear left over cells to the right\n while (this._activeBuffer.x < cols) {\n bufferRow.setCellFromCodePoint(this._activeBuffer.x++, 0, 1, curAttr.fg, curAttr.bg, curAttr.extended);\n }\n this._activeBuffer.x = 0;\n this._activeBuffer.y++;\n if (this._activeBuffer.y === this._activeBuffer.scrollBottom + 1) {\n this._activeBuffer.y--;\n this._bufferService.scroll(this._eraseAttrData(), true);\n } else {\n if (this._activeBuffer.y >= this._bufferService.rows) {\n this._activeBuffer.y = this._bufferService.rows - 1;\n }\n // The line already exists (eg. the initial viewport), mark it as a\n // wrapped line\n this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!.isWrapped = true;\n }\n // row changed, get it again\n bufferRow = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!;\n } else {\n this._activeBuffer.x = cols - 1;\n if (chWidth === 2) {\n // FIXME: check for xterm behavior\n // What to do here? We got a wide char that does not fit into last cell\n continue;\n }\n }\n }\n\n // insert mode: move characters to right\n if (insertMode) {\n // right shift cells according to the width\n bufferRow.insertCells(this._activeBuffer.x, chWidth, this._activeBuffer.getNullCell(curAttr), curAttr);\n // test last cell - since the last cell has only room for\n // a halfwidth char any fullwidth shifted there is lost\n // and will be set to empty cell\n if (bufferRow.getWidth(cols - 1) === 2) {\n bufferRow.setCellFromCodePoint(cols - 1, NULL_CELL_CODE, NULL_CELL_WIDTH, curAttr.fg, curAttr.bg, curAttr.extended);\n }\n }\n\n // write current char to buffer and advance cursor\n bufferRow.setCellFromCodePoint(this._activeBuffer.x++, code, chWidth, curAttr.fg, curAttr.bg, curAttr.extended);\n\n // fullwidth char - also set next cell to placeholder stub and advance cursor\n // for graphemes bigger than fullwidth we can simply loop to zero\n // we already made sure above, that this._activeBuffer.x + chWidth will not overflow right\n if (chWidth > 0) {\n while (--chWidth) {\n // other than a regular empty cell a cell following a wide char has no width\n bufferRow.setCellFromCodePoint(this._activeBuffer.x++, 0, 0, curAttr.fg, curAttr.bg, curAttr.extended);\n }\n }\n }\n // store last char in Parser.precedingCodepoint for REP to work correctly\n // This needs to check whether:\n // - fullwidth + surrogates: reset\n // - combining: only base char gets carried on (bug in xterm?)\n if (end - start > 0) {\n bufferRow.loadCell(this._activeBuffer.x - 1, this._workCell);\n if (this._workCell.getWidth() === 2 || this._workCell.getCode() > 0xFFFF) {\n this._parser.precedingCodepoint = 0;\n } else if (this._workCell.isCombined()) {\n this._parser.precedingCodepoint = this._workCell.getChars().charCodeAt(0);\n } else {\n this._parser.precedingCodepoint = this._workCell.content;\n }\n }\n\n // handle wide chars: reset cell to the right if it is second cell of a wide char\n if (this._activeBuffer.x < cols && end - start > 0 && bufferRow.getWidth(this._activeBuffer.x) === 0 && !bufferRow.hasContent(this._activeBuffer.x)) {\n bufferRow.setCellFromCodePoint(this._activeBuffer.x, 0, 1, curAttr.fg, curAttr.bg, curAttr.extended);\n }\n\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n }\n\n /**\n * Forward registerCsiHandler from parser.\n */\n public registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable {\n if (id.final === 't' && !id.prefix && !id.intermediates) {\n // security: always check whether window option is allowed\n return this._parser.registerCsiHandler(id, params => {\n if (!paramToWindowOption(params.params[0], this._optionsService.rawOptions.windowOptions)) {\n return true;\n }\n return callback(params);\n });\n }\n return this._parser.registerCsiHandler(id, callback);\n }\n\n /**\n * Forward registerDcsHandler from parser.\n */\n public registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable {\n return this._parser.registerDcsHandler(id, new DcsHandler(callback));\n }\n\n /**\n * Forward registerEscHandler from parser.\n */\n public registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable {\n return this._parser.registerEscHandler(id, callback);\n }\n\n /**\n * Forward registerOscHandler from parser.\n */\n public registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable {\n return this._parser.registerOscHandler(ident, new OscHandler(callback));\n }\n\n /**\n * BEL\n * Bell (Ctrl-G).\n *\n * @vt: #Y C0 BEL \"Bell\" \"\\a, \\x07\" \"Ring the bell.\"\n * The behavior of the bell is further customizable with `ITerminalOptions.bellStyle`\n * and `ITerminalOptions.bellSound`.\n */\n public bell(): boolean {\n this._onRequestBell.fire();\n return true;\n }\n\n /**\n * LF\n * Line Feed or New Line (NL). (LF is Ctrl-J).\n *\n * @vt: #Y C0 LF \"Line Feed\" \"\\n, \\x0A\" \"Move the cursor one row down, scrolling if needed.\"\n * Scrolling is restricted to scroll margins and will only happen on the bottom line.\n *\n * @vt: #Y C0 VT \"Vertical Tabulation\" \"\\v, \\x0B\" \"Treated as LF.\"\n * @vt: #Y C0 FF \"Form Feed\" \"\\f, \\x0C\" \"Treated as LF.\"\n */\n public lineFeed(): boolean {\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n if (this._optionsService.rawOptions.convertEol) {\n this._activeBuffer.x = 0;\n }\n this._activeBuffer.y++;\n if (this._activeBuffer.y === this._activeBuffer.scrollBottom + 1) {\n this._activeBuffer.y--;\n this._bufferService.scroll(this._eraseAttrData());\n } else if (this._activeBuffer.y >= this._bufferService.rows) {\n this._activeBuffer.y = this._bufferService.rows - 1;\n }\n // If the end of the line is hit, prevent this action from wrapping around to the next line.\n if (this._activeBuffer.x >= this._bufferService.cols) {\n this._activeBuffer.x--;\n }\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n\n this._onLineFeed.fire();\n return true;\n }\n\n /**\n * CR\n * Carriage Return (Ctrl-M).\n *\n * @vt: #Y C0 CR \"Carriage Return\" \"\\r, \\x0D\" \"Move the cursor to the beginning of the row.\"\n */\n public carriageReturn(): boolean {\n this._activeBuffer.x = 0;\n return true;\n }\n\n /**\n * BS\n * Backspace (Ctrl-H).\n *\n * @vt: #Y C0 BS \"Backspace\" \"\\b, \\x08\" \"Move the cursor one position to the left.\"\n * By default it is not possible to move the cursor past the leftmost position.\n * If `reverse wrap-around` (`CSI ? 45 h`) is set, a previous soft line wrap (DECAWM)\n * can be undone with BS within the scroll margins. In that case the cursor will wrap back\n * to the end of the previous row. Note that it is not possible to peek back into the scrollbuffer\n * with the cursor, thus at the home position (top-leftmost cell) this has no effect.\n */\n public backspace(): boolean {\n // reverse wrap-around is disabled\n if (!this._coreService.decPrivateModes.reverseWraparound) {\n this._restrictCursor();\n if (this._activeBuffer.x > 0) {\n this._activeBuffer.x--;\n }\n return true;\n }\n\n // reverse wrap-around is enabled\n // other than for normal operation mode, reverse wrap-around allows the cursor\n // to be at x=cols to be able to address the last cell of a row by BS\n this._restrictCursor(this._bufferService.cols);\n\n if (this._activeBuffer.x > 0) {\n this._activeBuffer.x--;\n } else {\n /**\n * reverse wrap-around handling:\n * Our implementation deviates from xterm on purpose. Details:\n * - only previous soft NLs can be reversed (isWrapped=true)\n * - only works within scrollborders (top/bottom, left/right not yet supported)\n * - cannot peek into scrollbuffer\n * - any cursor movement sequence keeps working as expected\n */\n if (this._activeBuffer.x === 0\n && this._activeBuffer.y > this._activeBuffer.scrollTop\n && this._activeBuffer.y <= this._activeBuffer.scrollBottom\n && this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)?.isWrapped) {\n this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!.isWrapped = false;\n this._activeBuffer.y--;\n this._activeBuffer.x = this._bufferService.cols - 1;\n // find last taken cell - last cell can have 3 different states:\n // - hasContent(true) + hasWidth(1): narrow char - we are done\n // - hasWidth(0): second part of wide char - we are done\n // - hasContent(false) + hasWidth(1): empty cell due to early wrapping wide char, go one cell further back\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!;\n if (line.hasWidth(this._activeBuffer.x) && !line.hasContent(this._activeBuffer.x)) {\n this._activeBuffer.x--;\n // We do this only once, since width=1 + hasContent=false currently happens only once before\n // early wrapping of a wide char.\n // This needs to be fixed once we support graphemes taking more than 2 cells.\n }\n }\n }\n this._restrictCursor();\n return true;\n }\n\n /**\n * TAB\n * Horizontal Tab (HT) (Ctrl-I).\n *\n * @vt: #Y C0 HT \"Horizontal Tabulation\" \"\\t, \\x09\" \"Move the cursor to the next character tab stop.\"\n */\n public tab(): boolean {\n if (this._activeBuffer.x >= this._bufferService.cols) {\n return true;\n }\n const originalX = this._activeBuffer.x;\n this._activeBuffer.x = this._activeBuffer.nextStop();\n if (this._optionsService.rawOptions.screenReaderMode) {\n this._onA11yTab.fire(this._activeBuffer.x - originalX);\n }\n return true;\n }\n\n /**\n * SO\n * Shift Out (Ctrl-N) -> Switch to Alternate Character Set. This invokes the\n * G1 character set.\n *\n * @vt: #P[Only limited ISO-2022 charset support.] C0 SO \"Shift Out\" \"\\x0E\" \"Switch to an alternative character set.\"\n */\n public shiftOut(): boolean {\n this._charsetService.setgLevel(1);\n return true;\n }\n\n /**\n * SI\n * Shift In (Ctrl-O) -> Switch to Standard Character Set. This invokes the G0\n * character set (the default).\n *\n * @vt: #Y C0 SI \"Shift In\" \"\\x0F\" \"Return to regular character set after Shift Out.\"\n */\n public shiftIn(): boolean {\n this._charsetService.setgLevel(0);\n return true;\n }\n\n /**\n * Restrict cursor to viewport size / scroll margin (origin mode).\n */\n private _restrictCursor(maxCol: number = this._bufferService.cols - 1): void {\n this._activeBuffer.x = Math.min(maxCol, Math.max(0, this._activeBuffer.x));\n this._activeBuffer.y = this._coreService.decPrivateModes.origin\n ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y))\n : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y));\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n }\n\n /**\n * Set absolute cursor position.\n */\n private _setCursor(x: number, y: number): void {\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n if (this._coreService.decPrivateModes.origin) {\n this._activeBuffer.x = x;\n this._activeBuffer.y = this._activeBuffer.scrollTop + y;\n } else {\n this._activeBuffer.x = x;\n this._activeBuffer.y = y;\n }\n this._restrictCursor();\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n }\n\n /**\n * Set relative cursor position.\n */\n private _moveCursor(x: number, y: number): void {\n // for relative changes we have to make sure we are within 0 .. cols/rows - 1\n // before calculating the new position\n this._restrictCursor();\n this._setCursor(this._activeBuffer.x + x, this._activeBuffer.y + y);\n }\n\n /**\n * CSI Ps A\n * Cursor Up Ps Times (default = 1) (CUU).\n *\n * @vt: #Y CSI CUU \"Cursor Up\" \"CSI Ps A\" \"Move cursor `Ps` times up (default=1).\"\n * If the cursor would pass the top scroll margin, it will stop there.\n */\n public cursorUp(params: IParams): boolean {\n // stop at scrollTop\n const diffToTop = this._activeBuffer.y - this._activeBuffer.scrollTop;\n if (diffToTop >= 0) {\n this._moveCursor(0, -Math.min(diffToTop, params.params[0] || 1));\n } else {\n this._moveCursor(0, -(params.params[0] || 1));\n }\n return true;\n }\n\n /**\n * CSI Ps B\n * Cursor Down Ps Times (default = 1) (CUD).\n *\n * @vt: #Y CSI CUD \"Cursor Down\" \"CSI Ps B\" \"Move cursor `Ps` times down (default=1).\"\n * If the cursor would pass the bottom scroll margin, it will stop there.\n */\n public cursorDown(params: IParams): boolean {\n // stop at scrollBottom\n const diffToBottom = this._activeBuffer.scrollBottom - this._activeBuffer.y;\n if (diffToBottom >= 0) {\n this._moveCursor(0, Math.min(diffToBottom, params.params[0] || 1));\n } else {\n this._moveCursor(0, params.params[0] || 1);\n }\n return true;\n }\n\n /**\n * CSI Ps C\n * Cursor Forward Ps Times (default = 1) (CUF).\n *\n * @vt: #Y CSI CUF \"Cursor Forward\" \"CSI Ps C\" \"Move cursor `Ps` times forward (default=1).\"\n */\n public cursorForward(params: IParams): boolean {\n this._moveCursor(params.params[0] || 1, 0);\n return true;\n }\n\n /**\n * CSI Ps D\n * Cursor Backward Ps Times (default = 1) (CUB).\n *\n * @vt: #Y CSI CUB \"Cursor Backward\" \"CSI Ps D\" \"Move cursor `Ps` times backward (default=1).\"\n */\n public cursorBackward(params: IParams): boolean {\n this._moveCursor(-(params.params[0] || 1), 0);\n return true;\n }\n\n /**\n * CSI Ps E\n * Cursor Next Line Ps Times (default = 1) (CNL).\n * Other than cursorDown (CUD) also set the cursor to first column.\n *\n * @vt: #Y CSI CNL \"Cursor Next Line\" \"CSI Ps E\" \"Move cursor `Ps` times down (default=1) and to the first column.\"\n * Same as CUD, additionally places the cursor at the first column.\n */\n public cursorNextLine(params: IParams): boolean {\n this.cursorDown(params);\n this._activeBuffer.x = 0;\n return true;\n }\n\n /**\n * CSI Ps F\n * Cursor Previous Line Ps Times (default = 1) (CPL).\n * Other than cursorUp (CUU) also set the cursor to first column.\n *\n * @vt: #Y CSI CPL \"Cursor Backward\" \"CSI Ps F\" \"Move cursor `Ps` times up (default=1) and to the first column.\"\n * Same as CUU, additionally places the cursor at the first column.\n */\n public cursorPrecedingLine(params: IParams): boolean {\n this.cursorUp(params);\n this._activeBuffer.x = 0;\n return true;\n }\n\n /**\n * CSI Ps G\n * Cursor Character Absolute [column] (default = [row,1]) (CHA).\n *\n * @vt: #Y CSI CHA \"Cursor Horizontal Absolute\" \"CSI Ps G\" \"Move cursor to `Ps`-th column of the active row (default=1).\"\n */\n public cursorCharAbsolute(params: IParams): boolean {\n this._setCursor((params.params[0] || 1) - 1, this._activeBuffer.y);\n return true;\n }\n\n /**\n * CSI Ps ; Ps H\n * Cursor Position [row;column] (default = [1,1]) (CUP).\n *\n * @vt: #Y CSI CUP \"Cursor Position\" \"CSI Ps ; Ps H\" \"Set cursor to position [`Ps`, `Ps`] (default = [1, 1]).\"\n * If ORIGIN mode is set, places the cursor to the absolute position within the scroll margins.\n * If ORIGIN mode is not set, places the cursor to the absolute position within the viewport.\n * Note that the coordinates are 1-based, thus the top left position starts at `1 ; 1`.\n */\n public cursorPosition(params: IParams): boolean {\n this._setCursor(\n // col\n (params.length >= 2) ? (params.params[1] || 1) - 1 : 0,\n // row\n (params.params[0] || 1) - 1\n );\n return true;\n }\n\n /**\n * CSI Pm ` Character Position Absolute\n * [column] (default = [row,1]) (HPA).\n * Currently same functionality as CHA.\n *\n * @vt: #Y CSI HPA \"Horizontal Position Absolute\" \"CSI Ps ` \" \"Same as CHA.\"\n */\n public charPosAbsolute(params: IParams): boolean {\n this._setCursor((params.params[0] || 1) - 1, this._activeBuffer.y);\n return true;\n }\n\n /**\n * CSI Pm a Character Position Relative\n * [columns] (default = [row,col+1]) (HPR)\n *\n * @vt: #Y CSI HPR \"Horizontal Position Relative\" \"CSI Ps a\" \"Same as CUF.\"\n */\n public hPositionRelative(params: IParams): boolean {\n this._moveCursor(params.params[0] || 1, 0);\n return true;\n }\n\n /**\n * CSI Pm d Vertical Position Absolute (VPA)\n * [row] (default = [1,column])\n *\n * @vt: #Y CSI VPA \"Vertical Position Absolute\" \"CSI Ps d\" \"Move cursor to `Ps`-th row (default=1).\"\n */\n public linePosAbsolute(params: IParams): boolean {\n this._setCursor(this._activeBuffer.x, (params.params[0] || 1) - 1);\n return true;\n }\n\n /**\n * CSI Pm e Vertical Position Relative (VPR)\n * [rows] (default = [row+1,column])\n * reuse CSI Ps B ?\n *\n * @vt: #Y CSI VPR \"Vertical Position Relative\" \"CSI Ps e\" \"Move cursor `Ps` times down (default=1).\"\n */\n public vPositionRelative(params: IParams): boolean {\n this._moveCursor(0, params.params[0] || 1);\n return true;\n }\n\n /**\n * CSI Ps ; Ps f\n * Horizontal and Vertical Position [row;column] (default =\n * [1,1]) (HVP).\n * Same as CUP.\n *\n * @vt: #Y CSI HVP \"Horizontal and Vertical Position\" \"CSI Ps ; Ps f\" \"Same as CUP.\"\n */\n public hVPosition(params: IParams): boolean {\n this.cursorPosition(params);\n return true;\n }\n\n /**\n * CSI Ps g Tab Clear (TBC).\n * Ps = 0 -> Clear Current Column (default).\n * Ps = 3 -> Clear All.\n * Potentially:\n * Ps = 2 -> Clear Stops on Line.\n * http://vt100.net/annarbor/aaa-ug/section6.html\n *\n * @vt: #Y CSI TBC \"Tab Clear\" \"CSI Ps g\" \"Clear tab stops at current position (0) or all (3) (default=0).\"\n * Clearing tabstops off the active row (Ps = 2, VT100) is currently not supported.\n */\n public tabClear(params: IParams): boolean {\n const param = params.params[0];\n if (param === 0) {\n delete this._activeBuffer.tabs[this._activeBuffer.x];\n } else if (param === 3) {\n this._activeBuffer.tabs = {};\n }\n return true;\n }\n\n /**\n * CSI Ps I\n * Cursor Forward Tabulation Ps tab stops (default = 1) (CHT).\n *\n * @vt: #Y CSI CHT \"Cursor Horizontal Tabulation\" \"CSI Ps I\" \"Move cursor `Ps` times tabs forward (default=1).\"\n */\n public cursorForwardTab(params: IParams): boolean {\n if (this._activeBuffer.x >= this._bufferService.cols) {\n return true;\n }\n let param = params.params[0] || 1;\n while (param--) {\n this._activeBuffer.x = this._activeBuffer.nextStop();\n }\n return true;\n }\n\n /**\n * CSI Ps Z Cursor Backward Tabulation Ps tab stops (default = 1) (CBT).\n *\n * @vt: #Y CSI CBT \"Cursor Backward Tabulation\" \"CSI Ps Z\" \"Move cursor `Ps` tabs backward (default=1).\"\n */\n public cursorBackwardTab(params: IParams): boolean {\n if (this._activeBuffer.x >= this._bufferService.cols) {\n return true;\n }\n let param = params.params[0] || 1;\n\n while (param--) {\n this._activeBuffer.x = this._activeBuffer.prevStop();\n }\n return true;\n }\n\n\n /**\n * Helper method to erase cells in a terminal row.\n * The cell gets replaced with the eraseChar of the terminal.\n * @param y row index\n * @param start first cell index to be erased\n * @param end end - 1 is last erased cell\n * @param cleanWrap clear the isWrapped flag\n */\n private _eraseInBufferLine(y: number, start: number, end: number, clearWrap: boolean = false): void {\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;\n line.replaceCells(\n start,\n end,\n this._activeBuffer.getNullCell(this._eraseAttrData()),\n this._eraseAttrData()\n );\n if (clearWrap) {\n line.isWrapped = false;\n }\n }\n\n /**\n * Helper method to reset cells in a terminal row.\n * The cell gets replaced with the eraseChar of the terminal and the isWrapped property is set to false.\n * @param y row index\n */\n private _resetBufferLine(y: number): void {\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;\n line.fill(this._activeBuffer.getNullCell(this._eraseAttrData()));\n this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + y);\n line.isWrapped = false;\n }\n\n /**\n * CSI Ps J Erase in Display (ED).\n * Ps = 0 -> Erase Below (default).\n * Ps = 1 -> Erase Above.\n * Ps = 2 -> Erase All.\n * Ps = 3 -> Erase Saved Lines (xterm).\n * CSI ? Ps J\n * Erase in Display (DECSED).\n * Ps = 0 -> Selective Erase Below (default).\n * Ps = 1 -> Selective Erase Above.\n * Ps = 2 -> Selective Erase All.\n *\n * @vt: #Y CSI ED \"Erase In Display\" \"CSI Ps J\" \"Erase various parts of the viewport.\"\n * Supported param values:\n *\n * | Ps | Effect |\n * | -- | ------------------------------------------------------------ |\n * | 0 | Erase from the cursor through the end of the viewport. |\n * | 1 | Erase from the beginning of the viewport through the cursor. |\n * | 2 | Erase complete viewport. |\n * | 3 | Erase scrollback. |\n *\n * @vt: #P[Protection attributes are not supported.] CSI DECSED \"Selective Erase In Display\" \"CSI ? Ps J\" \"Currently the same as ED.\"\n */\n public eraseInDisplay(params: IParams): boolean {\n this._restrictCursor(this._bufferService.cols);\n let j;\n switch (params.params[0]) {\n case 0:\n j = this._activeBuffer.y;\n this._dirtyRowService.markDirty(j);\n this._eraseInBufferLine(j++, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0);\n for (; j < this._bufferService.rows; j++) {\n this._resetBufferLine(j);\n }\n this._dirtyRowService.markDirty(j);\n break;\n case 1:\n j = this._activeBuffer.y;\n this._dirtyRowService.markDirty(j);\n // Deleted front part of line and everything before. This line will no longer be wrapped.\n this._eraseInBufferLine(j, 0, this._activeBuffer.x + 1, true);\n if (this._activeBuffer.x + 1 >= this._bufferService.cols) {\n // Deleted entire previous line. This next line can no longer be wrapped.\n this._activeBuffer.lines.get(j + 1)!.isWrapped = false;\n }\n while (j--) {\n this._resetBufferLine(j);\n }\n this._dirtyRowService.markDirty(0);\n break;\n case 2:\n j = this._bufferService.rows;\n this._dirtyRowService.markDirty(j - 1);\n while (j--) {\n this._resetBufferLine(j);\n }\n this._dirtyRowService.markDirty(0);\n break;\n case 3:\n // Clear scrollback (everything not in viewport)\n const scrollBackSize = this._activeBuffer.lines.length - this._bufferService.rows;\n if (scrollBackSize > 0) {\n this._activeBuffer.lines.trimStart(scrollBackSize);\n this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - scrollBackSize, 0);\n this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - scrollBackSize, 0);\n // Force a scroll event to refresh viewport\n this._onScroll.fire(0);\n }\n break;\n }\n return true;\n }\n\n /**\n * CSI Ps K Erase in Line (EL).\n * Ps = 0 -> Erase to Right (default).\n * Ps = 1 -> Erase to Left.\n * Ps = 2 -> Erase All.\n * CSI ? Ps K\n * Erase in Line (DECSEL).\n * Ps = 0 -> Selective Erase to Right (default).\n * Ps = 1 -> Selective Erase to Left.\n * Ps = 2 -> Selective Erase All.\n *\n * @vt: #Y CSI EL \"Erase In Line\" \"CSI Ps K\" \"Erase various parts of the active row.\"\n * Supported param values:\n *\n * | Ps | Effect |\n * | -- | -------------------------------------------------------- |\n * | 0 | Erase from the cursor through the end of the row. |\n * | 1 | Erase from the beginning of the line through the cursor. |\n * | 2 | Erase complete line. |\n *\n * @vt: #P[Protection attributes are not supported.] CSI DECSEL \"Selective Erase In Line\" \"CSI ? Ps K\" \"Currently the same as EL.\"\n */\n public eraseInLine(params: IParams): boolean {\n this._restrictCursor(this._bufferService.cols);\n switch (params.params[0]) {\n case 0:\n this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0);\n break;\n case 1:\n this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, false);\n break;\n case 2:\n this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, true);\n break;\n }\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n return true;\n }\n\n /**\n * CSI Ps L\n * Insert Ps Line(s) (default = 1) (IL).\n *\n * @vt: #Y CSI IL \"Insert Line\" \"CSI Ps L\" \"Insert `Ps` blank lines at active row (default=1).\"\n * For every inserted line at the scroll top one line at the scroll bottom gets removed.\n * The cursor is set to the first column.\n * IL has no effect if the cursor is outside the scroll margins.\n */\n public insertLines(params: IParams): boolean {\n this._restrictCursor();\n let param = params.params[0] || 1;\n\n if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {\n return true;\n }\n\n const row: number = this._activeBuffer.ybase + this._activeBuffer.y;\n\n const scrollBottomRowsOffset = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom;\n const scrollBottomAbsolute = this._bufferService.rows - 1 + this._activeBuffer.ybase - scrollBottomRowsOffset + 1;\n while (param--) {\n // test: echo -e '\\e[44m\\e[1L\\e[0m'\n // blankLine(true) - xterm/linux behavior\n this._activeBuffer.lines.splice(scrollBottomAbsolute - 1, 1);\n this._activeBuffer.lines.splice(row, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));\n }\n\n this._dirtyRowService.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom);\n this._activeBuffer.x = 0; // see https://vt100.net/docs/vt220-rm/chapter4.html - vt220 only?\n return true;\n }\n\n /**\n * CSI Ps M\n * Delete Ps Line(s) (default = 1) (DL).\n *\n * @vt: #Y CSI DL \"Delete Line\" \"CSI Ps M\" \"Delete `Ps` lines at active row (default=1).\"\n * For every deleted line at the scroll top one blank line at the scroll bottom gets appended.\n * The cursor is set to the first column.\n * DL has no effect if the cursor is outside the scroll margins.\n */\n public deleteLines(params: IParams): boolean {\n this._restrictCursor();\n let param = params.params[0] || 1;\n\n if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {\n return true;\n }\n\n const row: number = this._activeBuffer.ybase + this._activeBuffer.y;\n\n let j: number;\n j = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom;\n j = this._bufferService.rows - 1 + this._activeBuffer.ybase - j;\n while (param--) {\n // test: echo -e '\\e[44m\\e[1M\\e[0m'\n // blankLine(true) - xterm/linux behavior\n this._activeBuffer.lines.splice(row, 1);\n this._activeBuffer.lines.splice(j, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));\n }\n\n this._dirtyRowService.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom);\n this._activeBuffer.x = 0; // see https://vt100.net/docs/vt220-rm/chapter4.html - vt220 only?\n return true;\n }\n\n /**\n * CSI Ps @\n * Insert Ps (Blank) Character(s) (default = 1) (ICH).\n *\n * @vt: #Y CSI ICH \"Insert Characters\" \"CSI Ps @\" \"Insert `Ps` (blank) characters (default = 1).\"\n * The ICH sequence inserts `Ps` blank characters. The cursor remains at the beginning of the blank characters.\n * Text between the cursor and right margin moves to the right. Characters moved past the right margin are lost.\n *\n *\n * FIXME: check against xterm - should not work outside of scroll margins (see VT520 manual)\n */\n public insertChars(params: IParams): boolean {\n this._restrictCursor();\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);\n if (line) {\n line.insertCells(\n this._activeBuffer.x,\n params.params[0] || 1,\n this._activeBuffer.getNullCell(this._eraseAttrData()),\n this._eraseAttrData()\n );\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n }\n return true;\n }\n\n /**\n * CSI Ps P\n * Delete Ps Character(s) (default = 1) (DCH).\n *\n * @vt: #Y CSI DCH \"Delete Character\" \"CSI Ps P\" \"Delete `Ps` characters (default=1).\"\n * As characters are deleted, the remaining characters between the cursor and right margin move to the left.\n * Character attributes move with the characters. The terminal adds blank characters at the right margin.\n *\n *\n * FIXME: check against xterm - should not work outside of scroll margins (see VT520 manual)\n */\n public deleteChars(params: IParams): boolean {\n this._restrictCursor();\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);\n if (line) {\n line.deleteCells(\n this._activeBuffer.x,\n params.params[0] || 1,\n this._activeBuffer.getNullCell(this._eraseAttrData()),\n this._eraseAttrData()\n );\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n }\n return true;\n }\n\n /**\n * CSI Ps S Scroll up Ps lines (default = 1) (SU).\n *\n * @vt: #Y CSI SU \"Scroll Up\" \"CSI Ps S\" \"Scroll `Ps` lines up (default=1).\"\n *\n *\n * FIXME: scrolled out lines at top = 1 should add to scrollback (xterm)\n */\n public scrollUp(params: IParams): boolean {\n let param = params.params[0] || 1;\n\n while (param--) {\n this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 1);\n this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));\n }\n this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);\n return true;\n }\n\n /**\n * CSI Ps T Scroll down Ps lines (default = 1) (SD).\n *\n * @vt: #Y CSI SD \"Scroll Down\" \"CSI Ps T\" \"Scroll `Ps` lines down (default=1).\"\n */\n public scrollDown(params: IParams): boolean {\n let param = params.params[0] || 1;\n\n while (param--) {\n this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 1);\n this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 0, this._activeBuffer.getBlankLine(DEFAULT_ATTR_DATA));\n }\n this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);\n return true;\n }\n\n /**\n * CSI Ps SP @ Scroll left Ps columns (default = 1) (SL) ECMA-48\n *\n * Notation: (Pn)\n * Representation: CSI Pn 02/00 04/00\n * Parameter default value: Pn = 1\n * SL causes the data in the presentation component to be moved by n character positions\n * if the line orientation is horizontal, or by n line positions if the line orientation\n * is vertical, such that the data appear to move to the left; where n equals the value of Pn.\n * The active presentation position is not affected by this control function.\n *\n * Supported:\n * - always left shift (no line orientation setting respected)\n *\n * @vt: #Y CSI SL \"Scroll Left\" \"CSI Ps SP @\" \"Scroll viewport `Ps` times to the left.\"\n * SL moves the content of all lines within the scroll margins `Ps` times to the left.\n * SL has no effect outside of the scroll margins.\n */\n public scrollLeft(params: IParams): boolean {\n if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {\n return true;\n }\n const param = params.params[0] || 1;\n for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;\n line.deleteCells(0, param, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData());\n line.isWrapped = false;\n }\n this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);\n return true;\n }\n\n /**\n * CSI Ps SP A Scroll right Ps columns (default = 1) (SR) ECMA-48\n *\n * Notation: (Pn)\n * Representation: CSI Pn 02/00 04/01\n * Parameter default value: Pn = 1\n * SR causes the data in the presentation component to be moved by n character positions\n * if the line orientation is horizontal, or by n line positions if the line orientation\n * is vertical, such that the data appear to move to the right; where n equals the value of Pn.\n * The active presentation position is not affected by this control function.\n *\n * Supported:\n * - always right shift (no line orientation setting respected)\n *\n * @vt: #Y CSI SR \"Scroll Right\" \"CSI Ps SP A\" \"Scroll viewport `Ps` times to the right.\"\n * SL moves the content of all lines within the scroll margins `Ps` times to the right.\n * Content at the right margin is lost.\n * SL has no effect outside of the scroll margins.\n */\n public scrollRight(params: IParams): boolean {\n if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {\n return true;\n }\n const param = params.params[0] || 1;\n for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;\n line.insertCells(0, param, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData());\n line.isWrapped = false;\n }\n this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);\n return true;\n }\n\n /**\n * CSI Pm ' }\n * Insert Ps Column(s) (default = 1) (DECIC), VT420 and up.\n *\n * @vt: #Y CSI DECIC \"Insert Columns\" \"CSI Ps ' }\" \"Insert `Ps` columns at cursor position.\"\n * DECIC inserts `Ps` times blank columns at the cursor position for all lines with the scroll margins,\n * moving content to the right. Content at the right margin is lost.\n * DECIC has no effect outside the scrolling margins.\n */\n public insertColumns(params: IParams): boolean {\n if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {\n return true;\n }\n const param = params.params[0] || 1;\n for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;\n line.insertCells(this._activeBuffer.x, param, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData());\n line.isWrapped = false;\n }\n this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);\n return true;\n }\n\n /**\n * CSI Pm ' ~\n * Delete Ps Column(s) (default = 1) (DECDC), VT420 and up.\n *\n * @vt: #Y CSI DECDC \"Delete Columns\" \"CSI Ps ' ~\" \"Delete `Ps` columns at cursor position.\"\n * DECDC deletes `Ps` times columns at the cursor position for all lines with the scroll margins,\n * moving content to the left. Blank columns are added at the right margin.\n * DECDC has no effect outside the scrolling margins.\n */\n public deleteColumns(params: IParams): boolean {\n if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {\n return true;\n }\n const param = params.params[0] || 1;\n for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;\n line.deleteCells(this._activeBuffer.x, param, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData());\n line.isWrapped = false;\n }\n this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);\n return true;\n }\n\n /**\n * CSI Ps X\n * Erase Ps Character(s) (default = 1) (ECH).\n *\n * @vt: #Y CSI ECH \"Erase Character\" \"CSI Ps X\" \"Erase `Ps` characters from current cursor position to the right (default=1).\"\n * ED erases `Ps` characters from current cursor position to the right.\n * ED works inside or outside the scrolling margins.\n */\n public eraseChars(params: IParams): boolean {\n this._restrictCursor();\n const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);\n if (line) {\n line.replaceCells(\n this._activeBuffer.x,\n this._activeBuffer.x + (params.params[0] || 1),\n this._activeBuffer.getNullCell(this._eraseAttrData()),\n this._eraseAttrData()\n );\n this._dirtyRowService.markDirty(this._activeBuffer.y);\n }\n return true;\n }\n\n /**\n * CSI Ps b Repeat the preceding graphic character Ps times (REP).\n * From ECMA 48 (@see http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf)\n * Notation: (Pn)\n * Representation: CSI Pn 06/02\n * Parameter default value: Pn = 1\n * REP is used to indicate that the preceding character in the data stream,\n * if it is a graphic character (represented by one or more bit combinations) including SPACE,\n * is to be repeated n times, where n equals the value of Pn.\n * If the character preceding REP is a control function or part of a control function,\n * the effect of REP is not defined by this Standard.\n *\n * Since we propagate the terminal as xterm-256color we have to follow xterm's behavior:\n * - fullwidth + surrogate chars are ignored\n * - for combining chars only the base char gets repeated\n * - text attrs are applied normally\n * - wrap around is respected\n * - any valid sequence resets the carried forward char\n *\n * Note: To get reset on a valid sequence working correctly without much runtime penalty,\n * the preceding codepoint is stored on the parser in `this.print` and reset during `parser.parse`.\n *\n * @vt: #Y CSI REP \"Repeat Preceding Character\" \"CSI Ps b\" \"Repeat preceding character `Ps` times (default=1).\"\n * REP repeats the previous character `Ps` times advancing the cursor, also wrapping if DECAWM is set.\n * REP has no effect if the sequence does not follow a printable ASCII character\n * (NOOP for any other sequence in between or NON ASCII characters).\n */\n public repeatPrecedingCharacter(params: IParams): boolean {\n if (!this._parser.precedingCodepoint) {\n return true;\n }\n // call print to insert the chars and handle correct wrapping\n const length = params.params[0] || 1;\n const data = new Uint32Array(length);\n for (let i = 0; i < length; ++i) {\n data[i] = this._parser.precedingCodepoint;\n }\n this.print(data, 0, data.length);\n return true;\n }\n\n /**\n * CSI Ps c Send Device Attributes (Primary DA).\n * Ps = 0 or omitted -> request attributes from terminal. The\n * response depends on the decTerminalID resource setting.\n * -> CSI ? 1 ; 2 c (``VT100 with Advanced Video Option'')\n * -> CSI ? 1 ; 0 c (``VT101 with No Options'')\n * -> CSI ? 6 c (``VT102'')\n * -> CSI ? 6 0 ; 1 ; 2 ; 6 ; 8 ; 9 ; 1 5 ; c (``VT220'')\n * The VT100-style response parameters do not mean anything by\n * themselves. VT220 parameters do, telling the host what fea-\n * tures the terminal supports:\n * Ps = 1 -> 132-columns.\n * Ps = 2 -> Printer.\n * Ps = 6 -> Selective erase.\n * Ps = 8 -> User-defined keys.\n * Ps = 9 -> National replacement character sets.\n * Ps = 1 5 -> Technical characters.\n * Ps = 2 2 -> ANSI color, e.g., VT525.\n * Ps = 2 9 -> ANSI text locator (i.e., DEC Locator mode).\n *\n * @vt: #Y CSI DA1 \"Primary Device Attributes\" \"CSI c\" \"Send primary device attributes.\"\n *\n *\n * TODO: fix and cleanup response\n */\n public sendDeviceAttributesPrimary(params: IParams): boolean {\n if (params.params[0] > 0) {\n return true;\n }\n if (this._is('xterm') || this._is('rxvt-unicode') || this._is('screen')) {\n this._coreService.triggerDataEvent(C0.ESC + '[?1;2c');\n } else if (this._is('linux')) {\n this._coreService.triggerDataEvent(C0.ESC + '[?6c');\n }\n return true;\n }\n\n /**\n * CSI > Ps c\n * Send Device Attributes (Secondary DA).\n * Ps = 0 or omitted -> request the terminal's identification\n * code. The response depends on the decTerminalID resource set-\n * ting. It should apply only to VT220 and up, but xterm extends\n * this to VT100.\n * -> CSI > Pp ; Pv ; Pc c\n * where Pp denotes the terminal type\n * Pp = 0 -> ``VT100''.\n * Pp = 1 -> ``VT220''.\n * and Pv is the firmware version (for xterm, this was originally\n * the XFree86 patch number, starting with 95). In a DEC termi-\n * nal, Pc indicates the ROM cartridge registration number and is\n * always zero.\n * More information:\n * xterm/charproc.c - line 2012, for more information.\n * vim responds with ^[[?0c or ^[[?1c after the terminal's response (?)\n *\n * @vt: #Y CSI DA2 \"Secondary Device Attributes\" \"CSI > c\" \"Send primary device attributes.\"\n *\n *\n * TODO: fix and cleanup response\n */\n public sendDeviceAttributesSecondary(params: IParams): boolean {\n if (params.params[0] > 0) {\n return true;\n }\n // xterm and urxvt\n // seem to spit this\n // out around ~370 times (?).\n if (this._is('xterm')) {\n this._coreService.triggerDataEvent(C0.ESC + '[>0;276;0c');\n } else if (this._is('rxvt-unicode')) {\n this._coreService.triggerDataEvent(C0.ESC + '[>85;95;0c');\n } else if (this._is('linux')) {\n // not supported by linux console.\n // linux console echoes parameters.\n this._coreService.triggerDataEvent(params.params[0] + 'c');\n } else if (this._is('screen')) {\n this._coreService.triggerDataEvent(C0.ESC + '[>83;40003;0c');\n }\n return true;\n }\n\n /**\n * Evaluate if the current terminal is the given argument.\n * @param term The terminal name to evaluate\n */\n private _is(term: string): boolean {\n return (this._optionsService.rawOptions.termName + '').indexOf(term) === 0;\n }\n\n /**\n * CSI Pm h Set Mode (SM).\n * Ps = 2 -> Keyboard Action Mode (AM).\n * Ps = 4 -> Insert Mode (IRM).\n * Ps = 1 2 -> Send/receive (SRM).\n * Ps = 2 0 -> Automatic Newline (LNM).\n *\n * @vt: #P[Only IRM is supported.] CSI SM \"Set Mode\" \"CSI Pm h\" \"Set various terminal modes.\"\n * Supported param values by SM:\n *\n * | Param | Action | Support |\n * | ----- | -------------------------------------- | ------- |\n * | 2 | Keyboard Action Mode (KAM). Always on. | #N |\n * | 4 | Insert Mode (IRM). | #Y |\n * | 12 | Send/receive (SRM). Always off. | #N |\n * | 20 | Automatic Newline (LNM). Always off. | #N |\n */\n public setMode(params: IParams): boolean {\n for (let i = 0; i < params.length; i++) {\n switch (params.params[i]) {\n case 4:\n this._coreService.modes.insertMode = true;\n break;\n case 20:\n // this._t.convertEol = true;\n break;\n }\n }\n return true;\n }\n\n /**\n * CSI ? Pm h\n * DEC Private Mode Set (DECSET).\n * Ps = 1 -> Application Cursor Keys (DECCKM).\n * Ps = 2 -> Designate USASCII for character sets G0-G3\n * (DECANM), and set VT100 mode.\n * Ps = 3 -> 132 Column Mode (DECCOLM).\n * Ps = 4 -> Smooth (Slow) Scroll (DECSCLM).\n * Ps = 5 -> Reverse Video (DECSCNM).\n * Ps = 6 -> Origin Mode (DECOM).\n * Ps = 7 -> Wraparound Mode (DECAWM).\n * Ps = 8 -> Auto-repeat Keys (DECARM).\n * Ps = 9 -> Send Mouse X & Y on button press. See the sec-\n * tion Mouse Tracking.\n * Ps = 1 0 -> Show toolbar (rxvt).\n * Ps = 1 2 -> Start Blinking Cursor (att610).\n * Ps = 1 8 -> Print form feed (DECPFF).\n * Ps = 1 9 -> Set print extent to full screen (DECPEX).\n * Ps = 2 5 -> Show Cursor (DECTCEM).\n * Ps = 3 0 -> Show scrollbar (rxvt).\n * Ps = 3 5 -> Enable font-shifting functions (rxvt).\n * Ps = 3 8 -> Enter Tektronix Mode (DECTEK).\n * Ps = 4 0 -> Allow 80 -> 132 Mode.\n * Ps = 4 1 -> more(1) fix (see curses resource).\n * Ps = 4 2 -> Enable Nation Replacement Character sets (DECN-\n * RCM).\n * Ps = 4 4 -> Turn On Margin Bell.\n * Ps = 4 5 -> Reverse-wraparound Mode.\n * Ps = 4 6 -> Start Logging. This is normally disabled by a\n * compile-time option.\n * Ps = 4 7 -> Use Alternate Screen Buffer. (This may be dis-\n * abled by the titeInhibit resource).\n * Ps = 6 6 -> Application keypad (DECNKM).\n * Ps = 6 7 -> Backarrow key sends backspace (DECBKM).\n * Ps = 1 0 0 0 -> Send Mouse X & Y on button press and\n * release. See the section Mouse Tracking.\n * Ps = 1 0 0 1 -> Use Hilite Mouse Tracking.\n * Ps = 1 0 0 2 -> Use Cell Motion Mouse Tracking.\n * Ps = 1 0 0 3 -> Use All Motion Mouse Tracking.\n * Ps = 1 0 0 4 -> Send FocusIn/FocusOut events.\n * Ps = 1 0 0 5 -> Enable Extended Mouse Mode.\n * Ps = 1 0 1 0 -> Scroll to bottom on tty output (rxvt).\n * Ps = 1 0 1 1 -> Scroll to bottom on key press (rxvt).\n * Ps = 1 0 3 4 -> Interpret \"meta\" key, sets eighth bit.\n * (enables the eightBitInput resource).\n * Ps = 1 0 3 5 -> Enable special modifiers for Alt and Num-\n * Lock keys. (This enables the numLock resource).\n * Ps = 1 0 3 6 -> Send ESC when Meta modifies a key. (This\n * enables the metaSendsEscape resource).\n * Ps = 1 0 3 7 -> Send DEL from the editing-keypad Delete\n * key.\n * Ps = 1 0 3 9 -> Send ESC when Alt modifies a key. (This\n * enables the altSendsEscape resource).\n * Ps = 1 0 4 0 -> Keep selection even if not highlighted.\n * (This enables the keepSelection resource).\n * Ps = 1 0 4 1 -> Use the CLIPBOARD selection. (This enables\n * the selectToClipboard resource).\n * Ps = 1 0 4 2 -> Enable Urgency window manager hint when\n * Control-G is received. (This enables the bellIsUrgent\n * resource).\n * Ps = 1 0 4 3 -> Enable raising of the window when Control-G\n * is received. (enables the popOnBell resource).\n * Ps = 1 0 4 7 -> Use Alternate Screen Buffer. (This may be\n * disabled by the titeInhibit resource).\n * Ps = 1 0 4 8 -> Save cursor as in DECSC. (This may be dis-\n * abled by the titeInhibit resource).\n * Ps = 1 0 4 9 -> Save cursor as in DECSC and use Alternate\n * Screen Buffer, clearing it first. (This may be disabled by\n * the titeInhibit resource). This combines the effects of the 1\n * 0 4 7 and 1 0 4 8 modes. Use this with terminfo-based\n * applications rather than the 4 7 mode.\n * Ps = 1 0 5 0 -> Set terminfo/termcap function-key mode.\n * Ps = 1 0 5 1 -> Set Sun function-key mode.\n * Ps = 1 0 5 2 -> Set HP function-key mode.\n * Ps = 1 0 5 3 -> Set SCO function-key mode.\n * Ps = 1 0 6 0 -> Set legacy keyboard emulation (X11R6).\n * Ps = 1 0 6 1 -> Set VT220 keyboard emulation.\n * Ps = 2 0 0 4 -> Set bracketed paste mode.\n * Modes:\n * http: *vt100.net/docs/vt220-rm/chapter4.html\n *\n * @vt: #P[See below for supported modes.] CSI DECSET \"DEC Private Set Mode\" \"CSI ? Pm h\" \"Set various terminal attributes.\"\n * Supported param values by DECSET:\n *\n * | param | Action | Support |\n * | ----- | ------------------------------------------------------- | --------|\n * | 1 | Application Cursor Keys (DECCKM). | #Y |\n * | 2 | Designate US-ASCII for character sets G0-G3 (DECANM). | #Y |\n * | 3 | 132 Column Mode (DECCOLM). | #Y |\n * | 6 | Origin Mode (DECOM). | #Y |\n * | 7 | Auto-wrap Mode (DECAWM). | #Y |\n * | 8 | Auto-repeat Keys (DECARM). Always on. | #N |\n * | 9 | X10 xterm mouse protocol. | #Y |\n * | 12 | Start Blinking Cursor. | #Y |\n * | 25 | Show Cursor (DECTCEM). | #Y |\n * | 45 | Reverse wrap-around. | #Y |\n * | 47 | Use Alternate Screen Buffer. | #Y |\n * | 66 | Application keypad (DECNKM). | #Y |\n * | 1000 | X11 xterm mouse protocol. | #Y |\n * | 1002 | Use Cell Motion Mouse Tracking. | #Y |\n * | 1003 | Use All Motion Mouse Tracking. | #Y |\n * | 1004 | Send FocusIn/FocusOut events | #Y |\n * | 1005 | Enable UTF-8 Mouse Mode. | #N |\n * | 1006 | Enable SGR Mouse Mode. | #Y |\n * | 1015 | Enable urxvt Mouse Mode. | #N |\n * | 1047 | Use Alternate Screen Buffer. | #Y |\n * | 1048 | Save cursor as in DECSC. | #Y |\n * | 1049 | Save cursor and switch to alternate buffer clearing it. | #P[Does not clear the alternate buffer.] |\n * | 2004 | Set bracketed paste mode. | #Y |\n *\n *\n * FIXME: implement DECSCNM, 1049 should clear altbuffer\n */\n public setModePrivate(params: IParams): boolean {\n for (let i = 0; i < params.length; i++) {\n switch (params.params[i]) {\n case 1:\n this._coreService.decPrivateModes.applicationCursorKeys = true;\n break;\n case 2:\n this._charsetService.setgCharset(0, DEFAULT_CHARSET);\n this._charsetService.setgCharset(1, DEFAULT_CHARSET);\n this._charsetService.setgCharset(2, DEFAULT_CHARSET);\n this._charsetService.setgCharset(3, DEFAULT_CHARSET);\n // set VT100 mode here\n break;\n case 3:\n /**\n * DECCOLM - 132 column mode.\n * This is only active if 'SetWinLines' (24) is enabled\n * through `options.windowsOptions`.\n */\n if (this._optionsService.rawOptions.windowOptions.setWinLines) {\n this._bufferService.resize(132, this._bufferService.rows);\n this._onRequestReset.fire();\n }\n break;\n case 6:\n this._coreService.decPrivateModes.origin = true;\n this._setCursor(0, 0);\n break;\n case 7:\n this._coreService.decPrivateModes.wraparound = true;\n break;\n case 12:\n // this.cursorBlink = true;\n break;\n case 45:\n this._coreService.decPrivateModes.reverseWraparound = true;\n break;\n case 66:\n this._logService.debug('Serial port requested application keypad.');\n this._coreService.decPrivateModes.applicationKeypad = true;\n this._onRequestSyncScrollBar.fire();\n break;\n case 9: // X10 Mouse\n // no release, no motion, no wheel, no modifiers.\n this._coreMouseService.activeProtocol = 'X10';\n break;\n case 1000: // vt200 mouse\n // no motion.\n this._coreMouseService.activeProtocol = 'VT200';\n break;\n case 1002: // button event mouse\n this._coreMouseService.activeProtocol = 'DRAG';\n break;\n case 1003: // any event mouse\n // any event - sends motion events,\n // even if there is no button held down.\n this._coreMouseService.activeProtocol = 'ANY';\n break;\n case 1004: // send focusin/focusout events\n // focusin: ^[[I\n // focusout: ^[[O\n this._coreService.decPrivateModes.sendFocus = true;\n this._onRequestSendFocus.fire();\n break;\n case 1005: // utf8 ext mode mouse - removed in #2507\n this._logService.debug('DECSET 1005 not supported (see #2507)');\n break;\n case 1006: // sgr ext mode mouse\n this._coreMouseService.activeEncoding = 'SGR';\n break;\n case 1015: // urxvt ext mode mouse - removed in #2507\n this._logService.debug('DECSET 1015 not supported (see #2507)');\n break;\n case 25: // show cursor\n this._coreService.isCursorHidden = false;\n break;\n case 1048: // alt screen cursor\n this.saveCursor();\n break;\n case 1049: // alt screen buffer cursor\n this.saveCursor();\n // FALL-THROUGH\n case 47: // alt screen buffer\n case 1047: // alt screen buffer\n this._bufferService.buffers.activateAltBuffer(this._eraseAttrData());\n this._coreService.isCursorInitialized = true;\n this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1);\n this._onRequestSyncScrollBar.fire();\n break;\n case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)\n this._coreService.decPrivateModes.bracketedPasteMode = true;\n break;\n }\n }\n return true;\n }\n\n\n /**\n * CSI Pm l Reset Mode (RM).\n * Ps = 2 -> Keyboard Action Mode (AM).\n * Ps = 4 -> Replace Mode (IRM).\n * Ps = 1 2 -> Send/receive (SRM).\n * Ps = 2 0 -> Normal Linefeed (LNM).\n *\n * @vt: #P[Only IRM is supported.] CSI RM \"Reset Mode\" \"CSI Pm l\" \"Set various terminal attributes.\"\n * Supported param values by RM:\n *\n * | Param | Action | Support |\n * | ----- | -------------------------------------- | ------- |\n * | 2 | Keyboard Action Mode (KAM). Always on. | #N |\n * | 4 | Replace Mode (IRM). (default) | #Y |\n * | 12 | Send/receive (SRM). Always off. | #N |\n * | 20 | Normal Linefeed (LNM). Always off. | #N |\n *\n *\n * FIXME: why is LNM commented out?\n */\n public resetMode(params: IParams): boolean {\n for (let i = 0; i < params.length; i++) {\n switch (params.params[i]) {\n case 4:\n this._coreService.modes.insertMode = false;\n break;\n case 20:\n // this._t.convertEol = false;\n break;\n }\n }\n return true;\n }\n\n /**\n * CSI ? Pm l\n * DEC Private Mode Reset (DECRST).\n * Ps = 1 -> Normal Cursor Keys (DECCKM).\n * Ps = 2 -> Designate VT52 mode (DECANM).\n * Ps = 3 -> 80 Column Mode (DECCOLM).\n * Ps = 4 -> Jump (Fast) Scroll (DECSCLM).\n * Ps = 5 -> Normal Video (DECSCNM).\n * Ps = 6 -> Normal Cursor Mode (DECOM).\n * Ps = 7 -> No Wraparound Mode (DECAWM).\n * Ps = 8 -> No Auto-repeat Keys (DECARM).\n * Ps = 9 -> Don't send Mouse X & Y on button press.\n * Ps = 1 0 -> Hide toolbar (rxvt).\n * Ps = 1 2 -> Stop Blinking Cursor (att610).\n * Ps = 1 8 -> Don't print form feed (DECPFF).\n * Ps = 1 9 -> Limit print to scrolling region (DECPEX).\n * Ps = 2 5 -> Hide Cursor (DECTCEM).\n * Ps = 3 0 -> Don't show scrollbar (rxvt).\n * Ps = 3 5 -> Disable font-shifting functions (rxvt).\n * Ps = 4 0 -> Disallow 80 -> 132 Mode.\n * Ps = 4 1 -> No more(1) fix (see curses resource).\n * Ps = 4 2 -> Disable Nation Replacement Character sets (DEC-\n * NRCM).\n * Ps = 4 4 -> Turn Off Margin Bell.\n * Ps = 4 5 -> No Reverse-wraparound Mode.\n * Ps = 4 6 -> Stop Logging. (This is normally disabled by a\n * compile-time option).\n * Ps = 4 7 -> Use Normal Screen Buffer.\n * Ps = 6 6 -> Numeric keypad (DECNKM).\n * Ps = 6 7 -> Backarrow key sends delete (DECBKM).\n * Ps = 1 0 0 0 -> Don't send Mouse X & Y on button press and\n * release. See the section Mouse Tracking.\n * Ps = 1 0 0 1 -> Don't use Hilite Mouse Tracking.\n * Ps = 1 0 0 2 -> Don't use Cell Motion Mouse Tracking.\n * Ps = 1 0 0 3 -> Don't use All Motion Mouse Tracking.\n * Ps = 1 0 0 4 -> Don't send FocusIn/FocusOut events.\n * Ps = 1 0 0 5 -> Disable Extended Mouse Mode.\n * Ps = 1 0 1 0 -> Don't scroll to bottom on tty output\n * (rxvt).\n * Ps = 1 0 1 1 -> Don't scroll to bottom on key press (rxvt).\n * Ps = 1 0 3 4 -> Don't interpret \"meta\" key. (This disables\n * the eightBitInput resource).\n * Ps = 1 0 3 5 -> Disable special modifiers for Alt and Num-\n * Lock keys. (This disables the numLock resource).\n * Ps = 1 0 3 6 -> Don't send ESC when Meta modifies a key.\n * (This disables the metaSendsEscape resource).\n * Ps = 1 0 3 7 -> Send VT220 Remove from the editing-keypad\n * Delete key.\n * Ps = 1 0 3 9 -> Don't send ESC when Alt modifies a key.\n * (This disables the altSendsEscape resource).\n * Ps = 1 0 4 0 -> Do not keep selection when not highlighted.\n * (This disables the keepSelection resource).\n * Ps = 1 0 4 1 -> Use the PRIMARY selection. (This disables\n * the selectToClipboard resource).\n * Ps = 1 0 4 2 -> Disable Urgency window manager hint when\n * Control-G is received. (This disables the bellIsUrgent\n * resource).\n * Ps = 1 0 4 3 -> Disable raising of the window when Control-\n * G is received. (This disables the popOnBell resource).\n * Ps = 1 0 4 7 -> Use Normal Screen Buffer, clearing screen\n * first if in the Alternate Screen. (This may be disabled by\n * the titeInhibit resource).\n * Ps = 1 0 4 8 -> Restore cursor as in DECRC. (This may be\n * disabled by the titeInhibit resource).\n * Ps = 1 0 4 9 -> Use Normal Screen Buffer and restore cursor\n * as in DECRC. (This may be disabled by the titeInhibit\n * resource). This combines the effects of the 1 0 4 7 and 1 0\n * 4 8 modes. Use this with terminfo-based applications rather\n * than the 4 7 mode.\n * Ps = 1 0 5 0 -> Reset terminfo/termcap function-key mode.\n * Ps = 1 0 5 1 -> Reset Sun function-key mode.\n * Ps = 1 0 5 2 -> Reset HP function-key mode.\n * Ps = 1 0 5 3 -> Reset SCO function-key mode.\n * Ps = 1 0 6 0 -> Reset legacy keyboard emulation (X11R6).\n * Ps = 1 0 6 1 -> Reset keyboard emulation to Sun/PC style.\n * Ps = 2 0 0 4 -> Reset bracketed paste mode.\n *\n * @vt: #P[See below for supported modes.] CSI DECRST \"DEC Private Reset Mode\" \"CSI ? Pm l\" \"Reset various terminal attributes.\"\n * Supported param values by DECRST:\n *\n * | param | Action | Support |\n * | ----- | ------------------------------------------------------- | ------- |\n * | 1 | Normal Cursor Keys (DECCKM). | #Y |\n * | 2 | Designate VT52 mode (DECANM). | #N |\n * | 3 | 80 Column Mode (DECCOLM). | #B[Switches to old column width instead of 80.] |\n * | 6 | Normal Cursor Mode (DECOM). | #Y |\n * | 7 | No Wraparound Mode (DECAWM). | #Y |\n * | 8 | No Auto-repeat Keys (DECARM). | #N |\n * | 9 | Don't send Mouse X & Y on button press. | #Y |\n * | 12 | Stop Blinking Cursor. | #Y |\n * | 25 | Hide Cursor (DECTCEM). | #Y |\n * | 45 | No reverse wrap-around. | #Y |\n * | 47 | Use Normal Screen Buffer. | #Y |\n * | 66 | Numeric keypad (DECNKM). | #Y |\n * | 1000 | Don't send Mouse reports. | #Y |\n * | 1002 | Don't use Cell Motion Mouse Tracking. | #Y |\n * | 1003 | Don't use All Motion Mouse Tracking. | #Y |\n * | 1004 | Don't send FocusIn/FocusOut events. | #Y |\n * | 1005 | Disable UTF-8 Mouse Mode. | #N |\n * | 1006 | Disable SGR Mouse Mode. | #Y |\n * | 1015 | Disable urxvt Mouse Mode. | #N |\n * | 1047 | Use Normal Screen Buffer (clearing screen if in alt). | #Y |\n * | 1048 | Restore cursor as in DECRC. | #Y |\n * | 1049 | Use Normal Screen Buffer and restore cursor. | #Y |\n * | 2004 | Reset bracketed paste mode. | #Y |\n *\n *\n * FIXME: DECCOLM is currently broken (already fixed in window options PR)\n */\n public resetModePrivate(params: IParams): boolean {\n for (let i = 0; i < params.length; i++) {\n switch (params.params[i]) {\n case 1:\n this._coreService.decPrivateModes.applicationCursorKeys = false;\n break;\n case 3:\n /**\n * DECCOLM - 80 column mode.\n * This is only active if 'SetWinLines' (24) is enabled\n * through `options.windowsOptions`.\n */\n if (this._optionsService.rawOptions.windowOptions.setWinLines) {\n this._bufferService.resize(80, this._bufferService.rows);\n this._onRequestReset.fire();\n }\n break;\n case 6:\n this._coreService.decPrivateModes.origin = false;\n this._setCursor(0, 0);\n break;\n case 7:\n this._coreService.decPrivateModes.wraparound = false;\n break;\n case 12:\n // this.cursorBlink = false;\n break;\n case 45:\n this._coreService.decPrivateModes.reverseWraparound = false;\n break;\n case 66:\n this._logService.debug('Switching back to normal keypad.');\n this._coreService.decPrivateModes.applicationKeypad = false;\n this._onRequestSyncScrollBar.fire();\n break;\n case 9: // X10 Mouse\n case 1000: // vt200 mouse\n case 1002: // button event mouse\n case 1003: // any event mouse\n this._coreMouseService.activeProtocol = 'NONE';\n break;\n case 1004: // send focusin/focusout events\n this._coreService.decPrivateModes.sendFocus = false;\n break;\n case 1005: // utf8 ext mode mouse - removed in #2507\n this._logService.debug('DECRST 1005 not supported (see #2507)');\n break;\n case 1006: // sgr ext mode mouse\n this._coreMouseService.activeEncoding = 'DEFAULT';\n break;\n case 1015: // urxvt ext mode mouse - removed in #2507\n this._logService.debug('DECRST 1015 not supported (see #2507)');\n break;\n case 25: // hide cursor\n this._coreService.isCursorHidden = true;\n break;\n case 1048: // alt screen cursor\n this.restoreCursor();\n break;\n case 1049: // alt screen buffer cursor\n // FALL-THROUGH\n case 47: // normal screen buffer\n case 1047: // normal screen buffer - clearing it first\n // Ensure the selection manager has the correct buffer\n this._bufferService.buffers.activateNormalBuffer();\n if (params.params[i] === 1049) {\n this.restoreCursor();\n }\n this._coreService.isCursorInitialized = true;\n this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1);\n this._onRequestSyncScrollBar.fire();\n break;\n case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)\n this._coreService.decPrivateModes.bracketedPasteMode = false;\n break;\n }\n }\n return true;\n }\n\n /**\n * Helper to write color information packed with color mode.\n */\n private _updateAttrColor(color: number, mode: number, c1: number, c2: number, c3: number): number {\n if (mode === 2) {\n color |= Attributes.CM_RGB;\n color &= ~Attributes.RGB_MASK;\n color |= AttributeData.fromColorRGB([c1, c2, c3]);\n } else if (mode === 5) {\n color &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);\n color |= Attributes.CM_P256 | (c1 & 0xff);\n }\n return color;\n }\n\n /**\n * Helper to extract and apply color params/subparams.\n * Returns advance for params index.\n */\n private _extractColor(params: IParams, pos: number, attr: IAttributeData): number {\n // normalize params\n // meaning: [target, CM, ign, val, val, val]\n // RGB : [ 38/48, 2, ign, r, g, b]\n // P256 : [ 38/48, 5, ign, v, ign, ign]\n const accu = [0, 0, -1, 0, 0, 0];\n\n // alignment placeholder for non color space sequences\n let cSpace = 0;\n\n // return advance we took in params\n let advance = 0;\n\n do {\n accu[advance + cSpace] = params.params[pos + advance];\n if (params.hasSubParams(pos + advance)) {\n const subparams = params.getSubParams(pos + advance)!;\n let i = 0;\n do {\n if (accu[1] === 5) {\n cSpace = 1;\n }\n accu[advance + i + 1 + cSpace] = subparams[i];\n } while (++i < subparams.length && i + advance + 1 + cSpace < accu.length);\n break;\n }\n // exit early if can decide color mode with semicolons\n if ((accu[1] === 5 && advance + cSpace >= 2)\n || (accu[1] === 2 && advance + cSpace >= 5)) {\n break;\n }\n // offset colorSpace slot for semicolon mode\n if (accu[1]) {\n cSpace = 1;\n }\n } while (++advance + pos < params.length && advance + cSpace < accu.length);\n\n // set default values to 0\n for (let i = 2; i < accu.length; ++i) {\n if (accu[i] === -1) {\n accu[i] = 0;\n }\n }\n\n // apply colors\n switch (accu[0]) {\n case 38:\n attr.fg = this._updateAttrColor(attr.fg, accu[1], accu[3], accu[4], accu[5]);\n break;\n case 48:\n attr.bg = this._updateAttrColor(attr.bg, accu[1], accu[3], accu[4], accu[5]);\n break;\n case 58:\n attr.extended = attr.extended.clone();\n attr.extended.underlineColor = this._updateAttrColor(attr.extended.underlineColor, accu[1], accu[3], accu[4], accu[5]);\n }\n\n return advance;\n }\n\n /**\n * SGR 4 subparams:\n * 4:0 - equal to SGR 24 (turn off all underline)\n * 4:1 - equal to SGR 4 (single underline)\n * 4:2 - equal to SGR 21 (double underline)\n * 4:3 - curly underline\n * 4:4 - dotted underline\n * 4:5 - dashed underline\n */\n private _processUnderline(style: number, attr: IAttributeData): void {\n // treat extended attrs as immutable, thus always clone from old one\n // this is needed since the buffer only holds references to it\n attr.extended = attr.extended.clone();\n\n // default to 1 == single underline\n if (!~style || style > 5) {\n style = 1;\n }\n attr.extended.underlineStyle = style;\n attr.fg |= FgFlags.UNDERLINE;\n\n // 0 deactivates underline\n if (style === 0) {\n attr.fg &= ~FgFlags.UNDERLINE;\n }\n\n // update HAS_EXTENDED in BG\n attr.updateExtended();\n }\n\n /**\n * CSI Pm m Character Attributes (SGR).\n *\n * @vt: #P[See below for supported attributes.] CSI SGR \"Select Graphic Rendition\" \"CSI Pm m\" \"Set/Reset various text attributes.\"\n * SGR selects one or more character attributes at the same time. Multiple params (up to 32)\n * are applied in order from left to right. The changed attributes are applied to all new\n * characters received. If you move characters in the viewport by scrolling or any other means,\n * then the attributes move with the characters.\n *\n * Supported param values by SGR:\n *\n * | Param | Meaning | Support |\n * | --------- | -------------------------------------------------------- | ------- |\n * | 0 | Normal (default). Resets any other preceding SGR. | #Y |\n * | 1 | Bold. (also see `options.drawBoldTextInBrightColors`) | #Y |\n * | 2 | Faint, decreased intensity. | #Y |\n * | 3 | Italic. | #Y |\n * | 4 | Underlined (see below for style support). | #Y |\n * | 5 | Slowly blinking. | #N |\n * | 6 | Rapidly blinking. | #N |\n * | 7 | Inverse. Flips foreground and background color. | #Y |\n * | 8 | Invisible (hidden). | #Y |\n * | 9 | Crossed-out characters (strikethrough). | #Y |\n * | 21 | Doubly underlined. | #P[Currently outputs a single underline.] |\n * | 22 | Normal (neither bold nor faint). | #Y |\n * | 23 | No italic. | #Y |\n * | 24 | Not underlined. | #Y |\n * | 25 | Steady (not blinking). | #Y |\n * | 27 | Positive (not inverse). | #Y |\n * | 28 | Visible (not hidden). | #Y |\n * | 29 | Not Crossed-out (strikethrough). | #Y |\n * | 30 | Foreground color: Black. | #Y |\n * | 31 | Foreground color: Red. | #Y |\n * | 32 | Foreground color: Green. | #Y |\n * | 33 | Foreground color: Yellow. | #Y |\n * | 34 | Foreground color: Blue. | #Y |\n * | 35 | Foreground color: Magenta. | #Y |\n * | 36 | Foreground color: Cyan. | #Y |\n * | 37 | Foreground color: White. | #Y |\n * | 38 | Foreground color: Extended color. | #P[Support for RGB and indexed colors, see below.] |\n * | 39 | Foreground color: Default (original). | #Y |\n * | 40 | Background color: Black. | #Y |\n * | 41 | Background color: Red. | #Y |\n * | 42 | Background color: Green. | #Y |\n * | 43 | Background color: Yellow. | #Y |\n * | 44 | Background color: Blue. | #Y |\n * | 45 | Background color: Magenta. | #Y |\n * | 46 | Background color: Cyan. | #Y |\n * | 47 | Background color: White. | #Y |\n * | 48 | Background color: Extended color. | #P[Support for RGB and indexed colors, see below.] |\n * | 49 | Background color: Default (original). | #Y |\n * | 90 - 97 | Bright foreground color (analogous to 30 - 37). | #Y |\n * | 100 - 107 | Bright background color (analogous to 40 - 47). | #Y |\n *\n * Underline supports subparams to denote the style in the form `4 : x`:\n *\n * | x | Meaning | Support |\n * | ------ | ------------------------------------------------------------- | ------- |\n * | 0 | No underline. Same as `SGR 24 m`. | #Y |\n * | 1 | Single underline. Same as `SGR 4 m`. | #Y |\n * | 2 | Double underline. | #P[Currently outputs a single underline.] |\n * | 3 | Curly underline. | #P[Currently outputs a single underline.] |\n * | 4 | Dotted underline. | #P[Currently outputs a single underline.] |\n * | 5 | Dashed underline. | #P[Currently outputs a single underline.] |\n * | other | Single underline. Same as `SGR 4 m`. | #Y |\n *\n * Extended colors are supported for foreground (Ps=38) and background (Ps=48) as follows:\n *\n * | Ps + 1 | Meaning | Support |\n * | ------ | ------------------------------------------------------------- | ------- |\n * | 0 | Implementation defined. | #N |\n * | 1 | Transparent. | #N |\n * | 2 | RGB color as `Ps ; 2 ; R ; G ; B` or `Ps : 2 : : R : G : B`. | #Y |\n * | 3 | CMY color. | #N |\n * | 4 | CMYK color. | #N |\n * | 5 | Indexed (256 colors) as `Ps ; 5 ; INDEX` or `Ps : 5 : INDEX`. | #Y |\n *\n *\n * FIXME: blinking is implemented in attrs, but not working in renderers?\n * FIXME: remove dead branch for p=100\n */\n public charAttributes(params: IParams): boolean {\n // Optimize a single SGR0.\n if (params.length === 1 && params.params[0] === 0) {\n this._curAttrData.fg = DEFAULT_ATTR_DATA.fg;\n this._curAttrData.bg = DEFAULT_ATTR_DATA.bg;\n return true;\n }\n\n const l = params.length;\n let p;\n const attr = this._curAttrData;\n\n for (let i = 0; i < l; i++) {\n p = params.params[i];\n if (p >= 30 && p <= 37) {\n // fg color 8\n attr.fg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);\n attr.fg |= Attributes.CM_P16 | (p - 30);\n } else if (p >= 40 && p <= 47) {\n // bg color 8\n attr.bg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);\n attr.bg |= Attributes.CM_P16 | (p - 40);\n } else if (p >= 90 && p <= 97) {\n // fg color 16\n attr.fg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);\n attr.fg |= Attributes.CM_P16 | (p - 90) | 8;\n } else if (p >= 100 && p <= 107) {\n // bg color 16\n attr.bg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);\n attr.bg |= Attributes.CM_P16 | (p - 100) | 8;\n } else if (p === 0) {\n // default\n attr.fg = DEFAULT_ATTR_DATA.fg;\n attr.bg = DEFAULT_ATTR_DATA.bg;\n } else if (p === 1) {\n // bold text\n attr.fg |= FgFlags.BOLD;\n } else if (p === 3) {\n // italic text\n attr.bg |= BgFlags.ITALIC;\n } else if (p === 4) {\n // underlined text\n attr.fg |= FgFlags.UNDERLINE;\n this._processUnderline(params.hasSubParams(i) ? params.getSubParams(i)![0] : UnderlineStyle.SINGLE, attr);\n } else if (p === 5) {\n // blink\n attr.fg |= FgFlags.BLINK;\n } else if (p === 7) {\n // inverse and positive\n // test with: echo -e '\\e[31m\\e[42mhello\\e[7mworld\\e[27mhi\\e[m'\n attr.fg |= FgFlags.INVERSE;\n } else if (p === 8) {\n // invisible\n attr.fg |= FgFlags.INVISIBLE;\n } else if (p === 9) {\n // strikethrough\n attr.fg |= FgFlags.STRIKETHROUGH;\n } else if (p === 2) {\n // dimmed text\n attr.bg |= BgFlags.DIM;\n } else if (p === 21) {\n // double underline\n this._processUnderline(UnderlineStyle.DOUBLE, attr);\n } else if (p === 22) {\n // not bold nor faint\n attr.fg &= ~FgFlags.BOLD;\n attr.bg &= ~BgFlags.DIM;\n } else if (p === 23) {\n // not italic\n attr.bg &= ~BgFlags.ITALIC;\n } else if (p === 24) {\n // not underlined\n attr.fg &= ~FgFlags.UNDERLINE;\n } else if (p === 25) {\n // not blink\n attr.fg &= ~FgFlags.BLINK;\n } else if (p === 27) {\n // not inverse\n attr.fg &= ~FgFlags.INVERSE;\n } else if (p === 28) {\n // not invisible\n attr.fg &= ~FgFlags.INVISIBLE;\n } else if (p === 29) {\n // not strikethrough\n attr.fg &= ~FgFlags.STRIKETHROUGH;\n } else if (p === 39) {\n // reset fg\n attr.fg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);\n attr.fg |= DEFAULT_ATTR_DATA.fg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);\n } else if (p === 49) {\n // reset bg\n attr.bg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);\n attr.bg |= DEFAULT_ATTR_DATA.bg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);\n } else if (p === 38 || p === 48 || p === 58) {\n // fg color 256 and RGB\n i += this._extractColor(params, i, attr);\n } else if (p === 59) {\n attr.extended = attr.extended.clone();\n attr.extended.underlineColor = -1;\n attr.updateExtended();\n } else if (p === 100) { // FIXME: dead branch, p=100 already handled above!\n // reset fg/bg\n attr.fg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);\n attr.fg |= DEFAULT_ATTR_DATA.fg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);\n attr.bg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);\n attr.bg |= DEFAULT_ATTR_DATA.bg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);\n } else {\n this._logService.debug('Unknown SGR attribute: %d.', p);\n }\n }\n return true;\n }\n\n /**\n * CSI Ps n Device Status Report (DSR).\n * Ps = 5 -> Status Report. Result (``OK'') is\n * CSI 0 n\n * Ps = 6 -> Report Cursor Position (CPR) [row;column].\n * Result is\n * CSI r ; c R\n * CSI ? Ps n\n * Device Status Report (DSR, DEC-specific).\n * Ps = 6 -> Report Cursor Position (CPR) [row;column] as CSI\n * ? r ; c R (assumes page is zero).\n * Ps = 1 5 -> Report Printer status as CSI ? 1 0 n (ready).\n * or CSI ? 1 1 n (not ready).\n * Ps = 2 5 -> Report UDK status as CSI ? 2 0 n (unlocked)\n * or CSI ? 2 1 n (locked).\n * Ps = 2 6 -> Report Keyboard status as\n * CSI ? 2 7 ; 1 ; 0 ; 0 n (North American).\n * The last two parameters apply to VT400 & up, and denote key-\n * board ready and LK01 respectively.\n * Ps = 5 3 -> Report Locator status as\n * CSI ? 5 3 n Locator available, if compiled-in, or\n * CSI ? 5 0 n No Locator, if not.\n *\n * @vt: #Y CSI DSR \"Device Status Report\" \"CSI Ps n\" \"Request cursor position (CPR) with `Ps` = 6.\"\n */\n public deviceStatus(params: IParams): boolean {\n switch (params.params[0]) {\n case 5:\n // status report\n this._coreService.triggerDataEvent(`${C0.ESC}[0n`);\n break;\n case 6:\n // cursor position\n const y = this._activeBuffer.y + 1;\n const x = this._activeBuffer.x + 1;\n this._coreService.triggerDataEvent(`${C0.ESC}[${y};${x}R`);\n break;\n }\n return true;\n }\n\n // @vt: #P[Only CPR is supported.] CSI DECDSR \"DEC Device Status Report\" \"CSI ? Ps n\" \"Only CPR is supported (same as DSR).\"\n public deviceStatusPrivate(params: IParams): boolean {\n // modern xterm doesnt seem to\n // respond to any of these except ?6, 6, and 5\n switch (params.params[0]) {\n case 6:\n // cursor position\n const y = this._activeBuffer.y + 1;\n const x = this._activeBuffer.x + 1;\n this._coreService.triggerDataEvent(`${C0.ESC}[?${y};${x}R`);\n break;\n case 15:\n // no printer\n // this.handler(C0.ESC + '[?11n');\n break;\n case 25:\n // dont support user defined keys\n // this.handler(C0.ESC + '[?21n');\n break;\n case 26:\n // north american keyboard\n // this.handler(C0.ESC + '[?27;1;0;0n');\n break;\n case 53:\n // no dec locator/mouse\n // this.handler(C0.ESC + '[?50n');\n break;\n }\n return true;\n }\n\n /**\n * CSI ! p Soft terminal reset (DECSTR).\n * http://vt100.net/docs/vt220-rm/table4-10.html\n *\n * @vt: #Y CSI DECSTR \"Soft Terminal Reset\" \"CSI ! p\" \"Reset several terminal attributes to initial state.\"\n * There are two terminal reset sequences - RIS and DECSTR. While RIS performs almost a full terminal bootstrap,\n * DECSTR only resets certain attributes. For most needs DECSTR should be sufficient.\n *\n * The following terminal attributes are reset to default values:\n * - IRM is reset (dafault = false)\n * - scroll margins are reset (default = viewport size)\n * - erase attributes are reset to default\n * - charsets are reset\n * - DECSC data is reset to initial values\n * - DECOM is reset to absolute mode\n *\n *\n * FIXME: there are several more attributes missing (see VT520 manual)\n */\n public softReset(params: IParams): boolean {\n this._coreService.isCursorHidden = false;\n this._onRequestSyncScrollBar.fire();\n this._activeBuffer.scrollTop = 0;\n this._activeBuffer.scrollBottom = this._bufferService.rows - 1;\n this._curAttrData = DEFAULT_ATTR_DATA.clone();\n this._coreService.reset();\n this._charsetService.reset();\n\n // reset DECSC data\n this._activeBuffer.savedX = 0;\n this._activeBuffer.savedY = this._activeBuffer.ybase;\n this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg;\n this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg;\n this._activeBuffer.savedCharset = this._charsetService.charset;\n\n // reset DECOM\n this._coreService.decPrivateModes.origin = false;\n return true;\n }\n\n /**\n * CSI Ps SP q Set cursor style (DECSCUSR, VT520).\n * Ps = 0 -> blinking block.\n * Ps = 1 -> blinking block (default).\n * Ps = 2 -> steady block.\n * Ps = 3 -> blinking underline.\n * Ps = 4 -> steady underline.\n * Ps = 5 -> blinking bar (xterm).\n * Ps = 6 -> steady bar (xterm).\n *\n * @vt: #Y CSI DECSCUSR \"Set Cursor Style\" \"CSI Ps SP q\" \"Set cursor style.\"\n * Supported cursor styles:\n * - empty, 0 or 1: steady block\n * - 2: blink block\n * - 3: steady underline\n * - 4: blink underline\n * - 5: steady bar\n * - 6: blink bar\n */\n public setCursorStyle(params: IParams): boolean {\n const param = params.params[0] || 1;\n switch (param) {\n case 1:\n case 2:\n this._optionsService.options.cursorStyle = 'block';\n break;\n case 3:\n case 4:\n this._optionsService.options.cursorStyle = 'underline';\n break;\n case 5:\n case 6:\n this._optionsService.options.cursorStyle = 'bar';\n break;\n }\n const isBlinking = param % 2 === 1;\n this._optionsService.options.cursorBlink = isBlinking;\n return true;\n }\n\n /**\n * CSI Ps ; Ps r\n * Set Scrolling Region [top;bottom] (default = full size of win-\n * dow) (DECSTBM).\n *\n * @vt: #Y CSI DECSTBM \"Set Top and Bottom Margin\" \"CSI Ps ; Ps r\" \"Set top and bottom margins of the viewport [top;bottom] (default = viewport size).\"\n */\n public setScrollRegion(params: IParams): boolean {\n const top = params.params[0] || 1;\n let bottom: number;\n\n if (params.length < 2 || (bottom = params.params[1]) > this._bufferService.rows || bottom === 0) {\n bottom = this._bufferService.rows;\n }\n\n if (bottom > top) {\n this._activeBuffer.scrollTop = top - 1;\n this._activeBuffer.scrollBottom = bottom - 1;\n this._setCursor(0, 0);\n }\n return true;\n }\n\n /**\n * CSI Ps ; Ps ; Ps t - Various window manipulations and reports (xterm)\n *\n * Note: Only those listed below are supported. All others are left to integrators and\n * need special treatment based on the embedding environment.\n *\n * Ps = 1 4 supported\n * Report xterm text area size in pixels.\n * Result is CSI 4 ; height ; width t\n * Ps = 14 ; 2 not implemented\n * Ps = 16 supported\n * Report xterm character cell size in pixels.\n * Result is CSI 6 ; height ; width t\n * Ps = 18 supported\n * Report the size of the text area in characters.\n * Result is CSI 8 ; height ; width t\n * Ps = 20 supported\n * Report xterm window's icon label.\n * Result is OSC L label ST\n * Ps = 21 supported\n * Report xterm window's title.\n * Result is OSC l label ST\n * Ps = 22 ; 0 -> Save xterm icon and window title on stack. supported\n * Ps = 22 ; 1 -> Save xterm icon title on stack. supported\n * Ps = 22 ; 2 -> Save xterm window title on stack. supported\n * Ps = 23 ; 0 -> Restore xterm icon and window title from stack. supported\n * Ps = 23 ; 1 -> Restore xterm icon title from stack. supported\n * Ps = 23 ; 2 -> Restore xterm window title from stack. supported\n * Ps >= 24 not implemented\n */\n public windowOptions(params: IParams): boolean {\n if (!paramToWindowOption(params.params[0], this._optionsService.rawOptions.windowOptions)) {\n return true;\n }\n const second = (params.length > 1) ? params.params[1] : 0;\n switch (params.params[0]) {\n case 14: // GetWinSizePixels, returns CSI 4 ; height ; width t\n if (second !== 2) {\n this._onRequestWindowsOptionsReport.fire(WindowsOptionsReportType.GET_WIN_SIZE_PIXELS);\n }\n break;\n case 16: // GetCellSizePixels, returns CSI 6 ; height ; width t\n this._onRequestWindowsOptionsReport.fire(WindowsOptionsReportType.GET_CELL_SIZE_PIXELS);\n break;\n case 18: // GetWinSizeChars, returns CSI 8 ; height ; width t\n if (this._bufferService) {\n this._coreService.triggerDataEvent(`${C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);\n }\n break;\n case 22: // PushTitle\n if (second === 0 || second === 2) {\n this._windowTitleStack.push(this._windowTitle);\n if (this._windowTitleStack.length > STACK_LIMIT) {\n this._windowTitleStack.shift();\n }\n }\n if (second === 0 || second === 1) {\n this._iconNameStack.push(this._iconName);\n if (this._iconNameStack.length > STACK_LIMIT) {\n this._iconNameStack.shift();\n }\n }\n break;\n case 23: // PopTitle\n if (second === 0 || second === 2) {\n if (this._windowTitleStack.length) {\n this.setTitle(this._windowTitleStack.pop()!);\n }\n }\n if (second === 0 || second === 1) {\n if (this._iconNameStack.length) {\n this.setIconName(this._iconNameStack.pop()!);\n }\n }\n break;\n }\n return true;\n }\n\n\n /**\n * CSI s\n * ESC 7\n * Save cursor (ANSI.SYS).\n *\n * @vt: #P[TODO...] CSI SCOSC \"Save Cursor\" \"CSI s\" \"Save cursor position, charmap and text attributes.\"\n * @vt: #Y ESC SC \"Save Cursor\" \"ESC 7\" \"Save cursor position, charmap and text attributes.\"\n */\n public saveCursor(params?: IParams): boolean {\n this._activeBuffer.savedX = this._activeBuffer.x;\n this._activeBuffer.savedY = this._activeBuffer.ybase + this._activeBuffer.y;\n this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg;\n this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg;\n this._activeBuffer.savedCharset = this._charsetService.charset;\n return true;\n }\n\n\n /**\n * CSI u\n * ESC 8\n * Restore cursor (ANSI.SYS).\n *\n * @vt: #P[TODO...] CSI SCORC \"Restore Cursor\" \"CSI u\" \"Restore cursor position, charmap and text attributes.\"\n * @vt: #Y ESC RC \"Restore Cursor\" \"ESC 8\" \"Restore cursor position, charmap and text attributes.\"\n */\n public restoreCursor(params?: IParams): boolean {\n this._activeBuffer.x = this._activeBuffer.savedX || 0;\n this._activeBuffer.y = Math.max(this._activeBuffer.savedY - this._activeBuffer.ybase, 0);\n this._curAttrData.fg = this._activeBuffer.savedCurAttrData.fg;\n this._curAttrData.bg = this._activeBuffer.savedCurAttrData.bg;\n this._charsetService.charset = (this as any)._savedCharset;\n if (this._activeBuffer.savedCharset) {\n this._charsetService.charset = this._activeBuffer.savedCharset;\n }\n this._restrictCursor();\n return true;\n }\n\n\n /**\n * OSC 2; <data> ST (set window title)\n * Proxy to set window title.\n *\n * @vt: #P[Icon name is not exposed.] OSC 0 \"Set Windows Title and Icon Name\" \"OSC 0 ; Pt BEL\" \"Set window title and icon name.\"\n * Icon name is not supported. For Window Title see below.\n *\n * @vt: #Y OSC 2 \"Set Windows Title\" \"OSC 2 ; Pt BEL\" \"Set window title.\"\n * xterm.js does not manipulate the title directly, instead exposes changes via the event `Terminal.onTitleChange`.\n */\n public setTitle(data: string): boolean {\n this._windowTitle = data;\n this._onTitleChange.fire(data);\n return true;\n }\n\n /**\n * OSC 1; <data> ST\n * Note: Icon name is not exposed.\n */\n public setIconName(data: string): boolean {\n this._iconName = data;\n return true;\n }\n\n /**\n * OSC 4; <num> ; <text> ST (set ANSI color <num> to <text>)\n *\n * @vt: #Y OSC 4 \"Set ANSI color\" \"OSC 4 ; c ; spec BEL\" \"Change color number `c` to the color specified by `spec`.\"\n * `c` is the color index between 0 and 255. The color format of `spec` is derived from `XParseColor` (see OSC 10 for supported formats).\n * There may be multipe `c ; spec` pairs present in the same instruction.\n * If `spec` contains `?` the terminal returns a sequence with the currently set color.\n */\n public setOrReportIndexedColor(data: string): boolean {\n const event: IColorEvent = [];\n const slots = data.split(';');\n while (slots.length > 1) {\n const idx = slots.shift() as string;\n const spec = slots.shift() as string;\n if (/^\\d+$/.exec(idx)) {\n const index = parseInt(idx);\n if (0 <= index && index < 256) {\n if (spec === '?') {\n event.push({ type: ColorRequestType.REPORT, index });\n } else {\n const color = parseColor(spec);\n if (color) {\n event.push({ type: ColorRequestType.SET, index, color });\n }\n }\n }\n }\n }\n if (event.length) {\n this._onColor.fire(event);\n }\n return true;\n }\n\n // special colors - OSC 10 | 11 | 12\n private _specialColors = [ColorIndex.FOREGROUND, ColorIndex.BACKGROUND, ColorIndex.CURSOR];\n\n /**\n * Apply colors requests for special colors in OSC 10 | 11 | 12.\n * Since these commands are stacking from multiple parameters,\n * we handle them in a loop with an entry offset to `_specialColors`.\n */\n private _setOrReportSpecialColor(data: string, offset: number): boolean {\n const slots = data.split(';');\n for (let i = 0; i < slots.length; ++i, ++offset) {\n if (offset >= this._specialColors.length) break;\n if (slots[i] === '?') {\n this._onColor.fire([{ type: ColorRequestType.REPORT, index: this._specialColors[offset] }]);\n } else {\n const color = parseColor(slots[i]);\n if (color) {\n this._onColor.fire([{ type: ColorRequestType.SET, index: this._specialColors[offset], color }]);\n }\n }\n }\n return true;\n }\n\n /**\n * OSC 10 ; <xcolor name>|<?> ST - set or query default foreground color\n *\n * @vt: #Y OSC 10 \"Set or query default foreground color\" \"OSC 10 ; Pt BEL\" \"Set or query default foreground color.\"\n * To set the color, the following color specification formats are supported:\n * - `rgb:<red>/<green>/<blue>` for `<red>, <green>, <blue>` in `h | hh | hhh | hhhh`, where\n * `h` is a single hexadecimal digit (case insignificant). The different widths scale\n * from 4 bit (`h`) to 16 bit (`hhhh`) and get converted to 8 bit (`hh`).\n * - `#RGB` - 4 bits per channel, expanded to `#R0G0B0`\n * - `#RRGGBB` - 8 bits per channel\n * - `#RRRGGGBBB` - 12 bits per channel, truncated to `#RRGGBB`\n * - `#RRRRGGGGBBBB` - 16 bits per channel, truncated to `#RRGGBB`\n *\n * **Note:** X11 named colors are currently unsupported.\n *\n * If `Pt` contains `?` instead of a color specification, the terminal\n * returns a sequence with the current default foreground color\n * (use that sequence to restore the color after changes).\n *\n * **Note:** Other than xterm, xterm.js does not support OSC 12 - 19.\n * Therefore stacking multiple `Pt` separated by `;` only works for the first two entries.\n */\n public setOrReportFgColor(data: string): boolean {\n return this._setOrReportSpecialColor(data, 0);\n }\n\n /**\n * OSC 11 ; <xcolor name>|<?> ST - set or query default background color\n *\n * @vt: #Y OSC 11 \"Set or query default background color\" \"OSC 11 ; Pt BEL\" \"Same as OSC 10, but for default background.\"\n */\n public setOrReportBgColor(data: string): boolean {\n return this._setOrReportSpecialColor(data, 1);\n }\n\n /**\n * OSC 12 ; <xcolor name>|<?> ST - set or query default cursor color\n *\n * @vt: #Y OSC 12 \"Set or query default cursor color\" \"OSC 12 ; Pt BEL\" \"Same as OSC 10, but for default cursor color.\"\n */\n public setOrReportCursorColor(data: string): boolean {\n return this._setOrReportSpecialColor(data, 2);\n }\n\n /**\n * OSC 104 ; <num> ST - restore ANSI color <num>\n *\n * @vt: #Y OSC 104 \"Reset ANSI color\" \"OSC 104 ; c BEL\" \"Reset color number `c` to themed color.\"\n * `c` is the color index between 0 and 255. This function restores the default color for `c` as\n * specified by the loaded theme. Any number of `c` parameters may be given.\n * If no parameters are given, the entire indexed color table will be reset.\n */\n public restoreIndexedColor(data: string): boolean {\n if (!data) {\n this._onColor.fire([{ type: ColorRequestType.RESTORE }]);\n return true;\n }\n const event: IColorEvent = [];\n const slots = data.split(';');\n for (let i = 0; i < slots.length; ++i) {\n if (/^\\d+$/.exec(slots[i])) {\n const index = parseInt(slots[i]);\n if (0 <= index && index < 256) {\n event.push({ type: ColorRequestType.RESTORE, index });\n }\n }\n }\n if (event.length) {\n this._onColor.fire(event);\n }\n return true;\n }\n\n /**\n * OSC 110 ST - restore default foreground color\n *\n * @vt: #Y OSC 110 \"Restore default foreground color\" \"OSC 110 BEL\" \"Restore default foreground to themed color.\"\n */\n public restoreFgColor(data: string): boolean {\n this._onColor.fire([{ type: ColorRequestType.RESTORE, index: ColorIndex.FOREGROUND }]);\n return true;\n }\n\n /**\n * OSC 111 ST - restore default background color\n *\n * @vt: #Y OSC 111 \"Restore default background color\" \"OSC 111 BEL\" \"Restore default background to themed color.\"\n */\n public restoreBgColor(data: string): boolean {\n this._onColor.fire([{ type: ColorRequestType.RESTORE, index: ColorIndex.BACKGROUND }]);\n return true;\n }\n\n /**\n * OSC 112 ST - restore default cursor color\n *\n * @vt: #Y OSC 112 \"Restore default cursor color\" \"OSC 112 BEL\" \"Restore default cursor to themed color.\"\n */\n public restoreCursorColor(data: string): boolean {\n this._onColor.fire([{ type: ColorRequestType.RESTORE, index: ColorIndex.CURSOR }]);\n return true;\n }\n\n /**\n * ESC E\n * C1.NEL\n * DEC mnemonic: NEL (https://vt100.net/docs/vt510-rm/NEL)\n * Moves cursor to first position on next line.\n *\n * @vt: #Y C1 NEL \"Next Line\" \"\\x85\" \"Move the cursor to the beginning of the next row.\"\n * @vt: #Y ESC NEL \"Next Line\" \"ESC E\" \"Move the cursor to the beginning of the next row.\"\n */\n public nextLine(): boolean {\n this._activeBuffer.x = 0;\n this.index();\n return true;\n }\n\n /**\n * ESC =\n * DEC mnemonic: DECKPAM (https://vt100.net/docs/vt510-rm/DECKPAM.html)\n * Enables the numeric keypad to send application sequences to the host.\n */\n public keypadApplicationMode(): boolean {\n this._logService.debug('Serial port requested application keypad.');\n this._coreService.decPrivateModes.applicationKeypad = true;\n this._onRequestSyncScrollBar.fire();\n return true;\n }\n\n /**\n * ESC >\n * DEC mnemonic: DECKPNM (https://vt100.net/docs/vt510-rm/DECKPNM.html)\n * Enables the keypad to send numeric characters to the host.\n */\n public keypadNumericMode(): boolean {\n this._logService.debug('Switching back to normal keypad.');\n this._coreService.decPrivateModes.applicationKeypad = false;\n this._onRequestSyncScrollBar.fire();\n return true;\n }\n\n /**\n * ESC % @\n * ESC % G\n * Select default character set. UTF-8 is not supported (string are unicode anyways)\n * therefore ESC % G does the same.\n */\n public selectDefaultCharset(): boolean {\n this._charsetService.setgLevel(0);\n this._charsetService.setgCharset(0, DEFAULT_CHARSET); // US (default)\n return true;\n }\n\n /**\n * ESC ( C\n * Designate G0 Character Set, VT100, ISO 2022.\n * ESC ) C\n * Designate G1 Character Set (ISO 2022, VT100).\n * ESC * C\n * Designate G2 Character Set (ISO 2022, VT220).\n * ESC + C\n * Designate G3 Character Set (ISO 2022, VT220).\n * ESC - C\n * Designate G1 Character Set (VT300).\n * ESC . C\n * Designate G2 Character Set (VT300).\n * ESC / C\n * Designate G3 Character Set (VT300). C = A -> ISO Latin-1 Supplemental. - Supported?\n */\n public selectCharset(collectAndFlag: string): boolean {\n if (collectAndFlag.length !== 2) {\n this.selectDefaultCharset();\n return true;\n }\n if (collectAndFlag[0] === '/') {\n return true; // TODO: Is this supported?\n }\n this._charsetService.setgCharset(GLEVEL[collectAndFlag[0]], CHARSETS[collectAndFlag[1]] || DEFAULT_CHARSET);\n return true;\n }\n\n /**\n * ESC D\n * C1.IND\n * DEC mnemonic: IND (https://vt100.net/docs/vt510-rm/IND.html)\n * Moves the cursor down one line in the same column.\n *\n * @vt: #Y C1 IND \"Index\" \"\\x84\" \"Move the cursor one line down scrolling if needed.\"\n * @vt: #Y ESC IND \"Index\" \"ESC D\" \"Move the cursor one line down scrolling if needed.\"\n */\n public index(): boolean {\n this._restrictCursor();\n this._activeBuffer.y++;\n if (this._activeBuffer.y === this._activeBuffer.scrollBottom + 1) {\n this._activeBuffer.y--;\n this._bufferService.scroll(this._eraseAttrData());\n } else if (this._activeBuffer.y >= this._bufferService.rows) {\n this._activeBuffer.y = this._bufferService.rows - 1;\n }\n this._restrictCursor();\n return true;\n }\n\n /**\n * ESC H\n * C1.HTS\n * DEC mnemonic: HTS (https://vt100.net/docs/vt510-rm/HTS.html)\n * Sets a horizontal tab stop at the column position indicated by\n * the value of the active column when the terminal receives an HTS.\n *\n * @vt: #Y C1 HTS \"Horizontal Tabulation Set\" \"\\x88\" \"Places a tab stop at the current cursor position.\"\n * @vt: #Y ESC HTS \"Horizontal Tabulation Set\" \"ESC H\" \"Places a tab stop at the current cursor position.\"\n */\n public tabSet(): boolean {\n this._activeBuffer.tabs[this._activeBuffer.x] = true;\n return true;\n }\n\n /**\n * ESC M\n * C1.RI\n * DEC mnemonic: HTS\n * Moves the cursor up one line in the same column. If the cursor is at the top margin,\n * the page scrolls down.\n *\n * @vt: #Y ESC IR \"Reverse Index\" \"ESC M\" \"Move the cursor one line up scrolling if needed.\"\n */\n public reverseIndex(): boolean {\n this._restrictCursor();\n if (this._activeBuffer.y === this._activeBuffer.scrollTop) {\n // possibly move the code below to term.reverseScroll();\n // test: echo -ne '\\e[1;1H\\e[44m\\eM\\e[0m'\n // blankLine(true) is xterm/linux behavior\n const scrollRegionHeight = this._activeBuffer.scrollBottom - this._activeBuffer.scrollTop;\n this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase + this._activeBuffer.y, scrollRegionHeight, 1);\n this._activeBuffer.lines.set(this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.getBlankLine(this._eraseAttrData()));\n this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);\n } else {\n this._activeBuffer.y--;\n this._restrictCursor(); // quickfix to not run out of bounds\n }\n return true;\n }\n\n /**\n * ESC c\n * DEC mnemonic: RIS (https://vt100.net/docs/vt510-rm/RIS.html)\n * Reset to initial state.\n */\n public fullReset(): boolean {\n this._parser.reset();\n this._onRequestReset.fire();\n return true;\n }\n\n public reset(): void {\n this._curAttrData = DEFAULT_ATTR_DATA.clone();\n this._eraseAttrDataInternal = DEFAULT_ATTR_DATA.clone();\n }\n\n /**\n * back_color_erase feature for xterm.\n */\n private _eraseAttrData(): IAttributeData {\n this._eraseAttrDataInternal.bg &= ~(Attributes.CM_MASK | 0xFFFFFF);\n this._eraseAttrDataInternal.bg |= this._curAttrData.bg & ~0xFC000000;\n return this._eraseAttrDataInternal;\n }\n\n /**\n * ESC n\n * ESC o\n * ESC |\n * ESC }\n * ESC ~\n * DEC mnemonic: LS (https://vt100.net/docs/vt510-rm/LS.html)\n * When you use a locking shift, the character set remains in GL or GR until\n * you use another locking shift. (partly supported)\n */\n public setgLevel(level: number): boolean {\n this._charsetService.setgLevel(level);\n return true;\n }\n\n /**\n * ESC # 8\n * DEC mnemonic: DECALN (https://vt100.net/docs/vt510-rm/DECALN.html)\n * This control function fills the complete screen area with\n * a test pattern (E) used for adjusting screen alignment.\n *\n * @vt: #Y ESC DECALN \"Screen Alignment Pattern\" \"ESC # 8\" \"Fill viewport with a test pattern (E).\"\n */\n public screenAlignmentPattern(): boolean {\n // prepare cell data\n const cell = new CellData();\n cell.content = 1 << Content.WIDTH_SHIFT | 'E'.charCodeAt(0);\n cell.fg = this._curAttrData.fg;\n cell.bg = this._curAttrData.bg;\n\n\n this._setCursor(0, 0);\n for (let yOffset = 0; yOffset < this._bufferService.rows; ++yOffset) {\n const row = this._activeBuffer.ybase + this._activeBuffer.y + yOffset;\n const line = this._activeBuffer.lines.get(row);\n if (line) {\n line.fill(cell);\n line.isWrapped = false;\n }\n }\n this._dirtyRowService.markAllDirty();\n this._setCursor(0, 0);\n return true;\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IDisposable } from 'common/Types';\n\n/**\n * A base class that can be extended to provide convenience methods for managing the lifecycle of an\n * object and its components.\n */\nexport abstract class Disposable implements IDisposable {\n protected _disposables: IDisposable[] = [];\n protected _isDisposed: boolean = false;\n\n constructor() {\n }\n\n /**\n * Disposes the object, triggering the `dispose` method on all registered IDisposables.\n */\n public dispose(): void {\n this._isDisposed = true;\n for (const d of this._disposables) {\n d.dispose();\n }\n this._disposables.length = 0;\n }\n\n /**\n * Registers a disposable object.\n * @param d The disposable to register.\n * @returns The disposable.\n */\n public register<T extends IDisposable>(d: T): T {\n this._disposables.push(d);\n return d;\n }\n\n /**\n * Unregisters a disposable object if it has been registered, if not do\n * nothing.\n * @param d The disposable to unregister.\n */\n public unregister<T extends IDisposable>(d: T): void {\n const index = this._disposables.indexOf(d);\n if (index !== -1) {\n this._disposables.splice(index, 1);\n }\n }\n}\n\n/**\n * Dispose of all disposables in an array and set its length to 0.\n */\nexport function disposeArray(disposables: IDisposable[]): void {\n for (const d of disposables) {\n d.dispose();\n }\n disposables.length = 0;\n}\n\n/**\n * Creates a disposable that will dispose of an array of disposables when disposed.\n */\nexport function getDisposeArrayDisposable(array: IDisposable[]): IDisposable {\n return { dispose: () => disposeArray(array) };\n}\n","/**\n * Copyright (c) 2016 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\ninterface INavigator {\n userAgent: string;\n language: string;\n platform: string;\n}\n\n// We're declaring a navigator global here as we expect it in all runtimes (node and browser), but\n// we want this module to live in common.\ndeclare const navigator: INavigator;\n\nconst isNode = (typeof navigator === 'undefined') ? true : false;\nconst userAgent = (isNode) ? 'node' : navigator.userAgent;\nconst platform = (isNode) ? 'node' : navigator.platform;\n\nexport const isFirefox = userAgent.includes('Firefox');\nexport const isLegacyEdge = userAgent.includes('Edge');\nexport const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent);\n\n// Find the users platform. We use this to interpret the meta key\n// and ISO third level shifts.\n// http://stackoverflow.com/q/19877924/577598\nexport const isMac = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'].includes(platform);\nexport const isIpad = platform === 'iPad';\nexport const isIphone = platform === 'iPhone';\nexport const isWindows = ['Windows', 'Win16', 'Win32', 'WinCE'].includes(platform);\nexport const isLinux = platform.indexOf('Linux') >= 0;\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nexport type TypedArray = Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;\n\n\n/**\n * polyfill for TypedArray.fill\n * This is needed to support .fill in all safari versions and IE 11.\n */\nexport function fill<T extends TypedArray>(array: T, value: number, start?: number, end?: number): T {\n // all modern engines that support .fill\n if (array.fill) {\n return array.fill(value, start, end) as T;\n }\n return fillFallback(array, value, start, end);\n}\n\nexport function fillFallback<T extends TypedArray>(array: T, value: number, start: number = 0, end: number = array.length): T {\n // safari and IE 11\n // since IE 11 does not support Array.prototype.fill either\n // we cannot use the suggested polyfill from MDN\n // instead we simply fall back to looping\n if (start >= array.length) {\n return array;\n }\n start = (array.length + start) % array.length;\n if (end >= array.length) {\n end = array.length;\n } else {\n end = (array.length + end) % array.length;\n }\n for (let i = start; i < end; ++i) {\n array[i] = value;\n }\n return array;\n}\n\n/**\n * Concat two typed arrays `a` and `b`.\n * Returns a new typed array.\n */\nexport function concat<T extends TypedArray>(a: T, b: T): T {\n const result = new (a.constructor as any)(a.length + b.length);\n result.set(a);\n result.set(b, a.length);\n return result;\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { CHAR_DATA_CODE_INDEX, NULL_CELL_CODE, WHITESPACE_CELL_CODE } from 'common/buffer/Constants';\nimport { IBufferService } from 'common/services/Services';\n\nexport function updateWindowsModeWrappedState(bufferService: IBufferService): void {\n // Winpty does not support wraparound mode which means that lines will never\n // be marked as wrapped. This causes issues for things like copying a line\n // retaining the wrapped new line characters or if consumers are listening\n // in on the data stream.\n //\n // The workaround for this is to listen to every incoming line feed and mark\n // the line as wrapped if the last character in the previous line is not a\n // space. This is certainly not without its problems, but generally on\n // Windows when text reaches the end of the terminal it's likely going to be\n // wrapped.\n const line = bufferService.buffer.lines.get(bufferService.buffer.ybase + bufferService.buffer.y - 1);\n const lastChar = line?.get(bufferService.cols - 1);\n\n const nextLine = bufferService.buffer.lines.get(bufferService.buffer.ybase + bufferService.buffer.y);\n if (nextLine && lastChar) {\n nextLine.isWrapped = (lastChar[CHAR_DATA_CODE_INDEX] !== NULL_CELL_CODE && lastChar[CHAR_DATA_CODE_INDEX] !== WHITESPACE_CELL_CODE);\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IAttributeData, IColorRGB, IExtendedAttrs } from 'common/Types';\nimport { Attributes, FgFlags, BgFlags, UnderlineStyle } from 'common/buffer/Constants';\n\nexport class AttributeData implements IAttributeData {\n public static toColorRGB(value: number): IColorRGB {\n return [\n value >>> Attributes.RED_SHIFT & 255,\n value >>> Attributes.GREEN_SHIFT & 255,\n value & 255\n ];\n }\n\n public static fromColorRGB(value: IColorRGB): number {\n return (value[0] & 255) << Attributes.RED_SHIFT | (value[1] & 255) << Attributes.GREEN_SHIFT | value[2] & 255;\n }\n\n public clone(): IAttributeData {\n const newObj = new AttributeData();\n newObj.fg = this.fg;\n newObj.bg = this.bg;\n newObj.extended = this.extended.clone();\n return newObj;\n }\n\n // data\n public fg = 0;\n public bg = 0;\n public extended = new ExtendedAttrs();\n\n // flags\n public isInverse(): number { return this.fg & FgFlags.INVERSE; }\n public isBold(): number { return this.fg & FgFlags.BOLD; }\n public isUnderline(): number { return this.fg & FgFlags.UNDERLINE; }\n public isBlink(): number { return this.fg & FgFlags.BLINK; }\n public isInvisible(): number { return this.fg & FgFlags.INVISIBLE; }\n public isItalic(): number { return this.bg & BgFlags.ITALIC; }\n public isDim(): number { return this.bg & BgFlags.DIM; }\n public isStrikethrough(): number { return this.fg & FgFlags.STRIKETHROUGH; }\n\n // color modes\n public getFgColorMode(): number { return this.fg & Attributes.CM_MASK; }\n public getBgColorMode(): number { return this.bg & Attributes.CM_MASK; }\n public isFgRGB(): boolean { return (this.fg & Attributes.CM_MASK) === Attributes.CM_RGB; }\n public isBgRGB(): boolean { return (this.bg & Attributes.CM_MASK) === Attributes.CM_RGB; }\n public isFgPalette(): boolean { return (this.fg & Attributes.CM_MASK) === Attributes.CM_P16 || (this.fg & Attributes.CM_MASK) === Attributes.CM_P256; }\n public isBgPalette(): boolean { return (this.bg & Attributes.CM_MASK) === Attributes.CM_P16 || (this.bg & Attributes.CM_MASK) === Attributes.CM_P256; }\n public isFgDefault(): boolean { return (this.fg & Attributes.CM_MASK) === 0; }\n public isBgDefault(): boolean { return (this.bg & Attributes.CM_MASK) === 0; }\n public isAttributeDefault(): boolean { return this.fg === 0 && this.bg === 0; }\n\n // colors\n public getFgColor(): number {\n switch (this.fg & Attributes.CM_MASK) {\n case Attributes.CM_P16:\n case Attributes.CM_P256: return this.fg & Attributes.PCOLOR_MASK;\n case Attributes.CM_RGB: return this.fg & Attributes.RGB_MASK;\n default: return -1; // CM_DEFAULT defaults to -1\n }\n }\n public getBgColor(): number {\n switch (this.bg & Attributes.CM_MASK) {\n case Attributes.CM_P16:\n case Attributes.CM_P256: return this.bg & Attributes.PCOLOR_MASK;\n case Attributes.CM_RGB: return this.bg & Attributes.RGB_MASK;\n default: return -1; // CM_DEFAULT defaults to -1\n }\n }\n\n // extended attrs\n public hasExtendedAttrs(): number {\n return this.bg & BgFlags.HAS_EXTENDED;\n }\n public updateExtended(): void {\n if (this.extended.isEmpty()) {\n this.bg &= ~BgFlags.HAS_EXTENDED;\n } else {\n this.bg |= BgFlags.HAS_EXTENDED;\n }\n }\n public getUnderlineColor(): number {\n if ((this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor) {\n switch (this.extended.underlineColor & Attributes.CM_MASK) {\n case Attributes.CM_P16:\n case Attributes.CM_P256: return this.extended.underlineColor & Attributes.PCOLOR_MASK;\n case Attributes.CM_RGB: return this.extended.underlineColor & Attributes.RGB_MASK;\n default: return this.getFgColor();\n }\n }\n return this.getFgColor();\n }\n public getUnderlineColorMode(): number {\n return (this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor\n ? this.extended.underlineColor & Attributes.CM_MASK\n : this.getFgColorMode();\n }\n public isUnderlineColorRGB(): boolean {\n return (this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor\n ? (this.extended.underlineColor & Attributes.CM_MASK) === Attributes.CM_RGB\n : this.isFgRGB();\n }\n public isUnderlineColorPalette(): boolean {\n return (this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor\n ? (this.extended.underlineColor & Attributes.CM_MASK) === Attributes.CM_P16\n || (this.extended.underlineColor & Attributes.CM_MASK) === Attributes.CM_P256\n : this.isFgPalette();\n }\n public isUnderlineColorDefault(): boolean {\n return (this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor\n ? (this.extended.underlineColor & Attributes.CM_MASK) === 0\n : this.isFgDefault();\n }\n public getUnderlineStyle(): UnderlineStyle {\n return this.fg & FgFlags.UNDERLINE\n ? (this.bg & BgFlags.HAS_EXTENDED ? this.extended.underlineStyle : UnderlineStyle.SINGLE)\n : UnderlineStyle.NONE;\n }\n}\n\n\n/**\n * Extended attributes for a cell.\n * Holds information about different underline styles and color.\n */\nexport class ExtendedAttrs implements IExtendedAttrs {\n constructor(\n // underline style, NONE is empty\n public underlineStyle: UnderlineStyle = UnderlineStyle.NONE,\n // underline color, -1 is empty (same as FG)\n public underlineColor: number = -1\n ) {}\n\n public clone(): IExtendedAttrs {\n return new ExtendedAttrs(this.underlineStyle, this.underlineColor);\n }\n\n /**\n * Convenient method to indicate whether the object holds no additional information,\n * that needs to be persistant in the buffer.\n */\n public isEmpty(): boolean {\n return this.underlineStyle === UnderlineStyle.NONE;\n }\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { CircularList, IInsertEvent } from 'common/CircularList';\nimport { IBuffer, BufferIndex, IBufferStringIterator, IBufferStringIteratorResult } from 'common/buffer/Types';\nimport { IBufferLine, ICellData, IAttributeData, ICharset } from 'common/Types';\nimport { BufferLine, DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';\nimport { CellData } from 'common/buffer/CellData';\nimport { NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_WIDTH, WHITESPACE_CELL_CODE, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX } from 'common/buffer/Constants';\nimport { reflowLargerApplyNewLayout, reflowLargerCreateNewLayout, reflowLargerGetLinesToRemove, reflowSmallerGetNewLineLengths, getWrappedLineTrimmedLength } from 'common/buffer/BufferReflow';\nimport { Marker } from 'common/buffer/Marker';\nimport { IOptionsService, IBufferService } from 'common/services/Services';\nimport { DEFAULT_CHARSET } from 'common/data/Charsets';\nimport { ExtendedAttrs } from 'common/buffer/AttributeData';\n\nexport const MAX_BUFFER_SIZE = 4294967295; // 2^32 - 1\n\n/**\n * This class represents a terminal buffer (an internal state of the terminal), where the\n * following information is stored (in high-level):\n * - text content of this particular buffer\n * - cursor position\n * - scroll position\n */\nexport class Buffer implements IBuffer {\n public lines: CircularList<IBufferLine>;\n public ydisp: number = 0;\n public ybase: number = 0;\n public y: number = 0;\n public x: number = 0;\n public scrollBottom: number;\n public scrollTop: number;\n // TODO: Type me\n public tabs: any;\n public savedY: number = 0;\n public savedX: number = 0;\n public savedCurAttrData = DEFAULT_ATTR_DATA.clone();\n public savedCharset: ICharset | undefined = DEFAULT_CHARSET;\n public markers: Marker[] = [];\n private _nullCell: ICellData = CellData.fromCharData([0, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE]);\n private _whitespaceCell: ICellData = CellData.fromCharData([0, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_WIDTH, WHITESPACE_CELL_CODE]);\n private _cols: number;\n private _rows: number;\n private _isClearing: boolean = false;\n\n constructor(\n private _hasScrollback: boolean,\n private _optionsService: IOptionsService,\n private _bufferService: IBufferService\n ) {\n this._cols = this._bufferService.cols;\n this._rows = this._bufferService.rows;\n this.lines = new CircularList<IBufferLine>(this._getCorrectBufferLength(this._rows));\n this.scrollTop = 0;\n this.scrollBottom = this._rows - 1;\n this.setupTabStops();\n }\n\n public getNullCell(attr?: IAttributeData): ICellData {\n if (attr) {\n this._nullCell.fg = attr.fg;\n this._nullCell.bg = attr.bg;\n this._nullCell.extended = attr.extended;\n } else {\n this._nullCell.fg = 0;\n this._nullCell.bg = 0;\n this._nullCell.extended = new ExtendedAttrs();\n }\n return this._nullCell;\n }\n\n public getWhitespaceCell(attr?: IAttributeData): ICellData {\n if (attr) {\n this._whitespaceCell.fg = attr.fg;\n this._whitespaceCell.bg = attr.bg;\n this._whitespaceCell.extended = attr.extended;\n } else {\n this._whitespaceCell.fg = 0;\n this._whitespaceCell.bg = 0;\n this._whitespaceCell.extended = new ExtendedAttrs();\n }\n return this._whitespaceCell;\n }\n\n public getBlankLine(attr: IAttributeData, isWrapped?: boolean): IBufferLine {\n return new BufferLine(this._bufferService.cols, this.getNullCell(attr), isWrapped);\n }\n\n public get hasScrollback(): boolean {\n return this._hasScrollback && this.lines.maxLength > this._rows;\n }\n\n public get isCursorInViewport(): boolean {\n const absoluteY = this.ybase + this.y;\n const relativeY = absoluteY - this.ydisp;\n return (relativeY >= 0 && relativeY < this._rows);\n }\n\n /**\n * Gets the correct buffer length based on the rows provided, the terminal's\n * scrollback and whether this buffer is flagged to have scrollback or not.\n * @param rows The terminal rows to use in the calculation.\n */\n private _getCorrectBufferLength(rows: number): number {\n if (!this._hasScrollback) {\n return rows;\n }\n\n const correctBufferLength = rows + this._optionsService.rawOptions.scrollback;\n\n return correctBufferLength > MAX_BUFFER_SIZE ? MAX_BUFFER_SIZE : correctBufferLength;\n }\n\n /**\n * Fills the buffer's viewport with blank lines.\n */\n public fillViewportRows(fillAttr?: IAttributeData): void {\n if (this.lines.length === 0) {\n if (fillAttr === undefined) {\n fillAttr = DEFAULT_ATTR_DATA;\n }\n let i = this._rows;\n while (i--) {\n this.lines.push(this.getBlankLine(fillAttr));\n }\n }\n }\n\n /**\n * Clears the buffer to it's initial state, discarding all previous data.\n */\n public clear(): void {\n this.ydisp = 0;\n this.ybase = 0;\n this.y = 0;\n this.x = 0;\n this.lines = new CircularList<IBufferLine>(this._getCorrectBufferLength(this._rows));\n this.scrollTop = 0;\n this.scrollBottom = this._rows - 1;\n this.setupTabStops();\n }\n\n /**\n * Resizes the buffer, adjusting its data accordingly.\n * @param newCols The new number of columns.\n * @param newRows The new number of rows.\n */\n public resize(newCols: number, newRows: number): void {\n // store reference to null cell with default attrs\n const nullCell = this.getNullCell(DEFAULT_ATTR_DATA);\n\n // Increase max length if needed before adjustments to allow space to fill\n // as required.\n const newMaxLength = this._getCorrectBufferLength(newRows);\n if (newMaxLength > this.lines.maxLength) {\n this.lines.maxLength = newMaxLength;\n }\n\n // The following adjustments should only happen if the buffer has been\n // initialized/filled.\n if (this.lines.length > 0) {\n // Deal with columns increasing (reducing needs to happen after reflow)\n if (this._cols < newCols) {\n for (let i = 0; i < this.lines.length; i++) {\n this.lines.get(i)!.resize(newCols, nullCell);\n }\n }\n\n // Resize rows in both directions as needed\n let addToY = 0;\n if (this._rows < newRows) {\n for (let y = this._rows; y < newRows; y++) {\n if (this.lines.length < newRows + this.ybase) {\n if (this._optionsService.rawOptions.windowsMode) {\n // Just add the new missing rows on Windows as conpty reprints the screen with it's\n // view of the world. Once a line enters scrollback for conpty it remains there\n this.lines.push(new BufferLine(newCols, nullCell));\n } else {\n if (this.ybase > 0 && this.lines.length <= this.ybase + this.y + addToY + 1) {\n // There is room above the buffer and there are no empty elements below the line,\n // scroll up\n this.ybase--;\n addToY++;\n if (this.ydisp > 0) {\n // Viewport is at the top of the buffer, must increase downwards\n this.ydisp--;\n }\n } else {\n // Add a blank line if there is no buffer left at the top to scroll to, or if there\n // are blank lines after the cursor\n this.lines.push(new BufferLine(newCols, nullCell));\n }\n }\n }\n }\n } else { // (this._rows >= newRows)\n for (let y = this._rows; y > newRows; y--) {\n if (this.lines.length > newRows + this.ybase) {\n if (this.lines.length > this.ybase + this.y + 1) {\n // The line is a blank line below the cursor, remove it\n this.lines.pop();\n } else {\n // The line is the cursor, scroll down\n this.ybase++;\n this.ydisp++;\n }\n }\n }\n }\n\n // Reduce max length if needed after adjustments, this is done after as it\n // would otherwise cut data from the bottom of the buffer.\n if (newMaxLength < this.lines.maxLength) {\n // Trim from the top of the buffer and adjust ybase and ydisp.\n const amountToTrim = this.lines.length - newMaxLength;\n if (amountToTrim > 0) {\n this.lines.trimStart(amountToTrim);\n this.ybase = Math.max(this.ybase - amountToTrim, 0);\n this.ydisp = Math.max(this.ydisp - amountToTrim, 0);\n this.savedY = Math.max(this.savedY - amountToTrim, 0);\n }\n this.lines.maxLength = newMaxLength;\n }\n\n // Make sure that the cursor stays on screen\n this.x = Math.min(this.x, newCols - 1);\n this.y = Math.min(this.y, newRows - 1);\n if (addToY) {\n this.y += addToY;\n }\n this.savedX = Math.min(this.savedX, newCols - 1);\n\n this.scrollTop = 0;\n }\n\n this.scrollBottom = newRows - 1;\n\n if (this._isReflowEnabled) {\n this._reflow(newCols, newRows);\n\n // Trim the end of the line off if cols shrunk\n if (this._cols > newCols) {\n for (let i = 0; i < this.lines.length; i++) {\n this.lines.get(i)!.resize(newCols, nullCell);\n }\n }\n }\n\n this._cols = newCols;\n this._rows = newRows;\n }\n\n private get _isReflowEnabled(): boolean {\n return this._hasScrollback && !this._optionsService.rawOptions.windowsMode;\n }\n\n private _reflow(newCols: number, newRows: number): void {\n if (this._cols === newCols) {\n return;\n }\n\n // Iterate through rows, ignore the last one as it cannot be wrapped\n if (newCols > this._cols) {\n this._reflowLarger(newCols, newRows);\n } else {\n this._reflowSmaller(newCols, newRows);\n }\n }\n\n private _reflowLarger(newCols: number, newRows: number): void {\n const toRemove: number[] = reflowLargerGetLinesToRemove(this.lines, this._cols, newCols, this.ybase + this.y, this.getNullCell(DEFAULT_ATTR_DATA));\n if (toRemove.length > 0) {\n const newLayoutResult = reflowLargerCreateNewLayout(this.lines, toRemove);\n reflowLargerApplyNewLayout(this.lines, newLayoutResult.layout);\n this._reflowLargerAdjustViewport(newCols, newRows, newLayoutResult.countRemoved);\n }\n }\n\n private _reflowLargerAdjustViewport(newCols: number, newRows: number, countRemoved: number): void {\n const nullCell = this.getNullCell(DEFAULT_ATTR_DATA);\n // Adjust viewport based on number of items removed\n let viewportAdjustments = countRemoved;\n while (viewportAdjustments-- > 0) {\n if (this.ybase === 0) {\n if (this.y > 0) {\n this.y--;\n }\n if (this.lines.length < newRows) {\n // Add an extra row at the bottom of the viewport\n this.lines.push(new BufferLine(newCols, nullCell));\n }\n } else {\n if (this.ydisp === this.ybase) {\n this.ydisp--;\n }\n this.ybase--;\n }\n }\n this.savedY = Math.max(this.savedY - countRemoved, 0);\n }\n\n private _reflowSmaller(newCols: number, newRows: number): void {\n const nullCell = this.getNullCell(DEFAULT_ATTR_DATA);\n // Gather all BufferLines that need to be inserted into the Buffer here so that they can be\n // batched up and only committed once\n const toInsert = [];\n let countToInsert = 0;\n // Go backwards as many lines may be trimmed and this will avoid considering them\n for (let y = this.lines.length - 1; y >= 0; y--) {\n // Check whether this line is a problem\n let nextLine = this.lines.get(y) as BufferLine;\n if (!nextLine || !nextLine.isWrapped && nextLine.getTrimmedLength() <= newCols) {\n continue;\n }\n\n // Gather wrapped lines and adjust y to be the starting line\n const wrappedLines: BufferLine[] = [nextLine];\n while (nextLine.isWrapped && y > 0) {\n nextLine = this.lines.get(--y) as BufferLine;\n wrappedLines.unshift(nextLine);\n }\n\n // If these lines contain the cursor don't touch them, the program will handle fixing up\n // wrapped lines with the cursor\n const absoluteY = this.ybase + this.y;\n if (absoluteY >= y && absoluteY < y + wrappedLines.length) {\n continue;\n }\n\n const lastLineLength = wrappedLines[wrappedLines.length - 1].getTrimmedLength();\n const destLineLengths = reflowSmallerGetNewLineLengths(wrappedLines, this._cols, newCols);\n const linesToAdd = destLineLengths.length - wrappedLines.length;\n let trimmedLines: number;\n if (this.ybase === 0 && this.y !== this.lines.length - 1) {\n // If the top section of the buffer is not yet filled\n trimmedLines = Math.max(0, this.y - this.lines.maxLength + linesToAdd);\n } else {\n trimmedLines = Math.max(0, this.lines.length - this.lines.maxLength + linesToAdd);\n }\n\n // Add the new lines\n const newLines: BufferLine[] = [];\n for (let i = 0; i < linesToAdd; i++) {\n const newLine = this.getBlankLine(DEFAULT_ATTR_DATA, true) as BufferLine;\n newLines.push(newLine);\n }\n if (newLines.length > 0) {\n toInsert.push({\n // countToInsert here gets the actual index, taking into account other inserted items.\n // using this we can iterate through the list forwards\n start: y + wrappedLines.length + countToInsert,\n newLines\n });\n countToInsert += newLines.length;\n }\n wrappedLines.push(...newLines);\n\n // Copy buffer data to new locations, this needs to happen backwards to do in-place\n let destLineIndex = destLineLengths.length - 1; // Math.floor(cellsNeeded / newCols);\n let destCol = destLineLengths[destLineIndex]; // cellsNeeded % newCols;\n if (destCol === 0) {\n destLineIndex--;\n destCol = destLineLengths[destLineIndex];\n }\n let srcLineIndex = wrappedLines.length - linesToAdd - 1;\n let srcCol = lastLineLength;\n while (srcLineIndex >= 0) {\n const cellsToCopy = Math.min(srcCol, destCol);\n if (wrappedLines[destLineIndex] === undefined) {\n // Sanity check that the line exists, this has been known to fail for an unknown reason\n // which would stop the reflow from happening if an exception would throw.\n break;\n }\n wrappedLines[destLineIndex].copyCellsFrom(wrappedLines[srcLineIndex], srcCol - cellsToCopy, destCol - cellsToCopy, cellsToCopy, true);\n destCol -= cellsToCopy;\n if (destCol === 0) {\n destLineIndex--;\n destCol = destLineLengths[destLineIndex];\n }\n srcCol -= cellsToCopy;\n if (srcCol === 0) {\n srcLineIndex--;\n const wrappedLinesIndex = Math.max(srcLineIndex, 0);\n srcCol = getWrappedLineTrimmedLength(wrappedLines, wrappedLinesIndex, this._cols);\n }\n }\n\n // Null out the end of the line ends if a wide character wrapped to the following line\n for (let i = 0; i < wrappedLines.length; i++) {\n if (destLineLengths[i] < newCols) {\n wrappedLines[i].setCell(destLineLengths[i], nullCell);\n }\n }\n\n // Adjust viewport as needed\n let viewportAdjustments = linesToAdd - trimmedLines;\n while (viewportAdjustments-- > 0) {\n if (this.ybase === 0) {\n if (this.y < newRows - 1) {\n this.y++;\n this.lines.pop();\n } else {\n this.ybase++;\n this.ydisp++;\n }\n } else {\n // Ensure ybase does not exceed its maximum value\n if (this.ybase < Math.min(this.lines.maxLength, this.lines.length + countToInsert) - newRows) {\n if (this.ybase === this.ydisp) {\n this.ydisp++;\n }\n this.ybase++;\n }\n }\n }\n this.savedY = Math.min(this.savedY + linesToAdd, this.ybase + newRows - 1);\n }\n\n // Rearrange lines in the buffer if there are any insertions, this is done at the end rather\n // than earlier so that it's a single O(n) pass through the buffer, instead of O(n^2) from many\n // costly calls to CircularList.splice.\n if (toInsert.length > 0) {\n // Record buffer insert events and then play them back backwards so that the indexes are\n // correct\n const insertEvents: IInsertEvent[] = [];\n\n // Record original lines so they don't get overridden when we rearrange the list\n const originalLines: BufferLine[] = [];\n for (let i = 0; i < this.lines.length; i++) {\n originalLines.push(this.lines.get(i) as BufferLine);\n }\n const originalLinesLength = this.lines.length;\n\n let originalLineIndex = originalLinesLength - 1;\n let nextToInsertIndex = 0;\n let nextToInsert = toInsert[nextToInsertIndex];\n this.lines.length = Math.min(this.lines.maxLength, this.lines.length + countToInsert);\n let countInsertedSoFar = 0;\n for (let i = Math.min(this.lines.maxLength - 1, originalLinesLength + countToInsert - 1); i >= 0; i--) {\n if (nextToInsert && nextToInsert.start > originalLineIndex + countInsertedSoFar) {\n // Insert extra lines here, adjusting i as needed\n for (let nextI = nextToInsert.newLines.length - 1; nextI >= 0; nextI--) {\n this.lines.set(i--, nextToInsert.newLines[nextI]);\n }\n i++;\n\n // Create insert events for later\n insertEvents.push({\n index: originalLineIndex + 1,\n amount: nextToInsert.newLines.length\n });\n\n countInsertedSoFar += nextToInsert.newLines.length;\n nextToInsert = toInsert[++nextToInsertIndex];\n } else {\n this.lines.set(i, originalLines[originalLineIndex--]);\n }\n }\n\n // Update markers\n let insertCountEmitted = 0;\n for (let i = insertEvents.length - 1; i >= 0; i--) {\n insertEvents[i].index += insertCountEmitted;\n this.lines.onInsertEmitter.fire(insertEvents[i]);\n insertCountEmitted += insertEvents[i].amount;\n }\n const amountToTrim = Math.max(0, originalLinesLength + countToInsert - this.lines.maxLength);\n if (amountToTrim > 0) {\n this.lines.onTrimEmitter.fire(amountToTrim);\n }\n }\n }\n\n // private _reflowSmallerGetLinesNeeded()\n\n /**\n * Translates a string index back to a BufferIndex.\n * To get the correct buffer position the string must start at `startCol` 0\n * (default in translateBufferLineToString).\n * The method also works on wrapped line strings given rows were not trimmed.\n * The method operates on the CharData string length, there are no\n * additional content or boundary checks. Therefore the string and the buffer\n * should not be altered in between.\n * TODO: respect trim flag after fixing #1685\n * @param lineIndex line index the string was retrieved from\n * @param stringIndex index within the string\n * @param startCol column offset the string was retrieved from\n */\n public stringIndexToBufferIndex(lineIndex: number, stringIndex: number, trimRight: boolean = false): BufferIndex {\n while (stringIndex) {\n const line = this.lines.get(lineIndex);\n if (!line) {\n return [-1, -1];\n }\n const length = (trimRight) ? line.getTrimmedLength() : line.length;\n for (let i = 0; i < length; ++i) {\n if (line.get(i)[CHAR_DATA_WIDTH_INDEX]) {\n // empty cells report a string length of 0, but get replaced\n // with a whitespace in translateToString, thus replace with 1\n stringIndex -= line.get(i)[CHAR_DATA_CHAR_INDEX].length || 1;\n }\n if (stringIndex < 0) {\n return [lineIndex, i];\n }\n }\n lineIndex++;\n }\n return [lineIndex, 0];\n }\n\n /**\n * Translates a buffer line to a string, with optional start and end columns.\n * Wide characters will count as two columns in the resulting string. This\n * function is useful for getting the actual text underneath the raw selection\n * position.\n * @param line The line being translated.\n * @param trimRight Whether to trim whitespace to the right.\n * @param startCol The column to start at.\n * @param endCol The column to end at.\n */\n public translateBufferLineToString(lineIndex: number, trimRight: boolean, startCol: number = 0, endCol?: number): string {\n const line = this.lines.get(lineIndex);\n if (!line) {\n return '';\n }\n return line.translateToString(trimRight, startCol, endCol);\n }\n\n public getWrappedRangeForLine(y: number): { first: number, last: number } {\n let first = y;\n let last = y;\n // Scan upwards for wrapped lines\n while (first > 0 && this.lines.get(first)!.isWrapped) {\n first--;\n }\n // Scan downwards for wrapped lines\n while (last + 1 < this.lines.length && this.lines.get(last + 1)!.isWrapped) {\n last++;\n }\n return { first, last };\n }\n\n /**\n * Setup the tab stops.\n * @param i The index to start setting up tab stops from.\n */\n public setupTabStops(i?: number): void {\n if (i !== null && i !== undefined) {\n if (!this.tabs[i]) {\n i = this.prevStop(i);\n }\n } else {\n this.tabs = {};\n i = 0;\n }\n\n for (; i < this._cols; i += this._optionsService.rawOptions.tabStopWidth) {\n this.tabs[i] = true;\n }\n }\n\n /**\n * Move the cursor to the previous tab stop from the given position (default is current).\n * @param x The position to move the cursor to the previous tab stop.\n */\n public prevStop(x?: number): number {\n if (x === null || x === undefined) {\n x = this.x;\n }\n while (!this.tabs[--x] && x > 0);\n return x >= this._cols ? this._cols - 1 : x < 0 ? 0 : x;\n }\n\n /**\n * Move the cursor one tab stop forward from the given position (default is current).\n * @param x The position to move the cursor one tab stop forward.\n */\n public nextStop(x?: number): number {\n if (x === null || x === undefined) {\n x = this.x;\n }\n while (!this.tabs[++x] && x < this._cols);\n return x >= this._cols ? this._cols - 1 : x < 0 ? 0 : x;\n }\n\n public clearMarkers(y?: number): void {\n this._isClearing = true;\n if (y !== undefined) {\n for (let i = 0; i < this.markers.length; i++) {\n if (this.markers[i].line === y) {\n this.markers[i].dispose();\n this.markers.splice(i--, 1);\n }\n }\n } else {\n for (const marker of this.markers) {\n marker.dispose();\n }\n this.markers = [];\n }\n this._isClearing = false;\n }\n\n public addMarker(y: number): Marker {\n const marker = new Marker(y);\n this.markers.push(marker);\n marker.register(this.lines.onTrim(amount => {\n marker.line -= amount;\n // The marker should be disposed when the line is trimmed from the buffer\n if (marker.line < 0) {\n marker.dispose();\n }\n }));\n marker.register(this.lines.onInsert(event => {\n if (marker.line >= event.index) {\n marker.line += event.amount;\n }\n }));\n marker.register(this.lines.onDelete(event => {\n // Delete the marker if it's within the range\n if (marker.line >= event.index && marker.line < event.index + event.amount) {\n marker.dispose();\n }\n\n // Shift the marker if it's after the deleted range\n if (marker.line > event.index) {\n marker.line -= event.amount;\n }\n }));\n marker.register(marker.onDispose(() => this._removeMarker(marker)));\n return marker;\n }\n\n private _removeMarker(marker: Marker): void {\n if (!this._isClearing) {\n this.markers.splice(this.markers.indexOf(marker), 1);\n }\n }\n\n public iterator(trimRight: boolean, startIndex?: number, endIndex?: number, startOverscan?: number, endOverscan?: number): IBufferStringIterator {\n return new BufferStringIterator(this, trimRight, startIndex, endIndex, startOverscan, endOverscan);\n }\n}\n\n/**\n * Iterator to get unwrapped content strings from the buffer.\n * The iterator returns at least the string data between the borders\n * `startIndex` and `endIndex` (exclusive) and will expand the lines\n * by `startOverscan` to the top and by `endOverscan` to the bottom,\n * if no new line was found in between.\n * It will never read/return string data beyond `startIndex - startOverscan`\n * or `endIndex + endOverscan`. Therefore the first and last line might be truncated.\n * It is possible to always get the full string for the first and last line as well\n * by setting the overscan values to the actual buffer length. This not recommended\n * since it might return the whole buffer within a single string in a worst case scenario.\n */\nexport class BufferStringIterator implements IBufferStringIterator {\n private _current: number;\n\n constructor (\n private _buffer: IBuffer,\n private _trimRight: boolean,\n private _startIndex: number = 0,\n private _endIndex: number = _buffer.lines.length,\n private _startOverscan: number = 0,\n private _endOverscan: number = 0\n ) {\n if (this._startIndex < 0) {\n this._startIndex = 0;\n }\n if (this._endIndex > this._buffer.lines.length) {\n this._endIndex = this._buffer.lines.length;\n }\n this._current = this._startIndex;\n }\n\n public hasNext(): boolean {\n return this._current < this._endIndex;\n }\n\n public next(): IBufferStringIteratorResult {\n const range = this._buffer.getWrappedRangeForLine(this._current);\n // limit search window to overscan value at both borders\n if (range.first < this._startIndex - this._startOverscan) {\n range.first = this._startIndex - this._startOverscan;\n }\n if (range.last > this._endIndex + this._endOverscan) {\n range.last = this._endIndex + this._endOverscan;\n }\n // limit to current buffer length\n range.first = Math.max(range.first, 0);\n range.last = Math.min(range.last, this._buffer.lines.length);\n let content = '';\n for (let i = range.first; i <= range.last; ++i) {\n content += this._buffer.translateBufferLineToString(i, this._trimRight);\n }\n this._current = range.last + 1;\n return { range, content };\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { CharData, IBufferLine, ICellData, IAttributeData, IExtendedAttrs } from 'common/Types';\nimport { stringFromCodePoint } from 'common/input/TextDecoder';\nimport { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_ATTR_INDEX, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, WHITESPACE_CELL_CHAR, Content, BgFlags } from 'common/buffer/Constants';\nimport { CellData } from 'common/buffer/CellData';\nimport { AttributeData, ExtendedAttrs } from 'common/buffer/AttributeData';\n\n/**\n * buffer memory layout:\n *\n * | uint32_t | uint32_t | uint32_t |\n * | `content` | `FG` | `BG` |\n * | wcwidth(2) comb(1) codepoint(21) | flags(8) R(8) G(8) B(8) | flags(8) R(8) G(8) B(8) |\n */\n\n\n/** typed array slots taken by one cell */\nconst CELL_SIZE = 3;\n\n/**\n * Cell member indices.\n *\n * Direct access:\n * `content = data[column * CELL_SIZE + Cell.CONTENT];`\n * `fg = data[column * CELL_SIZE + Cell.FG];`\n * `bg = data[column * CELL_SIZE + Cell.BG];`\n */\nconst enum Cell {\n CONTENT = 0,\n FG = 1, // currently simply holds all known attrs\n BG = 2 // currently unused\n}\n\nexport const DEFAULT_ATTR_DATA = Object.freeze(new AttributeData());\n\n/**\n * Typed array based bufferline implementation.\n *\n * There are 2 ways to insert data into the cell buffer:\n * - `setCellFromCodepoint` + `addCodepointToCell`\n * Use these for data that is already UTF32.\n * Used during normal input in `InputHandler` for faster buffer access.\n * - `setCell`\n * This method takes a CellData object and stores the data in the buffer.\n * Use `CellData.fromCharData` to create the CellData object (e.g. from JS string).\n *\n * To retrieve data from the buffer use either one of the primitive methods\n * (if only one particular value is needed) or `loadCell`. For `loadCell` in a loop\n * memory allocs / GC pressure can be greatly reduced by reusing the CellData object.\n */\nexport class BufferLine implements IBufferLine {\n protected _data: Uint32Array;\n protected _combined: {[index: number]: string} = {};\n protected _extendedAttrs: {[index: number]: ExtendedAttrs} = {};\n public length: number;\n\n constructor(cols: number, fillCellData?: ICellData, public isWrapped: boolean = false) {\n this._data = new Uint32Array(cols * CELL_SIZE);\n const cell = fillCellData || CellData.fromCharData([0, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE]);\n for (let i = 0; i < cols; ++i) {\n this.setCell(i, cell);\n }\n this.length = cols;\n }\n\n /**\n * Get cell data CharData.\n * @deprecated\n */\n public get(index: number): CharData {\n const content = this._data[index * CELL_SIZE + Cell.CONTENT];\n const cp = content & Content.CODEPOINT_MASK;\n return [\n this._data[index * CELL_SIZE + Cell.FG],\n (content & Content.IS_COMBINED_MASK)\n ? this._combined[index]\n : (cp) ? stringFromCodePoint(cp) : '',\n content >> Content.WIDTH_SHIFT,\n (content & Content.IS_COMBINED_MASK)\n ? this._combined[index].charCodeAt(this._combined[index].length - 1)\n : cp\n ];\n }\n\n /**\n * Set cell data from CharData.\n * @deprecated\n */\n public set(index: number, value: CharData): void {\n this._data[index * CELL_SIZE + Cell.FG] = value[CHAR_DATA_ATTR_INDEX];\n if (value[CHAR_DATA_CHAR_INDEX].length > 1) {\n this._combined[index] = value[1];\n this._data[index * CELL_SIZE + Cell.CONTENT] = index | Content.IS_COMBINED_MASK | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);\n } else {\n this._data[index * CELL_SIZE + Cell.CONTENT] = value[CHAR_DATA_CHAR_INDEX].charCodeAt(0) | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);\n }\n }\n\n /**\n * primitive getters\n * use these when only one value is needed, otherwise use `loadCell`\n */\n public getWidth(index: number): number {\n return this._data[index * CELL_SIZE + Cell.CONTENT] >> Content.WIDTH_SHIFT;\n }\n\n /** Test whether content has width. */\n public hasWidth(index: number): number {\n return this._data[index * CELL_SIZE + Cell.CONTENT] & Content.WIDTH_MASK;\n }\n\n /** Get FG cell component. */\n public getFg(index: number): number {\n return this._data[index * CELL_SIZE + Cell.FG];\n }\n\n /** Get BG cell component. */\n public getBg(index: number): number {\n return this._data[index * CELL_SIZE + Cell.BG];\n }\n\n /**\n * Test whether contains any chars.\n * Basically an empty has no content, but other cells might differ in FG/BG\n * from real empty cells.\n * */\n public hasContent(index: number): number {\n return this._data[index * CELL_SIZE + Cell.CONTENT] & Content.HAS_CONTENT_MASK;\n }\n\n /**\n * Get codepoint of the cell.\n * To be in line with `code` in CharData this either returns\n * a single UTF32 codepoint or the last codepoint of a combined string.\n */\n public getCodePoint(index: number): number {\n const content = this._data[index * CELL_SIZE + Cell.CONTENT];\n if (content & Content.IS_COMBINED_MASK) {\n return this._combined[index].charCodeAt(this._combined[index].length - 1);\n }\n return content & Content.CODEPOINT_MASK;\n }\n\n /** Test whether the cell contains a combined string. */\n public isCombined(index: number): number {\n return this._data[index * CELL_SIZE + Cell.CONTENT] & Content.IS_COMBINED_MASK;\n }\n\n /** Returns the string content of the cell. */\n public getString(index: number): string {\n const content = this._data[index * CELL_SIZE + Cell.CONTENT];\n if (content & Content.IS_COMBINED_MASK) {\n return this._combined[index];\n }\n if (content & Content.CODEPOINT_MASK) {\n return stringFromCodePoint(content & Content.CODEPOINT_MASK);\n }\n // return empty string for empty cells\n return '';\n }\n\n /**\n * Load data at `index` into `cell`. This is used to access cells in a way that's more friendly\n * to GC as it significantly reduced the amount of new objects/references needed.\n */\n public loadCell(index: number, cell: ICellData): ICellData {\n const startIndex = index * CELL_SIZE;\n cell.content = this._data[startIndex + Cell.CONTENT];\n cell.fg = this._data[startIndex + Cell.FG];\n cell.bg = this._data[startIndex + Cell.BG];\n if (cell.content & Content.IS_COMBINED_MASK) {\n cell.combinedData = this._combined[index];\n }\n if (cell.bg & BgFlags.HAS_EXTENDED) {\n cell.extended = this._extendedAttrs[index];\n }\n return cell;\n }\n\n /**\n * Set data at `index` to `cell`.\n */\n public setCell(index: number, cell: ICellData): void {\n if (cell.content & Content.IS_COMBINED_MASK) {\n this._combined[index] = cell.combinedData;\n }\n if (cell.bg & BgFlags.HAS_EXTENDED) {\n this._extendedAttrs[index] = cell.extended;\n }\n this._data[index * CELL_SIZE + Cell.CONTENT] = cell.content;\n this._data[index * CELL_SIZE + Cell.FG] = cell.fg;\n this._data[index * CELL_SIZE + Cell.BG] = cell.bg;\n }\n\n /**\n * Set cell data from input handler.\n * Since the input handler see the incoming chars as UTF32 codepoints,\n * it gets an optimized access method.\n */\n public setCellFromCodePoint(index: number, codePoint: number, width: number, fg: number, bg: number, eAttrs: IExtendedAttrs): void {\n if (bg & BgFlags.HAS_EXTENDED) {\n this._extendedAttrs[index] = eAttrs;\n }\n this._data[index * CELL_SIZE + Cell.CONTENT] = codePoint | (width << Content.WIDTH_SHIFT);\n this._data[index * CELL_SIZE + Cell.FG] = fg;\n this._data[index * CELL_SIZE + Cell.BG] = bg;\n }\n\n /**\n * Add a codepoint to a cell from input handler.\n * During input stage combining chars with a width of 0 follow and stack\n * onto a leading char. Since we already set the attrs\n * by the previous `setDataFromCodePoint` call, we can omit it here.\n */\n public addCodepointToCell(index: number, codePoint: number): void {\n let content = this._data[index * CELL_SIZE + Cell.CONTENT];\n if (content & Content.IS_COMBINED_MASK) {\n // we already have a combined string, simply add\n this._combined[index] += stringFromCodePoint(codePoint);\n } else {\n if (content & Content.CODEPOINT_MASK) {\n // normal case for combining chars:\n // - move current leading char + new one into combined string\n // - set combined flag\n this._combined[index] = stringFromCodePoint(content & Content.CODEPOINT_MASK) + stringFromCodePoint(codePoint);\n content &= ~Content.CODEPOINT_MASK; // set codepoint in buffer to 0\n content |= Content.IS_COMBINED_MASK;\n } else {\n // should not happen - we actually have no data in the cell yet\n // simply set the data in the cell buffer with a width of 1\n content = codePoint | (1 << Content.WIDTH_SHIFT);\n }\n this._data[index * CELL_SIZE + Cell.CONTENT] = content;\n }\n }\n\n public insertCells(pos: number, n: number, fillCellData: ICellData, eraseAttr?: IAttributeData): void {\n pos %= this.length;\n\n // handle fullwidth at pos: reset cell one to the left if pos is second cell of a wide char\n if (pos && this.getWidth(pos - 1) === 2) {\n this.setCellFromCodePoint(pos - 1, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());\n }\n\n if (n < this.length - pos) {\n const cell = new CellData();\n for (let i = this.length - pos - n - 1; i >= 0; --i) {\n this.setCell(pos + n + i, this.loadCell(pos + i, cell));\n }\n for (let i = 0; i < n; ++i) {\n this.setCell(pos + i, fillCellData);\n }\n } else {\n for (let i = pos; i < this.length; ++i) {\n this.setCell(i, fillCellData);\n }\n }\n\n // handle fullwidth at line end: reset last cell if it is first cell of a wide char\n if (this.getWidth(this.length - 1) === 2) {\n this.setCellFromCodePoint(this.length - 1, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());\n }\n }\n\n public deleteCells(pos: number, n: number, fillCellData: ICellData, eraseAttr?: IAttributeData): void {\n pos %= this.length;\n if (n < this.length - pos) {\n const cell = new CellData();\n for (let i = 0; i < this.length - pos - n; ++i) {\n this.setCell(pos + i, this.loadCell(pos + n + i, cell));\n }\n for (let i = this.length - n; i < this.length; ++i) {\n this.setCell(i, fillCellData);\n }\n } else {\n for (let i = pos; i < this.length; ++i) {\n this.setCell(i, fillCellData);\n }\n }\n\n // handle fullwidth at pos:\n // - reset pos-1 if wide char\n // - reset pos if width==0 (previous second cell of a wide char)\n if (pos && this.getWidth(pos - 1) === 2) {\n this.setCellFromCodePoint(pos - 1, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());\n }\n if (this.getWidth(pos) === 0 && !this.hasContent(pos)) {\n this.setCellFromCodePoint(pos, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());\n }\n }\n\n public replaceCells(start: number, end: number, fillCellData: ICellData, eraseAttr?: IAttributeData): void {\n // handle fullwidth at start: reset cell one to the left if start is second cell of a wide char\n if (start && this.getWidth(start - 1) === 2) {\n this.setCellFromCodePoint(start - 1, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());\n }\n // handle fullwidth at last cell + 1: reset to empty cell if it is second part of a wide char\n if (end < this.length && this.getWidth(end - 1) === 2) {\n this.setCellFromCodePoint(end, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());\n }\n\n while (start < end && start < this.length) {\n this.setCell(start++, fillCellData);\n }\n }\n\n public resize(cols: number, fillCellData: ICellData): void {\n if (cols === this.length) {\n return;\n }\n if (cols > this.length) {\n const data = new Uint32Array(cols * CELL_SIZE);\n if (this.length) {\n if (cols * CELL_SIZE < this._data.length) {\n data.set(this._data.subarray(0, cols * CELL_SIZE));\n } else {\n data.set(this._data);\n }\n }\n this._data = data;\n for (let i = this.length; i < cols; ++i) {\n this.setCell(i, fillCellData);\n }\n } else {\n if (cols) {\n const data = new Uint32Array(cols * CELL_SIZE);\n data.set(this._data.subarray(0, cols * CELL_SIZE));\n this._data = data;\n // Remove any cut off combined data, FIXME: repeat this for extended attrs\n const keys = Object.keys(this._combined);\n for (let i = 0; i < keys.length; i++) {\n const key = parseInt(keys[i], 10);\n if (key >= cols) {\n delete this._combined[key];\n }\n }\n } else {\n this._data = new Uint32Array(0);\n this._combined = {};\n }\n }\n this.length = cols;\n }\n\n /** fill a line with fillCharData */\n public fill(fillCellData: ICellData): void {\n this._combined = {};\n this._extendedAttrs = {};\n for (let i = 0; i < this.length; ++i) {\n this.setCell(i, fillCellData);\n }\n }\n\n /** alter to a full copy of line */\n public copyFrom(line: BufferLine): void {\n if (this.length !== line.length) {\n this._data = new Uint32Array(line._data);\n } else {\n // use high speed copy if lengths are equal\n this._data.set(line._data);\n }\n this.length = line.length;\n this._combined = {};\n for (const el in line._combined) {\n this._combined[el] = line._combined[el];\n }\n this._extendedAttrs = {};\n for (const el in line._extendedAttrs) {\n this._extendedAttrs[el] = line._extendedAttrs[el];\n }\n this.isWrapped = line.isWrapped;\n }\n\n /** create a new clone */\n public clone(): IBufferLine {\n const newLine = new BufferLine(0);\n newLine._data = new Uint32Array(this._data);\n newLine.length = this.length;\n for (const el in this._combined) {\n newLine._combined[el] = this._combined[el];\n }\n for (const el in this._extendedAttrs) {\n newLine._extendedAttrs[el] = this._extendedAttrs[el];\n }\n newLine.isWrapped = this.isWrapped;\n return newLine;\n }\n\n public getTrimmedLength(): number {\n for (let i = this.length - 1; i >= 0; --i) {\n if ((this._data[i * CELL_SIZE + Cell.CONTENT] & Content.HAS_CONTENT_MASK)) {\n return i + (this._data[i * CELL_SIZE + Cell.CONTENT] >> Content.WIDTH_SHIFT);\n }\n }\n return 0;\n }\n\n public copyCellsFrom(src: BufferLine, srcCol: number, destCol: number, length: number, applyInReverse: boolean): void {\n const srcData = src._data;\n if (applyInReverse) {\n for (let cell = length - 1; cell >= 0; cell--) {\n for (let i = 0; i < CELL_SIZE; i++) {\n this._data[(destCol + cell) * CELL_SIZE + i] = srcData[(srcCol + cell) * CELL_SIZE + i];\n }\n }\n } else {\n for (let cell = 0; cell < length; cell++) {\n for (let i = 0; i < CELL_SIZE; i++) {\n this._data[(destCol + cell) * CELL_SIZE + i] = srcData[(srcCol + cell) * CELL_SIZE + i];\n }\n }\n }\n\n // Move any combined data over as needed, FIXME: repeat for extended attrs\n const srcCombinedKeys = Object.keys(src._combined);\n for (let i = 0; i < srcCombinedKeys.length; i++) {\n const key = parseInt(srcCombinedKeys[i], 10);\n if (key >= srcCol) {\n this._combined[key - srcCol + destCol] = src._combined[key];\n }\n }\n }\n\n public translateToString(trimRight: boolean = false, startCol: number = 0, endCol: number = this.length): string {\n if (trimRight) {\n endCol = Math.min(endCol, this.getTrimmedLength());\n }\n let result = '';\n while (startCol < endCol) {\n const content = this._data[startCol * CELL_SIZE + Cell.CONTENT];\n const cp = content & Content.CODEPOINT_MASK;\n result += (content & Content.IS_COMBINED_MASK) ? this._combined[startCol] : (cp) ? stringFromCodePoint(cp) : WHITESPACE_CELL_CHAR;\n startCol += (content >> Content.WIDTH_SHIFT) || 1; // always advance by 1\n }\n return result;\n }\n}\n","/**\n * Copyright (c) 2021 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBufferRange } from 'xterm';\n\nexport function getRangeLength(range: IBufferRange, bufferCols: number): number {\n if (range.start.y > range.end.y) {\n throw new Error(`Buffer range end (${range.end.x}, ${range.end.y}) cannot be before start (${range.start.x}, ${range.start.y})`);\n }\n return bufferCols * (range.end.y - range.start.y) + (range.end.x - range.start.x + 1);\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { BufferLine } from 'common/buffer/BufferLine';\nimport { CircularList } from 'common/CircularList';\nimport { IBufferLine, ICellData } from 'common/Types';\n\nexport interface INewLayoutResult {\n layout: number[];\n countRemoved: number;\n}\n\n/**\n * Evaluates and returns indexes to be removed after a reflow larger occurs. Lines will be removed\n * when a wrapped line unwraps.\n * @param lines The buffer lines.\n * @param newCols The columns after resize.\n */\nexport function reflowLargerGetLinesToRemove(lines: CircularList<IBufferLine>, oldCols: number, newCols: number, bufferAbsoluteY: number, nullCell: ICellData): number[] {\n // Gather all BufferLines that need to be removed from the Buffer here so that they can be\n // batched up and only committed once\n const toRemove: number[] = [];\n\n for (let y = 0; y < lines.length - 1; y++) {\n // Check if this row is wrapped\n let i = y;\n let nextLine = lines.get(++i) as BufferLine;\n if (!nextLine.isWrapped) {\n continue;\n }\n\n // Check how many lines it's wrapped for\n const wrappedLines: BufferLine[] = [lines.get(y) as BufferLine];\n while (i < lines.length && nextLine.isWrapped) {\n wrappedLines.push(nextLine);\n nextLine = lines.get(++i) as BufferLine;\n }\n\n // If these lines contain the cursor don't touch them, the program will handle fixing up wrapped\n // lines with the cursor\n if (bufferAbsoluteY >= y && bufferAbsoluteY < i) {\n y += wrappedLines.length - 1;\n continue;\n }\n\n // Copy buffer data to new locations\n let destLineIndex = 0;\n let destCol = getWrappedLineTrimmedLength(wrappedLines, destLineIndex, oldCols);\n let srcLineIndex = 1;\n let srcCol = 0;\n while (srcLineIndex < wrappedLines.length) {\n const srcTrimmedTineLength = getWrappedLineTrimmedLength(wrappedLines, srcLineIndex, oldCols);\n const srcRemainingCells = srcTrimmedTineLength - srcCol;\n const destRemainingCells = newCols - destCol;\n const cellsToCopy = Math.min(srcRemainingCells, destRemainingCells);\n\n wrappedLines[destLineIndex].copyCellsFrom(wrappedLines[srcLineIndex], srcCol, destCol, cellsToCopy, false);\n\n destCol += cellsToCopy;\n if (destCol === newCols) {\n destLineIndex++;\n destCol = 0;\n }\n srcCol += cellsToCopy;\n if (srcCol === srcTrimmedTineLength) {\n srcLineIndex++;\n srcCol = 0;\n }\n\n // Make sure the last cell isn't wide, if it is copy it to the current dest\n if (destCol === 0 && destLineIndex !== 0) {\n if (wrappedLines[destLineIndex - 1].getWidth(newCols - 1) === 2) {\n wrappedLines[destLineIndex].copyCellsFrom(wrappedLines[destLineIndex - 1], newCols - 1, destCol++, 1, false);\n // Null out the end of the last row\n wrappedLines[destLineIndex - 1].setCell(newCols - 1, nullCell);\n }\n }\n }\n\n // Clear out remaining cells or fragments could remain;\n wrappedLines[destLineIndex].replaceCells(destCol, newCols, nullCell);\n\n // Work backwards and remove any rows at the end that only contain null cells\n let countToRemove = 0;\n for (let i = wrappedLines.length - 1; i > 0; i--) {\n if (i > destLineIndex || wrappedLines[i].getTrimmedLength() === 0) {\n countToRemove++;\n } else {\n break;\n }\n }\n\n if (countToRemove > 0) {\n toRemove.push(y + wrappedLines.length - countToRemove); // index\n toRemove.push(countToRemove);\n }\n\n y += wrappedLines.length - 1;\n }\n return toRemove;\n}\n\n/**\n * Creates and return the new layout for lines given an array of indexes to be removed.\n * @param lines The buffer lines.\n * @param toRemove The indexes to remove.\n */\nexport function reflowLargerCreateNewLayout(lines: CircularList<IBufferLine>, toRemove: number[]): INewLayoutResult {\n const layout: number[] = [];\n // First iterate through the list and get the actual indexes to use for rows\n let nextToRemoveIndex = 0;\n let nextToRemoveStart = toRemove[nextToRemoveIndex];\n let countRemovedSoFar = 0;\n for (let i = 0; i < lines.length; i++) {\n if (nextToRemoveStart === i) {\n const countToRemove = toRemove[++nextToRemoveIndex];\n\n // Tell markers that there was a deletion\n lines.onDeleteEmitter.fire({\n index: i - countRemovedSoFar,\n amount: countToRemove\n });\n\n i += countToRemove - 1;\n countRemovedSoFar += countToRemove;\n nextToRemoveStart = toRemove[++nextToRemoveIndex];\n } else {\n layout.push(i);\n }\n }\n return {\n layout,\n countRemoved: countRemovedSoFar\n };\n}\n\n/**\n * Applies a new layout to the buffer. This essentially does the same as many splice calls but it's\n * done all at once in a single iteration through the list since splice is very expensive.\n * @param lines The buffer lines.\n * @param newLayout The new layout to apply.\n */\nexport function reflowLargerApplyNewLayout(lines: CircularList<IBufferLine>, newLayout: number[]): void {\n // Record original lines so they don't get overridden when we rearrange the list\n const newLayoutLines: BufferLine[] = [];\n for (let i = 0; i < newLayout.length; i++) {\n newLayoutLines.push(lines.get(newLayout[i]) as BufferLine);\n }\n\n // Rearrange the list\n for (let i = 0; i < newLayoutLines.length; i++) {\n lines.set(i, newLayoutLines[i]);\n }\n lines.length = newLayout.length;\n}\n\n/**\n * Gets the new line lengths for a given wrapped line. The purpose of this function it to pre-\n * compute the wrapping points since wide characters may need to be wrapped onto the following line.\n * This function will return an array of numbers of where each line wraps to, the resulting array\n * will only contain the values `newCols` (when the line does not end with a wide character) and\n * `newCols - 1` (when the line does end with a wide character), except for the last value which\n * will contain the remaining items to fill the line.\n *\n * Calling this with a `newCols` value of `1` will lock up.\n *\n * @param wrappedLines The wrapped lines to evaluate.\n * @param oldCols The columns before resize.\n * @param newCols The columns after resize.\n */\nexport function reflowSmallerGetNewLineLengths(wrappedLines: BufferLine[], oldCols: number, newCols: number): number[] {\n const newLineLengths: number[] = [];\n const cellsNeeded = wrappedLines.map((l, i) => getWrappedLineTrimmedLength(wrappedLines, i, oldCols)).reduce((p, c) => p + c);\n\n // Use srcCol and srcLine to find the new wrapping point, use that to get the cellsAvailable and\n // linesNeeded\n let srcCol = 0;\n let srcLine = 0;\n let cellsAvailable = 0;\n while (cellsAvailable < cellsNeeded) {\n if (cellsNeeded - cellsAvailable < newCols) {\n // Add the final line and exit the loop\n newLineLengths.push(cellsNeeded - cellsAvailable);\n break;\n }\n srcCol += newCols;\n const oldTrimmedLength = getWrappedLineTrimmedLength(wrappedLines, srcLine, oldCols);\n if (srcCol > oldTrimmedLength) {\n srcCol -= oldTrimmedLength;\n srcLine++;\n }\n const endsWithWide = wrappedLines[srcLine].getWidth(srcCol - 1) === 2;\n if (endsWithWide) {\n srcCol--;\n }\n const lineLength = endsWithWide ? newCols - 1 : newCols;\n newLineLengths.push(lineLength);\n cellsAvailable += lineLength;\n }\n\n return newLineLengths;\n}\n\nexport function getWrappedLineTrimmedLength(lines: BufferLine[], i: number, cols: number): number {\n // If this is the last row in the wrapped line, get the actual trimmed length\n if (i === lines.length - 1) {\n return lines[i].getTrimmedLength();\n }\n // Detect whether the following line starts with a wide character and the end of the current line\n // is null, if so then we can be pretty sure the null character should be excluded from the line\n // length]\n const endsInNull = !(lines[i].hasContent(cols - 1)) && lines[i].getWidth(cols - 1) === 1;\n const followingLineStartsWithWide = lines[i + 1].getWidth(0) === 2;\n if (endsInNull && followingLineStartsWithWide) {\n return cols - 1;\n }\n return cols;\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBuffer, IBufferSet } from 'common/buffer/Types';\nimport { IAttributeData } from 'common/Types';\nimport { Buffer } from 'common/buffer/Buffer';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { IOptionsService, IBufferService } from 'common/services/Services';\nimport { Disposable } from 'common/Lifecycle';\n\n/**\n * The BufferSet represents the set of two buffers used by xterm terminals (normal and alt) and\n * provides also utilities for working with them.\n */\nexport class BufferSet extends Disposable implements IBufferSet {\n private _normal!: Buffer;\n private _alt!: Buffer;\n private _activeBuffer!: Buffer;\n\n private _onBufferActivate = this.register(new EventEmitter<{activeBuffer: IBuffer, inactiveBuffer: IBuffer}>());\n public get onBufferActivate(): IEvent<{activeBuffer: IBuffer, inactiveBuffer: IBuffer}> { return this._onBufferActivate.event; }\n\n /**\n * Create a new BufferSet for the given terminal.\n * @param _terminal - The terminal the BufferSet will belong to\n */\n constructor(\n private readonly _optionsService: IOptionsService,\n private readonly _bufferService: IBufferService\n ) {\n super();\n this.reset();\n }\n\n public reset(): void {\n this._normal = new Buffer(true, this._optionsService, this._bufferService);\n this._normal.fillViewportRows();\n\n // The alt buffer should never have scrollback.\n // See http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer\n this._alt = new Buffer(false, this._optionsService, this._bufferService);\n this._activeBuffer = this._normal;\n this._onBufferActivate.fire({\n activeBuffer: this._normal,\n inactiveBuffer: this._alt\n });\n\n this.setupTabStops();\n }\n\n /**\n * Returns the alt Buffer of the BufferSet\n */\n public get alt(): Buffer {\n return this._alt;\n }\n\n /**\n * Returns the normal Buffer of the BufferSet\n */\n public get active(): Buffer {\n return this._activeBuffer;\n }\n\n /**\n * Returns the currently active Buffer of the BufferSet\n */\n public get normal(): Buffer {\n return this._normal;\n }\n\n /**\n * Sets the normal Buffer of the BufferSet as its currently active Buffer\n */\n public activateNormalBuffer(): void {\n if (this._activeBuffer === this._normal) {\n return;\n }\n this._normal.x = this._alt.x;\n this._normal.y = this._alt.y;\n // The alt buffer should always be cleared when we switch to the normal\n // buffer. This frees up memory since the alt buffer should always be new\n // when activated.\n this._alt.clear();\n this._activeBuffer = this._normal;\n this._onBufferActivate.fire({\n activeBuffer: this._normal,\n inactiveBuffer: this._alt\n });\n }\n\n /**\n * Sets the alt Buffer of the BufferSet as its currently active Buffer\n */\n public activateAltBuffer(fillAttr?: IAttributeData): void {\n if (this._activeBuffer === this._alt) {\n return;\n }\n // Since the alt buffer is always cleared when the normal buffer is\n // activated, we want to fill it when switching to it.\n this._alt.fillViewportRows(fillAttr);\n this._alt.x = this._normal.x;\n this._alt.y = this._normal.y;\n this._activeBuffer = this._alt;\n this._onBufferActivate.fire({\n activeBuffer: this._alt,\n inactiveBuffer: this._normal\n });\n }\n\n /**\n * Resizes both normal and alt buffers, adjusting their data accordingly.\n * @param newCols The new number of columns.\n * @param newRows The new number of rows.\n */\n public resize(newCols: number, newRows: number): void {\n this._normal.resize(newCols, newRows);\n this._alt.resize(newCols, newRows);\n }\n\n /**\n * Setup the tab stops.\n * @param i The index to start setting up tab stops from.\n */\n public setupTabStops(i?: number): void {\n this._normal.setupTabStops(i);\n this._alt.setupTabStops(i);\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { CharData, ICellData, IExtendedAttrs } from 'common/Types';\nimport { stringFromCodePoint } from 'common/input/TextDecoder';\nimport { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_ATTR_INDEX, Content } from 'common/buffer/Constants';\nimport { AttributeData, ExtendedAttrs } from 'common/buffer/AttributeData';\n\n/**\n * CellData - represents a single Cell in the terminal buffer.\n */\nexport class CellData extends AttributeData implements ICellData {\n /** Helper to create CellData from CharData. */\n public static fromCharData(value: CharData): CellData {\n const obj = new CellData();\n obj.setFromCharData(value);\n return obj;\n }\n /** Primitives from terminal buffer. */\n public content = 0;\n public fg = 0;\n public bg = 0;\n public extended: IExtendedAttrs = new ExtendedAttrs();\n public combinedData = '';\n /** Whether cell contains a combined string. */\n public isCombined(): number {\n return this.content & Content.IS_COMBINED_MASK;\n }\n /** Width of the cell. */\n public getWidth(): number {\n return this.content >> Content.WIDTH_SHIFT;\n }\n /** JS string of the content. */\n public getChars(): string {\n if (this.content & Content.IS_COMBINED_MASK) {\n return this.combinedData;\n }\n if (this.content & Content.CODEPOINT_MASK) {\n return stringFromCodePoint(this.content & Content.CODEPOINT_MASK);\n }\n return '';\n }\n /**\n * Codepoint of cell\n * Note this returns the UTF32 codepoint of single chars,\n * if content is a combined string it returns the codepoint\n * of the last char in string to be in line with code in CharData.\n * */\n public getCode(): number {\n return (this.isCombined())\n ? this.combinedData.charCodeAt(this.combinedData.length - 1)\n : this.content & Content.CODEPOINT_MASK;\n }\n /** Set data from CharData */\n public setFromCharData(value: CharData): void {\n this.fg = value[CHAR_DATA_ATTR_INDEX];\n this.bg = 0;\n let combined = false;\n // surrogates and combined strings need special treatment\n if (value[CHAR_DATA_CHAR_INDEX].length > 2) {\n combined = true;\n }\n else if (value[CHAR_DATA_CHAR_INDEX].length === 2) {\n const code = value[CHAR_DATA_CHAR_INDEX].charCodeAt(0);\n // if the 2-char string is a surrogate create single codepoint\n // everything else is combined\n if (0xD800 <= code && code <= 0xDBFF) {\n const second = value[CHAR_DATA_CHAR_INDEX].charCodeAt(1);\n if (0xDC00 <= second && second <= 0xDFFF) {\n this.content = ((code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000) | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);\n }\n else {\n combined = true;\n }\n }\n else {\n combined = true;\n }\n }\n else {\n this.content = value[CHAR_DATA_CHAR_INDEX].charCodeAt(0) | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);\n }\n if (combined) {\n this.combinedData = value[CHAR_DATA_CHAR_INDEX];\n this.content = Content.IS_COMBINED_MASK | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);\n }\n }\n /** Get data as CharData. */\n public getAsCharData(): CharData {\n return [this.fg, this.getChars(), this.getWidth(), this.getCode()];\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nexport const DEFAULT_COLOR = 256;\nexport const DEFAULT_ATTR = (0 << 18) | (DEFAULT_COLOR << 9) | (256 << 0);\n\nexport const CHAR_DATA_ATTR_INDEX = 0;\nexport const CHAR_DATA_CHAR_INDEX = 1;\nexport const CHAR_DATA_WIDTH_INDEX = 2;\nexport const CHAR_DATA_CODE_INDEX = 3;\n\n/**\n * Null cell - a real empty cell (containing nothing).\n * Note that code should always be 0 for a null cell as\n * several test condition of the buffer line rely on this.\n */\nexport const NULL_CELL_CHAR = '';\nexport const NULL_CELL_WIDTH = 1;\nexport const NULL_CELL_CODE = 0;\n\n/**\n * Whitespace cell.\n * This is meant as a replacement for empty cells when needed\n * during rendering lines to preserve correct aligment.\n */\nexport const WHITESPACE_CELL_CHAR = ' ';\nexport const WHITESPACE_CELL_WIDTH = 1;\nexport const WHITESPACE_CELL_CODE = 32;\n\n/**\n * Bitmasks for accessing data in `content`.\n */\nexport const enum Content {\n /**\n * bit 1..21 codepoint, max allowed in UTF32 is 0x10FFFF (21 bits taken)\n * read: `codepoint = content & Content.codepointMask;`\n * write: `content |= codepoint & Content.codepointMask;`\n * shortcut if precondition `codepoint <= 0x10FFFF` is met:\n * `content |= codepoint;`\n */\n CODEPOINT_MASK = 0x1FFFFF,\n\n /**\n * bit 22 flag indication whether a cell contains combined content\n * read: `isCombined = content & Content.isCombined;`\n * set: `content |= Content.isCombined;`\n * clear: `content &= ~Content.isCombined;`\n */\n IS_COMBINED_MASK = 0x200000, // 1 << 21\n\n /**\n * bit 1..22 mask to check whether a cell contains any string data\n * we need to check for codepoint and isCombined bits to see\n * whether a cell contains anything\n * read: `isEmpty = !(content & Content.hasContent)`\n */\n HAS_CONTENT_MASK = 0x3FFFFF,\n\n /**\n * bit 23..24 wcwidth value of cell, takes 2 bits (ranges from 0..2)\n * read: `width = (content & Content.widthMask) >> Content.widthShift;`\n * `hasWidth = content & Content.widthMask;`\n * as long as wcwidth is highest value in `content`:\n * `width = content >> Content.widthShift;`\n * write: `content |= (width << Content.widthShift) & Content.widthMask;`\n * shortcut if precondition `0 <= width <= 3` is met:\n * `content |= width << Content.widthShift;`\n */\n WIDTH_MASK = 0xC00000, // 3 << 22\n WIDTH_SHIFT = 22\n}\n\nexport const enum Attributes {\n /**\n * bit 1..8 blue in RGB, color in P256 and P16\n */\n BLUE_MASK = 0xFF,\n BLUE_SHIFT = 0,\n PCOLOR_MASK = 0xFF,\n PCOLOR_SHIFT = 0,\n\n /**\n * bit 9..16 green in RGB\n */\n GREEN_MASK = 0xFF00,\n GREEN_SHIFT = 8,\n\n /**\n * bit 17..24 red in RGB\n */\n RED_MASK = 0xFF0000,\n RED_SHIFT = 16,\n\n /**\n * bit 25..26 color mode: DEFAULT (0) | P16 (1) | P256 (2) | RGB (3)\n */\n CM_MASK = 0x3000000,\n CM_DEFAULT = 0,\n CM_P16 = 0x1000000,\n CM_P256 = 0x2000000,\n CM_RGB = 0x3000000,\n\n /**\n * bit 1..24 RGB room\n */\n RGB_MASK = 0xFFFFFF\n}\n\nexport const enum FgFlags {\n /**\n * bit 27..32\n */\n INVERSE = 0x4000000,\n BOLD = 0x8000000,\n UNDERLINE = 0x10000000,\n BLINK = 0x20000000,\n INVISIBLE = 0x40000000,\n STRIKETHROUGH = 0x80000000,\n}\n\nexport const enum BgFlags {\n /**\n * bit 27..32 (upper 3 unused)\n */\n ITALIC = 0x4000000,\n DIM = 0x8000000,\n HAS_EXTENDED = 0x10000000\n}\n\nexport const enum UnderlineStyle {\n NONE = 0,\n SINGLE = 1,\n DOUBLE = 2,\n CURLY = 3,\n DOTTED = 4,\n DASHED = 5\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { Disposable } from 'common/Lifecycle';\nimport { IMarker } from 'common/Types';\n\nexport class Marker extends Disposable implements IMarker {\n private static _nextId = 1;\n\n private _id: number = Marker._nextId++;\n public isDisposed: boolean = false;\n\n public get id(): number { return this._id; }\n\n private _onDispose = new EventEmitter<void>();\n public get onDispose(): IEvent<void> { return this._onDispose.event; }\n\n constructor(\n public line: number\n ) {\n super();\n }\n\n public dispose(): void {\n if (this.isDisposed) {\n return;\n }\n this.isDisposed = true;\n this.line = -1;\n // Emit before super.dispose such that dispose listeners get a change to react\n this._onDispose.fire();\n super.dispose();\n }\n}\n","/**\n * Copyright (c) 2016 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ICharset } from 'common/Types';\n\n/**\n * The character sets supported by the terminal. These enable several languages\n * to be represented within the terminal with only 8-bit encoding. See ISO 2022\n * for a discussion on character sets. Only VT100 character sets are supported.\n */\nexport const CHARSETS: { [key: string]: ICharset | undefined } = {};\n\n/**\n * The default character set, US.\n */\nexport const DEFAULT_CHARSET: ICharset | undefined = CHARSETS['B'];\n\n/**\n * DEC Special Character and Line Drawing Set.\n * Reference: http://vt100.net/docs/vt102-ug/table5-13.html\n * A lot of curses apps use this if they see TERM=xterm.\n * testing: echo -e '\\e(0a\\e(B'\n * The xterm output sometimes seems to conflict with the\n * reference above. xterm seems in line with the reference\n * when running vttest however.\n * The table below now uses xterm's output from vttest.\n */\nCHARSETS['0'] = {\n '`': '\\u25c6', // '◆'\n 'a': '\\u2592', // '▒'\n 'b': '\\u2409', // '␉' (HT)\n 'c': '\\u240c', // '␌' (FF)\n 'd': '\\u240d', // '␍' (CR)\n 'e': '\\u240a', // '␊' (LF)\n 'f': '\\u00b0', // '°'\n 'g': '\\u00b1', // '±'\n 'h': '\\u2424', // '␤' (NL)\n 'i': '\\u240b', // '␋' (VT)\n 'j': '\\u2518', // '┘'\n 'k': '\\u2510', // '┐'\n 'l': '\\u250c', // '┌'\n 'm': '\\u2514', // '└'\n 'n': '\\u253c', // '┼'\n 'o': '\\u23ba', // '⎺'\n 'p': '\\u23bb', // '⎻'\n 'q': '\\u2500', // '─'\n 'r': '\\u23bc', // '⎼'\n 's': '\\u23bd', // '⎽'\n 't': '\\u251c', // '├'\n 'u': '\\u2524', // '┤'\n 'v': '\\u2534', // '┴'\n 'w': '\\u252c', // '┬'\n 'x': '\\u2502', // '│'\n 'y': '\\u2264', // '≤'\n 'z': '\\u2265', // '≥'\n '{': '\\u03c0', // 'π'\n '|': '\\u2260', // '≠'\n '}': '\\u00a3', // '£'\n '~': '\\u00b7' // '·'\n};\n\n/**\n * British character set\n * ESC (A\n * Reference: http://vt100.net/docs/vt220-rm/table2-5.html\n */\nCHARSETS['A'] = {\n '#': '£'\n};\n\n/**\n * United States character set\n * ESC (B\n */\nCHARSETS['B'] = undefined;\n\n/**\n * Dutch character set\n * ESC (4\n * Reference: http://vt100.net/docs/vt220-rm/table2-6.html\n */\nCHARSETS['4'] = {\n '#': '£',\n '@': '¾',\n '[': 'ij',\n '\\\\': '½',\n ']': '|',\n '{': '¨',\n '|': 'f',\n '}': '¼',\n '~': '´'\n};\n\n/**\n * Finnish character set\n * ESC (C or ESC (5\n * Reference: http://vt100.net/docs/vt220-rm/table2-7.html\n */\nCHARSETS['C'] =\nCHARSETS['5'] = {\n '[': 'Ä',\n '\\\\': 'Ö',\n ']': 'Å',\n '^': 'Ü',\n '`': 'é',\n '{': 'ä',\n '|': 'ö',\n '}': 'å',\n '~': 'ü'\n};\n\n/**\n * French character set\n * ESC (R\n * Reference: http://vt100.net/docs/vt220-rm/table2-8.html\n */\nCHARSETS['R'] = {\n '#': '£',\n '@': 'à',\n '[': '°',\n '\\\\': 'ç',\n ']': '§',\n '{': 'é',\n '|': 'ù',\n '}': 'è',\n '~': '¨'\n};\n\n/**\n * French Canadian character set\n * ESC (Q\n * Reference: http://vt100.net/docs/vt220-rm/table2-9.html\n */\nCHARSETS['Q'] = {\n '@': 'à',\n '[': 'â',\n '\\\\': 'ç',\n ']': 'ê',\n '^': 'î',\n '`': 'ô',\n '{': 'é',\n '|': 'ù',\n '}': 'è',\n '~': 'û'\n};\n\n/**\n * German character set\n * ESC (K\n * Reference: http://vt100.net/docs/vt220-rm/table2-10.html\n */\nCHARSETS['K'] = {\n '@': '§',\n '[': 'Ä',\n '\\\\': 'Ö',\n ']': 'Ü',\n '{': 'ä',\n '|': 'ö',\n '}': 'ü',\n '~': 'ß'\n};\n\n/**\n * Italian character set\n * ESC (Y\n * Reference: http://vt100.net/docs/vt220-rm/table2-11.html\n */\nCHARSETS['Y'] = {\n '#': '£',\n '@': '§',\n '[': '°',\n '\\\\': 'ç',\n ']': 'é',\n '`': 'ù',\n '{': 'à',\n '|': 'ò',\n '}': 'è',\n '~': 'ì'\n};\n\n/**\n * Norwegian/Danish character set\n * ESC (E or ESC (6\n * Reference: http://vt100.net/docs/vt220-rm/table2-12.html\n */\nCHARSETS['E'] =\nCHARSETS['6'] = {\n '@': 'Ä',\n '[': 'Æ',\n '\\\\': 'Ø',\n ']': 'Å',\n '^': 'Ü',\n '`': 'ä',\n '{': 'æ',\n '|': 'ø',\n '}': 'å',\n '~': 'ü'\n};\n\n/**\n * Spanish character set\n * ESC (Z\n * Reference: http://vt100.net/docs/vt220-rm/table2-13.html\n */\nCHARSETS['Z'] = {\n '#': '£',\n '@': '§',\n '[': '¡',\n '\\\\': 'Ñ',\n ']': '¿',\n '{': '°',\n '|': 'ñ',\n '}': 'ç'\n};\n\n/**\n * Swedish character set\n * ESC (H or ESC (7\n * Reference: http://vt100.net/docs/vt220-rm/table2-14.html\n */\nCHARSETS['H'] =\nCHARSETS['7'] = {\n '@': 'É',\n '[': 'Ä',\n '\\\\': 'Ö',\n ']': 'Å',\n '^': 'Ü',\n '`': 'é',\n '{': 'ä',\n '|': 'ö',\n '}': 'å',\n '~': 'ü'\n};\n\n/**\n * Swiss character set\n * ESC (=\n * Reference: http://vt100.net/docs/vt220-rm/table2-15.html\n */\nCHARSETS['='] = {\n '#': 'ù',\n '@': 'à',\n '[': 'é',\n '\\\\': 'ç',\n ']': 'ê',\n '^': 'î',\n // eslint-disable-next-line @typescript-eslint/naming-convention\n '_': 'è',\n '`': 'ô',\n '{': 'ä',\n '|': 'ö',\n '}': 'ü',\n '~': 'û'\n};\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\n/**\n * C0 control codes\n * See = https://en.wikipedia.org/wiki/C0_and_C1_control_codes\n */\nexport namespace C0 {\n /** Null (Caret = ^@, C = \\0) */\n export const NUL = '\\x00';\n /** Start of Heading (Caret = ^A) */\n export const SOH = '\\x01';\n /** Start of Text (Caret = ^B) */\n export const STX = '\\x02';\n /** End of Text (Caret = ^C) */\n export const ETX = '\\x03';\n /** End of Transmission (Caret = ^D) */\n export const EOT = '\\x04';\n /** Enquiry (Caret = ^E) */\n export const ENQ = '\\x05';\n /** Acknowledge (Caret = ^F) */\n export const ACK = '\\x06';\n /** Bell (Caret = ^G, C = \\a) */\n export const BEL = '\\x07';\n /** Backspace (Caret = ^H, C = \\b) */\n export const BS = '\\x08';\n /** Character Tabulation, Horizontal Tabulation (Caret = ^I, C = \\t) */\n export const HT = '\\x09';\n /** Line Feed (Caret = ^J, C = \\n) */\n export const LF = '\\x0a';\n /** Line Tabulation, Vertical Tabulation (Caret = ^K, C = \\v) */\n export const VT = '\\x0b';\n /** Form Feed (Caret = ^L, C = \\f) */\n export const FF = '\\x0c';\n /** Carriage Return (Caret = ^M, C = \\r) */\n export const CR = '\\x0d';\n /** Shift Out (Caret = ^N) */\n export const SO = '\\x0e';\n /** Shift In (Caret = ^O) */\n export const SI = '\\x0f';\n /** Data Link Escape (Caret = ^P) */\n export const DLE = '\\x10';\n /** Device Control One (XON) (Caret = ^Q) */\n export const DC1 = '\\x11';\n /** Device Control Two (Caret = ^R) */\n export const DC2 = '\\x12';\n /** Device Control Three (XOFF) (Caret = ^S) */\n export const DC3 = '\\x13';\n /** Device Control Four (Caret = ^T) */\n export const DC4 = '\\x14';\n /** Negative Acknowledge (Caret = ^U) */\n export const NAK = '\\x15';\n /** Synchronous Idle (Caret = ^V) */\n export const SYN = '\\x16';\n /** End of Transmission Block (Caret = ^W) */\n export const ETB = '\\x17';\n /** Cancel (Caret = ^X) */\n export const CAN = '\\x18';\n /** End of Medium (Caret = ^Y) */\n export const EM = '\\x19';\n /** Substitute (Caret = ^Z) */\n export const SUB = '\\x1a';\n /** Escape (Caret = ^[, C = \\e) */\n export const ESC = '\\x1b';\n /** File Separator (Caret = ^\\) */\n export const FS = '\\x1c';\n /** Group Separator (Caret = ^]) */\n export const GS = '\\x1d';\n /** Record Separator (Caret = ^^) */\n export const RS = '\\x1e';\n /** Unit Separator (Caret = ^_) */\n export const US = '\\x1f';\n /** Space */\n export const SP = '\\x20';\n /** Delete (Caret = ^?) */\n export const DEL = '\\x7f';\n}\n\n/**\n * C1 control codes\n * See = https://en.wikipedia.org/wiki/C0_and_C1_control_codes\n */\nexport namespace C1 {\n /** padding character */\n export const PAD = '\\x80';\n /** High Octet Preset */\n export const HOP = '\\x81';\n /** Break Permitted Here */\n export const BPH = '\\x82';\n /** No Break Here */\n export const NBH = '\\x83';\n /** Index */\n export const IND = '\\x84';\n /** Next Line */\n export const NEL = '\\x85';\n /** Start of Selected Area */\n export const SSA = '\\x86';\n /** End of Selected Area */\n export const ESA = '\\x87';\n /** Horizontal Tabulation Set */\n export const HTS = '\\x88';\n /** Horizontal Tabulation With Justification */\n export const HTJ = '\\x89';\n /** Vertical Tabulation Set */\n export const VTS = '\\x8a';\n /** Partial Line Down */\n export const PLD = '\\x8b';\n /** Partial Line Up */\n export const PLU = '\\x8c';\n /** Reverse Index */\n export const RI = '\\x8d';\n /** Single-Shift 2 */\n export const SS2 = '\\x8e';\n /** Single-Shift 3 */\n export const SS3 = '\\x8f';\n /** Device Control String */\n export const DCS = '\\x90';\n /** Private Use 1 */\n export const PU1 = '\\x91';\n /** Private Use 2 */\n export const PU2 = '\\x92';\n /** Set Transmit State */\n export const STS = '\\x93';\n /** Destructive backspace, intended to eliminate ambiguity about meaning of BS. */\n export const CCH = '\\x94';\n /** Message Waiting */\n export const MW = '\\x95';\n /** Start of Protected Area */\n export const SPA = '\\x96';\n /** End of Protected Area */\n export const EPA = '\\x97';\n /** Start of String */\n export const SOS = '\\x98';\n /** Single Graphic Character Introducer */\n export const SGCI = '\\x99';\n /** Single Character Introducer */\n export const SCI = '\\x9a';\n /** Control Sequence Introducer */\n export const CSI = '\\x9b';\n /** String Terminator */\n export const ST = '\\x9c';\n /** Operating System Command */\n export const OSC = '\\x9d';\n /** Privacy Message */\n export const PM = '\\x9e';\n /** Application Program Command */\n export const APC = '\\x9f';\n}\n","/**\n * Copyright (c) 2014 The xterm.js authors. All rights reserved.\n * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)\n * @license MIT\n */\n\nimport { IKeyboardEvent, IKeyboardResult, KeyboardResultType } from 'common/Types';\nimport { C0 } from 'common/data/EscapeSequences';\n\n// reg + shift key mappings for digits and special chars\nconst KEYCODE_KEY_MAPPINGS: { [key: number]: [string, string]} = {\n // digits 0-9\n 48: ['0', ')'],\n 49: ['1', '!'],\n 50: ['2', '@'],\n 51: ['3', '#'],\n 52: ['4', '$'],\n 53: ['5', '%'],\n 54: ['6', '^'],\n 55: ['7', '&'],\n 56: ['8', '*'],\n 57: ['9', '('],\n\n // special chars\n 186: [';', ':'],\n 187: ['=', '+'],\n 188: [',', '<'],\n 189: ['-', '_'],\n 190: ['.', '>'],\n 191: ['/', '?'],\n 192: ['`', '~'],\n 219: ['[', '{'],\n 220: ['\\\\', '|'],\n 221: [']', '}'],\n 222: ['\\'', '\"']\n};\n\nexport function evaluateKeyboardEvent(\n ev: IKeyboardEvent,\n applicationCursorMode: boolean,\n isMac: boolean,\n macOptionIsMeta: boolean\n): IKeyboardResult {\n const result: IKeyboardResult = {\n type: KeyboardResultType.SEND_KEY,\n // Whether to cancel event propagation (NOTE: this may not be needed since the event is\n // canceled at the end of keyDown\n cancel: false,\n // The new key even to emit\n key: undefined\n };\n const modifiers = (ev.shiftKey ? 1 : 0) | (ev.altKey ? 2 : 0) | (ev.ctrlKey ? 4 : 0) | (ev.metaKey ? 8 : 0);\n switch (ev.keyCode) {\n case 0:\n if (ev.key === 'UIKeyInputUpArrow') {\n if (applicationCursorMode) {\n result.key = C0.ESC + 'OA';\n } else {\n result.key = C0.ESC + '[A';\n }\n }\n else if (ev.key === 'UIKeyInputLeftArrow') {\n if (applicationCursorMode) {\n result.key = C0.ESC + 'OD';\n } else {\n result.key = C0.ESC + '[D';\n }\n }\n else if (ev.key === 'UIKeyInputRightArrow') {\n if (applicationCursorMode) {\n result.key = C0.ESC + 'OC';\n } else {\n result.key = C0.ESC + '[C';\n }\n }\n else if (ev.key === 'UIKeyInputDownArrow') {\n if (applicationCursorMode) {\n result.key = C0.ESC + 'OB';\n } else {\n result.key = C0.ESC + '[B';\n }\n }\n break;\n case 8:\n // backspace\n if (ev.shiftKey) {\n result.key = C0.BS; // ^H\n break;\n } else if (ev.altKey) {\n result.key = C0.ESC + C0.DEL; // \\e ^?\n break;\n }\n result.key = C0.DEL; // ^?\n break;\n case 9:\n // tab\n if (ev.shiftKey) {\n result.key = C0.ESC + '[Z';\n break;\n }\n result.key = C0.HT;\n result.cancel = true;\n break;\n case 13:\n // return/enter\n result.key = ev.altKey ? C0.ESC + C0.CR : C0.CR;\n result.cancel = true;\n break;\n case 27:\n // escape\n result.key = C0.ESC;\n if (ev.altKey) {\n result.key = C0.ESC + C0.ESC;\n }\n result.cancel = true;\n break;\n case 37:\n // left-arrow\n if (ev.metaKey) {\n break;\n }\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'D';\n // HACK: Make Alt + left-arrow behave like Ctrl + left-arrow: move one word backwards\n // http://unix.stackexchange.com/a/108106\n // macOS uses different escape sequences than linux\n if (result.key === C0.ESC + '[1;3D') {\n result.key = C0.ESC + (isMac ? 'b' : '[1;5D');\n }\n } else if (applicationCursorMode) {\n result.key = C0.ESC + 'OD';\n } else {\n result.key = C0.ESC + '[D';\n }\n break;\n case 39:\n // right-arrow\n if (ev.metaKey) {\n break;\n }\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'C';\n // HACK: Make Alt + right-arrow behave like Ctrl + right-arrow: move one word forward\n // http://unix.stackexchange.com/a/108106\n // macOS uses different escape sequences than linux\n if (result.key === C0.ESC + '[1;3C') {\n result.key = C0.ESC + (isMac ? 'f' : '[1;5C');\n }\n } else if (applicationCursorMode) {\n result.key = C0.ESC + 'OC';\n } else {\n result.key = C0.ESC + '[C';\n }\n break;\n case 38:\n // up-arrow\n if (ev.metaKey) {\n break;\n }\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'A';\n // HACK: Make Alt + up-arrow behave like Ctrl + up-arrow\n // http://unix.stackexchange.com/a/108106\n // macOS uses different escape sequences than linux\n if (!isMac && result.key === C0.ESC + '[1;3A') {\n result.key = C0.ESC + '[1;5A';\n }\n } else if (applicationCursorMode) {\n result.key = C0.ESC + 'OA';\n } else {\n result.key = C0.ESC + '[A';\n }\n break;\n case 40:\n // down-arrow\n if (ev.metaKey) {\n break;\n }\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'B';\n // HACK: Make Alt + down-arrow behave like Ctrl + down-arrow\n // http://unix.stackexchange.com/a/108106\n // macOS uses different escape sequences than linux\n if (!isMac && result.key === C0.ESC + '[1;3B') {\n result.key = C0.ESC + '[1;5B';\n }\n } else if (applicationCursorMode) {\n result.key = C0.ESC + 'OB';\n } else {\n result.key = C0.ESC + '[B';\n }\n break;\n case 45:\n // insert\n if (!ev.shiftKey && !ev.ctrlKey) {\n // <Ctrl> or <Shift> + <Insert> are used to\n // copy-paste on some systems.\n result.key = C0.ESC + '[2~';\n }\n break;\n case 46:\n // delete\n if (modifiers) {\n result.key = C0.ESC + '[3;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[3~';\n }\n break;\n case 36:\n // home\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'H';\n } else if (applicationCursorMode) {\n result.key = C0.ESC + 'OH';\n } else {\n result.key = C0.ESC + '[H';\n }\n break;\n case 35:\n // end\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'F';\n } else if (applicationCursorMode) {\n result.key = C0.ESC + 'OF';\n } else {\n result.key = C0.ESC + '[F';\n }\n break;\n case 33:\n // page up\n if (ev.shiftKey) {\n result.type = KeyboardResultType.PAGE_UP;\n } else {\n result.key = C0.ESC + '[5~';\n }\n break;\n case 34:\n // page down\n if (ev.shiftKey) {\n result.type = KeyboardResultType.PAGE_DOWN;\n } else {\n result.key = C0.ESC + '[6~';\n }\n break;\n case 112:\n // F1-F12\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'P';\n } else {\n result.key = C0.ESC + 'OP';\n }\n break;\n case 113:\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'Q';\n } else {\n result.key = C0.ESC + 'OQ';\n }\n break;\n case 114:\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'R';\n } else {\n result.key = C0.ESC + 'OR';\n }\n break;\n case 115:\n if (modifiers) {\n result.key = C0.ESC + '[1;' + (modifiers + 1) + 'S';\n } else {\n result.key = C0.ESC + 'OS';\n }\n break;\n case 116:\n if (modifiers) {\n result.key = C0.ESC + '[15;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[15~';\n }\n break;\n case 117:\n if (modifiers) {\n result.key = C0.ESC + '[17;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[17~';\n }\n break;\n case 118:\n if (modifiers) {\n result.key = C0.ESC + '[18;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[18~';\n }\n break;\n case 119:\n if (modifiers) {\n result.key = C0.ESC + '[19;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[19~';\n }\n break;\n case 120:\n if (modifiers) {\n result.key = C0.ESC + '[20;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[20~';\n }\n break;\n case 121:\n if (modifiers) {\n result.key = C0.ESC + '[21;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[21~';\n }\n break;\n case 122:\n if (modifiers) {\n result.key = C0.ESC + '[23;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[23~';\n }\n break;\n case 123:\n if (modifiers) {\n result.key = C0.ESC + '[24;' + (modifiers + 1) + '~';\n } else {\n result.key = C0.ESC + '[24~';\n }\n break;\n default:\n // a-z and space\n if (ev.ctrlKey && !ev.shiftKey && !ev.altKey && !ev.metaKey) {\n if (ev.keyCode >= 65 && ev.keyCode <= 90) {\n result.key = String.fromCharCode(ev.keyCode - 64);\n } else if (ev.keyCode === 32) {\n result.key = C0.NUL;\n } else if (ev.keyCode >= 51 && ev.keyCode <= 55) {\n // escape, file sep, group sep, record sep, unit sep\n result.key = String.fromCharCode(ev.keyCode - 51 + 27);\n } else if (ev.keyCode === 56) {\n result.key = C0.DEL;\n } else if (ev.keyCode === 219) {\n result.key = C0.ESC;\n } else if (ev.keyCode === 220) {\n result.key = C0.FS;\n } else if (ev.keyCode === 221) {\n result.key = C0.GS;\n }\n } else if ((!isMac || macOptionIsMeta) && ev.altKey && !ev.metaKey) {\n // On macOS this is a third level shift when !macOptionIsMeta. Use <Esc> instead.\n const keyMapping = KEYCODE_KEY_MAPPINGS[ev.keyCode];\n const key = keyMapping?.[!ev.shiftKey ? 0 : 1];\n if (key) {\n result.key = C0.ESC + key;\n } else if (ev.keyCode >= 65 && ev.keyCode <= 90) {\n const keyCode = ev.ctrlKey ? ev.keyCode - 64 : ev.keyCode + 32;\n result.key = C0.ESC + String.fromCharCode(keyCode);\n }\n } else if (isMac && !ev.altKey && !ev.ctrlKey && !ev.shiftKey && ev.metaKey) {\n if (ev.keyCode === 65) { // cmd + a\n result.type = KeyboardResultType.SELECT_ALL;\n }\n } else if (ev.key && !ev.ctrlKey && !ev.altKey && !ev.metaKey && ev.keyCode >= 48 && ev.key.length === 1) {\n // Include only keys that that result in a _single_ character; don't include num lock, volume up, etc.\n result.key = ev.key;\n } else if (ev.key && ev.ctrlKey) {\n if (ev.key === '_') { // ^_\n result.key = C0.US;\n }\n }\n break;\n }\n\n return result;\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\n/**\n * Polyfill - Convert UTF32 codepoint into JS string.\n * Note: The built-in String.fromCodePoint happens to be much slower\n * due to additional sanity checks. We can avoid them since\n * we always operate on legal UTF32 (granted by the input decoders)\n * and use this faster version instead.\n */\nexport function stringFromCodePoint(codePoint: number): string {\n if (codePoint > 0xFFFF) {\n codePoint -= 0x10000;\n return String.fromCharCode((codePoint >> 10) + 0xD800) + String.fromCharCode((codePoint % 0x400) + 0xDC00);\n }\n return String.fromCharCode(codePoint);\n}\n\n/**\n * Convert UTF32 char codes into JS string.\n * Basically the same as `stringFromCodePoint` but for multiple codepoints\n * in a loop (which is a lot faster).\n */\nexport function utf32ToString(data: Uint32Array, start: number = 0, end: number = data.length): string {\n let result = '';\n for (let i = start; i < end; ++i) {\n let codepoint = data[i];\n if (codepoint > 0xFFFF) {\n // JS strings are encoded as UTF16, thus a non BMP codepoint gets converted into a surrogate pair\n // conversion rules:\n // - subtract 0x10000 from code point, leaving a 20 bit number\n // - add high 10 bits to 0xD800 --> first surrogate\n // - add low 10 bits to 0xDC00 --> second surrogate\n codepoint -= 0x10000;\n result += String.fromCharCode((codepoint >> 10) + 0xD800) + String.fromCharCode((codepoint % 0x400) + 0xDC00);\n } else {\n result += String.fromCharCode(codepoint);\n }\n }\n return result;\n}\n\n/**\n * StringToUtf32 - decodes UTF16 sequences into UTF32 codepoints.\n * To keep the decoder in line with JS strings it handles single surrogates as UCS2.\n */\nexport class StringToUtf32 {\n private _interim: number = 0;\n\n /**\n * Clears interim and resets decoder to clean state.\n */\n public clear(): void {\n this._interim = 0;\n }\n\n /**\n * Decode JS string to UTF32 codepoints.\n * The methods assumes stream input and will store partly transmitted\n * surrogate pairs and decode them with the next data chunk.\n * Note: The method does no bound checks for target, therefore make sure\n * the provided input data does not exceed the size of `target`.\n * Returns the number of written codepoints in `target`.\n */\n public decode(input: string, target: Uint32Array): number {\n const length = input.length;\n\n if (!length) {\n return 0;\n }\n\n let size = 0;\n let startPos = 0;\n\n // handle leftover surrogate high\n if (this._interim) {\n const second = input.charCodeAt(startPos++);\n if (0xDC00 <= second && second <= 0xDFFF) {\n target[size++] = (this._interim - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n } else {\n // illegal codepoint (USC2 handling)\n target[size++] = this._interim;\n target[size++] = second;\n }\n this._interim = 0;\n }\n\n for (let i = startPos; i < length; ++i) {\n const code = input.charCodeAt(i);\n // surrogate pair first\n if (0xD800 <= code && code <= 0xDBFF) {\n if (++i >= length) {\n this._interim = code;\n return size;\n }\n const second = input.charCodeAt(i);\n if (0xDC00 <= second && second <= 0xDFFF) {\n target[size++] = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n } else {\n // illegal codepoint (USC2 handling)\n target[size++] = code;\n target[size++] = second;\n }\n continue;\n }\n if (code === 0xFEFF) {\n // BOM\n continue;\n }\n target[size++] = code;\n }\n return size;\n }\n}\n\n/**\n * Utf8Decoder - decodes UTF8 byte sequences into UTF32 codepoints.\n */\nexport class Utf8ToUtf32 {\n public interim: Uint8Array = new Uint8Array(3);\n\n /**\n * Clears interim bytes and resets decoder to clean state.\n */\n public clear(): void {\n this.interim.fill(0);\n }\n\n /**\n * Decodes UTF8 byte sequences in `input` to UTF32 codepoints in `target`.\n * The methods assumes stream input and will store partly transmitted bytes\n * and decode them with the next data chunk.\n * Note: The method does no bound checks for target, therefore make sure\n * the provided data chunk does not exceed the size of `target`.\n * Returns the number of written codepoints in `target`.\n */\n public decode(input: Uint8Array, target: Uint32Array): number {\n const length = input.length;\n\n if (!length) {\n return 0;\n }\n\n let size = 0;\n let byte1: number;\n let byte2: number;\n let byte3: number;\n let byte4: number;\n let codepoint = 0;\n let startPos = 0;\n\n // handle leftover bytes\n if (this.interim[0]) {\n let discardInterim = false;\n let cp = this.interim[0];\n cp &= ((((cp & 0xE0) === 0xC0)) ? 0x1F : (((cp & 0xF0) === 0xE0)) ? 0x0F : 0x07);\n let pos = 0;\n let tmp: number;\n while ((tmp = this.interim[++pos] & 0x3F) && pos < 4) {\n cp <<= 6;\n cp |= tmp;\n }\n // missing bytes - read ahead from input\n const type = (((this.interim[0] & 0xE0) === 0xC0)) ? 2 : (((this.interim[0] & 0xF0) === 0xE0)) ? 3 : 4;\n const missing = type - pos;\n while (startPos < missing) {\n if (startPos >= length) {\n return 0;\n }\n tmp = input[startPos++];\n if ((tmp & 0xC0) !== 0x80) {\n // wrong continuation, discard interim bytes completely\n startPos--;\n discardInterim = true;\n break;\n } else {\n // need to save so we can continue short inputs in next call\n this.interim[pos++] = tmp;\n cp <<= 6;\n cp |= tmp & 0x3F;\n }\n }\n if (!discardInterim) {\n // final test is type dependent\n if (type === 2) {\n if (cp < 0x80) {\n // wrong starter byte\n startPos--;\n } else {\n target[size++] = cp;\n }\n } else if (type === 3) {\n if (cp < 0x0800 || (cp >= 0xD800 && cp <= 0xDFFF) || cp === 0xFEFF) {\n // illegal codepoint or BOM\n } else {\n target[size++] = cp;\n }\n } else {\n if (cp < 0x010000 || cp > 0x10FFFF) {\n // illegal codepoint\n } else {\n target[size++] = cp;\n }\n }\n }\n this.interim.fill(0);\n }\n\n // loop through input\n const fourStop = length - 4;\n let i = startPos;\n while (i < length) {\n /**\n * ASCII shortcut with loop unrolled to 4 consecutive ASCII chars.\n * This is a compromise between speed gain for ASCII\n * and penalty for non ASCII:\n * For best ASCII performance the char should be stored directly into target,\n * but even a single attempt to write to target and compare afterwards\n * penalizes non ASCII really bad (-50%), thus we load the char into byteX first,\n * which reduces ASCII performance by ~15%.\n * This trial for ASCII reduces non ASCII performance by ~10% which seems acceptible\n * compared to the gains.\n * Note that this optimization only takes place for 4 consecutive ASCII chars,\n * for any shorter it bails out. Worst case - all 4 bytes being read but\n * thrown away due to the last being a non ASCII char (-10% performance).\n */\n while (i < fourStop\n && !((byte1 = input[i]) & 0x80)\n && !((byte2 = input[i + 1]) & 0x80)\n && !((byte3 = input[i + 2]) & 0x80)\n && !((byte4 = input[i + 3]) & 0x80))\n {\n target[size++] = byte1;\n target[size++] = byte2;\n target[size++] = byte3;\n target[size++] = byte4;\n i += 4;\n }\n\n // reread byte1\n byte1 = input[i++];\n\n // 1 byte\n if (byte1 < 0x80) {\n target[size++] = byte1;\n\n // 2 bytes\n } else if ((byte1 & 0xE0) === 0xC0) {\n if (i >= length) {\n this.interim[0] = byte1;\n return size;\n }\n byte2 = input[i++];\n if ((byte2 & 0xC0) !== 0x80) {\n // wrong continuation\n i--;\n continue;\n }\n codepoint = (byte1 & 0x1F) << 6 | (byte2 & 0x3F);\n if (codepoint < 0x80) {\n // wrong starter byte\n i--;\n continue;\n }\n target[size++] = codepoint;\n\n // 3 bytes\n } else if ((byte1 & 0xF0) === 0xE0) {\n if (i >= length) {\n this.interim[0] = byte1;\n return size;\n }\n byte2 = input[i++];\n if ((byte2 & 0xC0) !== 0x80) {\n // wrong continuation\n i--;\n continue;\n }\n if (i >= length) {\n this.interim[0] = byte1;\n this.interim[1] = byte2;\n return size;\n }\n byte3 = input[i++];\n if ((byte3 & 0xC0) !== 0x80) {\n // wrong continuation\n i--;\n continue;\n }\n codepoint = (byte1 & 0x0F) << 12 | (byte2 & 0x3F) << 6 | (byte3 & 0x3F);\n if (codepoint < 0x0800 || (codepoint >= 0xD800 && codepoint <= 0xDFFF) || codepoint === 0xFEFF) {\n // illegal codepoint or BOM, no i-- here\n continue;\n }\n target[size++] = codepoint;\n\n // 4 bytes\n } else if ((byte1 & 0xF8) === 0xF0) {\n if (i >= length) {\n this.interim[0] = byte1;\n return size;\n }\n byte2 = input[i++];\n if ((byte2 & 0xC0) !== 0x80) {\n // wrong continuation\n i--;\n continue;\n }\n if (i >= length) {\n this.interim[0] = byte1;\n this.interim[1] = byte2;\n return size;\n }\n byte3 = input[i++];\n if ((byte3 & 0xC0) !== 0x80) {\n // wrong continuation\n i--;\n continue;\n }\n if (i >= length) {\n this.interim[0] = byte1;\n this.interim[1] = byte2;\n this.interim[2] = byte3;\n return size;\n }\n byte4 = input[i++];\n if ((byte4 & 0xC0) !== 0x80) {\n // wrong continuation\n i--;\n continue;\n }\n codepoint = (byte1 & 0x07) << 18 | (byte2 & 0x3F) << 12 | (byte3 & 0x3F) << 6 | (byte4 & 0x3F);\n if (codepoint < 0x010000 || codepoint > 0x10FFFF) {\n // illegal codepoint, no i-- here\n continue;\n }\n target[size++] = codepoint;\n } else {\n // illegal byte, just skip\n }\n }\n return size;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\nimport { IUnicodeVersionProvider } from 'common/services/Services';\nimport { fill } from 'common/TypedArrayUtils';\n\ntype CharWidth = 0 | 1 | 2;\n\nconst BMP_COMBINING = [\n [0x0300, 0x036F], [0x0483, 0x0486], [0x0488, 0x0489],\n [0x0591, 0x05BD], [0x05BF, 0x05BF], [0x05C1, 0x05C2],\n [0x05C4, 0x05C5], [0x05C7, 0x05C7], [0x0600, 0x0603],\n [0x0610, 0x0615], [0x064B, 0x065E], [0x0670, 0x0670],\n [0x06D6, 0x06E4], [0x06E7, 0x06E8], [0x06EA, 0x06ED],\n [0x070F, 0x070F], [0x0711, 0x0711], [0x0730, 0x074A],\n [0x07A6, 0x07B0], [0x07EB, 0x07F3], [0x0901, 0x0902],\n [0x093C, 0x093C], [0x0941, 0x0948], [0x094D, 0x094D],\n [0x0951, 0x0954], [0x0962, 0x0963], [0x0981, 0x0981],\n [0x09BC, 0x09BC], [0x09C1, 0x09C4], [0x09CD, 0x09CD],\n [0x09E2, 0x09E3], [0x0A01, 0x0A02], [0x0A3C, 0x0A3C],\n [0x0A41, 0x0A42], [0x0A47, 0x0A48], [0x0A4B, 0x0A4D],\n [0x0A70, 0x0A71], [0x0A81, 0x0A82], [0x0ABC, 0x0ABC],\n [0x0AC1, 0x0AC5], [0x0AC7, 0x0AC8], [0x0ACD, 0x0ACD],\n [0x0AE2, 0x0AE3], [0x0B01, 0x0B01], [0x0B3C, 0x0B3C],\n [0x0B3F, 0x0B3F], [0x0B41, 0x0B43], [0x0B4D, 0x0B4D],\n [0x0B56, 0x0B56], [0x0B82, 0x0B82], [0x0BC0, 0x0BC0],\n [0x0BCD, 0x0BCD], [0x0C3E, 0x0C40], [0x0C46, 0x0C48],\n [0x0C4A, 0x0C4D], [0x0C55, 0x0C56], [0x0CBC, 0x0CBC],\n [0x0CBF, 0x0CBF], [0x0CC6, 0x0CC6], [0x0CCC, 0x0CCD],\n [0x0CE2, 0x0CE3], [0x0D41, 0x0D43], [0x0D4D, 0x0D4D],\n [0x0DCA, 0x0DCA], [0x0DD2, 0x0DD4], [0x0DD6, 0x0DD6],\n [0x0E31, 0x0E31], [0x0E34, 0x0E3A], [0x0E47, 0x0E4E],\n [0x0EB1, 0x0EB1], [0x0EB4, 0x0EB9], [0x0EBB, 0x0EBC],\n [0x0EC8, 0x0ECD], [0x0F18, 0x0F19], [0x0F35, 0x0F35],\n [0x0F37, 0x0F37], [0x0F39, 0x0F39], [0x0F71, 0x0F7E],\n [0x0F80, 0x0F84], [0x0F86, 0x0F87], [0x0F90, 0x0F97],\n [0x0F99, 0x0FBC], [0x0FC6, 0x0FC6], [0x102D, 0x1030],\n [0x1032, 0x1032], [0x1036, 0x1037], [0x1039, 0x1039],\n [0x1058, 0x1059], [0x1160, 0x11FF], [0x135F, 0x135F],\n [0x1712, 0x1714], [0x1732, 0x1734], [0x1752, 0x1753],\n [0x1772, 0x1773], [0x17B4, 0x17B5], [0x17B7, 0x17BD],\n [0x17C6, 0x17C6], [0x17C9, 0x17D3], [0x17DD, 0x17DD],\n [0x180B, 0x180D], [0x18A9, 0x18A9], [0x1920, 0x1922],\n [0x1927, 0x1928], [0x1932, 0x1932], [0x1939, 0x193B],\n [0x1A17, 0x1A18], [0x1B00, 0x1B03], [0x1B34, 0x1B34],\n [0x1B36, 0x1B3A], [0x1B3C, 0x1B3C], [0x1B42, 0x1B42],\n [0x1B6B, 0x1B73], [0x1DC0, 0x1DCA], [0x1DFE, 0x1DFF],\n [0x200B, 0x200F], [0x202A, 0x202E], [0x2060, 0x2063],\n [0x206A, 0x206F], [0x20D0, 0x20EF], [0x302A, 0x302F],\n [0x3099, 0x309A], [0xA806, 0xA806], [0xA80B, 0xA80B],\n [0xA825, 0xA826], [0xFB1E, 0xFB1E], [0xFE00, 0xFE0F],\n [0xFE20, 0xFE23], [0xFEFF, 0xFEFF], [0xFFF9, 0xFFFB]\n];\nconst HIGH_COMBINING = [\n [0x10A01, 0x10A03], [0x10A05, 0x10A06], [0x10A0C, 0x10A0F],\n [0x10A38, 0x10A3A], [0x10A3F, 0x10A3F], [0x1D167, 0x1D169],\n [0x1D173, 0x1D182], [0x1D185, 0x1D18B], [0x1D1AA, 0x1D1AD],\n [0x1D242, 0x1D244], [0xE0001, 0xE0001], [0xE0020, 0xE007F],\n [0xE0100, 0xE01EF]\n];\n\n// BMP lookup table, lazy initialized during first addon loading\nlet table: Uint8Array;\n\nfunction bisearch(ucs: number, data: number[][]): boolean {\n let min = 0;\n let max = data.length - 1;\n let mid;\n if (ucs < data[0][0] || ucs > data[max][1]) {\n return false;\n }\n while (max >= min) {\n mid = (min + max) >> 1;\n if (ucs > data[mid][1]) {\n min = mid + 1;\n } else if (ucs < data[mid][0]) {\n max = mid - 1;\n } else {\n return true;\n }\n }\n return false;\n}\n\nexport class UnicodeV6 implements IUnicodeVersionProvider {\n public readonly version = '6';\n\n constructor() {\n // init lookup table once\n if (!table) {\n table = new Uint8Array(65536);\n fill(table, 1);\n table[0] = 0;\n // control chars\n fill(table, 0, 1, 32);\n fill(table, 0, 0x7f, 0xa0);\n\n // apply wide char rules first\n // wide chars\n fill(table, 2, 0x1100, 0x1160);\n table[0x2329] = 2;\n table[0x232a] = 2;\n fill(table, 2, 0x2e80, 0xa4d0);\n table[0x303f] = 1; // wrongly in last line\n\n fill(table, 2, 0xac00, 0xd7a4);\n fill(table, 2, 0xf900, 0xfb00);\n fill(table, 2, 0xfe10, 0xfe1a);\n fill(table, 2, 0xfe30, 0xfe70);\n fill(table, 2, 0xff00, 0xff61);\n fill(table, 2, 0xffe0, 0xffe7);\n\n // apply combining last to ensure we overwrite\n // wrongly wide set chars:\n // the original algo evals combining first and falls\n // through to wide check so we simply do here the opposite\n // combining 0\n for (let r = 0; r < BMP_COMBINING.length; ++r) {\n fill(table, 0, BMP_COMBINING[r][0], BMP_COMBINING[r][1] + 1);\n }\n }\n }\n\n public wcwidth(num: number): CharWidth {\n if (num < 32) return 0;\n if (num < 127) return 1;\n if (num < 65536) return table[num] as CharWidth;\n if (bisearch(num, HIGH_COMBINING)) return 0;\n if ((num >= 0x20000 && num <= 0x2fffd) || (num >= 0x30000 && num <= 0x3fffd)) return 2;\n return 1;\n }\n}\n","\n/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\ndeclare const setTimeout: (handler: () => void, timeout?: number) => void;\n\n/**\n * Safety watermark to avoid memory exhaustion and browser engine crash on fast data input.\n * Enable flow control to avoid this limit and make sure that your backend correctly\n * propagates this to the underlying pty. (see docs for further instructions)\n * Since this limit is meant as a safety parachute to prevent browser crashs,\n * it is set to a very high number. Typically xterm.js gets unresponsive with\n * a 100 times lower number (>500 kB).\n */\nconst DISCARD_WATERMARK = 50000000; // ~50 MB\n\n/**\n * The max number of ms to spend on writes before allowing the renderer to\n * catch up with a 0ms setTimeout. A value of < 33 to keep us close to\n * 30fps, and a value of < 16 to try to run at 60fps. Of course, the real FPS\n * depends on the time it takes for the renderer to draw the frame.\n */\nconst WRITE_TIMEOUT_MS = 12;\n\n/**\n * Threshold of max held chunks in the write buffer, that were already processed.\n * This is a tradeoff between extensive write buffer shifts (bad runtime) and high\n * memory consumption by data thats not used anymore.\n */\nconst WRITE_BUFFER_LENGTH_THRESHOLD = 50;\n\n// queueMicrotask polyfill for nodejs < v11\nconst qmt: (cb: () => void) => void = (typeof queueMicrotask === 'undefined')\n ? (cb: () => void) => { Promise.resolve().then(cb); }\n : queueMicrotask;\n\n\nexport class WriteBuffer {\n private _writeBuffer: (string | Uint8Array)[] = [];\n private _callbacks: ((() => void) | undefined)[] = [];\n private _pendingData = 0;\n private _bufferOffset = 0;\n private _isSyncWriting = false;\n private _syncCalls = 0;\n\n constructor(private _action: (data: string | Uint8Array, promiseResult?: boolean) => void | Promise<boolean>) { }\n\n /**\n * @deprecated Unreliable, to be removed soon.\n */\n public writeSync(data: string | Uint8Array, maxSubsequentCalls?: number): void {\n // stop writeSync recursions with maxSubsequentCalls argument\n // This is dangerous to use as it will lose the current data chunk\n // and return immediately.\n if (maxSubsequentCalls !== undefined && this._syncCalls > maxSubsequentCalls) {\n // comment next line if a whole loop block should only contain x `writeSync` calls\n // (total flat vs. deep nested limit)\n this._syncCalls = 0;\n return;\n }\n // append chunk to buffer\n this._pendingData += data.length;\n this._writeBuffer.push(data);\n this._callbacks.push(undefined);\n\n // increase recursion counter\n this._syncCalls++;\n // exit early if another writeSync loop is active\n if (this._isSyncWriting) {\n return;\n }\n this._isSyncWriting = true;\n\n // force sync processing on pending data chunks to avoid in-band data scrambling\n // does the same as innerWrite but without event loop\n // we have to do it here as single loop steps to not corrupt loop subject\n // by another writeSync call triggered from _action\n let chunk: string | Uint8Array | undefined;\n while (chunk = this._writeBuffer.shift()) {\n this._action(chunk);\n const cb = this._callbacks.shift();\n if (cb) cb();\n }\n // reset to avoid reprocessing of chunks with scheduled innerWrite call\n // stopping scheduled innerWrite by offset > length condition\n this._pendingData = 0;\n this._bufferOffset = 0x7FFFFFFF;\n\n // allow another writeSync to loop\n this._isSyncWriting = false;\n this._syncCalls = 0;\n }\n\n public write(data: string | Uint8Array, callback?: () => void): void {\n if (this._pendingData > DISCARD_WATERMARK) {\n throw new Error('write data discarded, use flow control to avoid losing data');\n }\n\n // schedule chunk processing for next event loop run\n if (!this._writeBuffer.length) {\n this._bufferOffset = 0;\n setTimeout(() => this._innerWrite());\n }\n\n this._pendingData += data.length;\n this._writeBuffer.push(data);\n this._callbacks.push(callback);\n }\n\n /**\n * Inner write call, that enters the sliced chunk processing by timing.\n *\n * `lastTime` indicates, when the last _innerWrite call had started.\n * It is used to aggregate async handler execution under a timeout constraint\n * effectively lowering the redrawing needs, schematically:\n *\n * macroTask _innerWrite:\n * if (Date.now() - (lastTime | 0) < WRITE_TIMEOUT_MS):\n * schedule microTask _innerWrite(lastTime)\n * else:\n * schedule macroTask _innerWrite(0)\n *\n * overall execution order on task queues:\n *\n * macrotasks: [...] --> _innerWrite(0) --> [...] --> screenUpdate --> [...]\n * m t: |\n * i a: [...]\n * c s: |\n * r k: while < timeout:\n * o s: _innerWrite(timeout)\n *\n * `promiseResult` depicts the promise resolve value of an async handler.\n * This value gets carried forward through all saved stack states of the\n * paused parser for proper continuation.\n *\n * Note, for pure sync code `lastTime` and `promiseResult` have no meaning.\n */\n protected _innerWrite(lastTime: number = 0, promiseResult: boolean = true): void {\n const startTime = lastTime || Date.now();\n while (this._writeBuffer.length > this._bufferOffset) {\n const data = this._writeBuffer[this._bufferOffset];\n const result = this._action(data, promiseResult);\n if (result) {\n /**\n * If we get a promise as return value, we re-schedule the continuation\n * as thenable on the promise and exit right away.\n *\n * The exit here means, that we block input processing at the current active chunk,\n * the exact execution position within the chunk is preserved by the saved\n * stack content in InputHandler and EscapeSequenceParser.\n *\n * Resuming happens automatically from that saved stack state.\n * Also the resolved promise value is passed along the callstack to\n * `EscapeSequenceParser.parse` to correctly resume the stopped handler loop.\n *\n * Exceptions on async handlers will be logged to console async, but do not interrupt\n * the input processing (continues with next handler at the current input position).\n */\n\n /**\n * If a promise takes long to resolve, we should schedule continuation behind setTimeout.\n * This might already be too late, if our .then enters really late (executor + prev thens took very long).\n * This cannot be solved here for the handler itself (it is the handlers responsibility to slice hard work),\n * but we can at least schedule a screen update as we gain control.\n */\n const continuation: (r: boolean) => void = (r: boolean) => Date.now() - startTime >= WRITE_TIMEOUT_MS\n ? setTimeout(() => this._innerWrite(0, r))\n : this._innerWrite(startTime, r);\n\n /**\n * Optimization considerations:\n * The continuation above favors FPS over throughput by eval'ing `startTime` on resolve.\n * This might schedule too many screen updates with bad throughput drops (in case a slow\n * resolving handler sliced its work properly behind setTimeout calls). We cannot spot\n * this condition here, also the renderer has no way to spot nonsense updates either.\n * FIXME: A proper fix for this would track the FPS at the renderer entry level separately.\n *\n * If favoring of FPS shows bad throughtput impact, use the following instead. It favors\n * throughput by eval'ing `startTime` upfront pulling at least one more chunk into the\n * current microtask queue (executed before setTimeout).\n */\n // const continuation: (r: boolean) => void = Date.now() - startTime >= WRITE_TIMEOUT_MS\n // ? r => setTimeout(() => this._innerWrite(0, r))\n // : r => this._innerWrite(startTime, r);\n\n // Handle exceptions synchronously to current band position, idea:\n // 1. spawn a single microtask which we allow to throw hard\n // 2. spawn a promise immediately resolving to `true`\n // (executed on the same queue, thus properly aligned before continuation happens)\n result.catch(err => {\n qmt(() => {throw err;});\n return Promise.resolve(false);\n }).then(continuation);\n return;\n }\n\n const cb = this._callbacks[this._bufferOffset];\n if (cb) cb();\n this._bufferOffset++;\n this._pendingData -= data.length;\n\n if (Date.now() - startTime >= WRITE_TIMEOUT_MS) {\n break;\n }\n }\n if (this._writeBuffer.length > this._bufferOffset) {\n // Allow renderer to catch up before processing the next batch\n // trim already processed chunks if we are above threshold\n if (this._bufferOffset > WRITE_BUFFER_LENGTH_THRESHOLD) {\n this._writeBuffer = this._writeBuffer.slice(this._bufferOffset);\n this._callbacks = this._callbacks.slice(this._bufferOffset);\n this._bufferOffset = 0;\n }\n setTimeout(() => this._innerWrite());\n } else {\n this._writeBuffer.length = 0;\n this._callbacks.length = 0;\n this._pendingData = 0;\n this._bufferOffset = 0;\n }\n }\n}\n","/**\n * Copyright (c) 2021 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\n\n// 'rgb:' rule - matching: r/g/b | rr/gg/bb | rrr/ggg/bbb | rrrr/gggg/bbbb (hex digits)\nconst RGB_REX = /^([\\da-f]{1})\\/([\\da-f]{1})\\/([\\da-f]{1})$|^([\\da-f]{2})\\/([\\da-f]{2})\\/([\\da-f]{2})$|^([\\da-f]{3})\\/([\\da-f]{3})\\/([\\da-f]{3})$|^([\\da-f]{4})\\/([\\da-f]{4})\\/([\\da-f]{4})$/;\n// '#...' rule - matching any hex digits\nconst HASH_REX = /^[\\da-f]+$/;\n\n/**\n * Parse color spec to RGB values (8 bit per channel).\n * See `man xparsecolor` for details about certain format specifications.\n *\n * Supported formats:\n * - rgb:<red>/<green>/<blue> with <red>, <green>, <blue> in h | hh | hhh | hhhh\n * - #RGB, #RRGGBB, #RRRGGGBBB, #RRRRGGGGBBBB\n *\n * All other formats like rgbi: or device-independent string specifications\n * with float numbering are not supported.\n */\nexport function parseColor(data: string): [number, number, number] | undefined {\n if (!data) return;\n // also handle uppercases\n let low = data.toLowerCase();\n if (low.indexOf('rgb:') === 0) {\n // 'rgb:' specifier\n low = low.slice(4);\n const m = RGB_REX.exec(low);\n if (m) {\n const base = m[1] ? 15 : m[4] ? 255 : m[7] ? 4095 : 65535;\n return [\n Math.round(parseInt(m[1] || m[4] || m[7] || m[10], 16) / base * 255),\n Math.round(parseInt(m[2] || m[5] || m[8] || m[11], 16) / base * 255),\n Math.round(parseInt(m[3] || m[6] || m[9] || m[12], 16) / base * 255)\n ];\n }\n } else if (low.indexOf('#') === 0) {\n // '#' specifier\n low = low.slice(1);\n if (HASH_REX.exec(low) && [3, 6, 9, 12].includes(low.length)) {\n const adv = low.length / 3;\n const result: [number, number, number] = [0, 0, 0];\n for (let i = 0; i < 3; ++i) {\n const c = parseInt(low.slice(adv * i, adv * i + adv), 16);\n result[i] = adv === 1 ? c << 4 : adv === 2 ? c : adv === 3 ? c >> 4 : c >> 8;\n }\n return result;\n }\n }\n\n // Named colors are currently not supported due to the large addition to the xterm.js bundle size\n // they would add. In order to support named colors, we would need some way of optionally loading\n // additional payloads so startup/download time is not bloated (see #3530).\n}\n\n// pad hex output to requested bit width\nfunction pad(n: number, bits: number): string {\n const s = n.toString(16);\n const s2 = s.length < 2 ? '0' + s : s;\n switch (bits) {\n case 4:\n return s[0];\n case 8:\n return s2;\n case 12:\n return (s2 + s2).slice(0, 3);\n default:\n return s2 + s2;\n }\n}\n\n/**\n * Convert a given color to rgb:../../.. string of `bits` depth.\n */\nexport function toRgbString(color: [number, number, number], bits: number = 16): string {\n const [r, g, b] = color;\n return `rgb:${pad(r, bits)}/${pad(g, bits)}/${pad(b, bits)}`;\n}\n","/**\n * Copyright (c) 2017 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\n/**\n * Internal states of EscapeSequenceParser.\n */\nexport const enum ParserState {\n GROUND = 0,\n ESCAPE = 1,\n ESCAPE_INTERMEDIATE = 2,\n CSI_ENTRY = 3,\n CSI_PARAM = 4,\n CSI_INTERMEDIATE = 5,\n CSI_IGNORE = 6,\n SOS_PM_APC_STRING = 7,\n OSC_STRING = 8,\n DCS_ENTRY = 9,\n DCS_PARAM = 10,\n DCS_IGNORE = 11,\n DCS_INTERMEDIATE = 12,\n DCS_PASSTHROUGH = 13\n}\n\n/**\n* Internal actions of EscapeSequenceParser.\n*/\nexport const enum ParserAction {\n IGNORE = 0,\n ERROR = 1,\n PRINT = 2,\n EXECUTE = 3,\n OSC_START = 4,\n OSC_PUT = 5,\n OSC_END = 6,\n CSI_DISPATCH = 7,\n PARAM = 8,\n COLLECT = 9,\n ESC_DISPATCH = 10,\n CLEAR = 11,\n DCS_HOOK = 12,\n DCS_PUT = 13,\n DCS_UNHOOK = 14\n}\n\n/**\n * Internal states of OscParser.\n */\nexport const enum OscState {\n START = 0,\n ID = 1,\n PAYLOAD = 2,\n ABORT = 3\n}\n\n// payload limit for OSC and DCS\nexport const PAYLOAD_LIMIT = 10000000;\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IDisposable } from 'common/Types';\nimport { IDcsHandler, IParams, IHandlerCollection, IDcsParser, DcsFallbackHandlerType, ISubParserStackState } from 'common/parser/Types';\nimport { utf32ToString } from 'common/input/TextDecoder';\nimport { Params } from 'common/parser/Params';\nimport { PAYLOAD_LIMIT } from 'common/parser/Constants';\n\nconst EMPTY_HANDLERS: IDcsHandler[] = [];\n\nexport class DcsParser implements IDcsParser {\n private _handlers: IHandlerCollection<IDcsHandler> = Object.create(null);\n private _active: IDcsHandler[] = EMPTY_HANDLERS;\n private _ident: number = 0;\n private _handlerFb: DcsFallbackHandlerType = () => { };\n private _stack: ISubParserStackState = {\n paused: false,\n loopPosition: 0,\n fallThrough: false\n };\n\n public dispose(): void {\n this._handlers = Object.create(null);\n this._handlerFb = () => { };\n this._active = EMPTY_HANDLERS;\n }\n\n public registerHandler(ident: number, handler: IDcsHandler): IDisposable {\n if (this._handlers[ident] === undefined) {\n this._handlers[ident] = [];\n }\n const handlerList = this._handlers[ident];\n handlerList.push(handler);\n return {\n dispose: () => {\n const handlerIndex = handlerList.indexOf(handler);\n if (handlerIndex !== -1) {\n handlerList.splice(handlerIndex, 1);\n }\n }\n };\n }\n\n public clearHandler(ident: number): void {\n if (this._handlers[ident]) delete this._handlers[ident];\n }\n\n public setHandlerFallback(handler: DcsFallbackHandlerType): void {\n this._handlerFb = handler;\n }\n\n public reset(): void {\n // force cleanup leftover handlers\n if (this._active.length) {\n for (let j = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; j >= 0; --j) {\n this._active[j].unhook(false);\n }\n }\n this._stack.paused = false;\n this._active = EMPTY_HANDLERS;\n this._ident = 0;\n }\n\n public hook(ident: number, params: IParams): void {\n // always reset leftover handlers\n this.reset();\n this._ident = ident;\n this._active = this._handlers[ident] || EMPTY_HANDLERS;\n if (!this._active.length) {\n this._handlerFb(this._ident, 'HOOK', params);\n } else {\n for (let j = this._active.length - 1; j >= 0; j--) {\n this._active[j].hook(params);\n }\n }\n }\n\n public put(data: Uint32Array, start: number, end: number): void {\n if (!this._active.length) {\n this._handlerFb(this._ident, 'PUT', utf32ToString(data, start, end));\n } else {\n for (let j = this._active.length - 1; j >= 0; j--) {\n this._active[j].put(data, start, end);\n }\n }\n }\n\n public unhook(success: boolean, promiseResult: boolean = true): void | Promise<boolean> {\n if (!this._active.length) {\n this._handlerFb(this._ident, 'UNHOOK', success);\n } else {\n let handlerResult: boolean | Promise<boolean> = false;\n let j = this._active.length - 1;\n let fallThrough = false;\n if (this._stack.paused) {\n j = this._stack.loopPosition - 1;\n handlerResult = promiseResult;\n fallThrough = this._stack.fallThrough;\n this._stack.paused = false;\n }\n if (!fallThrough && handlerResult === false) {\n for (; j >= 0; j--) {\n handlerResult = this._active[j].unhook(success);\n if (handlerResult === true) {\n break;\n } else if (handlerResult instanceof Promise) {\n this._stack.paused = true;\n this._stack.loopPosition = j;\n this._stack.fallThrough = false;\n return handlerResult;\n }\n }\n j--;\n }\n // cleanup left over handlers (fallThrough for async)\n for (; j >= 0; j--) {\n handlerResult = this._active[j].unhook(false);\n if (handlerResult instanceof Promise) {\n this._stack.paused = true;\n this._stack.loopPosition = j;\n this._stack.fallThrough = true;\n return handlerResult;\n }\n }\n }\n this._active = EMPTY_HANDLERS;\n this._ident = 0;\n }\n}\n\n// predefine empty params as [0] (ZDM)\nconst EMPTY_PARAMS = new Params();\nEMPTY_PARAMS.addParam(0);\n\n/**\n * Convenient class to create a DCS handler from a single callback function.\n * Note: The payload is currently limited to 50 MB (hardcoded).\n */\nexport class DcsHandler implements IDcsHandler {\n private _data = '';\n private _params: IParams = EMPTY_PARAMS;\n private _hitLimit: boolean = false;\n\n constructor(private _handler: (data: string, params: IParams) => boolean | Promise<boolean>) { }\n\n public hook(params: IParams): void {\n // since we need to preserve params until `unhook`, we have to clone it\n // (only borrowed from parser and spans multiple parser states)\n // perf optimization:\n // clone only, if we have non empty params, otherwise stick with default\n this._params = (params.length > 1 || params.params[0]) ? params.clone() : EMPTY_PARAMS;\n this._data = '';\n this._hitLimit = false;\n }\n\n public put(data: Uint32Array, start: number, end: number): void {\n if (this._hitLimit) {\n return;\n }\n this._data += utf32ToString(data, start, end);\n if (this._data.length > PAYLOAD_LIMIT) {\n this._data = '';\n this._hitLimit = true;\n }\n }\n\n public unhook(success: boolean): boolean | Promise<boolean> {\n let ret: boolean | Promise<boolean> = false;\n if (this._hitLimit) {\n ret = false;\n } else if (success) {\n ret = this._handler(this._data, this._params);\n if (ret instanceof Promise) {\n // need to hold data and params until `ret` got resolved\n // dont care for errors, data will be freed anyway on next start\n return ret.then(res => {\n this._params = EMPTY_PARAMS;\n this._data = '';\n this._hitLimit = false;\n return res;\n });\n }\n }\n this._params = EMPTY_PARAMS;\n this._data = '';\n this._hitLimit = false;\n return ret;\n }\n}\n","/**\n * Copyright (c) 2018 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IParsingState, IDcsHandler, IEscapeSequenceParser, IParams, IOscHandler, IHandlerCollection, CsiHandlerType, OscFallbackHandlerType, IOscParser, EscHandlerType, IDcsParser, DcsFallbackHandlerType, IFunctionIdentifier, ExecuteFallbackHandlerType, CsiFallbackHandlerType, EscFallbackHandlerType, PrintHandlerType, PrintFallbackHandlerType, ExecuteHandlerType, IParserStackState, ParserStackType, ResumableHandlersType } from 'common/parser/Types';\nimport { ParserState, ParserAction } from 'common/parser/Constants';\nimport { Disposable } from 'common/Lifecycle';\nimport { IDisposable } from 'common/Types';\nimport { fill } from 'common/TypedArrayUtils';\nimport { Params } from 'common/parser/Params';\nimport { OscParser } from 'common/parser/OscParser';\nimport { DcsParser } from 'common/parser/DcsParser';\n\n/**\n * Table values are generated like this:\n * index: currentState << TableValue.INDEX_STATE_SHIFT | charCode\n * value: action << TableValue.TRANSITION_ACTION_SHIFT | nextState\n */\nconst enum TableAccess {\n TRANSITION_ACTION_SHIFT = 4,\n TRANSITION_STATE_MASK = 15,\n INDEX_STATE_SHIFT = 8\n}\n\n/**\n * Transition table for EscapeSequenceParser.\n */\nexport class TransitionTable {\n public table: Uint8Array;\n\n constructor(length: number) {\n this.table = new Uint8Array(length);\n }\n\n /**\n * Set default transition.\n * @param action default action\n * @param next default next state\n */\n public setDefault(action: ParserAction, next: ParserState): void {\n fill(this.table, action << TableAccess.TRANSITION_ACTION_SHIFT | next);\n }\n\n /**\n * Add a transition to the transition table.\n * @param code input character code\n * @param state current parser state\n * @param action parser action to be done\n * @param next next parser state\n */\n public add(code: number, state: ParserState, action: ParserAction, next: ParserState): void {\n this.table[state << TableAccess.INDEX_STATE_SHIFT | code] = action << TableAccess.TRANSITION_ACTION_SHIFT | next;\n }\n\n /**\n * Add transitions for multiple input character codes.\n * @param codes input character code array\n * @param state current parser state\n * @param action parser action to be done\n * @param next next parser state\n */\n public addMany(codes: number[], state: ParserState, action: ParserAction, next: ParserState): void {\n for (let i = 0; i < codes.length; i++) {\n this.table[state << TableAccess.INDEX_STATE_SHIFT | codes[i]] = action << TableAccess.TRANSITION_ACTION_SHIFT | next;\n }\n }\n}\n\n\n// Pseudo-character placeholder for printable non-ascii characters (unicode).\nconst NON_ASCII_PRINTABLE = 0xA0;\n\n\n/**\n * VT500 compatible transition table.\n * Taken from https://vt100.net/emu/dec_ansi_parser.\n */\nexport const VT500_TRANSITION_TABLE = (function (): TransitionTable {\n const table: TransitionTable = new TransitionTable(4095);\n\n // range macro for byte\n const BYTE_VALUES = 256;\n const blueprint = Array.apply(null, Array(BYTE_VALUES)).map((unused: any, i: number) => i);\n const r = (start: number, end: number): number[] => blueprint.slice(start, end);\n\n // Default definitions.\n const PRINTABLES = r(0x20, 0x7f); // 0x20 (SP) included, 0x7F (DEL) excluded\n const EXECUTABLES = r(0x00, 0x18);\n EXECUTABLES.push(0x19);\n EXECUTABLES.push.apply(EXECUTABLES, r(0x1c, 0x20));\n\n const states: number[] = r(ParserState.GROUND, ParserState.DCS_PASSTHROUGH + 1);\n let state: any;\n\n // set default transition\n table.setDefault(ParserAction.ERROR, ParserState.GROUND);\n // printables\n table.addMany(PRINTABLES, ParserState.GROUND, ParserAction.PRINT, ParserState.GROUND);\n // global anywhere rules\n for (state in states) {\n table.addMany([0x18, 0x1a, 0x99, 0x9a], state, ParserAction.EXECUTE, ParserState.GROUND);\n table.addMany(r(0x80, 0x90), state, ParserAction.EXECUTE, ParserState.GROUND);\n table.addMany(r(0x90, 0x98), state, ParserAction.EXECUTE, ParserState.GROUND);\n table.add(0x9c, state, ParserAction.IGNORE, ParserState.GROUND); // ST as terminator\n table.add(0x1b, state, ParserAction.CLEAR, ParserState.ESCAPE); // ESC\n table.add(0x9d, state, ParserAction.OSC_START, ParserState.OSC_STRING); // OSC\n table.addMany([0x98, 0x9e, 0x9f], state, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);\n table.add(0x9b, state, ParserAction.CLEAR, ParserState.CSI_ENTRY); // CSI\n table.add(0x90, state, ParserAction.CLEAR, ParserState.DCS_ENTRY); // DCS\n }\n // rules for executables and 7f\n table.addMany(EXECUTABLES, ParserState.GROUND, ParserAction.EXECUTE, ParserState.GROUND);\n table.addMany(EXECUTABLES, ParserState.ESCAPE, ParserAction.EXECUTE, ParserState.ESCAPE);\n table.add(0x7f, ParserState.ESCAPE, ParserAction.IGNORE, ParserState.ESCAPE);\n table.addMany(EXECUTABLES, ParserState.OSC_STRING, ParserAction.IGNORE, ParserState.OSC_STRING);\n table.addMany(EXECUTABLES, ParserState.CSI_ENTRY, ParserAction.EXECUTE, ParserState.CSI_ENTRY);\n table.add(0x7f, ParserState.CSI_ENTRY, ParserAction.IGNORE, ParserState.CSI_ENTRY);\n table.addMany(EXECUTABLES, ParserState.CSI_PARAM, ParserAction.EXECUTE, ParserState.CSI_PARAM);\n table.add(0x7f, ParserState.CSI_PARAM, ParserAction.IGNORE, ParserState.CSI_PARAM);\n table.addMany(EXECUTABLES, ParserState.CSI_IGNORE, ParserAction.EXECUTE, ParserState.CSI_IGNORE);\n table.addMany(EXECUTABLES, ParserState.CSI_INTERMEDIATE, ParserAction.EXECUTE, ParserState.CSI_INTERMEDIATE);\n table.add(0x7f, ParserState.CSI_INTERMEDIATE, ParserAction.IGNORE, ParserState.CSI_INTERMEDIATE);\n table.addMany(EXECUTABLES, ParserState.ESCAPE_INTERMEDIATE, ParserAction.EXECUTE, ParserState.ESCAPE_INTERMEDIATE);\n table.add(0x7f, ParserState.ESCAPE_INTERMEDIATE, ParserAction.IGNORE, ParserState.ESCAPE_INTERMEDIATE);\n // osc\n table.add(0x5d, ParserState.ESCAPE, ParserAction.OSC_START, ParserState.OSC_STRING);\n table.addMany(PRINTABLES, ParserState.OSC_STRING, ParserAction.OSC_PUT, ParserState.OSC_STRING);\n table.add(0x7f, ParserState.OSC_STRING, ParserAction.OSC_PUT, ParserState.OSC_STRING);\n table.addMany([0x9c, 0x1b, 0x18, 0x1a, 0x07], ParserState.OSC_STRING, ParserAction.OSC_END, ParserState.GROUND);\n table.addMany(r(0x1c, 0x20), ParserState.OSC_STRING, ParserAction.IGNORE, ParserState.OSC_STRING);\n // sos/pm/apc does nothing\n table.addMany([0x58, 0x5e, 0x5f], ParserState.ESCAPE, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);\n table.addMany(PRINTABLES, ParserState.SOS_PM_APC_STRING, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);\n table.addMany(EXECUTABLES, ParserState.SOS_PM_APC_STRING, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);\n table.add(0x9c, ParserState.SOS_PM_APC_STRING, ParserAction.IGNORE, ParserState.GROUND);\n table.add(0x7f, ParserState.SOS_PM_APC_STRING, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);\n // csi entries\n table.add(0x5b, ParserState.ESCAPE, ParserAction.CLEAR, ParserState.CSI_ENTRY);\n table.addMany(r(0x40, 0x7f), ParserState.CSI_ENTRY, ParserAction.CSI_DISPATCH, ParserState.GROUND);\n table.addMany(r(0x30, 0x3c), ParserState.CSI_ENTRY, ParserAction.PARAM, ParserState.CSI_PARAM);\n table.addMany([0x3c, 0x3d, 0x3e, 0x3f], ParserState.CSI_ENTRY, ParserAction.COLLECT, ParserState.CSI_PARAM);\n table.addMany(r(0x30, 0x3c), ParserState.CSI_PARAM, ParserAction.PARAM, ParserState.CSI_PARAM);\n table.addMany(r(0x40, 0x7f), ParserState.CSI_PARAM, ParserAction.CSI_DISPATCH, ParserState.GROUND);\n table.addMany([0x3c, 0x3d, 0x3e, 0x3f], ParserState.CSI_PARAM, ParserAction.IGNORE, ParserState.CSI_IGNORE);\n table.addMany(r(0x20, 0x40), ParserState.CSI_IGNORE, ParserAction.IGNORE, ParserState.CSI_IGNORE);\n table.add(0x7f, ParserState.CSI_IGNORE, ParserAction.IGNORE, ParserState.CSI_IGNORE);\n table.addMany(r(0x40, 0x7f), ParserState.CSI_IGNORE, ParserAction.IGNORE, ParserState.GROUND);\n table.addMany(r(0x20, 0x30), ParserState.CSI_ENTRY, ParserAction.COLLECT, ParserState.CSI_INTERMEDIATE);\n table.addMany(r(0x20, 0x30), ParserState.CSI_INTERMEDIATE, ParserAction.COLLECT, ParserState.CSI_INTERMEDIATE);\n table.addMany(r(0x30, 0x40), ParserState.CSI_INTERMEDIATE, ParserAction.IGNORE, ParserState.CSI_IGNORE);\n table.addMany(r(0x40, 0x7f), ParserState.CSI_INTERMEDIATE, ParserAction.CSI_DISPATCH, ParserState.GROUND);\n table.addMany(r(0x20, 0x30), ParserState.CSI_PARAM, ParserAction.COLLECT, ParserState.CSI_INTERMEDIATE);\n // esc_intermediate\n table.addMany(r(0x20, 0x30), ParserState.ESCAPE, ParserAction.COLLECT, ParserState.ESCAPE_INTERMEDIATE);\n table.addMany(r(0x20, 0x30), ParserState.ESCAPE_INTERMEDIATE, ParserAction.COLLECT, ParserState.ESCAPE_INTERMEDIATE);\n table.addMany(r(0x30, 0x7f), ParserState.ESCAPE_INTERMEDIATE, ParserAction.ESC_DISPATCH, ParserState.GROUND);\n table.addMany(r(0x30, 0x50), ParserState.ESCAPE, ParserAction.ESC_DISPATCH, ParserState.GROUND);\n table.addMany(r(0x51, 0x58), ParserState.ESCAPE, ParserAction.ESC_DISPATCH, ParserState.GROUND);\n table.addMany([0x59, 0x5a, 0x5c], ParserState.ESCAPE, ParserAction.ESC_DISPATCH, ParserState.GROUND);\n table.addMany(r(0x60, 0x7f), ParserState.ESCAPE, ParserAction.ESC_DISPATCH, ParserState.GROUND);\n // dcs entry\n table.add(0x50, ParserState.ESCAPE, ParserAction.CLEAR, ParserState.DCS_ENTRY);\n table.addMany(EXECUTABLES, ParserState.DCS_ENTRY, ParserAction.IGNORE, ParserState.DCS_ENTRY);\n table.add(0x7f, ParserState.DCS_ENTRY, ParserAction.IGNORE, ParserState.DCS_ENTRY);\n table.addMany(r(0x1c, 0x20), ParserState.DCS_ENTRY, ParserAction.IGNORE, ParserState.DCS_ENTRY);\n table.addMany(r(0x20, 0x30), ParserState.DCS_ENTRY, ParserAction.COLLECT, ParserState.DCS_INTERMEDIATE);\n table.addMany(r(0x30, 0x3c), ParserState.DCS_ENTRY, ParserAction.PARAM, ParserState.DCS_PARAM);\n table.addMany([0x3c, 0x3d, 0x3e, 0x3f], ParserState.DCS_ENTRY, ParserAction.COLLECT, ParserState.DCS_PARAM);\n table.addMany(EXECUTABLES, ParserState.DCS_IGNORE, ParserAction.IGNORE, ParserState.DCS_IGNORE);\n table.addMany(r(0x20, 0x80), ParserState.DCS_IGNORE, ParserAction.IGNORE, ParserState.DCS_IGNORE);\n table.addMany(r(0x1c, 0x20), ParserState.DCS_IGNORE, ParserAction.IGNORE, ParserState.DCS_IGNORE);\n table.addMany(EXECUTABLES, ParserState.DCS_PARAM, ParserAction.IGNORE, ParserState.DCS_PARAM);\n table.add(0x7f, ParserState.DCS_PARAM, ParserAction.IGNORE, ParserState.DCS_PARAM);\n table.addMany(r(0x1c, 0x20), ParserState.DCS_PARAM, ParserAction.IGNORE, ParserState.DCS_PARAM);\n table.addMany(r(0x30, 0x3c), ParserState.DCS_PARAM, ParserAction.PARAM, ParserState.DCS_PARAM);\n table.addMany([0x3c, 0x3d, 0x3e, 0x3f], ParserState.DCS_PARAM, ParserAction.IGNORE, ParserState.DCS_IGNORE);\n table.addMany(r(0x20, 0x30), ParserState.DCS_PARAM, ParserAction.COLLECT, ParserState.DCS_INTERMEDIATE);\n table.addMany(EXECUTABLES, ParserState.DCS_INTERMEDIATE, ParserAction.IGNORE, ParserState.DCS_INTERMEDIATE);\n table.add(0x7f, ParserState.DCS_INTERMEDIATE, ParserAction.IGNORE, ParserState.DCS_INTERMEDIATE);\n table.addMany(r(0x1c, 0x20), ParserState.DCS_INTERMEDIATE, ParserAction.IGNORE, ParserState.DCS_INTERMEDIATE);\n table.addMany(r(0x20, 0x30), ParserState.DCS_INTERMEDIATE, ParserAction.COLLECT, ParserState.DCS_INTERMEDIATE);\n table.addMany(r(0x30, 0x40), ParserState.DCS_INTERMEDIATE, ParserAction.IGNORE, ParserState.DCS_IGNORE);\n table.addMany(r(0x40, 0x7f), ParserState.DCS_INTERMEDIATE, ParserAction.DCS_HOOK, ParserState.DCS_PASSTHROUGH);\n table.addMany(r(0x40, 0x7f), ParserState.DCS_PARAM, ParserAction.DCS_HOOK, ParserState.DCS_PASSTHROUGH);\n table.addMany(r(0x40, 0x7f), ParserState.DCS_ENTRY, ParserAction.DCS_HOOK, ParserState.DCS_PASSTHROUGH);\n table.addMany(EXECUTABLES, ParserState.DCS_PASSTHROUGH, ParserAction.DCS_PUT, ParserState.DCS_PASSTHROUGH);\n table.addMany(PRINTABLES, ParserState.DCS_PASSTHROUGH, ParserAction.DCS_PUT, ParserState.DCS_PASSTHROUGH);\n table.add(0x7f, ParserState.DCS_PASSTHROUGH, ParserAction.IGNORE, ParserState.DCS_PASSTHROUGH);\n table.addMany([0x1b, 0x9c, 0x18, 0x1a], ParserState.DCS_PASSTHROUGH, ParserAction.DCS_UNHOOK, ParserState.GROUND);\n // special handling of unicode chars\n table.add(NON_ASCII_PRINTABLE, ParserState.GROUND, ParserAction.PRINT, ParserState.GROUND);\n table.add(NON_ASCII_PRINTABLE, ParserState.OSC_STRING, ParserAction.OSC_PUT, ParserState.OSC_STRING);\n table.add(NON_ASCII_PRINTABLE, ParserState.CSI_IGNORE, ParserAction.IGNORE, ParserState.CSI_IGNORE);\n table.add(NON_ASCII_PRINTABLE, ParserState.DCS_IGNORE, ParserAction.IGNORE, ParserState.DCS_IGNORE);\n table.add(NON_ASCII_PRINTABLE, ParserState.DCS_PASSTHROUGH, ParserAction.DCS_PUT, ParserState.DCS_PASSTHROUGH);\n return table;\n})();\n\n\n/**\n * EscapeSequenceParser.\n * This class implements the ANSI/DEC compatible parser described by\n * Paul Williams (https://vt100.net/emu/dec_ansi_parser).\n *\n * To implement custom ANSI compliant escape sequences it is not needed to\n * alter this parser, instead consider registering a custom handler.\n * For non ANSI compliant sequences change the transition table with\n * the optional `transitions` constructor argument and\n * reimplement the `parse` method.\n *\n * This parser is currently hardcoded to operate in ZDM (Zero Default Mode)\n * as suggested by the original parser, thus empty parameters are set to 0.\n * This this is not in line with the latest ECMA-48 specification\n * (ZDM was part of the early specs and got completely removed later on).\n *\n * Other than the original parser from vt100.net this parser supports\n * sub parameters in digital parameters separated by colons. Empty sub parameters\n * are set to -1 (no ZDM for sub parameters).\n *\n * About prefix and intermediate bytes:\n * This parser follows the assumptions of the vt100.net parser with these restrictions:\n * - only one prefix byte is allowed as first parameter byte, byte range 0x3c .. 0x3f\n * - max. two intermediates are respected, byte range 0x20 .. 0x2f\n * Note that this is not in line with ECMA-48 which does not limit either of those.\n * Furthermore ECMA-48 allows the prefix byte range at any param byte position. Currently\n * there are no known sequences that follow the broader definition of the specification.\n *\n * TODO: implement error recovery hook via error handler return values\n */\nexport class EscapeSequenceParser extends Disposable implements IEscapeSequenceParser {\n public initialState: number;\n public currentState: number;\n public precedingCodepoint: number;\n\n // buffers over several parse calls\n protected _params: Params;\n protected _collect: number;\n\n // handler lookup containers\n protected _printHandler: PrintHandlerType;\n protected _executeHandlers: { [flag: number]: ExecuteHandlerType };\n protected _csiHandlers: IHandlerCollection<CsiHandlerType>;\n protected _escHandlers: IHandlerCollection<EscHandlerType>;\n protected _oscParser: IOscParser;\n protected _dcsParser: IDcsParser;\n protected _errorHandler: (state: IParsingState) => IParsingState;\n\n // fallback handlers\n protected _printHandlerFb: PrintFallbackHandlerType;\n protected _executeHandlerFb: ExecuteFallbackHandlerType;\n protected _csiHandlerFb: CsiFallbackHandlerType;\n protected _escHandlerFb: EscFallbackHandlerType;\n protected _errorHandlerFb: (state: IParsingState) => IParsingState;\n\n // parser stack save for async handler support\n protected _parseStack: IParserStackState = {\n state: ParserStackType.NONE,\n handlers: [],\n handlerPos: 0,\n transition: 0,\n chunkPos: 0\n };\n\n constructor(\n protected readonly _transitions: TransitionTable = VT500_TRANSITION_TABLE\n ) {\n super();\n\n this.initialState = ParserState.GROUND;\n this.currentState = this.initialState;\n this._params = new Params(); // defaults to 32 storable params/subparams\n this._params.addParam(0); // ZDM\n this._collect = 0;\n this.precedingCodepoint = 0;\n\n // set default fallback handlers and handler lookup containers\n this._printHandlerFb = (data, start, end): void => { };\n this._executeHandlerFb = (code: number): void => { };\n this._csiHandlerFb = (ident: number, params: IParams): void => { };\n this._escHandlerFb = (ident: number): void => { };\n this._errorHandlerFb = (state: IParsingState): IParsingState => state;\n this._printHandler = this._printHandlerFb;\n this._executeHandlers = Object.create(null);\n this._csiHandlers = Object.create(null);\n this._escHandlers = Object.create(null);\n this._oscParser = new OscParser();\n this._dcsParser = new DcsParser();\n this._errorHandler = this._errorHandlerFb;\n\n // swallow 7bit ST (ESC+\\)\n this.registerEscHandler({ final: '\\\\' }, () => true);\n }\n\n protected _identifier(id: IFunctionIdentifier, finalRange: number[] = [0x40, 0x7e]): number {\n let res = 0;\n if (id.prefix) {\n if (id.prefix.length > 1) {\n throw new Error('only one byte as prefix supported');\n }\n res = id.prefix.charCodeAt(0);\n if (res && 0x3c > res || res > 0x3f) {\n throw new Error('prefix must be in range 0x3c .. 0x3f');\n }\n }\n if (id.intermediates) {\n if (id.intermediates.length > 2) {\n throw new Error('only two bytes as intermediates are supported');\n }\n for (let i = 0; i < id.intermediates.length; ++i) {\n const intermediate = id.intermediates.charCodeAt(i);\n if (0x20 > intermediate || intermediate > 0x2f) {\n throw new Error('intermediate must be in range 0x20 .. 0x2f');\n }\n res <<= 8;\n res |= intermediate;\n }\n }\n if (id.final.length !== 1) {\n throw new Error('final must be a single byte');\n }\n const finalCode = id.final.charCodeAt(0);\n if (finalRange[0] > finalCode || finalCode > finalRange[1]) {\n throw new Error(`final must be in range ${finalRange[0]} .. ${finalRange[1]}`);\n }\n res <<= 8;\n res |= finalCode;\n\n return res;\n }\n\n public identToString(ident: number): string {\n const res: string[] = [];\n while (ident) {\n res.push(String.fromCharCode(ident & 0xFF));\n ident >>= 8;\n }\n return res.reverse().join('');\n }\n\n public dispose(): void {\n this._csiHandlers = Object.create(null);\n this._executeHandlers = Object.create(null);\n this._escHandlers = Object.create(null);\n this._oscParser.dispose();\n this._dcsParser.dispose();\n }\n\n public setPrintHandler(handler: PrintHandlerType): void {\n this._printHandler = handler;\n }\n public clearPrintHandler(): void {\n this._printHandler = this._printHandlerFb;\n }\n\n public registerEscHandler(id: IFunctionIdentifier, handler: EscHandlerType): IDisposable {\n const ident = this._identifier(id, [0x30, 0x7e]);\n if (this._escHandlers[ident] === undefined) {\n this._escHandlers[ident] = [];\n }\n const handlerList = this._escHandlers[ident];\n handlerList.push(handler);\n return {\n dispose: () => {\n const handlerIndex = handlerList.indexOf(handler);\n if (handlerIndex !== -1) {\n handlerList.splice(handlerIndex, 1);\n }\n }\n };\n }\n public clearEscHandler(id: IFunctionIdentifier): void {\n if (this._escHandlers[this._identifier(id, [0x30, 0x7e])]) delete this._escHandlers[this._identifier(id, [0x30, 0x7e])];\n }\n public setEscHandlerFallback(handler: EscFallbackHandlerType): void {\n this._escHandlerFb = handler;\n }\n\n public setExecuteHandler(flag: string, handler: ExecuteHandlerType): void {\n this._executeHandlers[flag.charCodeAt(0)] = handler;\n }\n public clearExecuteHandler(flag: string): void {\n if (this._executeHandlers[flag.charCodeAt(0)]) delete this._executeHandlers[flag.charCodeAt(0)];\n }\n public setExecuteHandlerFallback(handler: ExecuteFallbackHandlerType): void {\n this._executeHandlerFb = handler;\n }\n\n public registerCsiHandler(id: IFunctionIdentifier, handler: CsiHandlerType): IDisposable {\n const ident = this._identifier(id);\n if (this._csiHandlers[ident] === undefined) {\n this._csiHandlers[ident] = [];\n }\n const handlerList = this._csiHandlers[ident];\n handlerList.push(handler);\n return {\n dispose: () => {\n const handlerIndex = handlerList.indexOf(handler);\n if (handlerIndex !== -1) {\n handlerList.splice(handlerIndex, 1);\n }\n }\n };\n }\n public clearCsiHandler(id: IFunctionIdentifier): void {\n if (this._csiHandlers[this._identifier(id)]) delete this._csiHandlers[this._identifier(id)];\n }\n public setCsiHandlerFallback(callback: (ident: number, params: IParams) => void): void {\n this._csiHandlerFb = callback;\n }\n\n public registerDcsHandler(id: IFunctionIdentifier, handler: IDcsHandler): IDisposable {\n return this._dcsParser.registerHandler(this._identifier(id), handler);\n }\n public clearDcsHandler(id: IFunctionIdentifier): void {\n this._dcsParser.clearHandler(this._identifier(id));\n }\n public setDcsHandlerFallback(handler: DcsFallbackHandlerType): void {\n this._dcsParser.setHandlerFallback(handler);\n }\n\n public registerOscHandler(ident: number, handler: IOscHandler): IDisposable {\n return this._oscParser.registerHandler(ident, handler);\n }\n public clearOscHandler(ident: number): void {\n this._oscParser.clearHandler(ident);\n }\n public setOscHandlerFallback(handler: OscFallbackHandlerType): void {\n this._oscParser.setHandlerFallback(handler);\n }\n\n public setErrorHandler(callback: (state: IParsingState) => IParsingState): void {\n this._errorHandler = callback;\n }\n public clearErrorHandler(): void {\n this._errorHandler = this._errorHandlerFb;\n }\n\n /**\n * Reset parser to initial values.\n *\n * This can also be used to lift the improper continuation error condition\n * when dealing with async handlers. Use this only as a last resort to silence\n * that error when the terminal has no pending data to be processed. Note that\n * the interrupted async handler might continue its work in the future messing\n * up the terminal state even further.\n */\n public reset(): void {\n this.currentState = this.initialState;\n this._oscParser.reset();\n this._dcsParser.reset();\n this._params.reset();\n this._params.addParam(0); // ZDM\n this._collect = 0;\n this.precedingCodepoint = 0;\n // abort pending continuation from async handler\n // Here the RESET type indicates, that the next parse call will\n // ignore any saved stack, instead continues sync with next codepoint from GROUND\n if (this._parseStack.state !== ParserStackType.NONE) {\n this._parseStack.state = ParserStackType.RESET;\n this._parseStack.handlers = []; // also release handlers ref\n }\n }\n\n /**\n * Async parse support.\n */\n protected _preserveStack(\n state: ParserStackType,\n handlers: ResumableHandlersType,\n handlerPos: number,\n transition: number,\n chunkPos: number\n ): void {\n this._parseStack.state = state;\n this._parseStack.handlers = handlers;\n this._parseStack.handlerPos = handlerPos;\n this._parseStack.transition = transition;\n this._parseStack.chunkPos = chunkPos;\n }\n\n /**\n * Parse UTF32 codepoints in `data` up to `length`.\n *\n * Note: For several actions with high data load the parsing is optimized\n * by using local read ahead loops with hardcoded conditions to\n * avoid costly table lookups. Make sure that any change of table values\n * will be reflected in the loop conditions as well and vice versa.\n * Affected states/actions:\n * - GROUND:PRINT\n * - CSI_PARAM:PARAM\n * - DCS_PARAM:PARAM\n * - OSC_STRING:OSC_PUT\n * - DCS_PASSTHROUGH:DCS_PUT\n *\n * Note on asynchronous handler support:\n * Any handler returning a promise will be treated as asynchronous.\n * To keep the in-band blocking working for async handlers, `parse` pauses execution,\n * creates a stack save and returns the promise to the caller.\n * For proper continuation of the paused state it is important\n * to await the promise resolving. On resolve the parse must be repeated\n * with the same chunk of data and the resolved value in `promiseResult`\n * until no promise is returned.\n *\n * Important: With only sync handlers defined, parsing is completely synchronous as well.\n * As soon as an async handler is involved, synchronous parsing is not possible anymore.\n *\n * Boilerplate for proper parsing of multiple chunks with async handlers:\n *\n * ```typescript\n * async function parseMultipleChunks(chunks: Uint32Array[]): Promise<void> {\n * for (const chunk of chunks) {\n * let result: void | Promise<boolean>;\n * let prev: boolean | undefined;\n * while (result = parser.parse(chunk, chunk.length, prev)) {\n * prev = await result;\n * }\n * }\n * // finished parsing all chunks...\n * }\n * ```\n */\n public parse(data: Uint32Array, length: number, promiseResult?: boolean): void | Promise<boolean> {\n let code = 0;\n let transition = 0;\n let start = 0;\n let handlerResult: void | boolean | Promise<boolean>;\n\n // resume from async handler\n if (this._parseStack.state) {\n // allow sync parser reset even in continuation mode\n // Note: can be used to recover parser from improper continuation error below\n if (this._parseStack.state === ParserStackType.RESET) {\n this._parseStack.state = ParserStackType.NONE;\n start = this._parseStack.chunkPos + 1; // continue with next codepoint in GROUND\n } else {\n if (promiseResult === undefined || this._parseStack.state === ParserStackType.FAIL) {\n /**\n * Reject further parsing on improper continuation after pausing.\n * This is a really bad condition with screwed up execution order and prolly messed up\n * terminal state, therefore we exit hard with an exception and reject any further parsing.\n *\n * Note: With `Terminal.write` usage this exception should never occur, as the top level\n * calls are guaranteed to handle async conditions properly. If you ever encounter this\n * exception in your terminal integration it indicates, that you injected data chunks to\n * `InputHandler.parse` or `EscapeSequenceParser.parse` synchronously without waiting for\n * continuation of a running async handler.\n *\n * It is possible to get rid of this error by calling `reset`. But dont rely on that,\n * as the pending async handler still might mess up the terminal later. Instead fix the faulty\n * async handling, so this error will not be thrown anymore.\n */\n this._parseStack.state = ParserStackType.FAIL;\n throw new Error('improper continuation due to previous async handler, giving up parsing');\n }\n\n // we have to resume the old handler loop if:\n // - return value of the promise was `false`\n // - handlers are not exhausted yet\n const handlers = this._parseStack.handlers;\n let handlerPos = this._parseStack.handlerPos - 1;\n switch (this._parseStack.state) {\n case ParserStackType.CSI:\n if (promiseResult === false && handlerPos > -1) {\n for (; handlerPos >= 0; handlerPos--) {\n handlerResult = (handlers as CsiHandlerType[])[handlerPos](this._params);\n if (handlerResult === true) {\n break;\n } else if (handlerResult instanceof Promise) {\n this._parseStack.handlerPos = handlerPos;\n return handlerResult;\n }\n }\n }\n this._parseStack.handlers = [];\n break;\n case ParserStackType.ESC:\n if (promiseResult === false && handlerPos > -1) {\n for (; handlerPos >= 0; handlerPos--) {\n handlerResult = (handlers as EscHandlerType[])[handlerPos]();\n if (handlerResult === true) {\n break;\n } else if (handlerResult instanceof Promise) {\n this._parseStack.handlerPos = handlerPos;\n return handlerResult;\n }\n }\n }\n this._parseStack.handlers = [];\n break;\n case ParserStackType.DCS:\n code = data[this._parseStack.chunkPos];\n handlerResult = this._dcsParser.unhook(code !== 0x18 && code !== 0x1a, promiseResult);\n if (handlerResult) {\n return handlerResult;\n }\n if (code === 0x1b) this._parseStack.transition |= ParserState.ESCAPE;\n this._params.reset();\n this._params.addParam(0); // ZDM\n this._collect = 0;\n break;\n case ParserStackType.OSC:\n code = data[this._parseStack.chunkPos];\n handlerResult = this._oscParser.end(code !== 0x18 && code !== 0x1a, promiseResult);\n if (handlerResult) {\n return handlerResult;\n }\n if (code === 0x1b) this._parseStack.transition |= ParserState.ESCAPE;\n this._params.reset();\n this._params.addParam(0); // ZDM\n this._collect = 0;\n break;\n }\n // cleanup before continuing with the main sync loop\n this._parseStack.state = ParserStackType.NONE;\n start = this._parseStack.chunkPos + 1;\n this.precedingCodepoint = 0;\n this.currentState = this._parseStack.transition & TableAccess.TRANSITION_STATE_MASK;\n }\n }\n\n // continue with main sync loop\n\n // process input string\n for (let i = start; i < length; ++i) {\n code = data[i];\n\n // normal transition & action lookup\n transition = this._transitions.table[this.currentState << TableAccess.INDEX_STATE_SHIFT | (code < 0xa0 ? code : NON_ASCII_PRINTABLE)];\n switch (transition >> TableAccess.TRANSITION_ACTION_SHIFT) {\n case ParserAction.PRINT:\n // read ahead with loop unrolling\n // Note: 0x20 (SP) is included, 0x7F (DEL) is excluded\n for (let j = i + 1; ; ++j) {\n if (j >= length || (code = data[j]) < 0x20 || (code > 0x7e && code < NON_ASCII_PRINTABLE)) {\n this._printHandler(data, i, j);\n i = j - 1;\n break;\n }\n if (++j >= length || (code = data[j]) < 0x20 || (code > 0x7e && code < NON_ASCII_PRINTABLE)) {\n this._printHandler(data, i, j);\n i = j - 1;\n break;\n }\n if (++j >= length || (code = data[j]) < 0x20 || (code > 0x7e && code < NON_ASCII_PRINTABLE)) {\n this._printHandler(data, i, j);\n i = j - 1;\n break;\n }\n if (++j >= length || (code = data[j]) < 0x20 || (code > 0x7e && code < NON_ASCII_PRINTABLE)) {\n this._printHandler(data, i, j);\n i = j - 1;\n break;\n }\n }\n break;\n case ParserAction.EXECUTE:\n if (this._executeHandlers[code]) this._executeHandlers[code]();\n else this._executeHandlerFb(code);\n this.precedingCodepoint = 0;\n break;\n case ParserAction.IGNORE:\n break;\n case ParserAction.ERROR:\n const inject: IParsingState = this._errorHandler(\n {\n position: i,\n code,\n currentState: this.currentState,\n collect: this._collect,\n params: this._params,\n abort: false\n });\n if (inject.abort) return;\n // inject values: currently not implemented\n break;\n case ParserAction.CSI_DISPATCH:\n // Trigger CSI Handler\n const handlers = this._csiHandlers[this._collect << 8 | code];\n let j = handlers ? handlers.length - 1 : -1;\n for (; j >= 0; j--) {\n // true means success and to stop bubbling\n // a promise indicates an async handler that needs to finish before progressing\n handlerResult = handlers[j](this._params);\n if (handlerResult === true) {\n break;\n } else if (handlerResult instanceof Promise) {\n this._preserveStack(ParserStackType.CSI, handlers, j, transition, i);\n return handlerResult;\n }\n }\n if (j < 0) {\n this._csiHandlerFb(this._collect << 8 | code, this._params);\n }\n this.precedingCodepoint = 0;\n break;\n case ParserAction.PARAM:\n // inner loop: digits (0x30 - 0x39) and ; (0x3b) and : (0x3a)\n do {\n switch (code) {\n case 0x3b:\n this._params.addParam(0); // ZDM\n break;\n case 0x3a:\n this._params.addSubParam(-1);\n break;\n default: // 0x30 - 0x39\n this._params.addDigit(code - 48);\n }\n } while (++i < length && (code = data[i]) > 0x2f && code < 0x3c);\n i--;\n break;\n case ParserAction.COLLECT:\n this._collect <<= 8;\n this._collect |= code;\n break;\n case ParserAction.ESC_DISPATCH:\n const handlersEsc = this._escHandlers[this._collect << 8 | code];\n let jj = handlersEsc ? handlersEsc.length - 1 : -1;\n for (; jj >= 0; jj--) {\n // true means success and to stop bubbling\n // a promise indicates an async handler that needs to finish before progressing\n handlerResult = handlersEsc[jj]();\n if (handlerResult === true) {\n break;\n } else if (handlerResult instanceof Promise) {\n this._preserveStack(ParserStackType.ESC, handlersEsc, jj, transition, i);\n return handlerResult;\n }\n }\n if (jj < 0) {\n this._escHandlerFb(this._collect << 8 | code);\n }\n this.precedingCodepoint = 0;\n break;\n case ParserAction.CLEAR:\n this._params.reset();\n this._params.addParam(0); // ZDM\n this._collect = 0;\n break;\n case ParserAction.DCS_HOOK:\n this._dcsParser.hook(this._collect << 8 | code, this._params);\n break;\n case ParserAction.DCS_PUT:\n // inner loop - exit DCS_PUT: 0x18, 0x1a, 0x1b, 0x7f, 0x80 - 0x9f\n // unhook triggered by: 0x1b, 0x9c (success) and 0x18, 0x1a (abort)\n for (let j = i + 1; ; ++j) {\n if (j >= length || (code = data[j]) === 0x18 || code === 0x1a || code === 0x1b || (code > 0x7f && code < NON_ASCII_PRINTABLE)) {\n this._dcsParser.put(data, i, j);\n i = j - 1;\n break;\n }\n }\n break;\n case ParserAction.DCS_UNHOOK:\n handlerResult = this._dcsParser.unhook(code !== 0x18 && code !== 0x1a);\n if (handlerResult) {\n this._preserveStack(ParserStackType.DCS, [], 0, transition, i);\n return handlerResult;\n }\n if (code === 0x1b) transition |= ParserState.ESCAPE;\n this._params.reset();\n this._params.addParam(0); // ZDM\n this._collect = 0;\n this.precedingCodepoint = 0;\n break;\n case ParserAction.OSC_START:\n this._oscParser.start();\n break;\n case ParserAction.OSC_PUT:\n // inner loop: 0x20 (SP) included, 0x7F (DEL) included\n for (let j = i + 1; ; j++) {\n if (j >= length || (code = data[j]) < 0x20 || (code > 0x7f && code < NON_ASCII_PRINTABLE)) {\n this._oscParser.put(data, i, j);\n i = j - 1;\n break;\n }\n }\n break;\n case ParserAction.OSC_END:\n handlerResult = this._oscParser.end(code !== 0x18 && code !== 0x1a);\n if (handlerResult) {\n this._preserveStack(ParserStackType.OSC, [], 0, transition, i);\n return handlerResult;\n }\n if (code === 0x1b) transition |= ParserState.ESCAPE;\n this._params.reset();\n this._params.addParam(0); // ZDM\n this._collect = 0;\n this.precedingCodepoint = 0;\n break;\n }\n this.currentState = transition & TableAccess.TRANSITION_STATE_MASK;\n }\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IOscHandler, IHandlerCollection, OscFallbackHandlerType, IOscParser, ISubParserStackState } from 'common/parser/Types';\nimport { OscState, PAYLOAD_LIMIT } from 'common/parser/Constants';\nimport { utf32ToString } from 'common/input/TextDecoder';\nimport { IDisposable } from 'common/Types';\n\nconst EMPTY_HANDLERS: IOscHandler[] = [];\n\nexport class OscParser implements IOscParser {\n private _state = OscState.START;\n private _active = EMPTY_HANDLERS;\n private _id = -1;\n private _handlers: IHandlerCollection<IOscHandler> = Object.create(null);\n private _handlerFb: OscFallbackHandlerType = () => { };\n private _stack: ISubParserStackState = {\n paused: false,\n loopPosition: 0,\n fallThrough: false\n };\n\n public registerHandler(ident: number, handler: IOscHandler): IDisposable {\n if (this._handlers[ident] === undefined) {\n this._handlers[ident] = [];\n }\n const handlerList = this._handlers[ident];\n handlerList.push(handler);\n return {\n dispose: () => {\n const handlerIndex = handlerList.indexOf(handler);\n if (handlerIndex !== -1) {\n handlerList.splice(handlerIndex, 1);\n }\n }\n };\n }\n public clearHandler(ident: number): void {\n if (this._handlers[ident]) delete this._handlers[ident];\n }\n public setHandlerFallback(handler: OscFallbackHandlerType): void {\n this._handlerFb = handler;\n }\n\n public dispose(): void {\n this._handlers = Object.create(null);\n this._handlerFb = () => { };\n this._active = EMPTY_HANDLERS;\n }\n\n public reset(): void {\n // force cleanup handlers if payload was already sent\n if (this._state === OscState.PAYLOAD) {\n for (let j = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; j >= 0; --j) {\n this._active[j].end(false);\n }\n }\n this._stack.paused = false;\n this._active = EMPTY_HANDLERS;\n this._id = -1;\n this._state = OscState.START;\n }\n\n private _start(): void {\n this._active = this._handlers[this._id] || EMPTY_HANDLERS;\n if (!this._active.length) {\n this._handlerFb(this._id, 'START');\n } else {\n for (let j = this._active.length - 1; j >= 0; j--) {\n this._active[j].start();\n }\n }\n }\n\n private _put(data: Uint32Array, start: number, end: number): void {\n if (!this._active.length) {\n this._handlerFb(this._id, 'PUT', utf32ToString(data, start, end));\n } else {\n for (let j = this._active.length - 1; j >= 0; j--) {\n this._active[j].put(data, start, end);\n }\n }\n }\n\n public start(): void {\n // always reset leftover handlers\n this.reset();\n this._state = OscState.ID;\n }\n\n /**\n * Put data to current OSC command.\n * Expects the identifier of the OSC command in the form\n * OSC id ; payload ST/BEL\n * Payload chunks are not further processed and get\n * directly passed to the handlers.\n */\n public put(data: Uint32Array, start: number, end: number): void {\n if (this._state === OscState.ABORT) {\n return;\n }\n if (this._state === OscState.ID) {\n while (start < end) {\n const code = data[start++];\n if (code === 0x3b) {\n this._state = OscState.PAYLOAD;\n this._start();\n break;\n }\n if (code < 0x30 || 0x39 < code) {\n this._state = OscState.ABORT;\n return;\n }\n if (this._id === -1) {\n this._id = 0;\n }\n this._id = this._id * 10 + code - 48;\n }\n }\n if (this._state === OscState.PAYLOAD && end - start > 0) {\n this._put(data, start, end);\n }\n }\n\n /**\n * Indicates end of an OSC command.\n * Whether the OSC got aborted or finished normally\n * is indicated by `success`.\n */\n public end(success: boolean, promiseResult: boolean = true): void | Promise<boolean> {\n if (this._state === OscState.START) {\n return;\n }\n // do nothing if command was faulty\n if (this._state !== OscState.ABORT) {\n // if we are still in ID state and get an early end\n // means that the command has no payload thus we still have\n // to announce START and send END right after\n if (this._state === OscState.ID) {\n this._start();\n }\n\n if (!this._active.length) {\n this._handlerFb(this._id, 'END', success);\n } else {\n let handlerResult: boolean | Promise<boolean> = false;\n let j = this._active.length - 1;\n let fallThrough = false;\n if (this._stack.paused) {\n j = this._stack.loopPosition - 1;\n handlerResult = promiseResult;\n fallThrough = this._stack.fallThrough;\n this._stack.paused = false;\n }\n if (!fallThrough && handlerResult === false) {\n for (; j >= 0; j--) {\n handlerResult = this._active[j].end(success);\n if (handlerResult === true) {\n break;\n } else if (handlerResult instanceof Promise) {\n this._stack.paused = true;\n this._stack.loopPosition = j;\n this._stack.fallThrough = false;\n return handlerResult;\n }\n }\n j--;\n }\n // cleanup left over handlers\n // we always have to call .end for proper cleanup,\n // here we use `success` to indicate whether a handler should execute\n for (; j >= 0; j--) {\n handlerResult = this._active[j].end(false);\n if (handlerResult instanceof Promise) {\n this._stack.paused = true;\n this._stack.loopPosition = j;\n this._stack.fallThrough = true;\n return handlerResult;\n }\n }\n }\n\n }\n this._active = EMPTY_HANDLERS;\n this._id = -1;\n this._state = OscState.START;\n }\n}\n\n/**\n * Convenient class to allow attaching string based handler functions\n * as OSC handlers.\n */\nexport class OscHandler implements IOscHandler {\n private _data = '';\n private _hitLimit: boolean = false;\n\n constructor(private _handler: (data: string) => boolean | Promise<boolean>) { }\n\n public start(): void {\n this._data = '';\n this._hitLimit = false;\n }\n\n public put(data: Uint32Array, start: number, end: number): void {\n if (this._hitLimit) {\n return;\n }\n this._data += utf32ToString(data, start, end);\n if (this._data.length > PAYLOAD_LIMIT) {\n this._data = '';\n this._hitLimit = true;\n }\n }\n\n public end(success: boolean): boolean | Promise<boolean> {\n let ret: boolean | Promise<boolean> = false;\n if (this._hitLimit) {\n ret = false;\n } else if (success) {\n ret = this._handler(this._data);\n if (ret instanceof Promise) {\n // need to hold data until `ret` got resolved\n // dont care for errors, data will be freed anyway on next start\n return ret.then(res => {\n this._data = '';\n this._hitLimit = false;\n return res;\n });\n }\n }\n this._data = '';\n this._hitLimit = false;\n return ret;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\nimport { IParams, ParamsArray } from 'common/parser/Types';\n\n// max value supported for a single param/subparam (clamped to positive int32 range)\nconst MAX_VALUE = 0x7FFFFFFF;\n// max allowed subparams for a single sequence (hardcoded limitation)\nconst MAX_SUBPARAMS = 256;\n\n/**\n * Params storage class.\n * This type is used by the parser to accumulate sequence parameters and sub parameters\n * and transmit them to the input handler actions.\n *\n * NOTES:\n * - params object for action handlers is borrowed, use `.toArray` or `.clone` to get a copy\n * - never read beyond `params.length - 1` (likely to contain arbitrary data)\n * - `.getSubParams` returns a borrowed typed array, use `.getSubParamsAll` for cloned sub params\n * - hardcoded limitations:\n * - max. value for a single (sub) param is 2^31 - 1 (greater values are clamped to that)\n * - max. 256 sub params possible\n * - negative values are not allowed beside -1 (placeholder for default value)\n *\n * About ZDM (Zero Default Mode):\n * ZDM is not orchestrated by this class. If the parser is in ZDM,\n * it should add 0 for empty params, otherwise -1. This does not apply\n * to subparams, empty subparams should always be added with -1.\n */\nexport class Params implements IParams {\n // params store and length\n public params: Int32Array;\n public length: number;\n\n // sub params store and length\n protected _subParams: Int32Array;\n protected _subParamsLength: number;\n\n // sub params offsets from param: param idx --> [start, end] offset\n private _subParamsIdx: Uint16Array;\n private _rejectDigits: boolean;\n private _rejectSubDigits: boolean;\n private _digitIsSub: boolean;\n\n /**\n * Create a `Params` type from JS array representation.\n */\n public static fromArray(values: ParamsArray): Params {\n const params = new Params();\n if (!values.length) {\n return params;\n }\n // skip leading sub params\n for (let i = (Array.isArray(values[0])) ? 1 : 0; i < values.length; ++i) {\n const value = values[i];\n if (Array.isArray(value)) {\n for (let k = 0; k < value.length; ++k) {\n params.addSubParam(value[k]);\n }\n } else {\n params.addParam(value);\n }\n }\n return params;\n }\n\n /**\n * @param maxLength max length of storable parameters\n * @param maxSubParamsLength max length of storable sub parameters\n */\n constructor(public maxLength: number = 32, public maxSubParamsLength: number = 32) {\n if (maxSubParamsLength > MAX_SUBPARAMS) {\n throw new Error('maxSubParamsLength must not be greater than 256');\n }\n this.params = new Int32Array(maxLength);\n this.length = 0;\n this._subParams = new Int32Array(maxSubParamsLength);\n this._subParamsLength = 0;\n this._subParamsIdx = new Uint16Array(maxLength);\n this._rejectDigits = false;\n this._rejectSubDigits = false;\n this._digitIsSub = false;\n }\n\n /**\n * Clone object.\n */\n public clone(): Params {\n const newParams = new Params(this.maxLength, this.maxSubParamsLength);\n newParams.params.set(this.params);\n newParams.length = this.length;\n newParams._subParams.set(this._subParams);\n newParams._subParamsLength = this._subParamsLength;\n newParams._subParamsIdx.set(this._subParamsIdx);\n newParams._rejectDigits = this._rejectDigits;\n newParams._rejectSubDigits = this._rejectSubDigits;\n newParams._digitIsSub = this._digitIsSub;\n return newParams;\n }\n\n /**\n * Get a JS array representation of the current parameters and sub parameters.\n * The array is structured as follows:\n * sequence: \"1;2:3:4;5::6\"\n * array : [1, 2, [3, 4], 5, [-1, 6]]\n */\n public toArray(): ParamsArray {\n const res: ParamsArray = [];\n for (let i = 0; i < this.length; ++i) {\n res.push(this.params[i]);\n const start = this._subParamsIdx[i] >> 8;\n const end = this._subParamsIdx[i] & 0xFF;\n if (end - start > 0) {\n res.push(Array.prototype.slice.call(this._subParams, start, end));\n }\n }\n return res;\n }\n\n /**\n * Reset to initial empty state.\n */\n public reset(): void {\n this.length = 0;\n this._subParamsLength = 0;\n this._rejectDigits = false;\n this._rejectSubDigits = false;\n this._digitIsSub = false;\n }\n\n /**\n * Add a parameter value.\n * `Params` only stores up to `maxLength` parameters, any later\n * parameter will be ignored.\n * Note: VT devices only stored up to 16 values, xterm seems to\n * store up to 30.\n */\n public addParam(value: number): void {\n this._digitIsSub = false;\n if (this.length >= this.maxLength) {\n this._rejectDigits = true;\n return;\n }\n if (value < -1) {\n throw new Error('values lesser than -1 are not allowed');\n }\n this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength;\n this.params[this.length++] = value > MAX_VALUE ? MAX_VALUE : value;\n }\n\n /**\n * Add a sub parameter value.\n * The sub parameter is automatically associated with the last parameter value.\n * Thus it is not possible to add a subparameter without any parameter added yet.\n * `Params` only stores up to `subParamsLength` sub parameters, any later\n * sub parameter will be ignored.\n */\n public addSubParam(value: number): void {\n this._digitIsSub = true;\n if (!this.length) {\n return;\n }\n if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength) {\n this._rejectSubDigits = true;\n return;\n }\n if (value < -1) {\n throw new Error('values lesser than -1 are not allowed');\n }\n this._subParams[this._subParamsLength++] = value > MAX_VALUE ? MAX_VALUE : value;\n this._subParamsIdx[this.length - 1]++;\n }\n\n /**\n * Whether parameter at index `idx` has sub parameters.\n */\n public hasSubParams(idx: number): boolean {\n return ((this._subParamsIdx[idx] & 0xFF) - (this._subParamsIdx[idx] >> 8) > 0);\n }\n\n /**\n * Return sub parameters for parameter at index `idx`.\n * Note: The values are borrowed, thus you need to copy\n * the values if you need to hold them in nonlocal scope.\n */\n public getSubParams(idx: number): Int32Array | null {\n const start = this._subParamsIdx[idx] >> 8;\n const end = this._subParamsIdx[idx] & 0xFF;\n if (end - start > 0) {\n return this._subParams.subarray(start, end);\n }\n return null;\n }\n\n /**\n * Return all sub parameters as {idx: subparams} mapping.\n * Note: The values are not borrowed.\n */\n public getSubParamsAll(): {[idx: number]: Int32Array} {\n const result: {[idx: number]: Int32Array} = {};\n for (let i = 0; i < this.length; ++i) {\n const start = this._subParamsIdx[i] >> 8;\n const end = this._subParamsIdx[i] & 0xFF;\n if (end - start > 0) {\n result[i] = this._subParams.slice(start, end);\n }\n }\n return result;\n }\n\n /**\n * Add a single digit value to current parameter.\n * This is used by the parser to account digits on a char by char basis.\n */\n public addDigit(value: number): void {\n let length;\n if (this._rejectDigits\n || !(length = this._digitIsSub ? this._subParamsLength : this.length)\n || (this._digitIsSub && this._rejectSubDigits)\n ) {\n return;\n }\n\n const store = this._digitIsSub ? this._subParams : this.params;\n const cur = store[length - 1];\n store[length - 1] = ~cur ? Math.min(cur * 10 + value, MAX_VALUE) : value;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ITerminalAddon, IDisposable, Terminal } from 'xterm';\n\nexport interface ILoadedAddon {\n instance: ITerminalAddon;\n dispose: () => void;\n isDisposed: boolean;\n}\n\nexport class AddonManager implements IDisposable {\n protected _addons: ILoadedAddon[] = [];\n\n constructor() {\n }\n\n public dispose(): void {\n for (let i = this._addons.length - 1; i >= 0; i--) {\n this._addons[i].instance.dispose();\n }\n }\n\n public loadAddon(terminal: Terminal, instance: ITerminalAddon): void {\n const loadedAddon: ILoadedAddon = {\n instance,\n dispose: instance.dispose,\n isDisposed: false\n };\n this._addons.push(loadedAddon);\n instance.dispose = () => this._wrappedAddonDispose(loadedAddon);\n instance.activate(terminal as any);\n }\n\n private _wrappedAddonDispose(loadedAddon: ILoadedAddon): void {\n if (loadedAddon.isDisposed) {\n // Do nothing if already disposed\n return;\n }\n let index = -1;\n for (let i = 0; i < this._addons.length; i++) {\n if (this._addons[i] === loadedAddon) {\n index = i;\n break;\n }\n }\n if (index === -1) {\n throw new Error('Could not dispose an addon that has not been loaded');\n }\n loadedAddon.isDisposed = true;\n loadedAddon.dispose.apply(loadedAddon.instance);\n this._addons.splice(index, 1);\n }\n}\n","/**\n * Copyright (c) 2021 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBuffer as IBufferApi, IBufferLine as IBufferLineApi, IBufferCell as IBufferCellApi } from 'xterm';\nimport { IBuffer } from 'common/buffer/Types';\nimport { BufferLineApiView } from 'common/public/BufferLineApiView';\nimport { CellData } from 'common/buffer/CellData';\n\nexport class BufferApiView implements IBufferApi {\n constructor(\n private _buffer: IBuffer,\n public readonly type: 'normal' | 'alternate'\n ) { }\n\n public init(buffer: IBuffer): BufferApiView {\n this._buffer = buffer;\n return this;\n }\n\n public get cursorY(): number { return this._buffer.y; }\n public get cursorX(): number { return this._buffer.x; }\n public get viewportY(): number { return this._buffer.ydisp; }\n public get baseY(): number { return this._buffer.ybase; }\n public get length(): number { return this._buffer.lines.length; }\n public getLine(y: number): IBufferLineApi | undefined {\n const line = this._buffer.lines.get(y);\n if (!line) {\n return undefined;\n }\n return new BufferLineApiView(line);\n }\n public getNullCell(): IBufferCellApi { return new CellData(); }\n}\n","/**\n * Copyright (c) 2021 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { CellData } from 'common/buffer/CellData';\nimport { IBufferLine, ICellData } from 'common/Types';\nimport { IBufferCell as IBufferCellApi, IBufferLine as IBufferLineApi } from 'xterm';\n\nexport class BufferLineApiView implements IBufferLineApi {\n constructor(private _line: IBufferLine) { }\n\n public get isWrapped(): boolean { return this._line.isWrapped; }\n public get length(): number { return this._line.length; }\n public getCell(x: number, cell?: IBufferCellApi): IBufferCellApi | undefined {\n if (x < 0 || x >= this._line.length) {\n return undefined;\n }\n\n if (cell) {\n this._line.loadCell(x, cell as ICellData);\n return cell;\n }\n return this._line.loadCell(x, new CellData());\n }\n public translateToString(trimRight?: boolean, startColumn?: number, endColumn?: number): string {\n return this._line.translateToString(trimRight, startColumn, endColumn);\n }\n}\n","/**\n * Copyright (c) 2021 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBuffer as IBufferApi, IBufferNamespace as IBufferNamespaceApi } from 'xterm';\nimport { BufferApiView } from 'common/public/BufferApiView';\nimport { IEvent, EventEmitter } from 'common/EventEmitter';\nimport { ICoreTerminal } from 'common/Types';\n\nexport class BufferNamespaceApi implements IBufferNamespaceApi {\n private _normal: BufferApiView;\n private _alternate: BufferApiView;\n private _onBufferChange = new EventEmitter<IBufferApi>();\n public get onBufferChange(): IEvent<IBufferApi> { return this._onBufferChange.event; }\n\n constructor(private _core: ICoreTerminal) {\n this._normal = new BufferApiView(this._core.buffers.normal, 'normal');\n this._alternate = new BufferApiView(this._core.buffers.alt, 'alternate');\n this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active));\n }\n public get active(): IBufferApi {\n if (this._core.buffers.active === this._core.buffers.normal) { return this.normal; }\n if (this._core.buffers.active === this._core.buffers.alt) { return this.alternate; }\n throw new Error('Active buffer is neither normal nor alternate');\n }\n public get normal(): IBufferApi {\n return this._normal.init(this._core.buffers.normal);\n }\n public get alternate(): IBufferApi {\n return this._alternate.init(this._core.buffers.alt);\n }\n}\n","/**\n * Copyright (c) 2021 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IParams } from 'common/parser/Types';\nimport { IDisposable, IFunctionIdentifier, IParser } from 'xterm';\nimport { ICoreTerminal } from 'common/Types';\n\nexport class ParserApi implements IParser {\n constructor(private _core: ICoreTerminal) { }\n\n public registerCsiHandler(id: IFunctionIdentifier, callback: (params: (number | number[])[]) => boolean | Promise<boolean>): IDisposable {\n return this._core.registerCsiHandler(id, (params: IParams) => callback(params.toArray()));\n }\n public addCsiHandler(id: IFunctionIdentifier, callback: (params: (number | number[])[]) => boolean | Promise<boolean>): IDisposable {\n return this.registerCsiHandler(id, callback);\n }\n public registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: (number | number[])[]) => boolean | Promise<boolean>): IDisposable {\n return this._core.registerDcsHandler(id, (data: string, params: IParams) => callback(data, params.toArray()));\n }\n public addDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: (number | number[])[]) => boolean | Promise<boolean>): IDisposable {\n return this.registerDcsHandler(id, callback);\n }\n public registerEscHandler(id: IFunctionIdentifier, handler: () => boolean | Promise<boolean>): IDisposable {\n return this._core.registerEscHandler(id, handler);\n }\n public addEscHandler(id: IFunctionIdentifier, handler: () => boolean | Promise<boolean>): IDisposable {\n return this.registerEscHandler(id, handler);\n }\n public registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable {\n return this._core.registerOscHandler(ident, callback);\n }\n public addOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable {\n return this.registerOscHandler(ident, callback);\n }\n}\n","/**\n * Copyright (c) 2021 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ICoreTerminal } from 'common/Types';\nimport { IUnicodeHandling, IUnicodeVersionProvider } from 'xterm';\n\nexport class UnicodeApi implements IUnicodeHandling {\n constructor(private _core: ICoreTerminal) { }\n\n public register(provider: IUnicodeVersionProvider): void {\n this._core.unicodeService.register(provider);\n }\n\n public get versions(): string[] {\n return this._core.unicodeService.versions;\n }\n\n public get activeVersion(): string {\n return this._core.unicodeService.activeVersion;\n }\n\n public set activeVersion(version: string) {\n this._core.unicodeService.activeVersion = version;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBufferService, IOptionsService } from 'common/services/Services';\nimport { BufferSet } from 'common/buffer/BufferSet';\nimport { IBufferSet, IBuffer } from 'common/buffer/Types';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { Disposable } from 'common/Lifecycle';\nimport { IAttributeData, IBufferLine, ScrollSource } from 'common/Types';\n\nexport const MINIMUM_COLS = 2; // Less than 2 can mess with wide chars\nexport const MINIMUM_ROWS = 1;\n\nexport class BufferService extends Disposable implements IBufferService {\n public serviceBrand: any;\n\n public cols: number;\n public rows: number;\n public buffers: IBufferSet;\n /** Whether the user is scrolling (locks the scroll position) */\n public isUserScrolling: boolean = false;\n\n private _onResize = new EventEmitter<{ cols: number, rows: number }>();\n public get onResize(): IEvent<{ cols: number, rows: number }> { return this._onResize.event; }\n private _onScroll = new EventEmitter<number>();\n public get onScroll(): IEvent<number> { return this._onScroll.event; }\n\n public get buffer(): IBuffer { return this.buffers.active; }\n\n /** An IBufferline to clone/copy from for new blank lines */\n private _cachedBlankLine: IBufferLine | undefined;\n\n constructor(\n @IOptionsService private _optionsService: IOptionsService\n ) {\n super();\n this.cols = Math.max(_optionsService.rawOptions.cols || 0, MINIMUM_COLS);\n this.rows = Math.max(_optionsService.rawOptions.rows || 0, MINIMUM_ROWS);\n this.buffers = new BufferSet(_optionsService, this);\n }\n\n public dispose(): void {\n super.dispose();\n this.buffers.dispose();\n }\n\n public resize(cols: number, rows: number): void {\n this.cols = cols;\n this.rows = rows;\n this.buffers.resize(cols, rows);\n this.buffers.setupTabStops(this.cols);\n this._onResize.fire({ cols, rows });\n }\n\n public reset(): void {\n this.buffers.reset();\n this.isUserScrolling = false;\n }\n\n /**\n * Scroll the terminal down 1 row, creating a blank line.\n * @param isWrapped Whether the new line is wrapped from the previous line.\n */\n public scroll(eraseAttr: IAttributeData, isWrapped: boolean = false): void {\n const buffer = this.buffer;\n\n let newLine: IBufferLine | undefined;\n newLine = this._cachedBlankLine;\n if (!newLine || newLine.length !== this.cols || newLine.getFg(0) !== eraseAttr.fg || newLine.getBg(0) !== eraseAttr.bg) {\n newLine = buffer.getBlankLine(eraseAttr, isWrapped);\n this._cachedBlankLine = newLine;\n }\n newLine.isWrapped = isWrapped;\n\n const topRow = buffer.ybase + buffer.scrollTop;\n const bottomRow = buffer.ybase + buffer.scrollBottom;\n\n if (buffer.scrollTop === 0) {\n // Determine whether the buffer is going to be trimmed after insertion.\n const willBufferBeTrimmed = buffer.lines.isFull;\n\n // Insert the line using the fastest method\n if (bottomRow === buffer.lines.length - 1) {\n if (willBufferBeTrimmed) {\n buffer.lines.recycle().copyFrom(newLine);\n } else {\n buffer.lines.push(newLine.clone());\n }\n } else {\n buffer.lines.splice(bottomRow + 1, 0, newLine.clone());\n }\n\n // Only adjust ybase and ydisp when the buffer is not trimmed\n if (!willBufferBeTrimmed) {\n buffer.ybase++;\n // Only scroll the ydisp with ybase if the user has not scrolled up\n if (!this.isUserScrolling) {\n buffer.ydisp++;\n }\n } else {\n // When the buffer is full and the user has scrolled up, keep the text\n // stable unless ydisp is right at the top\n if (this.isUserScrolling) {\n buffer.ydisp = Math.max(buffer.ydisp - 1, 0);\n }\n }\n } else {\n // scrollTop is non-zero which means no line will be going to the\n // scrollback, instead we can just shift them in-place.\n const scrollRegionHeight = bottomRow - topRow + 1 /* as it's zero-based */;\n buffer.lines.shiftElements(topRow + 1, scrollRegionHeight - 1, -1);\n buffer.lines.set(bottomRow, newLine.clone());\n }\n\n // Move the viewport to the bottom of the buffer unless the user is\n // scrolling.\n if (!this.isUserScrolling) {\n buffer.ydisp = buffer.ybase;\n }\n\n this._onScroll.fire(buffer.ydisp);\n }\n\n /**\n * Scroll the display of the terminal\n * @param disp The number of lines to scroll down (negative scroll up).\n * @param suppressScrollEvent Don't emit the scroll event as scrollLines. This is used\n * to avoid unwanted events being handled by the viewport when the event was triggered from the\n * viewport originally.\n */\n public scrollLines(disp: number, suppressScrollEvent?: boolean, source?: ScrollSource): void {\n const buffer = this.buffer;\n if (disp < 0) {\n if (buffer.ydisp === 0) {\n return;\n }\n this.isUserScrolling = true;\n } else if (disp + buffer.ydisp >= buffer.ybase) {\n this.isUserScrolling = false;\n }\n\n const oldYdisp = buffer.ydisp;\n buffer.ydisp = Math.max(Math.min(buffer.ydisp + disp, buffer.ybase), 0);\n\n // No change occurred, don't trigger scroll/refresh\n if (oldYdisp === buffer.ydisp) {\n return;\n }\n\n if (!suppressScrollEvent) {\n this._onScroll.fire(buffer.ydisp);\n }\n }\n\n /**\n * Scroll the display of the terminal by a number of pages.\n * @param pageCount The number of pages to scroll (negative scrolls up).\n */\n public scrollPages(pageCount: number): void {\n this.scrollLines(pageCount * (this.rows - 1));\n }\n\n /**\n * Scrolls the display of the terminal to the top.\n */\n public scrollToTop(): void {\n this.scrollLines(-this.buffer.ydisp);\n }\n\n /**\n * Scrolls the display of the terminal to the bottom.\n */\n public scrollToBottom(): void {\n this.scrollLines(this.buffer.ybase - this.buffer.ydisp);\n }\n\n public scrollToLine(line: number): void {\n const scrollAmount = line - this.buffer.ydisp;\n if (scrollAmount !== 0) {\n this.scrollLines(scrollAmount);\n }\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ICharsetService } from 'common/services/Services';\nimport { ICharset } from 'common/Types';\n\nexport class CharsetService implements ICharsetService {\n public serviceBrand: any;\n\n public charset: ICharset | undefined;\n public glevel: number = 0;\n\n private _charsets: (ICharset | undefined)[] = [];\n\n public reset(): void {\n this.charset = undefined;\n this._charsets = [];\n this.glevel = 0;\n }\n\n public setgLevel(g: number): void {\n this.glevel = g;\n this.charset = this._charsets[g];\n }\n\n public setgCharset(g: number, charset: ICharset | undefined): void {\n this._charsets[g] = charset;\n if (this.glevel === g) {\n this.charset = charset;\n }\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\nimport { IBufferService, ICoreService, ICoreMouseService } from 'common/services/Services';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { ICoreMouseProtocol, ICoreMouseEvent, CoreMouseEncoding, CoreMouseEventType, CoreMouseButton, CoreMouseAction } from 'common/Types';\n\n/**\n * Supported default protocols.\n */\nconst DEFAULT_PROTOCOLS: {[key: string]: ICoreMouseProtocol} = {\n /**\n * NONE\n * Events: none\n * Modifiers: none\n */\n NONE: {\n events: CoreMouseEventType.NONE,\n restrict: () => false\n },\n /**\n * X10\n * Events: mousedown\n * Modifiers: none\n */\n X10: {\n events: CoreMouseEventType.DOWN,\n restrict: (e: ICoreMouseEvent) => {\n // no wheel, no move, no up\n if (e.button === CoreMouseButton.WHEEL || e.action !== CoreMouseAction.DOWN) {\n return false;\n }\n // no modifiers\n e.ctrl = false;\n e.alt = false;\n e.shift = false;\n return true;\n }\n },\n /**\n * VT200\n * Events: mousedown / mouseup / wheel\n * Modifiers: all\n */\n VT200: {\n events: CoreMouseEventType.DOWN | CoreMouseEventType.UP | CoreMouseEventType.WHEEL,\n restrict: (e: ICoreMouseEvent) => {\n // no move\n if (e.action === CoreMouseAction.MOVE) {\n return false;\n }\n return true;\n }\n },\n /**\n * DRAG\n * Events: mousedown / mouseup / wheel / mousedrag\n * Modifiers: all\n */\n DRAG: {\n events: CoreMouseEventType.DOWN | CoreMouseEventType.UP | CoreMouseEventType.WHEEL | CoreMouseEventType.DRAG,\n restrict: (e: ICoreMouseEvent) => {\n // no move without button\n if (e.action === CoreMouseAction.MOVE && e.button === CoreMouseButton.NONE) {\n return false;\n }\n return true;\n }\n },\n /**\n * ANY\n * Events: all mouse related events\n * Modifiers: all\n */\n ANY: {\n events:\n CoreMouseEventType.DOWN | CoreMouseEventType.UP | CoreMouseEventType.WHEEL\n | CoreMouseEventType.DRAG | CoreMouseEventType.MOVE,\n restrict: (e: ICoreMouseEvent) => true\n }\n};\n\nconst enum Modifiers {\n SHIFT = 4,\n ALT = 8,\n CTRL = 16\n}\n\n// helper for default encoders to generate the event code.\nfunction eventCode(e: ICoreMouseEvent, isSGR: boolean): number {\n let code = (e.ctrl ? Modifiers.CTRL : 0) | (e.shift ? Modifiers.SHIFT : 0) | (e.alt ? Modifiers.ALT : 0);\n if (e.button === CoreMouseButton.WHEEL) {\n code |= 64;\n code |= e.action;\n } else {\n code |= e.button & 3;\n if (e.button & 4) {\n code |= 64;\n }\n if (e.button & 8) {\n code |= 128;\n }\n if (e.action === CoreMouseAction.MOVE) {\n code |= CoreMouseAction.MOVE;\n } else if (e.action === CoreMouseAction.UP && !isSGR) {\n // special case - only SGR can report button on release\n // all others have to go with NONE\n code |= CoreMouseButton.NONE;\n }\n }\n return code;\n}\n\nconst S = String.fromCharCode;\n\n/**\n * Supported default encodings.\n */\nconst DEFAULT_ENCODINGS: {[key: string]: CoreMouseEncoding} = {\n /**\n * DEFAULT - CSI M Pb Px Py\n * Single byte encoding for coords and event code.\n * Can encode values up to 223 (1-based).\n */\n DEFAULT: (e: ICoreMouseEvent) => {\n const params = [eventCode(e, false) + 32, e.col + 32, e.row + 32];\n // supress mouse report if we exceed addressible range\n // Note this is handled differently by emulators\n // - xterm: sends 0;0 coords instead\n // - vte, konsole: no report\n if (params[0] > 255 || params[1] > 255 || params[2] > 255) {\n return '';\n }\n return `\\x1b[M${S(params[0])}${S(params[1])}${S(params[2])}`;\n },\n /**\n * SGR - CSI < Pb ; Px ; Py M|m\n * No encoding limitation.\n * Can report button on release and works with a well formed sequence.\n */\n SGR: (e: ICoreMouseEvent) => {\n const final = (e.action === CoreMouseAction.UP && e.button !== CoreMouseButton.WHEEL) ? 'm' : 'M';\n return `\\x1b[<${eventCode(e, true)};${e.col};${e.row}${final}`;\n }\n};\n\n/**\n * CoreMouseService\n *\n * Provides mouse tracking reports with different protocols and encodings.\n * - protocols: NONE (default), X10, VT200, DRAG, ANY\n * - encodings: DEFAULT, SGR (UTF8, URXVT removed in #2507)\n *\n * Custom protocols/encodings can be added by `addProtocol` / `addEncoding`.\n * To activate a protocol/encoding, set `activeProtocol` / `activeEncoding`.\n * Switching a protocol will send a notification event `onProtocolChange`\n * with a list of needed events to track.\n *\n * The service handles the mouse tracking state and decides whether to send\n * a tracking report to the backend based on protocol and encoding limitations.\n * To send a mouse event call `triggerMouseEvent`.\n */\nexport class CoreMouseService implements ICoreMouseService {\n private _protocols: {[name: string]: ICoreMouseProtocol} = {};\n private _encodings: {[name: string]: CoreMouseEncoding} = {};\n private _activeProtocol: string = '';\n private _activeEncoding: string = '';\n private _onProtocolChange = new EventEmitter<CoreMouseEventType>();\n private _lastEvent: ICoreMouseEvent | null = null;\n\n constructor(\n @IBufferService private readonly _bufferService: IBufferService,\n @ICoreService private readonly _coreService: ICoreService\n ) {\n // register default protocols and encodings\n for (const name of Object.keys(DEFAULT_PROTOCOLS)) this.addProtocol(name, DEFAULT_PROTOCOLS[name]);\n for (const name of Object.keys(DEFAULT_ENCODINGS)) this.addEncoding(name, DEFAULT_ENCODINGS[name]);\n // call reset to set defaults\n this.reset();\n }\n\n public addProtocol(name: string, protocol: ICoreMouseProtocol): void {\n this._protocols[name] = protocol;\n }\n\n public addEncoding(name: string, encoding: CoreMouseEncoding): void {\n this._encodings[name] = encoding;\n }\n\n public get activeProtocol(): string {\n return this._activeProtocol;\n }\n\n public get areMouseEventsActive(): boolean {\n return this._protocols[this._activeProtocol].events !== 0;\n }\n\n public set activeProtocol(name: string) {\n if (!this._protocols[name]) {\n throw new Error(`unknown protocol \"${name}\"`);\n }\n this._activeProtocol = name;\n this._onProtocolChange.fire(this._protocols[name].events);\n }\n\n public get activeEncoding(): string {\n return this._activeEncoding;\n }\n\n public set activeEncoding(name: string) {\n if (!this._encodings[name]) {\n throw new Error(`unknown encoding \"${name}\"`);\n }\n this._activeEncoding = name;\n }\n\n public reset(): void {\n this.activeProtocol = 'NONE';\n this.activeEncoding = 'DEFAULT';\n this._lastEvent = null;\n }\n\n /**\n * Event to announce changes in mouse tracking.\n */\n public get onProtocolChange(): IEvent<CoreMouseEventType> {\n return this._onProtocolChange.event;\n }\n\n /**\n * Triggers a mouse event to be sent.\n *\n * Returns true if the event passed all protocol restrictions and a report\n * was sent, otherwise false. The return value may be used to decide whether\n * the default event action in the bowser component should be omitted.\n *\n * Note: The method will change values of the given event object\n * to fullfill protocol and encoding restrictions.\n */\n public triggerMouseEvent(e: ICoreMouseEvent): boolean {\n // range check for col/row\n if (e.col < 0 || e.col >= this._bufferService.cols\n || e.row < 0 || e.row >= this._bufferService.rows) {\n return false;\n }\n\n // filter nonsense combinations of button + action\n if (e.button === CoreMouseButton.WHEEL && e.action === CoreMouseAction.MOVE) {\n return false;\n }\n if (e.button === CoreMouseButton.NONE && e.action !== CoreMouseAction.MOVE) {\n return false;\n }\n if (e.button !== CoreMouseButton.WHEEL && (e.action === CoreMouseAction.LEFT || e.action === CoreMouseAction.RIGHT)) {\n return false;\n }\n\n // report 1-based coords\n e.col++;\n e.row++;\n\n // debounce move at grid level\n if (e.action === CoreMouseAction.MOVE && this._lastEvent && this._compareEvents(this._lastEvent, e)) {\n return false;\n }\n\n // apply protocol restrictions\n if (!this._protocols[this._activeProtocol].restrict(e)) {\n return false;\n }\n\n // encode report and send\n const report = this._encodings[this._activeEncoding](e);\n if (report) {\n // always send DEFAULT as binary data\n if (this._activeEncoding === 'DEFAULT') {\n this._coreService.triggerBinaryEvent(report);\n } else {\n this._coreService.triggerDataEvent(report, true);\n }\n }\n\n this._lastEvent = e;\n\n return true;\n }\n\n public explainEvents(events: CoreMouseEventType): {[event: string]: boolean} {\n return {\n down: !!(events & CoreMouseEventType.DOWN),\n up: !!(events & CoreMouseEventType.UP),\n drag: !!(events & CoreMouseEventType.DRAG),\n move: !!(events & CoreMouseEventType.MOVE),\n wheel: !!(events & CoreMouseEventType.WHEEL)\n };\n }\n\n private _compareEvents(e1: ICoreMouseEvent, e2: ICoreMouseEvent): boolean {\n if (e1.col !== e2.col) return false;\n if (e1.row !== e2.row) return false;\n if (e1.button !== e2.button) return false;\n if (e1.action !== e2.action) return false;\n if (e1.ctrl !== e2.ctrl) return false;\n if (e1.alt !== e2.alt) return false;\n if (e1.shift !== e2.shift) return false;\n return true;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ICoreService, ILogService, IOptionsService, IBufferService } from 'common/services/Services';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { IDecPrivateModes, IModes } from 'common/Types';\nimport { clone } from 'common/Clone';\nimport { Disposable } from 'common/Lifecycle';\n\nconst DEFAULT_MODES: IModes = Object.freeze({\n insertMode: false\n});\n\nconst DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({\n applicationCursorKeys: false,\n applicationKeypad: false,\n bracketedPasteMode: false,\n origin: false,\n reverseWraparound: false,\n sendFocus: false,\n wraparound: true // defaults: xterm - true, vt100 - false\n});\n\nexport class CoreService extends Disposable implements ICoreService {\n public serviceBrand: any;\n\n public isCursorInitialized: boolean = false;\n public isCursorHidden: boolean = false;\n public modes: IModes;\n public decPrivateModes: IDecPrivateModes;\n\n // Circular dependency, this must be unset or memory will leak after Terminal.dispose\n private _scrollToBottom: (() => void) | undefined;\n\n private _onData = this.register(new EventEmitter<string>());\n public get onData(): IEvent<string> { return this._onData.event; }\n private _onUserInput = this.register(new EventEmitter<void>());\n public get onUserInput(): IEvent<void> { return this._onUserInput.event; }\n private _onBinary = this.register(new EventEmitter<string>());\n public get onBinary(): IEvent<string> { return this._onBinary.event; }\n\n constructor(\n // TODO: Move this into a service\n scrollToBottom: () => void,\n @IBufferService private readonly _bufferService: IBufferService,\n @ILogService private readonly _logService: ILogService,\n @IOptionsService private readonly _optionsService: IOptionsService\n ) {\n super();\n this._scrollToBottom = scrollToBottom;\n this.register({ dispose: () => this._scrollToBottom = undefined });\n this.modes = clone(DEFAULT_MODES);\n this.decPrivateModes = clone(DEFAULT_DEC_PRIVATE_MODES);\n }\n\n public reset(): void {\n this.modes = clone(DEFAULT_MODES);\n this.decPrivateModes = clone(DEFAULT_DEC_PRIVATE_MODES);\n }\n\n public triggerDataEvent(data: string, wasUserInput: boolean = false): void {\n // Prevents all events to pty process if stdin is disabled\n if (this._optionsService.rawOptions.disableStdin) {\n return;\n }\n\n // Input is being sent to the terminal, the terminal should focus the prompt.\n const buffer = this._bufferService.buffer;\n if (buffer.ybase !== buffer.ydisp) {\n this._scrollToBottom!();\n }\n\n // Fire onUserInput so listeners can react as well (eg. clear selection)\n if (wasUserInput) {\n this._onUserInput.fire();\n }\n\n // Fire onData API\n this._logService.debug(`sending data \"${data}\"`, () => data.split('').map(e => e.charCodeAt(0)));\n this._onData.fire(data);\n }\n\n public triggerBinaryEvent(data: string): void {\n if (this._optionsService.rawOptions.disableStdin) {\n return;\n }\n this._logService.debug(`sending binary \"${data}\"`, () => data.split('').map(e => e.charCodeAt(0)));\n this._onBinary.fire(data);\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IBufferService, IDirtyRowService } from 'common/services/Services';\n\nexport class DirtyRowService implements IDirtyRowService {\n public serviceBrand: any;\n\n private _start!: number;\n private _end!: number;\n\n public get start(): number { return this._start; }\n public get end(): number { return this._end; }\n\n constructor(\n @IBufferService private readonly _bufferService: IBufferService\n ) {\n this.clearRange();\n }\n\n public clearRange(): void {\n this._start = this._bufferService.buffer.y;\n this._end = this._bufferService.buffer.y;\n }\n\n public markDirty(y: number): void {\n if (y < this._start) {\n this._start = y;\n } else if (y > this._end) {\n this._end = y;\n }\n }\n\n public markRangeDirty(y1: number, y2: number): void {\n if (y1 > y2) {\n const temp = y1;\n y1 = y2;\n y2 = temp;\n }\n if (y1 < this._start) {\n this._start = y1;\n }\n if (y2 > this._end) {\n this._end = y2;\n }\n }\n\n public markAllDirty(): void {\n this.markRangeDirty(0, this._bufferService.rows - 1);\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n *\n * This was heavily inspired from microsoft/vscode's dependency injection system (MIT).\n */\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IInstantiationService, IServiceIdentifier } from 'common/services/Services';\nimport { getServiceDependencies } from 'common/services/ServiceRegistry';\n\nexport class ServiceCollection {\n\n private _entries = new Map<IServiceIdentifier<any>, any>();\n\n constructor(...entries: [IServiceIdentifier<any>, any][]) {\n for (const [id, service] of entries) {\n this.set(id, service);\n }\n }\n\n public set<T>(id: IServiceIdentifier<T>, instance: T): T {\n const result = this._entries.get(id);\n this._entries.set(id, instance);\n return result;\n }\n\n public forEach(callback: (id: IServiceIdentifier<any>, instance: any) => any): void {\n this._entries.forEach((value, key) => callback(key, value));\n }\n\n public has(id: IServiceIdentifier<any>): boolean {\n return this._entries.has(id);\n }\n\n public get<T>(id: IServiceIdentifier<T>): T | undefined {\n return this._entries.get(id);\n }\n}\n\nexport class InstantiationService implements IInstantiationService {\n public serviceBrand: undefined;\n\n private readonly _services: ServiceCollection = new ServiceCollection();\n\n constructor() {\n this._services.set(IInstantiationService, this);\n }\n\n public setService<T>(id: IServiceIdentifier<T>, instance: T): void {\n this._services.set(id, instance);\n }\n\n public getService<T>(id: IServiceIdentifier<T>): T | undefined {\n return this._services.get(id);\n }\n\n public createInstance<T>(ctor: any, ...args: any[]): T {\n const serviceDependencies = getServiceDependencies(ctor).sort((a, b) => a.index - b.index);\n\n const serviceArgs: any[] = [];\n for (const dependency of serviceDependencies) {\n const service = this._services.get(dependency.id);\n if (!service) {\n throw new Error(`[createInstance] ${ctor.name} depends on UNKNOWN service ${dependency.id}.`);\n }\n serviceArgs.push(service);\n }\n\n const firstServiceArgPos = serviceDependencies.length > 0 ? serviceDependencies[0].index : args.length;\n\n // check for argument mismatches, adjust static args if needed\n if (args.length !== firstServiceArgPos) {\n throw new Error(`[createInstance] First service dependency of ${ctor.name} at position ${firstServiceArgPos + 1} conflicts with ${args.length} static arguments`);\n }\n\n // now create the instance\n return new ctor(...[...args, ...serviceArgs]);\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { ILogService, IOptionsService, LogLevelEnum } from 'common/services/Services';\n\ntype LogType = (message?: any, ...optionalParams: any[]) => void;\n\ninterface IConsole {\n log: LogType;\n error: LogType;\n info: LogType;\n trace: LogType;\n warn: LogType;\n}\n\n// console is available on both node.js and browser contexts but the common\n// module doesn't depend on them so we need to explicitly declare it.\ndeclare const console: IConsole;\n\nconst optionsKeyToLogLevel: { [key: string]: LogLevelEnum } = {\n debug: LogLevelEnum.DEBUG,\n info: LogLevelEnum.INFO,\n warn: LogLevelEnum.WARN,\n error: LogLevelEnum.ERROR,\n off: LogLevelEnum.OFF\n};\n\nconst LOG_PREFIX = 'xterm.js: ';\n\nexport class LogService implements ILogService {\n public serviceBrand: any;\n\n public logLevel: LogLevelEnum = LogLevelEnum.OFF;\n\n constructor(\n @IOptionsService private readonly _optionsService: IOptionsService\n ) {\n this._updateLogLevel();\n this._optionsService.onOptionChange(key => {\n if (key === 'logLevel') {\n this._updateLogLevel();\n }\n });\n }\n\n private _updateLogLevel(): void {\n this.logLevel = optionsKeyToLogLevel[this._optionsService.rawOptions.logLevel];\n }\n\n private _evalLazyOptionalParams(optionalParams: any[]): void {\n for (let i = 0; i < optionalParams.length; i++) {\n if (typeof optionalParams[i] === 'function') {\n optionalParams[i] = optionalParams[i]();\n }\n }\n }\n\n private _log(type: LogType, message: string, optionalParams: any[]): void {\n this._evalLazyOptionalParams(optionalParams);\n type.call(console, LOG_PREFIX + message, ...optionalParams);\n }\n\n public debug(message: string, ...optionalParams: any[]): void {\n if (this.logLevel <= LogLevelEnum.DEBUG) {\n this._log(console.log, message, optionalParams);\n }\n }\n\n public info(message: string, ...optionalParams: any[]): void {\n if (this.logLevel <= LogLevelEnum.INFO) {\n this._log(console.info, message, optionalParams);\n }\n }\n\n public warn(message: string, ...optionalParams: any[]): void {\n if (this.logLevel <= LogLevelEnum.WARN) {\n this._log(console.warn, message, optionalParams);\n }\n }\n\n public error(message: string, ...optionalParams: any[]): void {\n if (this.logLevel <= LogLevelEnum.ERROR) {\n this._log(console.error, message, optionalParams);\n }\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IOptionsService, ITerminalOptions, FontWeight } from 'common/services/Services';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { isMac } from 'common/Platform';\n\n// Source: https://freesound.org/people/altemark/sounds/45759/\n// This sound is released under the Creative Commons Attribution 3.0 Unported\n// (CC BY 3.0) license. It was created by 'altemark'. No modifications have been\n// made, apart from the conversion to base64.\nexport const DEFAULT_BELL_SOUND = 'data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';\n\nexport const DEFAULT_OPTIONS: Readonly<ITerminalOptions> = {\n cols: 80,\n rows: 24,\n cursorBlink: false,\n cursorStyle: 'block',\n cursorWidth: 1,\n customGlyphs: true,\n bellSound: DEFAULT_BELL_SOUND,\n bellStyle: 'none',\n drawBoldTextInBrightColors: true,\n fastScrollModifier: 'alt',\n fastScrollSensitivity: 5,\n fontFamily: 'courier-new, courier, monospace',\n fontSize: 15,\n fontWeight: 'normal',\n fontWeightBold: 'bold',\n lineHeight: 1.0,\n linkTooltipHoverDuration: 500,\n letterSpacing: 0,\n logLevel: 'info',\n scrollback: 1000,\n scrollSensitivity: 1,\n screenReaderMode: false,\n macOptionIsMeta: false,\n macOptionClickForcesSelection: false,\n minimumContrastRatio: 1,\n disableStdin: false,\n allowProposedApi: true,\n allowTransparency: false,\n tabStopWidth: 8,\n theme: {},\n rightClickSelectsWord: isMac,\n rendererType: 'canvas',\n windowOptions: {},\n windowsMode: false,\n wordSeparator: ' ()[]{}\\',\"`',\n altClickMovesCursor: true,\n convertEol: false,\n termName: 'xterm',\n cancelEvents: false\n};\n\nconst FONT_WEIGHT_OPTIONS: Extract<FontWeight, string>[] = ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'];\n\nexport class OptionsService implements IOptionsService {\n public serviceBrand: any;\n\n public readonly rawOptions: ITerminalOptions;\n public options: ITerminalOptions;\n\n private _onOptionChange = new EventEmitter<string>();\n public get onOptionChange(): IEvent<string> { return this._onOptionChange.event; }\n\n constructor(options: Partial<ITerminalOptions>) {\n // set the default value of each option\n const defaultOptions = { ...DEFAULT_OPTIONS };\n for (const key in options) {\n if (key in defaultOptions) {\n try {\n const newValue = options[key];\n defaultOptions[key] = this._sanitizeAndValidateOption(key, newValue);\n } catch (e) {\n console.error(e);\n }\n }\n }\n\n // set up getters and setters for each option\n this.rawOptions = defaultOptions;\n this.options = { ... defaultOptions };\n this._setupOptions();\n }\n\n private _setupOptions(): void {\n const getter = (propName: string): any => {\n if (!(propName in DEFAULT_OPTIONS)) {\n throw new Error(`No option with key \"${propName}\"`);\n }\n return this.rawOptions[propName];\n };\n\n const setter = (propName: string, value: any): void => {\n if (!(propName in DEFAULT_OPTIONS)) {\n throw new Error(`No option with key \"${propName}\"`);\n }\n\n value = this._sanitizeAndValidateOption(propName, value);\n // Don't fire an option change event if they didn't change\n if (this.rawOptions[propName] !== value) {\n this.rawOptions[propName] = value;\n this._onOptionChange.fire(propName);\n }\n };\n\n for (const propName in this.rawOptions) {\n const desc = {\n get: getter.bind(this, propName),\n set: setter.bind(this, propName)\n };\n Object.defineProperty(this.options, propName, desc);\n }\n }\n\n public setOption(key: string, value: any): void {\n this.options[key] = value;\n }\n\n private _sanitizeAndValidateOption(key: string, value: any): any {\n switch (key) {\n case 'bellStyle':\n case 'cursorStyle':\n case 'rendererType':\n case 'wordSeparator':\n if (!value) {\n value = DEFAULT_OPTIONS[key];\n }\n break;\n case 'fontWeight':\n case 'fontWeightBold':\n if (typeof value === 'number' && 1 <= value && value <= 1000) {\n // already valid numeric value\n break;\n }\n value = FONT_WEIGHT_OPTIONS.includes(value) ? value : DEFAULT_OPTIONS[key];\n break;\n case 'cursorWidth':\n value = Math.floor(value);\n // Fall through for bounds check\n case 'lineHeight':\n case 'tabStopWidth':\n if (value < 1) {\n throw new Error(`${key} cannot be less than 1, value: ${value}`);\n }\n break;\n case 'minimumContrastRatio':\n value = Math.max(1, Math.min(21, Math.round(value * 10) / 10));\n break;\n case 'scrollback':\n value = Math.min(value, 4294967295);\n if (value < 0) {\n throw new Error(`${key} cannot be less than 0, value: ${value}`);\n }\n break;\n case 'fastScrollSensitivity':\n case 'scrollSensitivity':\n if (value <= 0) {\n throw new Error(`${key} cannot be less than or equal to 0, value: ${value}`);\n }\n case 'rows':\n case 'cols':\n if (!value && value !== 0) {\n throw new Error(`${key} must be numeric, value: ${value}`);\n }\n break;\n }\n return value;\n }\n\n public getOption(key: string): any {\n return this.options[key];\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n *\n * This was heavily inspired from microsoft/vscode's dependency injection system (MIT).\n */\n/*---------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n *--------------------------------------------------------------------------------------------*/\n\nimport { IServiceIdentifier } from 'common/services/Services';\n\nconst DI_TARGET = 'di$target';\nconst DI_DEPENDENCIES = 'di$dependencies';\n\nexport const serviceRegistry: Map<string, IServiceIdentifier<any>> = new Map();\n\nexport function getServiceDependencies(ctor: any): { id: IServiceIdentifier<any>, index: number, optional: boolean }[] {\n return ctor[DI_DEPENDENCIES] || [];\n}\n\nexport function createDecorator<T>(id: string): IServiceIdentifier<T> {\n if (serviceRegistry.has(id)) {\n return serviceRegistry.get(id)!;\n }\n\n const decorator: any = function (target: Function, key: string, index: number): any {\n if (arguments.length !== 3) {\n throw new Error('@IServiceName-decorator can only be used to decorate a parameter');\n }\n\n storeServiceDependency(decorator, target, index);\n };\n\n decorator.toString = () => id;\n\n serviceRegistry.set(id, decorator);\n return decorator;\n}\n\nfunction storeServiceDependency(id: Function, target: Function, index: number): void {\n if ((target as any)[DI_TARGET] === target) {\n (target as any)[DI_DEPENDENCIES].push({ id, index });\n } else {\n (target as any)[DI_DEPENDENCIES] = [{ id, index }];\n (target as any)[DI_TARGET] = target;\n }\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\n\nimport { IEvent } from 'common/EventEmitter';\nimport { IBuffer, IBufferSet } from 'common/buffer/Types';\nimport { IDecPrivateModes, ICoreMouseEvent, CoreMouseEncoding, ICoreMouseProtocol, CoreMouseEventType, ICharset, IWindowOptions, IModes, IAttributeData, ScrollSource } from 'common/Types';\nimport { createDecorator } from 'common/services/ServiceRegistry';\n\nexport const IBufferService = createDecorator<IBufferService>('BufferService');\nexport interface IBufferService {\n serviceBrand: undefined;\n\n readonly cols: number;\n readonly rows: number;\n readonly buffer: IBuffer;\n readonly buffers: IBufferSet;\n isUserScrolling: boolean;\n onResize: IEvent<{ cols: number, rows: number }>;\n onScroll: IEvent<number>;\n scroll(eraseAttr: IAttributeData, isWrapped?: boolean): void;\n scrollToBottom(): void;\n scrollToTop(): void;\n scrollToLine(line: number): void;\n scrollLines(disp: number, suppressScrollEvent?: boolean, source?: ScrollSource): void;\n scrollPages(pageCount: number): void;\n resize(cols: number, rows: number): void;\n reset(): void;\n}\n\nexport const ICoreMouseService = createDecorator<ICoreMouseService>('CoreMouseService');\nexport interface ICoreMouseService {\n activeProtocol: string;\n activeEncoding: string;\n areMouseEventsActive: boolean;\n addProtocol(name: string, protocol: ICoreMouseProtocol): void;\n addEncoding(name: string, encoding: CoreMouseEncoding): void;\n reset(): void;\n\n /**\n * Triggers a mouse event to be sent.\n *\n * Returns true if the event passed all protocol restrictions and a report\n * was sent, otherwise false. The return value may be used to decide whether\n * the default event action in the bowser component should be omitted.\n *\n * Note: The method will change values of the given event object\n * to fullfill protocol and encoding restrictions.\n */\n triggerMouseEvent(event: ICoreMouseEvent): boolean;\n\n /**\n * Event to announce changes in mouse tracking.\n */\n onProtocolChange: IEvent<CoreMouseEventType>;\n\n /**\n * Human readable version of mouse events.\n */\n explainEvents(events: CoreMouseEventType): { [event: string]: boolean };\n}\n\nexport const ICoreService = createDecorator<ICoreService>('CoreService');\nexport interface ICoreService {\n serviceBrand: undefined;\n\n /**\n * Initially the cursor will not be visible until the first time the terminal\n * is focused.\n */\n isCursorInitialized: boolean;\n isCursorHidden: boolean;\n\n readonly modes: IModes;\n readonly decPrivateModes: IDecPrivateModes;\n\n readonly onData: IEvent<string>;\n readonly onUserInput: IEvent<void>;\n readonly onBinary: IEvent<string>;\n\n reset(): void;\n\n /**\n * Triggers the onData event in the public API.\n * @param data The data that is being emitted.\n * @param wasFromUser Whether the data originated from the user (as opposed to\n * resulting from parsing incoming data). When true this will also:\n * - Scroll to the bottom of the buffer.s\n * - Fire the `onUserInput` event (so selection can be cleared).\n */\n triggerDataEvent(data: string, wasUserInput?: boolean): void;\n\n /**\n * Triggers the onBinary event in the public API.\n * @param data The data that is being emitted.\n */\n triggerBinaryEvent(data: string): void;\n}\n\nexport const ICharsetService = createDecorator<ICharsetService>('CharsetService');\nexport interface ICharsetService {\n serviceBrand: undefined;\n\n charset: ICharset | undefined;\n readonly glevel: number;\n\n reset(): void;\n\n /**\n * Set the G level of the terminal.\n * @param g\n */\n setgLevel(g: number): void;\n\n /**\n * Set the charset for the given G level of the terminal.\n * @param g\n * @param charset\n */\n setgCharset(g: number, charset: ICharset | undefined): void;\n}\n\nexport const IDirtyRowService = createDecorator<IDirtyRowService>('DirtyRowService');\nexport interface IDirtyRowService {\n serviceBrand: undefined;\n\n readonly start: number;\n readonly end: number;\n\n clearRange(): void;\n markDirty(y: number): void;\n markRangeDirty(y1: number, y2: number): void;\n markAllDirty(): void;\n}\n\nexport interface IServiceIdentifier<T> {\n (...args: any[]): void;\n type: T;\n}\n\nexport interface IBrandedService {\n serviceBrand: undefined;\n}\n\ntype GetLeadingNonServiceArgs<Args> =\n Args extends [...IBrandedService[]] ? []\n : Args extends [infer A1, ...IBrandedService[]] ? [A1]\n : Args extends [infer A1, infer A2, ...IBrandedService[]] ? [A1, A2]\n : Args extends [infer A1, infer A2, infer A3, ...IBrandedService[]] ? [A1, A2, A3]\n : Args extends [infer A1, infer A2, infer A3, infer A4, ...IBrandedService[]] ? [A1, A2, A3, A4]\n : Args extends [infer A1, infer A2, infer A3, infer A4, infer A5, ...IBrandedService[]] ? [A1, A2, A3, A4, A5]\n : Args extends [infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, ...IBrandedService[]] ? [A1, A2, A3, A4, A5, A6]\n : Args extends [infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, infer A7, ...IBrandedService[]] ? [A1, A2, A3, A4, A5, A6, A7]\n : Args extends [infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, infer A7, infer A8, ...IBrandedService[]] ? [A1, A2, A3, A4, A5, A6, A7, A8]\n : never;\n\nexport const IInstantiationService = createDecorator<IInstantiationService>('InstantiationService');\nexport interface IInstantiationService {\n serviceBrand: undefined;\n\n setService<T>(id: IServiceIdentifier<T>, instance: T): void;\n getService<T>(id: IServiceIdentifier<T>): T | undefined;\n createInstance<Ctor extends new (...args: any[]) => any, R extends InstanceType<Ctor>>(t: Ctor, ...args: GetLeadingNonServiceArgs<ConstructorParameters<Ctor>>): R;\n}\n\nexport enum LogLevelEnum {\n DEBUG = 0,\n INFO = 1,\n WARN = 2,\n ERROR = 3,\n OFF = 4\n}\n\nexport const ILogService = createDecorator<ILogService>('LogService');\nexport interface ILogService {\n serviceBrand: undefined;\n\n logLevel: LogLevelEnum;\n\n debug(message: any, ...optionalParams: any[]): void;\n info(message: any, ...optionalParams: any[]): void;\n warn(message: any, ...optionalParams: any[]): void;\n error(message: any, ...optionalParams: any[]): void;\n}\n\nexport const IOptionsService = createDecorator<IOptionsService>('OptionsService');\nexport interface IOptionsService {\n serviceBrand: undefined;\n\n /**\n * Read only access to the raw options object, this is an internal-only fast path for accessing\n * single options without any validation as we trust TypeScript to enforce correct usage\n * internally.\n */\n readonly rawOptions: Readonly<ITerminalOptions>;\n readonly options: ITerminalOptions;\n\n readonly onOptionChange: IEvent<string>;\n\n setOption<T>(key: string, value: T): void;\n getOption<T>(key: string): T | undefined;\n}\n\nexport type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | number;\nexport type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'off';\n\nexport type RendererType = 'dom' | 'canvas';\n\nexport interface ITerminalOptions {\n allowProposedApi: boolean;\n allowTransparency: boolean;\n altClickMovesCursor: boolean;\n bellSound: string;\n bellStyle: 'none' | 'sound' /* | 'visual' | 'both' */;\n cols: number;\n convertEol: boolean;\n cursorBlink: boolean;\n cursorStyle: 'block' | 'underline' | 'bar';\n cursorWidth: number;\n customGlyphs: boolean;\n disableStdin: boolean;\n drawBoldTextInBrightColors: boolean;\n fastScrollModifier: 'alt' | 'ctrl' | 'shift' | undefined;\n fastScrollSensitivity: number;\n fontSize: number;\n fontFamily: string;\n fontWeight: FontWeight;\n fontWeightBold: FontWeight;\n letterSpacing: number;\n lineHeight: number;\n linkTooltipHoverDuration: number;\n logLevel: LogLevel;\n macOptionIsMeta: boolean;\n macOptionClickForcesSelection: boolean;\n minimumContrastRatio: number;\n rendererType: RendererType;\n rightClickSelectsWord: boolean;\n rows: number;\n screenReaderMode: boolean;\n scrollback: number;\n scrollSensitivity: number;\n tabStopWidth: number;\n theme: ITheme;\n windowsMode: boolean;\n windowOptions: IWindowOptions;\n wordSeparator: string;\n\n [key: string]: any;\n cancelEvents: boolean;\n termName: string;\n}\n\nexport interface ITheme {\n foreground?: string;\n background?: string;\n cursor?: string;\n cursorAccent?: string;\n selection?: string;\n black?: string;\n red?: string;\n green?: string;\n yellow?: string;\n blue?: string;\n magenta?: string;\n cyan?: string;\n white?: string;\n brightBlack?: string;\n brightRed?: string;\n brightGreen?: string;\n brightYellow?: string;\n brightBlue?: string;\n brightMagenta?: string;\n brightCyan?: string;\n brightWhite?: string;\n}\n\nexport const IUnicodeService = createDecorator<IUnicodeService>('UnicodeService');\nexport interface IUnicodeService {\n serviceBrand: undefined;\n /** Register an Unicode version provider. */\n register(provider: IUnicodeVersionProvider): void;\n /** Registered Unicode versions. */\n readonly versions: string[];\n /** Currently active version. */\n activeVersion: string;\n /** Event triggered, when activate version changed. */\n readonly onChange: IEvent<string>;\n\n /**\n * Unicode version dependent\n */\n wcwidth(codepoint: number): number;\n getStringCellWidth(s: string): number;\n}\n\nexport interface IUnicodeVersionProvider {\n readonly version: string;\n wcwidth(ucs: number): 0 | 1 | 2;\n}\n","/**\n * Copyright (c) 2019 The xterm.js authors. All rights reserved.\n * @license MIT\n */\nimport { IUnicodeService, IUnicodeVersionProvider } from 'common/services/Services';\nimport { EventEmitter, IEvent } from 'common/EventEmitter';\nimport { UnicodeV6 } from 'common/input/UnicodeV6';\n\n\nexport class UnicodeService implements IUnicodeService {\n public serviceBrand: any;\n\n private _providers: {[key: string]: IUnicodeVersionProvider} = Object.create(null);\n private _active: string = '';\n private _activeProvider: IUnicodeVersionProvider;\n private _onChange = new EventEmitter<string>();\n public get onChange(): IEvent<string> { return this._onChange.event; }\n\n constructor() {\n const defaultProvider = new UnicodeV6();\n this.register(defaultProvider);\n this._active = defaultProvider.version;\n this._activeProvider = defaultProvider;\n }\n\n public get versions(): string[] {\n return Object.keys(this._providers);\n }\n\n public get activeVersion(): string {\n return this._active;\n }\n\n public set activeVersion(version: string) {\n if (!this._providers[version]) {\n throw new Error(`unknown Unicode version \"${version}\"`);\n }\n this._active = version;\n this._activeProvider = this._providers[version];\n this._onChange.fire(version);\n }\n\n public register(provider: IUnicodeVersionProvider): void {\n this._providers[provider.version] = provider;\n }\n\n /**\n * Unicode version dependent interface.\n */\n public wcwidth(num: number): number {\n return this._activeProvider.wcwidth(num);\n }\n\n public getStringCellWidth(s: string): number {\n let result = 0;\n const length = s.length;\n for (let i = 0; i < length; ++i) {\n let code = s.charCodeAt(i);\n // surrogate pair first\n if (0xD800 <= code && code <= 0xDBFF) {\n if (++i >= length) {\n // this should not happen with strings retrieved from\n // Buffer.translateToString as it converts from UTF-32\n // and therefore always should contain the second part\n // for any other string we still have to handle it somehow:\n // simply treat the lonely surrogate first as a single char (UCS-2 behavior)\n return result + this.wcwidth(code);\n }\n const second = s.charCodeAt(i);\n // convert surrogate pair to high codepoint only for valid second part (UTF-16)\n // otherwise treat them independently (UCS-2 behavior)\n if (0xDC00 <= second && second <= 0xDFFF) {\n code = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;\n } else {\n result += this.wcwidth(second);\n }\n }\n result += this.wcwidth(code);\n }\n return result;\n }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(4389);\n"],"names":["root","factory","exports","module","define","amd","a","i","self","_terminal","_renderService","_liveRegionLineCount","_charsToConsume","_charsToAnnounce","_accessibilityTreeRoot","document","createElement","classList","add","tabIndex","_rowContainer","setAttribute","_rowElements","rows","_createAccessibilityTreeNode","appendChild","_topBoundaryFocusListener","e","_onBoundaryFocus","_bottomBoundaryFocusListener","addEventListener","length","_refreshRowsDimensions","_renderRowsDebouncer","TimeBasedDebouncer","_renderRows","bind","_refreshRows","_liveRegion","element","Error","insertAdjacentElement","register","onResize","_onResize","onRender","start","end","onScroll","onA11yChar","char","_onChar","onLineFeed","onA11yTab","spaceCount","_onTab","onKey","_onKey","key","onBlur","_clearLiveRegion","onDimensionsChange","_screenDprMonitor","ScreenDprMonitor","setListener","addDisposableDomListener","window","dispose","removeElementFromParent","this","position","boundaryElement","target","beforeBoundaryElement","getAttribute","buffer","lines","relatedTarget","topBoundaryElement","bottomBoundaryElement","pop","removeChild","shift","removeEventListener","newElement","unshift","push","scrollLines","focus","preventDefault","stopImmediatePropagation","children","_refreshRowDimensions","MAX_ROWS_TO_READ","textContent","Strings","tooMuchOutput","isMac","parentNode","setTimeout","keyChar","refresh","setSize","toString","lineData","translateBufferLineToString","ydisp","posInSet","innerText","_announceCharacters","dimensions","actualCellHeight","style","height","Disposable","AccessibilityManager","prepareTextForTerminal","text","replace","bracketTextForPaste","bracketedPasteMode","paste","textarea","coreService","decPrivateModes","triggerDataEvent","value","moveTextAreaUnderMouseCursor","ev","screenElement","pos","getBoundingClientRect","left","clientX","top","clientY","width","zIndex","selectionService","clipboardData","setData","selectionText","stopPropagation","getData","shouldSelectWord","rightClickSelect","select","channels","rgb","rgba","toPaddedHex","c","s","contrastRatio","l1","l2","toCss","r","g","b","undefined","toRgba","color","blend","bg","fg","css","fgR","fgG","fgB","bgR","bgG","bgB","Math","round","isOpaque","ensureContrastRatio","ratio","result","toColor","opaque","rgbaColor","toChannels","opacity","toColorRGB","parseInt","slice","relativeLuminance2","rs","gs","bs","pow","relativeLuminance","reduceLuminance","bgRgba","fgRgba","cr","max","ceil","increaseLuminance","min","bgL","fgL","_color","_rgba","clear","setCss","getCss","setColor","getColor","ColorContrastCache","DEFAULT_FOREGROUND","DEFAULT_BACKGROUND","DEFAULT_CURSOR","DEFAULT_CURSOR_ACCENT","DEFAULT_SELECTION","DEFAULT_ANSI_COLORS","Object","freeze","colors","v","allowTransparency","canvas","ctx","getContext","_ctx","globalCompositeOperation","_litmusColor","createLinearGradient","_contrastCache","foreground","background","cursor","cursorAccent","selectionTransparent","selectionOpaque","ansi","contrastCache","_updateRestoreColors","onOptionsChange","setTheme","theme","_parseColor","selection","black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite","restoreColor","slot","_restoreColors","fallback","fillStyle","console","warn","fillRect","data","getImageData","substring","split","map","component","Number","alpha","ColorManager","elements","parentElement","node","type","handler","options","disposed","_bufferService","_logService","_unicodeService","_linkMatchers","_nextLinkMatcherId","_onShowLinkUnderline","EventEmitter","_onHideLinkUnderline","_onLinkTooltip","_rowsToLinkify","event","attachToDom","mouseZoneManager","_element","_mouseZoneManager","linkifyRows","clearAll","_rowsTimeoutId","clearTimeout","_linkifyRows","Linkifier","_timeBeforeLatency","absoluteRowIndexStart","absoluteRowIndexEnd","overscanLineLimit","cols","iterator","hasNext","next","_doLinkifyRow","range","first","content","debug","registerLinkMatcher","regex","matcher","id","matchIndex","validationCallback","hoverTooltipCallback","tooltipCallback","hoverLeaveCallback","leaveCallback","willLinkActivate","priority","_addLinkMatcherToList","splice","deregisterLinkMatcher","matcherId","rowIndex","match","rex","RegExp","source","flags","stringIndex","uri","indexOf","lastIndex","bufferIndex","stringIndexToBufferIndex","line","get","attr","getFg","isValid","_addLink","exec","x","y","getStringCellWidth","x1","y1","floor","x2","y2","MouseZone","newWindow","open","opener","location","href","fire","_createLinkHoverEvent","remove","IBufferService","ILogService","IUnicodeService","clickCallback","hoverCallback","_linkProviders","_linkCacheDisposables","_isMouseOut","_activeLine","getDisposeArrayDisposable","_currentLink","registerLinkProvider","linkProvider","providerIndex","mouseService","renderService","_mouseService","_clearCurrentLink","_onMouseMove","_onClick","_lastMouseEvent","_positionFromMouseEvent","composedPath","contains","_lastBufferCell","_onHover","_askForLink","_linkAtPosition","link","useLineCache","_activeProviderReplies","forEach","reply","linkWithState","Map","linkProvided","_checkLinkProviderResult","provideLinks","links","linksWithState","set","size","_removeIntersectingLinks","replies","occupiedCells","Set","providerReply","startX","endX","has","index","hasLinkBefore","j","linkAtPosition","find","_handleNewLink","currentLink","activate","startRow","endRow","_linkLeave","disposeArray","state","decorations","underline","pointerCursor","isHovered","_linkHover","defineProperties","toggle","_fireUnderlineEvent","onRenderedBufferChange","hover","showEvent","scrollOffset","_createLinkUnderlineEvent","leave","sameLine","wrappedFromLeft","wrappedToRight","coords","getCoords","Linkifier2","promptLabel","_screenElement","_selectionService","_optionsService","_zones","_areZonesActive","_lastHoverCoords","_initialSelectionLength","_onMouseDown","_mouseMoveListener","_mouseLeaveListener","_onMouseLeave","_clickListener","_deactivate","zone","_activate","_currentZone","pageX","pageY","_findZoneEventAt","_tooltipTimeout","_onTooltip","rawOptions","linkTooltipHoverDuration","_getSelectionLength","currentSelectionLength","IMouseService","ISelectionService","IOptionsService","MouseZoneManager","_renderCallback","_animationFrame","cancelAnimationFrame","rowStart","rowEnd","rowCount","_rowCount","_rowStart","_rowEnd","requestAnimationFrame","_innerRefresh","RenderDebouncer","_currentDevicePixelRatio","devicePixelRatio","listener","_listener","clearListener","_outerListener","_updateDpr","_resolutionMediaMatchList","removeListener","matchMedia","addListener","browser","Browser","_keyDownHandled","_keyPressHandled","_unprocessedDeadKey","_onCursorMove","_onRender","_onSelectionChange","_onTitleChange","_onBell","_onFocus","_onBlur","_onA11yCharEmitter","_onA11yTabEmitter","_setup","linkifier","_instantiationService","createInstance","linkifier2","decorationService","DecorationService","_inputHandler","onRequestBell","bell","onRequestRefreshRows","onRequestSendFocus","_reportFocus","onRequestReset","reset","onRequestWindowsOptionsReport","_reportWindowsOptions","onColor","_handleColorEvent","forwardEvent","onCursorMove","onTitleChange","_afterResize","_colorManager","req","acc","ident","C0","ESC","toRgbString","BEL","setColors","viewport","onThemeChange","_isDisposed","_customKeyEventHandler","write","buffers","active","preventScroll","_updateOptions","_charSizeService","measure","setRenderer","_createRenderer","syncScrollArea","optionsService","screenReaderMode","_accessibilityManager","setupTabStops","_setTheme","_onTextAreaFocus","sendFocus","updateCursorStyle","_showCursor","blur","_onTextAreaBlur","_syncTextArea","isCursorInViewport","_compositionHelper","isComposing","cursorY","ybase","bufferLine","cursorX","cellHeight","getWidth","cellWidth","actualCellWidth","cursorTop","cursorLeft","lineHeight","_initGlobal","_bindKeys","hasSelection","copyHandler","pasteHandlerWrapper","handlePasteEvent","isFirefox","button","rightClickHandler","rightClickSelectsWord","isLinux","_keyUp","_keyDown","_keyPress","compositionstart","compositionupdate","compositionend","_inputEvent","updateCompositionElements","_queueLinkification","parent","isConnected","_document","ownerDocument","dir","fragment","createDocumentFragment","_viewportElement","_viewportScrollArea","_helperContainer","coreBrowserService","CoreBrowserService","setService","ICoreBrowserService","CharSizeService","ICharSizeService","_theme","onOptionChange","_characterJoinerService","CharacterJoinerService","ICharacterJoinerService","renderer","RenderService","IRenderService","resize","_compositionView","CompositionHelper","_soundService","SoundService","ISoundService","MouseService","Viewport","amount","onRequestSyncScrollBar","onFocus","SelectionService","onRequestScrollLines","suppressScrollEvent","onSelectionChange","onRequestRedraw","onSelectionChanged","columnSelectMode","onLinuxMouseSelection","_onScroll","onMouseDown","coreMouseService","areMouseEventsActive","disable","enable","bindMouse","rendererType","Renderer","DomRenderer","el","sendEvent","but","action","getRawByteCoords","overrideType","buttons","deltaY","triggerMouseEvent","col","row","ctrl","ctrlKey","alt","altKey","shiftKey","requestedEvents","mouseup","wheel","mousedrag","mousemove","eventListeners","cancel","onProtocolChange","events","logLevel","explainEvents","passive","activeProtocol","shouldForceSelection","hasScrollback","getLinesScrolled","sequence","applicationCursorKeys","abs","onWheel","onTouchStart","onTouchMove","refreshRows","shouldColumnSelect","isCursorInitialized","disp","attachCustomKeyEventHandler","customKeyEventHandler","registerCharacterJoiner","joinerId","deregisterCharacterJoiner","deregister","markers","addMarker","cursorYOffset","normal","registerDecoration","decorationOptions","column","setSelection","getSelection","getSelectionPosition","startColumn","selectionStart","endColumn","selectionEnd","clearSelection","selectAll","selectLines","keydown","scrollToBottom","evaluateKeyboardEvent","macOptionIsMeta","scrollCount","_isThirdLevelShift","ETX","CR","domEvent","thirdLevelKey","metaKey","isWindows","getModifierState","keyCode","wasModifierKeyOnlyEvent","charCode","which","String","fromCharCode","inputType","composed","_soundBell","playBellSound","hasValidSize","clearMarkers","getBlankLine","DEFAULT_ATTR_DATA","clearTextureAtlas","WindowsOptionsReportType","GET_WIN_SIZE_PIXELS","canvasWidth","scaledCanvasWidth","toFixed","canvasHeight","scaledCanvasHeight","GET_CELL_SIZE_PIXELS","scaledCellWidth","scaledCellHeight","force","cancelEvents","_visualBell","bellStyle","CoreTerminal","Terminal","_debounceThresholdMS","_lastRefreshMs","_additionalRefreshRequested","_refreshTimeoutID","refreshRequestTime","Date","now","elapsed","waitPeriodBeforeTrailingRefresh","_scrollLines","_scrollArea","scrollBarWidth","_currentRowHeight","_currentScaledCellHeight","_lastRecordedBufferLength","_lastRecordedViewportHeight","_lastRecordedBufferHeight","_lastTouchY","_lastScrollTop","_lastHadScrollBar","_wheelPartialScroll","_refreshAnimationFrame","_ignoreNextScrollEvent","offsetWidth","_activeBuffer","onBufferActivate","activeBuffer","_renderDimensions","backgroundColor","_refresh","immediate","offsetHeight","newBufferHeight","scrollTop","scrollback","elementStyle","getComputedStyle","elementPadding","paddingLeft","paddingRight","offsetParent","diff","_bubbleScroll","scrollPosFromTop","cancelable","_getPixelsScrolled","_applyScrollModifier","deltaMode","WheelEvent","DOM_DELTA_LINE","DOM_DELTA_PAGE","DOM_DELTA_PIXEL","modifier","fastScrollModifier","fastScrollSensitivity","scrollSensitivity","touches","_textarea","_coreService","_isComposing","_isSendingComposition","_compositionPosition","_dataAlreadySent","_finalizeComposition","_handleAnyTextareaChanges","waitForPropagation","input","oldValue","dontRecurse","fontFamily","fontSize","compositionViewBounds","ICoreService","getCoordsRelativeToElement","rect","colCount","hasValidCharSize","isSelection","moveToRequestedRow","startY","targetY","bufferService","applicationCursor","wrappedRowsForRow","rowsToMove","wrappedRows","direction","verticalDirection","isWrapped","wrappedRowsCount","repeat","currentRow","lineWraps","startCol","endCol","forward","currentCol","bufferStr","mod","count","str","rpt","targetX","resetStartingRow","horizontalDirection","moveToRequestedCol","rowDifference","currX","colsFromRowEnd","CONSTRUCTOR_ONLY_OPTIONS","_core","_addonManager","AddonManager","_publicOptions","getter","propName","setter","_checkReadonlyOptions","desc","defineProperty","includes","_checkProposedApi","allowProposedApi","onBell","onBinary","onData","_parser","ParserApi","UnicodeApi","_buffer","BufferNamespaceApi","m","mouseTrackingMode","applicationCursorKeysMode","applicationKeypadMode","applicationKeypad","insertMode","modes","originMode","origin","reverseWraparoundMode","reverseWraparound","sendFocusMode","wraparoundMode","wraparound","columns","_verifyIntegers","registerMarker","_verifyPositiveIntegers","scrollPages","pageCount","scrollToTop","scrollToLine","callback","writeUtf8","writeln","getOption","setOption","loadAddon","addon","values","Infinity","isNaN","_container","_alpha","_colors","_rendererId","_scaledCharWidth","_scaledCharHeight","_scaledCellWidth","_scaledCellHeight","_scaledCharLeft","_scaledCharTop","_currentGlyphIdentifier","chars","code","bold","dim","italic","_canvas","_initCanvas","_charAtlas","throwIfFalsy","_clearAll","onOptionsChanged","onGridChanged","colorSet","_refreshCharAtlas","_setTransparency","oldCanvas","cloneNode","replaceChild","acquireCharAtlas","warmUp","scaledCharWidth","scaledCharHeight","scaledCharLeft","scaledCharTop","_fillCells","_fillMiddleLineAtCells","cellOffset","_fillBottomLineAtCells","_fillLeftLineAtCell","_strokeRectAtCell","lineWidth","strokeRect","clearRect","_clearCells","_fillCharTrueColor","cell","font","_getFont","textBaseline","TEXT_BASELINE","_clipRow","drawSuccess","customGlyphs","tryDrawCustomChar","getChars","fillText","_drawChars","contrastColor","_getContrastColor","isFgRGB","isBgRGB","_drawUncachedChars","isInverse","isBgDefault","INVERTED_DEFAULT_COLOR","getBgColor","isFgDefault","getFgColor","DEFAULT_COLOR","drawBoldTextInBrightColors","isBold","WHITESPACE_CELL_CHAR","getCode","WHITESPACE_CELL_CODE","isDim","isItalic","draw","fgOverride","save","AttributeData","join","globalAlpha","DIM_OPACITY","restore","beginPath","clip","fontWeightBold","fontWeight","minimumContrastRatio","adjustedColor","fgColor","fgColorMode","getFgColorMode","bgColor","bgColorMode","getBgColorMode","temp","temp2","_resolveBackgroundRgba","_resolveForegroundRgba","inverse","BaseRenderLayer","BLINK_INTERVAL","container","rendererId","_onRequestRedraw","_coreBrowserService","_cell","CellData","_state","isFocused","_cursorRenderers","_renderBarCursor","_renderBlockCursor","_renderUnderlineCursor","_cursorBlinkStateManager","_clearCursor","restartBlinkAnimation","pause","resume","cursorBlink","CursorBlinkStateManager","_render","isPaused","triggeredByAnimationFrame","isCursorHidden","viewportRelativeCursorY","loadCell","cursorStyle","_renderBlurCursor","isCursorVisible","cursorWidth","strokeStyle","CursorRenderLayer","_restartInterval","_blinkStartTimeout","_blinkInterval","clearInterval","_animationTimeRestarted","timeToStart","time","setInterval","blockElementDefinitions","w","h","patternCharacterDefinitions","boxDrawingDefinitions","xp","yp","xOffset","yOffset","blockElementDefinition","charDefinition","box","xEighth","yEighth","drawBlockElementChar","patternDefinition","patternSet","cachedPatterns","pattern","tmpCanvas","tmpCtx","imageData","ImageData","startsWith","substr","parseFloat","putImageData","createPattern","drawPatternChar","boxDrawingDefinition","entries","instructions","instruction","f","svgToCanvasInstructionMap","args","translateArgs","error","stroke","closePath","drawBoxDrawingChar","clamp","bezierCurveTo","lineTo","moveTo","cache","GridCache","onShowLinkUnderline","onHideLinkUnderline","middleRowCount","is256Color","LinkRenderLayer","nextRendererId","instantiationService","_id","_renderLayers","TextRenderLayer","SelectionRenderLayer","_devicePixelRatio","_updateDimensions","removeTerminalFromCache","onDevicePixelRatioChange","l","onCharSizeChanged","_runOperation","operation","renderRows","letterSpacing","IInstantiationService","_clearState","_didStateChange","viewportStartRow","viewportEndRow","viewportCappedStartRow","viewportCappedEndRow","startRowEndCol","middleRowsCount","_areCoordinatesEqual","coord1","coord2","_characterWidth","_characterFont","_characterOverlapCache","_workCell","terminalFont","_forEachCell","firstRow","lastRow","joinedRanges","getJoinedCharacters","isJoined","lastCharX","JoinedCellData","translateToString","_isOverlapping","getCodePoint","NULL_CELL_CODE","_drawBackground","prevFillStyle","nextFillStyle","isBgPalette","_drawForeground","isInvisible","isUnderline","isStrikethrough","beginFrame","hasOwnProperty","overlaps","measureText","_didWarmUp","_doWarmUp","BaseCharAtlas","charAtlasCache","newConfig","generateConfig","ownedByIndex","entry","ownedBy","configEquals","config","atlas","newEntry","DynamicCharAtlas","clonedColors","colorCode","isLegacyEdge","CHAR_ATLAS_CELL_SPACING","TEXTURE_WIDTH","TEXTURE_HEIGHT","TRANSPARENT_COLOR","getGlyphCacheKey","glyph","_config","_drawToCacheCount","_glyphsWaitingOnBitmap","_bitmapCommitTimeout","_bitmap","_cacheCanvas","_cacheCtx","_tmpCtx","_width","_height","capacity","_cacheMap","LRUMap","prealloc","_canCache","glyphKey","cacheValue","_drawFromCache","peek","_drawToCache","_toCoordinateX","_toCoordinateY","isEmpty","cacheX","cacheY","drawImage","inBitmap","_getColorFromAnsiIndex","idx","_getBackgroundColor","_getForegroundColor","fontStyle","clearColor","offset","_addGlyphToBitmap","isSafari","_generateBitmap","glyphsMovingToBitmap","createImageBitmap","then","bitmap","NoneCharAtlas","_map","_head","_tail","_nodePool","_unlinkNode","prev","_appendNode","tail","nodePool","peekValue","head","TERMINAL_CLASS_PREFIX","FG_CLASS_PREFIX","BG_CLASS_PREFIX","FOCUS_CLASS","nextTerminalId","_linkifier","_linkifier2","_terminalClass","_refreshRowElements","_selectionContainer","_injectCss","_rowFactory","DomRendererRowFactory","_onLinkHover","_onLinkLeave","_themeStyleElement","_dimensionsStyleElement","overflow","styles","_terminalSelector","BOLD_CLASS","ITALIC_CLASS","CURSOR_CLASS","CURSOR_STYLE_BLOCK_CLASS","CURSOR_BLINK_CLASS","CURSOR_STYLE_BAR_CLASS","CURSOR_STYLE_UNDERLINE_CLASS","documentFragment","_createSelectionElement","colStart","colEnd","cursorAbsoluteY","rowElement","createRow","_setCellUnderline","enabled","span","textDecoration","DIM_CLASS","UNDERLINE_CLASS","STRIKETHROUGH_CLASS","isCursorRow","lineLength","charElement","display","_applyMinimumContrast","_addStyle","padStart","padChar","isSelectAllActive","selectionStartLength","areSelectionValuesReversed","startPlusLength","onTrim","SelectionModel","_onCharSizeChange","_measureStrategy","DomMeasureStrategy","_parentElement","_result","_measureElement","geometry","firstCell","combinedData","isCombined","setFromCharData","getAsCharData","_characterJoiners","_nextCharacterJoinerId","joiner","ranges","lineStr","rangeStartColumn","currentStringIndex","rangeStartStringIndex","rangeAttrFG","rangeAttrBG","getBg","getTrimmedLength","_getJoinedRanges","startIndex","endIndex","allJoinedRanges","joinerRanges","_mergeRanges","_stringRangesToCellRanges","currentRangeIndex","currentRangeStarted","currentRange","getString","newRange","inRange","getRootNode","activeElement","hasFocus","_decorations","marker","isDisposed","decoration","Decoration","onDispose","_queueRefresh","shouldRecreate","render","_onDispose","_marker","anchor","_createElement","append","_refreshStyle","right","_renderer","_isPaused","_needsFullRefresh","_isNextRenderRedrawOnly","_needsSelectionRefresh","_canvasWidth","_canvasHeight","_selectionState","_onDimensionsChange","_onRefreshRequest","_renderDebouncer","_fullRefresh","onCharSizeChange","IntersectionObserver","_onIntersectionChange","threshold","observe","disconnect","isIntersecting","intersectionRatio","isRedrawOnly","_fireOnCanvasResize","changeOptions","NON_BREAKING_SPACE_CHAR","ALL_NON_BREAKING_SPACE_REGEX","_dragScrollAmount","_enabled","_mouseDownTimeStamp","_oldHasSelection","_oldSelectionStart","_oldSelectionEnd","_onLinuxMouseSelection","_onRedrawRequest","_onRequestScrollLines","_mouseUpListener","_onMouseUp","onUserInput","_trimListener","_onTrim","_onBufferActivate","_model","_activeSelectionMode","_removeMouseDownListeners","finalSelectionStart","finalSelectionEnd","lineText","isLinuxMouseSelection","_isClickInSelection","_getMouseBufferCoords","_areCoordsInSelection","_selectWordAtCursor","allowWhitespaceOnlySelection","getRangeLength","_selectWordAt","_getMouseEventScrollAmount","terminalHeight","macOptionClickForcesSelection","timeStamp","_onIncrementalClick","detail","_onSingleClick","_onDoubleClick","_onTripleClick","_addMouseDownListeners","_dragScrollIntervalTimer","_dragScroll","hasWidth","_selectLineAt","previousSelectionEnd","_selectToWordAt","timeElapsed","coordinates","moveToCellSequence","_fireEventIfSelectionChanged","_fireOnSelectionChange","_convertViewportColToCharacterIndex","charIndex","_getWordAt","followWrappedLinesAbove","followWrappedLinesBelow","charOffset","leftWideCharCount","rightWideCharCount","leftLongCharOffset","rightLongCharOffset","charAt","_isCharWordSeparator","trim","previousBufferLine","previousLineWordPosition","nextBufferLine","nextLineWordPosition","wordPosition","wordSeparator","wrappedRange","getWrappedRangeForLine","last","createDecorator","IDecorationService","_audioContext","audioContextCtor","AudioContext","webkitAudioContext","audioContext","bellAudioSource","createBufferSource","decodeAudioData","_base64ToArrayBuffer","_removeMimeType","bellSound","connect","destination","base64","binaryString","atob","len","bytes","Uint8Array","charCodeAt","dataURI","_maxLength","onDeleteEmitter","onInsertEmitter","onTrimEmitter","_array","Array","_startIndex","_length","newMaxLength","newArray","_getCyclicIndex","newLength","recycle","deleteCount","items","countToTrim","trimStart","shiftElements","expandListBy","CircularList","clone","val","depth","clonedObject","isArray","hasWriteSyncWarnHappened","_onBinary","_onData","_onLineFeed","InstantiationService","OptionsService","BufferService","LogService","CoreService","CoreMouseService","ICoreMouseService","_dirtyRowService","DirtyRowService","IDirtyRowService","unicodeService","UnicodeService","_charsetService","CharsetService","ICharsetService","InputHandler","markRangeDirty","scrollBottom","_writeBuffer","WriteBuffer","promiseResult","parse","_onScrollApi","_windowsMode","writeSync","maxSubsequentCalls","LogLevelEnum","WARN","MINIMUM_COLS","MINIMUM_ROWS","scroll","eraseAttr","registerEscHandler","registerDcsHandler","registerCsiHandler","registerOscHandler","windowsMode","_enableWindowsMode","updateWindowsModeWrappedState","final","_listeners","_disposed","_event","arg1","arg2","queue","call","from","to","GLEVEL","MAX_PARSEBUFFER_LENGTH","paramToWindowOption","n","opts","setWinLines","restoreWin","minimizeWin","setWinPosition","setWinSizePixels","raiseWin","lowerWin","refreshWin","setWinSizeChars","maximizeWin","fullscreenWin","getWinState","getWinPosition","getWinSizePixels","getScreenSizePixels","getCellSizePixels","getWinSizeChars","getScreenSizeChars","getIconTitle","getWinTitle","pushTitle","popTitle","_data","Uint32Array","hook","params","put","concat","subarray","unhook","success","utf32ToString","pt","_coreMouseService","EscapeSequenceParser","_parseBuffer","_stringDecoder","StringToUtf32","_utf8Decoder","Utf8ToUtf32","_windowTitle","_iconName","_windowTitleStack","_iconNameStack","_curAttrData","_eraseAttrDataInternal","_onRequestBell","_onRequestRefreshRows","_onRequestReset","_onRequestSendFocus","_onRequestSyncScrollBar","_onRequestWindowsOptionsReport","_onA11yChar","_onA11yTab","_onColor","_parseStack","paused","cursorStartX","cursorStartY","decodedLength","_specialColors","setCsiHandlerFallback","identifier","identToString","toArray","setEscHandlerFallback","setExecuteHandlerFallback","setOscHandlerFallback","setDcsHandlerFallback","payload","setPrintHandler","print","insertChars","intermediates","scrollLeft","cursorUp","scrollRight","cursorDown","cursorForward","cursorBackward","cursorNextLine","cursorPrecedingLine","cursorCharAbsolute","cursorPosition","cursorForwardTab","eraseInDisplay","prefix","eraseInLine","insertLines","deleteLines","deleteChars","scrollUp","scrollDown","eraseChars","cursorBackwardTab","charPosAbsolute","hPositionRelative","repeatPrecedingCharacter","sendDeviceAttributesPrimary","sendDeviceAttributesSecondary","linePosAbsolute","vPositionRelative","hVPosition","tabClear","setMode","setModePrivate","resetMode","resetModePrivate","charAttributes","deviceStatus","deviceStatusPrivate","softReset","setCursorStyle","setScrollRegion","saveCursor","windowOptions","restoreCursor","insertColumns","deleteColumns","setExecuteHandler","LF","lineFeed","VT","FF","carriageReturn","BS","backspace","HT","tab","SO","shiftOut","SI","shiftIn","C1","IND","NEL","nextLine","HTS","tabSet","OscHandler","setTitle","setIconName","setOrReportIndexedColor","setOrReportFgColor","setOrReportBgColor","setOrReportCursorColor","restoreIndexedColor","restoreFgColor","restoreBgColor","restoreCursorColor","reverseIndex","keypadApplicationMode","keypadNumericMode","fullReset","setgLevel","selectDefaultCharset","flag","selectCharset","CHARSETS","screenAlignmentPattern","setErrorHandler","DECRQSS","_preserveStack","_logSlowResolvingAsync","p","Promise","race","res","rej","catch","err","wasPaused","DEBUG","prototype","clearRange","decode","chWidth","charset","curAttr","bufferRow","markDirty","setCellFromCodePoint","extended","wcwidth","ch","stringFromCodePoint","_eraseAttrData","insertCells","getNullCell","NULL_CELL_WIDTH","addCodepointToCell","precedingCodepoint","hasContent","DcsHandler","convertEol","_restrictCursor","originalX","nextStop","maxCol","_setCursor","_moveCursor","diffToTop","diffToBottom","param","tabs","prevStop","_eraseInBufferLine","clearWrap","replaceCells","_resetBufferLine","fill","scrollBackSize","scrollBottomRowsOffset","scrollBottomAbsolute","deleteCells","_is","term","termName","setgCharset","DEFAULT_CHARSET","activeEncoding","activateAltBuffer","activateNormalBuffer","_updateAttrColor","mode","c1","c2","c3","fromColorRGB","_extractColor","accu","cSpace","advance","hasSubParams","subparams","getSubParams","underlineColor","_processUnderline","underlineStyle","updateExtended","savedX","savedY","savedCurAttrData","savedCharset","isBlinking","bottom","second","_savedCharset","slots","spec","parseColor","_setOrReportSpecialColor","collectAndFlag","scrollRegionHeight","level","markAllDirty","_disposables","d","unregister","disposables","array","isNode","navigator","userAgent","platform","test","isIpad","isIphone","fillFallback","constructor","lastChar","CHAR_DATA_CODE_INDEX","ExtendedAttrs","newObj","isBlink","isFgPalette","isAttributeDefault","hasExtendedAttrs","getUnderlineColor","getUnderlineColorMode","isUnderlineColorRGB","isUnderlineColorPalette","isUnderlineColorDefault","getUnderlineStyle","MAX_BUFFER_SIZE","_hasScrollback","_nullCell","fromCharData","NULL_CELL_CHAR","_whitespaceCell","WHITESPACE_CELL_WIDTH","_isClearing","_cols","_rows","_getCorrectBufferLength","getWhitespaceCell","BufferLine","maxLength","relativeY","correctBufferLength","fillViewportRows","fillAttr","newCols","newRows","nullCell","addToY","amountToTrim","_isReflowEnabled","_reflow","_reflowLarger","_reflowSmaller","toRemove","reflowLargerGetLinesToRemove","newLayoutResult","reflowLargerCreateNewLayout","reflowLargerApplyNewLayout","layout","_reflowLargerAdjustViewport","countRemoved","viewportAdjustments","toInsert","countToInsert","wrappedLines","absoluteY","trimmedLines","lastLineLength","destLineLengths","reflowSmallerGetNewLineLengths","linesToAdd","newLines","newLine","destLineIndex","destCol","srcLineIndex","srcCol","cellsToCopy","copyCellsFrom","wrappedLinesIndex","getWrappedLineTrimmedLength","setCell","insertEvents","originalLines","originalLinesLength","originalLineIndex","nextToInsertIndex","nextToInsert","countInsertedSoFar","nextI","insertCountEmitted","lineIndex","trimRight","CHAR_DATA_WIDTH_INDEX","CHAR_DATA_CHAR_INDEX","tabStopWidth","Marker","onInsert","onDelete","_removeMarker","startOverscan","endOverscan","BufferStringIterator","Buffer","_trimRight","_endIndex","_startOverscan","_endOverscan","_current","fillCellData","_combined","_extendedAttrs","cp","CHAR_DATA_ATTR_INDEX","codePoint","eAttrs","keys","copyFrom","src","applyInReverse","srcData","srcCombinedKeys","bufferCols","endsInNull","followingLineStartsWithWide","oldCols","bufferAbsoluteY","srcTrimmedTineLength","srcRemainingCells","destRemainingCells","countToRemove","nextToRemoveIndex","nextToRemoveStart","countRemovedSoFar","newLayout","newLayoutLines","newLineLengths","cellsNeeded","reduce","srcLine","cellsAvailable","oldTrimmedLength","endsWithWide","_normal","_alt","inactiveBuffer","BufferSet","obj","combined","DEFAULT_ATTR","_nextId","C","NUL","SOH","STX","EOT","ENQ","ACK","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","EM","SUB","FS","GS","RS","US","SP","DEL","PAD","HOP","BPH","NBH","SSA","ESA","HTJ","VTS","PLD","PLU","RI","SS2","SS3","DCS","PU1","PU2","STS","CCH","MW","SPA","EPA","SOS","SGCI","SCI","CSI","ST","OSC","PM","APC","KEYCODE_KEY_MAPPINGS","applicationCursorMode","modifiers","keyMapping","codepoint","_interim","startPos","interim","byte1","byte2","byte3","byte4","discardInterim","tmp","missing","fourStop","table","BMP_COMBINING","HIGH_COMBINING","version","num","ucs","mid","bisearch","UnicodeV6","qmt","queueMicrotask","cb","resolve","_action","_callbacks","_pendingData","_bufferOffset","_isSyncWriting","_syncCalls","chunk","_innerWrite","lastTime","startTime","RGB_REX","HASH_REX","pad","bits","s2","low","toLowerCase","base","adv","PAYLOAD_LIMIT","EMPTY_HANDLERS","_handlers","create","_active","_ident","_handlerFb","_stack","loopPosition","fallThrough","registerHandler","handlerList","handlerIndex","clearHandler","setHandlerFallback","handlerResult","DcsParser","EMPTY_PARAMS","Params","addParam","_handler","_params","_hitLimit","ret","setDefault","addMany","codes","TransitionTable","NON_ASCII_PRINTABLE","VT500_TRANSITION_TABLE","blueprint","apply","unused","PRINTABLES","EXECUTABLES","states","_transitions","handlers","handlerPos","transition","chunkPos","initialState","currentState","_collect","_printHandlerFb","_executeHandlerFb","_csiHandlerFb","_escHandlerFb","_errorHandlerFb","_printHandler","_executeHandlers","_csiHandlers","_escHandlers","_oscParser","OscParser","_dcsParser","_errorHandler","_identifier","finalRange","intermediate","finalCode","reverse","clearPrintHandler","clearEscHandler","clearExecuteHandler","clearCsiHandler","clearDcsHandler","clearOscHandler","clearErrorHandler","collect","abort","addSubParam","addDigit","handlersEsc","jj","_start","_put","MAX_VALUE","maxSubParamsLength","Int32Array","_subParams","_subParamsLength","_subParamsIdx","Uint16Array","_rejectDigits","_rejectSubDigits","_digitIsSub","fromArray","k","newParams","getSubParamsAll","store","cur","_addons","instance","terminal","loadedAddon","_wrappedAddonDispose","init","getLine","BufferLineApiView","BufferApiView","_line","getCell","_onBufferChange","_alternate","alternate","addCsiHandler","addDcsHandler","addEscHandler","addOscHandler","provider","versions","activeVersion","isUserScrolling","_cachedBlankLine","topRow","bottomRow","willBufferBeTrimmed","isFull","oldYdisp","scrollAmount","glevel","_charsets","DEFAULT_PROTOCOLS","NONE","restrict","X10","VT200","DRAG","ANY","eventCode","isSGR","S","DEFAULT_ENCODINGS","DEFAULT","SGR","_protocols","_encodings","_activeProtocol","_activeEncoding","_onProtocolChange","_lastEvent","addProtocol","addEncoding","name","protocol","encoding","_compareEvents","report","triggerBinaryEvent","down","up","drag","move","e1","e2","DEFAULT_MODES","DEFAULT_DEC_PRIVATE_MODES","_onUserInput","_scrollToBottom","wasUserInput","disableStdin","_end","_entries","service","ServiceCollection","_services","getService","ctor","serviceDependencies","getServiceDependencies","sort","serviceArgs","dependency","firstServiceArgPos","optionsKeyToLogLevel","info","INFO","ERROR","off","OFF","_updateLogLevel","_evalLazyOptionalParams","optionalParams","_log","message","log","DEFAULT_BELL_SOUND","DEFAULT_OPTIONS","altClickMovesCursor","FONT_WEIGHT_OPTIONS","_onOptionChange","defaultOptions","newValue","_sanitizeAndValidateOption","_setupOptions","storeServiceDependency","serviceRegistry","decorator","arguments","_providers","_onChange","defaultProvider","_activeProvider","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__"],"sourceRoot":""} \ No newline at end of file
diff --git a/node_modules/xterm/package.json b/node_modules/xterm/package.json
deleted file mode 100644
index 84e4bc5..0000000
--- a/node_modules/xterm/package.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "name": "xterm",
- "description": "Full xterm terminal, in your browser",
- "version": "4.18.0",
- "main": "lib/xterm.js",
- "style": "css/xterm.css",
- "types": "typings/xterm.d.ts",
- "repository": "https://github.com/xtermjs/xterm.js",
- "license": "MIT",
- "keywords": [
- "cli",
- "command-line",
- "console",
- "pty",
- "shell",
- "ssh",
- "styles",
- "terminal-emulator",
- "terminal",
- "tty",
- "vt100",
- "webgl",
- "xterm"
- ],
- "scripts": {
- "prepackage": "npm run build",
- "package": "webpack",
- "package-headless": "webpack --config ./webpack.config.headless.js",
- "postpackage-headless": "node ./bin/package_headless.js",
- "start": "node demo/start",
- "start-debug": "node --inspect-brk demo/start",
- "lint": "eslint -c .eslintrc.json --max-warnings 0 --ext .ts src/ addons/",
- "test": "npm run test-unit",
- "posttest": "npm run lint",
- "test-api": "npm run test-api-chromium",
- "test-api-chromium": "node ./bin/test_api.js --browser=chromium --timeout=20000",
- "test-api-firefox": "node ./bin/test_api.js --browser=firefox --timeout=20000",
- "test-api-webkit": "node ./bin/test_api.js --browser=webkit --timeout=20000",
- "test-unit": "node ./bin/test.js",
- "test-unit-coverage": "node ./bin/test.js --coverage",
- "test-unit-dev": "cross-env NODE_PATH='./out' mocha",
- "build": "tsc -b ./tsconfig.all.json",
- "prepare": "npm run setup",
- "setup": "npm run build",
- "presetup": "node ./bin/install-addons.js",
- "prepublishOnly": "npm run package",
- "watch": "tsc -b -w ./tsconfig.all.json --preserveWatchOutput",
- "benchmark": "NODE_PATH=./out xterm-benchmark -r 5 -c test/benchmark/benchmark.json",
- "benchmark-baseline": "NODE_PATH=./out xterm-benchmark -r 5 -c test/benchmark/benchmark.json --baseline out-test/benchmark/test/benchmark/*benchmark.js",
- "benchmark-eval": "NODE_PATH=./out xterm-benchmark -r 5 -c test/benchmark/benchmark.json --eval out-test/benchmark/test/benchmark/*benchmark.js",
- "clean": "rm -rf lib out addons/*/lib addons/*/out",
- "vtfeatures": "node bin/extract_vtfeatures.js src/**/*.ts src/*.ts"
- },
- "devDependencies": {
- "@types/chai": "^4.2.22",
- "@types/debug": "^4.1.7",
- "@types/deep-equal": "^1.0.1",
- "@types/glob": "^7.2.0",
- "@types/jsdom": "^16.2.13",
- "@types/mocha": "^9.0.0",
- "@types/node": "^14.14.44",
- "@types/utf8": "^3.0.0",
- "@types/webpack": "^5.28.0",
- "@types/ws": "^8.2.0",
- "@typescript-eslint/eslint-plugin": "^5.3.0",
- "@typescript-eslint/parser": "^5.3.0",
- "chai": "^4.3.4",
- "cross-env": "^7.0.3",
- "deep-equal": "^2.0.5",
- "eslint": "^8.1.0",
- "express": "^4.17.1",
- "express-ws": "^5.0.2",
- "glob": "^7.2.0",
- "jsdom": "^18.0.1",
- "mocha": "^9.2.0",
- "mustache": "^4.2.0",
- "node-pty": "^0.10.1",
- "nyc": "^15.1.0",
- "playwright": "^1.16.2",
- "source-map-loader": "^3.0.0",
- "source-map-support": "^0.5.20",
- "ts-loader": "^9.1.2",
- "typescript": "^4.4.4",
- "utf8": "^3.0.0",
- "webpack": "^5.61.0",
- "webpack-cli": "^4.9.1",
- "ws": "^8.2.3",
- "xterm-benchmark": "^0.3.0"
- }
-} \ No newline at end of file
diff --git a/node_modules/xterm/src/browser/AccessibilityManager.ts b/node_modules/xterm/src/browser/AccessibilityManager.ts
deleted file mode 100644
index c162abc..0000000
--- a/node_modules/xterm/src/browser/AccessibilityManager.ts
+++ /dev/null
@@ -1,301 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import * as Strings from 'browser/LocalizableStrings';
-import { ITerminal, IRenderDebouncer } from 'browser/Types';
-import { IBuffer } from 'common/buffer/Types';
-import { isMac } from 'common/Platform';
-import { TimeBasedDebouncer } from 'browser/TimeBasedDebouncer';
-import { addDisposableDomListener } from 'browser/Lifecycle';
-import { Disposable } from 'common/Lifecycle';
-import { ScreenDprMonitor } from 'browser/ScreenDprMonitor';
-import { IRenderService } from 'browser/services/Services';
-import { removeElementFromParent } from 'browser/Dom';
-
-const MAX_ROWS_TO_READ = 20;
-
-const enum BoundaryPosition {
- TOP,
- BOTTOM
-}
-
-export class AccessibilityManager extends Disposable {
- private _accessibilityTreeRoot: HTMLElement;
- private _rowContainer: HTMLElement;
- private _rowElements: HTMLElement[];
- private _liveRegion: HTMLElement;
- private _liveRegionLineCount: number = 0;
-
- private _renderRowsDebouncer: IRenderDebouncer;
- private _screenDprMonitor: ScreenDprMonitor;
-
- private _topBoundaryFocusListener: (e: FocusEvent) => void;
- private _bottomBoundaryFocusListener: (e: FocusEvent) => void;
-
- /**
- * This queue has a character pushed to it for keys that are pressed, if the
- * next character added to the terminal is equal to the key char then it is
- * not announced (added to live region) because it has already been announced
- * by the textarea event (which cannot be canceled). There are some race
- * condition cases if there is typing while data is streaming, but this covers
- * the main case of typing into the prompt and inputting the answer to a
- * question (Y/N, etc.).
- */
- private _charsToConsume: string[] = [];
-
- private _charsToAnnounce: string = '';
-
- constructor(
- private readonly _terminal: ITerminal,
- private readonly _renderService: IRenderService
- ) {
- super();
- this._accessibilityTreeRoot = document.createElement('div');
- this._accessibilityTreeRoot.classList.add('xterm-accessibility');
- this._accessibilityTreeRoot.tabIndex = 0;
-
- this._rowContainer = document.createElement('div');
- this._rowContainer.setAttribute('role', 'list');
- this._rowContainer.classList.add('xterm-accessibility-tree');
- this._rowElements = [];
- for (let i = 0; i < this._terminal.rows; i++) {
- this._rowElements[i] = this._createAccessibilityTreeNode();
- this._rowContainer.appendChild(this._rowElements[i]);
- }
-
- this._topBoundaryFocusListener = e => this._onBoundaryFocus(e, BoundaryPosition.TOP);
- this._bottomBoundaryFocusListener = e => this._onBoundaryFocus(e, BoundaryPosition.BOTTOM);
- this._rowElements[0].addEventListener('focus', this._topBoundaryFocusListener);
- this._rowElements[this._rowElements.length - 1].addEventListener('focus', this._bottomBoundaryFocusListener);
-
- this._refreshRowsDimensions();
- this._accessibilityTreeRoot.appendChild(this._rowContainer);
-
- this._renderRowsDebouncer = new TimeBasedDebouncer(this._renderRows.bind(this));
- this._refreshRows();
-
- this._liveRegion = document.createElement('div');
- this._liveRegion.classList.add('live-region');
- this._liveRegion.setAttribute('aria-live', 'assertive');
- this._accessibilityTreeRoot.appendChild(this._liveRegion);
-
- if (!this._terminal.element) {
- throw new Error('Cannot enable accessibility before Terminal.open');
- }
- this._terminal.element.insertAdjacentElement('afterbegin', this._accessibilityTreeRoot);
-
- this.register(this._renderRowsDebouncer);
- this.register(this._terminal.onResize(e => this._onResize(e.rows)));
- this.register(this._terminal.onRender(e => this._refreshRows(e.start, e.end)));
- this.register(this._terminal.onScroll(() => this._refreshRows()));
- // Line feed is an issue as the prompt won't be read out after a command is run
- this.register(this._terminal.onA11yChar(char => this._onChar(char)));
- this.register(this._terminal.onLineFeed(() => this._onChar('\n')));
- this.register(this._terminal.onA11yTab(spaceCount => this._onTab(spaceCount)));
- this.register(this._terminal.onKey(e => this._onKey(e.key)));
- this.register(this._terminal.onBlur(() => this._clearLiveRegion()));
- this.register(this._renderService.onDimensionsChange(() => this._refreshRowsDimensions()));
-
- this._screenDprMonitor = new ScreenDprMonitor();
- this.register(this._screenDprMonitor);
- this._screenDprMonitor.setListener(() => this._refreshRowsDimensions());
- // This shouldn't be needed on modern browsers but is present in case the
- // media query that drives the ScreenDprMonitor isn't supported
- this.register(addDisposableDomListener(window, 'resize', () => this._refreshRowsDimensions()));
- }
-
- public dispose(): void {
- super.dispose();
- removeElementFromParent(this._accessibilityTreeRoot);
- this._rowElements.length = 0;
- }
-
- private _onBoundaryFocus(e: FocusEvent, position: BoundaryPosition): void {
- const boundaryElement = e.target as HTMLElement;
- const beforeBoundaryElement = this._rowElements[position === BoundaryPosition.TOP ? 1 : this._rowElements.length - 2];
-
- // Don't scroll if the buffer top has reached the end in that direction
- const posInSet = boundaryElement.getAttribute('aria-posinset');
- const lastRowPos = position === BoundaryPosition.TOP ? '1' : `${this._terminal.buffer.lines.length}`;
- if (posInSet === lastRowPos) {
- return;
- }
-
- // Don't scroll when the last focused item was not the second row (focus is going the other
- // direction)
- if (e.relatedTarget !== beforeBoundaryElement) {
- return;
- }
-
- // Remove old boundary element from array
- let topBoundaryElement: HTMLElement;
- let bottomBoundaryElement: HTMLElement;
- if (position === BoundaryPosition.TOP) {
- topBoundaryElement = boundaryElement;
- bottomBoundaryElement = this._rowElements.pop()!;
- this._rowContainer.removeChild(bottomBoundaryElement);
- } else {
- topBoundaryElement = this._rowElements.shift()!;
- bottomBoundaryElement = boundaryElement;
- this._rowContainer.removeChild(topBoundaryElement);
- }
-
- // Remove listeners from old boundary elements
- topBoundaryElement.removeEventListener('focus', this._topBoundaryFocusListener);
- bottomBoundaryElement.removeEventListener('focus', this._bottomBoundaryFocusListener);
-
- // Add new element to array/DOM
- if (position === BoundaryPosition.TOP) {
- const newElement = this._createAccessibilityTreeNode();
- this._rowElements.unshift(newElement);
- this._rowContainer.insertAdjacentElement('afterbegin', newElement);
- } else {
- const newElement = this._createAccessibilityTreeNode();
- this._rowElements.push(newElement);
- this._rowContainer.appendChild(newElement);
- }
-
- // Add listeners to new boundary elements
- this._rowElements[0].addEventListener('focus', this._topBoundaryFocusListener);
- this._rowElements[this._rowElements.length - 1].addEventListener('focus', this._bottomBoundaryFocusListener);
-
- // Scroll up
- this._terminal.scrollLines(position === BoundaryPosition.TOP ? -1 : 1);
-
- // Focus new boundary before element
- this._rowElements[position === BoundaryPosition.TOP ? 1 : this._rowElements.length - 2].focus();
-
- // Prevent the standard behavior
- e.preventDefault();
- e.stopImmediatePropagation();
- }
-
- private _onResize(rows: number): void {
- // Remove bottom boundary listener
- this._rowElements[this._rowElements.length - 1].removeEventListener('focus', this._bottomBoundaryFocusListener);
-
- // Grow rows as required
- for (let i = this._rowContainer.children.length; i < this._terminal.rows; i++) {
- this._rowElements[i] = this._createAccessibilityTreeNode();
- this._rowContainer.appendChild(this._rowElements[i]);
- }
- // Shrink rows as required
- while (this._rowElements.length > rows) {
- this._rowContainer.removeChild(this._rowElements.pop()!);
- }
-
- // Add bottom boundary listener
- this._rowElements[this._rowElements.length - 1].addEventListener('focus', this._bottomBoundaryFocusListener);
-
- this._refreshRowsDimensions();
- }
-
- private _createAccessibilityTreeNode(): HTMLElement {
- const element = document.createElement('div');
- element.setAttribute('role', 'listitem');
- element.tabIndex = -1;
- this._refreshRowDimensions(element);
- return element;
- }
-
- private _onTab(spaceCount: number): void {
- for (let i = 0; i < spaceCount; i++) {
- this._onChar(' ');
- }
- }
-
- private _onChar(char: string): void {
- if (this._liveRegionLineCount < MAX_ROWS_TO_READ + 1) {
- if (this._charsToConsume.length > 0) {
- // Have the screen reader ignore the char if it was just input
- const shiftedChar = this._charsToConsume.shift();
- if (shiftedChar !== char) {
- this._charsToAnnounce += char;
- }
- } else {
- this._charsToAnnounce += char;
- }
-
- if (char === '\n') {
- this._liveRegionLineCount++;
- if (this._liveRegionLineCount === MAX_ROWS_TO_READ + 1) {
- this._liveRegion.textContent += Strings.tooMuchOutput;
- }
- }
-
- // Only detach/attach on mac as otherwise messages can go unaccounced
- if (isMac) {
- if (this._liveRegion.textContent && this._liveRegion.textContent.length > 0 && !this._liveRegion.parentNode) {
- setTimeout(() => {
- this._accessibilityTreeRoot.appendChild(this._liveRegion);
- }, 0);
- }
- }
- }
- }
-
- private _clearLiveRegion(): void {
- this._liveRegion.textContent = '';
- this._liveRegionLineCount = 0;
-
- // Only detach/attach on mac as otherwise messages can go unaccounced
- if (isMac) {
- removeElementFromParent(this._liveRegion);
- }
- }
-
- private _onKey(keyChar: string): void {
- this._clearLiveRegion();
- this._charsToConsume.push(keyChar);
- }
-
- private _refreshRows(start?: number, end?: number): void {
- this._renderRowsDebouncer.refresh(start, end, this._terminal.rows);
- }
-
- private _renderRows(start: number, end: number): void {
- const buffer: IBuffer = this._terminal.buffer;
- const setSize = buffer.lines.length.toString();
- for (let i = start; i <= end; i++) {
- const lineData = buffer.translateBufferLineToString(buffer.ydisp + i, true);
- const posInSet = (buffer.ydisp + i + 1).toString();
- const element = this._rowElements[i];
- if (element) {
- if (lineData.length === 0) {
- element.innerText = '\u00a0';
- } else {
- element.textContent = lineData;
- }
- element.setAttribute('aria-posinset', posInSet);
- element.setAttribute('aria-setsize', setSize);
- }
- }
- this._announceCharacters();
- }
-
- private _refreshRowsDimensions(): void {
- if (!this._renderService.dimensions.actualCellHeight) {
- return;
- }
- if (this._rowElements.length !== this._terminal.rows) {
- this._onResize(this._terminal.rows);
- }
- for (let i = 0; i < this._terminal.rows; i++) {
- this._refreshRowDimensions(this._rowElements[i]);
- }
- }
-
- private _refreshRowDimensions(element: HTMLElement): void {
- element.style.height = `${this._renderService.dimensions.actualCellHeight}px`;
- }
-
- private _announceCharacters(): void {
- if (this._charsToAnnounce.length === 0) {
- return;
- }
- this._liveRegion.textContent += this._charsToAnnounce;
- this._charsToAnnounce = '';
- }
-}
diff --git a/node_modules/xterm/src/browser/Clipboard.ts b/node_modules/xterm/src/browser/Clipboard.ts
deleted file mode 100644
index 29e865c..0000000
--- a/node_modules/xterm/src/browser/Clipboard.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-/**
- * Copyright (c) 2016 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ISelectionService } from 'browser/services/Services';
-import { ICoreService } from 'common/services/Services';
-
-/**
- * Prepares text to be pasted into the terminal by normalizing the line endings
- * @param text The pasted text that needs processing before inserting into the terminal
- */
-export function prepareTextForTerminal(text: string): string {
- return text.replace(/\r?\n/g, '\r');
-}
-
-/**
- * Bracket text for paste, if necessary, as per https://cirw.in/blog/bracketed-paste
- * @param text The pasted text to bracket
- */
-export function bracketTextForPaste(text: string, bracketedPasteMode: boolean): string {
- if (bracketedPasteMode) {
- return '\x1b[200~' + text + '\x1b[201~';
- }
- return text;
-}
-
-/**
- * Binds copy functionality to the given terminal.
- * @param ev The original copy event to be handled
- */
-export function copyHandler(ev: ClipboardEvent, selectionService: ISelectionService): void {
- if (ev.clipboardData) {
- ev.clipboardData.setData('text/plain', selectionService.selectionText);
- }
- // Prevent or the original text will be copied.
- ev.preventDefault();
-}
-
-/**
- * Redirect the clipboard's data to the terminal's input handler.
- * @param ev The original paste event to be handled
- * @param term The terminal on which to apply the handled paste event
- */
-export function handlePasteEvent(ev: ClipboardEvent, textarea: HTMLTextAreaElement, coreService: ICoreService): void {
- ev.stopPropagation();
- if (ev.clipboardData) {
- const text = ev.clipboardData.getData('text/plain');
- paste(text, textarea, coreService);
- }
-}
-
-export function paste(text: string, textarea: HTMLTextAreaElement, coreService: ICoreService): void {
- text = prepareTextForTerminal(text);
- text = bracketTextForPaste(text, coreService.decPrivateModes.bracketedPasteMode);
- coreService.triggerDataEvent(text, true);
- textarea.value = '';
-}
-
-/**
- * Moves the textarea under the mouse cursor and focuses it.
- * @param ev The original right click event to be handled.
- * @param textarea The terminal's textarea.
- */
-export function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextAreaElement, screenElement: HTMLElement): void {
-
- // Calculate textarea position relative to the screen element
- const pos = screenElement.getBoundingClientRect();
- const left = ev.clientX - pos.left - 10;
- const top = ev.clientY - pos.top - 10;
-
- // Bring textarea at the cursor position
- textarea.style.width = '20px';
- textarea.style.height = '20px';
- textarea.style.left = `${left}px`;
- textarea.style.top = `${top}px`;
- textarea.style.zIndex = '1000';
-
- textarea.focus();
-}
-
-/**
- * Bind to right-click event and allow right-click copy and paste.
- * @param ev The original right click event to be handled.
- * @param textarea The terminal's textarea.
- * @param selectionService The terminal's selection manager.
- * @param shouldSelectWord If true and there is no selection the current word will be selected
- */
-export function rightClickHandler(ev: MouseEvent, textarea: HTMLTextAreaElement, screenElement: HTMLElement, selectionService: ISelectionService, shouldSelectWord: boolean): void {
- moveTextAreaUnderMouseCursor(ev, textarea, screenElement);
-
- if (shouldSelectWord) {
- selectionService.rightClickSelect(ev);
- }
-
- // Get textarea ready to copy from the context menu
- textarea.value = selectionService.selectionText;
- textarea.select();
-}
diff --git a/node_modules/xterm/src/browser/Color.ts b/node_modules/xterm/src/browser/Color.ts
deleted file mode 100644
index 32e311d..0000000
--- a/node_modules/xterm/src/browser/Color.ts
+++ /dev/null
@@ -1,236 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IColor } from 'browser/Types';
-import { IColorRGB } from 'common/Types';
-
-/**
- * Helper functions where the source type is "channels" (individual color channels as numbers).
- */
-export namespace channels {
- export function toCss(r: number, g: number, b: number, a?: number): string {
- if (a !== undefined) {
- return `#${toPaddedHex(r)}${toPaddedHex(g)}${toPaddedHex(b)}${toPaddedHex(a)}`;
- }
- return `#${toPaddedHex(r)}${toPaddedHex(g)}${toPaddedHex(b)}`;
- }
-
- export function toRgba(r: number, g: number, b: number, a: number = 0xFF): number {
- // Note: The aggregated number is RGBA32 (BE), thus needs to be converted to ABGR32
- // on LE systems, before it can be used for direct 32-bit buffer writes.
- // >>> 0 forces an unsigned int
- return (r << 24 | g << 16 | b << 8 | a) >>> 0;
- }
-}
-
-/**
- * Helper functions where the source type is `IColor`.
- */
-export namespace color {
- export function blend(bg: IColor, fg: IColor): IColor {
- const a = (fg.rgba & 0xFF) / 255;
- if (a === 1) {
- return {
- css: fg.css,
- rgba: fg.rgba
- };
- }
- const fgR = (fg.rgba >> 24) & 0xFF;
- const fgG = (fg.rgba >> 16) & 0xFF;
- const fgB = (fg.rgba >> 8) & 0xFF;
- const bgR = (bg.rgba >> 24) & 0xFF;
- const bgG = (bg.rgba >> 16) & 0xFF;
- const bgB = (bg.rgba >> 8) & 0xFF;
- const r = bgR + Math.round((fgR - bgR) * a);
- const g = bgG + Math.round((fgG - bgG) * a);
- const b = bgB + Math.round((fgB - bgB) * a);
- const css = channels.toCss(r, g, b);
- const rgba = channels.toRgba(r, g, b);
- return { css, rgba };
- }
-
- export function isOpaque(color: IColor): boolean {
- return (color.rgba & 0xFF) === 0xFF;
- }
-
- export function ensureContrastRatio(bg: IColor, fg: IColor, ratio: number): IColor | undefined {
- const result = rgba.ensureContrastRatio(bg.rgba, fg.rgba, ratio);
- if (!result) {
- return undefined;
- }
- return rgba.toColor(
- (result >> 24 & 0xFF),
- (result >> 16 & 0xFF),
- (result >> 8 & 0xFF)
- );
- }
-
- export function opaque(color: IColor): IColor {
- const rgbaColor = (color.rgba | 0xFF) >>> 0;
- const [r, g, b] = rgba.toChannels(rgbaColor);
- return {
- css: channels.toCss(r, g, b),
- rgba: rgbaColor
- };
- }
-
- export function opacity(color: IColor, opacity: number): IColor {
- const a = Math.round(opacity * 0xFF);
- const [r, g, b] = rgba.toChannels(color.rgba);
- return {
- css: channels.toCss(r, g, b, a),
- rgba: channels.toRgba(r, g, b, a)
- };
- }
-
- export function toColorRGB(color: IColor): IColorRGB {
- return [(color.rgba >> 24) & 0xFF, (color.rgba >> 16) & 0xFF, (color.rgba >> 8) & 0xFF];
- }
-}
-
-/**
- * Helper functions where the source type is "css" (string: '#rgb', '#rgba', '#rrggbb', '#rrggbbaa').
- */
-export namespace css {
- export function toColor(css: string): IColor {
- switch (css.length) {
- case 7: // #rrggbb
- return {
- css,
- rgba: (parseInt(css.slice(1), 16) << 8 | 0xFF) >>> 0
- };
- case 9: // #rrggbbaa
- return {
- css,
- rgba: parseInt(css.slice(1), 16) >>> 0
- };
- }
- throw new Error('css.toColor: Unsupported css format');
- }
-}
-
-/**
- * Helper functions where the source type is "rgb" (number: 0xrrggbb).
- */
-export namespace rgb {
- /**
- * Gets the relative luminance of an RGB color, this is useful in determining the contrast ratio
- * between two colors.
- * @param rgb The color to use.
- * @see https://www.w3.org/TR/WCAG20/#relativeluminancedef
- */
- export function relativeLuminance(rgb: number): number {
- return relativeLuminance2(
- (rgb >> 16) & 0xFF,
- (rgb >> 8 ) & 0xFF,
- (rgb ) & 0xFF);
- }
-
- /**
- * Gets the relative luminance of an RGB color, this is useful in determining the contrast ratio
- * between two colors.
- * @param r The red channel (0x00 to 0xFF).
- * @param g The green channel (0x00 to 0xFF).
- * @param b The blue channel (0x00 to 0xFF).
- * @see https://www.w3.org/TR/WCAG20/#relativeluminancedef
- */
- export function relativeLuminance2(r: number, g: number, b: number): number {
- const rs = r / 255;
- const gs = g / 255;
- const bs = b / 255;
- const rr = rs <= 0.03928 ? rs / 12.92 : Math.pow((rs + 0.055) / 1.055, 2.4);
- const rg = gs <= 0.03928 ? gs / 12.92 : Math.pow((gs + 0.055) / 1.055, 2.4);
- const rb = bs <= 0.03928 ? bs / 12.92 : Math.pow((bs + 0.055) / 1.055, 2.4);
- return rr * 0.2126 + rg * 0.7152 + rb * 0.0722;
- }
-}
-
-/**
- * Helper functions where the source type is "rgba" (number: 0xrrggbbaa).
- */
-export namespace rgba {
- export function ensureContrastRatio(bgRgba: number, fgRgba: number, ratio: number): number | undefined {
- const bgL = rgb.relativeLuminance(bgRgba >> 8);
- const fgL = rgb.relativeLuminance(fgRgba >> 8);
- const cr = contrastRatio(bgL, fgL);
- if (cr < ratio) {
- if (fgL < bgL) {
- return reduceLuminance(bgRgba, fgRgba, ratio);
- }
- return increaseLuminance(bgRgba, fgRgba, ratio);
- }
- return undefined;
- }
-
- export function reduceLuminance(bgRgba: number, fgRgba: number, ratio: number): number {
- // This is a naive but fast approach to reducing luminance as converting to
- // HSL and back is expensive
- const bgR = (bgRgba >> 24) & 0xFF;
- const bgG = (bgRgba >> 16) & 0xFF;
- const bgB = (bgRgba >> 8) & 0xFF;
- let fgR = (fgRgba >> 24) & 0xFF;
- let fgG = (fgRgba >> 16) & 0xFF;
- let fgB = (fgRgba >> 8) & 0xFF;
- let cr = contrastRatio(rgb.relativeLuminance2(fgR, fgB, fgG), rgb.relativeLuminance2(bgR, bgG, bgB));
- while (cr < ratio && (fgR > 0 || fgG > 0 || fgB > 0)) {
- // Reduce by 10% until the ratio is hit
- fgR -= Math.max(0, Math.ceil(fgR * 0.1));
- fgG -= Math.max(0, Math.ceil(fgG * 0.1));
- fgB -= Math.max(0, Math.ceil(fgB * 0.1));
- cr = contrastRatio(rgb.relativeLuminance2(fgR, fgB, fgG), rgb.relativeLuminance2(bgR, bgG, bgB));
- }
- return (fgR << 24 | fgG << 16 | fgB << 8 | 0xFF) >>> 0;
- }
-
- export function increaseLuminance(bgRgba: number, fgRgba: number, ratio: number): number {
- // This is a naive but fast approach to increasing luminance as converting to
- // HSL and back is expensive
- const bgR = (bgRgba >> 24) & 0xFF;
- const bgG = (bgRgba >> 16) & 0xFF;
- const bgB = (bgRgba >> 8) & 0xFF;
- let fgR = (fgRgba >> 24) & 0xFF;
- let fgG = (fgRgba >> 16) & 0xFF;
- let fgB = (fgRgba >> 8) & 0xFF;
- let cr = contrastRatio(rgb.relativeLuminance2(fgR, fgB, fgG), rgb.relativeLuminance2(bgR, bgG, bgB));
- while (cr < ratio && (fgR < 0xFF || fgG < 0xFF || fgB < 0xFF)) {
- // Increase by 10% until the ratio is hit
- fgR = Math.min(0xFF, fgR + Math.ceil((255 - fgR) * 0.1));
- fgG = Math.min(0xFF, fgG + Math.ceil((255 - fgG) * 0.1));
- fgB = Math.min(0xFF, fgB + Math.ceil((255 - fgB) * 0.1));
- cr = contrastRatio(rgb.relativeLuminance2(fgR, fgB, fgG), rgb.relativeLuminance2(bgR, bgG, bgB));
- }
- return (fgR << 24 | fgG << 16 | fgB << 8 | 0xFF) >>> 0;
- }
-
- // FIXME: Move this to channels NS?
- export function toChannels(value: number): [number, number, number, number] {
- return [(value >> 24) & 0xFF, (value >> 16) & 0xFF, (value >> 8) & 0xFF, value & 0xFF];
- }
-
- export function toColor(r: number, g: number, b: number): IColor {
- return {
- css: channels.toCss(r, g, b),
- rgba: channels.toRgba(r, g, b)
- };
- }
-}
-
-export function toPaddedHex(c: number): string {
- const s = c.toString(16);
- return s.length < 2 ? '0' + s : s;
-}
-
-/**
- * Gets the contrast ratio between two relative luminance values.
- * @param l1 The first relative luminance.
- * @param l2 The first relative luminance.
- * @see https://www.w3.org/TR/WCAG20/#contrast-ratiodef
- */
-export function contrastRatio(l1: number, l2: number): number {
- if (l1 < l2) {
- return (l2 + 0.05) / (l1 + 0.05);
- }
- return (l1 + 0.05) / (l2 + 0.05);
-}
diff --git a/node_modules/xterm/src/browser/ColorContrastCache.ts b/node_modules/xterm/src/browser/ColorContrastCache.ts
deleted file mode 100644
index b96b66c..0000000
--- a/node_modules/xterm/src/browser/ColorContrastCache.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IColor, IColorContrastCache } from 'browser/Types';
-
-export class ColorContrastCache implements IColorContrastCache {
- private _color: { [bg: number]: { [fg: number]: IColor | null | undefined } | undefined } = {};
- private _rgba: { [bg: number]: { [fg: number]: string | null | undefined } | undefined } = {};
-
- public clear(): void {
- this._color = {};
- this._rgba = {};
- }
-
- public setCss(bg: number, fg: number, value: string | null): void {
- if (!this._rgba[bg]) {
- this._rgba[bg] = {};
- }
- this._rgba[bg]![fg] = value;
- }
-
- public getCss(bg: number, fg: number): string | null | undefined {
- return this._rgba[bg] ? this._rgba[bg]![fg] : undefined;
- }
-
- public setColor(bg: number, fg: number, value: IColor | null): void {
- if (!this._color[bg]) {
- this._color[bg] = {};
- }
- this._color[bg]![fg] = value;
- }
-
- public getColor(bg: number, fg: number): IColor | null | undefined {
- return this._color[bg] ? this._color[bg]![fg] : undefined;
- }
-}
diff --git a/node_modules/xterm/src/browser/ColorManager.ts b/node_modules/xterm/src/browser/ColorManager.ts
deleted file mode 100644
index b4b57c6..0000000
--- a/node_modules/xterm/src/browser/ColorManager.ts
+++ /dev/null
@@ -1,258 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IColorManager, IColor, IColorSet, IColorContrastCache } from 'browser/Types';
-import { ITheme } from 'common/services/Services';
-import { channels, color, css } from 'browser/Color';
-import { ColorContrastCache } from 'browser/ColorContrastCache';
-import { ColorIndex } from 'common/Types';
-
-
-interface IRestoreColorSet {
- foreground: IColor;
- background: IColor;
- cursor: IColor;
- ansi: IColor[];
-}
-
-
-const DEFAULT_FOREGROUND = css.toColor('#ffffff');
-const DEFAULT_BACKGROUND = css.toColor('#000000');
-const DEFAULT_CURSOR = css.toColor('#ffffff');
-const DEFAULT_CURSOR_ACCENT = css.toColor('#000000');
-const DEFAULT_SELECTION = {
- css: 'rgba(255, 255, 255, 0.3)',
- rgba: 0xFFFFFF4D
-};
-
-// An IIFE to generate DEFAULT_ANSI_COLORS.
-export const DEFAULT_ANSI_COLORS = Object.freeze((() => {
- const colors = [
- // dark:
- css.toColor('#2e3436'),
- css.toColor('#cc0000'),
- css.toColor('#4e9a06'),
- css.toColor('#c4a000'),
- css.toColor('#3465a4'),
- css.toColor('#75507b'),
- css.toColor('#06989a'),
- css.toColor('#d3d7cf'),
- // bright:
- css.toColor('#555753'),
- css.toColor('#ef2929'),
- css.toColor('#8ae234'),
- css.toColor('#fce94f'),
- css.toColor('#729fcf'),
- css.toColor('#ad7fa8'),
- css.toColor('#34e2e2'),
- css.toColor('#eeeeec')
- ];
-
- // Fill in the remaining 240 ANSI colors.
- // Generate colors (16-231)
- const v = [0x00, 0x5f, 0x87, 0xaf, 0xd7, 0xff];
- for (let i = 0; i < 216; i++) {
- const r = v[(i / 36) % 6 | 0];
- const g = v[(i / 6) % 6 | 0];
- const b = v[i % 6];
- colors.push({
- css: channels.toCss(r, g, b),
- rgba: channels.toRgba(r, g, b)
- });
- }
-
- // Generate greys (232-255)
- for (let i = 0; i < 24; i++) {
- const c = 8 + i * 10;
- colors.push({
- css: channels.toCss(c, c, c),
- rgba: channels.toRgba(c, c, c)
- });
- }
-
- return colors;
-})());
-
-/**
- * Manages the source of truth for a terminal's colors.
- */
-export class ColorManager implements IColorManager {
- public colors: IColorSet;
- private _ctx: CanvasRenderingContext2D;
- private _litmusColor: CanvasGradient;
- private _contrastCache: IColorContrastCache;
- private _restoreColors!: IRestoreColorSet;
-
- constructor(document: Document, public allowTransparency: boolean) {
- const canvas = document.createElement('canvas');
- canvas.width = 1;
- canvas.height = 1;
- const ctx = canvas.getContext('2d');
- if (!ctx) {
- throw new Error('Could not get rendering context');
- }
- this._ctx = ctx;
- this._ctx.globalCompositeOperation = 'copy';
- this._litmusColor = this._ctx.createLinearGradient(0, 0, 1, 1);
- this._contrastCache = new ColorContrastCache();
- this.colors = {
- foreground: DEFAULT_FOREGROUND,
- background: DEFAULT_BACKGROUND,
- cursor: DEFAULT_CURSOR,
- cursorAccent: DEFAULT_CURSOR_ACCENT,
- selectionTransparent: DEFAULT_SELECTION,
- selectionOpaque: color.blend(DEFAULT_BACKGROUND, DEFAULT_SELECTION),
- ansi: DEFAULT_ANSI_COLORS.slice(),
- contrastCache: this._contrastCache
- };
- this._updateRestoreColors();
- }
-
- public onOptionsChange(key: string): void {
- if (key === 'minimumContrastRatio') {
- this._contrastCache.clear();
- }
- }
-
- /**
- * Sets the terminal's theme.
- * @param theme The theme to use. If a partial theme is provided then default
- * colors will be used where colors are not defined.
- */
- public setTheme(theme: ITheme = {}): void {
- this.colors.foreground = this._parseColor(theme.foreground, DEFAULT_FOREGROUND);
- this.colors.background = this._parseColor(theme.background, DEFAULT_BACKGROUND);
- this.colors.cursor = this._parseColor(theme.cursor, DEFAULT_CURSOR, true);
- this.colors.cursorAccent = this._parseColor(theme.cursorAccent, DEFAULT_CURSOR_ACCENT, true);
- this.colors.selectionTransparent = this._parseColor(theme.selection, DEFAULT_SELECTION, true);
- this.colors.selectionOpaque = color.blend(this.colors.background, this.colors.selectionTransparent);
- /**
- * If selection color is opaque, blend it with background with 0.3 opacity
- * Issue #2737
- */
- if (color.isOpaque(this.colors.selectionTransparent)) {
- const opacity = 0.3;
- this.colors.selectionTransparent = color.opacity(this.colors.selectionTransparent, opacity);
- }
- this.colors.ansi[0] = this._parseColor(theme.black, DEFAULT_ANSI_COLORS[0]);
- this.colors.ansi[1] = this._parseColor(theme.red, DEFAULT_ANSI_COLORS[1]);
- this.colors.ansi[2] = this._parseColor(theme.green, DEFAULT_ANSI_COLORS[2]);
- this.colors.ansi[3] = this._parseColor(theme.yellow, DEFAULT_ANSI_COLORS[3]);
- this.colors.ansi[4] = this._parseColor(theme.blue, DEFAULT_ANSI_COLORS[4]);
- this.colors.ansi[5] = this._parseColor(theme.magenta, DEFAULT_ANSI_COLORS[5]);
- this.colors.ansi[6] = this._parseColor(theme.cyan, DEFAULT_ANSI_COLORS[6]);
- this.colors.ansi[7] = this._parseColor(theme.white, DEFAULT_ANSI_COLORS[7]);
- this.colors.ansi[8] = this._parseColor(theme.brightBlack, DEFAULT_ANSI_COLORS[8]);
- this.colors.ansi[9] = this._parseColor(theme.brightRed, DEFAULT_ANSI_COLORS[9]);
- this.colors.ansi[10] = this._parseColor(theme.brightGreen, DEFAULT_ANSI_COLORS[10]);
- this.colors.ansi[11] = this._parseColor(theme.brightYellow, DEFAULT_ANSI_COLORS[11]);
- this.colors.ansi[12] = this._parseColor(theme.brightBlue, DEFAULT_ANSI_COLORS[12]);
- this.colors.ansi[13] = this._parseColor(theme.brightMagenta, DEFAULT_ANSI_COLORS[13]);
- this.colors.ansi[14] = this._parseColor(theme.brightCyan, DEFAULT_ANSI_COLORS[14]);
- this.colors.ansi[15] = this._parseColor(theme.brightWhite, DEFAULT_ANSI_COLORS[15]);
- // Clear our the cache
- this._contrastCache.clear();
- this._updateRestoreColors();
- }
-
- public restoreColor(slot?: ColorIndex): void {
- // unset slot restores all ansi colors
- if (slot === undefined) {
- for (let i = 0; i < this._restoreColors.ansi.length; ++i) {
- this.colors.ansi[i] = this._restoreColors.ansi[i];
- }
- return;
- }
- switch (slot) {
- case ColorIndex.FOREGROUND:
- this.colors.foreground = this._restoreColors.foreground;
- break;
- case ColorIndex.BACKGROUND:
- this.colors.background = this._restoreColors.background;
- break;
- case ColorIndex.CURSOR:
- this.colors.cursor = this._restoreColors.cursor;
- break;
- default:
- this.colors.ansi[slot] = this._restoreColors.ansi[slot];
- }
- }
-
- private _updateRestoreColors(): void {
- this._restoreColors = {
- foreground: this.colors.foreground,
- background: this.colors.background,
- cursor: this.colors.cursor,
- ansi: [...this.colors.ansi]
- };
- }
-
- private _parseColor(
- css: string | undefined,
- fallback: IColor,
- allowTransparency: boolean = this.allowTransparency
- ): IColor {
- if (css === undefined) {
- return fallback;
- }
-
- // If parsing the value results in failure, then it must be ignored, and the attribute must
- // retain its previous value.
- // -- https://html.spec.whatwg.org/multipage/canvas.html#fill-and-stroke-styles
- this._ctx.fillStyle = this._litmusColor;
- this._ctx.fillStyle = css;
- if (typeof this._ctx.fillStyle !== 'string') {
- console.warn(`Color: ${css} is invalid using fallback ${fallback.css}`);
- return fallback;
- }
-
- this._ctx.fillRect(0, 0, 1, 1);
- const data = this._ctx.getImageData(0, 0, 1, 1).data;
-
- // Check if the printed color was transparent
- if (data[3] !== 0xFF) {
- if (!allowTransparency) {
- // Ideally we'd just ignore the alpha channel, but...
- //
- // Browsers may not give back exactly the same RGB values we put in, because most/all
- // convert the color to a pre-multiplied representation. getImageData converts that back to
- // a un-premultipled representation, but the precision loss may make the RGB channels unuable
- // on their own.
- //
- // E.g. In Chrome #12345610 turns into #10305010, and in the extreme case, 0xFFFFFF00 turns
- // into 0x00000000.
- //
- // "Note: Due to the lossy nature of converting to and from premultiplied alpha color values,
- // pixels that have just been set using putImageData() might be returned to an equivalent
- // getImageData() as different values."
- // -- https://html.spec.whatwg.org/multipage/canvas.html#pixel-manipulation
- //
- // So let's just use the fallback color in this case instead.
- console.warn(
- `Color: ${css} is using transparency, but allowTransparency is false. ` +
- `Using fallback ${fallback.css}.`
- );
- return fallback;
- }
-
- // https://html.spec.whatwg.org/multipage/canvas.html#serialisation-of-a-color
- // the color value has alpha less than 1.0, and the string is the color value in the CSS rgba()
- const [r, g, b, a] = this._ctx.fillStyle.substring(5, this._ctx.fillStyle.length - 1).split(',').map(component => Number(component));
- const alpha = Math.round(a * 255);
- const rgba: number = channels.toRgba(r, g, b, alpha);
- return {
- rgba,
- css
- };
- }
-
- return {
- // https://html.spec.whatwg.org/multipage/canvas.html#serialisation-of-a-color
- // if it has alpha equal to 1.0, then the string is a lowercase six-digit hex value, prefixed with a "#" character
- css: this._ctx.fillStyle,
- rgba: channels.toRgba(data[0], data[1], data[2], data[3])
- };
- }
-}
diff --git a/node_modules/xterm/src/browser/Dom.ts b/node_modules/xterm/src/browser/Dom.ts
deleted file mode 100644
index c558a8b..0000000
--- a/node_modules/xterm/src/browser/Dom.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * Copyright (c) 2020 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-export function removeElementFromParent(...elements: (HTMLElement | undefined)[]): void {
- for (const e of elements) {
- e?.parentElement?.removeChild(e);
- }
-}
diff --git a/node_modules/xterm/src/browser/Lifecycle.ts b/node_modules/xterm/src/browser/Lifecycle.ts
deleted file mode 100644
index 6e84179..0000000
--- a/node_modules/xterm/src/browser/Lifecycle.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IDisposable } from 'common/Types';
-
-/**
- * Adds a disposable listener to a node in the DOM, returning the disposable.
- * @param type The event type.
- * @param handler The handler for the listener.
- */
-export function addDisposableDomListener(
- node: Element | Window | Document,
- type: string,
- handler: (e: any) => void,
- options?: boolean | AddEventListenerOptions
-): IDisposable {
- node.addEventListener(type, handler, options);
- let disposed = false;
- return {
- dispose: () => {
- if (disposed) {
- return;
- }
- disposed = true;
- node.removeEventListener(type, handler, options);
- }
- };
-}
diff --git a/node_modules/xterm/src/browser/Linkifier.ts b/node_modules/xterm/src/browser/Linkifier.ts
deleted file mode 100644
index b17d66a..0000000
--- a/node_modules/xterm/src/browser/Linkifier.ts
+++ /dev/null
@@ -1,356 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ILinkifierEvent, ILinkMatcher, LinkMatcherHandler, ILinkMatcherOptions, ILinkifier, IMouseZoneManager, IMouseZone, IRegisteredLinkMatcher } from 'browser/Types';
-import { IBufferStringIteratorResult } from 'common/buffer/Types';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { ILogService, IBufferService, IOptionsService, IUnicodeService } from 'common/services/Services';
-
-/**
- * Limit of the unwrapping line expansion (overscan) at the top and bottom
- * of the actual viewport in ASCII characters.
- * A limit of 2000 should match most sane urls.
- */
-const OVERSCAN_CHAR_LIMIT = 2000;
-
-/**
- * The Linkifier applies links to rows shortly after they have been refreshed.
- */
-export class Linkifier implements ILinkifier {
- /**
- * The time to wait after a row is changed before it is linkified. This prevents
- * the costly operation of searching every row multiple times, potentially a
- * huge amount of times.
- */
- protected static _timeBeforeLatency = 200;
-
- protected _linkMatchers: IRegisteredLinkMatcher[] = [];
-
- private _mouseZoneManager: IMouseZoneManager | undefined;
- private _element: HTMLElement | undefined;
-
- private _rowsTimeoutId: number | undefined;
- private _nextLinkMatcherId = 0;
- private _rowsToLinkify: { start: number | undefined, end: number | undefined };
-
- private _onShowLinkUnderline = new EventEmitter<ILinkifierEvent>();
- public get onShowLinkUnderline(): IEvent<ILinkifierEvent> { return this._onShowLinkUnderline.event; }
- private _onHideLinkUnderline = new EventEmitter<ILinkifierEvent>();
- public get onHideLinkUnderline(): IEvent<ILinkifierEvent> { return this._onHideLinkUnderline.event; }
- private _onLinkTooltip = new EventEmitter<ILinkifierEvent>();
- public get onLinkTooltip(): IEvent<ILinkifierEvent> { return this._onLinkTooltip.event; }
-
- constructor(
- @IBufferService protected readonly _bufferService: IBufferService,
- @ILogService private readonly _logService: ILogService,
- @IUnicodeService private readonly _unicodeService: IUnicodeService
- ) {
- this._rowsToLinkify = {
- start: undefined,
- end: undefined
- };
- }
-
- /**
- * Attaches the linkifier to the DOM, enabling linkification.
- * @param mouseZoneManager The mouse zone manager to register link zones with.
- */
- public attachToDom(element: HTMLElement, mouseZoneManager: IMouseZoneManager): void {
- this._element = element;
- this._mouseZoneManager = mouseZoneManager;
- }
-
- /**
- * Queue linkification on a set of rows.
- * @param start The row to linkify from (inclusive).
- * @param end The row to linkify to (inclusive).
- */
- public linkifyRows(start: number, end: number): void {
- // Don't attempt linkify if not yet attached to DOM
- if (!this._mouseZoneManager) {
- return;
- }
-
- // Increase range to linkify
- if (this._rowsToLinkify.start === undefined || this._rowsToLinkify.end === undefined) {
- this._rowsToLinkify.start = start;
- this._rowsToLinkify.end = end;
- } else {
- this._rowsToLinkify.start = Math.min(this._rowsToLinkify.start, start);
- this._rowsToLinkify.end = Math.max(this._rowsToLinkify.end, end);
- }
-
- // Clear out any existing links on this row range
- this._mouseZoneManager.clearAll(start, end);
-
- // Restart timer
- if (this._rowsTimeoutId) {
- clearTimeout(this._rowsTimeoutId);
- }
-
- // Cannot use window.setTimeout since tests need to run in node
- this._rowsTimeoutId = setTimeout(() => this._linkifyRows(), Linkifier._timeBeforeLatency) as any as number;
- }
-
- /**
- * Linkifies the rows requested.
- */
- private _linkifyRows(): void {
- this._rowsTimeoutId = undefined;
- const buffer = this._bufferService.buffer;
-
- if (this._rowsToLinkify.start === undefined || this._rowsToLinkify.end === undefined) {
- this._logService.debug('_rowToLinkify was unset before _linkifyRows was called');
- return;
- }
-
- // Ensure the start row exists
- const absoluteRowIndexStart = buffer.ydisp + this._rowsToLinkify.start;
- if (absoluteRowIndexStart >= buffer.lines.length) {
- return;
- }
-
- // Invalidate bad end row values (if a resize happened)
- const absoluteRowIndexEnd = buffer.ydisp + Math.min(this._rowsToLinkify.end, this._bufferService.rows) + 1;
-
- // Iterate over the range of unwrapped content strings within start..end
- // (excluding).
- // _doLinkifyRow gets full unwrapped lines with the start row as buffer offset
- // for every matcher.
- // The unwrapping is needed to also match content that got wrapped across
- // several buffer lines. To avoid a worst case scenario where the whole buffer
- // contains just a single unwrapped string we limit this line expansion beyond
- // the viewport to +OVERSCAN_CHAR_LIMIT chars (overscan) at top and bottom.
- // This comes with the tradeoff that matches longer than OVERSCAN_CHAR_LIMIT
- // chars will not match anymore at the viewport borders.
- const overscanLineLimit = Math.ceil(OVERSCAN_CHAR_LIMIT / this._bufferService.cols);
- const iterator = this._bufferService.buffer.iterator(
- false, absoluteRowIndexStart, absoluteRowIndexEnd, overscanLineLimit, overscanLineLimit);
- while (iterator.hasNext()) {
- const lineData: IBufferStringIteratorResult = iterator.next();
- for (let i = 0; i < this._linkMatchers.length; i++) {
- this._doLinkifyRow(lineData.range.first, lineData.content, this._linkMatchers[i]);
- }
- }
-
- this._rowsToLinkify.start = undefined;
- this._rowsToLinkify.end = undefined;
- }
-
- /**
- * Registers a link matcher, allowing custom link patterns to be matched and
- * handled.
- * @param regex The regular expression to search for. Specifically, this
- * searches the textContent of the rows. You will want to use \s to match a
- * space ' ' character for example.
- * @param handler The callback when the link is called.
- * @param options Options for the link matcher.
- * @return The ID of the new matcher, this can be used to deregister.
- */
- public registerLinkMatcher(regex: RegExp, handler: LinkMatcherHandler, options: ILinkMatcherOptions = {}): number {
- if (!handler) {
- throw new Error('handler must be defined');
- }
- const matcher: IRegisteredLinkMatcher = {
- id: this._nextLinkMatcherId++,
- regex,
- handler,
- matchIndex: options.matchIndex,
- validationCallback: options.validationCallback,
- hoverTooltipCallback: options.tooltipCallback,
- hoverLeaveCallback: options.leaveCallback,
- willLinkActivate: options.willLinkActivate,
- priority: options.priority || 0
- };
- this._addLinkMatcherToList(matcher);
- return matcher.id;
- }
-
- /**
- * Inserts a link matcher to the list in the correct position based on the
- * priority of each link matcher. New link matchers of equal priority are
- * considered after older link matchers.
- * @param matcher The link matcher to be added.
- */
- private _addLinkMatcherToList(matcher: IRegisteredLinkMatcher): void {
- if (this._linkMatchers.length === 0) {
- this._linkMatchers.push(matcher);
- return;
- }
-
- for (let i = this._linkMatchers.length - 1; i >= 0; i--) {
- if (matcher.priority <= this._linkMatchers[i].priority) {
- this._linkMatchers.splice(i + 1, 0, matcher);
- return;
- }
- }
-
- this._linkMatchers.splice(0, 0, matcher);
- }
-
- /**
- * Deregisters a link matcher if it has been registered.
- * @param matcherId The link matcher's ID (returned after register)
- * @return Whether a link matcher was found and deregistered.
- */
- public deregisterLinkMatcher(matcherId: number): boolean {
- for (let i = 0; i < this._linkMatchers.length; i++) {
- if (this._linkMatchers[i].id === matcherId) {
- this._linkMatchers.splice(i, 1);
- return true;
- }
- }
- return false;
- }
-
- /**
- * Linkifies a row given a specific handler.
- * @param rowIndex The row index to linkify (absolute index).
- * @param text string content of the unwrapped row.
- * @param matcher The link matcher for this line.
- */
- private _doLinkifyRow(rowIndex: number, text: string, matcher: ILinkMatcher): void {
- // clone regex to do a global search on text
- const rex = new RegExp(matcher.regex.source, (matcher.regex.flags || '') + 'g');
- let match;
- let stringIndex = -1;
- while ((match = rex.exec(text)) !== null) {
- const uri = match[typeof matcher.matchIndex !== 'number' ? 0 : matcher.matchIndex];
- if (!uri) {
- // something matched but does not comply with the given matchIndex
- // since this is most likely a bug the regex itself we simply do nothing here
- this._logService.debug('match found without corresponding matchIndex', match, matcher);
- break;
- }
-
- // Get index, match.index is for the outer match which includes negated chars
- // therefore we cannot use match.index directly, instead we search the position
- // of the match group in text again
- // also correct regex and string search offsets for the next loop run
- stringIndex = text.indexOf(uri, stringIndex + 1);
- rex.lastIndex = stringIndex + uri.length;
- if (stringIndex < 0) {
- // invalid stringIndex (should not have happened)
- break;
- }
-
- // get the buffer index as [absolute row, col] for the match
- const bufferIndex = this._bufferService.buffer.stringIndexToBufferIndex(rowIndex, stringIndex);
- if (bufferIndex[0] < 0) {
- // invalid bufferIndex (should not have happened)
- break;
- }
-
- const line = this._bufferService.buffer.lines.get(bufferIndex[0]);
- if (!line) {
- break;
- }
-
- const attr = line.getFg(bufferIndex[1]);
- const fg = attr ? (attr >> 9) & 0x1ff : undefined;
-
- if (matcher.validationCallback) {
- matcher.validationCallback(uri, isValid => {
- // Discard link if the line has already changed
- if (this._rowsTimeoutId) {
- return;
- }
- if (isValid) {
- this._addLink(bufferIndex[1], bufferIndex[0] - this._bufferService.buffer.ydisp, uri, matcher, fg);
- }
- });
- } else {
- this._addLink(bufferIndex[1], bufferIndex[0] - this._bufferService.buffer.ydisp, uri, matcher, fg);
- }
- }
- }
-
- /**
- * Registers a link to the mouse zone manager.
- * @param x The column the link starts.
- * @param y The row the link is on.
- * @param uri The URI of the link.
- * @param matcher The link matcher for the link.
- * @param fg The link color for hover event.
- */
- private _addLink(x: number, y: number, uri: string, matcher: ILinkMatcher, fg: number | undefined): void {
- if (!this._mouseZoneManager || !this._element) {
- return;
- }
- // FIXME: get cell length from buffer to avoid mismatch after Unicode version change
- const width = this._unicodeService.getStringCellWidth(uri);
- const x1 = x % this._bufferService.cols;
- const y1 = y + Math.floor(x / this._bufferService.cols);
- let x2 = (x1 + width) % this._bufferService.cols;
- let y2 = y1 + Math.floor((x1 + width) / this._bufferService.cols);
- if (x2 === 0) {
- x2 = this._bufferService.cols;
- y2--;
- }
-
- this._mouseZoneManager.add(new MouseZone(
- x1 + 1,
- y1 + 1,
- x2 + 1,
- y2 + 1,
- e => {
- if (matcher.handler) {
- return matcher.handler(e, uri);
- }
- const newWindow = window.open();
- if (newWindow) {
- newWindow.opener = null;
- newWindow.location.href = uri;
- } else {
- console.warn('Opening link blocked as opener could not be cleared');
- }
- },
- () => {
- this._onShowLinkUnderline.fire(this._createLinkHoverEvent(x1, y1, x2, y2, fg));
- this._element!.classList.add('xterm-cursor-pointer');
- },
- e => {
- this._onLinkTooltip.fire(this._createLinkHoverEvent(x1, y1, x2, y2, fg));
- if (matcher.hoverTooltipCallback) {
- // Note that IViewportRange use 1-based coordinates to align with escape sequences such
- // as CUP which use 1,1 as the default for row/col
- matcher.hoverTooltipCallback(e, uri, { start: { x: x1, y: y1 }, end: { x: x2, y: y2 } });
- }
- },
- () => {
- this._onHideLinkUnderline.fire(this._createLinkHoverEvent(x1, y1, x2, y2, fg));
- this._element!.classList.remove('xterm-cursor-pointer');
- if (matcher.hoverLeaveCallback) {
- matcher.hoverLeaveCallback();
- }
- },
- e => {
- if (matcher.willLinkActivate) {
- return matcher.willLinkActivate(e, uri);
- }
- return true;
- }
- ));
- }
-
- private _createLinkHoverEvent(x1: number, y1: number, x2: number, y2: number, fg: number | undefined): ILinkifierEvent {
- return { x1, y1, x2, y2, cols: this._bufferService.cols, fg };
- }
-}
-
-export class MouseZone implements IMouseZone {
- constructor(
- public x1: number,
- public y1: number,
- public x2: number,
- public y2: number,
- public clickCallback: (e: MouseEvent) => any,
- public hoverCallback: (e: MouseEvent) => any,
- public tooltipCallback: (e: MouseEvent) => any,
- public leaveCallback: () => void,
- public willLinkActivate: (e: MouseEvent) => boolean
- ) {
- }
-}
diff --git a/node_modules/xterm/src/browser/Linkifier2.ts b/node_modules/xterm/src/browser/Linkifier2.ts
deleted file mode 100644
index 8954293..0000000
--- a/node_modules/xterm/src/browser/Linkifier2.ts
+++ /dev/null
@@ -1,392 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ILinkifier2, ILinkProvider, IBufferCellPosition, ILink, ILinkifierEvent, ILinkDecorations, ILinkWithState } from 'browser/Types';
-import { IDisposable } from 'common/Types';
-import { IMouseService, IRenderService } from './services/Services';
-import { IBufferService } from 'common/services/Services';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { Disposable, getDisposeArrayDisposable, disposeArray } from 'common/Lifecycle';
-import { addDisposableDomListener } from 'browser/Lifecycle';
-
-export class Linkifier2 extends Disposable implements ILinkifier2 {
- private _element: HTMLElement | undefined;
- private _mouseService: IMouseService | undefined;
- private _renderService: IRenderService | undefined;
- private _linkProviders: ILinkProvider[] = [];
- public get currentLink(): ILinkWithState | undefined { return this._currentLink; }
- protected _currentLink: ILinkWithState | undefined;
- private _lastMouseEvent: MouseEvent | undefined;
- private _linkCacheDisposables: IDisposable[] = [];
- private _lastBufferCell: IBufferCellPosition | undefined;
- private _isMouseOut: boolean = true;
- private _activeProviderReplies: Map<Number, ILinkWithState[] | undefined> | undefined;
- private _activeLine: number = -1;
-
- private _onShowLinkUnderline = this.register(new EventEmitter<ILinkifierEvent>());
- public get onShowLinkUnderline(): IEvent<ILinkifierEvent> { return this._onShowLinkUnderline.event; }
- private _onHideLinkUnderline = this.register(new EventEmitter<ILinkifierEvent>());
- public get onHideLinkUnderline(): IEvent<ILinkifierEvent> { return this._onHideLinkUnderline.event; }
-
- constructor(
- @IBufferService private readonly _bufferService: IBufferService
- ) {
- super();
- this.register(getDisposeArrayDisposable(this._linkCacheDisposables));
- }
-
- public registerLinkProvider(linkProvider: ILinkProvider): IDisposable {
- this._linkProviders.push(linkProvider);
- return {
- dispose: () => {
- // Remove the link provider from the list
- const providerIndex = this._linkProviders.indexOf(linkProvider);
-
- if (providerIndex !== -1) {
- this._linkProviders.splice(providerIndex, 1);
- }
- }
- };
- }
-
- public attachToDom(element: HTMLElement, mouseService: IMouseService, renderService: IRenderService): void {
- this._element = element;
- this._mouseService = mouseService;
- this._renderService = renderService;
-
- this.register(addDisposableDomListener(this._element, 'mouseleave', () => {
- this._isMouseOut = true;
- this._clearCurrentLink();
- }));
- this.register(addDisposableDomListener(this._element, 'mousemove', this._onMouseMove.bind(this)));
- this.register(addDisposableDomListener(this._element, 'click', this._onClick.bind(this)));
- }
-
- private _onMouseMove(event: MouseEvent): void {
- this._lastMouseEvent = event;
-
- if (!this._element || !this._mouseService) {
- return;
- }
-
- const position = this._positionFromMouseEvent(event, this._element, this._mouseService);
- if (!position) {
- return;
- }
- this._isMouseOut = false;
-
- // Ignore the event if it's an embedder created hover widget
- const composedPath = event.composedPath() as HTMLElement[];
- for (let i = 0; i < composedPath.length; i++) {
- const target = composedPath[i];
- // Hit Terminal.element, break and continue
- if (target.classList.contains('xterm')) {
- break;
- }
- // It's a hover, don't respect hover event
- if (target.classList.contains('xterm-hover')) {
- return;
- }
- }
-
- if (!this._lastBufferCell || (position.x !== this._lastBufferCell.x || position.y !== this._lastBufferCell.y)) {
- this._onHover(position);
- this._lastBufferCell = position;
- }
- }
-
- private _onHover(position: IBufferCellPosition): void {
- // TODO: This currently does not cache link provider results across wrapped lines, activeLine should be something like `activeRange: {startY, endY}`
- // Check if we need to clear the link
- if (this._activeLine !== position.y) {
- this._clearCurrentLink();
- this._askForLink(position, false);
- return;
- }
-
- // Check the if the link is in the mouse position
- const isCurrentLinkInPosition = this._currentLink && this._linkAtPosition(this._currentLink.link, position);
- if (!isCurrentLinkInPosition) {
- this._clearCurrentLink();
- this._askForLink(position, true);
- }
- }
-
- private _askForLink(position: IBufferCellPosition, useLineCache: boolean): void {
- if (!this._activeProviderReplies || !useLineCache) {
- this._activeProviderReplies?.forEach(reply => {
- reply?.forEach(linkWithState => {
- if (linkWithState.link.dispose) {
- linkWithState.link.dispose();
- }
- });
- });
- this._activeProviderReplies = new Map();
- this._activeLine = position.y;
- }
- let linkProvided = false;
-
- // There is no link cached, so ask for one
- this._linkProviders.forEach((linkProvider, i) => {
- if (useLineCache) {
- const existingReply = this._activeProviderReplies?.get(i);
- // If there isn't a reply, the provider hasn't responded yet.
-
- // TODO: If there isn't a reply yet it means that the provider is still resolving. Ensuring
- // provideLinks isn't triggered again saves ILink.hover firing twice though. This probably
- // needs promises to get fixed
- if (existingReply) {
- linkProvided = this._checkLinkProviderResult(i, position, linkProvided);
- }
- } else {
- linkProvider.provideLinks(position.y, (links: ILink[] | undefined) => {
- if (this._isMouseOut) {
- return;
- }
- const linksWithState: ILinkWithState[] | undefined = links?.map(link => ({ link }));
- this._activeProviderReplies?.set(i, linksWithState);
- linkProvided = this._checkLinkProviderResult(i, position, linkProvided);
-
- // If all providers have responded, remove lower priority links that intersect ranges of
- // higher priority links
- if (this._activeProviderReplies?.size === this._linkProviders.length) {
- this._removeIntersectingLinks(position.y, this._activeProviderReplies);
- }
- });
- }
- });
- }
-
- private _removeIntersectingLinks(y: number, replies: Map<Number, ILinkWithState[] | undefined>): void {
- const occupiedCells = new Set<number>();
- for (let i = 0; i < replies.size; i++) {
- const providerReply = replies.get(i);
- if (!providerReply) {
- continue;
- }
- for (let i = 0; i < providerReply.length; i++) {
- const linkWithState = providerReply[i];
- const startX = linkWithState.link.range.start.y < y ? 0 : linkWithState.link.range.start.x;
- const endX = linkWithState.link.range.end.y > y ? this._bufferService.cols : linkWithState.link.range.end.x;
- for (let x = startX; x <= endX; x++) {
- if (occupiedCells.has(x)) {
- providerReply.splice(i--, 1);
- break;
- }
- occupiedCells.add(x);
- }
- }
- }
- }
-
- private _checkLinkProviderResult(index: number, position: IBufferCellPosition, linkProvided: boolean): boolean {
- if (!this._activeProviderReplies) {
- return linkProvided;
- }
-
- const links = this._activeProviderReplies.get(index);
-
- // Check if every provider before this one has come back undefined
- let hasLinkBefore = false;
- for (let j = 0; j < index; j++) {
- if (!this._activeProviderReplies.has(j) || this._activeProviderReplies.get(j)) {
- hasLinkBefore = true;
- }
- }
-
- // If all providers with higher priority came back undefined, then this provider's link for
- // the position should be used
- if (!hasLinkBefore && links) {
- const linkAtPosition = links.find(link => this._linkAtPosition(link.link, position));
- if (linkAtPosition) {
- linkProvided = true;
- this._handleNewLink(linkAtPosition);
- }
- }
-
- // Check if all the providers have responded
- if (this._activeProviderReplies.size === this._linkProviders.length && !linkProvided) {
- // Respect the order of the link providers
- for (let j = 0; j < this._activeProviderReplies.size; j++) {
- const currentLink = this._activeProviderReplies.get(j)?.find(link => this._linkAtPosition(link.link, position));
- if (currentLink) {
- linkProvided = true;
- this._handleNewLink(currentLink);
- break;
- }
- }
- }
-
- return linkProvided;
- }
-
- private _onClick(event: MouseEvent): void {
- if (!this._element || !this._mouseService || !this._currentLink) {
- return;
- }
-
- const position = this._positionFromMouseEvent(event, this._element, this._mouseService);
-
- if (!position) {
- return;
- }
-
- if (this._linkAtPosition(this._currentLink.link, position)) {
- this._currentLink.link.activate(event, this._currentLink.link.text);
- }
- }
-
- private _clearCurrentLink(startRow?: number, endRow?: number): void {
- if (!this._element || !this._currentLink || !this._lastMouseEvent) {
- return;
- }
-
- // If we have a start and end row, check that the link is within it
- if (!startRow || !endRow || (this._currentLink.link.range.start.y >= startRow && this._currentLink.link.range.end.y <= endRow)) {
- this._linkLeave(this._element, this._currentLink.link, this._lastMouseEvent);
- this._currentLink = undefined;
- disposeArray(this._linkCacheDisposables);
- }
- }
-
- private _handleNewLink(linkWithState: ILinkWithState): void {
- if (!this._element || !this._lastMouseEvent || !this._mouseService) {
- return;
- }
-
- const position = this._positionFromMouseEvent(this._lastMouseEvent, this._element, this._mouseService);
-
- if (!position) {
- return;
- }
-
- // Trigger hover if the we have a link at the position
- if (this._linkAtPosition(linkWithState.link, position)) {
- this._currentLink = linkWithState;
- this._currentLink.state = {
- decorations: {
- underline: linkWithState.link.decorations === undefined ? true : linkWithState.link.decorations.underline,
- pointerCursor: linkWithState.link.decorations === undefined ? true : linkWithState.link.decorations.pointerCursor
- },
- isHovered: true
- };
- this._linkHover(this._element, linkWithState.link, this._lastMouseEvent);
-
- // Add listener for tracking decorations changes
- linkWithState.link.decorations = {} as ILinkDecorations;
- Object.defineProperties(linkWithState.link.decorations, {
- pointerCursor: {
- get: () => this._currentLink?.state?.decorations.pointerCursor,
- set: v => {
- if (this._currentLink?.state && this._currentLink.state.decorations.pointerCursor !== v) {
- this._currentLink.state.decorations.pointerCursor = v;
- if (this._currentLink.state.isHovered) {
- this._element?.classList.toggle('xterm-cursor-pointer', v);
- }
- }
- }
- },
- underline: {
- get: () => this._currentLink?.state?.decorations.underline,
- set: v => {
- if (this._currentLink?.state && this._currentLink?.state?.decorations.underline !== v) {
- this._currentLink.state.decorations.underline = v;
- if (this._currentLink.state.isHovered) {
- this._fireUnderlineEvent(linkWithState.link, v);
- }
- }
- }
- }
- });
-
- // Add listener for rerendering
- if (this._renderService) {
- this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(e => {
- // When start is 0 a scroll most likely occurred, make sure links above the fold also get
- // cleared.
- const start = e.start === 0 ? 0 : e.start + 1 + this._bufferService.buffer.ydisp;
- this._clearCurrentLink(start, e.end + 1 + this._bufferService.buffer.ydisp);
- }));
- }
- }
- }
-
- protected _linkHover(element: HTMLElement, link: ILink, event: MouseEvent): void {
- if (this._currentLink?.state) {
- this._currentLink.state.isHovered = true;
- if (this._currentLink.state.decorations.underline) {
- this._fireUnderlineEvent(link, true);
- }
- if (this._currentLink.state.decorations.pointerCursor) {
- element.classList.add('xterm-cursor-pointer');
- }
- }
-
- if (link.hover) {
- link.hover(event, link.text);
- }
- }
-
- private _fireUnderlineEvent(link: ILink, showEvent: boolean): void {
- const range = link.range;
- const scrollOffset = this._bufferService.buffer.ydisp;
- const event = this._createLinkUnderlineEvent(range.start.x - 1, range.start.y - scrollOffset - 1, range.end.x, range.end.y - scrollOffset - 1, undefined);
- const emitter = showEvent ? this._onShowLinkUnderline : this._onHideLinkUnderline;
- emitter.fire(event);
- }
-
- protected _linkLeave(element: HTMLElement, link: ILink, event: MouseEvent): void {
- if (this._currentLink?.state) {
- this._currentLink.state.isHovered = false;
- if (this._currentLink.state.decorations.underline) {
- this._fireUnderlineEvent(link, false);
- }
- if (this._currentLink.state.decorations.pointerCursor) {
- element.classList.remove('xterm-cursor-pointer');
- }
- }
-
- if (link.leave) {
- link.leave(event, link.text);
- }
- }
-
- /**
- * Check if the buffer position is within the link
- * @param link
- * @param position
- */
- private _linkAtPosition(link: ILink, position: IBufferCellPosition): boolean {
- const sameLine = link.range.start.y === link.range.end.y;
- const wrappedFromLeft = link.range.start.y < position.y;
- const wrappedToRight = link.range.end.y > position.y;
-
- // If the start and end have the same y, then the position must be between start and end x
- // If not, then handle each case seperately, depending on which way it wraps
- return ((sameLine && link.range.start.x <= position.x && link.range.end.x >= position.x) ||
- (wrappedFromLeft && link.range.end.x >= position.x) ||
- (wrappedToRight && link.range.start.x <= position.x) ||
- (wrappedFromLeft && wrappedToRight)) &&
- link.range.start.y <= position.y &&
- link.range.end.y >= position.y;
- }
-
- /**
- * Get the buffer position from a mouse event
- * @param event
- */
- private _positionFromMouseEvent(event: MouseEvent, element: HTMLElement, mouseService: IMouseService): IBufferCellPosition | undefined {
- const coords = mouseService.getCoords(event, element, this._bufferService.cols, this._bufferService.rows);
- if (!coords) {
- return;
- }
-
- return { x: coords[0], y: coords[1] + this._bufferService.buffer.ydisp };
- }
-
- private _createLinkUnderlineEvent(x1: number, y1: number, x2: number, y2: number, fg: number | undefined): ILinkifierEvent {
- return { x1, y1, x2, y2, cols: this._bufferService.cols, fg };
- }
-}
diff --git a/node_modules/xterm/src/browser/LocalizableStrings.ts b/node_modules/xterm/src/browser/LocalizableStrings.ts
deleted file mode 100644
index c0a904c..0000000
--- a/node_modules/xterm/src/browser/LocalizableStrings.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-// eslint-disable-next-line prefer-const
-export let promptLabel = 'Terminal input';
-
-// eslint-disable-next-line prefer-const
-export let tooMuchOutput = 'Too much output to announce, navigate to rows manually to read';
diff --git a/node_modules/xterm/src/browser/MouseZoneManager.ts b/node_modules/xterm/src/browser/MouseZoneManager.ts
deleted file mode 100644
index 71ffe7c..0000000
--- a/node_modules/xterm/src/browser/MouseZoneManager.ts
+++ /dev/null
@@ -1,236 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { Disposable } from 'common/Lifecycle';
-import { addDisposableDomListener } from 'browser/Lifecycle';
-import { IMouseService, ISelectionService } from 'browser/services/Services';
-import { IMouseZoneManager, IMouseZone } from 'browser/Types';
-import { IBufferService, IOptionsService } from 'common/services/Services';
-
-/**
- * The MouseZoneManager allows components to register zones within the terminal
- * that trigger hover and click callbacks.
- *
- * This class was intentionally made not so robust initially as the only case it
- * needed to support was single-line links which never overlap. Improvements can
- * be made in the future.
- */
-export class MouseZoneManager extends Disposable implements IMouseZoneManager {
- private _zones: IMouseZone[] = [];
-
- private _areZonesActive: boolean = false;
- private _mouseMoveListener: (e: MouseEvent) => any;
- private _mouseLeaveListener: (e: MouseEvent) => any;
- private _clickListener: (e: MouseEvent) => any;
-
- private _tooltipTimeout: number | undefined;
- private _currentZone: IMouseZone | undefined;
- private _lastHoverCoords: [number | undefined, number | undefined] = [undefined, undefined];
- private _initialSelectionLength: number = 0;
-
- constructor(
- private readonly _element: HTMLElement,
- private readonly _screenElement: HTMLElement,
- @IBufferService private readonly _bufferService: IBufferService,
- @IMouseService private readonly _mouseService: IMouseService,
- @ISelectionService private readonly _selectionService: ISelectionService,
- @IOptionsService private readonly _optionsService: IOptionsService
- ) {
- super();
-
- this.register(addDisposableDomListener(this._element, 'mousedown', e => this._onMouseDown(e)));
-
- // These events are expensive, only listen to it when mouse zones are active
- this._mouseMoveListener = e => this._onMouseMove(e);
- this._mouseLeaveListener = e => this._onMouseLeave(e);
- this._clickListener = e => this._onClick(e);
- }
-
- public dispose(): void {
- super.dispose();
- this._deactivate();
- }
-
- public add(zone: IMouseZone): void {
- this._zones.push(zone);
- if (this._zones.length === 1) {
- this._activate();
- }
- }
-
- public clearAll(start?: number, end?: number): void {
- // Exit if there's nothing to clear
- if (this._zones.length === 0) {
- return;
- }
-
- // Clear all if start/end weren't set
- if (!start || !end) {
- start = 0;
- end = this._bufferService.rows - 1;
- }
-
- // Iterate through zones and clear them out if they're within the range
- for (let i = 0; i < this._zones.length; i++) {
- const zone = this._zones[i];
- if ((zone.y1 > start && zone.y1 <= end + 1) ||
- (zone.y2 > start && zone.y2 <= end + 1) ||
- (zone.y1 < start && zone.y2 > end + 1)) {
- if (this._currentZone && this._currentZone === zone) {
- this._currentZone.leaveCallback();
- this._currentZone = undefined;
- }
- this._zones.splice(i--, 1);
- }
- }
-
- // Deactivate the mouse zone manager if all the zones have been removed
- if (this._zones.length === 0) {
- this._deactivate();
- }
- }
-
- private _activate(): void {
- if (!this._areZonesActive) {
- this._areZonesActive = true;
- this._element.addEventListener('mousemove', this._mouseMoveListener);
- this._element.addEventListener('mouseleave', this._mouseLeaveListener);
- this._element.addEventListener('click', this._clickListener);
- }
- }
-
- private _deactivate(): void {
- if (this._areZonesActive) {
- this._areZonesActive = false;
- this._element.removeEventListener('mousemove', this._mouseMoveListener);
- this._element.removeEventListener('mouseleave', this._mouseLeaveListener);
- this._element.removeEventListener('click', this._clickListener);
- }
- }
-
- private _onMouseMove(e: MouseEvent): void {
- // TODO: Ideally this would only clear the hover state when the mouse moves
- // outside of the mouse zone
- if (this._lastHoverCoords[0] !== e.pageX || this._lastHoverCoords[1] !== e.pageY) {
- this._onHover(e);
- // Record the current coordinates
- this._lastHoverCoords = [e.pageX, e.pageY];
- }
- }
-
- private _onHover(e: MouseEvent): void {
- const zone = this._findZoneEventAt(e);
-
- // Do nothing if the zone is the same
- if (zone === this._currentZone) {
- return;
- }
-
- // Fire the hover end callback and cancel any existing timer if a new zone
- // is being hovered
- if (this._currentZone) {
- this._currentZone.leaveCallback();
- this._currentZone = undefined;
- if (this._tooltipTimeout) {
- clearTimeout(this._tooltipTimeout);
- }
- }
-
- // Exit if there is not zone
- if (!zone) {
- return;
- }
- this._currentZone = zone;
-
- // Trigger the hover callback
- if (zone.hoverCallback) {
- zone.hoverCallback(e);
- }
-
- // Restart the tooltip timeout
- this._tooltipTimeout = window.setTimeout(() => this._onTooltip(e), this._optionsService.rawOptions.linkTooltipHoverDuration);
- }
-
- private _onTooltip(e: MouseEvent): void {
- this._tooltipTimeout = undefined;
- const zone = this._findZoneEventAt(e);
- zone?.tooltipCallback(e);
- }
-
- private _onMouseDown(e: MouseEvent): void {
- // Store current terminal selection length, to check if we're performing
- // a selection operation
- this._initialSelectionLength = this._getSelectionLength();
-
- // Ignore the event if there are no zones active
- if (!this._areZonesActive) {
- return;
- }
-
- // Find the active zone, prevent event propagation if found to prevent other
- // components from handling the mouse event.
- const zone = this._findZoneEventAt(e);
- if (zone?.willLinkActivate(e)) {
- e.preventDefault();
- e.stopImmediatePropagation();
- }
- }
-
- private _onMouseLeave(e: MouseEvent): void {
- // Fire the hover end callback and cancel any existing timer if the mouse
- // leaves the terminal element
- if (this._currentZone) {
- this._currentZone.leaveCallback();
- this._currentZone = undefined;
- if (this._tooltipTimeout) {
- clearTimeout(this._tooltipTimeout);
- }
- }
- }
-
- private _onClick(e: MouseEvent): void {
- // Find the active zone and click it if found and no selection was
- // being performed
- const zone = this._findZoneEventAt(e);
- const currentSelectionLength = this._getSelectionLength();
-
- if (zone && currentSelectionLength === this._initialSelectionLength) {
- zone.clickCallback(e);
- e.preventDefault();
- e.stopImmediatePropagation();
- }
- }
-
- private _getSelectionLength(): number {
- const selectionText = this._selectionService.selectionText;
- return selectionText ? selectionText.length : 0;
- }
-
- private _findZoneEventAt(e: MouseEvent): IMouseZone | undefined {
- const coords = this._mouseService.getCoords(e, this._screenElement, this._bufferService.cols, this._bufferService.rows);
- if (!coords) {
- return undefined;
- }
- const x = coords[0];
- const y = coords[1];
- for (let i = 0; i < this._zones.length; i++) {
- const zone = this._zones[i];
- if (zone.y1 === zone.y2) {
- // Single line link
- if (y === zone.y1 && x >= zone.x1 && x < zone.x2) {
- return zone;
- }
- } else {
- // Multi-line link
- if ((y === zone.y1 && x >= zone.x1) ||
- (y === zone.y2 && x < zone.x2) ||
- (y > zone.y1 && y < zone.y2)) {
- return zone;
- }
- }
- }
- return undefined;
- }
-}
diff --git a/node_modules/xterm/src/browser/RenderDebouncer.ts b/node_modules/xterm/src/browser/RenderDebouncer.ts
deleted file mode 100644
index 0252107..0000000
--- a/node_modules/xterm/src/browser/RenderDebouncer.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderDebouncer } from 'browser/Types';
-
-/**
- * Debounces calls to render terminal rows using animation frames.
- */
-export class RenderDebouncer implements IRenderDebouncer {
- private _rowStart: number | undefined;
- private _rowEnd: number | undefined;
- private _rowCount: number | undefined;
- private _animationFrame: number | undefined;
-
- constructor(
- private _renderCallback: (start: number, end: number) => void
- ) {
- }
-
- public dispose(): void {
- if (this._animationFrame) {
- window.cancelAnimationFrame(this._animationFrame);
- this._animationFrame = undefined;
- }
- }
-
- public refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void {
- this._rowCount = rowCount;
- // Get the min/max row start/end for the arg values
- rowStart = rowStart !== undefined ? rowStart : 0;
- rowEnd = rowEnd !== undefined ? rowEnd : this._rowCount - 1;
- // Set the properties to the updated values
- this._rowStart = this._rowStart !== undefined ? Math.min(this._rowStart, rowStart) : rowStart;
- this._rowEnd = this._rowEnd !== undefined ? Math.max(this._rowEnd, rowEnd) : rowEnd;
-
- if (this._animationFrame) {
- return;
- }
-
- this._animationFrame = window.requestAnimationFrame(() => this._innerRefresh());
- }
-
- private _innerRefresh(): void {
- // Make sure values are set
- if (this._rowStart === undefined || this._rowEnd === undefined || this._rowCount === undefined) {
- return;
- }
-
- // Clamp values
- const start = Math.max(this._rowStart, 0);
- const end = Math.min(this._rowEnd, this._rowCount - 1);
-
- // Reset debouncer (this happens before render callback as the render could trigger it again)
- this._rowStart = undefined;
- this._rowEnd = undefined;
- this._animationFrame = undefined;
-
- // Run render callback
- this._renderCallback(start, end);
- }
-}
diff --git a/node_modules/xterm/src/browser/ScreenDprMonitor.ts b/node_modules/xterm/src/browser/ScreenDprMonitor.ts
deleted file mode 100644
index 27ae231..0000000
--- a/node_modules/xterm/src/browser/ScreenDprMonitor.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { Disposable } from 'common/Lifecycle';
-
-export type ScreenDprListener = (newDevicePixelRatio?: number, oldDevicePixelRatio?: number) => void;
-
-/**
- * The screen device pixel ratio monitor allows listening for when the
- * window.devicePixelRatio value changes. This is done not with polling but with
- * the use of window.matchMedia to watch media queries. When the event fires,
- * the listener will be reattached using a different media query to ensure that
- * any further changes will register.
- *
- * The listener should fire on both window zoom changes and switching to a
- * monitor with a different DPI.
- */
-export class ScreenDprMonitor extends Disposable {
- private _currentDevicePixelRatio: number = window.devicePixelRatio;
- private _outerListener: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | undefined;
- private _listener: ScreenDprListener | undefined;
- private _resolutionMediaMatchList: MediaQueryList | undefined;
-
- public setListener(listener: ScreenDprListener): void {
- if (this._listener) {
- this.clearListener();
- }
- this._listener = listener;
- this._outerListener = () => {
- if (!this._listener) {
- return;
- }
- this._listener(window.devicePixelRatio, this._currentDevicePixelRatio);
- this._updateDpr();
- };
- this._updateDpr();
- }
-
- public dispose(): void {
- super.dispose();
- this.clearListener();
- }
-
- private _updateDpr(): void {
- if (!this._outerListener) {
- return;
- }
-
- // Clear listeners for old DPR
- this._resolutionMediaMatchList?.removeListener(this._outerListener);
-
- // Add listeners for new DPR
- this._currentDevicePixelRatio = window.devicePixelRatio;
- this._resolutionMediaMatchList = window.matchMedia(`screen and (resolution: ${window.devicePixelRatio}dppx)`);
- this._resolutionMediaMatchList.addListener(this._outerListener);
- }
-
- public clearListener(): void {
- if (!this._resolutionMediaMatchList || !this._listener || !this._outerListener) {
- return;
- }
- this._resolutionMediaMatchList.removeListener(this._outerListener);
- this._resolutionMediaMatchList = undefined;
- this._listener = undefined;
- this._outerListener = undefined;
- }
-}
diff --git a/node_modules/xterm/src/browser/Terminal.ts b/node_modules/xterm/src/browser/Terminal.ts
deleted file mode 100644
index 703c995..0000000
--- a/node_modules/xterm/src/browser/Terminal.ts
+++ /dev/null
@@ -1,1408 +0,0 @@
-/**
- * Copyright (c) 2014 The xterm.js authors. All rights reserved.
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- * @license MIT
- *
- * Originally forked from (with the author's permission):
- * Fabrice Bellard's javascript vt100 for jslinux:
- * http://bellard.org/jslinux/
- * Copyright (c) 2011 Fabrice Bellard
- * The original design remains. The terminal itself
- * has been extended to include xterm CSI codes, among
- * other features.
- *
- * Terminal Emulation References:
- * http://vt100.net/
- * http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt
- * http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
- * http://invisible-island.net/vttest/
- * http://www.inwap.com/pdp10/ansicode.txt
- * http://linux.die.net/man/4/console_codes
- * http://linux.die.net/man/7/urxvt
- */
-
-import { ICompositionHelper, ITerminal, IBrowser, CustomKeyEventHandler, ILinkifier, IMouseZoneManager, LinkMatcherHandler, ILinkMatcherOptions, IViewport, ILinkifier2, CharacterJoinerHandler } from 'browser/Types';
-import { IRenderer } from 'browser/renderer/Types';
-import { CompositionHelper } from 'browser/input/CompositionHelper';
-import { Viewport } from 'browser/Viewport';
-import { rightClickHandler, moveTextAreaUnderMouseCursor, handlePasteEvent, copyHandler, paste } from 'browser/Clipboard';
-import { C0 } from 'common/data/EscapeSequences';
-import { WindowsOptionsReportType } from '../common/InputHandler';
-import { Renderer } from 'browser/renderer/Renderer';
-import { Linkifier } from 'browser/Linkifier';
-import { SelectionService } from 'browser/services/SelectionService';
-import * as Browser from 'common/Platform';
-import { addDisposableDomListener } from 'browser/Lifecycle';
-import * as Strings from 'browser/LocalizableStrings';
-import { SoundService } from 'browser/services/SoundService';
-import { MouseZoneManager } from 'browser/MouseZoneManager';
-import { AccessibilityManager } from './AccessibilityManager';
-import { ITheme, IMarker, IDisposable, ISelectionPosition, ILinkProvider, IDecorationOptions, IDecoration } from 'xterm';
-import { DomRenderer } from 'browser/renderer/dom/DomRenderer';
-import { KeyboardResultType, CoreMouseEventType, CoreMouseButton, CoreMouseAction, ITerminalOptions, ScrollSource, IColorEvent, ColorIndex, ColorRequestType } from 'common/Types';
-import { evaluateKeyboardEvent } from 'common/input/Keyboard';
-import { EventEmitter, IEvent, forwardEvent } from 'common/EventEmitter';
-import { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
-import { ColorManager } from 'browser/ColorManager';
-import { RenderService } from 'browser/services/RenderService';
-import { ICharSizeService, IRenderService, IMouseService, ISelectionService, ISoundService, ICoreBrowserService, ICharacterJoinerService, IDecorationService } from 'browser/services/Services';
-import { CharSizeService } from 'browser/services/CharSizeService';
-import { IBuffer } from 'common/buffer/Types';
-import { MouseService } from 'browser/services/MouseService';
-import { Linkifier2 } from 'browser/Linkifier2';
-import { CoreBrowserService } from 'browser/services/CoreBrowserService';
-import { CoreTerminal } from 'common/CoreTerminal';
-import { color, rgba } from 'browser/Color';
-import { CharacterJoinerService } from 'browser/services/CharacterJoinerService';
-import { toRgbString } from 'common/input/XParseColor';
-import { DecorationService } from 'browser/services/DecorationService';
-
-// Let it work inside Node.js for automated testing purposes.
-const document: Document = (typeof window !== 'undefined') ? window.document : null as any;
-
-export class Terminal extends CoreTerminal implements ITerminal {
- public textarea: HTMLTextAreaElement | undefined;
- public element: HTMLElement | undefined;
- public screenElement: HTMLElement | undefined;
-
- private _document: Document | undefined;
- private _viewportScrollArea: HTMLElement | undefined;
- private _viewportElement: HTMLElement | undefined;
- private _helperContainer: HTMLElement | undefined;
- private _compositionView: HTMLElement | undefined;
-
- // private _visualBellTimer: number;
-
- public browser: IBrowser = Browser as any;
-
- private _customKeyEventHandler: CustomKeyEventHandler | undefined;
-
- // browser services
- private _charSizeService: ICharSizeService | undefined;
- private _mouseService: IMouseService | undefined;
- private _renderService: IRenderService | undefined;
- private _characterJoinerService: ICharacterJoinerService | undefined;
- private _selectionService: ISelectionService | undefined;
- private _soundService: ISoundService | undefined;
-
- /**
- * Records whether the keydown event has already been handled and triggered a data event, if so
- * the keypress event should not trigger a data event but should still print to the textarea so
- * screen readers will announce it.
- */
- private _keyDownHandled: boolean = false;
-
- /**
- * Records whether the keypress event has already been handled and triggered a data event, if so
- * the input event should not trigger a data event but should still print to the textarea so
- * screen readers will announce it.
- */
- private _keyPressHandled: boolean = false;
-
- /**
- * Records whether there has been a keydown event for a dead key without a corresponding keydown
- * event for the composed/alternative character. If we cancel the keydown event for the dead key,
- * no events will be emitted for the final character.
- */
- private _unprocessedDeadKey: boolean = false;
-
- public linkifier: ILinkifier;
- public linkifier2: ILinkifier2;
- public viewport: IViewport | undefined;
- public decorationService: IDecorationService;
- private _compositionHelper: ICompositionHelper | undefined;
- private _mouseZoneManager: IMouseZoneManager | undefined;
- private _accessibilityManager: AccessibilityManager | undefined;
- private _colorManager: ColorManager | undefined;
- private _theme: ITheme | undefined;
-
- private _onCursorMove = new EventEmitter<void>();
- public get onCursorMove(): IEvent<void> { return this._onCursorMove.event; }
- private _onKey = new EventEmitter<{ key: string, domEvent: KeyboardEvent }>();
- public get onKey(): IEvent<{ key: string, domEvent: KeyboardEvent }> { return this._onKey.event; }
- private _onRender = new EventEmitter<{ start: number, end: number }>();
- public get onRender(): IEvent<{ start: number, end: number }> { return this._onRender.event; }
- private _onSelectionChange = new EventEmitter<void>();
- public get onSelectionChange(): IEvent<void> { return this._onSelectionChange.event; }
- private _onTitleChange = new EventEmitter<string>();
- public get onTitleChange(): IEvent<string> { return this._onTitleChange.event; }
- private _onBell = new EventEmitter<void>();
- public get onBell(): IEvent<void> { return this._onBell.event; }
-
- private _onFocus = new EventEmitter<void>();
- public get onFocus(): IEvent<void> { return this._onFocus.event; }
- private _onBlur = new EventEmitter<void>();
- public get onBlur(): IEvent<void> { return this._onBlur.event; }
- private _onA11yCharEmitter = new EventEmitter<string>();
- public get onA11yChar(): IEvent<string> { return this._onA11yCharEmitter.event; }
- private _onA11yTabEmitter = new EventEmitter<number>();
- public get onA11yTab(): IEvent<number> { return this._onA11yTabEmitter.event; }
-
- /**
- * Creates a new `Terminal` object.
- *
- * @param options An object containing a set of options, the available options are:
- * - `cursorBlink` (boolean): Whether the terminal cursor blinks
- * - `cols` (number): The number of columns of the terminal (horizontal size)
- * - `rows` (number): The number of rows of the terminal (vertical size)
- *
- * @public
- * @class Xterm Xterm
- * @alias module:xterm/src/xterm
- */
- constructor(
- options: Partial<ITerminalOptions> = {}
- ) {
- super(options);
-
- this._setup();
-
- this.linkifier = this._instantiationService.createInstance(Linkifier);
- this.linkifier2 = this.register(this._instantiationService.createInstance(Linkifier2));
- this.decorationService = this.register(this._instantiationService.createInstance(DecorationService));
-
- // Setup InputHandler listeners
- this.register(this._inputHandler.onRequestBell(() => this.bell()));
- this.register(this._inputHandler.onRequestRefreshRows((start, end) => this.refresh(start, end)));
- this.register(this._inputHandler.onRequestSendFocus(() => this._reportFocus()));
- this.register(this._inputHandler.onRequestReset(() => this.reset()));
- this.register(this._inputHandler.onRequestWindowsOptionsReport(type => this._reportWindowsOptions(type)));
- this.register(this._inputHandler.onColor((event) => this._handleColorEvent(event)));
- this.register(forwardEvent(this._inputHandler.onCursorMove, this._onCursorMove));
- this.register(forwardEvent(this._inputHandler.onTitleChange, this._onTitleChange));
- this.register(forwardEvent(this._inputHandler.onA11yChar, this._onA11yCharEmitter));
- this.register(forwardEvent(this._inputHandler.onA11yTab, this._onA11yTabEmitter));
-
- // Setup listeners
- this.register(this._bufferService.onResize(e => this._afterResize(e.cols, e.rows)));
- }
-
- /**
- * Handle color event from inputhandler for OSC 4|104 | 10|110 | 11|111 | 12|112.
- * An event from OSC 4|104 may contain multiple set or report requests, and multiple
- * or none restore requests (resetting all),
- * while an event from OSC 10|110 | 11|111 | 12|112 always contains a single request.
- */
- private _handleColorEvent(event: IColorEvent): void {
- if (!this._colorManager) return;
- for (const req of event) {
- let acc: 'foreground' | 'background' | 'cursor' | 'ansi' | undefined = undefined;
- let ident = '';
- switch (req.index) {
- case ColorIndex.FOREGROUND: // OSC 10 | 110
- acc = 'foreground';
- ident = '10';
- break;
- case ColorIndex.BACKGROUND: // OSC 11 | 111
- acc = 'background';
- ident = '11';
- break;
- case ColorIndex.CURSOR: // OSC 12 | 112
- acc = 'cursor';
- ident = '12';
- break;
- default: // OSC 4 | 104
- // we can skip the [0..255] range check here (already done in inputhandler)
- acc = 'ansi';
- ident = '4;' + req.index;
- }
- if (acc) {
- switch (req.type) {
- case ColorRequestType.REPORT:
- const channels = color.toColorRGB(acc === 'ansi'
- ? this._colorManager.colors.ansi[req.index]
- : this._colorManager.colors[acc]);
- this.coreService.triggerDataEvent(`${C0.ESC}]${ident};${toRgbString(channels)}${C0.BEL}`);
- break;
- case ColorRequestType.SET:
- if (acc === 'ansi') this._colorManager.colors.ansi[req.index] = rgba.toColor(...req.color);
- else this._colorManager.colors[acc] = rgba.toColor(...req.color);
- break;
- case ColorRequestType.RESTORE:
- this._colorManager.restoreColor(req.index);
- break;
- }
- }
- }
- this._renderService?.setColors(this._colorManager.colors);
- this.viewport?.onThemeChange(this._colorManager.colors);
- }
-
- public dispose(): void {
- if (this._isDisposed) {
- return;
- }
- super.dispose();
- this._renderService?.dispose();
- this._customKeyEventHandler = undefined;
- this.write = () => { };
- this.element?.parentNode?.removeChild(this.element);
- }
-
- protected _setup(): void {
- super._setup();
-
- this._customKeyEventHandler = undefined;
- }
-
- /**
- * Convenience property to active buffer.
- */
- public get buffer(): IBuffer {
- return this.buffers.active;
- }
-
- /**
- * Focus the terminal. Delegates focus handling to the terminal's DOM element.
- */
- public focus(): void {
- if (this.textarea) {
- this.textarea.focus({ preventScroll: true });
- }
- }
-
- protected _updateOptions(key: string): void {
- super._updateOptions(key);
-
- // TODO: These listeners should be owned by individual components
- switch (key) {
- case 'fontFamily':
- case 'fontSize':
- // When the font changes the size of the cells may change which requires a renderer clear
- this._renderService?.clear();
- this._charSizeService?.measure();
- break;
- case 'cursorBlink':
- case 'cursorStyle':
- // The DOM renderer needs a row refresh to update the cursor styles
- this.refresh(this.buffer.y, this.buffer.y);
- break;
- case 'customGlyphs':
- case 'drawBoldTextInBrightColors':
- case 'letterSpacing':
- case 'lineHeight':
- case 'fontWeight':
- case 'fontWeightBold':
- case 'minimumContrastRatio':
- // When the font changes the size of the cells may change which requires a renderer clear
- if (this._renderService) {
- this._renderService.clear();
- this._renderService.onResize(this.cols, this.rows);
- this.refresh(0, this.rows - 1);
- }
- break;
- case 'rendererType':
- if (this._renderService) {
- this._renderService.setRenderer(this._createRenderer());
- this._renderService.onResize(this.cols, this.rows);
- }
- break;
- case 'scrollback':
- this.viewport?.syncScrollArea();
- break;
- case 'screenReaderMode':
- if (this.optionsService.rawOptions.screenReaderMode) {
- if (!this._accessibilityManager && this._renderService) {
- this._accessibilityManager = new AccessibilityManager(this, this._renderService);
- }
- } else {
- this._accessibilityManager?.dispose();
- this._accessibilityManager = undefined;
- }
- break;
- case 'tabStopWidth': this.buffers.setupTabStops(); break;
- case 'theme':
- this._setTheme(this.optionsService.rawOptions.theme);
- break;
- }
- }
-
- /**
- * Binds the desired focus behavior on a given terminal object.
- */
- private _onTextAreaFocus(ev: KeyboardEvent): void {
- if (this.coreService.decPrivateModes.sendFocus) {
- this.coreService.triggerDataEvent(C0.ESC + '[I');
- }
- this.updateCursorStyle(ev);
- this.element!.classList.add('focus');
- this._showCursor();
- this._onFocus.fire();
- }
-
- /**
- * Blur the terminal, calling the blur function on the terminal's underlying
- * textarea.
- */
- public blur(): void {
- return this.textarea?.blur();
- }
-
- /**
- * Binds the desired blur behavior on a given terminal object.
- */
- private _onTextAreaBlur(): void {
- // Text can safely be removed on blur. Doing it earlier could interfere with
- // screen readers reading it out.
- this.textarea!.value = '';
- this.refresh(this.buffer.y, this.buffer.y);
- if (this.coreService.decPrivateModes.sendFocus) {
- this.coreService.triggerDataEvent(C0.ESC + '[O');
- }
- this.element!.classList.remove('focus');
- this._onBlur.fire();
- }
-
- private _syncTextArea(): void {
- if (!this.textarea || !this.buffer.isCursorInViewport || this._compositionHelper!.isComposing || !this._renderService) {
- return;
- }
- const cursorY = this.buffer.ybase + this.buffer.y;
- const bufferLine = this.buffer.lines.get(cursorY);
- if (!bufferLine) {
- return;
- }
- const cursorX = Math.min(this.buffer.x, this.cols - 1);
- const cellHeight = this._renderService.dimensions.actualCellHeight;
- const width = bufferLine.getWidth(cursorX);
- const cellWidth = this._renderService.dimensions.actualCellWidth * width;
- const cursorTop = this.buffer.y * this._renderService.dimensions.actualCellHeight;
- const cursorLeft = cursorX * this._renderService.dimensions.actualCellWidth;
-
- // Sync the textarea to the exact position of the composition view so the IME knows where the
- // text is.
- this.textarea.style.left = cursorLeft + 'px';
- this.textarea.style.top = cursorTop + 'px';
- this.textarea.style.width = cellWidth + 'px';
- this.textarea.style.height = cellHeight + 'px';
- this.textarea.style.lineHeight = cellHeight + 'px';
- this.textarea.style.zIndex = '-5';
- }
-
- /**
- * Initialize default behavior
- */
- private _initGlobal(): void {
- this._bindKeys();
-
- // Bind clipboard functionality
- this.register(addDisposableDomListener(this.element!, 'copy', (event: ClipboardEvent) => {
- // If mouse events are active it means the selection manager is disabled and
- // copy should be handled by the host program.
- if (!this.hasSelection()) {
- return;
- }
- copyHandler(event, this._selectionService!);
- }));
- const pasteHandlerWrapper = (event: ClipboardEvent): void => handlePasteEvent(event, this.textarea!, this.coreService);
- this.register(addDisposableDomListener(this.textarea!, 'paste', pasteHandlerWrapper));
- this.register(addDisposableDomListener(this.element!, 'paste', pasteHandlerWrapper));
-
- // Handle right click context menus
- if (Browser.isFirefox) {
- // Firefox doesn't appear to fire the contextmenu event on right click
- this.register(addDisposableDomListener(this.element!, 'mousedown', (event: MouseEvent) => {
- if (event.button === 2) {
- rightClickHandler(event, this.textarea!, this.screenElement!, this._selectionService!, this.options.rightClickSelectsWord);
- }
- }));
- } else {
- this.register(addDisposableDomListener(this.element!, 'contextmenu', (event: MouseEvent) => {
- rightClickHandler(event, this.textarea!, this.screenElement!, this._selectionService!, this.options.rightClickSelectsWord);
- }));
- }
-
- // Move the textarea under the cursor when middle clicking on Linux to ensure
- // middle click to paste selection works. This only appears to work in Chrome
- // at the time is writing.
- if (Browser.isLinux) {
- // Use auxclick event over mousedown the latter doesn't seem to work. Note
- // that the regular click event doesn't fire for the middle mouse button.
- this.register(addDisposableDomListener(this.element!, 'auxclick', (event: MouseEvent) => {
- if (event.button === 1) {
- moveTextAreaUnderMouseCursor(event, this.textarea!, this.screenElement!);
- }
- }));
- }
- }
-
- /**
- * Apply key handling to the terminal
- */
- private _bindKeys(): void {
- this.register(addDisposableDomListener(this.textarea!, 'keyup', (ev: KeyboardEvent) => this._keyUp(ev), true));
- this.register(addDisposableDomListener(this.textarea!, 'keydown', (ev: KeyboardEvent) => this._keyDown(ev), true));
- this.register(addDisposableDomListener(this.textarea!, 'keypress', (ev: KeyboardEvent) => this._keyPress(ev), true));
- this.register(addDisposableDomListener(this.textarea!, 'compositionstart', () => this._compositionHelper!.compositionstart()));
- this.register(addDisposableDomListener(this.textarea!, 'compositionupdate', (e: CompositionEvent) => this._compositionHelper!.compositionupdate(e)));
- this.register(addDisposableDomListener(this.textarea!, 'compositionend', () => this._compositionHelper!.compositionend()));
- this.register(addDisposableDomListener(this.textarea!, 'input', (ev: InputEvent) => this._inputEvent(ev), true));
- this.register(this.onRender(() => this._compositionHelper!.updateCompositionElements()));
- this.register(this.onRender(e => this._queueLinkification(e.start, e.end)));
- }
-
- /**
- * Opens the terminal within an element.
- *
- * @param parent The element to create the terminal within.
- */
- public open(parent: HTMLElement): void {
- if (!parent) {
- throw new Error('Terminal requires a parent element.');
- }
-
- if (!parent.isConnected) {
- this._logService.debug('Terminal.open was called on an element that was not attached to the DOM');
- }
-
- this._document = parent.ownerDocument!;
-
- // Create main element container
- this.element = this._document.createElement('div');
- this.element.dir = 'ltr'; // xterm.css assumes LTR
- this.element.classList.add('terminal');
- this.element.classList.add('xterm');
- this.element.setAttribute('tabindex', '0');
- parent.appendChild(this.element);
-
- // Performance: Use a document fragment to build the terminal
- // viewport and helper elements detached from the DOM
- const fragment = document.createDocumentFragment();
- this._viewportElement = document.createElement('div');
- this._viewportElement.classList.add('xterm-viewport');
- fragment.appendChild(this._viewportElement);
- this._viewportScrollArea = document.createElement('div');
- this._viewportScrollArea.classList.add('xterm-scroll-area');
- this._viewportElement.appendChild(this._viewportScrollArea);
-
- this.screenElement = document.createElement('div');
- this.screenElement.classList.add('xterm-screen');
- // Create the container that will hold helpers like the textarea for
- // capturing DOM Events. Then produce the helpers.
- this._helperContainer = document.createElement('div');
- this._helperContainer.classList.add('xterm-helpers');
- this.screenElement.appendChild(this._helperContainer);
- fragment.appendChild(this.screenElement);
-
- this.textarea = document.createElement('textarea');
- this.textarea.classList.add('xterm-helper-textarea');
- this.textarea.setAttribute('aria-label', Strings.promptLabel);
- this.textarea.setAttribute('aria-multiline', 'false');
- this.textarea.setAttribute('autocorrect', 'off');
- this.textarea.setAttribute('autocapitalize', 'off');
- this.textarea.setAttribute('spellcheck', 'false');
- this.textarea.tabIndex = 0;
- this.register(addDisposableDomListener(this.textarea, 'focus', (ev: KeyboardEvent) => this._onTextAreaFocus(ev)));
- this.register(addDisposableDomListener(this.textarea, 'blur', () => this._onTextAreaBlur()));
- this._helperContainer.appendChild(this.textarea);
-
- const coreBrowserService = this._instantiationService.createInstance(CoreBrowserService, this.textarea);
- this._instantiationService.setService(ICoreBrowserService, coreBrowserService);
-
- this._charSizeService = this._instantiationService.createInstance(CharSizeService, this._document, this._helperContainer);
- this._instantiationService.setService(ICharSizeService, this._charSizeService);
-
- this._theme = this.options.theme || this._theme;
- this._colorManager = new ColorManager(document, this.options.allowTransparency);
- this.register(this.optionsService.onOptionChange(e => this._colorManager!.onOptionsChange(e)));
- this._colorManager.setTheme(this._theme);
-
- this._characterJoinerService = this._instantiationService.createInstance(CharacterJoinerService);
- this._instantiationService.setService(ICharacterJoinerService, this._characterJoinerService);
-
- const renderer = this._createRenderer();
- this._renderService = this.register(this._instantiationService.createInstance(RenderService, renderer, this.rows, this.screenElement));
- this._instantiationService.setService(IRenderService, this._renderService);
- this.register(this._renderService.onRenderedBufferChange(e => this._onRender.fire(e)));
- this.onResize(e => this._renderService!.resize(e.cols, e.rows));
-
- this._compositionView = document.createElement('div');
- this._compositionView.classList.add('composition-view');
- this._compositionHelper = this._instantiationService.createInstance(CompositionHelper, this.textarea, this._compositionView);
- this._helperContainer.appendChild(this._compositionView);
-
- // Performance: Add viewport and helper elements from the fragment
- this.element.appendChild(fragment);
-
- this._soundService = this._instantiationService.createInstance(SoundService);
- this._instantiationService.setService(ISoundService, this._soundService);
- this._mouseService = this._instantiationService.createInstance(MouseService);
- this._instantiationService.setService(IMouseService, this._mouseService);
-
- this.viewport = this._instantiationService.createInstance(Viewport,
- (amount: number) => this.scrollLines(amount, true, ScrollSource.VIEWPORT),
- this._viewportElement,
- this._viewportScrollArea,
- this.element
- );
- this.viewport.onThemeChange(this._colorManager.colors);
- this.register(this._inputHandler.onRequestSyncScrollBar(() => this.viewport!.syncScrollArea()));
- this.register(this.viewport);
-
- this.register(this.onCursorMove(() => {
- this._renderService!.onCursorMove();
- this._syncTextArea();
- }));
- this.register(this.onResize(() => this._renderService!.onResize(this.cols, this.rows)));
- this.register(this.onBlur(() => this._renderService!.onBlur()));
- this.register(this.onFocus(() => this._renderService!.onFocus()));
- this.register(this._renderService.onDimensionsChange(() => this.viewport!.syncScrollArea()));
-
- this._selectionService = this.register(this._instantiationService.createInstance(SelectionService,
- this.element,
- this.screenElement,
- this.linkifier2
- ));
- this._instantiationService.setService(ISelectionService, this._selectionService);
- this.register(this._selectionService.onRequestScrollLines(e => this.scrollLines(e.amount, e.suppressScrollEvent)));
- this.register(this._selectionService.onSelectionChange(() => this._onSelectionChange.fire()));
- this.register(this._selectionService.onRequestRedraw(e => this._renderService!.onSelectionChanged(e.start, e.end, e.columnSelectMode)));
- this.register(this._selectionService.onLinuxMouseSelection(text => {
- // If there's a new selection, put it into the textarea, focus and select it
- // in order to register it as a selection on the OS. This event is fired
- // only on Linux to enable middle click to paste selection.
- this.textarea!.value = text;
- this.textarea!.focus();
- this.textarea!.select();
- }));
- this.register(this._onScroll.event(ev => {
- this.viewport!.syncScrollArea();
- this._selectionService!.refresh();
- }));
- this.register(addDisposableDomListener(this._viewportElement, 'scroll', () => this._selectionService!.refresh()));
-
- this._mouseZoneManager = this._instantiationService.createInstance(MouseZoneManager, this.element, this.screenElement);
- this.register(this._mouseZoneManager);
- this.register(this.onScroll(() => this._mouseZoneManager!.clearAll()));
- this.linkifier.attachToDom(this.element, this._mouseZoneManager);
- this.linkifier2.attachToDom(this.screenElement, this._mouseService, this._renderService);
-
- this.decorationService.attachToDom(this.screenElement, this._renderService, this._bufferService);
- // This event listener must be registered aftre MouseZoneManager is created
- this.register(addDisposableDomListener(this.element, 'mousedown', (e: MouseEvent) => this._selectionService!.onMouseDown(e)));
-
- // apply mouse event classes set by escape codes before terminal was attached
- if (this.coreMouseService.areMouseEventsActive) {
- this._selectionService.disable();
- this.element.classList.add('enable-mouse-events');
- } else {
- this._selectionService.enable();
- }
-
- if (this.options.screenReaderMode) {
- // Note that this must be done *after* the renderer is created in order to
- // ensure the correct order of the dprchange event
- this._accessibilityManager = new AccessibilityManager(this, this._renderService);
- }
-
- // Measure the character size
- this._charSizeService.measure();
-
- // Setup loop that draws to screen
- this.refresh(0, this.rows - 1);
-
- // Initialize global actions that need to be taken on the document.
- this._initGlobal();
-
- // Listen for mouse events and translate
- // them into terminal mouse protocols.
- this.bindMouse();
- }
-
- private _createRenderer(): IRenderer {
- switch (this.options.rendererType) {
- case 'canvas': return this._instantiationService.createInstance(Renderer, this._colorManager!.colors, this.screenElement!, this.linkifier, this.linkifier2);
- case 'dom': return this._instantiationService.createInstance(DomRenderer, this._colorManager!.colors, this.element!, this.screenElement!, this._viewportElement!, this.linkifier, this.linkifier2);
- default: throw new Error(`Unrecognized rendererType "${this.options.rendererType}"`);
- }
- }
-
- /**
- * Sets the theme on the renderer. The renderer must have been initialized.
- * @param theme The theme to set.
- */
- private _setTheme(theme: ITheme): void {
- this._theme = theme;
- this._colorManager?.setTheme(theme);
- this._renderService?.setColors(this._colorManager!.colors);
- this.viewport?.onThemeChange(this._colorManager!.colors);
- }
-
- /**
- * Bind certain mouse events to the terminal.
- * By default only 3 button + wheel up/down is ativated. For higher buttons
- * no mouse report will be created. Typically the standard actions will be active.
- *
- * There are several reasons not to enable support for higher buttons/wheel:
- * - Button 4 and 5 are typically used for history back and forward navigation,
- * there is no straight forward way to supress/intercept those standard actions.
- * - Support for higher buttons does not work in some platform/browser combinations.
- * - Left/right wheel was not tested.
- * - Emulators vary in mouse button support, typically only 3 buttons and
- * wheel up/down work reliable.
- *
- * TODO: Move mouse event code into its own file.
- */
- public bindMouse(): void {
- const self = this;
- const el = this.element!;
-
- // send event to CoreMouseService
- function sendEvent(ev: MouseEvent | WheelEvent): boolean {
- // get mouse coordinates
- const pos = self._mouseService!.getRawByteCoords(ev, self.screenElement!, self.cols, self.rows);
- if (!pos) {
- return false;
- }
-
- let but: CoreMouseButton;
- let action: CoreMouseAction | undefined;
- switch ((ev as any).overrideType || ev.type) {
- case 'mousemove':
- action = CoreMouseAction.MOVE;
- if (ev.buttons === undefined) {
- // buttons is not supported on macOS, try to get a value from button instead
- but = CoreMouseButton.NONE;
- if (ev.button !== undefined) {
- but = ev.button < 3 ? ev.button : CoreMouseButton.NONE;
- }
- } else {
- // according to MDN buttons only reports up to button 5 (AUX2)
- but = ev.buttons & 1 ? CoreMouseButton.LEFT :
- ev.buttons & 4 ? CoreMouseButton.MIDDLE :
- ev.buttons & 2 ? CoreMouseButton.RIGHT :
- CoreMouseButton.NONE; // fallback to NONE
- }
- break;
- case 'mouseup':
- action = CoreMouseAction.UP;
- but = ev.button < 3 ? ev.button : CoreMouseButton.NONE;
- break;
- case 'mousedown':
- action = CoreMouseAction.DOWN;
- but = ev.button < 3 ? ev.button : CoreMouseButton.NONE;
- break;
- case 'wheel':
- // only UP/DOWN wheel events are respected
- if ((ev as WheelEvent).deltaY !== 0) {
- action = (ev as WheelEvent).deltaY < 0 ? CoreMouseAction.UP : CoreMouseAction.DOWN;
- }
- but = CoreMouseButton.WHEEL;
- break;
- default:
- // dont handle other event types by accident
- return false;
- }
-
- // exit if we cannot determine valid button/action values
- // do nothing for higher buttons than wheel
- if (action === undefined || but === undefined || but > CoreMouseButton.WHEEL) {
- return false;
- }
-
- return self.coreMouseService.triggerMouseEvent({
- col: pos.x - 33, // FIXME: why -33 here?
- row: pos.y - 33,
- button: but,
- action,
- ctrl: ev.ctrlKey,
- alt: ev.altKey,
- shift: ev.shiftKey
- });
- }
-
- /**
- * Event listener state handling.
- * We listen to the onProtocolChange event of CoreMouseService and put
- * requested listeners in `requestedEvents`. With this the listeners
- * have all bits to do the event listener juggling.
- * Note: 'mousedown' currently is "always on" and not managed
- * by onProtocolChange.
- */
- const requestedEvents: { [key: string]: ((ev: Event) => void) | null } = {
- mouseup: null,
- wheel: null,
- mousedrag: null,
- mousemove: null
- };
- const eventListeners: { [key: string]: (ev: any) => void | boolean } = {
- mouseup: (ev: MouseEvent) => {
- sendEvent(ev);
- if (!ev.buttons) {
- // if no other button is held remove global handlers
- this._document!.removeEventListener('mouseup', requestedEvents.mouseup!);
- if (requestedEvents.mousedrag) {
- this._document!.removeEventListener('mousemove', requestedEvents.mousedrag);
- }
- }
- return this.cancel(ev);
- },
- wheel: (ev: WheelEvent) => {
- sendEvent(ev);
- return this.cancel(ev, true);
- },
- mousedrag: (ev: MouseEvent) => {
- // deal only with move while a button is held
- if (ev.buttons) {
- sendEvent(ev);
- }
- },
- mousemove: (ev: MouseEvent) => {
- // deal only with move without any button
- if (!ev.buttons) {
- sendEvent(ev);
- }
- }
- };
- this.register(this.coreMouseService.onProtocolChange(events => {
- // apply global changes on events
- if (events) {
- if (this.optionsService.rawOptions.logLevel === 'debug') {
- this._logService.debug('Binding to mouse events:', this.coreMouseService.explainEvents(events));
- }
- this.element!.classList.add('enable-mouse-events');
- this._selectionService!.disable();
- } else {
- this._logService.debug('Unbinding from mouse events.');
- this.element!.classList.remove('enable-mouse-events');
- this._selectionService!.enable();
- }
-
- // add/remove handlers from requestedEvents
-
- if (!(events & CoreMouseEventType.MOVE)) {
- el.removeEventListener('mousemove', requestedEvents.mousemove!);
- requestedEvents.mousemove = null;
- } else if (!requestedEvents.mousemove) {
- el.addEventListener('mousemove', eventListeners.mousemove);
- requestedEvents.mousemove = eventListeners.mousemove;
- }
-
- if (!(events & CoreMouseEventType.WHEEL)) {
- el.removeEventListener('wheel', requestedEvents.wheel!);
- requestedEvents.wheel = null;
- } else if (!requestedEvents.wheel) {
- el.addEventListener('wheel', eventListeners.wheel, { passive: false });
- requestedEvents.wheel = eventListeners.wheel;
- }
-
- if (!(events & CoreMouseEventType.UP)) {
- this._document!.removeEventListener('mouseup', requestedEvents.mouseup!);
- requestedEvents.mouseup = null;
- } else if (!requestedEvents.mouseup) {
- requestedEvents.mouseup = eventListeners.mouseup;
- }
-
- if (!(events & CoreMouseEventType.DRAG)) {
- this._document!.removeEventListener('mousemove', requestedEvents.mousedrag!);
- requestedEvents.mousedrag = null;
- } else if (!requestedEvents.mousedrag) {
- requestedEvents.mousedrag = eventListeners.mousedrag;
- }
- }));
- // force initial onProtocolChange so we dont miss early mouse requests
- this.coreMouseService.activeProtocol = this.coreMouseService.activeProtocol;
-
- /**
- * "Always on" event listeners.
- */
- this.register(addDisposableDomListener(el, 'mousedown', (ev: MouseEvent) => {
- ev.preventDefault();
- this.focus();
-
- // Don't send the mouse button to the pty if mouse events are disabled or
- // if the selection manager is having selection forced (ie. a modifier is
- // held).
- if (!this.coreMouseService.areMouseEventsActive || this._selectionService!.shouldForceSelection(ev)) {
- return;
- }
-
- sendEvent(ev);
-
- // Register additional global handlers which should keep reporting outside
- // of the terminal element.
- // Note: Other emulators also do this for 'mousedown' while a button
- // is held, we currently limit 'mousedown' to the terminal only.
- if (requestedEvents.mouseup) {
- this._document!.addEventListener('mouseup', requestedEvents.mouseup);
- }
- if (requestedEvents.mousedrag) {
- this._document!.addEventListener('mousemove', requestedEvents.mousedrag);
- }
-
- return this.cancel(ev);
- }));
-
- this.register(addDisposableDomListener(el, 'wheel', (ev: WheelEvent) => {
- // do nothing, if app side handles wheel itself
- if (requestedEvents.wheel) return;
-
- if (!this.buffer.hasScrollback) {
- // Convert wheel events into up/down events when the buffer does not have scrollback, this
- // enables scrolling in apps hosted in the alt buffer such as vim or tmux.
- const amount = this.viewport!.getLinesScrolled(ev);
-
- // Do nothing if there's no vertical scroll
- if (amount === 0) {
- return;
- }
-
- // Construct and send sequences
- const sequence = C0.ESC + (this.coreService.decPrivateModes.applicationCursorKeys ? 'O' : '[') + (ev.deltaY < 0 ? 'A' : 'B');
- let data = '';
- for (let i = 0; i < Math.abs(amount); i++) {
- data += sequence;
- }
- this.coreService.triggerDataEvent(data, true);
- return this.cancel(ev, true);
- }
-
- // normal viewport scrolling
- // conditionally stop event, if the viewport still had rows to scroll within
- if (this.viewport!.onWheel(ev)) {
- return this.cancel(ev);
- }
- }, { passive: false }));
-
- this.register(addDisposableDomListener(el, 'touchstart', (ev: TouchEvent) => {
- if (this.coreMouseService.areMouseEventsActive) return;
- this.viewport!.onTouchStart(ev);
- return this.cancel(ev);
- }, { passive: true }));
-
- this.register(addDisposableDomListener(el, 'touchmove', (ev: TouchEvent) => {
- if (this.coreMouseService.areMouseEventsActive) return;
- if (!this.viewport!.onTouchMove(ev)) {
- return this.cancel(ev);
- }
- }, { passive: false }));
- }
-
-
- /**
- * Tells the renderer to refresh terminal content between two rows (inclusive) at the next
- * opportunity.
- * @param start The row to start from (between 0 and this.rows - 1).
- * @param end The row to end at (between start and this.rows - 1).
- */
- public refresh(start: number, end: number): void {
- this._renderService?.refreshRows(start, end);
- }
-
- /**
- * Queues linkification for the specified rows.
- * @param start The row to start from (between 0 and this.rows - 1).
- * @param end The row to end at (between start and this.rows - 1).
- */
- private _queueLinkification(start: number, end: number): void {
- this.linkifier?.linkifyRows(start, end);
- }
-
- /**
- * Change the cursor style for different selection modes
- */
- public updateCursorStyle(ev: KeyboardEvent): void {
- if (this._selectionService?.shouldColumnSelect(ev)) {
- this.element!.classList.add('column-select');
- } else {
- this.element!.classList.remove('column-select');
- }
- }
-
- /**
- * Display the cursor element
- */
- private _showCursor(): void {
- if (!this.coreService.isCursorInitialized) {
- this.coreService.isCursorInitialized = true;
- this.refresh(this.buffer.y, this.buffer.y);
- }
- }
-
- public scrollLines(disp: number, suppressScrollEvent?: boolean, source = ScrollSource.TERMINAL): void {
- super.scrollLines(disp, suppressScrollEvent, source);
- this.refresh(0, this.rows - 1);
- }
-
- public paste(data: string): void {
- paste(data, this.textarea!, this.coreService);
- }
-
- /**
- * Attaches a custom key event handler which is run before keys are processed,
- * giving consumers of xterm.js ultimate control as to what keys should be
- * processed by the terminal and what keys should not.
- * @param customKeyEventHandler The custom KeyboardEvent handler to attach.
- * This is a function that takes a KeyboardEvent, allowing consumers to stop
- * propagation and/or prevent the default action. The function returns whether
- * the event should be processed by xterm.js.
- */
- public attachCustomKeyEventHandler(customKeyEventHandler: CustomKeyEventHandler): void {
- this._customKeyEventHandler = customKeyEventHandler;
- }
-
- /**
- * Registers a link matcher, allowing custom link patterns to be matched and
- * handled.
- * @param regex The regular expression to search for, specifically
- * this searches the textContent of the rows. You will want to use \s to match
- * a space ' ' character for example.
- * @param handler The callback when the link is called.
- * @param options Options for the link matcher.
- * @return The ID of the new matcher, this can be used to deregister.
- */
- public registerLinkMatcher(regex: RegExp, handler: LinkMatcherHandler, options?: ILinkMatcherOptions): number {
- const matcherId = this.linkifier.registerLinkMatcher(regex, handler, options);
- this.refresh(0, this.rows - 1);
- return matcherId;
- }
-
- /**
- * Deregisters a link matcher if it has been registered.
- * @param matcherId The link matcher's ID (returned after register)
- */
- public deregisterLinkMatcher(matcherId: number): void {
- if (this.linkifier.deregisterLinkMatcher(matcherId)) {
- this.refresh(0, this.rows - 1);
- }
- }
-
- public registerLinkProvider(linkProvider: ILinkProvider): IDisposable {
- return this.linkifier2.registerLinkProvider(linkProvider);
- }
-
- public registerCharacterJoiner(handler: CharacterJoinerHandler): number {
- if (!this._characterJoinerService) {
- throw new Error('Terminal must be opened first');
- }
- const joinerId = this._characterJoinerService.register(handler);
- this.refresh(0, this.rows - 1);
- return joinerId;
- }
-
- public deregisterCharacterJoiner(joinerId: number): void {
- if (!this._characterJoinerService) {
- throw new Error('Terminal must be opened first');
- }
- if (this._characterJoinerService.deregister(joinerId)) {
- this.refresh(0, this.rows - 1);
- }
- }
-
- public get markers(): IMarker[] {
- return this.buffer.markers;
- }
-
- public addMarker(cursorYOffset: number): IMarker | undefined {
- // Disallow markers on the alt buffer
- if (this.buffer !== this.buffers.normal) {
- return;
- }
-
- return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + cursorYOffset);
- }
-
- public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {
- return this.decorationService!.registerDecoration(decorationOptions);
- }
-
- /**
- * Gets whether the terminal has an active selection.
- */
- public hasSelection(): boolean {
- return this._selectionService ? this._selectionService.hasSelection : false;
- }
-
- /**
- * Selects text within the terminal.
- * @param column The column the selection starts at..
- * @param row The row the selection starts at.
- * @param length The length of the selection.
- */
- public select(column: number, row: number, length: number): void {
- this._selectionService!.setSelection(column, row, length);
- }
-
- /**
- * Gets the terminal's current selection, this is useful for implementing copy
- * behavior outside of xterm.js.
- */
- public getSelection(): string {
- return this._selectionService ? this._selectionService.selectionText : '';
- }
-
- public getSelectionPosition(): ISelectionPosition | undefined {
- if (!this._selectionService || !this._selectionService.hasSelection) {
- return undefined;
- }
-
- return {
- startColumn: this._selectionService.selectionStart![0],
- startRow: this._selectionService.selectionStart![1],
- endColumn: this._selectionService.selectionEnd![0],
- endRow: this._selectionService.selectionEnd![1]
- };
- }
-
- /**
- * Clears the current terminal selection.
- */
- public clearSelection(): void {
- this._selectionService?.clearSelection();
- }
-
- /**
- * Selects all text within the terminal.
- */
- public selectAll(): void {
- this._selectionService?.selectAll();
- }
-
- public selectLines(start: number, end: number): void {
- this._selectionService?.selectLines(start, end);
- }
-
- /**
- * Handle a keydown event
- * Key Resources:
- * - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent
- * @param ev The keydown event to be handled.
- */
- protected _keyDown(event: KeyboardEvent): boolean | undefined {
- this._keyDownHandled = false;
-
- if (this._customKeyEventHandler && this._customKeyEventHandler(event) === false) {
- return false;
- }
-
- if (!this._compositionHelper!.keydown(event)) {
- if (this.buffer.ybase !== this.buffer.ydisp) {
- this._bufferService.scrollToBottom();
- }
- return false;
- }
-
- if (event.key === 'Dead' || event.key === 'AltGraph') {
- this._unprocessedDeadKey = true;
- }
-
- const result = evaluateKeyboardEvent(event, this.coreService.decPrivateModes.applicationCursorKeys, this.browser.isMac, this.options.macOptionIsMeta);
-
- this.updateCursorStyle(event);
-
- if (result.type === KeyboardResultType.PAGE_DOWN || result.type === KeyboardResultType.PAGE_UP) {
- const scrollCount = this.rows - 1;
- this.scrollLines(result.type === KeyboardResultType.PAGE_UP ? -scrollCount : scrollCount);
- return this.cancel(event, true);
- }
-
- if (result.type === KeyboardResultType.SELECT_ALL) {
- this.selectAll();
- }
-
- if (this._isThirdLevelShift(this.browser, event)) {
- return true;
- }
-
- if (result.cancel) {
- // The event is canceled at the end already, is this necessary?
- this.cancel(event, true);
- }
-
- if (!result.key) {
- return true;
- }
-
- if (this._unprocessedDeadKey) {
- this._unprocessedDeadKey = false;
- return true;
- }
-
- // If ctrl+c or enter is being sent, clear out the textarea. This is done so that screen readers
- // will announce deleted characters. This will not work 100% of the time but it should cover
- // most scenarios.
- if (result.key === C0.ETX || result.key === C0.CR) {
- this.textarea!.value = '';
- }
-
- this._onKey.fire({ key: result.key, domEvent: event });
- this._showCursor();
- this.coreService.triggerDataEvent(result.key, true);
-
- // Cancel events when not in screen reader mode so events don't get bubbled up and handled by
- // other listeners. When screen reader mode is enabled, this could cause issues if the event
- // is handled at a higher level, this is a compromise in order to echo keys to the screen
- // reader.
- if (!this.optionsService.rawOptions.screenReaderMode) {
- return this.cancel(event, true);
- }
-
- this._keyDownHandled = true;
- }
-
- private _isThirdLevelShift(browser: IBrowser, ev: KeyboardEvent): boolean {
- const thirdLevelKey =
- (browser.isMac && !this.options.macOptionIsMeta && ev.altKey && !ev.ctrlKey && !ev.metaKey) ||
- (browser.isWindows && ev.altKey && ev.ctrlKey && !ev.metaKey) ||
- (browser.isWindows && ev.getModifierState('AltGraph'));
-
- if (ev.type === 'keypress') {
- return thirdLevelKey;
- }
-
- // Don't invoke for arrows, pageDown, home, backspace, etc. (on non-keypress events)
- return thirdLevelKey && (!ev.keyCode || ev.keyCode > 47);
- }
-
- protected _keyUp(ev: KeyboardEvent): void {
- if (this._customKeyEventHandler && this._customKeyEventHandler(ev) === false) {
- return;
- }
-
- if (!wasModifierKeyOnlyEvent(ev)) {
- this.focus();
- }
-
- this.updateCursorStyle(ev);
- this._keyPressHandled = false;
- }
-
- /**
- * Handle a keypress event.
- * Key Resources:
- * - https://developer.mozilla.org/en-US/docs/DOM/KeyboardEvent
- * @param ev The keypress event to be handled.
- */
- protected _keyPress(ev: KeyboardEvent): boolean {
- let key;
-
- this._keyPressHandled = false;
-
- if (this._keyDownHandled) {
- return false;
- }
-
- if (this._customKeyEventHandler && this._customKeyEventHandler(ev) === false) {
- return false;
- }
-
- this.cancel(ev);
-
- if (ev.charCode) {
- key = ev.charCode;
- } else if (ev.which === null || ev.which === undefined) {
- key = ev.keyCode;
- } else if (ev.which !== 0 && ev.charCode !== 0) {
- key = ev.which;
- } else {
- return false;
- }
-
- if (!key || (
- (ev.altKey || ev.ctrlKey || ev.metaKey) && !this._isThirdLevelShift(this.browser, ev)
- )) {
- return false;
- }
-
- key = String.fromCharCode(key);
-
- this._onKey.fire({ key, domEvent: ev });
- this._showCursor();
- this.coreService.triggerDataEvent(key, true);
-
- this._keyPressHandled = true;
-
- // The key was handled so clear the dead key state, otherwise certain keystrokes like arrow
- // keys could be ignored
- this._unprocessedDeadKey = false;
-
- return true;
- }
-
- /**
- * Handle an input event.
- * Key Resources:
- * - https://developer.mozilla.org/en-US/docs/Web/API/InputEvent
- * @param ev The input event to be handled.
- */
- protected _inputEvent(ev: InputEvent): boolean {
- // Only support emoji IMEs when screen reader mode is disabled as the event must bubble up to
- // support reading out character input which can doubling up input characters
- if (ev.data && ev.inputType === 'insertText' && !ev.composed && !this.optionsService.rawOptions.screenReaderMode) {
- if (this._keyPressHandled) {
- return false;
- }
-
- // The key was handled so clear the dead key state, otherwise certain keystrokes like arrow
- // keys could be ignored
- this._unprocessedDeadKey = false;
-
- const text = ev.data;
- this.coreService.triggerDataEvent(text, true);
-
- this.cancel(ev);
- return true;
- }
-
- return false;
- }
-
- /**
- * Ring the bell.
- * Note: We could do sweet things with webaudio here
- */
- public bell(): void {
- if (this._soundBell()) {
- this._soundService?.playBellSound();
- }
-
- this._onBell.fire();
-
- // if (this._visualBell()) {
- // this.element.classList.add('visual-bell-active');
- // clearTimeout(this._visualBellTimer);
- // this._visualBellTimer = window.setTimeout(() => {
- // this.element.classList.remove('visual-bell-active');
- // }, 200);
- // }
- }
-
- /**
- * Resizes the terminal.
- *
- * @param x The number of columns to resize to.
- * @param y The number of rows to resize to.
- */
- public resize(x: number, y: number): void {
- if (x === this.cols && y === this.rows) {
- // Check if we still need to measure the char size (fixes #785).
- if (this._charSizeService && !this._charSizeService.hasValidSize) {
- this._charSizeService.measure();
- }
- return;
- }
-
- super.resize(x, y);
- }
-
- private _afterResize(x: number, y: number): void {
- this._charSizeService?.measure();
-
- // Sync the scroll area to make sure scroll events don't fire and scroll the viewport to an
- // invalid location
- this.viewport?.syncScrollArea(true);
- }
-
- /**
- * Clear the entire buffer, making the prompt line the new first line.
- */
- public clear(): void {
- if (this.buffer.ybase === 0 && this.buffer.y === 0) {
- // Don't clear if it's already clear
- return;
- }
- this.buffer.clearMarkers();
- this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)!);
- this.buffer.lines.length = 1;
- this.buffer.ydisp = 0;
- this.buffer.ybase = 0;
- this.buffer.y = 0;
- for (let i = 1; i < this.rows; i++) {
- this.buffer.lines.push(this.buffer.getBlankLine(DEFAULT_ATTR_DATA));
- }
- this.refresh(0, this.rows - 1);
- this._onScroll.fire({ position: this.buffer.ydisp, source: ScrollSource.TERMINAL });
- }
-
- /**
- * Reset terminal.
- * Note: Calling this directly from JS is synchronous but does not clear
- * input buffers and does not reset the parser, thus the terminal will
- * continue to apply pending input data.
- * If you need in band reset (synchronous with input data) consider
- * using DECSTR (soft reset, CSI ! p) or RIS instead (hard reset, ESC c).
- */
- public reset(): void {
- /**
- * Since _setup handles a full terminal creation, we have to carry forward
- * a few things that should not reset.
- */
- this.options.rows = this.rows;
- this.options.cols = this.cols;
- const customKeyEventHandler = this._customKeyEventHandler;
-
- this._setup();
- super.reset();
- this._selectionService?.reset();
-
- // reattach
- this._customKeyEventHandler = customKeyEventHandler;
-
- // do a full screen refresh
- this.refresh(0, this.rows - 1);
- this.viewport?.syncScrollArea();
- }
-
- public clearTextureAtlas(): void {
- this._renderService?.clearTextureAtlas();
- }
-
- private _reportFocus(): void {
- if (this.element?.classList.contains('focus')) {
- this.coreService.triggerDataEvent(C0.ESC + '[I');
- } else {
- this.coreService.triggerDataEvent(C0.ESC + '[O');
- }
- }
-
- private _reportWindowsOptions(type: WindowsOptionsReportType): void {
- if (!this._renderService) {
- return;
- }
-
- switch (type) {
- case WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:
- const canvasWidth = this._renderService.dimensions.scaledCanvasWidth.toFixed(0);
- const canvasHeight = this._renderService.dimensions.scaledCanvasHeight.toFixed(0);
- this.coreService.triggerDataEvent(`${C0.ESC}[4;${canvasHeight};${canvasWidth}t`);
- break;
- case WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:
- const cellWidth = this._renderService.dimensions.scaledCellWidth.toFixed(0);
- const cellHeight = this._renderService.dimensions.scaledCellHeight.toFixed(0);
- this.coreService.triggerDataEvent(`${C0.ESC}[6;${cellHeight};${cellWidth}t`);
- break;
- }
- }
-
- // TODO: Remove cancel function and cancelEvents option
- public cancel(ev: Event, force?: boolean): boolean | undefined {
- if (!this.options.cancelEvents && !force) {
- return;
- }
- ev.preventDefault();
- ev.stopPropagation();
- return false;
- }
-
- private _visualBell(): boolean {
- return false;
- // return this.options.bellStyle === 'visual' ||
- // this.options.bellStyle === 'both';
- }
-
- private _soundBell(): boolean {
- return this.options.bellStyle === 'sound';
- // return this.options.bellStyle === 'sound' ||
- // this.options.bellStyle === 'both';
- }
-}
-
-/**
- * Helpers
- */
-
-function wasModifierKeyOnlyEvent(ev: KeyboardEvent): boolean {
- return ev.keyCode === 16 || // Shift
- ev.keyCode === 17 || // Ctrl
- ev.keyCode === 18; // Alt
-}
diff --git a/node_modules/xterm/src/browser/TimeBasedDebouncer.ts b/node_modules/xterm/src/browser/TimeBasedDebouncer.ts
deleted file mode 100644
index 707e25c..0000000
--- a/node_modules/xterm/src/browser/TimeBasedDebouncer.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-const RENDER_DEBOUNCE_THRESHOLD_MS = 1000; // 1 Second
-
-import { IRenderDebouncer } from 'browser/Types';
-
-/**
- * Debounces calls to update screen readers to update at most once configurable interval of time.
- */
-export class TimeBasedDebouncer implements IRenderDebouncer {
- private _rowStart: number | undefined;
- private _rowEnd: number | undefined;
- private _rowCount: number | undefined;
-
- // The last moment that the Terminal was refreshed at
- private _lastRefreshMs = 0;
- // Whether a trailing refresh should be triggered due to a refresh request that was throttled
- private _additionalRefreshRequested = false;
-
- private _refreshTimeoutID: number | undefined;
-
- constructor(
- private _renderCallback: (start: number, end: number) => void,
- private readonly _debounceThresholdMS = RENDER_DEBOUNCE_THRESHOLD_MS
- ) {
- }
-
- public dispose(): void {
- if (this._refreshTimeoutID) {
- clearTimeout(this._refreshTimeoutID);
- }
- }
-
- public refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void {
- this._rowCount = rowCount;
- // Get the min/max row start/end for the arg values
- rowStart = rowStart !== undefined ? rowStart : 0;
- rowEnd = rowEnd !== undefined ? rowEnd : this._rowCount - 1;
- // Set the properties to the updated values
- this._rowStart = this._rowStart !== undefined ? Math.min(this._rowStart, rowStart) : rowStart;
- this._rowEnd = this._rowEnd !== undefined ? Math.max(this._rowEnd, rowEnd) : rowEnd;
-
- // Only refresh if the time since last refresh is above a threshold, otherwise wait for
- // enough time to pass before refreshing again.
- const refreshRequestTime: number = Date.now();
- if (refreshRequestTime - this._lastRefreshMs >= this._debounceThresholdMS) {
- // Enough time has lapsed since the last refresh; refresh immediately
- this._lastRefreshMs = refreshRequestTime;
- this._innerRefresh();
- } else if (!this._additionalRefreshRequested) {
- // This is the first additional request throttled; set up trailing refresh
- const elapsed = refreshRequestTime - this._lastRefreshMs;
- const waitPeriodBeforeTrailingRefresh = this._debounceThresholdMS - elapsed;
- this._additionalRefreshRequested = true;
-
- this._refreshTimeoutID = window.setTimeout(() => {
- this._lastRefreshMs = Date.now();
- this._innerRefresh();
- this._additionalRefreshRequested = false;
- this._refreshTimeoutID = undefined; // No longer need to clear the timeout
- }, waitPeriodBeforeTrailingRefresh);
- }
- }
-
- private _innerRefresh(): void {
- // Make sure values are set
- if (this._rowStart === undefined || this._rowEnd === undefined || this._rowCount === undefined) {
- return;
- }
-
- // Clamp values
- const start = Math.max(this._rowStart, 0);
- const end = Math.min(this._rowEnd, this._rowCount - 1);
-
- // Reset debouncer (this happens before render callback as the render could trigger it again)
- this._rowStart = undefined;
- this._rowEnd = undefined;
-
- // Run render callback
- this._renderCallback(start, end);
- }
-}
-
diff --git a/node_modules/xterm/src/browser/Types.d.ts b/node_modules/xterm/src/browser/Types.d.ts
deleted file mode 100644
index 35b52d6..0000000
--- a/node_modules/xterm/src/browser/Types.d.ts
+++ /dev/null
@@ -1,316 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IDecorationOptions, IDecoration, IDisposable, IMarker, ISelectionPosition } from 'xterm';
-import { IEvent } from 'common/EventEmitter';
-import { ICoreTerminal, CharData, ITerminalOptions } from 'common/Types';
-import { IMouseService, IRenderService } from './services/Services';
-import { IBuffer } from 'common/buffer/Types';
-import { IFunctionIdentifier, IParams } from 'common/parser/Types';
-
-export interface ITerminal extends IPublicTerminal, ICoreTerminal {
- element: HTMLElement | undefined;
- screenElement: HTMLElement | undefined;
- browser: IBrowser;
- buffer: IBuffer;
- viewport: IViewport | undefined;
- options: ITerminalOptions;
- linkifier: ILinkifier;
- linkifier2: ILinkifier2;
-
- onBlur: IEvent<void>;
- onFocus: IEvent<void>;
- onA11yChar: IEvent<string>;
- onA11yTab: IEvent<number>;
-
- cancel(ev: Event, force?: boolean): boolean | void;
-}
-
-// Portions of the public API that are required by the internal Terminal
-export interface IPublicTerminal extends IDisposable {
- textarea: HTMLTextAreaElement | undefined;
- rows: number;
- cols: number;
- buffer: IBuffer;
- markers: IMarker[];
- onCursorMove: IEvent<void>;
- onData: IEvent<string>;
- onBinary: IEvent<string>;
- onKey: IEvent<{ key: string, domEvent: KeyboardEvent }>;
- onLineFeed: IEvent<void>;
- onScroll: IEvent<number>;
- onSelectionChange: IEvent<void>;
- onRender: IEvent<{ start: number, end: number }>;
- onResize: IEvent<{ cols: number, rows: number }>;
- onTitleChange: IEvent<string>;
- onBell: IEvent<void>;
- blur(): void;
- focus(): void;
- resize(columns: number, rows: number): void;
- open(parent: HTMLElement): void;
- attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void;
- registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable;
- registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable;
- registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable;
- registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable;
- registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => void, options?: ILinkMatcherOptions): number;
- deregisterLinkMatcher(matcherId: number): void;
- registerLinkProvider(linkProvider: ILinkProvider): IDisposable;
- registerCharacterJoiner(handler: (text: string) => [number, number][]): number;
- deregisterCharacterJoiner(joinerId: number): void;
- addMarker(cursorYOffset: number): IMarker | undefined;
- registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;
- hasSelection(): boolean;
- getSelection(): string;
- getSelectionPosition(): ISelectionPosition | undefined;
- clearSelection(): void;
- select(column: number, row: number, length: number): void;
- selectAll(): void;
- selectLines(start: number, end: number): void;
- dispose(): void;
- scrollLines(amount: number): void;
- scrollPages(pageCount: number): void;
- scrollToTop(): void;
- scrollToBottom(): void;
- scrollToLine(line: number): void;
- clear(): void;
- write(data: string | Uint8Array, callback?: () => void): void;
- paste(data: string): void;
- refresh(start: number, end: number): void;
- clearTextureAtlas(): void;
- reset(): void;
-}
-
-export type CustomKeyEventHandler = (event: KeyboardEvent) => boolean;
-
-export type LineData = CharData[];
-
-export interface ICompositionHelper {
- readonly isComposing: boolean;
- compositionstart(): void;
- compositionupdate(ev: CompositionEvent): void;
- compositionend(): void;
- updateCompositionElements(dontRecurse?: boolean): void;
- keydown(ev: KeyboardEvent): boolean;
-}
-
-export interface IBrowser {
- isNode: boolean;
- userAgent: string;
- platform: string;
- isFirefox: boolean;
- isMac: boolean;
- isIpad: boolean;
- isIphone: boolean;
- isWindows: boolean;
-}
-
-export interface IColorManager {
- colors: IColorSet;
- onOptionsChange(key: string): void;
-}
-
-export interface IColor {
- css: string;
- rgba: number; // 32-bit int with rgba in each byte
-}
-
-export interface IColorSet {
- foreground: IColor;
- background: IColor;
- cursor: IColor;
- cursorAccent: IColor;
- selectionTransparent: IColor;
- /** The selection blended on top of background. */
- selectionOpaque: IColor;
- ansi: IColor[];
- contrastCache: IColorContrastCache;
-}
-
-export interface IColorContrastCache {
- clear(): void;
- setCss(bg: number, fg: number, value: string | null): void;
- getCss(bg: number, fg: number): string | null | undefined;
- setColor(bg: number, fg: number, value: IColor | null): void;
- getColor(bg: number, fg: number): IColor | null | undefined;
-}
-
-export interface IPartialColorSet {
- foreground: IColor;
- background: IColor;
- cursor?: IColor;
- cursorAccent?: IColor;
- selection?: IColor;
- ansi: IColor[];
-}
-
-export interface IViewport extends IDisposable {
- scrollBarWidth: number;
- syncScrollArea(immediate?: boolean): void;
- getLinesScrolled(ev: WheelEvent): number;
- onWheel(ev: WheelEvent): boolean;
- onTouchStart(ev: TouchEvent): void;
- onTouchMove(ev: TouchEvent): boolean;
- onThemeChange(colors: IColorSet): void;
-}
-
-export interface IViewportRange {
- start: IViewportRangePosition;
- end: IViewportRangePosition;
-}
-
-export interface IViewportRangePosition {
- x: number;
- y: number;
-}
-
-export type LinkMatcherHandler = (event: MouseEvent, uri: string) => void;
-export type LinkMatcherHoverTooltipCallback = (event: MouseEvent, uri: string, position: IViewportRange) => void;
-export type LinkMatcherValidationCallback = (uri: string, callback: (isValid: boolean) => void) => void;
-
-export interface ILinkMatcher {
- id: number;
- regex: RegExp;
- handler: LinkMatcherHandler;
- hoverTooltipCallback?: LinkMatcherHoverTooltipCallback;
- hoverLeaveCallback?: () => void;
- matchIndex?: number;
- validationCallback?: LinkMatcherValidationCallback;
- priority?: number;
- willLinkActivate?: (event: MouseEvent, uri: string) => boolean;
-}
-
-export interface IRegisteredLinkMatcher extends ILinkMatcher {
- priority: number;
-}
-
-export interface ILinkifierEvent {
- x1: number;
- y1: number;
- x2: number;
- y2: number;
- cols: number;
- fg: number | undefined;
-}
-
-export interface ILinkifier {
- onShowLinkUnderline: IEvent<ILinkifierEvent>;
- onHideLinkUnderline: IEvent<ILinkifierEvent>;
- onLinkTooltip: IEvent<ILinkifierEvent>;
-
- attachToDom(element: HTMLElement, mouseZoneManager: IMouseZoneManager): void;
- linkifyRows(start: number, end: number): void;
- registerLinkMatcher(regex: RegExp, handler: LinkMatcherHandler, options?: ILinkMatcherOptions): number;
- deregisterLinkMatcher(matcherId: number): boolean;
-}
-
-interface ILinkState {
- decorations: ILinkDecorations;
- isHovered: boolean;
-}
-export interface ILinkWithState {
- link: ILink;
- state?: ILinkState;
-}
-
-export interface ILinkifier2 {
- onShowLinkUnderline: IEvent<ILinkifierEvent>;
- onHideLinkUnderline: IEvent<ILinkifierEvent>;
- readonly currentLink: ILinkWithState | undefined;
-
- attachToDom(element: HTMLElement, mouseService: IMouseService, renderService: IRenderService): void;
- registerLinkProvider(linkProvider: ILinkProvider): IDisposable;
-}
-
-export interface ILinkMatcherOptions {
- /**
- * The index of the link from the regex.match(text) call. This defaults to 0
- * (for regular expressions without capture groups).
- */
- matchIndex?: number;
- /**
- * A callback that validates an individual link, returning true if valid and
- * false if invalid.
- */
- validationCallback?: LinkMatcherValidationCallback;
- /**
- * A callback that fires when the mouse hovers over a link.
- */
- tooltipCallback?: LinkMatcherHoverTooltipCallback;
- /**
- * A callback that fires when the mouse leaves a link that was hovered.
- */
- leaveCallback?: () => void;
- /**
- * The priority of the link matcher, this defines the order in which the link
- * matcher is evaluated relative to others, from highest to lowest. The
- * default value is 0.
- */
- priority?: number;
- /**
- * A callback that fires when the mousedown and click events occur that
- * determines whether a link will be activated upon click. This enables
- * only activating a link when a certain modifier is held down, if not the
- * mouse event will continue propagation (eg. double click to select word).
- */
- willLinkActivate?: (event: MouseEvent, uri: string) => boolean;
-}
-
-export interface IMouseZoneManager extends IDisposable {
- add(zone: IMouseZone): void;
- clearAll(start?: number, end?: number): void;
-}
-
-export interface IMouseZone {
- x1: number;
- x2: number;
- y1: number;
- y2: number;
- clickCallback: (e: MouseEvent) => any;
- hoverCallback: (e: MouseEvent) => any | undefined;
- tooltipCallback: (e: MouseEvent) => any | undefined;
- leaveCallback: () => any | undefined;
- willLinkActivate: (e: MouseEvent) => boolean;
-}
-
-interface ILinkProvider {
- provideLinks(y: number, callback: (links: ILink[] | undefined) => void): void;
-}
-
-interface ILink {
- range: IBufferRange;
- text: string;
- decorations?: ILinkDecorations;
- activate(event: MouseEvent, text: string): void;
- hover?(event: MouseEvent, text: string): void;
- leave?(event: MouseEvent, text: string): void;
- dispose?(): void;
-}
-
-interface ILinkDecorations {
- pointerCursor: boolean;
- underline: boolean;
-}
-
-interface IBufferRange {
- start: IBufferCellPosition;
- end: IBufferCellPosition;
-}
-
-interface IBufferCellPosition {
- x: number;
- y: number;
-}
-
-export type CharacterJoinerHandler = (text: string) => [number, number][];
-
-export interface ICharacterJoiner {
- id: number;
- handler: CharacterJoinerHandler;
-}
-
-export interface IRenderDebouncer extends IDisposable {
- refresh(rowStart: number | undefined, rowEnd: number | undefined, rowCount: number): void;
-}
diff --git a/node_modules/xterm/src/browser/Viewport.ts b/node_modules/xterm/src/browser/Viewport.ts
deleted file mode 100644
index 14fab89..0000000
--- a/node_modules/xterm/src/browser/Viewport.ts
+++ /dev/null
@@ -1,294 +0,0 @@
-/**
- * Copyright (c) 2016 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { Disposable } from 'common/Lifecycle';
-import { addDisposableDomListener } from 'browser/Lifecycle';
-import { IColorSet, IViewport } from 'browser/Types';
-import { ICharSizeService, IRenderService } from 'browser/services/Services';
-import { IBufferService, IOptionsService } from 'common/services/Services';
-import { IBuffer } from 'common/buffer/Types';
-import { IRenderDimensions } from 'browser/renderer/Types';
-
-const FALLBACK_SCROLL_BAR_WIDTH = 15;
-
-/**
- * Represents the viewport of a terminal, the visible area within the larger buffer of output.
- * Logic for the virtual scroll bar is included in this object.
- */
-export class Viewport extends Disposable implements IViewport {
- public scrollBarWidth: number = 0;
- private _currentRowHeight: number = 0;
- private _currentScaledCellHeight: number = 0;
- private _lastRecordedBufferLength: number = 0;
- private _lastRecordedViewportHeight: number = 0;
- private _lastRecordedBufferHeight: number = 0;
- private _lastTouchY: number = 0;
- private _lastScrollTop: number = 0;
- private _lastHadScrollBar: boolean = false;
- private _activeBuffer: IBuffer;
- private _renderDimensions: IRenderDimensions;
-
- // Stores a partial line amount when scrolling, this is used to keep track of how much of a line
- // is scrolled so we can "scroll" over partial lines and feel natural on touchpads. This is a
- // quick fix and could have a more robust solution in place that reset the value when needed.
- private _wheelPartialScroll: number = 0;
-
- private _refreshAnimationFrame: number | null = null;
- private _ignoreNextScrollEvent: boolean = false;
-
- constructor(
- private readonly _scrollLines: (amount: number) => void,
- private readonly _viewportElement: HTMLElement,
- private readonly _scrollArea: HTMLElement,
- private readonly _element: HTMLElement,
- @IBufferService private readonly _bufferService: IBufferService,
- @IOptionsService private readonly _optionsService: IOptionsService,
- @ICharSizeService private readonly _charSizeService: ICharSizeService,
- @IRenderService private readonly _renderService: IRenderService
- ) {
- super();
-
- // Measure the width of the scrollbar. If it is 0 we can assume it's an OSX overlay scrollbar.
- // Unfortunately the overlay scrollbar would be hidden underneath the screen element in that case,
- // therefore we account for a standard amount to make it visible
- this.scrollBarWidth = (this._viewportElement.offsetWidth - this._scrollArea.offsetWidth) || FALLBACK_SCROLL_BAR_WIDTH;
- this._lastHadScrollBar = true;
- this.register(addDisposableDomListener(this._viewportElement, 'scroll', this._onScroll.bind(this)));
-
- // Track properties used in performance critical code manually to avoid using slow getters
- this._activeBuffer = this._bufferService.buffer;
- this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer));
- this._renderDimensions = this._renderService.dimensions;
- this.register(this._renderService.onDimensionsChange(e => this._renderDimensions = e));
-
- // Perform this async to ensure the ICharSizeService is ready.
- setTimeout(() => this.syncScrollArea(), 0);
- }
-
- public onThemeChange(colors: IColorSet): void {
- this._viewportElement.style.backgroundColor = colors.background.css;
- }
-
- /**
- * Refreshes row height, setting line-height, viewport height and scroll area height if
- * necessary.
- */
- private _refresh(immediate: boolean): void {
- if (immediate) {
- this._innerRefresh();
- if (this._refreshAnimationFrame !== null) {
- cancelAnimationFrame(this._refreshAnimationFrame);
- }
- return;
- }
- if (this._refreshAnimationFrame === null) {
- this._refreshAnimationFrame = requestAnimationFrame(() => this._innerRefresh());
- }
- }
-
- private _innerRefresh(): void {
- if (this._charSizeService.height > 0) {
- this._currentRowHeight = this._renderService.dimensions.scaledCellHeight / window.devicePixelRatio;
- this._currentScaledCellHeight = this._renderService.dimensions.scaledCellHeight;
- this._lastRecordedViewportHeight = this._viewportElement.offsetHeight;
- const newBufferHeight = Math.round(this._currentRowHeight * this._lastRecordedBufferLength) + (this._lastRecordedViewportHeight - this._renderService.dimensions.canvasHeight);
- if (this._lastRecordedBufferHeight !== newBufferHeight) {
- this._lastRecordedBufferHeight = newBufferHeight;
- this._scrollArea.style.height = this._lastRecordedBufferHeight + 'px';
- }
- }
-
- // Sync scrollTop
- const scrollTop = this._bufferService.buffer.ydisp * this._currentRowHeight;
- if (this._viewportElement.scrollTop !== scrollTop) {
- // Ignore the next scroll event which will be triggered by setting the scrollTop as we do not
- // want this event to scroll the terminal
- this._ignoreNextScrollEvent = true;
- this._viewportElement.scrollTop = scrollTop;
- }
-
- // Update scroll bar width
- if (this._optionsService.rawOptions.scrollback === 0) {
- this.scrollBarWidth = 0;
- } else {
- this.scrollBarWidth = (this._viewportElement.offsetWidth - this._scrollArea.offsetWidth) || FALLBACK_SCROLL_BAR_WIDTH;
- }
- this._lastHadScrollBar = this.scrollBarWidth > 0;
-
- const elementStyle = window.getComputedStyle(this._element);
- const elementPadding = parseInt(elementStyle.paddingLeft) + parseInt(elementStyle.paddingRight);
- this._viewportElement.style.width = (this._renderService.dimensions.actualCellWidth * (this._bufferService.cols) + this.scrollBarWidth + (this._lastHadScrollBar ? elementPadding : 0)).toString() + 'px';
- this._refreshAnimationFrame = null;
- }
-
- /**
- * Updates dimensions and synchronizes the scroll area if necessary.
- */
- public syncScrollArea(immediate: boolean = false): void {
- // If buffer height changed
- if (this._lastRecordedBufferLength !== this._bufferService.buffer.lines.length) {
- this._lastRecordedBufferLength = this._bufferService.buffer.lines.length;
- this._refresh(immediate);
- return;
- }
-
- // If viewport height changed
- if (this._lastRecordedViewportHeight !== this._renderService.dimensions.canvasHeight) {
- this._refresh(immediate);
- return;
- }
-
- // If the buffer position doesn't match last scroll top
- if (this._lastScrollTop !== this._activeBuffer.ydisp * this._currentRowHeight) {
- this._refresh(immediate);
- return;
- }
-
- // If row height changed
- if (this._renderDimensions.scaledCellHeight !== this._currentScaledCellHeight) {
- this._refresh(immediate);
- return;
- }
-
- // If the scroll bar visibility changed
- if (this._lastHadScrollBar !== (this._optionsService.rawOptions.scrollback > 0)) {
- this._refresh(immediate);
- }
- }
-
- /**
- * Handles scroll events on the viewport, calculating the new viewport and requesting the
- * terminal to scroll to it.
- * @param ev The scroll event.
- */
- private _onScroll(ev: Event): void {
- // Record current scroll top position
- this._lastScrollTop = this._viewportElement.scrollTop;
-
- // Don't attempt to scroll if the element is not visible, otherwise scrollTop will be corrupt
- // which causes the terminal to scroll the buffer to the top
- if (!this._viewportElement.offsetParent) {
- return;
- }
-
- // Ignore the event if it was flagged to ignore (when the source of the event is from Viewport)
- if (this._ignoreNextScrollEvent) {
- this._ignoreNextScrollEvent = false;
- // Still trigger the scroll so lines get refreshed
- this._scrollLines(0);
- return;
- }
-
- const newRow = Math.round(this._lastScrollTop / this._currentRowHeight);
- const diff = newRow - this._bufferService.buffer.ydisp;
- this._scrollLines(diff);
- }
-
- /**
- * Handles bubbling of scroll event in case the viewport has reached top or bottom
- * @param ev The scroll event.
- * @param amount The amount scrolled
- */
- private _bubbleScroll(ev: Event, amount: number): boolean {
- const scrollPosFromTop = this._viewportElement.scrollTop + this._lastRecordedViewportHeight;
- if ((amount < 0 && this._viewportElement.scrollTop !== 0) ||
- (amount > 0 && scrollPosFromTop < this._lastRecordedBufferHeight)) {
- if (ev.cancelable) {
- ev.preventDefault();
- }
- return false;
- }
- return true;
- }
-
- /**
- * Handles mouse wheel events by adjusting the viewport's scrollTop and delegating the actual
- * scrolling to `onScroll`, this event needs to be attached manually by the consumer of
- * `Viewport`.
- * @param ev The mouse wheel event.
- */
- public onWheel(ev: WheelEvent): boolean {
- const amount = this._getPixelsScrolled(ev);
- if (amount === 0) {
- return false;
- }
- this._viewportElement.scrollTop += amount;
- return this._bubbleScroll(ev, amount);
- }
-
- private _getPixelsScrolled(ev: WheelEvent): number {
- // Do nothing if it's not a vertical scroll event
- if (ev.deltaY === 0 || ev.shiftKey) {
- return 0;
- }
-
- // Fallback to WheelEvent.DOM_DELTA_PIXEL
- let amount = this._applyScrollModifier(ev.deltaY, ev);
- if (ev.deltaMode === WheelEvent.DOM_DELTA_LINE) {
- amount *= this._currentRowHeight;
- } else if (ev.deltaMode === WheelEvent.DOM_DELTA_PAGE) {
- amount *= this._currentRowHeight * this._bufferService.rows;
- }
- return amount;
- }
-
- /**
- * Gets the number of pixels scrolled by the mouse event taking into account what type of delta
- * is being used.
- * @param ev The mouse wheel event.
- */
- public getLinesScrolled(ev: WheelEvent): number {
- // Do nothing if it's not a vertical scroll event
- if (ev.deltaY === 0 || ev.shiftKey) {
- return 0;
- }
-
- // Fallback to WheelEvent.DOM_DELTA_LINE
- let amount = this._applyScrollModifier(ev.deltaY, ev);
- if (ev.deltaMode === WheelEvent.DOM_DELTA_PIXEL) {
- amount /= this._currentRowHeight + 0.0; // Prevent integer division
- this._wheelPartialScroll += amount;
- amount = Math.floor(Math.abs(this._wheelPartialScroll)) * (this._wheelPartialScroll > 0 ? 1 : -1);
- this._wheelPartialScroll %= 1;
- } else if (ev.deltaMode === WheelEvent.DOM_DELTA_PAGE) {
- amount *= this._bufferService.rows;
- }
- return amount;
- }
-
- private _applyScrollModifier(amount: number, ev: WheelEvent): number {
- const modifier = this._optionsService.rawOptions.fastScrollModifier;
- // Multiply the scroll speed when the modifier is down
- if ((modifier === 'alt' && ev.altKey) ||
- (modifier === 'ctrl' && ev.ctrlKey) ||
- (modifier === 'shift' && ev.shiftKey)) {
- return amount * this._optionsService.rawOptions.fastScrollSensitivity * this._optionsService.rawOptions.scrollSensitivity;
- }
-
- return amount * this._optionsService.rawOptions.scrollSensitivity;
- }
-
- /**
- * Handles the touchstart event, recording the touch occurred.
- * @param ev The touch event.
- */
- public onTouchStart(ev: TouchEvent): void {
- this._lastTouchY = ev.touches[0].pageY;
- }
-
- /**
- * Handles the touchmove event, scrolling the viewport if the position shifted.
- * @param ev The touch event.
- */
- public onTouchMove(ev: TouchEvent): boolean {
- const deltaY = this._lastTouchY - ev.touches[0].pageY;
- this._lastTouchY = ev.touches[0].pageY;
- if (deltaY === 0) {
- return false;
- }
- this._viewportElement.scrollTop += deltaY;
- return this._bubbleScroll(ev, deltaY);
- }
-}
diff --git a/node_modules/xterm/src/browser/input/CompositionHelper.ts b/node_modules/xterm/src/browser/input/CompositionHelper.ts
deleted file mode 100644
index 61051b5..0000000
--- a/node_modules/xterm/src/browser/input/CompositionHelper.ts
+++ /dev/null
@@ -1,237 +0,0 @@
-/**
- * Copyright (c) 2016 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderService } from 'browser/services/Services';
-import { IBufferService, ICoreService, IOptionsService } from 'common/services/Services';
-
-interface IPosition {
- start: number;
- end: number;
-}
-
-/**
- * Encapsulates the logic for handling compositionstart, compositionupdate and compositionend
- * events, displaying the in-progress composition to the UI and forwarding the final composition
- * to the handler.
- */
-export class CompositionHelper {
- /**
- * Whether input composition is currently happening, eg. via a mobile keyboard, speech input or
- * IME. This variable determines whether the compositionText should be displayed on the UI.
- */
- private _isComposing: boolean;
- public get isComposing(): boolean { return this._isComposing; }
-
- /**
- * The position within the input textarea's value of the current composition.
- */
- private _compositionPosition: IPosition;
-
- /**
- * Whether a composition is in the process of being sent, setting this to false will cancel any
- * in-progress composition.
- */
- private _isSendingComposition: boolean;
-
- /**
- * Data already sent due to keydown event.
- */
- private _dataAlreadySent: string;
-
- constructor(
- private readonly _textarea: HTMLTextAreaElement,
- private readonly _compositionView: HTMLElement,
- @IBufferService private readonly _bufferService: IBufferService,
- @IOptionsService private readonly _optionsService: IOptionsService,
- @ICoreService private readonly _coreService: ICoreService,
- @IRenderService private readonly _renderService: IRenderService
- ) {
- this._isComposing = false;
- this._isSendingComposition = false;
- this._compositionPosition = { start: 0, end: 0 };
- this._dataAlreadySent = '';
- }
-
- /**
- * Handles the compositionstart event, activating the composition view.
- */
- public compositionstart(): void {
- this._isComposing = true;
- this._compositionPosition.start = this._textarea.value.length;
- this._compositionView.textContent = '';
- this._dataAlreadySent = '';
- this._compositionView.classList.add('active');
- }
-
- /**
- * Handles the compositionupdate event, updating the composition view.
- * @param ev The event.
- */
- public compositionupdate(ev: Pick<CompositionEvent, 'data'>): void {
- this._compositionView.textContent = ev.data;
- this.updateCompositionElements();
- setTimeout(() => {
- this._compositionPosition.end = this._textarea.value.length;
- }, 0);
- }
-
- /**
- * Handles the compositionend event, hiding the composition view and sending the composition to
- * the handler.
- */
- public compositionend(): void {
- this._finalizeComposition(true);
- }
-
- /**
- * Handles the keydown event, routing any necessary events to the CompositionHelper functions.
- * @param ev The keydown event.
- * @return Whether the Terminal should continue processing the keydown event.
- */
- public keydown(ev: KeyboardEvent): boolean {
- if (this._isComposing || this._isSendingComposition) {
- if (ev.keyCode === 229) {
- // Continue composing if the keyCode is the "composition character"
- return false;
- }
- if (ev.keyCode === 16 || ev.keyCode === 17 || ev.keyCode === 18) {
- // Continue composing if the keyCode is a modifier key
- return false;
- }
- // Finish composition immediately. This is mainly here for the case where enter is
- // pressed and the handler needs to be triggered before the command is executed.
- this._finalizeComposition(false);
- }
-
- if (ev.keyCode === 229) {
- // If the "composition character" is used but gets to this point it means a non-composition
- // character (eg. numbers and punctuation) was pressed when the IME was active.
- this._handleAnyTextareaChanges();
- return false;
- }
-
- return true;
- }
-
- /**
- * Finalizes the composition, resuming regular input actions. This is called when a composition
- * is ending.
- * @param waitForPropagation Whether to wait for events to propagate before sending
- * the input. This should be false if a non-composition keystroke is entered before the
- * compositionend event is triggered, such as enter, so that the composition is sent before
- * the command is executed.
- */
- private _finalizeComposition(waitForPropagation: boolean): void {
- this._compositionView.classList.remove('active');
- this._isComposing = false;
-
- if (!waitForPropagation) {
- // Cancel any delayed composition send requests and send the input immediately.
- this._isSendingComposition = false;
- const input = this._textarea.value.substring(this._compositionPosition.start, this._compositionPosition.end);
- this._coreService.triggerDataEvent(input, true);
- } else {
- // Make a deep copy of the composition position here as a new compositionstart event may
- // fire before the setTimeout executes.
- const currentCompositionPosition = {
- start: this._compositionPosition.start,
- end: this._compositionPosition.end
- };
-
- // Since composition* events happen before the changes take place in the textarea on most
- // browsers, use a setTimeout with 0ms time to allow the native compositionend event to
- // complete. This ensures the correct character is retrieved.
- // This solution was used because:
- // - The compositionend event's data property is unreliable, at least on Chromium
- // - The last compositionupdate event's data property does not always accurately describe
- // the character, a counter example being Korean where an ending consonsant can move to
- // the following character if the following input is a vowel.
- this._isSendingComposition = true;
- setTimeout(() => {
- // Ensure that the input has not already been sent
- if (this._isSendingComposition) {
- this._isSendingComposition = false;
- let input;
- // Add length of data already sent due to keydown event,
- // otherwise input characters can be duplicated. (Issue #3191)
- currentCompositionPosition.start += this._dataAlreadySent.length;
- if (this._isComposing) {
- // Use the end position to get the string if a new composition has started.
- input = this._textarea.value.substring(currentCompositionPosition.start, currentCompositionPosition.end);
- } else {
- // Don't use the end position here in order to pick up any characters after the
- // composition has finished, for example when typing a non-composition character
- // (eg. 2) after a composition character.
- input = this._textarea.value.substring(currentCompositionPosition.start);
- }
- if (input.length > 0) {
- this._coreService.triggerDataEvent(input, true);
- }
- }
- }, 0);
- }
- }
-
- /**
- * Apply any changes made to the textarea after the current event chain is allowed to complete.
- * This should be called when not currently composing but a keydown event with the "composition
- * character" (229) is triggered, in order to allow non-composition text to be entered when an
- * IME is active.
- */
- private _handleAnyTextareaChanges(): void {
- const oldValue = this._textarea.value;
- setTimeout(() => {
- // Ignore if a composition has started since the timeout
- if (!this._isComposing) {
- const newValue = this._textarea.value;
- const diff = newValue.replace(oldValue, '');
- if (diff.length > 0) {
- this._dataAlreadySent = diff;
- this._coreService.triggerDataEvent(diff, true);
- }
- }
- }, 0);
- }
-
- /**
- * Positions the composition view on top of the cursor and the textarea just below it (so the
- * IME helper dialog is positioned correctly).
- * @param dontRecurse Whether to use setTimeout to recursively trigger another update, this is
- * necessary as the IME events across browsers are not consistently triggered.
- */
- public updateCompositionElements(dontRecurse?: boolean): void {
- if (!this._isComposing) {
- return;
- }
-
- if (this._bufferService.buffer.isCursorInViewport) {
- const cursorX = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);
-
- const cellHeight = this._renderService.dimensions.actualCellHeight;
- const cursorTop = this._bufferService.buffer.y * this._renderService.dimensions.actualCellHeight;
- const cursorLeft = cursorX * this._renderService.dimensions.actualCellWidth;
-
- this._compositionView.style.left = cursorLeft + 'px';
- this._compositionView.style.top = cursorTop + 'px';
- this._compositionView.style.height = cellHeight + 'px';
- this._compositionView.style.lineHeight = cellHeight + 'px';
- this._compositionView.style.fontFamily = this._optionsService.rawOptions.fontFamily;
- this._compositionView.style.fontSize = this._optionsService.rawOptions.fontSize + 'px';
- // Sync the textarea to the exact position of the composition view so the IME knows where the
- // text is.
- const compositionViewBounds = this._compositionView.getBoundingClientRect();
- this._textarea.style.left = cursorLeft + 'px';
- this._textarea.style.top = cursorTop + 'px';
- // Ensure the text area is at least 1x1, otherwise certain IMEs may break
- this._textarea.style.width = Math.max(compositionViewBounds.width, 1) + 'px';
- this._textarea.style.height = Math.max(compositionViewBounds.height, 1) + 'px';
- this._textarea.style.lineHeight = compositionViewBounds.height + 'px';
- }
-
- if (!dontRecurse) {
- setTimeout(() => this.updateCompositionElements(true), 0);
- }
- }
-}
diff --git a/node_modules/xterm/src/browser/input/Mouse.ts b/node_modules/xterm/src/browser/input/Mouse.ts
deleted file mode 100644
index 2986fb3..0000000
--- a/node_modules/xterm/src/browser/input/Mouse.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-export function getCoordsRelativeToElement(event: {clientX: number, clientY: number}, element: HTMLElement): [number, number] {
- const rect = element.getBoundingClientRect();
- return [event.clientX - rect.left, event.clientY - rect.top];
-}
-
-/**
- * Gets coordinates within the terminal for a particular mouse event. The result
- * is returned as an array in the form [x, y] instead of an object as it's a
- * little faster and this function is used in some low level code.
- * @param event The mouse event.
- * @param element The terminal's container element.
- * @param colCount The number of columns in the terminal.
- * @param rowCount The number of rows n the terminal.
- * @param isSelection Whether the request is for the selection or not. This will
- * apply an offset to the x value such that the left half of the cell will
- * select that cell and the right half will select the next cell.
- */
-export function getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, hasValidCharSize: boolean, actualCellWidth: number, actualCellHeight: number, isSelection?: boolean): [number, number] | undefined {
- // Coordinates cannot be measured if there are no valid
- if (!hasValidCharSize) {
- return undefined;
- }
-
- const coords = getCoordsRelativeToElement(event, element);
- if (!coords) {
- return undefined;
- }
-
- coords[0] = Math.ceil((coords[0] + (isSelection ? actualCellWidth / 2 : 0)) / actualCellWidth);
- coords[1] = Math.ceil(coords[1] / actualCellHeight);
-
- // Ensure coordinates are within the terminal viewport. Note that selections
- // need an addition point of precision to cover the end point (as characters
- // cover half of one char and half of the next).
- coords[0] = Math.min(Math.max(coords[0], 1), colCount + (isSelection ? 1 : 0));
- coords[1] = Math.min(Math.max(coords[1], 1), rowCount);
-
- return coords;
-}
-
-/**
- * Gets coordinates within the terminal for a particular mouse event, wrapping
- * them to the bounds of the terminal and adding 32 to both the x and y values
- * as expected by xterm.
- */
-export function getRawByteCoords(coords: [number, number] | undefined): { x: number, y: number } | undefined {
- if (!coords) {
- return undefined;
- }
-
- // xterm sends raw bytes and starts at 32 (SP) for each.
- return { x: coords[0] + 32, y: coords[1] + 32 };
-}
diff --git a/node_modules/xterm/src/browser/input/MoveToCell.ts b/node_modules/xterm/src/browser/input/MoveToCell.ts
deleted file mode 100644
index 82e767c..0000000
--- a/node_modules/xterm/src/browser/input/MoveToCell.ts
+++ /dev/null
@@ -1,249 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { C0 } from 'common/data/EscapeSequences';
-import { IBufferService } from 'common/services/Services';
-
-const enum Direction {
- UP = 'A',
- DOWN = 'B',
- RIGHT = 'C',
- LEFT = 'D'
-}
-
-/**
- * Concatenates all the arrow sequences together.
- * Resets the starting row to an unwrapped row, moves to the requested row,
- * then moves to requested col.
- */
-export function moveToCellSequence(targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {
- const startX = bufferService.buffer.x;
- const startY = bufferService.buffer.y;
-
- // The alt buffer should try to navigate between rows
- if (!bufferService.buffer.hasScrollback) {
- return resetStartingRow(startX, startY, targetX, targetY, bufferService, applicationCursor) +
- moveToRequestedRow(startY, targetY, bufferService, applicationCursor) +
- moveToRequestedCol(startX, startY, targetX, targetY, bufferService, applicationCursor);
- }
-
- // Only move horizontally for the normal buffer
- let direction;
- if (startY === targetY) {
- direction = startX > targetX ? Direction.LEFT : Direction.RIGHT;
- return repeat(Math.abs(startX - targetX), sequence(direction, applicationCursor));
- }
- direction = startY > targetY ? Direction.LEFT : Direction.RIGHT;
- const rowDifference = Math.abs(startY - targetY);
- const cellsToMove = colsFromRowEnd(startY > targetY ? targetX : startX, bufferService) +
- (rowDifference - 1) * bufferService.cols + 1 /* wrap around 1 row */ +
- colsFromRowBeginning(startY > targetY ? startX : targetX, bufferService);
- return repeat(cellsToMove, sequence(direction, applicationCursor));
-}
-
-/**
- * Find the number of cols from a row beginning to a col.
- */
-function colsFromRowBeginning(currX: number, bufferService: IBufferService): number {
- return currX - 1;
-}
-
-/**
- * Find the number of cols from a col to row end.
- */
-function colsFromRowEnd(currX: number, bufferService: IBufferService): number {
- return bufferService.cols - currX;
-}
-
-/**
- * If the initial position of the cursor is on a row that is wrapped, move the
- * cursor up to the first row that is not wrapped to have accurate vertical
- * positioning.
- */
-function resetStartingRow(startX: number, startY: number, targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {
- if (moveToRequestedRow(startY, targetY, bufferService, applicationCursor).length === 0) {
- return '';
- }
- return repeat(bufferLine(
- startX, startY, startX,
- startY - wrappedRowsForRow(bufferService, startY), false, bufferService
- ).length, sequence(Direction.LEFT, applicationCursor));
-}
-
-/**
- * Using the reset starting and ending row, move to the requested row,
- * ignoring wrapped rows
- */
-function moveToRequestedRow(startY: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {
- const startRow = startY - wrappedRowsForRow(bufferService, startY);
- const endRow = targetY - wrappedRowsForRow(bufferService, targetY);
-
- const rowsToMove = Math.abs(startRow - endRow) - wrappedRowsCount(startY, targetY, bufferService);
-
- return repeat(rowsToMove, sequence(verticalDirection(startY, targetY), applicationCursor));
-}
-
-/**
- * Move to the requested col on the ending row
- */
-function moveToRequestedCol(startX: number, startY: number, targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): string {
- let startRow;
- if (moveToRequestedRow(startY, targetY, bufferService, applicationCursor).length > 0) {
- startRow = targetY - wrappedRowsForRow(bufferService, targetY);
- } else {
- startRow = startY;
- }
-
- const endRow = targetY;
- const direction = horizontalDirection(startX, startY, targetX, targetY, bufferService, applicationCursor);
-
- return repeat(bufferLine(
- startX, startRow, targetX, endRow,
- direction === Direction.RIGHT, bufferService
- ).length, sequence(direction, applicationCursor));
-}
-
-/**
- * Utility functions
- */
-
-/**
- * Calculates the number of wrapped rows between the unwrapped starting and
- * ending rows. These rows need to ignored since the cursor skips over them.
- */
-function wrappedRowsCount(startY: number, targetY: number, bufferService: IBufferService): number {
- let wrappedRows = 0;
- const startRow = startY - wrappedRowsForRow(bufferService, startY);
- const endRow = targetY - wrappedRowsForRow(bufferService, targetY);
-
- for (let i = 0; i < Math.abs(startRow - endRow); i++) {
- const direction = verticalDirection(startY, targetY) === Direction.UP ? -1 : 1;
- const line = bufferService.buffer.lines.get(startRow + (direction * i));
- if (line?.isWrapped) {
- wrappedRows++;
- }
- }
-
- return wrappedRows;
-}
-
-/**
- * Calculates the number of wrapped rows that make up a given row.
- * @param currentRow The row to determine how many wrapped rows make it up
- */
-function wrappedRowsForRow(bufferService: IBufferService, currentRow: number): number {
- let rowCount = 0;
- let line = bufferService.buffer.lines.get(currentRow);
- let lineWraps = line?.isWrapped;
-
- while (lineWraps && currentRow >= 0 && currentRow < bufferService.rows) {
- rowCount++;
- line = bufferService.buffer.lines.get(--currentRow);
- lineWraps = line?.isWrapped;
- }
-
- return rowCount;
-}
-
-/**
- * Direction determiners
- */
-
-/**
- * Determines if the right or left arrow is needed
- */
-function horizontalDirection(startX: number, startY: number, targetX: number, targetY: number, bufferService: IBufferService, applicationCursor: boolean): Direction {
- let startRow;
- if (moveToRequestedRow(targetX, targetY, bufferService, applicationCursor).length > 0) {
- startRow = targetY - wrappedRowsForRow(bufferService, targetY);
- } else {
- startRow = startY;
- }
-
- if ((startX < targetX &&
- startRow <= targetY) || // down/right or same y/right
- (startX >= targetX &&
- startRow < targetY)) { // down/left or same y/left
- return Direction.RIGHT;
- }
- return Direction.LEFT;
-}
-
-/**
- * Determines if the up or down arrow is needed
- */
-function verticalDirection(startY: number, targetY: number): Direction {
- return startY > targetY ? Direction.UP : Direction.DOWN;
-}
-
-/**
- * Constructs the string of chars in the buffer from a starting row and col
- * to an ending row and col
- * @param startCol The starting column position
- * @param startRow The starting row position
- * @param endCol The ending column position
- * @param endRow The ending row position
- * @param forward Direction to move
- */
-function bufferLine(
- startCol: number,
- startRow: number,
- endCol: number,
- endRow: number,
- forward: boolean,
- bufferService: IBufferService
-): string {
- let currentCol = startCol;
- let currentRow = startRow;
- let bufferStr = '';
-
- while (currentCol !== endCol || currentRow !== endRow) {
- currentCol += forward ? 1 : -1;
-
- if (forward && currentCol > bufferService.cols - 1) {
- bufferStr += bufferService.buffer.translateBufferLineToString(
- currentRow, false, startCol, currentCol
- );
- currentCol = 0;
- startCol = 0;
- currentRow++;
- } else if (!forward && currentCol < 0) {
- bufferStr += bufferService.buffer.translateBufferLineToString(
- currentRow, false, 0, startCol + 1
- );
- currentCol = bufferService.cols - 1;
- startCol = currentCol;
- currentRow--;
- }
- }
-
- return bufferStr + bufferService.buffer.translateBufferLineToString(
- currentRow, false, startCol, currentCol
- );
-}
-
-/**
- * Constructs the escape sequence for clicking an arrow
- * @param direction The direction to move
- */
-function sequence(direction: Direction, applicationCursor: boolean): string {
- const mod = applicationCursor ? 'O' : '[';
- return C0.ESC + mod + direction;
-}
-
-/**
- * Returns a string repeated a given number of times
- * Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
- * @param count The number of times to repeat the string
- * @param string The string that is to be repeated
- */
-function repeat(count: number, str: string): string {
- count = Math.floor(count);
- let rpt = '';
- for (let i = 0; i < count; i++) {
- rpt += str;
- }
- return rpt;
-}
diff --git a/node_modules/xterm/src/browser/public/Terminal.ts b/node_modules/xterm/src/browser/public/Terminal.ts
deleted file mode 100644
index 1acde93..0000000
--- a/node_modules/xterm/src/browser/public/Terminal.ts
+++ /dev/null
@@ -1,297 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { Terminal as ITerminalApi, IMarker, IDisposable, ILinkMatcherOptions, ITheme, ILocalizableStrings, ITerminalAddon, ISelectionPosition, IBufferNamespace as IBufferNamespaceApi, IParser, ILinkProvider, IUnicodeHandling, FontWeight, IModes, IDecorationOptions, IDecoration } from 'xterm';
-import { ITerminal } from 'browser/Types';
-import { Terminal as TerminalCore } from 'browser/Terminal';
-import * as Strings from 'browser/LocalizableStrings';
-import { IEvent } from 'common/EventEmitter';
-import { ParserApi } from 'common/public/ParserApi';
-import { UnicodeApi } from 'common/public/UnicodeApi';
-import { AddonManager } from 'common/public/AddonManager';
-import { BufferNamespaceApi } from 'common/public/BufferNamespaceApi';
-import { ITerminalOptions } from 'common/Types';
-
-/**
- * The set of options that only have an effect when set in the Terminal constructor.
- */
-const CONSTRUCTOR_ONLY_OPTIONS = ['cols', 'rows'];
-
-export class Terminal implements ITerminalApi {
- private _core: ITerminal;
- private _addonManager: AddonManager;
- private _parser: IParser | undefined;
- private _buffer: BufferNamespaceApi | undefined;
- private _publicOptions: ITerminalOptions;
-
- constructor(options?: ITerminalOptions) {
- this._core = new TerminalCore(options);
- this._addonManager = new AddonManager();
-
- this._publicOptions = { ... this._core.options };
- const getter = (propName: string): any => {
- return this._core.options[propName];
- };
- const setter = (propName: string, value: any): void => {
- this._checkReadonlyOptions(propName);
- this._core.options[propName] = value;
- };
-
- for (const propName in this._core.options) {
- const desc = {
- get: getter.bind(this, propName),
- set: setter.bind(this, propName)
- };
- Object.defineProperty(this._publicOptions, propName, desc);
- }
- }
-
- private _checkReadonlyOptions(propName: string): void {
- // Throw an error if any constructor only option is modified
- // from terminal.options
- // Modifications from anywhere else are allowed
- if (CONSTRUCTOR_ONLY_OPTIONS.includes(propName)) {
- throw new Error(`Option "${propName}" can only be set in the constructor`);
- }
- }
-
- private _checkProposedApi(): void {
- if (!this._core.optionsService.rawOptions.allowProposedApi) {
- throw new Error('You must set the allowProposedApi option to true to use proposed API');
- }
- }
-
- public get onBell(): IEvent<void> { return this._core.onBell; }
- public get onBinary(): IEvent<string> { return this._core.onBinary; }
- public get onCursorMove(): IEvent<void> { return this._core.onCursorMove; }
- public get onData(): IEvent<string> { return this._core.onData; }
- public get onKey(): IEvent<{ key: string, domEvent: KeyboardEvent }> { return this._core.onKey; }
- public get onLineFeed(): IEvent<void> { return this._core.onLineFeed; }
- public get onRender(): IEvent<{ start: number, end: number }> { return this._core.onRender; }
- public get onResize(): IEvent<{ cols: number, rows: number }> { return this._core.onResize; }
- public get onScroll(): IEvent<number> { return this._core.onScroll; }
- public get onSelectionChange(): IEvent<void> { return this._core.onSelectionChange; }
- public get onTitleChange(): IEvent<string> { return this._core.onTitleChange; }
-
- public get element(): HTMLElement | undefined { return this._core.element; }
- public get parser(): IParser {
- this._checkProposedApi();
- if (!this._parser) {
- this._parser = new ParserApi(this._core);
- }
- return this._parser;
- }
- public get unicode(): IUnicodeHandling {
- this._checkProposedApi();
- return new UnicodeApi(this._core);
- }
- public get textarea(): HTMLTextAreaElement | undefined { return this._core.textarea; }
- public get rows(): number { return this._core.rows; }
- public get cols(): number { return this._core.cols; }
- public get buffer(): IBufferNamespaceApi {
- this._checkProposedApi();
- if (!this._buffer) {
- this._buffer = new BufferNamespaceApi(this._core);
- }
- return this._buffer;
- }
- public get markers(): ReadonlyArray<IMarker> {
- this._checkProposedApi();
- return this._core.markers;
- }
- public get modes(): IModes {
- const m = this._core.coreService.decPrivateModes;
- let mouseTrackingMode: 'none' | 'x10' | 'vt200' | 'drag' | 'any' = 'none';
- switch (this._core.coreMouseService.activeProtocol) {
- case 'X10': mouseTrackingMode = 'x10'; break;
- case 'VT200': mouseTrackingMode = 'vt200'; break;
- case 'DRAG': mouseTrackingMode = 'drag'; break;
- case 'ANY': mouseTrackingMode = 'any'; break;
- }
- return {
- applicationCursorKeysMode: m.applicationCursorKeys,
- applicationKeypadMode: m.applicationKeypad,
- bracketedPasteMode: m.bracketedPasteMode,
- insertMode: this._core.coreService.modes.insertMode,
- mouseTrackingMode: mouseTrackingMode,
- originMode: m.origin,
- reverseWraparoundMode: m.reverseWraparound,
- sendFocusMode: m.sendFocus,
- wraparoundMode: m.wraparound
- };
- }
- public get options(): ITerminalOptions {
- return this._publicOptions;
- }
- public set options(options: ITerminalOptions) {
- for (const propName in options) {
- this._publicOptions[propName] = options[propName];
- }
- }
- public blur(): void {
- this._core.blur();
- }
- public focus(): void {
- this._core.focus();
- }
- public resize(columns: number, rows: number): void {
- this._verifyIntegers(columns, rows);
- this._core.resize(columns, rows);
- }
- public open(parent: HTMLElement): void {
- this._core.open(parent);
- }
- public attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void {
- this._core.attachCustomKeyEventHandler(customKeyEventHandler);
- }
- public registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => void, options?: ILinkMatcherOptions): number {
- this._checkProposedApi();
- return this._core.registerLinkMatcher(regex, handler, options);
- }
- public deregisterLinkMatcher(matcherId: number): void {
- this._checkProposedApi();
- this._core.deregisterLinkMatcher(matcherId);
- }
- public registerLinkProvider(linkProvider: ILinkProvider): IDisposable {
- this._checkProposedApi();
- return this._core.registerLinkProvider(linkProvider);
- }
- public registerCharacterJoiner(handler: (text: string) => [number, number][]): number {
- this._checkProposedApi();
- return this._core.registerCharacterJoiner(handler);
- }
- public deregisterCharacterJoiner(joinerId: number): void {
- this._checkProposedApi();
- this._core.deregisterCharacterJoiner(joinerId);
- }
- public registerMarker(cursorYOffset: number = 0): IMarker | undefined {
- this._checkProposedApi();
- this._verifyIntegers(cursorYOffset);
- return this._core.addMarker(cursorYOffset);
- }
- public registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined {
- this._checkProposedApi();
- this._verifyPositiveIntegers(decorationOptions.x ?? 0, decorationOptions.width ?? 0, decorationOptions.height ?? 0);
- return this._core.registerDecoration(decorationOptions);
- }
- public addMarker(cursorYOffset: number): IMarker | undefined {
- return this.registerMarker(cursorYOffset);
- }
- public hasSelection(): boolean {
- return this._core.hasSelection();
- }
- public select(column: number, row: number, length: number): void {
- this._verifyIntegers(column, row, length);
- this._core.select(column, row, length);
- }
- public getSelection(): string {
- return this._core.getSelection();
- }
- public getSelectionPosition(): ISelectionPosition | undefined {
- return this._core.getSelectionPosition();
- }
- public clearSelection(): void {
- this._core.clearSelection();
- }
- public selectAll(): void {
- this._core.selectAll();
- }
- public selectLines(start: number, end: number): void {
- this._verifyIntegers(start, end);
- this._core.selectLines(start, end);
- }
- public dispose(): void {
- this._addonManager.dispose();
- this._core.dispose();
- }
- public scrollLines(amount: number): void {
- this._verifyIntegers(amount);
- this._core.scrollLines(amount);
- }
- public scrollPages(pageCount: number): void {
- this._verifyIntegers(pageCount);
- this._core.scrollPages(pageCount);
- }
- public scrollToTop(): void {
- this._core.scrollToTop();
- }
- public scrollToBottom(): void {
- this._core.scrollToBottom();
- }
- public scrollToLine(line: number): void {
- this._verifyIntegers(line);
- this._core.scrollToLine(line);
- }
- public clear(): void {
- this._core.clear();
- }
- public write(data: string | Uint8Array, callback?: () => void): void {
- this._core.write(data, callback);
- }
- public writeUtf8(data: Uint8Array, callback?: () => void): void {
- this._core.write(data, callback);
- }
- public writeln(data: string | Uint8Array, callback?: () => void): void {
- this._core.write(data);
- this._core.write('\r\n', callback);
- }
- public paste(data: string): void {
- this._core.paste(data);
- }
- public getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string;
- public getOption(key: 'allowTransparency' | 'altClickMovesCursor' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'visualBell'): boolean;
- public getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number;
- public getOption(key: 'fontWeight' | 'fontWeightBold'): FontWeight;
- public getOption(key: string): any;
- public getOption(key: any): any {
- return this._core.optionsService.getOption(key);
- }
- public setOption(key: 'bellSound' | 'fontFamily' | 'termName' | 'wordSeparator', value: string): void;
- public setOption(key: 'fontWeight' | 'fontWeightBold', value: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | number): void;
- public setOption(key: 'logLevel', value: 'debug' | 'info' | 'warn' | 'error' | 'off'): void;
- public setOption(key: 'bellStyle', value: 'none' | 'visual' | 'sound' | 'both'): void;
- public setOption(key: 'cursorStyle', value: 'block' | 'underline' | 'bar'): void;
- public setOption(key: 'allowTransparency' | 'altClickMovesCursor' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'visualBell', value: boolean): void;
- public setOption(key: 'fontSize' | 'letterSpacing' | 'lineHeight' | 'tabStopWidth' | 'scrollback', value: number): void;
- public setOption(key: 'theme', value: ITheme): void;
- public setOption(key: 'cols' | 'rows', value: number): void;
- public setOption(key: string, value: any): void;
- public setOption(key: any, value: any): void {
- this._checkReadonlyOptions(key);
- this._core.optionsService.setOption(key, value);
- }
- public refresh(start: number, end: number): void {
- this._verifyIntegers(start, end);
- this._core.refresh(start, end);
- }
- public reset(): void {
- this._core.reset();
- }
- public clearTextureAtlas(): void {
- this._core.clearTextureAtlas();
- }
- public loadAddon(addon: ITerminalAddon): void {
- return this._addonManager.loadAddon(this, addon);
- }
- public static get strings(): ILocalizableStrings {
- return Strings;
- }
-
- private _verifyIntegers(...values: number[]): void {
- for (const value of values) {
- if (value === Infinity || isNaN(value) || value % 1 !== 0) {
- throw new Error('This API only accepts integers');
- }
- }
- }
-
- private _verifyPositiveIntegers(...values: number[]): void {
- for (const value of values) {
- if (value && (value === Infinity || isNaN(value) || value % 1 !== 0 || value < 0)) {
- throw new Error('This API only accepts positive integers');
- }
- }
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/BaseRenderLayer.ts b/node_modules/xterm/src/browser/renderer/BaseRenderLayer.ts
deleted file mode 100644
index 629e943..0000000
--- a/node_modules/xterm/src/browser/renderer/BaseRenderLayer.ts
+++ /dev/null
@@ -1,513 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderDimensions, IRenderLayer } from 'browser/renderer/Types';
-import { ICellData } from 'common/Types';
-import { DEFAULT_COLOR, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_CODE, Attributes } from 'common/buffer/Constants';
-import { IGlyphIdentifier } from 'browser/renderer/atlas/Types';
-import { DIM_OPACITY, INVERTED_DEFAULT_COLOR, TEXT_BASELINE } from 'browser/renderer/atlas/Constants';
-import { BaseCharAtlas } from 'browser/renderer/atlas/BaseCharAtlas';
-import { acquireCharAtlas } from 'browser/renderer/atlas/CharAtlasCache';
-import { AttributeData } from 'common/buffer/AttributeData';
-import { IColorSet, IColor } from 'browser/Types';
-import { CellData } from 'common/buffer/CellData';
-import { IBufferService, IOptionsService } from 'common/services/Services';
-import { throwIfFalsy } from 'browser/renderer/RendererUtils';
-import { channels, color, rgba } from 'browser/Color';
-import { removeElementFromParent } from 'browser/Dom';
-import { tryDrawCustomChar } from 'browser/renderer/CustomGlyphs';
-
-export abstract class BaseRenderLayer implements IRenderLayer {
- private _canvas: HTMLCanvasElement;
- protected _ctx!: CanvasRenderingContext2D;
- private _scaledCharWidth: number = 0;
- private _scaledCharHeight: number = 0;
- private _scaledCellWidth: number = 0;
- private _scaledCellHeight: number = 0;
- private _scaledCharLeft: number = 0;
- private _scaledCharTop: number = 0;
-
- protected _charAtlas: BaseCharAtlas | undefined;
-
- /**
- * An object that's reused when drawing glyphs in order to reduce GC.
- */
- private _currentGlyphIdentifier: IGlyphIdentifier = {
- chars: '',
- code: 0,
- bg: 0,
- fg: 0,
- bold: false,
- dim: false,
- italic: false
- };
-
- constructor(
- private _container: HTMLElement,
- id: string,
- zIndex: number,
- private _alpha: boolean,
- protected _colors: IColorSet,
- private _rendererId: number,
- protected readonly _bufferService: IBufferService,
- protected readonly _optionsService: IOptionsService
- ) {
- this._canvas = document.createElement('canvas');
- this._canvas.classList.add(`xterm-${id}-layer`);
- this._canvas.style.zIndex = zIndex.toString();
- this._initCanvas();
- this._container.appendChild(this._canvas);
- }
-
- public dispose(): void {
- removeElementFromParent(this._canvas);
- this._charAtlas?.dispose();
- }
-
- private _initCanvas(): void {
- this._ctx = throwIfFalsy(this._canvas.getContext('2d', { alpha: this._alpha }));
- // Draw the background if this is an opaque layer
- if (!this._alpha) {
- this._clearAll();
- }
- }
-
- public onOptionsChanged(): void {}
- public onBlur(): void {}
- public onFocus(): void {}
- public onCursorMove(): void {}
- public onGridChanged(startRow: number, endRow: number): void {}
- public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean = false): void {}
-
- public setColors(colorSet: IColorSet): void {
- this._refreshCharAtlas(colorSet);
- }
-
- protected _setTransparency(alpha: boolean): void {
- // Do nothing when alpha doesn't change
- if (alpha === this._alpha) {
- return;
- }
-
- // Create new canvas and replace old one
- const oldCanvas = this._canvas;
- this._alpha = alpha;
- // Cloning preserves properties
- this._canvas = this._canvas.cloneNode() as HTMLCanvasElement;
- this._initCanvas();
- this._container.replaceChild(this._canvas, oldCanvas);
-
- // Regenerate char atlas and force a full redraw
- this._refreshCharAtlas(this._colors);
- this.onGridChanged(0, this._bufferService.rows - 1);
- }
-
- /**
- * Refreshes the char atlas, aquiring a new one if necessary.
- * @param colorSet The color set to use for the char atlas.
- */
- private _refreshCharAtlas(colorSet: IColorSet): void {
- if (this._scaledCharWidth <= 0 && this._scaledCharHeight <= 0) {
- return;
- }
- this._charAtlas = acquireCharAtlas(this._optionsService.rawOptions, this._rendererId, colorSet, this._scaledCharWidth, this._scaledCharHeight);
- this._charAtlas.warmUp();
- }
-
- public resize(dim: IRenderDimensions): void {
- this._scaledCellWidth = dim.scaledCellWidth;
- this._scaledCellHeight = dim.scaledCellHeight;
- this._scaledCharWidth = dim.scaledCharWidth;
- this._scaledCharHeight = dim.scaledCharHeight;
- this._scaledCharLeft = dim.scaledCharLeft;
- this._scaledCharTop = dim.scaledCharTop;
- this._canvas.width = dim.scaledCanvasWidth;
- this._canvas.height = dim.scaledCanvasHeight;
- this._canvas.style.width = `${dim.canvasWidth}px`;
- this._canvas.style.height = `${dim.canvasHeight}px`;
-
- // Draw the background if this is an opaque layer
- if (!this._alpha) {
- this._clearAll();
- }
-
- this._refreshCharAtlas(this._colors);
- }
-
- public abstract reset(): void;
-
- public clearTextureAtlas(): void {
- this._charAtlas?.clear();
- }
-
- /**
- * Fills 1+ cells completely. This uses the existing fillStyle on the context.
- * @param x The column to start at.
- * @param y The row to start at
- * @param width The number of columns to fill.
- * @param height The number of rows to fill.
- */
- protected _fillCells(x: number, y: number, width: number, height: number): void {
- this._ctx.fillRect(
- x * this._scaledCellWidth,
- y * this._scaledCellHeight,
- width * this._scaledCellWidth,
- height * this._scaledCellHeight);
- }
-
- /**
- * Fills a 1px line (2px on HDPI) at the middle of the cell. This uses the
- * existing fillStyle on the context.
- * @param x The column to fill.
- * @param y The row to fill.
- */
- protected _fillMiddleLineAtCells(x: number, y: number, width: number = 1): void {
- const cellOffset = Math.ceil(this._scaledCellHeight * 0.5);
- this._ctx.fillRect(
- x * this._scaledCellWidth,
- (y + 1) * this._scaledCellHeight - cellOffset - window.devicePixelRatio,
- width * this._scaledCellWidth,
- window.devicePixelRatio);
- }
-
- /**
- * Fills a 1px line (2px on HDPI) at the bottom of the cell. This uses the
- * existing fillStyle on the context.
- * @param x The column to fill.
- * @param y The row to fill.
- */
- protected _fillBottomLineAtCells(x: number, y: number, width: number = 1): void {
- this._ctx.fillRect(
- x * this._scaledCellWidth,
- (y + 1) * this._scaledCellHeight - window.devicePixelRatio - 1 /* Ensure it's drawn within the cell */,
- width * this._scaledCellWidth,
- window.devicePixelRatio);
- }
-
- /**
- * Fills a 1px line (2px on HDPI) at the left of the cell. This uses the
- * existing fillStyle on the context.
- * @param x The column to fill.
- * @param y The row to fill.
- */
- protected _fillLeftLineAtCell(x: number, y: number, width: number): void {
- this._ctx.fillRect(
- x * this._scaledCellWidth,
- y * this._scaledCellHeight,
- window.devicePixelRatio * width,
- this._scaledCellHeight);
- }
-
- /**
- * Strokes a 1px rectangle (2px on HDPI) around a cell. This uses the existing
- * strokeStyle on the context.
- * @param x The column to fill.
- * @param y The row to fill.
- */
- protected _strokeRectAtCell(x: number, y: number, width: number, height: number): void {
- this._ctx.lineWidth = window.devicePixelRatio;
- this._ctx.strokeRect(
- x * this._scaledCellWidth + window.devicePixelRatio / 2,
- y * this._scaledCellHeight + (window.devicePixelRatio / 2),
- width * this._scaledCellWidth - window.devicePixelRatio,
- (height * this._scaledCellHeight) - window.devicePixelRatio);
- }
-
- /**
- * Clears the entire canvas.
- */
- protected _clearAll(): void {
- if (this._alpha) {
- this._ctx.clearRect(0, 0, this._canvas.width, this._canvas.height);
- } else {
- this._ctx.fillStyle = this._colors.background.css;
- this._ctx.fillRect(0, 0, this._canvas.width, this._canvas.height);
- }
- }
-
- /**
- * Clears 1+ cells completely.
- * @param x The column to start at.
- * @param y The row to start at.
- * @param width The number of columns to clear.
- * @param height The number of rows to clear.
- */
- protected _clearCells(x: number, y: number, width: number, height: number): void {
- if (this._alpha) {
- this._ctx.clearRect(
- x * this._scaledCellWidth,
- y * this._scaledCellHeight,
- width * this._scaledCellWidth,
- height * this._scaledCellHeight);
- } else {
- this._ctx.fillStyle = this._colors.background.css;
- this._ctx.fillRect(
- x * this._scaledCellWidth,
- y * this._scaledCellHeight,
- width * this._scaledCellWidth,
- height * this._scaledCellHeight);
- }
- }
-
- /**
- * Draws a truecolor character at the cell. The character will be clipped to
- * ensure that it fits with the cell, including the cell to the right if it's
- * a wide character. This uses the existing fillStyle on the context.
- * @param cell The cell data for the character to draw.
- * @param x The column to draw at.
- * @param y The row to draw at.
- * @param color The color of the character.
- */
- protected _fillCharTrueColor(cell: CellData, x: number, y: number): void {
- this._ctx.font = this._getFont(false, false);
- this._ctx.textBaseline = TEXT_BASELINE;
- this._clipRow(y);
-
- // Draw custom characters if applicable
- let drawSuccess = false;
- if (this._optionsService.rawOptions.customGlyphs !== false) {
- drawSuccess = tryDrawCustomChar(this._ctx, cell.getChars(), x * this._scaledCellWidth, y * this._scaledCellHeight, this._scaledCellWidth, this._scaledCellHeight);
- }
-
- // Draw the character
- if (!drawSuccess) {
- this._ctx.fillText(
- cell.getChars(),
- x * this._scaledCellWidth + this._scaledCharLeft,
- y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight);
- }
- }
-
- /**
- * Draws one or more characters at a cell. If possible this will draw using
- * the character atlas to reduce draw time.
- * @param chars The character or characters.
- * @param code The character code.
- * @param width The width of the characters.
- * @param x The column to draw at.
- * @param y The row to draw at.
- * @param fg The foreground color, in the format stored within the attributes.
- * @param bg The background color, in the format stored within the attributes.
- * This is used to validate whether a cached image can be used.
- * @param bold Whether the text is bold.
- */
- protected _drawChars(cell: ICellData, x: number, y: number): void {
- const contrastColor = this._getContrastColor(cell);
-
- // skip cache right away if we draw in RGB
- // Note: to avoid bad runtime JoinedCellData will be skipped
- // in the cache handler itself (atlasDidDraw == false) and
- // fall through to uncached later down below
- if (contrastColor || cell.isFgRGB() || cell.isBgRGB()) {
- this._drawUncachedChars(cell, x, y, contrastColor);
- return;
- }
-
- let fg;
- let bg;
- if (cell.isInverse()) {
- fg = (cell.isBgDefault()) ? INVERTED_DEFAULT_COLOR : cell.getBgColor();
- bg = (cell.isFgDefault()) ? INVERTED_DEFAULT_COLOR : cell.getFgColor();
- } else {
- bg = (cell.isBgDefault()) ? DEFAULT_COLOR : cell.getBgColor();
- fg = (cell.isFgDefault()) ? DEFAULT_COLOR : cell.getFgColor();
- }
-
- const drawInBrightColor = this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && fg < 8;
-
- fg += drawInBrightColor ? 8 : 0;
- this._currentGlyphIdentifier.chars = cell.getChars() || WHITESPACE_CELL_CHAR;
- this._currentGlyphIdentifier.code = cell.getCode() || WHITESPACE_CELL_CODE;
- this._currentGlyphIdentifier.bg = bg;
- this._currentGlyphIdentifier.fg = fg;
- this._currentGlyphIdentifier.bold = !!cell.isBold();
- this._currentGlyphIdentifier.dim = !!cell.isDim();
- this._currentGlyphIdentifier.italic = !!cell.isItalic();
- const atlasDidDraw = this._charAtlas?.draw(this._ctx, this._currentGlyphIdentifier, x * this._scaledCellWidth + this._scaledCharLeft, y * this._scaledCellHeight + this._scaledCharTop);
-
- if (!atlasDidDraw) {
- this._drawUncachedChars(cell, x, y);
- }
- }
-
- /**
- * Draws one or more characters at one or more cells. The character(s) will be
- * clipped to ensure that they fit with the cell(s), including the cell to the
- * right if the last character is a wide character.
- * @param chars The character.
- * @param width The width of the character.
- * @param fg The foreground color, in the format stored within the attributes.
- * @param x The column to draw at.
- * @param y The row to draw at.
- */
- private _drawUncachedChars(cell: ICellData, x: number, y: number, fgOverride?: IColor): void {
- this._ctx.save();
- this._ctx.font = this._getFont(!!cell.isBold(), !!cell.isItalic());
- this._ctx.textBaseline = TEXT_BASELINE;
-
- if (cell.isInverse()) {
- if (fgOverride) {
- this._ctx.fillStyle = fgOverride.css;
- } else if (cell.isBgDefault()) {
- this._ctx.fillStyle = color.opaque(this._colors.background).css;
- } else if (cell.isBgRGB()) {
- this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getBgColor()).join(',')})`;
- } else {
- let bg = cell.getBgColor();
- if (this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && bg < 8) {
- bg += 8;
- }
- this._ctx.fillStyle = this._colors.ansi[bg].css;
- }
- } else {
- if (fgOverride) {
- this._ctx.fillStyle = fgOverride.css;
- } else if (cell.isFgDefault()) {
- this._ctx.fillStyle = this._colors.foreground.css;
- } else if (cell.isFgRGB()) {
- this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getFgColor()).join(',')})`;
- } else {
- let fg = cell.getFgColor();
- if (this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && fg < 8) {
- fg += 8;
- }
- this._ctx.fillStyle = this._colors.ansi[fg].css;
- }
- }
-
- this._clipRow(y);
-
- // Apply alpha to dim the character
- if (cell.isDim()) {
- this._ctx.globalAlpha = DIM_OPACITY;
- }
-
- // Draw custom characters if applicable
- let drawSuccess = false;
- if (this._optionsService.rawOptions.customGlyphs !== false) {
- drawSuccess = tryDrawCustomChar(this._ctx, cell.getChars(), x * this._scaledCellWidth, y * this._scaledCellHeight, this._scaledCellWidth, this._scaledCellHeight);
- }
-
- // Draw the character
- if (!drawSuccess) {
- this._ctx.fillText(
- cell.getChars(),
- x * this._scaledCellWidth + this._scaledCharLeft,
- y * this._scaledCellHeight + this._scaledCharTop + this._scaledCharHeight);
- }
-
- this._ctx.restore();
- }
-
-
- /**
- * Clips a row to ensure no pixels will be drawn outside the cells in the row.
- * @param y The row to clip.
- */
- private _clipRow(y: number): void {
- this._ctx.beginPath();
- this._ctx.rect(
- 0,
- y * this._scaledCellHeight,
- this._bufferService.cols * this._scaledCellWidth,
- this._scaledCellHeight);
- this._ctx.clip();
- }
-
- /**
- * Gets the current font.
- * @param isBold If we should use the bold fontWeight.
- */
- protected _getFont(isBold: boolean, isItalic: boolean): string {
- const fontWeight = isBold ? this._optionsService.rawOptions.fontWeightBold : this._optionsService.rawOptions.fontWeight;
- const fontStyle = isItalic ? 'italic' : '';
-
- return `${fontStyle} ${fontWeight} ${this._optionsService.rawOptions.fontSize * window.devicePixelRatio}px ${this._optionsService.rawOptions.fontFamily}`;
- }
-
- private _getContrastColor(cell: CellData): IColor | undefined {
- if (this._optionsService.rawOptions.minimumContrastRatio === 1) {
- return undefined;
- }
-
- // Try get from cache first
- const adjustedColor = this._colors.contrastCache.getColor(cell.bg, cell.fg);
- if (adjustedColor !== undefined) {
- return adjustedColor || undefined;
- }
-
- let fgColor = cell.getFgColor();
- let fgColorMode = cell.getFgColorMode();
- let bgColor = cell.getBgColor();
- let bgColorMode = cell.getBgColorMode();
- const isInverse = !!cell.isInverse();
- const isBold = !!cell.isInverse();
- if (isInverse) {
- const temp = fgColor;
- fgColor = bgColor;
- bgColor = temp;
- const temp2 = fgColorMode;
- fgColorMode = bgColorMode;
- bgColorMode = temp2;
- }
-
- const bgRgba = this._resolveBackgroundRgba(bgColorMode, bgColor, isInverse);
- const fgRgba = this._resolveForegroundRgba(fgColorMode, fgColor, isInverse, isBold);
- const result = rgba.ensureContrastRatio(bgRgba, fgRgba, this._optionsService.rawOptions.minimumContrastRatio);
-
- if (!result) {
- this._colors.contrastCache.setColor(cell.bg, cell.fg, null);
- return undefined;
- }
-
- const color: IColor = {
- css: channels.toCss(
- (result >> 24) & 0xFF,
- (result >> 16) & 0xFF,
- (result >> 8) & 0xFF
- ),
- rgba: result
- };
- this._colors.contrastCache.setColor(cell.bg, cell.fg, color);
-
- return color;
- }
-
- private _resolveBackgroundRgba(bgColorMode: number, bgColor: number, inverse: boolean): number {
- switch (bgColorMode) {
- case Attributes.CM_P16:
- case Attributes.CM_P256:
- return this._colors.ansi[bgColor].rgba;
- case Attributes.CM_RGB:
- return bgColor << 8;
- case Attributes.CM_DEFAULT:
- default:
- if (inverse) {
- return this._colors.foreground.rgba;
- }
- return this._colors.background.rgba;
- }
- }
-
- private _resolveForegroundRgba(fgColorMode: number, fgColor: number, inverse: boolean, bold: boolean): number {
- switch (fgColorMode) {
- case Attributes.CM_P16:
- case Attributes.CM_P256:
- if (this._optionsService.rawOptions.drawBoldTextInBrightColors && bold && fgColor < 8) {
- fgColor += 8;
- }
- return this._colors.ansi[fgColor].rgba;
- case Attributes.CM_RGB:
- return fgColor << 8;
- case Attributes.CM_DEFAULT:
- default:
- if (inverse) {
- return this._colors.background.rgba;
- }
- return this._colors.foreground.rgba;
- }
- }
-}
-
diff --git a/node_modules/xterm/src/browser/renderer/CursorRenderLayer.ts b/node_modules/xterm/src/browser/renderer/CursorRenderLayer.ts
deleted file mode 100644
index ea419cb..0000000
--- a/node_modules/xterm/src/browser/renderer/CursorRenderLayer.ts
+++ /dev/null
@@ -1,377 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderDimensions, IRequestRedrawEvent } from 'browser/renderer/Types';
-import { BaseRenderLayer } from 'browser/renderer/BaseRenderLayer';
-import { ICellData } from 'common/Types';
-import { CellData } from 'common/buffer/CellData';
-import { IColorSet } from 'browser/Types';
-import { IBufferService, IOptionsService, ICoreService } from 'common/services/Services';
-import { IEventEmitter } from 'common/EventEmitter';
-import { ICoreBrowserService } from 'browser/services/Services';
-
-interface ICursorState {
- x: number;
- y: number;
- isFocused: boolean;
- style: string;
- width: number;
-}
-
-/**
- * The time between cursor blinks.
- */
-const BLINK_INTERVAL = 600;
-
-export class CursorRenderLayer extends BaseRenderLayer {
- private _state: ICursorState;
- private _cursorRenderers: {[key: string]: (x: number, y: number, cell: ICellData) => void};
- private _cursorBlinkStateManager: CursorBlinkStateManager | undefined;
- private _cell: ICellData = new CellData();
-
- constructor(
- container: HTMLElement,
- zIndex: number,
- colors: IColorSet,
- rendererId: number,
- private _onRequestRedraw: IEventEmitter<IRequestRedrawEvent>,
- @IBufferService bufferService: IBufferService,
- @IOptionsService optionsService: IOptionsService,
- @ICoreService private readonly _coreService: ICoreService,
- @ICoreBrowserService private readonly _coreBrowserService: ICoreBrowserService
- ) {
- super(container, 'cursor', zIndex, true, colors, rendererId, bufferService, optionsService);
- this._state = {
- x: 0,
- y: 0,
- isFocused: false,
- style: '',
- width: 0
- };
- this._cursorRenderers = {
- 'bar': this._renderBarCursor.bind(this),
- 'block': this._renderBlockCursor.bind(this),
- 'underline': this._renderUnderlineCursor.bind(this)
- };
- }
-
- public dispose(): void {
- if (this._cursorBlinkStateManager) {
- this._cursorBlinkStateManager.dispose();
- this._cursorBlinkStateManager = undefined;
- }
- super.dispose();
- }
-
- public resize(dim: IRenderDimensions): void {
- super.resize(dim);
- // Resizing the canvas discards the contents of the canvas so clear state
- this._state = {
- x: 0,
- y: 0,
- isFocused: false,
- style: '',
- width: 0
- };
- }
-
- public reset(): void {
- this._clearCursor();
- this._cursorBlinkStateManager?.restartBlinkAnimation();
- this.onOptionsChanged();
- }
-
- public onBlur(): void {
- this._cursorBlinkStateManager?.pause();
- this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });
- }
-
- public onFocus(): void {
- this._cursorBlinkStateManager?.resume();
- this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });
- }
-
- public onOptionsChanged(): void {
- if (this._optionsService.rawOptions.cursorBlink) {
- if (!this._cursorBlinkStateManager) {
- this._cursorBlinkStateManager = new CursorBlinkStateManager(this._coreBrowserService.isFocused, () => {
- this._render(true);
- });
- }
- } else {
- this._cursorBlinkStateManager?.dispose();
- this._cursorBlinkStateManager = undefined;
- }
- // Request a refresh from the terminal as management of rendering is being
- // moved back to the terminal
- this._onRequestRedraw.fire({ start: this._bufferService.buffer.y, end: this._bufferService.buffer.y });
- }
-
- public onCursorMove(): void {
- this._cursorBlinkStateManager?.restartBlinkAnimation();
- }
-
- public onGridChanged(startRow: number, endRow: number): void {
- if (!this._cursorBlinkStateManager || this._cursorBlinkStateManager.isPaused) {
- this._render(false);
- } else {
- this._cursorBlinkStateManager.restartBlinkAnimation();
- }
- }
-
- private _render(triggeredByAnimationFrame: boolean): void {
- // Don't draw the cursor if it's hidden
- if (!this._coreService.isCursorInitialized || this._coreService.isCursorHidden) {
- this._clearCursor();
- return;
- }
-
- const cursorY = this._bufferService.buffer.ybase + this._bufferService.buffer.y;
- const viewportRelativeCursorY = cursorY - this._bufferService.buffer.ydisp;
-
- // Don't draw the cursor if it's off-screen
- if (viewportRelativeCursorY < 0 || viewportRelativeCursorY >= this._bufferService.rows) {
- this._clearCursor();
- return;
- }
-
- // in case cursor.x == cols adjust visual cursor to cols - 1
- const cursorX = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);
- this._bufferService.buffer.lines.get(cursorY)!.loadCell(cursorX, this._cell);
- if (this._cell.content === undefined) {
- return;
- }
-
- if (!this._coreBrowserService.isFocused) {
- this._clearCursor();
- this._ctx.save();
- this._ctx.fillStyle = this._colors.cursor.css;
- const cursorStyle = this._optionsService.rawOptions.cursorStyle;
- if (cursorStyle && cursorStyle !== 'block') {
- this._cursorRenderers[cursorStyle](cursorX, viewportRelativeCursorY, this._cell);
- } else {
- this._renderBlurCursor(cursorX, viewportRelativeCursorY, this._cell);
- }
- this._ctx.restore();
- this._state.x = cursorX;
- this._state.y = viewportRelativeCursorY;
- this._state.isFocused = false;
- this._state.style = cursorStyle;
- this._state.width = this._cell.getWidth();
- return;
- }
-
- // Don't draw the cursor if it's blinking
- if (this._cursorBlinkStateManager && !this._cursorBlinkStateManager.isCursorVisible) {
- this._clearCursor();
- return;
- }
-
- if (this._state) {
- // The cursor is already in the correct spot, don't redraw
- if (this._state.x === cursorX &&
- this._state.y === viewportRelativeCursorY &&
- this._state.isFocused === this._coreBrowserService.isFocused &&
- this._state.style === this._optionsService.rawOptions.cursorStyle &&
- this._state.width === this._cell.getWidth()) {
- return;
- }
- this._clearCursor();
- }
-
- this._ctx.save();
- this._cursorRenderers[this._optionsService.rawOptions.cursorStyle || 'block'](cursorX, viewportRelativeCursorY, this._cell);
- this._ctx.restore();
-
- this._state.x = cursorX;
- this._state.y = viewportRelativeCursorY;
- this._state.isFocused = false;
- this._state.style = this._optionsService.rawOptions.cursorStyle;
- this._state.width = this._cell.getWidth();
- }
-
- private _clearCursor(): void {
- if (this._state) {
- // Avoid potential rounding errors when device pixel ratio is less than 1
- if (window.devicePixelRatio < 1) {
- this._clearAll();
- } else {
- this._clearCells(this._state.x, this._state.y, this._state.width, 1);
- }
- this._state = {
- x: 0,
- y: 0,
- isFocused: false,
- style: '',
- width: 0
- };
- }
- }
-
- private _renderBarCursor(x: number, y: number, cell: ICellData): void {
- this._ctx.save();
- this._ctx.fillStyle = this._colors.cursor.css;
- this._fillLeftLineAtCell(x, y, this._optionsService.rawOptions.cursorWidth);
- this._ctx.restore();
- }
-
- private _renderBlockCursor(x: number, y: number, cell: ICellData): void {
- this._ctx.save();
- this._ctx.fillStyle = this._colors.cursor.css;
- this._fillCells(x, y, cell.getWidth(), 1);
- this._ctx.fillStyle = this._colors.cursorAccent.css;
- this._fillCharTrueColor(cell, x, y);
- this._ctx.restore();
- }
-
- private _renderUnderlineCursor(x: number, y: number, cell: ICellData): void {
- this._ctx.save();
- this._ctx.fillStyle = this._colors.cursor.css;
- this._fillBottomLineAtCells(x, y);
- this._ctx.restore();
- }
-
- private _renderBlurCursor(x: number, y: number, cell: ICellData): void {
- this._ctx.save();
- this._ctx.strokeStyle = this._colors.cursor.css;
- this._strokeRectAtCell(x, y, cell.getWidth(), 1);
- this._ctx.restore();
- }
-}
-
-class CursorBlinkStateManager {
- public isCursorVisible: boolean;
-
- private _animationFrame: number | undefined;
- private _blinkStartTimeout: number | undefined;
- private _blinkInterval: number | undefined;
-
- /**
- * The time at which the animation frame was restarted, this is used on the
- * next render to restart the timers so they don't need to restart the timers
- * multiple times over a short period.
- */
- private _animationTimeRestarted: number | undefined;
-
- constructor(
- isFocused: boolean,
- private _renderCallback: () => void
- ) {
- this.isCursorVisible = true;
- if (isFocused) {
- this._restartInterval();
- }
- }
-
- public get isPaused(): boolean { return !(this._blinkStartTimeout || this._blinkInterval); }
-
- public dispose(): void {
- if (this._blinkInterval) {
- window.clearInterval(this._blinkInterval);
- this._blinkInterval = undefined;
- }
- if (this._blinkStartTimeout) {
- window.clearTimeout(this._blinkStartTimeout);
- this._blinkStartTimeout = undefined;
- }
- if (this._animationFrame) {
- window.cancelAnimationFrame(this._animationFrame);
- this._animationFrame = undefined;
- }
- }
-
- public restartBlinkAnimation(): void {
- if (this.isPaused) {
- return;
- }
- // Save a timestamp so that the restart can be done on the next interval
- this._animationTimeRestarted = Date.now();
- // Force a cursor render to ensure it's visible and in the correct position
- this.isCursorVisible = true;
- if (!this._animationFrame) {
- this._animationFrame = window.requestAnimationFrame(() => {
- this._renderCallback();
- this._animationFrame = undefined;
- });
- }
- }
-
- private _restartInterval(timeToStart: number = BLINK_INTERVAL): void {
- // Clear any existing interval
- if (this._blinkInterval) {
- window.clearInterval(this._blinkInterval);
- this._blinkInterval = undefined;
- }
-
- // Setup the initial timeout which will hide the cursor, this is done before
- // the regular interval is setup in order to support restarting the blink
- // animation in a lightweight way (without thrashing clearInterval and
- // setInterval).
- this._blinkStartTimeout = window.setTimeout(() => {
- // Check if another animation restart was requested while this was being
- // started
- if (this._animationTimeRestarted) {
- const time = BLINK_INTERVAL - (Date.now() - this._animationTimeRestarted);
- this._animationTimeRestarted = undefined;
- if (time > 0) {
- this._restartInterval(time);
- return;
- }
- }
-
- // Hide the cursor
- this.isCursorVisible = false;
- this._animationFrame = window.requestAnimationFrame(() => {
- this._renderCallback();
- this._animationFrame = undefined;
- });
-
- // Setup the blink interval
- this._blinkInterval = window.setInterval(() => {
- // Adjust the animation time if it was restarted
- if (this._animationTimeRestarted) {
- // calc time diff
- // Make restart interval do a setTimeout initially?
- const time = BLINK_INTERVAL - (Date.now() - this._animationTimeRestarted);
- this._animationTimeRestarted = undefined;
- this._restartInterval(time);
- return;
- }
-
- // Invert visibility and render
- this.isCursorVisible = !this.isCursorVisible;
- this._animationFrame = window.requestAnimationFrame(() => {
- this._renderCallback();
- this._animationFrame = undefined;
- });
- }, BLINK_INTERVAL);
- }, timeToStart);
- }
-
- public pause(): void {
- this.isCursorVisible = true;
- if (this._blinkInterval) {
- window.clearInterval(this._blinkInterval);
- this._blinkInterval = undefined;
- }
- if (this._blinkStartTimeout) {
- window.clearTimeout(this._blinkStartTimeout);
- this._blinkStartTimeout = undefined;
- }
- if (this._animationFrame) {
- window.cancelAnimationFrame(this._animationFrame);
- this._animationFrame = undefined;
- }
- }
-
- public resume(): void {
- // Clear out any existing timers just in case
- this.pause();
-
- this._animationTimeRestarted = undefined;
- this._restartInterval();
- this.restartBlinkAnimation();
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/CustomGlyphs.ts b/node_modules/xterm/src/browser/renderer/CustomGlyphs.ts
deleted file mode 100644
index 7756279..0000000
--- a/node_modules/xterm/src/browser/renderer/CustomGlyphs.ts
+++ /dev/null
@@ -1,563 +0,0 @@
-/**
- * Copyright (c) 2021 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { throwIfFalsy } from 'browser/renderer/RendererUtils';
-
-interface IBlockVector {
- x: number;
- y: number;
- w: number;
- h: number;
-}
-
-export const blockElementDefinitions: { [index: string]: IBlockVector[] | undefined } = {
- // Block elements (0x2580-0x2590)
- '▀': [{ x: 0, y: 0, w: 8, h: 4 }], // UPPER HALF BLOCK
- '▁': [{ x: 0, y: 7, w: 8, h: 1 }], // LOWER ONE EIGHTH BLOCK
- '▂': [{ x: 0, y: 6, w: 8, h: 2 }], // LOWER ONE QUARTER BLOCK
- '▃': [{ x: 0, y: 5, w: 8, h: 3 }], // LOWER THREE EIGHTHS BLOCK
- '▄': [{ x: 0, y: 4, w: 8, h: 4 }], // LOWER HALF BLOCK
- '▅': [{ x: 0, y: 3, w: 8, h: 5 }], // LOWER FIVE EIGHTHS BLOCK
- '▆': [{ x: 0, y: 2, w: 8, h: 6 }], // LOWER THREE QUARTERS BLOCK
- '▇': [{ x: 0, y: 1, w: 8, h: 7 }], // LOWER SEVEN EIGHTHS BLOCK
- '█': [{ x: 0, y: 0, w: 8, h: 8 }], // FULL BLOCK
- '▉': [{ x: 0, y: 0, w: 7, h: 8 }], // LEFT SEVEN EIGHTHS BLOCK
- '▊': [{ x: 0, y: 0, w: 6, h: 8 }], // LEFT THREE QUARTERS BLOCK
- '▋': [{ x: 0, y: 0, w: 5, h: 8 }], // LEFT FIVE EIGHTHS BLOCK
- '▌': [{ x: 0, y: 0, w: 4, h: 8 }], // LEFT HALF BLOCK
- '▍': [{ x: 0, y: 0, w: 3, h: 8 }], // LEFT THREE EIGHTHS BLOCK
- '▎': [{ x: 0, y: 0, w: 2, h: 8 }], // LEFT ONE QUARTER BLOCK
- '▏': [{ x: 0, y: 0, w: 1, h: 8 }], // LEFT ONE EIGHTH BLOCK
- '▐': [{ x: 4, y: 0, w: 4, h: 8 }], // RIGHT HALF BLOCK
-
- // Block elements (0x2594-0x2595)
- '▔': [{ x: 0, y: 0, w: 9, h: 1 }], // UPPER ONE EIGHTH BLOCK
- '▕': [{ x: 7, y: 0, w: 1, h: 8 }], // RIGHT ONE EIGHTH BLOCK
-
- // Terminal graphic characters (0x2596-0x259F)
- '▖': [{ x: 0, y: 4, w: 4, h: 4 }], // QUADRANT LOWER LEFT
- '▗': [{ x: 4, y: 4, w: 4, h: 4 }], // QUADRANT LOWER RIGHT
- '▘': [{ x: 0, y: 0, w: 4, h: 4 }], // QUADRANT UPPER LEFT
- '▙': [{ x: 0, y: 0, w: 4, h: 8 }, { x: 0, y: 4, w: 8, h: 4 }], // QUADRANT UPPER LEFT AND LOWER LEFT AND LOWER RIGHT
- '▚': [{ x: 0, y: 0, w: 4, h: 4 }, { x: 4, y: 4, w: 4, h: 4 }], // QUADRANT UPPER LEFT AND LOWER RIGHT
- '▛': [{ x: 0, y: 0, w: 4, h: 8 }, { x: 0, y: 0, w: 4, h: 8 }], // QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER LEFT
- '▜': [{ x: 0, y: 0, w: 8, h: 4 }, { x: 4, y: 0, w: 4, h: 8 }], // QUADRANT UPPER LEFT AND UPPER RIGHT AND LOWER RIGHT
- '▝': [{ x: 4, y: 0, w: 4, h: 4 }], // QUADRANT UPPER RIGHT
- '▞': [{ x: 4, y: 0, w: 4, h: 4 }, { x: 0, y: 4, w: 4, h: 4 }], // QUADRANT UPPER RIGHT AND LOWER LEFT
- '▟': [{ x: 4, y: 0, w: 4, h: 8 }, { x: 0, y: 4, w: 8, h: 4 }], // QUADRANT UPPER RIGHT AND LOWER LEFT AND LOWER RIGHT
-
- // VERTICAL ONE EIGHTH BLOCK-2 through VERTICAL ONE EIGHTH BLOCK-7
- '\u{1FB70}': [{ x: 1, y: 0, w: 1, h: 8 }],
- '\u{1FB71}': [{ x: 2, y: 0, w: 1, h: 8 }],
- '\u{1FB72}': [{ x: 3, y: 0, w: 1, h: 8 }],
- '\u{1FB73}': [{ x: 4, y: 0, w: 1, h: 8 }],
- '\u{1FB74}': [{ x: 5, y: 0, w: 1, h: 8 }],
- '\u{1FB75}': [{ x: 6, y: 0, w: 1, h: 8 }],
-
- // HORIZONTAL ONE EIGHTH BLOCK-2 through HORIZONTAL ONE EIGHTH BLOCK-7
- '\u{1FB76}': [{ x: 0, y: 1, w: 8, h: 1 }],
- '\u{1FB77}': [{ x: 0, y: 2, w: 8, h: 1 }],
- '\u{1FB78}': [{ x: 0, y: 3, w: 8, h: 1 }],
- '\u{1FB79}': [{ x: 0, y: 4, w: 8, h: 1 }],
- '\u{1FB7A}': [{ x: 0, y: 5, w: 8, h: 1 }],
- '\u{1FB7B}': [{ x: 0, y: 6, w: 8, h: 1 }],
-
- // LEFT AND LOWER ONE EIGHTH BLOCK
- '\u{1FB7C}': [{ x: 0, y: 0, w: 1, h: 8 }, { x: 0, y: 7, w: 8, h: 1 }],
- // LEFT AND UPPER ONE EIGHTH BLOCK
- '\u{1FB7D}': [{ x: 0, y: 0, w: 1, h: 8 }, { x: 0, y: 0, w: 8, h: 1 }],
- // RIGHT AND UPPER ONE EIGHTH BLOCK
- '\u{1FB7E}': [{ x: 7, y: 0, w: 1, h: 8 }, { x: 0, y: 0, w: 8, h: 1 }],
- // RIGHT AND LOWER ONE EIGHTH BLOCK
- '\u{1FB7F}': [{ x: 7, y: 0, w: 1, h: 8 }, { x: 0, y: 7, w: 8, h: 1 }],
- // UPPER AND LOWER ONE EIGHTH BLOCK
- '\u{1FB80}': [{ x: 0, y: 0, w: 8, h: 1 }, { x: 0, y: 7, w: 8, h: 1 }],
- // HORIZONTAL ONE EIGHTH BLOCK-1358
- '\u{1FB81}': [{ x: 0, y: 0, w: 8, h: 1 }, { x: 0, y: 2, w: 8, h: 1 }, { x: 0, y: 4, w: 8, h: 1 }, { x: 0, y: 7, w: 8, h: 1 }],
-
- // UPPER ONE QUARTER BLOCK
- '\u{1FB82}': [{ x: 0, y: 0, w: 8, h: 2 }],
- // UPPER THREE EIGHTHS BLOCK
- '\u{1FB83}': [{ x: 0, y: 0, w: 8, h: 3 }],
- // UPPER FIVE EIGHTHS BLOCK
- '\u{1FB84}': [{ x: 0, y: 0, w: 8, h: 5 }],
- // UPPER THREE QUARTERS BLOCK
- '\u{1FB85}': [{ x: 0, y: 0, w: 8, h: 6 }],
- // UPPER SEVEN EIGHTHS BLOCK
- '\u{1FB86}': [{ x: 0, y: 0, w: 8, h: 7 }],
-
- // RIGHT ONE QUARTER BLOCK
- '\u{1FB87}': [{ x: 6, y: 0, w: 2, h: 8 }],
- // RIGHT THREE EIGHTHS B0OCK
- '\u{1FB88}': [{ x: 5, y: 0, w: 3, h: 8 }],
- // RIGHT FIVE EIGHTHS BL0CK
- '\u{1FB89}': [{ x: 3, y: 0, w: 5, h: 8 }],
- // RIGHT THREE QUARTERS 0LOCK
- '\u{1FB8A}': [{ x: 2, y: 0, w: 6, h: 8 }],
- // RIGHT SEVEN EIGHTHS B0OCK
- '\u{1FB8B}': [{ x: 1, y: 0, w: 7, h: 8 }],
-
- // CHECKER BOARD FILL
- '\u{1FB95}': [
- { x: 0, y: 0, w: 2, h: 2 }, { x: 4, y: 0, w: 2, h: 2 },
- { x: 2, y: 2, w: 2, h: 2 }, { x: 6, y: 2, w: 2, h: 2 },
- { x: 0, y: 4, w: 2, h: 2 }, { x: 4, y: 4, w: 2, h: 2 },
- { x: 2, y: 6, w: 2, h: 2 }, { x: 6, y: 6, w: 2, h: 2 }
- ],
- // INVERSE CHECKER BOARD FILL
- '\u{1FB96}': [
- { x: 2, y: 0, w: 2, h: 2 }, { x: 6, y: 0, w: 2, h: 2 },
- { x: 0, y: 2, w: 2, h: 2 }, { x: 4, y: 2, w: 2, h: 2 },
- { x: 2, y: 4, w: 2, h: 2 }, { x: 6, y: 4, w: 2, h: 2 },
- { x: 0, y: 6, w: 2, h: 2 }, { x: 4, y: 6, w: 2, h: 2 }
- ],
- // HEAVY HORIZONTAL FILL (upper middle and lower one quarter block)
- '\u{1FB97}': [{ x: 0, y: 2, w: 8, h: 2 }, { x: 0, y: 6, w: 8, h: 2 }]
-};
-
-type PatternDefinition = number[][];
-
-/**
- * Defines the repeating pattern used by special characters, the pattern is made up of a 2d array of
- * pixel values to be filled (1) or not filled (0).
- */
-const patternCharacterDefinitions: { [key: string]: PatternDefinition | undefined } = {
- // Shade characters (0x2591-0x2593)
- '░': [ // LIGHT SHADE (25%)
- [1, 0, 0, 0],
- [0, 0, 0, 0],
- [0, 0, 1, 0],
- [0, 0, 0, 0]
- ],
- '▒': [ // MEDIUM SHADE (50%)
- [1, 0],
- [0, 0],
- [0, 1],
- [0, 0]
- ],
- '▓': [ // DARK SHADE (75%)
- [0, 1],
- [1, 1],
- [1, 0],
- [1, 1]
- ]
-};
-
-const enum Shapes {
- /** │ */ TOP_TO_BOTTOM = 'M.5,0 L.5,1',
- /** ─ */ LEFT_TO_RIGHT = 'M0,.5 L1,.5',
-
- /** └ */ TOP_TO_RIGHT = 'M.5,0 L.5,.5 L1,.5',
- /** ┘ */ TOP_TO_LEFT = 'M.5,0 L.5,.5 L0,.5',
- /** ┐ */ LEFT_TO_BOTTOM = 'M0,.5 L.5,.5 L.5,1',
- /** ┌ */ RIGHT_TO_BOTTOM = 'M0.5,1 L.5,.5 L1,.5',
-
- /** ╵ */ MIDDLE_TO_TOP = 'M.5,.5 L.5,0',
- /** ╴ */ MIDDLE_TO_LEFT = 'M.5,.5 L0,.5',
- /** ╶ */ MIDDLE_TO_RIGHT = 'M.5,.5 L1,.5',
- /** ╷ */ MIDDLE_TO_BOTTOM = 'M.5,.5 L.5,1',
-
- /** ┴ */ T_TOP = 'M0,.5 L1,.5 M.5,.5 L.5,0',
- /** ┤ */ T_LEFT = 'M.5,0 L.5,1 M.5,.5 L0,.5',
- /** ├ */ T_RIGHT = 'M.5,0 L.5,1 M.5,.5 L1,.5',
- /** ┬ */ T_BOTTOM = 'M0,.5 L1,.5 M.5,.5 L.5,1',
-
- /** ┼ */ CROSS = 'M0,.5 L1,.5 M.5,0 L.5,1',
-
- /** ╌ */ TWO_DASHES_HORIZONTAL = 'M.1,.5 L.4,.5 M.6,.5 L.9,.5', // .2 empty, .3 filled
- /** ┄ */ THREE_DASHES_HORIZONTAL = 'M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5', // .1333 empty, .2 filled
- /** ┉ */ FOUR_DASHES_HORIZONTAL = 'M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5', // .1 empty, .15 filled
- /** ╎ */ TWO_DASHES_VERTICAL = 'M.5,.1 L.5,.4 M.5,.6 L.5,.9',
- /** ┆ */ THREE_DASHES_VERTICAL = 'M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333',
- /** ┊ */ FOUR_DASHES_VERTICAL = 'M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95',
-}
-
-const enum Style {
- NORMAL = 1,
- BOLD = 3
-}
-
-/**
- * This contains the definitions of all box drawing characters in the format of SVG paths (ie. the
- * svg d attribute).
- */
-export const boxDrawingDefinitions: { [character: string]: { [fontWeight: number]: string | ((xp: number, yp: number) => string) } | undefined } = {
- // Uniform normal and bold
- '─': { [Style.NORMAL]: Shapes.LEFT_TO_RIGHT },
- '━': { [Style.BOLD]: Shapes.LEFT_TO_RIGHT },
- '│': { [Style.NORMAL]: Shapes.TOP_TO_BOTTOM },
- '┃': { [Style.BOLD]: Shapes.TOP_TO_BOTTOM },
- '┌': { [Style.NORMAL]: Shapes.RIGHT_TO_BOTTOM },
- '┏': { [Style.BOLD]: Shapes.RIGHT_TO_BOTTOM },
- '┐': { [Style.NORMAL]: Shapes.LEFT_TO_BOTTOM },
- '┓': { [Style.BOLD]: Shapes.LEFT_TO_BOTTOM },
- '└': { [Style.NORMAL]: Shapes.TOP_TO_RIGHT },
- '┗': { [Style.BOLD]: Shapes.TOP_TO_RIGHT },
- '┘': { [Style.NORMAL]: Shapes.TOP_TO_LEFT },
- '┛': { [Style.BOLD]: Shapes.TOP_TO_LEFT },
- '├': { [Style.NORMAL]: Shapes.T_RIGHT },
- '┣': { [Style.BOLD]: Shapes.T_RIGHT },
- '┤': { [Style.NORMAL]: Shapes.T_LEFT },
- '┫': { [Style.BOLD]: Shapes.T_LEFT },
- '┬': { [Style.NORMAL]: Shapes.T_BOTTOM },
- '┳': { [Style.BOLD]: Shapes.T_BOTTOM },
- '┴': { [Style.NORMAL]: Shapes.T_TOP },
- '┻': { [Style.BOLD]: Shapes.T_TOP },
- '┼': { [Style.NORMAL]: Shapes.CROSS },
- '╋': { [Style.BOLD]: Shapes.CROSS },
- '╴': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT },
- '╸': { [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },
- '╵': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP },
- '╹': { [Style.BOLD]: Shapes.MIDDLE_TO_TOP },
- '╶': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT },
- '╺': { [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },
- '╷': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM },
- '╻': { [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },
-
- // Double border
- '═': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L1,${.5 + yp}` },
- '║': { [Style.NORMAL]: (xp, yp) => `M${.5 - xp},0 L${.5 - xp},1 M${.5 + xp},0 L${.5 + xp},1` },
- '╒': { [Style.NORMAL]: (xp, yp) => `M.5,1 L.5,${.5 - yp} L1,${.5 - yp} M.5,${.5 + yp} L1,${.5 + yp}` },
- '╓': { [Style.NORMAL]: (xp, yp) => `M${.5 - xp},1 L${.5 - xp},.5 L1,.5 M${.5 + xp},.5 L${.5 + xp},1` },
- '╔': { [Style.NORMAL]: (xp, yp) => `M1,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},1 M1,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},1` },
- '╕': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L.5,${.5 - yp} L.5,1 M0,${.5 + yp} L.5,${.5 + yp}` },
- '╖': { [Style.NORMAL]: (xp, yp) => `M${.5 + xp},1 L${.5 + xp},.5 L0,.5 M${.5 - xp},.5 L${.5 - xp},1` },
- '╗': { [Style.NORMAL]: (xp, yp) => `M0,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},1 M0,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},1` },
- '╘': { [Style.NORMAL]: (xp, yp) => `M.5,0 L.5,${.5 + yp} L1,${.5 + yp} M.5,${.5 - yp} L1,${.5 - yp}` },
- '╙': { [Style.NORMAL]: (xp, yp) => `M1,.5 L${.5 - xp},.5 L${.5 - xp},0 M${.5 + xp},.5 L${.5 + xp},0` },
- '╚': { [Style.NORMAL]: (xp, yp) => `M1,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},0 M1,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},0` },
- '╛': { [Style.NORMAL]: (xp, yp) => `M0,${.5 + yp} L.5,${.5 + yp} L.5,0 M0,${.5 - yp} L.5,${.5 - yp}` },
- '╜': { [Style.NORMAL]: (xp, yp) => `M0,.5 L${.5 + xp},.5 L${.5 + xp},0 M${.5 - xp},.5 L${.5 - xp},0` },
- '╝': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},0 M0,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},0` },
- '╞': { [Style.NORMAL]: (xp, yp) => `${Shapes.TOP_TO_BOTTOM} M.5,${.5 - yp} L1,${.5 - yp} M.5,${.5 + yp} L1,${.5 + yp}` },
- '╟': { [Style.NORMAL]: (xp, yp) => `M${.5 - xp},0 L${.5 - xp},1 M${.5 + xp},0 L${.5 + xp},1 M${.5 + xp},.5 L1,.5` },
- '╠': { [Style.NORMAL]: (xp, yp) => `M${.5 - xp},0 L${.5 - xp},1 M1,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},1 M1,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},0` },
- '╡': { [Style.NORMAL]: (xp, yp) => `${Shapes.TOP_TO_BOTTOM} M0,${.5 - yp} L.5,${.5 - yp} M0,${.5 + yp} L.5,${.5 + yp}` },
- '╢': { [Style.NORMAL]: (xp, yp) => `M0,.5 L${.5 - xp},.5 M${.5 - xp},0 L${.5 - xp},1 M${.5 + xp},0 L${.5 + xp},1` },
- '╣': { [Style.NORMAL]: (xp, yp) => `M${.5 + xp},0 L${.5 + xp},1 M0,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},1 M0,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},0` },
- '╤': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L1,${.5 + yp} M.5,${.5 + yp} L.5,1` },
- '╥': { [Style.NORMAL]: (xp, yp) => `${Shapes.LEFT_TO_RIGHT} M${.5 - xp},.5 L${.5 - xp},1 M${.5 + xp},.5 L${.5 + xp},1` },
- '╦': { [Style.NORMAL]: (xp, yp) => `M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},1 M1,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},1` },
- '╧': { [Style.NORMAL]: (xp, yp) => `M.5,0 L.5,${.5 - yp} M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L1,${.5 + yp}` },
- '╨': { [Style.NORMAL]: (xp, yp) => `${Shapes.LEFT_TO_RIGHT} M${.5 - xp},.5 L${.5 - xp},0 M${.5 + xp},.5 L${.5 + xp},0` },
- '╩': { [Style.NORMAL]: (xp, yp) => `M0,${.5 + yp} L1,${.5 + yp} M0,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},0 M1,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},0` },
- '╪': { [Style.NORMAL]: (xp, yp) => `${Shapes.TOP_TO_BOTTOM} M0,${.5 - yp} L1,${.5 - yp} M0,${.5 + yp} L1,${.5 + yp}` },
- '╫': { [Style.NORMAL]: (xp, yp) => `${Shapes.LEFT_TO_RIGHT} M${.5 - xp},0 L${.5 - xp},1 M${.5 + xp},0 L${.5 + xp},1` },
- '╬': { [Style.NORMAL]: (xp, yp) => `M0,${.5 + yp} L${.5 - xp},${.5 + yp} L${.5 - xp},1 M1,${.5 + yp} L${.5 + xp},${.5 + yp} L${.5 + xp},1 M0,${.5 - yp} L${.5 - xp},${.5 - yp} L${.5 - xp},0 M1,${.5 - yp} L${.5 + xp},${.5 - yp} L${.5 + xp},0` },
-
- // Diagonal
- '╱': { [Style.NORMAL]: 'M1,0 L0,1' },
- '╲': { [Style.NORMAL]: 'M0,0 L1,1' },
- '╳': { [Style.NORMAL]: 'M1,0 L0,1 M0,0 L1,1' },
-
- // Mixed weight
- '╼': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },
- '╽': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },
- '╾': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },
- '╿': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },
- '┍': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },
- '┎': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },
- '┑': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },
- '┒': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },
- '┕': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },
- '┖': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },
- '┙': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },
- '┚': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },
- '┝': { [Style.NORMAL]: Shapes.TOP_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },
- '┞': { [Style.NORMAL]: Shapes.RIGHT_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },
- '┟': { [Style.NORMAL]: Shapes.TOP_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },
- '┠': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.TOP_TO_BOTTOM },
- '┡': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.TOP_TO_RIGHT },
- '┢': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.RIGHT_TO_BOTTOM },
- '┥': { [Style.NORMAL]: Shapes.TOP_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },
- '┦': { [Style.NORMAL]: Shapes.LEFT_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },
- '┧': { [Style.NORMAL]: Shapes.TOP_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },
- '┨': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.TOP_TO_BOTTOM },
- '┩': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.TOP_TO_LEFT },
- '┪': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.LEFT_TO_BOTTOM },
- '┭': { [Style.NORMAL]: Shapes.RIGHT_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },
- '┮': { [Style.NORMAL]: Shapes.LEFT_TO_BOTTOM, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },
- '┯': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: Shapes.LEFT_TO_RIGHT },
- '┰': { [Style.NORMAL]: Shapes.LEFT_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },
- '┱': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.LEFT_TO_BOTTOM },
- '┲': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.RIGHT_TO_BOTTOM },
- '┵': { [Style.NORMAL]: Shapes.TOP_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },
- '┶': { [Style.NORMAL]: Shapes.TOP_TO_LEFT, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },
- '┷': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: Shapes.LEFT_TO_RIGHT },
- '┸': { [Style.NORMAL]: Shapes.LEFT_TO_RIGHT, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },
- '┹': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: Shapes.TOP_TO_LEFT },
- '┺': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: Shapes.TOP_TO_RIGHT },
- '┽': { [Style.NORMAL]: `${Shapes.TOP_TO_BOTTOM} ${Shapes.MIDDLE_TO_RIGHT}`, [Style.BOLD]: Shapes.MIDDLE_TO_LEFT },
- '┾': { [Style.NORMAL]: `${Shapes.TOP_TO_BOTTOM} ${Shapes.MIDDLE_TO_LEFT}`, [Style.BOLD]: Shapes.MIDDLE_TO_RIGHT },
- '┿': { [Style.NORMAL]: Shapes.TOP_TO_BOTTOM, [Style.BOLD]: Shapes.LEFT_TO_RIGHT },
- '╀': { [Style.NORMAL]: `${Shapes.LEFT_TO_RIGHT} ${Shapes.MIDDLE_TO_BOTTOM}`, [Style.BOLD]: Shapes.MIDDLE_TO_TOP },
- '╁': { [Style.NORMAL]: `${Shapes.MIDDLE_TO_TOP} ${Shapes.LEFT_TO_RIGHT}`, [Style.BOLD]: Shapes.MIDDLE_TO_BOTTOM },
- '╂': { [Style.NORMAL]: Shapes.LEFT_TO_RIGHT, [Style.BOLD]: Shapes.TOP_TO_BOTTOM },
- '╃': { [Style.NORMAL]: Shapes.RIGHT_TO_BOTTOM, [Style.BOLD]: Shapes.TOP_TO_LEFT },
- '╄': { [Style.NORMAL]: Shapes.LEFT_TO_BOTTOM, [Style.BOLD]: Shapes.TOP_TO_RIGHT },
- '╅': { [Style.NORMAL]: Shapes.TOP_TO_RIGHT, [Style.BOLD]: Shapes.LEFT_TO_BOTTOM },
- '╆': { [Style.NORMAL]: Shapes.TOP_TO_LEFT, [Style.BOLD]: Shapes.RIGHT_TO_BOTTOM },
- '╇': { [Style.NORMAL]: Shapes.MIDDLE_TO_BOTTOM, [Style.BOLD]: `${Shapes.MIDDLE_TO_TOP} ${Shapes.LEFT_TO_RIGHT}` },
- '╈': { [Style.NORMAL]: Shapes.MIDDLE_TO_TOP, [Style.BOLD]: `${Shapes.LEFT_TO_RIGHT} ${Shapes.MIDDLE_TO_BOTTOM}` },
- '╉': { [Style.NORMAL]: Shapes.MIDDLE_TO_RIGHT, [Style.BOLD]: `${Shapes.TOP_TO_BOTTOM} ${Shapes.MIDDLE_TO_LEFT}` },
- '╊': { [Style.NORMAL]: Shapes.MIDDLE_TO_LEFT, [Style.BOLD]: `${Shapes.TOP_TO_BOTTOM} ${Shapes.MIDDLE_TO_RIGHT}` },
-
- // Dashed
- '╌': { [Style.NORMAL]: Shapes.TWO_DASHES_HORIZONTAL },
- '╍': { [Style.BOLD]: Shapes.TWO_DASHES_HORIZONTAL },
- '┄': { [Style.NORMAL]: Shapes.THREE_DASHES_HORIZONTAL },
- '┅': { [Style.BOLD]: Shapes.THREE_DASHES_HORIZONTAL },
- '┈': { [Style.NORMAL]: Shapes.FOUR_DASHES_HORIZONTAL },
- '┉': { [Style.BOLD]: Shapes.FOUR_DASHES_HORIZONTAL },
- '╎': { [Style.NORMAL]: Shapes.TWO_DASHES_VERTICAL },
- '╏': { [Style.BOLD]: Shapes.TWO_DASHES_VERTICAL },
- '┆': { [Style.NORMAL]: Shapes.THREE_DASHES_VERTICAL },
- '┇': { [Style.BOLD]: Shapes.THREE_DASHES_VERTICAL },
- '┊': { [Style.NORMAL]: Shapes.FOUR_DASHES_VERTICAL },
- '┋': { [Style.BOLD]: Shapes.FOUR_DASHES_VERTICAL },
-
- // Curved
- '╭': { [Style.NORMAL]: 'C.5,1,.5,.5,1,.5' },
- '╮': { [Style.NORMAL]: 'C.5,1,.5,.5,0,.5' },
- '╯': { [Style.NORMAL]: 'C.5,0,.5,.5,0,.5' },
- '╰': { [Style.NORMAL]: 'C.5,0,.5,.5,1,.5' }
-};
-
-/**
- * Try drawing a custom block element or box drawing character, returning whether it was
- * successfully drawn.
- */
-export function tryDrawCustomChar(
- ctx: CanvasRenderingContext2D,
- c: string,
- xOffset: number,
- yOffset: number,
- scaledCellWidth: number,
- scaledCellHeight: number
-): boolean {
- const blockElementDefinition = blockElementDefinitions[c];
- if (blockElementDefinition) {
- drawBlockElementChar(ctx, blockElementDefinition, xOffset, yOffset, scaledCellWidth, scaledCellHeight);
- return true;
- }
-
- const patternDefinition = patternCharacterDefinitions[c];
- if (patternDefinition) {
- drawPatternChar(ctx, patternDefinition, xOffset, yOffset, scaledCellWidth, scaledCellHeight);
- return true;
- }
-
- const boxDrawingDefinition = boxDrawingDefinitions[c];
- if (boxDrawingDefinition) {
- drawBoxDrawingChar(ctx, boxDrawingDefinition, xOffset, yOffset, scaledCellWidth, scaledCellHeight);
- return true;
- }
-
- return false;
-}
-
-function drawBlockElementChar(
- ctx: CanvasRenderingContext2D,
- charDefinition: IBlockVector[],
- xOffset: number,
- yOffset: number,
- scaledCellWidth: number,
- scaledCellHeight: number
-): void {
- for (let i = 0; i < charDefinition.length; i++) {
- const box = charDefinition[i];
- const xEighth = scaledCellWidth / 8;
- const yEighth = scaledCellHeight / 8;
- ctx.fillRect(
- xOffset + box.x * xEighth,
- yOffset + box.y * yEighth,
- box.w * xEighth,
- box.h * yEighth
- );
- }
-}
-
-const cachedPatterns: Map<PatternDefinition, Map</* fillStyle */string, CanvasPattern>> = new Map();
-
-function drawPatternChar(
- ctx: CanvasRenderingContext2D,
- charDefinition: number[][],
- xOffset: number,
- yOffset: number,
- scaledCellWidth: number,
- scaledCellHeight: number
-): void {
- let patternSet = cachedPatterns.get(charDefinition);
- if (!patternSet) {
- patternSet = new Map();
- cachedPatterns.set(charDefinition, patternSet);
- }
- const fillStyle = ctx.fillStyle;
- if (typeof fillStyle !== 'string') {
- throw new Error(`Unexpected fillStyle type "${fillStyle}"`);
- }
- let pattern = patternSet.get(fillStyle);
- if (!pattern) {
- const width = charDefinition[0].length;
- const height = charDefinition.length;
- const tmpCanvas = document.createElement('canvas');
- tmpCanvas.width = width;
- tmpCanvas.height = height;
- const tmpCtx = throwIfFalsy(tmpCanvas.getContext('2d'));
- const imageData = new ImageData(width, height);
-
- // Extract rgba from fillStyle
- let r: number;
- let g: number;
- let b: number;
- let a: number;
- if (fillStyle.startsWith('#')) {
- r = parseInt(fillStyle.substr(1, 2), 16);
- g = parseInt(fillStyle.substr(3, 2), 16);
- b = parseInt(fillStyle.substr(5, 2), 16);
- a = fillStyle.length > 7 && parseInt(fillStyle.substr(7, 2), 16) || 1;
- } else if (fillStyle.startsWith('rgba')) {
- ([r, g, b, a] = fillStyle.substring(5, fillStyle.length - 1).split(',').map(e => parseFloat(e)));
- } else {
- throw new Error(`Unexpected fillStyle color format "${fillStyle}" when drawing pattern glyph`);
- }
-
- for (let y = 0; y < height; y++) {
- for (let x = 0; x < width; x++) {
- imageData.data[(y * width + x) * 4 ] = r;
- imageData.data[(y * width + x) * 4 + 1] = g;
- imageData.data[(y * width + x) * 4 + 2] = b;
- imageData.data[(y * width + x) * 4 + 3] = charDefinition[y][x] * (a * 255);
- }
- }
- tmpCtx.putImageData(imageData, 0, 0);
- pattern = throwIfFalsy(ctx.createPattern(tmpCanvas, null));
- patternSet.set(fillStyle, pattern);
- }
- ctx.fillStyle = pattern;
- ctx.fillRect(xOffset, yOffset, scaledCellWidth, scaledCellHeight);
-}
-
-/**
- * Draws the following box drawing characters by mapping a subset of SVG d attribute instructions to
- * canvas draw calls.
- *
- * Box styles: ┎┰┒┍┯┑╓╥╖╒╤╕ ┏┳┓┌┲┓┌┬┐┏┱┐
- * ┌─┬─┐ ┏━┳━┓ ╔═╦═╗ ┠╂┨┝┿┥╟╫╢╞╪╡ ┡╇┩├╊┫┢╈┪┣╉┤
- * │ │ │ ┃ ┃ ┃ ║ ║ ║ ┖┸┚┕┷┙╙╨╜╘╧╛ └┴┘└┺┛┗┻┛┗┹┘
- * ├─┼─┤ ┣━╋━┫ ╠═╬═╣ ┏┱┐┌┲┓┌┬┐┌┬┐ ┏┳┓┌┮┓┌┬┐┏┭┐
- * │ │ │ ┃ ┃ ┃ ║ ║ ║ ┡╃┤├╄┩├╆┪┢╅┤ ┞╀┦├┾┫┟╁┧┣┽┤
- * └─┴─┘ ┗━┻━┛ ╚═╩═╝ └┴┘└┴┘└┺┛┗┹┘ └┴┘└┶┛┗┻┛┗┵┘
- *
- * Other:
- * ╭─╮ ╲ ╱ ╷╻╎╏┆┇┊┋ ╺╾╴ ╌╌╌ ┄┄┄ ┈┈┈
- * │ │ ╳ ╽╿╎╏┆┇┊┋ ╶╼╸ ╍╍╍ ┅┅┅ ┉┉┉
- * ╰─╯ ╱ ╲ ╹╵╎╏┆┇┊┋
- *
- * All box drawing characters:
- * ─ ━ │ ┃ ┄ ┅ ┆ ┇ ┈ ┉ ┊ ┋ ┌ ┍ ┎ ┏
- * ┐ ┑ ┒ ┓ └ ┕ ┖ ┗ ┘ ┙ ┚ ┛ ├ ┝ ┞ ┟
- * ┠ ┡ ┢ ┣ ┤ ┥ ┦ ┧ ┨ ┩ ┪ ┫ ┬ ┭ ┮ ┯
- * ┰ ┱ ┲ ┳ ┴ ┵ ┶ ┷ ┸ ┹ ┺ ┻ ┼ ┽ ┾ ┿
- * ╀ ╁ ╂ ╃ ╄ ╅ ╆ ╇ ╈ ╉ ╊ ╋ ╌ ╍ ╎ ╏
- * ═ ║ ╒ ╓ ╔ ╕ ╖ ╗ ╘ ╙ ╚ ╛ ╜ ╝ ╞ ╟
- * ╠ ╡ ╢ ╣ ╤ ╥ ╦ ╧ ╨ ╩ ╪ ╫ ╬ ╭ ╮ ╯
- * ╰ ╱ ╲ ╳ ╴ ╵ ╶ ╷ ╸ ╹ ╺ ╻ ╼ ╽ ╾ ╿
- *
- * ---
- *
- * Box drawing alignment tests: █
- * ▉
- * ╔══╦══╗ ┌──┬──┐ ╭──┬──╮ ╭──┬──╮ ┏━━┳━━┓ ┎┒┏┑ ╷ ╻ ┏┯┓ ┌┰┐ ▊ ╱╲╱╲╳╳╳
- * ║┌─╨─┐║ │╔═╧═╗│ │╒═╪═╕│ │╓─╁─╖│ ┃┌─╂─┐┃ ┗╃╄┙ ╶┼╴╺╋╸┠┼┨ ┝╋┥ ▋ ╲╱╲╱╳╳╳
- * ║│╲ ╱│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╿ │┃ ┍╅╆┓ ╵ ╹ ┗┷┛ └┸┘ ▌ ╱╲╱╲╳╳╳
- * ╠╡ ╳ ╞╣ ├╢ ╟┤ ├┼─┼─┼┤ ├╫─╂─╫┤ ┣┿╾┼╼┿┫ ┕┛┖┚ ┌┄┄┐ ╎ ┏┅┅┓ ┋ ▍ ╲╱╲╱╳╳╳
- * ║│╱ ╲│║ │║ ║│ ││ │ ││ │║ ┃ ║│ ┃│ ╽ │┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▎
- * ║└─╥─┘║ │╚═╤═╝│ │╘═╪═╛│ │╙─╀─╜│ ┃└─╂─┘┃ ░░▒▒▓▓██ ┊ ┆ ╎ ╏ ┇ ┋ ▏
- * ╚══╩══╝ └──┴──┘ ╰──┴──╯ ╰──┴──╯ ┗━━┻━━┛ └╌╌┘ ╎ ┗╍╍┛ ┋ ▁▂▃▄▅▆▇█
- *
- * Source: https://www.w3.org/2001/06/utf-8-test/UTF-8-demo.html
- */
-function drawBoxDrawingChar(
- ctx: CanvasRenderingContext2D,
- charDefinition: { [fontWeight: number]: string | ((xp: number, yp: number) => string) },
- xOffset: number,
- yOffset: number,
- scaledCellWidth: number,
- scaledCellHeight: number
-): void {
- ctx.strokeStyle = ctx.fillStyle;
- for (const [fontWeight, instructions] of Object.entries(charDefinition)) {
- ctx.beginPath();
- ctx.lineWidth = window.devicePixelRatio * Number.parseInt(fontWeight);
- let actualInstructions: string;
- if (typeof instructions === 'function') {
- const xp = .15;
- const yp = .15 / scaledCellHeight * scaledCellWidth;
- actualInstructions = instructions(xp, yp);
- } else {
- actualInstructions = instructions;
- }
- for (const instruction of actualInstructions.split(' ')) {
- const type = instruction[0];
- const f = svgToCanvasInstructionMap[type];
- if (!f) {
- console.error(`Could not find drawing instructions for "${type}"`);
- continue;
- }
- const args: string[] = instruction.substring(1).split(',');
- if (!args[0] || !args[1]) {
- continue;
- }
- f(ctx, translateArgs(args, scaledCellWidth, scaledCellHeight, xOffset, yOffset));
- }
- ctx.stroke();
- ctx.closePath();
- }
-}
-
-function clamp(value: number, max: number, min: number = 0): number {
- return Math.max(Math.min(value, max), min);
-}
-
-const svgToCanvasInstructionMap: { [index: string]: any } = {
- 'C': (ctx: CanvasRenderingContext2D, args: number[]) => ctx.bezierCurveTo(args[0], args[1], args[2], args[3], args[4], args[5]),
- 'L': (ctx: CanvasRenderingContext2D, args: number[]) => ctx.lineTo(args[0], args[1]),
- 'M': (ctx: CanvasRenderingContext2D, args: number[]) => ctx.moveTo(args[0], args[1])
-};
-
-function translateArgs(args: string[], cellWidth: number, cellHeight: number, xOffset: number, yOffset: number): number[] {
- const result = args.map(e => parseFloat(e) || parseInt(e));
-
- if (result.length < 2) {
- throw new Error('Too few arguments for instruction');
- }
-
- for (let x = 0; x < result.length; x += 2) {
- // Translate from 0-1 to 0-cellWidth
- result[x] *= cellWidth;
- // Ensure coordinate doesn't escape cell bounds and round to the nearest 0.5 to ensure a crisp
- // line at 100% devicePixelRatio
- if (result[x] !== 0) {
- result[x] = clamp(Math.round(result[x] + 0.5) - 0.5, cellWidth, 0);
- }
- // Apply the cell's offset (ie. x*cellWidth)
- result[x] += xOffset;
- }
-
- for (let y = 1; y < result.length; y += 2) {
- // Translate from 0-1 to 0-cellHeight
- result[y] *= cellHeight;
- // Ensure coordinate doesn't escape cell bounds and round to the nearest 0.5 to ensure a crisp
- // line at 100% devicePixelRatio
- if (result[y] !== 0) {
- result[y] = clamp(Math.round(result[y] + 0.5) - 0.5, cellHeight, 0);
- }
- // Apply the cell's offset (ie. x*cellHeight)
- result[y] += yOffset;
- }
-
- return result;
-}
diff --git a/node_modules/xterm/src/browser/renderer/GridCache.ts b/node_modules/xterm/src/browser/renderer/GridCache.ts
deleted file mode 100644
index b48798d..0000000
--- a/node_modules/xterm/src/browser/renderer/GridCache.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-export class GridCache<T> {
- public cache: (T | undefined)[][];
-
- public constructor() {
- this.cache = [];
- }
-
- public resize(width: number, height: number): void {
- for (let x = 0; x < width; x++) {
- if (this.cache.length <= x) {
- this.cache.push([]);
- }
- for (let y = this.cache[x].length; y < height; y++) {
- this.cache[x].push(undefined);
- }
- this.cache[x].length = height;
- }
- this.cache.length = width;
- }
-
- public clear(): void {
- for (let x = 0; x < this.cache.length; x++) {
- for (let y = 0; y < this.cache[x].length; y++) {
- this.cache[x][y] = undefined;
- }
- }
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/LinkRenderLayer.ts b/node_modules/xterm/src/browser/renderer/LinkRenderLayer.ts
deleted file mode 100644
index 2492f92..0000000
--- a/node_modules/xterm/src/browser/renderer/LinkRenderLayer.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderDimensions } from 'browser/renderer/Types';
-import { BaseRenderLayer } from './BaseRenderLayer';
-import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants';
-import { is256Color } from 'browser/renderer/atlas/CharAtlasUtils';
-import { IColorSet, ILinkifierEvent, ILinkifier, ILinkifier2 } from 'browser/Types';
-import { IBufferService, IOptionsService } from 'common/services/Services';
-
-export class LinkRenderLayer extends BaseRenderLayer {
- private _state: ILinkifierEvent | undefined;
-
- constructor(
- container: HTMLElement,
- zIndex: number,
- colors: IColorSet,
- rendererId: number,
- linkifier: ILinkifier,
- linkifier2: ILinkifier2,
- @IBufferService bufferService: IBufferService,
- @IOptionsService optionsService: IOptionsService
- ) {
- super(container, 'link', zIndex, true, colors, rendererId, bufferService, optionsService);
- linkifier.onShowLinkUnderline(e => this._onShowLinkUnderline(e));
- linkifier.onHideLinkUnderline(e => this._onHideLinkUnderline(e));
-
- linkifier2.onShowLinkUnderline(e => this._onShowLinkUnderline(e));
- linkifier2.onHideLinkUnderline(e => this._onHideLinkUnderline(e));
- }
-
- public resize(dim: IRenderDimensions): void {
- super.resize(dim);
- // Resizing the canvas discards the contents of the canvas so clear state
- this._state = undefined;
- }
-
- public reset(): void {
- this._clearCurrentLink();
- }
-
- private _clearCurrentLink(): void {
- if (this._state) {
- this._clearCells(this._state.x1, this._state.y1, this._state.cols - this._state.x1, 1);
- const middleRowCount = this._state.y2 - this._state.y1 - 1;
- if (middleRowCount > 0) {
- this._clearCells(0, this._state.y1 + 1, this._state.cols, middleRowCount);
- }
- this._clearCells(0, this._state.y2, this._state.x2, 1);
- this._state = undefined;
- }
- }
-
- private _onShowLinkUnderline(e: ILinkifierEvent): void {
- if (e.fg === INVERTED_DEFAULT_COLOR) {
- this._ctx.fillStyle = this._colors.background.css;
- } else if (e.fg && is256Color(e.fg)) {
- // 256 color support
- this._ctx.fillStyle = this._colors.ansi[e.fg].css;
- } else {
- this._ctx.fillStyle = this._colors.foreground.css;
- }
-
- if (e.y1 === e.y2) {
- // Single line link
- this._fillBottomLineAtCells(e.x1, e.y1, e.x2 - e.x1);
- } else {
- // Multi-line link
- this._fillBottomLineAtCells(e.x1, e.y1, e.cols - e.x1);
- for (let y = e.y1 + 1; y < e.y2; y++) {
- this._fillBottomLineAtCells(0, y, e.cols);
- }
- this._fillBottomLineAtCells(0, e.y2, e.x2);
- }
- this._state = e;
- }
-
- private _onHideLinkUnderline(e: ILinkifierEvent): void {
- this._clearCurrentLink();
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/Renderer.ts b/node_modules/xterm/src/browser/renderer/Renderer.ts
deleted file mode 100644
index a58893b..0000000
--- a/node_modules/xterm/src/browser/renderer/Renderer.ts
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { TextRenderLayer } from 'browser/renderer/TextRenderLayer';
-import { SelectionRenderLayer } from 'browser/renderer/SelectionRenderLayer';
-import { CursorRenderLayer } from 'browser/renderer/CursorRenderLayer';
-import { IRenderLayer, IRenderer, IRenderDimensions, IRequestRedrawEvent } from 'browser/renderer/Types';
-import { LinkRenderLayer } from 'browser/renderer/LinkRenderLayer';
-import { Disposable } from 'common/Lifecycle';
-import { IColorSet, ILinkifier, ILinkifier2 } from 'browser/Types';
-import { ICharSizeService } from 'browser/services/Services';
-import { IBufferService, IOptionsService, IInstantiationService } from 'common/services/Services';
-import { removeTerminalFromCache } from 'browser/renderer/atlas/CharAtlasCache';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { IDecorationOptions, IDecoration } from 'xterm';
-
-let nextRendererId = 1;
-
-export class Renderer extends Disposable implements IRenderer {
- private _id = nextRendererId++;
-
- private _renderLayers: IRenderLayer[];
- private _devicePixelRatio: number;
-
- public dimensions: IRenderDimensions;
-
- private _onRequestRedraw = new EventEmitter<IRequestRedrawEvent>();
- public get onRequestRedraw(): IEvent<IRequestRedrawEvent> { return this._onRequestRedraw.event; }
-
- constructor(
- private _colors: IColorSet,
- private readonly _screenElement: HTMLElement,
- linkifier: ILinkifier,
- linkifier2: ILinkifier2,
- @IInstantiationService instantiationService: IInstantiationService,
- @IBufferService private readonly _bufferService: IBufferService,
- @ICharSizeService private readonly _charSizeService: ICharSizeService,
- @IOptionsService private readonly _optionsService: IOptionsService
- ) {
- super();
- const allowTransparency = this._optionsService.rawOptions.allowTransparency;
- this._renderLayers = [
- instantiationService.createInstance(TextRenderLayer, this._screenElement, 0, this._colors, allowTransparency, this._id),
- instantiationService.createInstance(SelectionRenderLayer, this._screenElement, 1, this._colors, this._id),
- instantiationService.createInstance(LinkRenderLayer, this._screenElement, 2, this._colors, this._id, linkifier, linkifier2),
- instantiationService.createInstance(CursorRenderLayer, this._screenElement, 3, this._colors, this._id, this._onRequestRedraw)
- ];
- this.dimensions = {
- scaledCharWidth: 0,
- scaledCharHeight: 0,
- scaledCellWidth: 0,
- scaledCellHeight: 0,
- scaledCharLeft: 0,
- scaledCharTop: 0,
- scaledCanvasWidth: 0,
- scaledCanvasHeight: 0,
- canvasWidth: 0,
- canvasHeight: 0,
- actualCellWidth: 0,
- actualCellHeight: 0
- };
- this._devicePixelRatio = window.devicePixelRatio;
- this._updateDimensions();
- this.onOptionsChanged();
- }
-
- public dispose(): void {
- for (const l of this._renderLayers) {
- l.dispose();
- }
- super.dispose();
- removeTerminalFromCache(this._id);
- }
-
- public onDevicePixelRatioChange(): void {
- // If the device pixel ratio changed, the char atlas needs to be regenerated
- // and the terminal needs to refreshed
- if (this._devicePixelRatio !== window.devicePixelRatio) {
- this._devicePixelRatio = window.devicePixelRatio;
- this.onResize(this._bufferService.cols, this._bufferService.rows);
- }
- }
-
- public setColors(colors: IColorSet): void {
- this._colors = colors;
- // Clear layers and force a full render
- for (const l of this._renderLayers) {
- l.setColors(this._colors);
- l.reset();
- }
- }
-
- public onResize(cols: number, rows: number): void {
- // Update character and canvas dimensions
- this._updateDimensions();
-
- // Resize all render layers
- for (const l of this._renderLayers) {
- l.resize(this.dimensions);
- }
-
- // Resize the screen
- this._screenElement.style.width = `${this.dimensions.canvasWidth}px`;
- this._screenElement.style.height = `${this.dimensions.canvasHeight}px`;
- }
-
- public onCharSizeChanged(): void {
- this.onResize(this._bufferService.cols, this._bufferService.rows);
- }
-
- public onBlur(): void {
- this._runOperation(l => l.onBlur());
- }
-
- public onFocus(): void {
- this._runOperation(l => l.onFocus());
- }
-
- public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean = false): void {
- this._runOperation(l => l.onSelectionChanged(start, end, columnSelectMode));
- }
-
- public onCursorMove(): void {
- this._runOperation(l => l.onCursorMove());
- }
-
- public onOptionsChanged(): void {
- this._runOperation(l => l.onOptionsChanged());
- }
-
- public clear(): void {
- this._runOperation(l => l.reset());
- }
-
- private _runOperation(operation: (layer: IRenderLayer) => void): void {
- for (const l of this._renderLayers) {
- operation(l);
- }
- }
-
- /**
- * Performs the refresh loop callback, calling refresh only if a refresh is
- * necessary before queueing up the next one.
- */
- public renderRows(start: number, end: number): void {
- for (const l of this._renderLayers) {
- l.onGridChanged(start, end);
- }
- }
-
- public clearTextureAtlas(): void {
- for (const layer of this._renderLayers) {
- layer.clearTextureAtlas();
- }
- }
-
- /**
- * Recalculates the character and canvas dimensions.
- */
- private _updateDimensions(): void {
- if (!this._charSizeService.hasValidSize) {
- return;
- }
-
- // Calculate the scaled character width. Width is floored as it must be
- // drawn to an integer grid in order for the CharAtlas "stamps" to not be
- // blurry. When text is drawn to the grid not using the CharAtlas, it is
- // clipped to ensure there is no overlap with the next cell.
- this.dimensions.scaledCharWidth = Math.floor(this._charSizeService.width * window.devicePixelRatio);
-
- // Calculate the scaled character height. Height is ceiled in case
- // devicePixelRatio is a floating point number in order to ensure there is
- // enough space to draw the character to the cell.
- this.dimensions.scaledCharHeight = Math.ceil(this._charSizeService.height * window.devicePixelRatio);
-
- // Calculate the scaled cell height, if lineHeight is not 1 then the value
- // will be floored because since lineHeight can never be lower then 1, there
- // is a guarentee that the scaled line height will always be larger than
- // scaled char height.
- this.dimensions.scaledCellHeight = Math.floor(this.dimensions.scaledCharHeight * this._optionsService.rawOptions.lineHeight);
-
- // Calculate the y coordinate within a cell that text should draw from in
- // order to draw in the center of a cell.
- this.dimensions.scaledCharTop = this._optionsService.rawOptions.lineHeight === 1 ? 0 : Math.round((this.dimensions.scaledCellHeight - this.dimensions.scaledCharHeight) / 2);
-
- // Calculate the scaled cell width, taking the letterSpacing into account.
- this.dimensions.scaledCellWidth = this.dimensions.scaledCharWidth + Math.round(this._optionsService.rawOptions.letterSpacing);
-
- // Calculate the x coordinate with a cell that text should draw from in
- // order to draw in the center of a cell.
- this.dimensions.scaledCharLeft = Math.floor(this._optionsService.rawOptions.letterSpacing / 2);
-
- // Recalculate the canvas dimensions; scaled* define the actual number of
- // pixel in the canvas
- this.dimensions.scaledCanvasHeight = this._bufferService.rows * this.dimensions.scaledCellHeight;
- this.dimensions.scaledCanvasWidth = this._bufferService.cols * this.dimensions.scaledCellWidth;
-
- // The the size of the canvas on the page. It's very important that this
- // rounds to nearest integer and not ceils as browsers often set
- // window.devicePixelRatio as something like 1.100000023841858, when it's
- // actually 1.1. Ceiling causes blurriness as the backing canvas image is 1
- // pixel too large for the canvas element size.
- this.dimensions.canvasHeight = Math.round(this.dimensions.scaledCanvasHeight / window.devicePixelRatio);
- this.dimensions.canvasWidth = Math.round(this.dimensions.scaledCanvasWidth / window.devicePixelRatio);
-
- // Get the _actual_ dimensions of an individual cell. This needs to be
- // derived from the canvasWidth/Height calculated above which takes into
- // account window.devicePixelRatio. ICharSizeService.width/height by itself
- // is insufficient when the page is not at 100% zoom level as it's measured
- // in CSS pixels, but the actual char size on the canvas can differ.
- this.dimensions.actualCellHeight = this.dimensions.canvasHeight / this._bufferService.rows;
- this.dimensions.actualCellWidth = this.dimensions.canvasWidth / this._bufferService.cols;
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/RendererUtils.ts b/node_modules/xterm/src/browser/renderer/RendererUtils.ts
deleted file mode 100644
index 48fd26a..0000000
--- a/node_modules/xterm/src/browser/renderer/RendererUtils.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-export function throwIfFalsy<T>(value: T | undefined | null): T {
- if (!value) {
- throw new Error('value must not be falsy');
- }
- return value;
-}
diff --git a/node_modules/xterm/src/browser/renderer/SelectionRenderLayer.ts b/node_modules/xterm/src/browser/renderer/SelectionRenderLayer.ts
deleted file mode 100644
index 9054e3c..0000000
--- a/node_modules/xterm/src/browser/renderer/SelectionRenderLayer.ts
+++ /dev/null
@@ -1,128 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderDimensions } from 'browser/renderer/Types';
-import { BaseRenderLayer } from 'browser/renderer/BaseRenderLayer';
-import { IColorSet } from 'browser/Types';
-import { IBufferService, IOptionsService } from 'common/services/Services';
-
-interface ISelectionState {
- start?: [number, number];
- end?: [number, number];
- columnSelectMode?: boolean;
- ydisp?: number;
-}
-
-export class SelectionRenderLayer extends BaseRenderLayer {
- private _state!: ISelectionState;
-
- constructor(
- container: HTMLElement,
- zIndex: number,
- colors: IColorSet,
- rendererId: number,
- @IBufferService bufferService: IBufferService,
- @IOptionsService optionsService: IOptionsService
- ) {
- super(container, 'selection', zIndex, true, colors, rendererId, bufferService, optionsService);
- this._clearState();
- }
-
- private _clearState(): void {
- this._state = {
- start: undefined,
- end: undefined,
- columnSelectMode: undefined,
- ydisp: undefined
- };
- }
-
- public resize(dim: IRenderDimensions): void {
- super.resize(dim);
- // Resizing the canvas discards the contents of the canvas so clear state
- this._clearState();
- }
-
- public reset(): void {
- if (this._state.start && this._state.end) {
- this._clearState();
- this._clearAll();
- }
- }
-
- public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void {
- // Selection has not changed
- if (!this._didStateChange(start, end, columnSelectMode, this._bufferService.buffer.ydisp)) {
- return;
- }
-
- // Remove all selections
- this._clearAll();
-
- // Selection does not exist
- if (!start || !end) {
- this._clearState();
- return;
- }
-
- // Translate from buffer position to viewport position
- const viewportStartRow = start[1] - this._bufferService.buffer.ydisp;
- const viewportEndRow = end[1] - this._bufferService.buffer.ydisp;
- const viewportCappedStartRow = Math.max(viewportStartRow, 0);
- const viewportCappedEndRow = Math.min(viewportEndRow, this._bufferService.rows - 1);
-
- // No need to draw the selection
- if (viewportCappedStartRow >= this._bufferService.rows || viewportCappedEndRow < 0) {
- this._state.ydisp = this._bufferService.buffer.ydisp;
- return;
- }
-
- this._ctx.fillStyle = this._colors.selectionTransparent.css;
-
- if (columnSelectMode) {
- const startCol = start[0];
- const width = end[0] - startCol;
- const height = viewportCappedEndRow - viewportCappedStartRow + 1;
- this._fillCells(startCol, viewportCappedStartRow, width, height);
- } else {
- // Draw first row
- const startCol = viewportStartRow === viewportCappedStartRow ? start[0] : 0;
- const startRowEndCol = viewportCappedStartRow === viewportEndRow ? end[0] : this._bufferService.cols;
- this._fillCells(startCol, viewportCappedStartRow, startRowEndCol - startCol, 1);
-
- // Draw middle rows
- const middleRowsCount = Math.max(viewportCappedEndRow - viewportCappedStartRow - 1, 0);
- this._fillCells(0, viewportCappedStartRow + 1, this._bufferService.cols, middleRowsCount);
-
- // Draw final row
- if (viewportCappedStartRow !== viewportCappedEndRow) {
- // Only draw viewportEndRow if it's not the same as viewportStartRow
- const endCol = viewportEndRow === viewportCappedEndRow ? end[0] : this._bufferService.cols;
- this._fillCells(0, viewportCappedEndRow, endCol, 1);
- }
- }
-
- // Save state for next render
- this._state.start = [start[0], start[1]];
- this._state.end = [end[0], end[1]];
- this._state.columnSelectMode = columnSelectMode;
- this._state.ydisp = this._bufferService.buffer.ydisp;
- }
-
- private _didStateChange(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean, ydisp: number): boolean {
- return !this._areCoordinatesEqual(start, this._state.start) ||
- !this._areCoordinatesEqual(end, this._state.end) ||
- columnSelectMode !== this._state.columnSelectMode ||
- ydisp !== this._state.ydisp;
- }
-
- private _areCoordinatesEqual(coord1: [number, number] | undefined, coord2: [number, number] | undefined): boolean {
- if (!coord1 || !coord2) {
- return false;
- }
-
- return coord1[0] === coord2[0] && coord1[1] === coord2[1];
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/TextRenderLayer.ts b/node_modules/xterm/src/browser/renderer/TextRenderLayer.ts
deleted file mode 100644
index 33d942f..0000000
--- a/node_modules/xterm/src/browser/renderer/TextRenderLayer.ts
+++ /dev/null
@@ -1,330 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderDimensions } from 'browser/renderer/Types';
-import { CharData, ICellData } from 'common/Types';
-import { GridCache } from 'browser/renderer/GridCache';
-import { BaseRenderLayer } from 'browser/renderer/BaseRenderLayer';
-import { AttributeData } from 'common/buffer/AttributeData';
-import { NULL_CELL_CODE, Content } from 'common/buffer/Constants';
-import { IColorSet } from 'browser/Types';
-import { CellData } from 'common/buffer/CellData';
-import { IOptionsService, IBufferService } from 'common/services/Services';
-import { ICharacterJoinerService } from 'browser/services/Services';
-import { JoinedCellData } from 'browser/services/CharacterJoinerService';
-
-/**
- * This CharData looks like a null character, which will forc a clear and render
- * when the character changes (a regular space ' ' character may not as it's
- * drawn state is a cleared cell).
- */
-// const OVERLAP_OWNED_CHAR_DATA: CharData = [null, '', 0, -1];
-
-export class TextRenderLayer extends BaseRenderLayer {
- private _state: GridCache<CharData>;
- private _characterWidth: number = 0;
- private _characterFont: string = '';
- private _characterOverlapCache: { [key: string]: boolean } = {};
- private _workCell = new CellData();
-
- constructor(
- container: HTMLElement,
- zIndex: number,
- colors: IColorSet,
- alpha: boolean,
- rendererId: number,
- @IBufferService bufferService: IBufferService,
- @IOptionsService optionsService: IOptionsService,
- @ICharacterJoinerService private readonly _characterJoinerService: ICharacterJoinerService
- ) {
- super(container, 'text', zIndex, alpha, colors, rendererId, bufferService, optionsService);
- this._state = new GridCache<CharData>();
- }
-
- public resize(dim: IRenderDimensions): void {
- super.resize(dim);
-
- // Clear the character width cache if the font or width has changed
- const terminalFont = this._getFont(false, false);
- if (this._characterWidth !== dim.scaledCharWidth || this._characterFont !== terminalFont) {
- this._characterWidth = dim.scaledCharWidth;
- this._characterFont = terminalFont;
- this._characterOverlapCache = {};
- }
- // Resizing the canvas discards the contents of the canvas so clear state
- this._state.clear();
- this._state.resize(this._bufferService.cols, this._bufferService.rows);
- }
-
- public reset(): void {
- this._state.clear();
- this._clearAll();
- }
-
- private _forEachCell(
- firstRow: number,
- lastRow: number,
- callback: (
- cell: ICellData,
- x: number,
- y: number
- ) => void
- ): void {
- for (let y = firstRow; y <= lastRow; y++) {
- const row = y + this._bufferService.buffer.ydisp;
- const line = this._bufferService.buffer.lines.get(row);
- const joinedRanges = this._characterJoinerService.getJoinedCharacters(row);
- for (let x = 0; x < this._bufferService.cols; x++) {
- line!.loadCell(x, this._workCell);
- let cell = this._workCell;
-
- // If true, indicates that the current character(s) to draw were joined.
- let isJoined = false;
- let lastCharX = x;
-
- // The character to the left is a wide character, drawing is owned by
- // the char at x-1
- if (cell.getWidth() === 0) {
- continue;
- }
-
- // Process any joined character ranges as needed. Because of how the
- // ranges are produced, we know that they are valid for the characters
- // and attributes of our input.
- if (joinedRanges.length > 0 && x === joinedRanges[0][0]) {
- isJoined = true;
- const range = joinedRanges.shift()!;
-
- // We already know the exact start and end column of the joined range,
- // so we get the string and width representing it directly
- cell = new JoinedCellData(
- this._workCell,
- line!.translateToString(true, range[0], range[1]),
- range[1] - range[0]
- );
-
- // Skip over the cells occupied by this range in the loop
- lastCharX = range[1] - 1;
- }
-
- // If the character is an overlapping char and the character to the
- // right is a space, take ownership of the cell to the right. We skip
- // this check for joined characters because their rendering likely won't
- // yield the same result as rendering the last character individually.
- if (!isJoined && this._isOverlapping(cell)) {
- // If the character is overlapping, we want to force a re-render on every
- // frame. This is specifically to work around the case where two
- // overlaping chars `a` and `b` are adjacent, the cursor is moved to b and a
- // space is added. Without this, the first half of `b` would never
- // get removed, and `a` would not re-render because it thinks it's
- // already in the correct state.
- // this._state.cache[x][y] = OVERLAP_OWNED_CHAR_DATA;
- if (lastCharX < line!.length - 1 && line!.getCodePoint(lastCharX + 1) === NULL_CELL_CODE) {
- // patch width to 2
- cell.content &= ~Content.WIDTH_MASK;
- cell.content |= 2 << Content.WIDTH_SHIFT;
- // this._clearChar(x + 1, y);
- // The overlapping char's char data will force a clear and render when the
- // overlapping char is no longer to the left of the character and also when
- // the space changes to another character.
- // this._state.cache[x + 1][y] = OVERLAP_OWNED_CHAR_DATA;
- }
- }
-
- callback(
- cell,
- x,
- y
- );
-
- x = lastCharX;
- }
- }
- }
-
- /**
- * Draws the background for a specified range of columns. Tries to batch adjacent cells of the
- * same color together to reduce draw calls.
- */
- private _drawBackground(firstRow: number, lastRow: number): void {
- const ctx = this._ctx;
- const cols = this._bufferService.cols;
- let startX: number = 0;
- let startY: number = 0;
- let prevFillStyle: string | null = null;
-
- ctx.save();
-
- this._forEachCell(firstRow, lastRow, (cell, x, y) => {
- // libvte and xterm both draw the background (but not foreground) of invisible characters,
- // so we should too.
- let nextFillStyle = null; // null represents default background color
-
- if (cell.isInverse()) {
- if (cell.isFgDefault()) {
- nextFillStyle = this._colors.foreground.css;
- } else if (cell.isFgRGB()) {
- nextFillStyle = `rgb(${AttributeData.toColorRGB(cell.getFgColor()).join(',')})`;
- } else {
- nextFillStyle = this._colors.ansi[cell.getFgColor()].css;
- }
- } else if (cell.isBgRGB()) {
- nextFillStyle = `rgb(${AttributeData.toColorRGB(cell.getBgColor()).join(',')})`;
- } else if (cell.isBgPalette()) {
- nextFillStyle = this._colors.ansi[cell.getBgColor()].css;
- }
-
- if (prevFillStyle === null) {
- // This is either the first iteration, or the default background was set. Either way, we
- // don't need to draw anything.
- startX = x;
- startY = y;
- }
-
- if (y !== startY) {
- // our row changed, draw the previous row
- ctx.fillStyle = prevFillStyle || '';
- this._fillCells(startX, startY, cols - startX, 1);
- startX = x;
- startY = y;
- } else if (prevFillStyle !== nextFillStyle) {
- // our color changed, draw the previous characters in this row
- ctx.fillStyle = prevFillStyle || '';
- this._fillCells(startX, startY, x - startX, 1);
- startX = x;
- startY = y;
- }
-
- prevFillStyle = nextFillStyle;
- });
-
- // flush the last color we encountered
- if (prevFillStyle !== null) {
- ctx.fillStyle = prevFillStyle;
- this._fillCells(startX, startY, cols - startX, 1);
- }
-
- ctx.restore();
- }
-
- private _drawForeground(firstRow: number, lastRow: number): void {
- this._forEachCell(firstRow, lastRow, (cell, x, y) => {
- if (cell.isInvisible()) {
- return;
- }
- this._drawChars(cell, x, y);
- if (cell.isUnderline() || cell.isStrikethrough()) {
- this._ctx.save();
-
- if (cell.isInverse()) {
- if (cell.isBgDefault()) {
- this._ctx.fillStyle = this._colors.background.css;
- } else if (cell.isBgRGB()) {
- this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getBgColor()).join(',')})`;
- } else {
- let bg = cell.getBgColor();
- if (this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && bg < 8) {
- bg += 8;
- }
- this._ctx.fillStyle = this._colors.ansi[bg].css;
- }
- } else {
- if (cell.isFgDefault()) {
- this._ctx.fillStyle = this._colors.foreground.css;
- } else if (cell.isFgRGB()) {
- this._ctx.fillStyle = `rgb(${AttributeData.toColorRGB(cell.getFgColor()).join(',')})`;
- } else {
- let fg = cell.getFgColor();
- if (this._optionsService.rawOptions.drawBoldTextInBrightColors && cell.isBold() && fg < 8) {
- fg += 8;
- }
- this._ctx.fillStyle = this._colors.ansi[fg].css;
- }
- }
-
- if (cell.isStrikethrough()) {
- this._fillMiddleLineAtCells(x, y, cell.getWidth());
- }
- if (cell.isUnderline()) {
- this._fillBottomLineAtCells(x, y, cell.getWidth());
- }
- this._ctx.restore();
- }
- });
- }
-
- public onGridChanged(firstRow: number, lastRow: number): void {
- // Resize has not been called yet
- if (this._state.cache.length === 0) {
- return;
- }
-
- if (this._charAtlas) {
- this._charAtlas.beginFrame();
- }
-
- this._clearCells(0, firstRow, this._bufferService.cols, lastRow - firstRow + 1);
- this._drawBackground(firstRow, lastRow);
- this._drawForeground(firstRow, lastRow);
- }
-
- public onOptionsChanged(): void {
- this._setTransparency(this._optionsService.rawOptions.allowTransparency);
- }
-
- /**
- * Whether a character is overlapping to the next cell.
- */
- private _isOverlapping(cell: ICellData): boolean {
- // Only single cell characters can be overlapping, rendering issues can
- // occur without this check
- if (cell.getWidth() !== 1) {
- return false;
- }
-
- // We assume that any ascii character will not overlap
- if (cell.getCode() < 256) {
- return false;
- }
-
- const chars = cell.getChars();
-
- // Deliver from cache if available
- if (this._characterOverlapCache.hasOwnProperty(chars)) {
- return this._characterOverlapCache[chars];
- }
-
- // Setup the font
- this._ctx.save();
- this._ctx.font = this._characterFont;
-
- // Measure the width of the character, but Math.floor it
- // because that is what the renderer does when it calculates
- // the character dimensions we are comparing against
- const overlaps = Math.floor(this._ctx.measureText(chars).width) > this._characterWidth;
-
- // Restore the original context
- this._ctx.restore();
-
- // Cache and return
- this._characterOverlapCache[chars] = overlaps;
- return overlaps;
- }
-
- /**
- * Clear the charcater at the cell specified.
- * @param x The column of the char.
- * @param y The row of the char.
- */
- // private _clearChar(x: number, y: number): void {
- // let colsToClear = 1;
- // // Clear the adjacent character if it was wide
- // const state = this._state.cache[x][y];
- // if (state && state[CHAR_DATA_WIDTH_INDEX] === 2) {
- // colsToClear = 2;
- // }
- // this.clearCells(x, y, colsToClear, 1);
- // }
-}
diff --git a/node_modules/xterm/src/browser/renderer/Types.d.ts b/node_modules/xterm/src/browser/renderer/Types.d.ts
deleted file mode 100644
index 6818a92..0000000
--- a/node_modules/xterm/src/browser/renderer/Types.d.ts
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IDisposable } from 'common/Types';
-import { IColorSet } from 'browser/Types';
-import { IEvent } from 'common/EventEmitter';
-
-export interface IRenderDimensions {
- scaledCharWidth: number;
- scaledCharHeight: number;
- scaledCellWidth: number;
- scaledCellHeight: number;
- scaledCharLeft: number;
- scaledCharTop: number;
- scaledCanvasWidth: number;
- scaledCanvasHeight: number;
- canvasWidth: number;
- canvasHeight: number;
- actualCellWidth: number;
- actualCellHeight: number;
-}
-
-export interface IRequestRedrawEvent {
- start: number;
- end: number;
-}
-
-/**
- * Note that IRenderer implementations should emit the refresh event after
- * rendering rows to the screen.
- */
-export interface IRenderer extends IDisposable {
- readonly dimensions: IRenderDimensions;
-
- /**
- * Fires when the renderer is requesting to be redrawn on the next animation
- * frame but is _not_ a result of content changing (eg. selection changes).
- */
- readonly onRequestRedraw: IEvent<IRequestRedrawEvent>;
-
- dispose(): void;
- setColors(colors: IColorSet): void;
- onDevicePixelRatioChange(): void;
- onResize(cols: number, rows: number): void;
- onCharSizeChanged(): void;
- onBlur(): void;
- onFocus(): void;
- onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void;
- onCursorMove(): void;
- onOptionsChanged(): void;
- clear(): void;
- renderRows(start: number, end: number): void;
- clearTextureAtlas?(): void;
-}
-
-export interface IRenderLayer extends IDisposable {
- /**
- * Called when the terminal loses focus.
- */
- onBlur(): void;
-
- /**
- * * Called when the terminal gets focus.
- */
- onFocus(): void;
-
- /**
- * Called when the cursor is moved.
- */
- onCursorMove(): void;
-
- /**
- * Called when options change.
- */
- onOptionsChanged(): void;
-
- /**
- * Called when the theme changes.
- */
- setColors(colorSet: IColorSet): void;
-
- /**
- * Called when the data in the grid has changed (or needs to be rendered
- * again).
- */
- onGridChanged(startRow: number, endRow: number): void;
-
- /**
- * Calls when the selection changes.
- */
- onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void;
-
- /**
- * Resize the render layer.
- */
- resize(dim: IRenderDimensions): void;
-
- /**
- * Clear the state of the render layer.
- */
- reset(): void;
-
- /**
- * Clears the texture atlas.
- */
- clearTextureAtlas(): void;
-}
diff --git a/node_modules/xterm/src/browser/renderer/atlas/BaseCharAtlas.ts b/node_modules/xterm/src/browser/renderer/atlas/BaseCharAtlas.ts
deleted file mode 100644
index 83c30d2..0000000
--- a/node_modules/xterm/src/browser/renderer/atlas/BaseCharAtlas.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IGlyphIdentifier } from 'browser/renderer/atlas/Types';
-import { IDisposable } from 'common/Types';
-
-export abstract class BaseCharAtlas implements IDisposable {
- private _didWarmUp: boolean = false;
-
- public dispose(): void { }
-
- /**
- * Perform any work needed to warm the cache before it can be used. May be called multiple times.
- * Implement _doWarmUp instead if you only want to get called once.
- */
- public warmUp(): void {
- if (!this._didWarmUp) {
- this._doWarmUp();
- this._didWarmUp = true;
- }
- }
-
- /**
- * Perform any work needed to warm the cache before it can be used. Used by the default
- * implementation of warmUp(), and will only be called once.
- */
- private _doWarmUp(): void { }
-
- public clear(): void { }
-
- /**
- * Called when we start drawing a new frame.
- *
- * TODO: We rely on this getting called by TextRenderLayer. This should really be called by
- * Renderer instead, but we need to make Renderer the source-of-truth for the char atlas, instead
- * of BaseRenderLayer.
- */
- public beginFrame(): void { }
-
- /**
- * May be called before warmUp finishes, however it is okay for the implementation to
- * do nothing and return false in that case.
- *
- * @param ctx Where to draw the character onto.
- * @param glyph Information about what to draw
- * @param x The position on the context to start drawing at
- * @param y The position on the context to start drawing at
- * @returns The success state. True if we drew the character.
- */
- public abstract draw(
- ctx: CanvasRenderingContext2D,
- glyph: IGlyphIdentifier,
- x: number,
- y: number
- ): boolean;
-}
diff --git a/node_modules/xterm/src/browser/renderer/atlas/CharAtlasCache.ts b/node_modules/xterm/src/browser/renderer/atlas/CharAtlasCache.ts
deleted file mode 100644
index 257835b..0000000
--- a/node_modules/xterm/src/browser/renderer/atlas/CharAtlasCache.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { generateConfig, configEquals } from 'browser/renderer/atlas/CharAtlasUtils';
-import { BaseCharAtlas } from 'browser/renderer/atlas/BaseCharAtlas';
-import { DynamicCharAtlas } from 'browser/renderer/atlas/DynamicCharAtlas';
-import { ICharAtlasConfig } from 'browser/renderer/atlas/Types';
-import { IColorSet } from 'browser/Types';
-import { ITerminalOptions } from 'common/services/Services';
-
-interface ICharAtlasCacheEntry {
- atlas: BaseCharAtlas;
- config: ICharAtlasConfig;
- // N.B. This implementation potentially holds onto copies of the terminal forever, so
- // this may cause memory leaks.
- ownedBy: number[];
-}
-
-const charAtlasCache: ICharAtlasCacheEntry[] = [];
-
-/**
- * Acquires a char atlas, either generating a new one or returning an existing
- * one that is in use by another terminal.
- */
-export function acquireCharAtlas(
- options: ITerminalOptions,
- rendererId: number,
- colors: IColorSet,
- scaledCharWidth: number,
- scaledCharHeight: number
-): BaseCharAtlas {
- const newConfig = generateConfig(scaledCharWidth, scaledCharHeight, options, colors);
-
- // Check to see if the renderer already owns this config
- for (let i = 0; i < charAtlasCache.length; i++) {
- const entry = charAtlasCache[i];
- const ownedByIndex = entry.ownedBy.indexOf(rendererId);
- if (ownedByIndex >= 0) {
- if (configEquals(entry.config, newConfig)) {
- return entry.atlas;
- }
- // The configs differ, release the renderer from the entry
- if (entry.ownedBy.length === 1) {
- entry.atlas.dispose();
- charAtlasCache.splice(i, 1);
- } else {
- entry.ownedBy.splice(ownedByIndex, 1);
- }
- break;
- }
- }
-
- // Try match a char atlas from the cache
- for (let i = 0; i < charAtlasCache.length; i++) {
- const entry = charAtlasCache[i];
- if (configEquals(entry.config, newConfig)) {
- // Add the renderer to the cache entry and return
- entry.ownedBy.push(rendererId);
- return entry.atlas;
- }
- }
-
- const newEntry: ICharAtlasCacheEntry = {
- atlas: new DynamicCharAtlas(
- document,
- newConfig
- ),
- config: newConfig,
- ownedBy: [rendererId]
- };
- charAtlasCache.push(newEntry);
- return newEntry.atlas;
-}
-
-/**
- * Removes a terminal reference from the cache, allowing its memory to be freed.
- */
-export function removeTerminalFromCache(rendererId: number): void {
- for (let i = 0; i < charAtlasCache.length; i++) {
- const index = charAtlasCache[i].ownedBy.indexOf(rendererId);
- if (index !== -1) {
- if (charAtlasCache[i].ownedBy.length === 1) {
- // Remove the cache entry if it's the only renderer
- charAtlasCache[i].atlas.dispose();
- charAtlasCache.splice(i, 1);
- } else {
- // Remove the reference from the cache entry
- charAtlasCache[i].ownedBy.splice(index, 1);
- }
- break;
- }
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/atlas/CharAtlasUtils.ts b/node_modules/xterm/src/browser/renderer/atlas/CharAtlasUtils.ts
deleted file mode 100644
index be92727..0000000
--- a/node_modules/xterm/src/browser/renderer/atlas/CharAtlasUtils.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ICharAtlasConfig } from 'browser/renderer/atlas/Types';
-import { DEFAULT_COLOR } from 'common/buffer/Constants';
-import { IColorSet, IPartialColorSet } from 'browser/Types';
-import { ITerminalOptions } from 'common/services/Services';
-
-export function generateConfig(scaledCharWidth: number, scaledCharHeight: number, options: ITerminalOptions, colors: IColorSet): ICharAtlasConfig {
- // null out some fields that don't matter
- const clonedColors: IPartialColorSet = {
- foreground: colors.foreground,
- background: colors.background,
- cursor: undefined,
- cursorAccent: undefined,
- selection: undefined,
- ansi: [...colors.ansi]
- };
- return {
- devicePixelRatio: window.devicePixelRatio,
- scaledCharWidth,
- scaledCharHeight,
- fontFamily: options.fontFamily,
- fontSize: options.fontSize,
- fontWeight: options.fontWeight,
- fontWeightBold: options.fontWeightBold,
- allowTransparency: options.allowTransparency,
- colors: clonedColors
- };
-}
-
-export function configEquals(a: ICharAtlasConfig, b: ICharAtlasConfig): boolean {
- for (let i = 0; i < a.colors.ansi.length; i++) {
- if (a.colors.ansi[i].rgba !== b.colors.ansi[i].rgba) {
- return false;
- }
- }
- return a.devicePixelRatio === b.devicePixelRatio &&
- a.fontFamily === b.fontFamily &&
- a.fontSize === b.fontSize &&
- a.fontWeight === b.fontWeight &&
- a.fontWeightBold === b.fontWeightBold &&
- a.allowTransparency === b.allowTransparency &&
- a.scaledCharWidth === b.scaledCharWidth &&
- a.scaledCharHeight === b.scaledCharHeight &&
- a.colors.foreground === b.colors.foreground &&
- a.colors.background === b.colors.background;
-}
-
-export function is256Color(colorCode: number): boolean {
- return colorCode < DEFAULT_COLOR;
-}
diff --git a/node_modules/xterm/src/browser/renderer/atlas/Constants.ts b/node_modules/xterm/src/browser/renderer/atlas/Constants.ts
deleted file mode 100644
index c1701e9..0000000
--- a/node_modules/xterm/src/browser/renderer/atlas/Constants.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { isFirefox, isLegacyEdge } from 'common/Platform';
-
-export const INVERTED_DEFAULT_COLOR = 257;
-export const DIM_OPACITY = 0.5;
-// The text baseline is set conditionally by browser. Using 'ideographic' for Firefox or Legacy Edge would
-// result in truncated text (Issue 3353). Using 'bottom' for Chrome would result in slightly
-// unaligned Powerline fonts (PR 3356#issuecomment-850928179).
-export const TEXT_BASELINE: CanvasTextBaseline = isFirefox || isLegacyEdge ? 'bottom' : 'ideographic';
-
-export const CHAR_ATLAS_CELL_SPACING = 1;
diff --git a/node_modules/xterm/src/browser/renderer/atlas/DynamicCharAtlas.ts b/node_modules/xterm/src/browser/renderer/atlas/DynamicCharAtlas.ts
deleted file mode 100644
index 118dbcd..0000000
--- a/node_modules/xterm/src/browser/renderer/atlas/DynamicCharAtlas.ts
+++ /dev/null
@@ -1,404 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { DIM_OPACITY, INVERTED_DEFAULT_COLOR, TEXT_BASELINE } from 'browser/renderer/atlas/Constants';
-import { IGlyphIdentifier, ICharAtlasConfig } from 'browser/renderer/atlas/Types';
-import { BaseCharAtlas } from 'browser/renderer/atlas/BaseCharAtlas';
-import { DEFAULT_ANSI_COLORS } from 'browser/ColorManager';
-import { LRUMap } from 'browser/renderer/atlas/LRUMap';
-import { isFirefox, isSafari } from 'common/Platform';
-import { IColor } from 'browser/Types';
-import { throwIfFalsy } from 'browser/renderer/RendererUtils';
-import { color } from 'browser/Color';
-
-// In practice we're probably never going to exhaust a texture this large. For debugging purposes,
-// however, it can be useful to set this to a really tiny value, to verify that LRU eviction works.
-const TEXTURE_WIDTH = 1024;
-const TEXTURE_HEIGHT = 1024;
-
-const TRANSPARENT_COLOR = {
- css: 'rgba(0, 0, 0, 0)',
- rgba: 0
-};
-
-// Drawing to the cache is expensive: If we have to draw more than this number of glyphs to the
-// cache in a single frame, give up on trying to cache anything else, and try to finish the current
-// frame ASAP.
-//
-// This helps to limit the amount of damage a program can do when it would otherwise thrash the
-// cache.
-const FRAME_CACHE_DRAW_LIMIT = 100;
-
-/**
- * The number of milliseconds to wait before generating the ImageBitmap, this is to debounce/batch
- * the operation as window.createImageBitmap is asynchronous.
- */
-const GLYPH_BITMAP_COMMIT_DELAY = 100;
-
-interface IGlyphCacheValue {
- index: number;
- isEmpty: boolean;
- inBitmap: boolean;
-}
-
-export function getGlyphCacheKey(glyph: IGlyphIdentifier): number {
- // Note that this only returns a valid key when code < 256
- // Layout:
- // 0b00000000000000000000000000000001: italic (1)
- // 0b00000000000000000000000000000010: dim (1)
- // 0b00000000000000000000000000000100: bold (1)
- // 0b00000000000000000000111111111000: fg (9)
- // 0b00000000000111111111000000000000: bg (9)
- // 0b00011111111000000000000000000000: code (8)
- // 0b11100000000000000000000000000000: unused (3)
- return glyph.code << 21 | glyph.bg << 12 | glyph.fg << 3 | (glyph.bold ? 0 : 4) + (glyph.dim ? 0 : 2) + (glyph.italic ? 0 : 1);
-}
-
-export class DynamicCharAtlas extends BaseCharAtlas {
- // An ordered map that we're using to keep track of where each glyph is in the atlas texture.
- // It's ordered so that we can determine when to remove the old entries.
- private _cacheMap: LRUMap<IGlyphCacheValue>;
-
- // The texture that the atlas is drawn to
- private _cacheCanvas: HTMLCanvasElement;
- private _cacheCtx: CanvasRenderingContext2D;
-
- // A temporary context that glyphs are drawn to before being transfered to the atlas.
- private _tmpCtx: CanvasRenderingContext2D;
-
- // The number of characters stored in the atlas by width/height
- private _width: number;
- private _height: number;
-
- private _drawToCacheCount: number = 0;
-
- // An array of glyph keys that are waiting on the bitmap to be generated.
- private _glyphsWaitingOnBitmap: IGlyphCacheValue[] = [];
-
- // The timeout that is used to batch bitmap generation so it's not requested for every new glyph.
- private _bitmapCommitTimeout: number | null = null;
-
- // The bitmap to draw from, this is much faster on other browsers than others.
- private _bitmap: ImageBitmap | null = null;
-
- constructor(document: Document, private _config: ICharAtlasConfig) {
- super();
- this._cacheCanvas = document.createElement('canvas');
- this._cacheCanvas.width = TEXTURE_WIDTH;
- this._cacheCanvas.height = TEXTURE_HEIGHT;
- // The canvas needs alpha because we use clearColor to convert the background color to alpha.
- // It might also contain some characters with transparent backgrounds if allowTransparency is
- // set.
- this._cacheCtx = throwIfFalsy(this._cacheCanvas.getContext('2d', { alpha: true }));
-
- const tmpCanvas = document.createElement('canvas');
- tmpCanvas.width = this._config.scaledCharWidth;
- tmpCanvas.height = this._config.scaledCharHeight;
- this._tmpCtx = throwIfFalsy(tmpCanvas.getContext('2d', { alpha: this._config.allowTransparency }));
-
- this._width = Math.floor(TEXTURE_WIDTH / this._config.scaledCharWidth);
- this._height = Math.floor(TEXTURE_HEIGHT / this._config.scaledCharHeight);
- const capacity = this._width * this._height;
- this._cacheMap = new LRUMap(capacity);
- this._cacheMap.prealloc(capacity);
-
- // This is useful for debugging
- // document.body.appendChild(this._cacheCanvas);
- }
-
- public dispose(): void {
- if (this._bitmapCommitTimeout !== null) {
- window.clearTimeout(this._bitmapCommitTimeout);
- this._bitmapCommitTimeout = null;
- }
- }
-
- public beginFrame(): void {
- this._drawToCacheCount = 0;
- }
-
- public clear(): void {
- if (this._cacheMap.size > 0) {
- const capacity = this._width * this._height;
- this._cacheMap = new LRUMap(capacity);
- this._cacheMap.prealloc(capacity);
- }
- this._cacheCtx.clearRect(0, 0, TEXTURE_WIDTH, TEXTURE_HEIGHT);
- this._tmpCtx.clearRect(0, 0, this._config.scaledCharWidth, this._config.scaledCharHeight);
- }
-
- public draw(
- ctx: CanvasRenderingContext2D,
- glyph: IGlyphIdentifier,
- x: number,
- y: number
- ): boolean {
- // Space is always an empty cell, special case this as it's so common
- if (glyph.code === 32) {
- return true;
- }
-
- // Exit early for uncachable glyphs
- if (!this._canCache(glyph)) {
- return false;
- }
-
- const glyphKey = getGlyphCacheKey(glyph);
- const cacheValue = this._cacheMap.get(glyphKey);
- if (cacheValue !== null && cacheValue !== undefined) {
- this._drawFromCache(ctx, cacheValue, x, y);
- return true;
- }
- if (this._drawToCacheCount < FRAME_CACHE_DRAW_LIMIT) {
- let index;
- if (this._cacheMap.size < this._cacheMap.capacity) {
- index = this._cacheMap.size;
- } else {
- // we're out of space, so our call to set will delete this item
- index = this._cacheMap.peek()!.index;
- }
- const cacheValue = this._drawToCache(glyph, index);
- this._cacheMap.set(glyphKey, cacheValue);
- this._drawFromCache(ctx, cacheValue, x, y);
- return true;
- }
- return false;
- }
-
- private _canCache(glyph: IGlyphIdentifier): boolean {
- // Only cache ascii and extended characters for now, to be safe. In the future, we could do
- // something more complicated to determine the expected width of a character.
- //
- // If we switch the renderer over to webgl at some point, we may be able to use blending modes
- // to draw overlapping glyphs from the atlas:
- // https://github.com/servo/webrender/issues/464#issuecomment-255632875
- // https://webglfundamentals.org/webgl/lessons/webgl-text-texture.html
- return glyph.code < 256;
- }
-
- private _toCoordinateX(index: number): number {
- return (index % this._width) * this._config.scaledCharWidth;
- }
-
- private _toCoordinateY(index: number): number {
- return Math.floor(index / this._width) * this._config.scaledCharHeight;
- }
-
- private _drawFromCache(
- ctx: CanvasRenderingContext2D,
- cacheValue: IGlyphCacheValue,
- x: number,
- y: number
- ): void {
- // We don't actually need to do anything if this is whitespace.
- if (cacheValue.isEmpty) {
- return;
- }
- const cacheX = this._toCoordinateX(cacheValue.index);
- const cacheY = this._toCoordinateY(cacheValue.index);
- ctx.drawImage(
- cacheValue.inBitmap ? this._bitmap! : this._cacheCanvas,
- cacheX,
- cacheY,
- this._config.scaledCharWidth,
- this._config.scaledCharHeight,
- x,
- y,
- this._config.scaledCharWidth,
- this._config.scaledCharHeight
- );
- }
-
- private _getColorFromAnsiIndex(idx: number): IColor {
- if (idx < this._config.colors.ansi.length) {
- return this._config.colors.ansi[idx];
- }
- return DEFAULT_ANSI_COLORS[idx];
- }
-
- private _getBackgroundColor(glyph: IGlyphIdentifier): IColor {
- if (this._config.allowTransparency) {
- // The background color might have some transparency, so we need to render it as fully
- // transparent in the atlas. Otherwise we'd end up drawing the transparent background twice
- // around the anti-aliased edges of the glyph, and it would look too dark.
- return TRANSPARENT_COLOR;
- }
- if (glyph.bg === INVERTED_DEFAULT_COLOR) {
- return this._config.colors.foreground;
- }
- if (glyph.bg < 256) {
- return this._getColorFromAnsiIndex(glyph.bg);
- }
- return this._config.colors.background;
- }
-
- private _getForegroundColor(glyph: IGlyphIdentifier): IColor {
- if (glyph.fg === INVERTED_DEFAULT_COLOR) {
- return color.opaque(this._config.colors.background);
- }
- if (glyph.fg < 256) {
- // 256 color support
- return this._getColorFromAnsiIndex(glyph.fg);
- }
- return this._config.colors.foreground;
- }
-
- // TODO: We do this (or something similar) in multiple places. We should split this off
- // into a shared function.
- private _drawToCache(glyph: IGlyphIdentifier, index: number): IGlyphCacheValue {
- this._drawToCacheCount++;
-
- this._tmpCtx.save();
-
- // draw the background
- const backgroundColor = this._getBackgroundColor(glyph);
- // Use a 'copy' composite operation to clear any existing glyph out of _tmpCtxWithAlpha, regardless of
- // transparency in backgroundColor
- this._tmpCtx.globalCompositeOperation = 'copy';
- this._tmpCtx.fillStyle = backgroundColor.css;
- this._tmpCtx.fillRect(0, 0, this._config.scaledCharWidth, this._config.scaledCharHeight);
- this._tmpCtx.globalCompositeOperation = 'source-over';
-
- // draw the foreground/glyph
- const fontWeight = glyph.bold ? this._config.fontWeightBold : this._config.fontWeight;
- const fontStyle = glyph.italic ? 'italic' : '';
- this._tmpCtx.font =
- `${fontStyle} ${fontWeight} ${this._config.fontSize * this._config.devicePixelRatio}px ${this._config.fontFamily}`;
- this._tmpCtx.textBaseline = TEXT_BASELINE;
-
- this._tmpCtx.fillStyle = this._getForegroundColor(glyph).css;
-
- // Apply alpha to dim the character
- if (glyph.dim) {
- this._tmpCtx.globalAlpha = DIM_OPACITY;
- }
- // Draw the character
- this._tmpCtx.fillText(glyph.chars, 0, this._config.scaledCharHeight);
-
- // clear the background from the character to avoid issues with drawing over the previous
- // character if it extends past it's bounds
- let imageData = this._tmpCtx.getImageData(
- 0, 0, this._config.scaledCharWidth, this._config.scaledCharHeight
- );
- let isEmpty = false;
- if (!this._config.allowTransparency) {
- isEmpty = clearColor(imageData, backgroundColor);
- }
-
- // If this charcater is underscore and empty, shift it up until it is visible, try for a maximum
- // of 5 pixels.
- if (isEmpty && glyph.chars === '_' && !this._config.allowTransparency) {
- for (let offset = 1; offset <= 5; offset++) {
- // Draw the character
- this._tmpCtx.fillText(glyph.chars, 0, this._config.scaledCharHeight - offset);
-
- // clear the background from the character to avoid issues with drawing over the previous
- // character if it extends past it's bounds
- imageData = this._tmpCtx.getImageData(
- 0, 0, this._config.scaledCharWidth, this._config.scaledCharHeight
- );
- isEmpty = clearColor(imageData, backgroundColor);
- if (!isEmpty) {
- break;
- }
- }
- }
-
- this._tmpCtx.restore();
-
- // copy the data from imageData to _cacheCanvas
- const x = this._toCoordinateX(index);
- const y = this._toCoordinateY(index);
- // putImageData doesn't do any blending, so it will overwrite any existing cache entry for us
- this._cacheCtx.putImageData(imageData, x, y);
-
- // Add the glyph and queue it to the bitmap (if the browser supports it)
- const cacheValue = {
- index,
- isEmpty,
- inBitmap: false
- };
- this._addGlyphToBitmap(cacheValue);
-
- return cacheValue;
- }
-
- private _addGlyphToBitmap(cacheValue: IGlyphCacheValue): void {
- // Support is patchy for createImageBitmap at the moment, pass a canvas back
- // if support is lacking as drawImage works there too. Firefox is also
- // included here as ImageBitmap appears both buggy and has horrible
- // performance (tested on v55).
- if (!('createImageBitmap' in window) || isFirefox || isSafari) {
- return;
- }
-
- // Add the glyph to the queue
- this._glyphsWaitingOnBitmap.push(cacheValue);
-
- // Check if bitmap generation timeout already exists
- if (this._bitmapCommitTimeout !== null) {
- return;
- }
-
- this._bitmapCommitTimeout = window.setTimeout(() => this._generateBitmap(), GLYPH_BITMAP_COMMIT_DELAY);
- }
-
- private _generateBitmap(): void {
- const glyphsMovingToBitmap = this._glyphsWaitingOnBitmap;
- this._glyphsWaitingOnBitmap = [];
- window.createImageBitmap(this._cacheCanvas).then(bitmap => {
- // Set bitmap
- this._bitmap = bitmap;
-
- // Mark all new glyphs as in bitmap, excluding glyphs that came in after
- // the bitmap was requested
- for (let i = 0; i < glyphsMovingToBitmap.length; i++) {
- const value = glyphsMovingToBitmap[i];
- // It doesn't matter if the value was already evicted, it will be
- // released from memory after this block if so.
- value.inBitmap = true;
- }
- });
- this._bitmapCommitTimeout = null;
- }
-}
-
-// This is used for debugging the renderer, just swap out `new DynamicCharAtlas` with
-// `new NoneCharAtlas`.
-export class NoneCharAtlas extends BaseCharAtlas {
- constructor(document: Document, config: ICharAtlasConfig) {
- super();
- }
-
- public draw(
- ctx: CanvasRenderingContext2D,
- glyph: IGlyphIdentifier,
- x: number,
- y: number
- ): boolean {
- return false;
- }
-}
-
-/**
- * Makes a partiicular rgb color in an ImageData completely transparent.
- * @returns True if the result is "empty", meaning all pixels are fully transparent.
- */
-function clearColor(imageData: ImageData, color: IColor): boolean {
- let isEmpty = true;
- const r = color.rgba >>> 24;
- const g = color.rgba >>> 16 & 0xFF;
- const b = color.rgba >>> 8 & 0xFF;
- for (let offset = 0; offset < imageData.data.length; offset += 4) {
- if (imageData.data[offset] === r &&
- imageData.data[offset + 1] === g &&
- imageData.data[offset + 2] === b) {
- imageData.data[offset + 3] = 0;
- } else {
- isEmpty = false;
- }
- }
- return isEmpty;
-}
diff --git a/node_modules/xterm/src/browser/renderer/atlas/LRUMap.ts b/node_modules/xterm/src/browser/renderer/atlas/LRUMap.ts
deleted file mode 100644
index f70962f..0000000
--- a/node_modules/xterm/src/browser/renderer/atlas/LRUMap.ts
+++ /dev/null
@@ -1,136 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-interface ILinkedListNode<T> {
- prev: ILinkedListNode<T> | null;
- next: ILinkedListNode<T> | null;
- key: number | null;
- value: T | null;
-}
-
-export class LRUMap<T> {
- private _map: { [key: number]: ILinkedListNode<T> } = {};
- private _head: ILinkedListNode<T> | null = null;
- private _tail: ILinkedListNode<T> | null = null;
- private _nodePool: ILinkedListNode<T>[] = [];
- public size: number = 0;
-
- constructor(public capacity: number) { }
-
- private _unlinkNode(node: ILinkedListNode<T>): void {
- const prev = node.prev;
- const next = node.next;
- if (node === this._head) {
- this._head = next;
- }
- if (node === this._tail) {
- this._tail = prev;
- }
- if (prev !== null) {
- prev.next = next;
- }
- if (next !== null) {
- next.prev = prev;
- }
- }
-
- private _appendNode(node: ILinkedListNode<T>): void {
- const tail = this._tail;
- if (tail !== null) {
- tail.next = node;
- }
- node.prev = tail;
- node.next = null;
- this._tail = node;
- if (this._head === null) {
- this._head = node;
- }
- }
-
- /**
- * Preallocate a bunch of linked-list nodes. Allocating these nodes ahead of time means that
- * they're more likely to live next to each other in memory, which seems to improve performance.
- *
- * Each empty object only consumes about 60 bytes of memory, so this is pretty cheap, even for
- * large maps.
- */
- public prealloc(count: number): void {
- const nodePool = this._nodePool;
- for (let i = 0; i < count; i++) {
- nodePool.push({
- prev: null,
- next: null,
- key: null,
- value: null
- });
- }
- }
-
- public get(key: number): T | null {
- // This is unsafe: We're assuming our keyspace doesn't overlap with Object.prototype. However,
- // it's faster than calling hasOwnProperty, and in our case, it would never overlap.
- const node = this._map[key];
- if (node !== undefined) {
- this._unlinkNode(node);
- this._appendNode(node);
- return node.value;
- }
- return null;
- }
-
- /**
- * Gets a value from a key without marking it as the most recently used item.
- */
- public peekValue(key: number): T | null {
- const node = this._map[key];
- if (node !== undefined) {
- return node.value;
- }
- return null;
- }
-
- public peek(): T | null {
- const head = this._head;
- return head === null ? null : head.value;
- }
-
- public set(key: number, value: T): void {
- // This is unsafe: See note above.
- let node = this._map[key];
- if (node !== undefined) {
- // already exists, we just need to mutate it and move it to the end of the list
- node = this._map[key];
- this._unlinkNode(node);
- node.value = value;
- } else if (this.size >= this.capacity) {
- // we're out of space: recycle the head node, move it to the tail
- node = this._head!;
- this._unlinkNode(node);
- delete this._map[node.key!];
- node.key = key;
- node.value = value;
- this._map[key] = node;
- } else {
- // make a new element
- const nodePool = this._nodePool;
- if (nodePool.length > 0) {
- // use a preallocated node if we can
- node = nodePool.pop()!;
- node.key = key;
- node.value = value;
- } else {
- node = {
- prev: null,
- next: null,
- key,
- value
- };
- }
- this._map[key] = node;
- this.size++;
- }
- this._appendNode(node);
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/atlas/Types.d.ts b/node_modules/xterm/src/browser/renderer/atlas/Types.d.ts
deleted file mode 100644
index d8bc54c..0000000
--- a/node_modules/xterm/src/browser/renderer/atlas/Types.d.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { FontWeight } from 'common/services/Services';
-import { IPartialColorSet } from 'browser/Types';
-
-export interface IGlyphIdentifier {
- chars: string;
- code: number;
- bg: number;
- fg: number;
- bold: boolean;
- dim: boolean;
- italic: boolean;
-}
-
-export interface ICharAtlasConfig {
- devicePixelRatio: number;
- fontSize: number;
- fontFamily: string;
- fontWeight: FontWeight;
- fontWeightBold: FontWeight;
- scaledCharWidth: number;
- scaledCharHeight: number;
- allowTransparency: boolean;
- colors: IPartialColorSet;
-}
diff --git a/node_modules/xterm/src/browser/renderer/dom/DomRenderer.ts b/node_modules/xterm/src/browser/renderer/dom/DomRenderer.ts
deleted file mode 100644
index ee28339..0000000
--- a/node_modules/xterm/src/browser/renderer/dom/DomRenderer.ts
+++ /dev/null
@@ -1,400 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderer, IRenderDimensions, IRequestRedrawEvent } from 'browser/renderer/Types';
-import { BOLD_CLASS, ITALIC_CLASS, CURSOR_CLASS, CURSOR_STYLE_BLOCK_CLASS, CURSOR_BLINK_CLASS, CURSOR_STYLE_BAR_CLASS, CURSOR_STYLE_UNDERLINE_CLASS, DomRendererRowFactory } from 'browser/renderer/dom/DomRendererRowFactory';
-import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants';
-import { Disposable } from 'common/Lifecycle';
-import { IColorSet, ILinkifierEvent, ILinkifier, ILinkifier2 } from 'browser/Types';
-import { ICharSizeService } from 'browser/services/Services';
-import { IOptionsService, IBufferService, IInstantiationService } from 'common/services/Services';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { color } from 'browser/Color';
-import { removeElementFromParent } from 'browser/Dom';
-
-const TERMINAL_CLASS_PREFIX = 'xterm-dom-renderer-owner-';
-const ROW_CONTAINER_CLASS = 'xterm-rows';
-const FG_CLASS_PREFIX = 'xterm-fg-';
-const BG_CLASS_PREFIX = 'xterm-bg-';
-const FOCUS_CLASS = 'xterm-focus';
-const SELECTION_CLASS = 'xterm-selection';
-
-let nextTerminalId = 1;
-
-/**
- * A fallback renderer for when canvas is slow. This is not meant to be
- * particularly fast or feature complete, more just stable and usable for when
- * canvas is not an option.
- */
-export class DomRenderer extends Disposable implements IRenderer {
- private _rowFactory: DomRendererRowFactory;
- private _terminalClass: number = nextTerminalId++;
-
- private _themeStyleElement!: HTMLStyleElement;
- private _dimensionsStyleElement!: HTMLStyleElement;
- private _rowContainer: HTMLElement;
- private _rowElements: HTMLElement[] = [];
- private _selectionContainer: HTMLElement;
-
- public dimensions: IRenderDimensions;
-
- public get onRequestRedraw(): IEvent<IRequestRedrawEvent> { return new EventEmitter<IRequestRedrawEvent>().event; }
-
- constructor(
- private _colors: IColorSet,
- private readonly _element: HTMLElement,
- private readonly _screenElement: HTMLElement,
- private readonly _viewportElement: HTMLElement,
- private readonly _linkifier: ILinkifier,
- private readonly _linkifier2: ILinkifier2,
- @IInstantiationService instantiationService: IInstantiationService,
- @ICharSizeService private readonly _charSizeService: ICharSizeService,
- @IOptionsService private readonly _optionsService: IOptionsService,
- @IBufferService private readonly _bufferService: IBufferService
- ) {
- super();
- this._rowContainer = document.createElement('div');
- this._rowContainer.classList.add(ROW_CONTAINER_CLASS);
- this._rowContainer.style.lineHeight = 'normal';
- this._rowContainer.setAttribute('aria-hidden', 'true');
- this._refreshRowElements(this._bufferService.cols, this._bufferService.rows);
- this._selectionContainer = document.createElement('div');
- this._selectionContainer.classList.add(SELECTION_CLASS);
- this._selectionContainer.setAttribute('aria-hidden', 'true');
-
- this.dimensions = {
- scaledCharWidth: 0,
- scaledCharHeight: 0,
- scaledCellWidth: 0,
- scaledCellHeight: 0,
- scaledCharLeft: 0,
- scaledCharTop: 0,
- scaledCanvasWidth: 0,
- scaledCanvasHeight: 0,
- canvasWidth: 0,
- canvasHeight: 0,
- actualCellWidth: 0,
- actualCellHeight: 0
- };
- this._updateDimensions();
- this._injectCss();
-
- this._rowFactory = instantiationService.createInstance(DomRendererRowFactory, document, this._colors);
-
- this._element.classList.add(TERMINAL_CLASS_PREFIX + this._terminalClass);
- this._screenElement.appendChild(this._rowContainer);
- this._screenElement.appendChild(this._selectionContainer);
-
- this._linkifier.onShowLinkUnderline(e => this._onLinkHover(e));
- this._linkifier.onHideLinkUnderline(e => this._onLinkLeave(e));
-
- this._linkifier2.onShowLinkUnderline(e => this._onLinkHover(e));
- this._linkifier2.onHideLinkUnderline(e => this._onLinkLeave(e));
- }
-
- public dispose(): void {
- this._element.classList.remove(TERMINAL_CLASS_PREFIX + this._terminalClass);
-
- // Outside influences such as React unmounts may manipulate the DOM before our disposal.
- // https://github.com/xtermjs/xterm.js/issues/2960
- removeElementFromParent(this._rowContainer, this._selectionContainer, this._themeStyleElement, this._dimensionsStyleElement);
-
- super.dispose();
- }
-
- private _updateDimensions(): void {
- this.dimensions.scaledCharWidth = this._charSizeService.width * window.devicePixelRatio;
- this.dimensions.scaledCharHeight = Math.ceil(this._charSizeService.height * window.devicePixelRatio);
- this.dimensions.scaledCellWidth = this.dimensions.scaledCharWidth + Math.round(this._optionsService.rawOptions.letterSpacing);
- this.dimensions.scaledCellHeight = Math.floor(this.dimensions.scaledCharHeight * this._optionsService.rawOptions.lineHeight);
- this.dimensions.scaledCharLeft = 0;
- this.dimensions.scaledCharTop = 0;
- this.dimensions.scaledCanvasWidth = this.dimensions.scaledCellWidth * this._bufferService.cols;
- this.dimensions.scaledCanvasHeight = this.dimensions.scaledCellHeight * this._bufferService.rows;
- this.dimensions.canvasWidth = Math.round(this.dimensions.scaledCanvasWidth / window.devicePixelRatio);
- this.dimensions.canvasHeight = Math.round(this.dimensions.scaledCanvasHeight / window.devicePixelRatio);
- this.dimensions.actualCellWidth = this.dimensions.canvasWidth / this._bufferService.cols;
- this.dimensions.actualCellHeight = this.dimensions.canvasHeight / this._bufferService.rows;
-
- for (const element of this._rowElements) {
- element.style.width = `${this.dimensions.canvasWidth}px`;
- element.style.height = `${this.dimensions.actualCellHeight}px`;
- element.style.lineHeight = `${this.dimensions.actualCellHeight}px`;
- // Make sure rows don't overflow onto following row
- element.style.overflow = 'hidden';
- }
-
- if (!this._dimensionsStyleElement) {
- this._dimensionsStyleElement = document.createElement('style');
- this._screenElement.appendChild(this._dimensionsStyleElement);
- }
-
- const styles =
- `${this._terminalSelector} .${ROW_CONTAINER_CLASS} span {` +
- ` display: inline-block;` +
- ` height: 100%;` +
- ` vertical-align: top;` +
- ` width: ${this.dimensions.actualCellWidth}px` +
- `}`;
-
- this._dimensionsStyleElement.textContent = styles;
-
- this._selectionContainer.style.height = this._viewportElement.style.height;
- this._screenElement.style.width = `${this.dimensions.canvasWidth}px`;
- this._screenElement.style.height = `${this.dimensions.canvasHeight}px`;
- }
-
- public setColors(colors: IColorSet): void {
- this._colors = colors;
- this._injectCss();
- }
-
- private _injectCss(): void {
- if (!this._themeStyleElement) {
- this._themeStyleElement = document.createElement('style');
- this._screenElement.appendChild(this._themeStyleElement);
- }
-
- // Base CSS
- let styles =
- `${this._terminalSelector} .${ROW_CONTAINER_CLASS} {` +
- ` color: ${this._colors.foreground.css};` +
- ` font-family: ${this._optionsService.rawOptions.fontFamily};` +
- ` font-size: ${this._optionsService.rawOptions.fontSize}px;` +
- `}`;
- // Text styles
- styles +=
- `${this._terminalSelector} span:not(.${BOLD_CLASS}) {` +
- ` font-weight: ${this._optionsService.rawOptions.fontWeight};` +
- `}` +
- `${this._terminalSelector} span.${BOLD_CLASS} {` +
- ` font-weight: ${this._optionsService.rawOptions.fontWeightBold};` +
- `}` +
- `${this._terminalSelector} span.${ITALIC_CLASS} {` +
- ` font-style: italic;` +
- `}`;
- // Blink animation
- styles +=
- `@keyframes blink_box_shadow` + `_` + this._terminalClass + ` {` +
- ` 50% {` +
- ` box-shadow: none;` +
- ` }` +
- `}`;
- styles +=
- `@keyframes blink_block` + `_` + this._terminalClass + ` {` +
- ` 0% {` +
- ` background-color: ${this._colors.cursor.css};` +
- ` color: ${this._colors.cursorAccent.css};` +
- ` }` +
- ` 50% {` +
- ` background-color: ${this._colors.cursorAccent.css};` +
- ` color: ${this._colors.cursor.css};` +
- ` }` +
- `}`;
- // Cursor
- styles +=
- `${this._terminalSelector} .${ROW_CONTAINER_CLASS}:not(.${FOCUS_CLASS}) .${CURSOR_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} {` +
- ` outline: 1px solid ${this._colors.cursor.css};` +
- ` outline-offset: -1px;` +
- `}` +
- `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_BLINK_CLASS}:not(.${CURSOR_STYLE_BLOCK_CLASS}) {` +
- ` animation: blink_box_shadow` + `_` + this._terminalClass + ` 1s step-end infinite;` +
- `}` +
- `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_BLINK_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} {` +
- ` animation: blink_block` + `_` + this._terminalClass + ` 1s step-end infinite;` +
- `}` +
- `${this._terminalSelector} .${ROW_CONTAINER_CLASS}.${FOCUS_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_BLOCK_CLASS} {` +
- ` background-color: ${this._colors.cursor.css};` +
- ` color: ${this._colors.cursorAccent.css};` +
- `}` +
- `${this._terminalSelector} .${ROW_CONTAINER_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_BAR_CLASS} {` +
- ` box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${this._colors.cursor.css} inset;` +
- `}` +
- `${this._terminalSelector} .${ROW_CONTAINER_CLASS} .${CURSOR_CLASS}.${CURSOR_STYLE_UNDERLINE_CLASS} {` +
- ` box-shadow: 0 -1px 0 ${this._colors.cursor.css} inset;` +
- `}`;
- // Selection
- styles +=
- `${this._terminalSelector} .${SELECTION_CLASS} {` +
- ` position: absolute;` +
- ` top: 0;` +
- ` left: 0;` +
- ` z-index: 1;` +
- ` pointer-events: none;` +
- `}` +
- `${this._terminalSelector} .${SELECTION_CLASS} div {` +
- ` position: absolute;` +
- ` background-color: ${this._colors.selectionTransparent.css};` +
- `}`;
- // Colors
- this._colors.ansi.forEach((c, i) => {
- styles +=
- `${this._terminalSelector} .${FG_CLASS_PREFIX}${i} { color: ${c.css}; }` +
- `${this._terminalSelector} .${BG_CLASS_PREFIX}${i} { background-color: ${c.css}; }`;
- });
- styles +=
- `${this._terminalSelector} .${FG_CLASS_PREFIX}${INVERTED_DEFAULT_COLOR} { color: ${color.opaque(this._colors.background).css}; }` +
- `${this._terminalSelector} .${BG_CLASS_PREFIX}${INVERTED_DEFAULT_COLOR} { background-color: ${this._colors.foreground.css}; }`;
-
- this._themeStyleElement.textContent = styles;
- }
-
- public onDevicePixelRatioChange(): void {
- this._updateDimensions();
- }
-
- private _refreshRowElements(cols: number, rows: number): void {
- // Add missing elements
- for (let i = this._rowElements.length; i <= rows; i++) {
- const row = document.createElement('div');
- this._rowContainer.appendChild(row);
- this._rowElements.push(row);
- }
- // Remove excess elements
- while (this._rowElements.length > rows) {
- this._rowContainer.removeChild(this._rowElements.pop()!);
- }
- }
-
- public onResize(cols: number, rows: number): void {
- this._refreshRowElements(cols, rows);
- this._updateDimensions();
- }
-
- public onCharSizeChanged(): void {
- this._updateDimensions();
- }
-
- public onBlur(): void {
- this._rowContainer.classList.remove(FOCUS_CLASS);
- }
-
- public onFocus(): void {
- this._rowContainer.classList.add(FOCUS_CLASS);
- }
-
- public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void {
- // Remove all selections
- while (this._selectionContainer.children.length) {
- this._selectionContainer.removeChild(this._selectionContainer.children[0]);
- }
-
- // Selection does not exist
- if (!start || !end) {
- return;
- }
-
- // Translate from buffer position to viewport position
- const viewportStartRow = start[1] - this._bufferService.buffer.ydisp;
- const viewportEndRow = end[1] - this._bufferService.buffer.ydisp;
- const viewportCappedStartRow = Math.max(viewportStartRow, 0);
- const viewportCappedEndRow = Math.min(viewportEndRow, this._bufferService.rows - 1);
-
- // No need to draw the selection
- if (viewportCappedStartRow >= this._bufferService.rows || viewportCappedEndRow < 0) {
- return;
- }
-
- // Create the selections
- const documentFragment = document.createDocumentFragment();
-
- if (columnSelectMode) {
- documentFragment.appendChild(
- this._createSelectionElement(viewportCappedStartRow, start[0], end[0], viewportCappedEndRow - viewportCappedStartRow + 1)
- );
- } else {
- // Draw first row
- const startCol = viewportStartRow === viewportCappedStartRow ? start[0] : 0;
- const endCol = viewportCappedStartRow === viewportEndRow ? end[0] : this._bufferService.cols;
- documentFragment.appendChild(this._createSelectionElement(viewportCappedStartRow, startCol, endCol));
- // Draw middle rows
- const middleRowsCount = viewportCappedEndRow - viewportCappedStartRow - 1;
- documentFragment.appendChild(this._createSelectionElement(viewportCappedStartRow + 1, 0, this._bufferService.cols, middleRowsCount));
- // Draw final row
- if (viewportCappedStartRow !== viewportCappedEndRow) {
- // Only draw viewportEndRow if it's not the same as viewporttartRow
- const endCol = viewportEndRow === viewportCappedEndRow ? end[0] : this._bufferService.cols;
- documentFragment.appendChild(this._createSelectionElement(viewportCappedEndRow, 0, endCol));
- }
- }
- this._selectionContainer.appendChild(documentFragment);
- }
-
- /**
- * Creates a selection element at the specified position.
- * @param row The row of the selection.
- * @param colStart The start column.
- * @param colEnd The end columns.
- */
- private _createSelectionElement(row: number, colStart: number, colEnd: number, rowCount: number = 1): HTMLElement {
- const element = document.createElement('div');
- element.style.height = `${rowCount * this.dimensions.actualCellHeight}px`;
- element.style.top = `${row * this.dimensions.actualCellHeight}px`;
- element.style.left = `${colStart * this.dimensions.actualCellWidth}px`;
- element.style.width = `${this.dimensions.actualCellWidth * (colEnd - colStart)}px`;
- return element;
- }
-
- public onCursorMove(): void {
- // No-op, the cursor is drawn when rows are drawn
- }
-
- public onOptionsChanged(): void {
- // Force a refresh
- this._updateDimensions();
- this._injectCss();
- }
-
- public clear(): void {
- for (const e of this._rowElements) {
- e.innerText = '';
- }
- }
-
- public renderRows(start: number, end: number): void {
- const cursorAbsoluteY = this._bufferService.buffer.ybase + this._bufferService.buffer.y;
- const cursorX = Math.min(this._bufferService.buffer.x, this._bufferService.cols - 1);
- const cursorBlink = this._optionsService.rawOptions.cursorBlink;
-
- for (let y = start; y <= end; y++) {
- const rowElement = this._rowElements[y];
- rowElement.innerText = '';
-
- const row = y + this._bufferService.buffer.ydisp;
- const lineData = this._bufferService.buffer.lines.get(row);
- const cursorStyle = this._optionsService.rawOptions.cursorStyle;
- rowElement.appendChild(this._rowFactory.createRow(lineData!, row, row === cursorAbsoluteY, cursorStyle, cursorX, cursorBlink, this.dimensions.actualCellWidth, this._bufferService.cols));
- }
- }
-
- private get _terminalSelector(): string {
- return `.${TERMINAL_CLASS_PREFIX}${this._terminalClass}`;
- }
-
- private _onLinkHover(e: ILinkifierEvent): void {
- this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, true);
- }
-
- private _onLinkLeave(e: ILinkifierEvent): void {
- this._setCellUnderline(e.x1, e.x2, e.y1, e.y2, e.cols, false);
- }
-
- private _setCellUnderline(x: number, x2: number, y: number, y2: number, cols: number, enabled: boolean): void {
- while (x !== x2 || y !== y2) {
- const row = this._rowElements[y];
- if (!row) {
- return;
- }
- const span = row.children[x] as HTMLElement;
- if (span) {
- span.style.textDecoration = enabled ? 'underline' : 'none';
- }
- if (++x >= cols) {
- x = 0;
- y++;
- }
- }
- }
-}
diff --git a/node_modules/xterm/src/browser/renderer/dom/DomRendererRowFactory.ts b/node_modules/xterm/src/browser/renderer/dom/DomRendererRowFactory.ts
deleted file mode 100644
index fda800a..0000000
--- a/node_modules/xterm/src/browser/renderer/dom/DomRendererRowFactory.ts
+++ /dev/null
@@ -1,259 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBufferLine } from 'common/Types';
-import { INVERTED_DEFAULT_COLOR } from 'browser/renderer/atlas/Constants';
-import { NULL_CELL_CODE, WHITESPACE_CELL_CHAR, Attributes } from 'common/buffer/Constants';
-import { CellData } from 'common/buffer/CellData';
-import { ICoreService, IOptionsService } from 'common/services/Services';
-import { color, rgba } from 'browser/Color';
-import { IColorSet, IColor } from 'browser/Types';
-import { ICharacterJoinerService } from 'browser/services/Services';
-import { JoinedCellData } from 'browser/services/CharacterJoinerService';
-
-export const BOLD_CLASS = 'xterm-bold';
-export const DIM_CLASS = 'xterm-dim';
-export const ITALIC_CLASS = 'xterm-italic';
-export const UNDERLINE_CLASS = 'xterm-underline';
-export const STRIKETHROUGH_CLASS = 'xterm-strikethrough';
-export const CURSOR_CLASS = 'xterm-cursor';
-export const CURSOR_BLINK_CLASS = 'xterm-cursor-blink';
-export const CURSOR_STYLE_BLOCK_CLASS = 'xterm-cursor-block';
-export const CURSOR_STYLE_BAR_CLASS = 'xterm-cursor-bar';
-export const CURSOR_STYLE_UNDERLINE_CLASS = 'xterm-cursor-underline';
-
-export class DomRendererRowFactory {
- private _workCell: CellData = new CellData();
-
- constructor(
- private readonly _document: Document,
- private _colors: IColorSet,
- @ICharacterJoinerService private readonly _characterJoinerService: ICharacterJoinerService,
- @IOptionsService private readonly _optionsService: IOptionsService,
- @ICoreService private readonly _coreService: ICoreService
- ) {
- }
-
- public setColors(colors: IColorSet): void {
- this._colors = colors;
- }
-
- public createRow(lineData: IBufferLine, row: number, isCursorRow: boolean, cursorStyle: string | undefined, cursorX: number, cursorBlink: boolean, cellWidth: number, cols: number): DocumentFragment {
- const fragment = this._document.createDocumentFragment();
-
- const joinedRanges = this._characterJoinerService.getJoinedCharacters(row);
- // Find the line length first, this prevents the need to output a bunch of
- // empty cells at the end. This cannot easily be integrated into the main
- // loop below because of the colCount feature (which can be removed after we
- // properly support reflow and disallow data to go beyond the right-side of
- // the viewport).
- let lineLength = 0;
- for (let x = Math.min(lineData.length, cols) - 1; x >= 0; x--) {
- if (lineData.loadCell(x, this._workCell).getCode() !== NULL_CELL_CODE || (isCursorRow && x === cursorX)) {
- lineLength = x + 1;
- break;
- }
- }
-
- for (let x = 0; x < lineLength; x++) {
- lineData.loadCell(x, this._workCell);
- let width = this._workCell.getWidth();
-
- // The character to the left is a wide character, drawing is owned by the char at x-1
- if (width === 0) {
- continue;
- }
-
- // If true, indicates that the current character(s) to draw were joined.
- let isJoined = false;
- let lastCharX = x;
-
- // Process any joined character ranges as needed. Because of how the
- // ranges are produced, we know that they are valid for the characters
- // and attributes of our input.
- let cell = this._workCell;
- if (joinedRanges.length > 0 && x === joinedRanges[0][0]) {
- isJoined = true;
- const range = joinedRanges.shift()!;
-
- // We already know the exact start and end column of the joined range,
- // so we get the string and width representing it directly
- cell = new JoinedCellData(
- this._workCell,
- lineData.translateToString(true, range[0], range[1]),
- range[1] - range[0]
- );
-
- // Skip over the cells occupied by this range in the loop
- lastCharX = range[1] - 1;
-
- // Recalculate width
- width = cell.getWidth();
- }
-
- const charElement = this._document.createElement('span');
- if (width > 1) {
- charElement.style.width = `${cellWidth * width}px`;
- }
-
- if (isJoined) {
- // Ligatures in the DOM renderer must use display inline, as they may not show with
- // inline-block if they are outside the bounds of the element
- charElement.style.display = 'inline';
-
- // The DOM renderer colors the background of the cursor but for ligatures all cells are
- // joined. The workaround here is to show a cursor around the whole ligature so it shows up,
- // the cursor looks the same when on any character of the ligature though
- if (cursorX >= x && cursorX <= lastCharX) {
- cursorX = x;
- }
- }
-
- if (!this._coreService.isCursorHidden && isCursorRow && x === cursorX) {
- charElement.classList.add(CURSOR_CLASS);
-
- if (cursorBlink) {
- charElement.classList.add(CURSOR_BLINK_CLASS);
- }
-
- switch (cursorStyle) {
- case 'bar':
- charElement.classList.add(CURSOR_STYLE_BAR_CLASS);
- break;
- case 'underline':
- charElement.classList.add(CURSOR_STYLE_UNDERLINE_CLASS);
- break;
- default:
- charElement.classList.add(CURSOR_STYLE_BLOCK_CLASS);
- break;
- }
- }
-
- if (cell.isBold()) {
- charElement.classList.add(BOLD_CLASS);
- }
-
- if (cell.isItalic()) {
- charElement.classList.add(ITALIC_CLASS);
- }
-
- if (cell.isDim()) {
- charElement.classList.add(DIM_CLASS);
- }
-
- if (cell.isUnderline()) {
- charElement.classList.add(UNDERLINE_CLASS);
- }
-
- if (cell.isInvisible()) {
- charElement.textContent = WHITESPACE_CELL_CHAR;
- } else {
- charElement.textContent = cell.getChars() || WHITESPACE_CELL_CHAR;
- }
-
- if (cell.isStrikethrough()) {
- charElement.classList.add(STRIKETHROUGH_CLASS);
- }
-
- let fg = cell.getFgColor();
- let fgColorMode = cell.getFgColorMode();
- let bg = cell.getBgColor();
- let bgColorMode = cell.getBgColorMode();
- const isInverse = !!cell.isInverse();
- if (isInverse) {
- const temp = fg;
- fg = bg;
- bg = temp;
- const temp2 = fgColorMode;
- fgColorMode = bgColorMode;
- bgColorMode = temp2;
- }
-
- // Foreground
- switch (fgColorMode) {
- case Attributes.CM_P16:
- case Attributes.CM_P256:
- if (cell.isBold() && fg < 8 && this._optionsService.rawOptions.drawBoldTextInBrightColors) {
- fg += 8;
- }
- if (!this._applyMinimumContrast(charElement, this._colors.background, this._colors.ansi[fg])) {
- charElement.classList.add(`xterm-fg-${fg}`);
- }
- break;
- case Attributes.CM_RGB:
- const color = rgba.toColor(
- (fg >> 16) & 0xFF,
- (fg >> 8) & 0xFF,
- (fg ) & 0xFF
- );
- if (!this._applyMinimumContrast(charElement, this._colors.background, color)) {
- this._addStyle(charElement, `color:#${padStart(fg.toString(16), '0', 6)}`);
- }
- break;
- case Attributes.CM_DEFAULT:
- default:
- if (!this._applyMinimumContrast(charElement, this._colors.background, this._colors.foreground)) {
- if (isInverse) {
- charElement.classList.add(`xterm-fg-${INVERTED_DEFAULT_COLOR}`);
- }
- }
- }
-
- // Background
- switch (bgColorMode) {
- case Attributes.CM_P16:
- case Attributes.CM_P256:
- charElement.classList.add(`xterm-bg-${bg}`);
- break;
- case Attributes.CM_RGB:
- this._addStyle(charElement, `background-color:#${padStart(bg.toString(16), '0', 6)}`);
- break;
- case Attributes.CM_DEFAULT:
- default:
- if (isInverse) {
- charElement.classList.add(`xterm-bg-${INVERTED_DEFAULT_COLOR}`);
- }
- }
-
- fragment.appendChild(charElement);
-
- x = lastCharX;
- }
- return fragment;
- }
-
- private _applyMinimumContrast(element: HTMLElement, bg: IColor, fg: IColor): boolean {
- if (this._optionsService.rawOptions.minimumContrastRatio === 1) {
- return false;
- }
-
- // Try get from cache first
- let adjustedColor = this._colors.contrastCache.getColor(this._workCell.bg, this._workCell.fg);
-
- // Calculate and store in cache
- if (adjustedColor === undefined) {
- adjustedColor = color.ensureContrastRatio(bg, fg, this._optionsService.rawOptions.minimumContrastRatio);
- this._colors.contrastCache.setColor(this._workCell.bg, this._workCell.fg, adjustedColor ?? null);
- }
-
- if (adjustedColor) {
- this._addStyle(element, `color:${adjustedColor.css}`);
- return true;
- }
-
- return false;
- }
-
- private _addStyle(element: HTMLElement, style: string): void {
- element.setAttribute('style', `${element.getAttribute('style') || ''}${style};`);
- }
-}
-
-function padStart(text: string, padChar: string, length: number): string {
- while (text.length < length) {
- text = padChar + text;
- }
- return text;
-}
diff --git a/node_modules/xterm/src/browser/selection/SelectionModel.ts b/node_modules/xterm/src/browser/selection/SelectionModel.ts
deleted file mode 100644
index 1d84446..0000000
--- a/node_modules/xterm/src/browser/selection/SelectionModel.ts
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBufferService } from 'common/services/Services';
-
-/**
- * Represents a selection within the buffer. This model only cares about column
- * and row coordinates, not wide characters.
- */
-export class SelectionModel {
- /**
- * Whether select all is currently active.
- */
- public isSelectAllActive: boolean = false;
-
- /**
- * The minimal length of the selection from the start position. When double
- * clicking on a word, the word will be selected which makes the selection
- * start at the start of the word and makes this variable the length.
- */
- public selectionStartLength: number = 0;
-
- /**
- * The [x, y] position the selection starts at.
- */
- public selectionStart: [number, number] | undefined;
-
- /**
- * The [x, y] position the selection ends at.
- */
- public selectionEnd: [number, number] | undefined;
-
- constructor(
- private _bufferService: IBufferService
- ) {
- }
-
- /**
- * Clears the current selection.
- */
- public clearSelection(): void {
- this.selectionStart = undefined;
- this.selectionEnd = undefined;
- this.isSelectAllActive = false;
- this.selectionStartLength = 0;
- }
-
- /**
- * The final selection start, taking into consideration select all.
- */
- public get finalSelectionStart(): [number, number] | undefined {
- if (this.isSelectAllActive) {
- return [0, 0];
- }
-
- if (!this.selectionEnd || !this.selectionStart) {
- return this.selectionStart;
- }
-
- return this.areSelectionValuesReversed() ? this.selectionEnd : this.selectionStart;
- }
-
- /**
- * The final selection end, taking into consideration select all, double click
- * word selection and triple click line selection.
- */
- public get finalSelectionEnd(): [number, number] | undefined {
- if (this.isSelectAllActive) {
- return [this._bufferService.cols, this._bufferService.buffer.ybase + this._bufferService.rows - 1];
- }
-
- if (!this.selectionStart) {
- return undefined;
- }
-
- // Use the selection start + length if the end doesn't exist or they're reversed
- if (!this.selectionEnd || this.areSelectionValuesReversed()) {
- const startPlusLength = this.selectionStart[0] + this.selectionStartLength;
- if (startPlusLength > this._bufferService.cols) {
- // Ensure the trailing EOL isn't included when the selection ends on the right edge
- if (startPlusLength % this._bufferService.cols === 0) {
- return [this._bufferService.cols, this.selectionStart[1] + Math.floor(startPlusLength / this._bufferService.cols) - 1];
- }
- return [startPlusLength % this._bufferService.cols, this.selectionStart[1] + Math.floor(startPlusLength / this._bufferService.cols)];
- }
- return [startPlusLength, this.selectionStart[1]];
- }
-
- // Ensure the the word/line is selected after a double/triple click
- if (this.selectionStartLength) {
- // Select the larger of the two when start and end are on the same line
- if (this.selectionEnd[1] === this.selectionStart[1]) {
- return [Math.max(this.selectionStart[0] + this.selectionStartLength, this.selectionEnd[0]), this.selectionEnd[1]];
- }
- }
- return this.selectionEnd;
- }
-
- /**
- * Returns whether the selection start and end are reversed.
- */
- public areSelectionValuesReversed(): boolean {
- const start = this.selectionStart;
- const end = this.selectionEnd;
- if (!start || !end) {
- return false;
- }
- return start[1] > end[1] || (start[1] === end[1] && start[0] > end[0]);
- }
-
- /**
- * Handle the buffer being trimmed, adjust the selection position.
- * @param amount The amount the buffer is being trimmed.
- * @return Whether a refresh is necessary.
- */
- public onTrim(amount: number): boolean {
- // Adjust the selection position based on the trimmed amount.
- if (this.selectionStart) {
- this.selectionStart[1] -= amount;
- }
- if (this.selectionEnd) {
- this.selectionEnd[1] -= amount;
- }
-
- // The selection has moved off the buffer, clear it.
- if (this.selectionEnd && this.selectionEnd[1] < 0) {
- this.clearSelection();
- return true;
- }
-
- // If the selection start is trimmed, ensure the start column is 0.
- if (this.selectionStart && this.selectionStart[1] < 0) {
- this.selectionStart[1] = 0;
- }
- return false;
- }
-}
diff --git a/node_modules/xterm/src/browser/selection/Types.d.ts b/node_modules/xterm/src/browser/selection/Types.d.ts
deleted file mode 100644
index 8adfc17..0000000
--- a/node_modules/xterm/src/browser/selection/Types.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-export interface ISelectionRedrawRequestEvent {
- start: [number, number] | undefined;
- end: [number, number] | undefined;
- columnSelectMode: boolean;
-}
-
-export interface ISelectionRequestScrollLinesEvent {
- amount: number;
- suppressScrollEvent: boolean;
-}
diff --git a/node_modules/xterm/src/browser/services/CharSizeService.ts b/node_modules/xterm/src/browser/services/CharSizeService.ts
deleted file mode 100644
index b04e157..0000000
--- a/node_modules/xterm/src/browser/services/CharSizeService.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * Copyright (c) 2016 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IOptionsService } from 'common/services/Services';
-import { IEvent, EventEmitter } from 'common/EventEmitter';
-import { ICharSizeService } from 'browser/services/Services';
-
-export class CharSizeService implements ICharSizeService {
- public serviceBrand: undefined;
-
- public width: number = 0;
- public height: number = 0;
- private _measureStrategy: IMeasureStrategy;
-
- public get hasValidSize(): boolean { return this.width > 0 && this.height > 0; }
-
- private _onCharSizeChange = new EventEmitter<void>();
- public get onCharSizeChange(): IEvent<void> { return this._onCharSizeChange.event; }
-
- constructor(
- document: Document,
- parentElement: HTMLElement,
- @IOptionsService private readonly _optionsService: IOptionsService
- ) {
- this._measureStrategy = new DomMeasureStrategy(document, parentElement, this._optionsService);
- }
-
- public measure(): void {
- const result = this._measureStrategy.measure();
- if (result.width !== this.width || result.height !== this.height) {
- this.width = result.width;
- this.height = result.height;
- this._onCharSizeChange.fire();
- }
- }
-}
-
-interface IMeasureStrategy {
- measure(): IReadonlyMeasureResult;
-}
-
-interface IReadonlyMeasureResult {
- readonly width: number;
- readonly height: number;
-}
-
-interface IMeasureResult {
- width: number;
- height: number;
-}
-
-// TODO: For supporting browsers we should also provide a CanvasCharDimensionsProvider that uses ctx.measureText
-class DomMeasureStrategy implements IMeasureStrategy {
- private _result: IMeasureResult = { width: 0, height: 0 };
- private _measureElement: HTMLElement;
-
- constructor(
- private _document: Document,
- private _parentElement: HTMLElement,
- private _optionsService: IOptionsService
- ) {
- this._measureElement = this._document.createElement('span');
- this._measureElement.classList.add('xterm-char-measure-element');
- this._measureElement.textContent = 'W';
- this._measureElement.setAttribute('aria-hidden', 'true');
- this._parentElement.appendChild(this._measureElement);
- }
-
- public measure(): IReadonlyMeasureResult {
- this._measureElement.style.fontFamily = this._optionsService.rawOptions.fontFamily;
- this._measureElement.style.fontSize = `${this._optionsService.rawOptions.fontSize}px`;
-
- // Note that this triggers a synchronous layout
- const geometry = this._measureElement.getBoundingClientRect();
-
- // If values are 0 then the element is likely currently display:none, in which case we should
- // retain the previous value.
- if (geometry.width !== 0 && geometry.height !== 0) {
- this._result.width = geometry.width;
- this._result.height = Math.ceil(geometry.height);
- }
-
- return this._result;
- }
-}
diff --git a/node_modules/xterm/src/browser/services/CharacterJoinerService.ts b/node_modules/xterm/src/browser/services/CharacterJoinerService.ts
deleted file mode 100644
index ca4f198..0000000
--- a/node_modules/xterm/src/browser/services/CharacterJoinerService.ts
+++ /dev/null
@@ -1,339 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBufferLine, ICellData, CharData } from 'common/Types';
-import { ICharacterJoiner } from 'browser/Types';
-import { AttributeData } from 'common/buffer/AttributeData';
-import { WHITESPACE_CELL_CHAR, Content } from 'common/buffer/Constants';
-import { CellData } from 'common/buffer/CellData';
-import { IBufferService } from 'common/services/Services';
-import { ICharacterJoinerService } from 'browser/services/Services';
-
-export class JoinedCellData extends AttributeData implements ICellData {
- private _width: number;
- // .content carries no meaning for joined CellData, simply nullify it
- // thus we have to overload all other .content accessors
- public content: number = 0;
- public fg: number;
- public bg: number;
- public combinedData: string = '';
-
- constructor(firstCell: ICellData, chars: string, width: number) {
- super();
- this.fg = firstCell.fg;
- this.bg = firstCell.bg;
- this.combinedData = chars;
- this._width = width;
- }
-
- public isCombined(): number {
- // always mark joined cell data as combined
- return Content.IS_COMBINED_MASK;
- }
-
- public getWidth(): number {
- return this._width;
- }
-
- public getChars(): string {
- return this.combinedData;
- }
-
- public getCode(): number {
- // code always gets the highest possible fake codepoint (read as -1)
- // this is needed as code is used by caches as identifier
- return 0x1FFFFF;
- }
-
- public setFromCharData(value: CharData): void {
- throw new Error('not implemented');
- }
-
- public getAsCharData(): CharData {
- return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
- }
-}
-
-export class CharacterJoinerService implements ICharacterJoinerService {
- public serviceBrand: undefined;
-
- private _characterJoiners: ICharacterJoiner[] = [];
- private _nextCharacterJoinerId: number = 0;
- private _workCell: CellData = new CellData();
-
- constructor(
- @IBufferService private _bufferService: IBufferService
- ) { }
-
- public register(handler: (text: string) => [number, number][]): number {
- const joiner: ICharacterJoiner = {
- id: this._nextCharacterJoinerId++,
- handler
- };
-
- this._characterJoiners.push(joiner);
- return joiner.id;
- }
-
- public deregister(joinerId: number): boolean {
- for (let i = 0; i < this._characterJoiners.length; i++) {
- if (this._characterJoiners[i].id === joinerId) {
- this._characterJoiners.splice(i, 1);
- return true;
- }
- }
-
- return false;
- }
-
- public getJoinedCharacters(row: number): [number, number][] {
- if (this._characterJoiners.length === 0) {
- return [];
- }
-
- const line = this._bufferService.buffer.lines.get(row);
- if (!line || line.length === 0) {
- return [];
- }
-
- const ranges: [number, number][] = [];
- const lineStr = line.translateToString(true);
-
- // Because some cells can be represented by multiple javascript characters,
- // we track the cell and the string indexes separately. This allows us to
- // translate the string ranges we get from the joiners back into cell ranges
- // for use when rendering
- let rangeStartColumn = 0;
- let currentStringIndex = 0;
- let rangeStartStringIndex = 0;
- let rangeAttrFG = line.getFg(0);
- let rangeAttrBG = line.getBg(0);
-
- for (let x = 0; x < line.getTrimmedLength(); x++) {
- line.loadCell(x, this._workCell);
-
- if (this._workCell.getWidth() === 0) {
- // If this character is of width 0, skip it.
- continue;
- }
-
- // End of range
- if (this._workCell.fg !== rangeAttrFG || this._workCell.bg !== rangeAttrBG) {
- // If we ended up with a sequence of more than one character,
- // look for ranges to join.
- if (x - rangeStartColumn > 1) {
- const joinedRanges = this._getJoinedRanges(
- lineStr,
- rangeStartStringIndex,
- currentStringIndex,
- line,
- rangeStartColumn
- );
- for (let i = 0; i < joinedRanges.length; i++) {
- ranges.push(joinedRanges[i]);
- }
- }
-
- // Reset our markers for a new range.
- rangeStartColumn = x;
- rangeStartStringIndex = currentStringIndex;
- rangeAttrFG = this._workCell.fg;
- rangeAttrBG = this._workCell.bg;
- }
-
- currentStringIndex += this._workCell.getChars().length || WHITESPACE_CELL_CHAR.length;
- }
-
- // Process any trailing ranges.
- if (this._bufferService.cols - rangeStartColumn > 1) {
- const joinedRanges = this._getJoinedRanges(
- lineStr,
- rangeStartStringIndex,
- currentStringIndex,
- line,
- rangeStartColumn
- );
- for (let i = 0; i < joinedRanges.length; i++) {
- ranges.push(joinedRanges[i]);
- }
- }
-
- return ranges;
- }
-
- /**
- * Given a segment of a line of text, find all ranges of text that should be
- * joined in a single rendering unit. Ranges are internally converted to
- * column ranges, rather than string ranges.
- * @param line String representation of the full line of text
- * @param startIndex Start position of the range to search in the string (inclusive)
- * @param endIndex End position of the range to search in the string (exclusive)
- */
- private _getJoinedRanges(line: string, startIndex: number, endIndex: number, lineData: IBufferLine, startCol: number): [number, number][] {
- const text = line.substring(startIndex, endIndex);
- // At this point we already know that there is at least one joiner so
- // we can just pull its value and assign it directly rather than
- // merging it into an empty array, which incurs unnecessary writes.
- let allJoinedRanges: [number, number][] = [];
- try {
- allJoinedRanges = this._characterJoiners[0].handler(text);
- } catch (error) {
- console.error(error);
- }
- for (let i = 1; i < this._characterJoiners.length; i++) {
- // We merge any overlapping ranges across the different joiners
- try {
- const joinerRanges = this._characterJoiners[i].handler(text);
- for (let j = 0; j < joinerRanges.length; j++) {
- CharacterJoinerService._mergeRanges(allJoinedRanges, joinerRanges[j]);
- }
- } catch (error) {
- console.error(error);
- }
- }
- this._stringRangesToCellRanges(allJoinedRanges, lineData, startCol);
- return allJoinedRanges;
- }
-
- /**
- * Modifies the provided ranges in-place to adjust for variations between
- * string length and cell width so that the range represents a cell range,
- * rather than the string range the joiner provides.
- * @param ranges String ranges containing start (inclusive) and end (exclusive) index
- * @param line Cell data for the relevant line in the terminal
- * @param startCol Offset within the line to start from
- */
- private _stringRangesToCellRanges(ranges: [number, number][], line: IBufferLine, startCol: number): void {
- let currentRangeIndex = 0;
- let currentRangeStarted = false;
- let currentStringIndex = 0;
- let currentRange = ranges[currentRangeIndex];
-
- // If we got through all of the ranges, stop searching
- if (!currentRange) {
- return;
- }
-
- for (let x = startCol; x < this._bufferService.cols; x++) {
- const width = line.getWidth(x);
- const length = line.getString(x).length || WHITESPACE_CELL_CHAR.length;
-
- // We skip zero-width characters when creating the string to join the text
- // so we do the same here
- if (width === 0) {
- continue;
- }
-
- // Adjust the start of the range
- if (!currentRangeStarted && currentRange[0] <= currentStringIndex) {
- currentRange[0] = x;
- currentRangeStarted = true;
- }
-
- // Adjust the end of the range
- if (currentRange[1] <= currentStringIndex) {
- currentRange[1] = x;
-
- // We're finished with this range, so we move to the next one
- currentRange = ranges[++currentRangeIndex];
-
- // If there are no more ranges left, stop searching
- if (!currentRange) {
- break;
- }
-
- // Ranges can be on adjacent characters. Because the end index of the
- // ranges are exclusive, this means that the index for the start of a
- // range can be the same as the end index of the previous range. To
- // account for the start of the next range, we check here just in case.
- if (currentRange[0] <= currentStringIndex) {
- currentRange[0] = x;
- currentRangeStarted = true;
- } else {
- currentRangeStarted = false;
- }
- }
-
- // Adjust the string index based on the character length to line up with
- // the column adjustment
- currentStringIndex += length;
- }
-
- // If there is still a range left at the end, it must extend all the way to
- // the end of the line.
- if (currentRange) {
- currentRange[1] = this._bufferService.cols;
- }
- }
-
- /**
- * Merges the range defined by the provided start and end into the list of
- * existing ranges. The merge is done in place on the existing range for
- * performance and is also returned.
- * @param ranges Existing range list
- * @param newRange Tuple of two numbers representing the new range to merge in.
- * @returns The ranges input with the new range merged in place
- */
- private static _mergeRanges(ranges: [number, number][], newRange: [number, number]): [number, number][] {
- let inRange = false;
- for (let i = 0; i < ranges.length; i++) {
- const range = ranges[i];
- if (!inRange) {
- if (newRange[1] <= range[0]) {
- // Case 1: New range is before the search range
- ranges.splice(i, 0, newRange);
- return ranges;
- }
-
- if (newRange[1] <= range[1]) {
- // Case 2: New range is either wholly contained within the
- // search range or overlaps with the front of it
- range[0] = Math.min(newRange[0], range[0]);
- return ranges;
- }
-
- if (newRange[0] < range[1]) {
- // Case 3: New range either wholly contains the search range
- // or overlaps with the end of it
- range[0] = Math.min(newRange[0], range[0]);
- inRange = true;
- }
-
- // Case 4: New range starts after the search range
- continue;
- } else {
- if (newRange[1] <= range[0]) {
- // Case 5: New range extends from previous range but doesn't
- // reach the current one
- ranges[i - 1][1] = newRange[1];
- return ranges;
- }
-
- if (newRange[1] <= range[1]) {
- // Case 6: New range extends from prvious range into the
- // current range
- ranges[i - 1][1] = Math.max(newRange[1], range[1]);
- ranges.splice(i, 1);
- return ranges;
- }
-
- // Case 7: New range extends from previous range past the
- // end of the current range
- ranges.splice(i, 1);
- i--;
- }
- }
-
- if (inRange) {
- // Case 8: New range extends past the last existing range
- ranges[ranges.length - 1][1] = newRange[1];
- } else {
- // Case 9: New range starts after the last existing range
- ranges.push(newRange);
- }
-
- return ranges;
- }
-}
diff --git a/node_modules/xterm/src/browser/services/CoreBrowserService.ts b/node_modules/xterm/src/browser/services/CoreBrowserService.ts
deleted file mode 100644
index 4eabc89..0000000
--- a/node_modules/xterm/src/browser/services/CoreBrowserService.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ICoreBrowserService } from './Services';
-
-export class CoreBrowserService implements ICoreBrowserService {
- public serviceBrand: undefined;
-
- constructor(
- private _textarea: HTMLTextAreaElement
- ) {
- }
-
- public get isFocused(): boolean {
- const docOrShadowRoot = this._textarea.getRootNode ? this._textarea.getRootNode() as Document | ShadowRoot : document;
- return docOrShadowRoot.activeElement === this._textarea && document.hasFocus();
- }
-}
diff --git a/node_modules/xterm/src/browser/services/MouseService.ts b/node_modules/xterm/src/browser/services/MouseService.ts
deleted file mode 100644
index 348ba64..0000000
--- a/node_modules/xterm/src/browser/services/MouseService.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ICharSizeService, IRenderService, IMouseService } from './Services';
-import { getCoords, getRawByteCoords } from 'browser/input/Mouse';
-
-export class MouseService implements IMouseService {
- public serviceBrand: undefined;
-
- constructor(
- @IRenderService private readonly _renderService: IRenderService,
- @ICharSizeService private readonly _charSizeService: ICharSizeService
- ) {
- }
-
- public getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, isSelection?: boolean): [number, number] | undefined {
- return getCoords(
- event,
- element,
- colCount,
- rowCount,
- this._charSizeService.hasValidSize,
- this._renderService.dimensions.actualCellWidth,
- this._renderService.dimensions.actualCellHeight,
- isSelection
- );
- }
-
- public getRawByteCoords(event: MouseEvent, element: HTMLElement, colCount: number, rowCount: number): { x: number, y: number } | undefined {
- const coords = this.getCoords(event, element, colCount, rowCount);
- return getRawByteCoords(coords);
- }
-}
diff --git a/node_modules/xterm/src/browser/services/RenderService.ts b/node_modules/xterm/src/browser/services/RenderService.ts
deleted file mode 100644
index da458ab..0000000
--- a/node_modules/xterm/src/browser/services/RenderService.ts
+++ /dev/null
@@ -1,223 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IRenderer, IRenderDimensions } from 'browser/renderer/Types';
-import { RenderDebouncer } from 'browser/RenderDebouncer';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { Disposable } from 'common/Lifecycle';
-import { ScreenDprMonitor } from 'browser/ScreenDprMonitor';
-import { addDisposableDomListener } from 'browser/Lifecycle';
-import { IColorSet, IRenderDebouncer } from 'browser/Types';
-import { IOptionsService, IBufferService } from 'common/services/Services';
-import { ICharSizeService, IRenderService } from 'browser/services/Services';
-
-interface ISelectionState {
- start: [number, number] | undefined;
- end: [number, number] | undefined;
- columnSelectMode: boolean;
-}
-
-export class RenderService extends Disposable implements IRenderService {
- public serviceBrand: undefined;
-
- private _renderDebouncer: IRenderDebouncer;
- private _screenDprMonitor: ScreenDprMonitor;
-
- private _isPaused: boolean = false;
- private _needsFullRefresh: boolean = false;
- private _isNextRenderRedrawOnly: boolean = true;
- private _needsSelectionRefresh: boolean = false;
- private _canvasWidth: number = 0;
- private _canvasHeight: number = 0;
- private _selectionState: ISelectionState = {
- start: undefined,
- end: undefined,
- columnSelectMode: false
- };
-
- private _onDimensionsChange = new EventEmitter<IRenderDimensions>();
- public get onDimensionsChange(): IEvent<IRenderDimensions> { return this._onDimensionsChange.event; }
- private _onRender = new EventEmitter<{ start: number, end: number }>();
- public get onRenderedBufferChange(): IEvent<{ start: number, end: number }> { return this._onRender.event; }
- private _onRefreshRequest = new EventEmitter<{ start: number, end: number }>();
- public get onRefreshRequest(): IEvent<{ start: number, end: number }> { return this._onRefreshRequest.event; }
-
- public get dimensions(): IRenderDimensions { return this._renderer.dimensions; }
-
- constructor(
- private _renderer: IRenderer,
- private _rowCount: number,
- screenElement: HTMLElement,
- @IOptionsService optionsService: IOptionsService,
- @ICharSizeService private readonly _charSizeService: ICharSizeService,
- @IBufferService bufferService: IBufferService
- ) {
- super();
-
- this.register({ dispose: () => this._renderer.dispose() });
-
- this._renderDebouncer = new RenderDebouncer((start, end) => this._renderRows(start, end));
- this.register(this._renderDebouncer);
-
- this._screenDprMonitor = new ScreenDprMonitor();
- this._screenDprMonitor.setListener(() => this.onDevicePixelRatioChange());
- this.register(this._screenDprMonitor);
-
- this.register(bufferService.onResize(() => this._fullRefresh()));
- this.register(bufferService.buffers.onBufferActivate(() => this._renderer?.clear()));
- this.register(optionsService.onOptionChange(() => this._renderer.onOptionsChanged()));
- this.register(this._charSizeService.onCharSizeChange(() => this.onCharSizeChanged()));
-
- // No need to register this as renderer is explicitly disposed in RenderService.dispose
- this._renderer.onRequestRedraw(e => this.refreshRows(e.start, e.end, true));
-
- // dprchange should handle this case, we need this as well for browsers that don't support the
- // matchMedia query.
- this.register(addDisposableDomListener(window, 'resize', () => this.onDevicePixelRatioChange()));
-
- // Detect whether IntersectionObserver is detected and enable renderer pause
- // and resume based on terminal visibility if so
- if ('IntersectionObserver' in window) {
- const observer = new IntersectionObserver(e => this._onIntersectionChange(e[e.length - 1]), { threshold: 0 });
- observer.observe(screenElement);
- this.register({ dispose: () => observer.disconnect() });
- }
- }
-
- private _onIntersectionChange(entry: IntersectionObserverEntry): void {
- this._isPaused = entry.isIntersecting === undefined ? (entry.intersectionRatio === 0) : !entry.isIntersecting;
-
- // Terminal was hidden on open
- if (!this._isPaused && !this._charSizeService.hasValidSize) {
- this._charSizeService.measure();
- }
-
- if (!this._isPaused && this._needsFullRefresh) {
- this.refreshRows(0, this._rowCount - 1);
- this._needsFullRefresh = false;
- }
- }
-
- public refreshRows(start: number, end: number, isRedrawOnly: boolean = false): void {
- if (this._isPaused) {
- this._needsFullRefresh = true;
- return;
- }
- if (!isRedrawOnly) {
- this._isNextRenderRedrawOnly = false;
- }
- this._renderDebouncer.refresh(start, end, this._rowCount);
- }
-
- private _renderRows(start: number, end: number): void {
- this._renderer.renderRows(start, end);
-
- // Update selection if needed
- if (this._needsSelectionRefresh) {
- this._renderer.onSelectionChanged(this._selectionState.start, this._selectionState.end, this._selectionState.columnSelectMode);
- this._needsSelectionRefresh = false;
- }
-
- // Fire render event only if it was not a redraw
- if (!this._isNextRenderRedrawOnly) {
- this._onRender.fire({ start, end });
- }
- this._isNextRenderRedrawOnly = true;
- }
-
- public resize(cols: number, rows: number): void {
- this._rowCount = rows;
- this._fireOnCanvasResize();
- }
-
- public changeOptions(): void {
- this._renderer.onOptionsChanged();
- this.refreshRows(0, this._rowCount - 1);
- this._fireOnCanvasResize();
- }
-
- private _fireOnCanvasResize(): void {
- // Don't fire the event if the dimensions haven't changed
- if (this._renderer.dimensions.canvasWidth === this._canvasWidth && this._renderer.dimensions.canvasHeight === this._canvasHeight) {
- return;
- }
- this._onDimensionsChange.fire(this._renderer.dimensions);
- }
-
- public dispose(): void {
- super.dispose();
- }
-
- public setRenderer(renderer: IRenderer): void {
- // TODO: RenderService should be the only one to dispose the renderer
- this._renderer.dispose();
- this._renderer = renderer;
- this._renderer.onRequestRedraw(e => this.refreshRows(e.start, e.end, true));
-
- // Force a refresh
- this._needsSelectionRefresh = true;
- this._fullRefresh();
- }
-
- private _fullRefresh(): void {
- if (this._isPaused) {
- this._needsFullRefresh = true;
- } else {
- this.refreshRows(0, this._rowCount - 1);
- }
- }
-
- public clearTextureAtlas(): void {
- this._renderer?.clearTextureAtlas?.();
- this._fullRefresh();
- }
-
- public setColors(colors: IColorSet): void {
- this._renderer.setColors(colors);
- this._fullRefresh();
- }
-
- public onDevicePixelRatioChange(): void {
- // Force char size measurement as DomMeasureStrategy(getBoundingClientRect) is not stable
- // when devicePixelRatio changes
- this._charSizeService.measure();
-
- this._renderer.onDevicePixelRatioChange();
- this.refreshRows(0, this._rowCount - 1);
- }
-
- public onResize(cols: number, rows: number): void {
- this._renderer.onResize(cols, rows);
- this._fullRefresh();
- }
-
- // TODO: Is this useful when we have onResize?
- public onCharSizeChanged(): void {
- this._renderer.onCharSizeChanged();
- }
-
- public onBlur(): void {
- this._renderer.onBlur();
- }
-
- public onFocus(): void {
- this._renderer.onFocus();
- }
-
- public onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void {
- this._selectionState.start = start;
- this._selectionState.end = end;
- this._selectionState.columnSelectMode = columnSelectMode;
- this._renderer.onSelectionChanged(start, end, columnSelectMode);
- }
-
- public onCursorMove(): void {
- this._renderer.onCursorMove();
- }
-
- public clear(): void {
- this._renderer.clear();
- }
-}
diff --git a/node_modules/xterm/src/browser/services/SelectionService.ts b/node_modules/xterm/src/browser/services/SelectionService.ts
deleted file mode 100644
index 1ea2395..0000000
--- a/node_modules/xterm/src/browser/services/SelectionService.ts
+++ /dev/null
@@ -1,1009 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ISelectionRedrawRequestEvent, ISelectionRequestScrollLinesEvent } from 'browser/selection/Types';
-import { IBuffer } from 'common/buffer/Types';
-import { IBufferLine, IDisposable } from 'common/Types';
-import * as Browser from 'common/Platform';
-import { SelectionModel } from 'browser/selection/SelectionModel';
-import { CellData } from 'common/buffer/CellData';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { IMouseService, ISelectionService, IRenderService } from 'browser/services/Services';
-import { ILinkifier2 } from 'browser/Types';
-import { IBufferService, IOptionsService, ICoreService } from 'common/services/Services';
-import { getCoordsRelativeToElement } from 'browser/input/Mouse';
-import { moveToCellSequence } from 'browser/input/MoveToCell';
-import { Disposable } from 'common/Lifecycle';
-import { getRangeLength } from 'common/buffer/BufferRange';
-
-/**
- * The number of pixels the mouse needs to be above or below the viewport in
- * order to scroll at the maximum speed.
- */
-const DRAG_SCROLL_MAX_THRESHOLD = 50;
-
-/**
- * The maximum scrolling speed
- */
-const DRAG_SCROLL_MAX_SPEED = 15;
-
-/**
- * The number of milliseconds between drag scroll updates.
- */
-const DRAG_SCROLL_INTERVAL = 50;
-
-/**
- * The maximum amount of time that can have elapsed for an alt click to move the
- * cursor.
- */
-const ALT_CLICK_MOVE_CURSOR_TIME = 500;
-
-const NON_BREAKING_SPACE_CHAR = String.fromCharCode(160);
-const ALL_NON_BREAKING_SPACE_REGEX = new RegExp(NON_BREAKING_SPACE_CHAR, 'g');
-
-/**
- * Represents a position of a word on a line.
- */
-interface IWordPosition {
- start: number;
- length: number;
-}
-
-/**
- * A selection mode, this drives how the selection behaves on mouse move.
- */
-export const enum SelectionMode {
- NORMAL,
- WORD,
- LINE,
- COLUMN
-}
-
-/**
- * A class that manages the selection of the terminal. With help from
- * SelectionModel, SelectionService handles with all logic associated with
- * dealing with the selection, including handling mouse interaction, wide
- * characters and fetching the actual text within the selection. Rendering is
- * not handled by the SelectionService but the onRedrawRequest event is fired
- * when the selection is ready to be redrawn (on an animation frame).
- */
-export class SelectionService extends Disposable implements ISelectionService {
- public serviceBrand: undefined;
-
- protected _model: SelectionModel;
-
- /**
- * The amount to scroll every drag scroll update (depends on how far the mouse
- * drag is above or below the terminal).
- */
- private _dragScrollAmount: number = 0;
-
- /**
- * The current selection mode.
- */
- protected _activeSelectionMode: SelectionMode;
-
- /**
- * A setInterval timer that is active while the mouse is down whose callback
- * scrolls the viewport when necessary.
- */
- private _dragScrollIntervalTimer: number | undefined;
-
- /**
- * The animation frame ID used for refreshing the selection.
- */
- private _refreshAnimationFrame: number | undefined;
-
- /**
- * Whether selection is enabled.
- */
- private _enabled = true;
-
- private _mouseMoveListener: EventListener;
- private _mouseUpListener: EventListener;
- private _trimListener: IDisposable;
- private _workCell: CellData = new CellData();
-
- private _mouseDownTimeStamp: number = 0;
- private _oldHasSelection: boolean = false;
- private _oldSelectionStart: [number, number] | undefined = undefined;
- private _oldSelectionEnd: [number, number] | undefined = undefined;
-
- private _onLinuxMouseSelection = this.register(new EventEmitter<string>());
- public get onLinuxMouseSelection(): IEvent<string> { return this._onLinuxMouseSelection.event; }
- private _onRedrawRequest = this.register(new EventEmitter<ISelectionRedrawRequestEvent>());
- public get onRequestRedraw(): IEvent<ISelectionRedrawRequestEvent> { return this._onRedrawRequest.event; }
- private _onSelectionChange = this.register(new EventEmitter<void>());
- public get onSelectionChange(): IEvent<void> { return this._onSelectionChange.event; }
- private _onRequestScrollLines = this.register(new EventEmitter<ISelectionRequestScrollLinesEvent>());
- public get onRequestScrollLines(): IEvent<ISelectionRequestScrollLinesEvent> { return this._onRequestScrollLines.event; }
-
- constructor(
- private readonly _element: HTMLElement,
- private readonly _screenElement: HTMLElement,
- private readonly _linkifier: ILinkifier2,
- @IBufferService private readonly _bufferService: IBufferService,
- @ICoreService private readonly _coreService: ICoreService,
- @IMouseService private readonly _mouseService: IMouseService,
- @IOptionsService private readonly _optionsService: IOptionsService,
- @IRenderService private readonly _renderService: IRenderService
- ) {
- super();
-
- // Init listeners
- this._mouseMoveListener = event => this._onMouseMove(event as MouseEvent);
- this._mouseUpListener = event => this._onMouseUp(event as MouseEvent);
- this._coreService.onUserInput(() => {
- if (this.hasSelection) {
- this.clearSelection();
- }
- });
- this._trimListener = this._bufferService.buffer.lines.onTrim(amount => this._onTrim(amount));
- this.register(this._bufferService.buffers.onBufferActivate(e => this._onBufferActivate(e)));
-
- this.enable();
-
- this._model = new SelectionModel(this._bufferService);
- this._activeSelectionMode = SelectionMode.NORMAL;
- }
-
- public dispose(): void {
- this._removeMouseDownListeners();
- }
-
- public reset(): void {
- this.clearSelection();
- }
-
- /**
- * Disables the selection manager. This is useful for when terminal mouse
- * are enabled.
- */
- public disable(): void {
- this.clearSelection();
- this._enabled = false;
- }
-
- /**
- * Enable the selection manager.
- */
- public enable(): void {
- this._enabled = true;
- }
-
- public get selectionStart(): [number, number] | undefined { return this._model.finalSelectionStart; }
- public get selectionEnd(): [number, number] | undefined { return this._model.finalSelectionEnd; }
-
- /**
- * Gets whether there is an active text selection.
- */
- public get hasSelection(): boolean {
- const start = this._model.finalSelectionStart;
- const end = this._model.finalSelectionEnd;
- if (!start || !end) {
- return false;
- }
- return start[0] !== end[0] || start[1] !== end[1];
- }
-
- /**
- * Gets the text currently selected.
- */
- public get selectionText(): string {
- const start = this._model.finalSelectionStart;
- const end = this._model.finalSelectionEnd;
- if (!start || !end) {
- return '';
- }
-
- const buffer = this._bufferService.buffer;
- const result: string[] = [];
-
- if (this._activeSelectionMode === SelectionMode.COLUMN) {
- // Ignore zero width selections
- if (start[0] === end[0]) {
- return '';
- }
-
- for (let i = start[1]; i <= end[1]; i++) {
- const lineText = buffer.translateBufferLineToString(i, true, start[0], end[0]);
- result.push(lineText);
- }
- } else {
- // Get first row
- const startRowEndCol = start[1] === end[1] ? end[0] : undefined;
- result.push(buffer.translateBufferLineToString(start[1], true, start[0], startRowEndCol));
-
- // Get middle rows
- for (let i = start[1] + 1; i <= end[1] - 1; i++) {
- const bufferLine = buffer.lines.get(i);
- const lineText = buffer.translateBufferLineToString(i, true);
- if (bufferLine?.isWrapped) {
- result[result.length - 1] += lineText;
- } else {
- result.push(lineText);
- }
- }
-
- // Get final row
- if (start[1] !== end[1]) {
- const bufferLine = buffer.lines.get(end[1]);
- const lineText = buffer.translateBufferLineToString(end[1], true, 0, end[0]);
- if (bufferLine && bufferLine!.isWrapped) {
- result[result.length - 1] += lineText;
- } else {
- result.push(lineText);
- }
- }
- }
-
- // Format string by replacing non-breaking space chars with regular spaces
- // and joining the array into a multi-line string.
- const formattedResult = result.map(line => {
- return line.replace(ALL_NON_BREAKING_SPACE_REGEX, ' ');
- }).join(Browser.isWindows ? '\r\n' : '\n');
-
- return formattedResult;
- }
-
- /**
- * Clears the current terminal selection.
- */
- public clearSelection(): void {
- this._model.clearSelection();
- this._removeMouseDownListeners();
- this.refresh();
- this._onSelectionChange.fire();
- }
-
- /**
- * Queues a refresh, redrawing the selection on the next opportunity.
- * @param isLinuxMouseSelection Whether the selection should be registered as a new
- * selection on Linux.
- */
- public refresh(isLinuxMouseSelection?: boolean): void {
- // Queue the refresh for the renderer
- if (!this._refreshAnimationFrame) {
- this._refreshAnimationFrame = window.requestAnimationFrame(() => this._refresh());
- }
-
- // If the platform is Linux and the refresh call comes from a mouse event,
- // we need to update the selection for middle click to paste selection.
- if (Browser.isLinux && isLinuxMouseSelection) {
- const selectionText = this.selectionText;
- if (selectionText.length) {
- this._onLinuxMouseSelection.fire(this.selectionText);
- }
- }
- }
-
- /**
- * Fires the refresh event, causing consumers to pick it up and redraw the
- * selection state.
- */
- private _refresh(): void {
- this._refreshAnimationFrame = undefined;
- this._onRedrawRequest.fire({
- start: this._model.finalSelectionStart,
- end: this._model.finalSelectionEnd,
- columnSelectMode: this._activeSelectionMode === SelectionMode.COLUMN
- });
- }
-
- /**
- * Checks if the current click was inside the current selection
- * @param event The mouse event
- */
- private _isClickInSelection(event: MouseEvent): boolean {
- const coords = this._getMouseBufferCoords(event);
- const start = this._model.finalSelectionStart;
- const end = this._model.finalSelectionEnd;
-
- if (!start || !end || !coords) {
- return false;
- }
-
- return this._areCoordsInSelection(coords, start, end);
- }
-
- protected _areCoordsInSelection(coords: [number, number], start: [number, number], end: [number, number]): boolean {
- return (coords[1] > start[1] && coords[1] < end[1]) ||
- (start[1] === end[1] && coords[1] === start[1] && coords[0] >= start[0] && coords[0] < end[0]) ||
- (start[1] < end[1] && coords[1] === end[1] && coords[0] < end[0]) ||
- (start[1] < end[1] && coords[1] === start[1] && coords[0] >= start[0]);
- }
-
- /**
- * Selects word at the current mouse event coordinates.
- * @param event The mouse event.
- */
- private _selectWordAtCursor(event: MouseEvent, allowWhitespaceOnlySelection: boolean): boolean {
- // Check if there is a link under the cursor first and select that if so
- const range = this._linkifier.currentLink?.link?.range;
- if (range) {
- this._model.selectionStart = [range.start.x - 1, range.start.y - 1];
- this._model.selectionStartLength = getRangeLength(range, this._bufferService.cols);
- this._model.selectionEnd = undefined;
- return true;
- }
-
- const coords = this._getMouseBufferCoords(event);
- if (coords) {
- this._selectWordAt(coords, allowWhitespaceOnlySelection);
- this._model.selectionEnd = undefined;
- return true;
- }
- return false;
- }
-
- /**
- * Selects all text within the terminal.
- */
- public selectAll(): void {
- this._model.isSelectAllActive = true;
- this.refresh();
- this._onSelectionChange.fire();
- }
-
- public selectLines(start: number, end: number): void {
- this._model.clearSelection();
- start = Math.max(start, 0);
- end = Math.min(end, this._bufferService.buffer.lines.length - 1);
- this._model.selectionStart = [0, start];
- this._model.selectionEnd = [this._bufferService.cols, end];
- this.refresh();
- this._onSelectionChange.fire();
- }
-
- /**
- * Handle the buffer being trimmed, adjust the selection position.
- * @param amount The amount the buffer is being trimmed.
- */
- private _onTrim(amount: number): void {
- const needsRefresh = this._model.onTrim(amount);
- if (needsRefresh) {
- this.refresh();
- }
- }
-
- /**
- * Gets the 0-based [x, y] buffer coordinates of the current mouse event.
- * @param event The mouse event.
- */
- private _getMouseBufferCoords(event: MouseEvent): [number, number] | undefined {
- const coords = this._mouseService.getCoords(event, this._screenElement, this._bufferService.cols, this._bufferService.rows, true);
- if (!coords) {
- return undefined;
- }
-
- // Convert to 0-based
- coords[0]--;
- coords[1]--;
-
- // Convert viewport coords to buffer coords
- coords[1] += this._bufferService.buffer.ydisp;
- return coords;
- }
-
- /**
- * Gets the amount the viewport should be scrolled based on how far out of the
- * terminal the mouse is.
- * @param event The mouse event.
- */
- private _getMouseEventScrollAmount(event: MouseEvent): number {
- let offset = getCoordsRelativeToElement(event, this._screenElement)[1];
- const terminalHeight = this._renderService.dimensions.canvasHeight;
- if (offset >= 0 && offset <= terminalHeight) {
- return 0;
- }
- if (offset > terminalHeight) {
- offset -= terminalHeight;
- }
-
- offset = Math.min(Math.max(offset, -DRAG_SCROLL_MAX_THRESHOLD), DRAG_SCROLL_MAX_THRESHOLD);
- offset /= DRAG_SCROLL_MAX_THRESHOLD;
- return (offset / Math.abs(offset)) + Math.round(offset * (DRAG_SCROLL_MAX_SPEED - 1));
- }
-
- /**
- * Returns whether the selection manager should force selection, regardless of
- * whether the terminal is in mouse events mode.
- * @param event The mouse event.
- */
- public shouldForceSelection(event: MouseEvent): boolean {
- if (Browser.isMac) {
- return event.altKey && this._optionsService.rawOptions.macOptionClickForcesSelection;
- }
-
- return event.shiftKey;
- }
-
- /**
- * Handles te mousedown event, setting up for a new selection.
- * @param event The mousedown event.
- */
- public onMouseDown(event: MouseEvent): void {
- this._mouseDownTimeStamp = event.timeStamp;
- // If we have selection, we want the context menu on right click even if the
- // terminal is in mouse mode.
- if (event.button === 2 && this.hasSelection) {
- return;
- }
-
- // Only action the primary button
- if (event.button !== 0) {
- return;
- }
-
- // Allow selection when using a specific modifier key, even when disabled
- if (!this._enabled) {
- if (!this.shouldForceSelection(event)) {
- return;
- }
-
- // Don't send the mouse down event to the current process, we want to select
- event.stopPropagation();
- }
-
- // Tell the browser not to start a regular selection
- event.preventDefault();
-
- // Reset drag scroll state
- this._dragScrollAmount = 0;
-
- if (this._enabled && event.shiftKey) {
- this._onIncrementalClick(event);
- } else {
- if (event.detail === 1) {
- this._onSingleClick(event);
- } else if (event.detail === 2) {
- this._onDoubleClick(event);
- } else if (event.detail === 3) {
- this._onTripleClick(event);
- }
- }
-
- this._addMouseDownListeners();
- this.refresh(true);
- }
-
- /**
- * Adds listeners when mousedown is triggered.
- */
- private _addMouseDownListeners(): void {
- // Listen on the document so that dragging outside of viewport works
- if (this._screenElement.ownerDocument) {
- this._screenElement.ownerDocument.addEventListener('mousemove', this._mouseMoveListener);
- this._screenElement.ownerDocument.addEventListener('mouseup', this._mouseUpListener);
- }
- this._dragScrollIntervalTimer = window.setInterval(() => this._dragScroll(), DRAG_SCROLL_INTERVAL);
- }
-
- /**
- * Removes the listeners that are registered when mousedown is triggered.
- */
- private _removeMouseDownListeners(): void {
- if (this._screenElement.ownerDocument) {
- this._screenElement.ownerDocument.removeEventListener('mousemove', this._mouseMoveListener);
- this._screenElement.ownerDocument.removeEventListener('mouseup', this._mouseUpListener);
- }
- clearInterval(this._dragScrollIntervalTimer);
- this._dragScrollIntervalTimer = undefined;
- }
-
- /**
- * Performs an incremental click, setting the selection end position to the mouse
- * position.
- * @param event The mouse event.
- */
- private _onIncrementalClick(event: MouseEvent): void {
- if (this._model.selectionStart) {
- this._model.selectionEnd = this._getMouseBufferCoords(event);
- }
- }
-
- /**
- * Performs a single click, resetting relevant state and setting the selection
- * start position.
- * @param event The mouse event.
- */
- private _onSingleClick(event: MouseEvent): void {
- this._model.selectionStartLength = 0;
- this._model.isSelectAllActive = false;
- this._activeSelectionMode = this.shouldColumnSelect(event) ? SelectionMode.COLUMN : SelectionMode.NORMAL;
-
- // Initialize the new selection
- this._model.selectionStart = this._getMouseBufferCoords(event);
- if (!this._model.selectionStart) {
- return;
- }
- this._model.selectionEnd = undefined;
-
- // Ensure the line exists
- const line = this._bufferService.buffer.lines.get(this._model.selectionStart[1]);
- if (!line) {
- return;
- }
-
- // Return early if the click event is not in the buffer (eg. in scroll bar)
- if (line.length === this._model.selectionStart[0]) {
- return;
- }
-
- // If the mouse is over the second half of a wide character, adjust the
- // selection to cover the whole character
- if (line.hasWidth(this._model.selectionStart[0]) === 0) {
- this._model.selectionStart[0]++;
- }
- }
-
- /**
- * Performs a double click, selecting the current word.
- * @param event The mouse event.
- */
- private _onDoubleClick(event: MouseEvent): void {
- if (this._selectWordAtCursor(event, true)) {
- this._activeSelectionMode = SelectionMode.WORD;
- }
- }
-
- /**
- * Performs a triple click, selecting the current line and activating line
- * select mode.
- * @param event The mouse event.
- */
- private _onTripleClick(event: MouseEvent): void {
- const coords = this._getMouseBufferCoords(event);
- if (coords) {
- this._activeSelectionMode = SelectionMode.LINE;
- this._selectLineAt(coords[1]);
- }
- }
-
- /**
- * Returns whether the selection manager should operate in column select mode
- * @param event the mouse or keyboard event
- */
- public shouldColumnSelect(event: KeyboardEvent | MouseEvent): boolean {
- return event.altKey && !(Browser.isMac && this._optionsService.rawOptions.macOptionClickForcesSelection);
- }
-
- /**
- * Handles the mousemove event when the mouse button is down, recording the
- * end of the selection and refreshing the selection.
- * @param event The mousemove event.
- */
- private _onMouseMove(event: MouseEvent): void {
- // If the mousemove listener is active it means that a selection is
- // currently being made, we should stop propagation to prevent mouse events
- // to be sent to the pty.
- event.stopImmediatePropagation();
-
- // Do nothing if there is no selection start, this can happen if the first
- // click in the terminal is an incremental click
- if (!this._model.selectionStart) {
- return;
- }
-
- // Record the previous position so we know whether to redraw the selection
- // at the end.
- const previousSelectionEnd = this._model.selectionEnd ? [this._model.selectionEnd[0], this._model.selectionEnd[1]] : null;
-
- // Set the initial selection end based on the mouse coordinates
- this._model.selectionEnd = this._getMouseBufferCoords(event);
- if (!this._model.selectionEnd) {
- this.refresh(true);
- return;
- }
-
- // Select the entire line if line select mode is active.
- if (this._activeSelectionMode === SelectionMode.LINE) {
- if (this._model.selectionEnd[1] < this._model.selectionStart[1]) {
- this._model.selectionEnd[0] = 0;
- } else {
- this._model.selectionEnd[0] = this._bufferService.cols;
- }
- } else if (this._activeSelectionMode === SelectionMode.WORD) {
- this._selectToWordAt(this._model.selectionEnd);
- }
-
- // Determine the amount of scrolling that will happen.
- this._dragScrollAmount = this._getMouseEventScrollAmount(event);
-
- // If the cursor was above or below the viewport, make sure it's at the
- // start or end of the viewport respectively. This should only happen when
- // NOT in column select mode.
- if (this._activeSelectionMode !== SelectionMode.COLUMN) {
- if (this._dragScrollAmount > 0) {
- this._model.selectionEnd[0] = this._bufferService.cols;
- } else if (this._dragScrollAmount < 0) {
- this._model.selectionEnd[0] = 0;
- }
- }
-
- // If the character is a wide character include the cell to the right in the
- // selection. Note that selections at the very end of the line will never
- // have a character.
- const buffer = this._bufferService.buffer;
- if (this._model.selectionEnd[1] < buffer.lines.length) {
- const line = buffer.lines.get(this._model.selectionEnd[1]);
- if (line && line.hasWidth(this._model.selectionEnd[0]) === 0) {
- this._model.selectionEnd[0]++;
- }
- }
-
- // Only draw here if the selection changes.
- if (!previousSelectionEnd ||
- previousSelectionEnd[0] !== this._model.selectionEnd[0] ||
- previousSelectionEnd[1] !== this._model.selectionEnd[1]) {
- this.refresh(true);
- }
- }
-
- /**
- * The callback that occurs every DRAG_SCROLL_INTERVAL ms that does the
- * scrolling of the viewport.
- */
- private _dragScroll(): void {
- if (!this._model.selectionEnd || !this._model.selectionStart) {
- return;
- }
- if (this._dragScrollAmount) {
- this._onRequestScrollLines.fire({ amount: this._dragScrollAmount, suppressScrollEvent: false });
- // Re-evaluate selection
- // If the cursor was above or below the viewport, make sure it's at the
- // start or end of the viewport respectively. This should only happen when
- // NOT in column select mode.
- const buffer = this._bufferService.buffer;
- if (this._dragScrollAmount > 0) {
- if (this._activeSelectionMode !== SelectionMode.COLUMN) {
- this._model.selectionEnd[0] = this._bufferService.cols;
- }
- this._model.selectionEnd[1] = Math.min(buffer.ydisp + this._bufferService.rows, buffer.lines.length - 1);
- } else {
- if (this._activeSelectionMode !== SelectionMode.COLUMN) {
- this._model.selectionEnd[0] = 0;
- }
- this._model.selectionEnd[1] = buffer.ydisp;
- }
- this.refresh();
- }
- }
-
- /**
- * Handles the mouseup event, removing the mousedown listeners.
- * @param event The mouseup event.
- */
- private _onMouseUp(event: MouseEvent): void {
- const timeElapsed = event.timeStamp - this._mouseDownTimeStamp;
-
- this._removeMouseDownListeners();
-
- if (this.selectionText.length <= 1 && timeElapsed < ALT_CLICK_MOVE_CURSOR_TIME && event.altKey && this._optionsService.getOption('altClickMovesCursor')) {
- if (this._bufferService.buffer.ybase === this._bufferService.buffer.ydisp) {
- const coordinates = this._mouseService.getCoords(
- event,
- this._element,
- this._bufferService.cols,
- this._bufferService.rows,
- false
- );
- if (coordinates && coordinates[0] !== undefined && coordinates[1] !== undefined) {
- const sequence = moveToCellSequence(coordinates[0] - 1, coordinates[1] - 1, this._bufferService, this._coreService.decPrivateModes.applicationCursorKeys);
- this._coreService.triggerDataEvent(sequence, true);
- }
- }
- } else {
- this._fireEventIfSelectionChanged();
- }
- }
-
- private _fireEventIfSelectionChanged(): void {
- const start = this._model.finalSelectionStart;
- const end = this._model.finalSelectionEnd;
- const hasSelection = !!start && !!end && (start[0] !== end[0] || start[1] !== end[1]);
-
- if (!hasSelection) {
- if (this._oldHasSelection) {
- this._fireOnSelectionChange(start, end, hasSelection);
- }
- return;
- }
-
- // Sanity check, these should not be undefined as there is a selection
- if (!start || !end) {
- return;
- }
-
- if (!this._oldSelectionStart || !this._oldSelectionEnd || (
- start[0] !== this._oldSelectionStart[0] || start[1] !== this._oldSelectionStart[1] ||
- end[0] !== this._oldSelectionEnd[0] || end[1] !== this._oldSelectionEnd[1])) {
-
- this._fireOnSelectionChange(start, end, hasSelection);
- }
- }
-
- private _fireOnSelectionChange(start: [number, number] | undefined, end: [number, number] | undefined, hasSelection: boolean): void {
- this._oldSelectionStart = start;
- this._oldSelectionEnd = end;
- this._oldHasSelection = hasSelection;
- this._onSelectionChange.fire();
- }
-
- private _onBufferActivate(e: {activeBuffer: IBuffer, inactiveBuffer: IBuffer}): void {
- this.clearSelection();
- // Only adjust the selection on trim, shiftElements is rarely used (only in
- // reverseIndex) and delete in a splice is only ever used when the same
- // number of elements was just added. Given this is could actually be
- // beneficial to leave the selection as is for these cases.
- this._trimListener.dispose();
- this._trimListener = e.activeBuffer.lines.onTrim(amount => this._onTrim(amount));
- }
-
- /**
- * Converts a viewport column to the character index on the buffer line, the
- * latter takes into account wide characters.
- * @param coords The coordinates to find the 2 index for.
- */
- private _convertViewportColToCharacterIndex(bufferLine: IBufferLine, coords: [number, number]): number {
- let charIndex = coords[0];
- for (let i = 0; coords[0] >= i; i++) {
- const length = bufferLine.loadCell(i, this._workCell).getChars().length;
- if (this._workCell.getWidth() === 0) {
- // Wide characters aren't included in the line string so decrement the
- // index so the index is back on the wide character.
- charIndex--;
- } else if (length > 1 && coords[0] !== i) {
- // Emojis take up multiple characters, so adjust accordingly. For these
- // we don't want ot include the character at the column as we're
- // returning the start index in the string, not the end index.
- charIndex += length - 1;
- }
- }
- return charIndex;
- }
-
- public setSelection(col: number, row: number, length: number): void {
- this._model.clearSelection();
- this._removeMouseDownListeners();
- this._model.selectionStart = [col, row];
- this._model.selectionStartLength = length;
- this.refresh();
- }
-
- public rightClickSelect(ev: MouseEvent): void {
- if (!this._isClickInSelection(ev)) {
- if (this._selectWordAtCursor(ev, false)) {
- this.refresh(true);
- }
- this._fireEventIfSelectionChanged();
- }
- }
-
- /**
- * Gets positional information for the word at the coordinated specified.
- * @param coords The coordinates to get the word at.
- */
- private _getWordAt(coords: [number, number], allowWhitespaceOnlySelection: boolean, followWrappedLinesAbove: boolean = true, followWrappedLinesBelow: boolean = true): IWordPosition | undefined {
- // Ensure coords are within viewport (eg. not within scroll bar)
- if (coords[0] >= this._bufferService.cols) {
- return undefined;
- }
-
- const buffer = this._bufferService.buffer;
- const bufferLine = buffer.lines.get(coords[1]);
- if (!bufferLine) {
- return undefined;
- }
-
- const line = buffer.translateBufferLineToString(coords[1], false);
-
- // Get actual index, taking into consideration wide characters
- let startIndex = this._convertViewportColToCharacterIndex(bufferLine, coords);
- let endIndex = startIndex;
-
- // Record offset to be used later
- const charOffset = coords[0] - startIndex;
- let leftWideCharCount = 0;
- let rightWideCharCount = 0;
- let leftLongCharOffset = 0;
- let rightLongCharOffset = 0;
-
- if (line.charAt(startIndex) === ' ') {
- // Expand until non-whitespace is hit
- while (startIndex > 0 && line.charAt(startIndex - 1) === ' ') {
- startIndex--;
- }
- while (endIndex < line.length && line.charAt(endIndex + 1) === ' ') {
- endIndex++;
- }
- } else {
- // Expand until whitespace is hit. This algorithm works by scanning left
- // and right from the starting position, keeping both the index format
- // (line) and the column format (bufferLine) in sync. When a wide
- // character is hit, it is recorded and the column index is adjusted.
- let startCol = coords[0];
- let endCol = coords[0];
-
- // Consider the initial position, skip it and increment the wide char
- // variable
- if (bufferLine.getWidth(startCol) === 0) {
- leftWideCharCount++;
- startCol--;
- }
- if (bufferLine.getWidth(endCol) === 2) {
- rightWideCharCount++;
- endCol++;
- }
-
- // Adjust the end index for characters whose length are > 1 (emojis)
- const length = bufferLine.getString(endCol).length;
- if (length > 1) {
- rightLongCharOffset += length - 1;
- endIndex += length - 1;
- }
-
- // Expand the string in both directions until a space is hit
- while (startCol > 0 && startIndex > 0 && !this._isCharWordSeparator(bufferLine.loadCell(startCol - 1, this._workCell))) {
- bufferLine.loadCell(startCol - 1, this._workCell);
- const length = this._workCell.getChars().length;
- if (this._workCell.getWidth() === 0) {
- // If the next character is a wide char, record it and skip the column
- leftWideCharCount++;
- startCol--;
- } else if (length > 1) {
- // If the next character's string is longer than 1 char (eg. emoji),
- // adjust the index
- leftLongCharOffset += length - 1;
- startIndex -= length - 1;
- }
- startIndex--;
- startCol--;
- }
- while (endCol < bufferLine.length && endIndex + 1 < line.length && !this._isCharWordSeparator(bufferLine.loadCell(endCol + 1, this._workCell))) {
- bufferLine.loadCell(endCol + 1, this._workCell);
- const length = this._workCell.getChars().length;
- if (this._workCell.getWidth() === 2) {
- // If the next character is a wide char, record it and skip the column
- rightWideCharCount++;
- endCol++;
- } else if (length > 1) {
- // If the next character's string is longer than 1 char (eg. emoji),
- // adjust the index
- rightLongCharOffset += length - 1;
- endIndex += length - 1;
- }
- endIndex++;
- endCol++;
- }
- }
-
- // Incremenet the end index so it is at the start of the next character
- endIndex++;
-
- // Calculate the start _column_, converting the the string indexes back to
- // column coordinates.
- let start =
- startIndex // The index of the selection's start char in the line string
- + charOffset // The difference between the initial char's column and index
- - leftWideCharCount // The number of wide chars left of the initial char
- + leftLongCharOffset; // The number of additional chars left of the initial char added by columns with strings longer than 1 (emojis)
-
- // Calculate the length in _columns_, converting the the string indexes back
- // to column coordinates.
- let length = Math.min(this._bufferService.cols, // Disallow lengths larger than the terminal cols
- endIndex // The index of the selection's end char in the line string
- - startIndex // The index of the selection's start char in the line string
- + leftWideCharCount // The number of wide chars left of the initial char
- + rightWideCharCount // The number of wide chars right of the initial char (inclusive)
- - leftLongCharOffset // The number of additional chars left of the initial char added by columns with strings longer than 1 (emojis)
- - rightLongCharOffset); // The number of additional chars right of the initial char (inclusive) added by columns with strings longer than 1 (emojis)
-
- if (!allowWhitespaceOnlySelection && line.slice(startIndex, endIndex).trim() === '') {
- return undefined;
- }
-
- // Recurse upwards if the line is wrapped and the word wraps to the above line
- if (followWrappedLinesAbove) {
- if (start === 0 && bufferLine.getCodePoint(0) !== 32 /* ' ' */) {
- const previousBufferLine = buffer.lines.get(coords[1] - 1);
- if (previousBufferLine && bufferLine.isWrapped && previousBufferLine.getCodePoint(this._bufferService.cols - 1) !== 32 /* ' ' */) {
- const previousLineWordPosition = this._getWordAt([this._bufferService.cols - 1, coords[1] - 1], false, true, false);
- if (previousLineWordPosition) {
- const offset = this._bufferService.cols - previousLineWordPosition.start;
- start -= offset;
- length += offset;
- }
- }
- }
- }
-
- // Recurse downwards if the line is wrapped and the word wraps to the next line
- if (followWrappedLinesBelow) {
- if (start + length === this._bufferService.cols && bufferLine.getCodePoint(this._bufferService.cols - 1) !== 32 /* ' ' */) {
- const nextBufferLine = buffer.lines.get(coords[1] + 1);
- if (nextBufferLine?.isWrapped && nextBufferLine.getCodePoint(0) !== 32 /* ' ' */) {
- const nextLineWordPosition = this._getWordAt([0, coords[1] + 1], false, false, true);
- if (nextLineWordPosition) {
- length += nextLineWordPosition.length;
- }
- }
- }
- }
-
- return { start, length };
- }
-
- /**
- * Selects the word at the coordinates specified.
- * @param coords The coordinates to get the word at.
- * @param allowWhitespaceOnlySelection If whitespace should be selected
- */
- protected _selectWordAt(coords: [number, number], allowWhitespaceOnlySelection: boolean): void {
- const wordPosition = this._getWordAt(coords, allowWhitespaceOnlySelection);
- if (wordPosition) {
- // Adjust negative start value
- while (wordPosition.start < 0) {
- wordPosition.start += this._bufferService.cols;
- coords[1]--;
- }
- this._model.selectionStart = [wordPosition.start, coords[1]];
- this._model.selectionStartLength = wordPosition.length;
- }
- }
-
- /**
- * Sets the selection end to the word at the coordinated specified.
- * @param coords The coordinates to get the word at.
- */
- private _selectToWordAt(coords: [number, number]): void {
- const wordPosition = this._getWordAt(coords, true);
- if (wordPosition) {
- let endRow = coords[1];
-
- // Adjust negative start value
- while (wordPosition.start < 0) {
- wordPosition.start += this._bufferService.cols;
- endRow--;
- }
-
- // Adjust wrapped length value, this only needs to happen when values are reversed as in that
- // case we're interested in the start of the word, not the end
- if (!this._model.areSelectionValuesReversed()) {
- while (wordPosition.start + wordPosition.length > this._bufferService.cols) {
- wordPosition.length -= this._bufferService.cols;
- endRow++;
- }
- }
-
- this._model.selectionEnd = [this._model.areSelectionValuesReversed() ? wordPosition.start : wordPosition.start + wordPosition.length, endRow];
- }
- }
-
- /**
- * Gets whether the character is considered a word separator by the select
- * word logic.
- * @param char The character to check.
- */
- private _isCharWordSeparator(cell: CellData): boolean {
- // Zero width characters are never separators as they are always to the
- // right of wide characters
- if (cell.getWidth() === 0) {
- return false;
- }
- return this._optionsService.rawOptions.wordSeparator.indexOf(cell.getChars()) >= 0;
- }
-
- /**
- * Selects the line specified.
- * @param line The line index.
- */
- protected _selectLineAt(line: number): void {
- const wrappedRange = this._bufferService.buffer.getWrappedRangeForLine(line);
- this._model.selectionStart = [0, wrappedRange.first];
- this._model.selectionEnd = [this._bufferService.cols, wrappedRange.last];
- this._model.selectionStartLength = 0;
- }
-}
diff --git a/node_modules/xterm/src/browser/services/Services.ts b/node_modules/xterm/src/browser/services/Services.ts
deleted file mode 100644
index 7faf3f0..0000000
--- a/node_modules/xterm/src/browser/services/Services.ts
+++ /dev/null
@@ -1,125 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IEvent } from 'common/EventEmitter';
-import { IRenderDimensions, IRenderer } from 'browser/renderer/Types';
-import { IColorSet } from 'browser/Types';
-import { ISelectionRedrawRequestEvent as ISelectionRequestRedrawEvent, ISelectionRequestScrollLinesEvent } from 'browser/selection/Types';
-import { createDecorator } from 'common/services/ServiceRegistry';
-import { IDisposable } from 'common/Types';
-import { IDecorationOptions, IDecoration } from 'xterm';
-import { IBufferService } from 'common/services/Services';
-
-export const ICharSizeService = createDecorator<ICharSizeService>('CharSizeService');
-export interface ICharSizeService {
- serviceBrand: undefined;
-
- readonly width: number;
- readonly height: number;
- readonly hasValidSize: boolean;
-
- readonly onCharSizeChange: IEvent<void>;
-
- measure(): void;
-}
-
-export const ICoreBrowserService = createDecorator<ICoreBrowserService>('CoreBrowserService');
-export interface ICoreBrowserService {
- serviceBrand: undefined;
-
- readonly isFocused: boolean;
-}
-
-export const IMouseService = createDecorator<IMouseService>('MouseService');
-export interface IMouseService {
- serviceBrand: undefined;
-
- getCoords(event: {clientX: number, clientY: number}, element: HTMLElement, colCount: number, rowCount: number, isSelection?: boolean): [number, number] | undefined;
- getRawByteCoords(event: MouseEvent, element: HTMLElement, colCount: number, rowCount: number): { x: number, y: number } | undefined;
-}
-
-export const IRenderService = createDecorator<IRenderService>('RenderService');
-export interface IRenderService extends IDisposable {
- serviceBrand: undefined;
-
- onDimensionsChange: IEvent<IRenderDimensions>;
- /**
- * Fires when buffer changes are rendered. This does not fire when only cursor
- * or selections are rendered.
- */
- onRenderedBufferChange: IEvent<{ start: number, end: number }>;
- onRefreshRequest: IEvent<{ start: number, end: number }>;
-
- dimensions: IRenderDimensions;
-
- refreshRows(start: number, end: number): void;
- clearTextureAtlas(): void;
- resize(cols: number, rows: number): void;
- changeOptions(): void;
- setRenderer(renderer: IRenderer): void;
- setColors(colors: IColorSet): void;
- onDevicePixelRatioChange(): void;
- onResize(cols: number, rows: number): void;
- // TODO: Is this useful when we have onResize?
- onCharSizeChanged(): void;
- onBlur(): void;
- onFocus(): void;
- onSelectionChanged(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void;
- onCursorMove(): void;
- clear(): void;
-}
-
-export const ISelectionService = createDecorator<ISelectionService>('SelectionService');
-export interface ISelectionService {
- serviceBrand: undefined;
-
- readonly selectionText: string;
- readonly hasSelection: boolean;
- readonly selectionStart: [number, number] | undefined;
- readonly selectionEnd: [number, number] | undefined;
-
- readonly onLinuxMouseSelection: IEvent<string>;
- readonly onRequestRedraw: IEvent<ISelectionRequestRedrawEvent>;
- readonly onRequestScrollLines: IEvent<ISelectionRequestScrollLinesEvent>;
- readonly onSelectionChange: IEvent<void>;
-
- disable(): void;
- enable(): void;
- reset(): void;
- setSelection(row: number, col: number, length: number): void;
- selectAll(): void;
- selectLines(start: number, end: number): void;
- clearSelection(): void;
- rightClickSelect(event: MouseEvent): void;
- shouldColumnSelect(event: KeyboardEvent | MouseEvent): boolean;
- shouldForceSelection(event: MouseEvent): boolean;
- refresh(isLinuxMouseSelection?: boolean): void;
- onMouseDown(event: MouseEvent): void;
-}
-
-export const ISoundService = createDecorator<ISoundService>('SoundService');
-export interface ISoundService {
- serviceBrand: undefined;
-
- playBellSound(): void;
-}
-
-
-export const ICharacterJoinerService = createDecorator<ICharacterJoinerService>('CharacterJoinerService');
-export interface ICharacterJoinerService {
- serviceBrand: undefined;
-
- register(handler: (text: string) => [number, number][]): number;
- deregister(joinerId: number): boolean;
- getJoinedCharacters(row: number): [number, number][];
-}
-
-
-export const IDecorationService = createDecorator<IDecorationService>('DecorationService');
-export interface IDecorationService extends IDisposable {
- registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;
- refresh(): void;
- attachToDom(screenElement: HTMLElement, renderService: IRenderService, bufferService: IBufferService): void;
-}
diff --git a/node_modules/xterm/src/browser/services/SoundService.ts b/node_modules/xterm/src/browser/services/SoundService.ts
deleted file mode 100644
index a3b6800..0000000
--- a/node_modules/xterm/src/browser/services/SoundService.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IOptionsService } from 'common/services/Services';
-import { ISoundService } from 'browser/services/Services';
-
-export class SoundService implements ISoundService {
- public serviceBrand: undefined;
-
- private static _audioContext: AudioContext;
-
- public static get audioContext(): AudioContext | null {
- if (!SoundService._audioContext) {
- const audioContextCtor: typeof AudioContext = (window as any).AudioContext || (window as any).webkitAudioContext;
- if (!audioContextCtor) {
- console.warn('Web Audio API is not supported by this browser. Consider upgrading to the latest version');
- return null;
- }
- SoundService._audioContext = new audioContextCtor();
- }
- return SoundService._audioContext;
- }
-
- constructor(
- @IOptionsService private _optionsService: IOptionsService
- ) {
- }
-
- public playBellSound(): void {
- const ctx = SoundService.audioContext;
- if (!ctx) {
- return;
- }
- const bellAudioSource = ctx.createBufferSource();
- ctx.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.rawOptions.bellSound)), (buffer) => {
- bellAudioSource.buffer = buffer;
- bellAudioSource.connect(ctx.destination);
- bellAudioSource.start(0);
- });
- }
-
- private _base64ToArrayBuffer(base64: string): ArrayBuffer {
- const binaryString = window.atob(base64);
- const len = binaryString.length;
- const bytes = new Uint8Array(len);
-
- for (let i = 0; i < len; i++) {
- bytes[i] = binaryString.charCodeAt(i);
- }
-
- return bytes.buffer;
- }
-
- private _removeMimeType(dataURI: string): string {
- // Split the input to get the mime-type and the data itself
- const splitUri = dataURI.split(',');
-
- // Return only the data
- return splitUri[1];
- }
-}
diff --git a/node_modules/xterm/src/common/CircularList.ts b/node_modules/xterm/src/common/CircularList.ts
deleted file mode 100644
index 4d2c04e..0000000
--- a/node_modules/xterm/src/common/CircularList.ts
+++ /dev/null
@@ -1,239 +0,0 @@
-/**
- * Copyright (c) 2016 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ICircularList } from 'common/Types';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-
-export interface IInsertEvent {
- index: number;
- amount: number;
-}
-
-export interface IDeleteEvent {
- index: number;
- amount: number;
-}
-
-/**
- * Represents a circular list; a list with a maximum size that wraps around when push is called,
- * overriding values at the start of the list.
- */
-export class CircularList<T> implements ICircularList<T> {
- protected _array: (T | undefined)[];
- private _startIndex: number;
- private _length: number;
-
- public onDeleteEmitter = new EventEmitter<IDeleteEvent>();
- public get onDelete(): IEvent<IDeleteEvent> { return this.onDeleteEmitter.event; }
- public onInsertEmitter = new EventEmitter<IInsertEvent>();
- public get onInsert(): IEvent<IInsertEvent> { return this.onInsertEmitter.event; }
- public onTrimEmitter = new EventEmitter<number>();
- public get onTrim(): IEvent<number> { return this.onTrimEmitter.event; }
-
- constructor(
- private _maxLength: number
- ) {
- this._array = new Array<T>(this._maxLength);
- this._startIndex = 0;
- this._length = 0;
- }
-
- public get maxLength(): number {
- return this._maxLength;
- }
-
- public set maxLength(newMaxLength: number) {
- // There was no change in maxLength, return early.
- if (this._maxLength === newMaxLength) {
- return;
- }
-
- // Reconstruct array, starting at index 0. Only transfer values from the
- // indexes 0 to length.
- const newArray = new Array<T | undefined>(newMaxLength);
- for (let i = 0; i < Math.min(newMaxLength, this.length); i++) {
- newArray[i] = this._array[this._getCyclicIndex(i)];
- }
- this._array = newArray;
- this._maxLength = newMaxLength;
- this._startIndex = 0;
- }
-
- public get length(): number {
- return this._length;
- }
-
- public set length(newLength: number) {
- if (newLength > this._length) {
- for (let i = this._length; i < newLength; i++) {
- this._array[i] = undefined;
- }
- }
- this._length = newLength;
- }
-
- /**
- * Gets the value at an index.
- *
- * Note that for performance reasons there is no bounds checking here, the index reference is
- * circular so this should always return a value and never throw.
- * @param index The index of the value to get.
- * @return The value corresponding to the index.
- */
- public get(index: number): T | undefined {
- return this._array[this._getCyclicIndex(index)];
- }
-
- /**
- * Sets the value at an index.
- *
- * Note that for performance reasons there is no bounds checking here, the index reference is
- * circular so this should always return a value and never throw.
- * @param index The index to set.
- * @param value The value to set.
- */
- public set(index: number, value: T | undefined): void {
- this._array[this._getCyclicIndex(index)] = value;
- }
-
- /**
- * Pushes a new value onto the list, wrapping around to the start of the array, overriding index 0
- * if the maximum length is reached.
- * @param value The value to push onto the list.
- */
- public push(value: T): void {
- this._array[this._getCyclicIndex(this._length)] = value;
- if (this._length === this._maxLength) {
- this._startIndex = ++this._startIndex % this._maxLength;
- this.onTrimEmitter.fire(1);
- } else {
- this._length++;
- }
- }
-
- /**
- * Advance ringbuffer index and return current element for recycling.
- * Note: The buffer must be full for this method to work.
- * @throws When the buffer is not full.
- */
- public recycle(): T {
- if (this._length !== this._maxLength) {
- throw new Error('Can only recycle when the buffer is full');
- }
- this._startIndex = ++this._startIndex % this._maxLength;
- this.onTrimEmitter.fire(1);
- return this._array[this._getCyclicIndex(this._length - 1)]!;
- }
-
- /**
- * Ringbuffer is at max length.
- */
- public get isFull(): boolean {
- return this._length === this._maxLength;
- }
-
- /**
- * Removes and returns the last value on the list.
- * @return The popped value.
- */
- public pop(): T | undefined {
- return this._array[this._getCyclicIndex(this._length-- - 1)];
- }
-
- /**
- * Deletes and/or inserts items at a particular index (in that order). Unlike
- * Array.prototype.splice, this operation does not return the deleted items as a new array in
- * order to save creating a new array. Note that this operation may shift all values in the list
- * in the worst case.
- * @param start The index to delete and/or insert.
- * @param deleteCount The number of elements to delete.
- * @param items The items to insert.
- */
- public splice(start: number, deleteCount: number, ...items: T[]): void {
- // Delete items
- if (deleteCount) {
- for (let i = start; i < this._length - deleteCount; i++) {
- this._array[this._getCyclicIndex(i)] = this._array[this._getCyclicIndex(i + deleteCount)];
- }
- this._length -= deleteCount;
- this.onDeleteEmitter.fire({ index: start, amount: deleteCount });
- }
-
- // Add items
- for (let i = this._length - 1; i >= start; i--) {
- this._array[this._getCyclicIndex(i + items.length)] = this._array[this._getCyclicIndex(i)];
- }
- for (let i = 0; i < items.length; i++) {
- this._array[this._getCyclicIndex(start + i)] = items[i];
- }
- if (items.length) {
- this.onInsertEmitter.fire({ index: start, amount: items.length });
- }
-
- // Adjust length as needed
- if (this._length + items.length > this._maxLength) {
- const countToTrim = (this._length + items.length) - this._maxLength;
- this._startIndex += countToTrim;
- this._length = this._maxLength;
- this.onTrimEmitter.fire(countToTrim);
- } else {
- this._length += items.length;
- }
- }
-
- /**
- * Trims a number of items from the start of the list.
- * @param count The number of items to remove.
- */
- public trimStart(count: number): void {
- if (count > this._length) {
- count = this._length;
- }
- this._startIndex += count;
- this._length -= count;
- this.onTrimEmitter.fire(count);
- }
-
- public shiftElements(start: number, count: number, offset: number): void {
- if (count <= 0) {
- return;
- }
- if (start < 0 || start >= this._length) {
- throw new Error('start argument out of range');
- }
- if (start + offset < 0) {
- throw new Error('Cannot shift elements in list beyond index 0');
- }
-
- if (offset > 0) {
- for (let i = count - 1; i >= 0; i--) {
- this.set(start + i + offset, this.get(start + i));
- }
- const expandListBy = (start + count + offset) - this._length;
- if (expandListBy > 0) {
- this._length += expandListBy;
- while (this._length > this._maxLength) {
- this._length--;
- this._startIndex++;
- this.onTrimEmitter.fire(1);
- }
- }
- } else {
- for (let i = 0; i < count; i++) {
- this.set(start + i + offset, this.get(start + i));
- }
- }
- }
-
- /**
- * Gets the cyclic index for the specified regular index. The cyclic index can then be used on the
- * backing array to get the element associated with the regular index.
- * @param index The regular index.
- * @returns The cyclic index.
- */
- private _getCyclicIndex(index: number): number {
- return (this._startIndex + index) % this._maxLength;
- }
-}
diff --git a/node_modules/xterm/src/common/Clone.ts b/node_modules/xterm/src/common/Clone.ts
deleted file mode 100644
index 37821fe..0000000
--- a/node_modules/xterm/src/common/Clone.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-/**
- * Copyright (c) 2016 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-/*
- * A simple utility for cloning values
- */
-export function clone<T>(val: T, depth: number = 5): T {
- if (typeof val !== 'object') {
- return val;
- }
-
- // If we're cloning an array, use an array as the base, otherwise use an object
- const clonedObject: any = Array.isArray(val) ? [] : {};
-
- for (const key in val) {
- // Recursively clone eack item unless we're at the maximum depth
- clonedObject[key] = depth <= 1 ? val[key] : (val[key] && clone(val[key], depth - 1));
- }
-
- return clonedObject as T;
-}
diff --git a/node_modules/xterm/src/common/CoreTerminal.ts b/node_modules/xterm/src/common/CoreTerminal.ts
deleted file mode 100644
index 12b374c..0000000
--- a/node_modules/xterm/src/common/CoreTerminal.ts
+++ /dev/null
@@ -1,297 +0,0 @@
-/**
- * Copyright (c) 2014-2020 The xterm.js authors. All rights reserved.
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- * @license MIT
- *
- * Originally forked from (with the author's permission):
- * Fabrice Bellard's javascript vt100 for jslinux:
- * http://bellard.org/jslinux/
- * Copyright (c) 2011 Fabrice Bellard
- * The original design remains. The terminal itself
- * has been extended to include xterm CSI codes, among
- * other features.
- *
- * Terminal Emulation References:
- * http://vt100.net/
- * http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt
- * http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
- * http://invisible-island.net/vttest/
- * http://www.inwap.com/pdp10/ansicode.txt
- * http://linux.die.net/man/4/console_codes
- * http://linux.die.net/man/7/urxvt
- */
-
-import { Disposable } from 'common/Lifecycle';
-import { IInstantiationService, IOptionsService, IBufferService, ILogService, ICharsetService, ICoreService, ICoreMouseService, IUnicodeService, IDirtyRowService, LogLevelEnum, ITerminalOptions } from 'common/services/Services';
-import { InstantiationService } from 'common/services/InstantiationService';
-import { LogService } from 'common/services/LogService';
-import { BufferService, MINIMUM_COLS, MINIMUM_ROWS } from 'common/services/BufferService';
-import { OptionsService } from 'common/services/OptionsService';
-import { IDisposable, IBufferLine, IAttributeData, ICoreTerminal, IKeyboardEvent, IScrollEvent, ScrollSource, ITerminalOptions as IPublicTerminalOptions } from 'common/Types';
-import { CoreService } from 'common/services/CoreService';
-import { EventEmitter, IEvent, forwardEvent } from 'common/EventEmitter';
-import { CoreMouseService } from 'common/services/CoreMouseService';
-import { DirtyRowService } from 'common/services/DirtyRowService';
-import { UnicodeService } from 'common/services/UnicodeService';
-import { CharsetService } from 'common/services/CharsetService';
-import { updateWindowsModeWrappedState } from 'common/WindowsMode';
-import { IFunctionIdentifier, IParams } from 'common/parser/Types';
-import { IBufferSet } from 'common/buffer/Types';
-import { InputHandler } from 'common/InputHandler';
-import { WriteBuffer } from 'common/input/WriteBuffer';
-
-// Only trigger this warning a single time per session
-let hasWriteSyncWarnHappened = false;
-
-export abstract class CoreTerminal extends Disposable implements ICoreTerminal {
- protected readonly _instantiationService: IInstantiationService;
- protected readonly _bufferService: IBufferService;
- protected readonly _logService: ILogService;
- protected readonly _charsetService: ICharsetService;
- protected readonly _dirtyRowService: IDirtyRowService;
-
- public readonly coreMouseService: ICoreMouseService;
- public readonly coreService: ICoreService;
- public readonly unicodeService: IUnicodeService;
- public readonly optionsService: IOptionsService;
-
- protected _inputHandler: InputHandler;
- private _writeBuffer: WriteBuffer;
- private _windowsMode: IDisposable | undefined;
-
- private _onBinary = new EventEmitter<string>();
- public get onBinary(): IEvent<string> { return this._onBinary.event; }
- private _onData = new EventEmitter<string>();
- public get onData(): IEvent<string> { return this._onData.event; }
- protected _onLineFeed = new EventEmitter<void>();
- public get onLineFeed(): IEvent<void> { return this._onLineFeed.event; }
- private _onResize = new EventEmitter<{ cols: number, rows: number }>();
- public get onResize(): IEvent<{ cols: number, rows: number }> { return this._onResize.event; }
- protected _onScroll = new EventEmitter<IScrollEvent, void>();
- /**
- * Internally we track the source of the scroll but this is meaningless outside the library so
- * it's filtered out.
- */
- protected _onScrollApi?: EventEmitter<number, void>;
- public get onScroll(): IEvent<number, void> {
- if (!this._onScrollApi) {
- this._onScrollApi = new EventEmitter<number, void>();
- this.register(this._onScroll.event(ev => {
- this._onScrollApi?.fire(ev.position);
- }));
- }
- return this._onScrollApi.event;
- }
-
- public get cols(): number { return this._bufferService.cols; }
- public get rows(): number { return this._bufferService.rows; }
- public get buffers(): IBufferSet { return this._bufferService.buffers; }
- public get options(): ITerminalOptions { return this.optionsService.options; }
- public set options(options: ITerminalOptions) {
- for (const key in options) {
- this.optionsService.options[key] = options[key];
- }
- }
-
- constructor(
- options: Partial<ITerminalOptions>
- ) {
- super();
-
- // Setup and initialize services
- this._instantiationService = new InstantiationService();
- this.optionsService = new OptionsService(options);
- this._instantiationService.setService(IOptionsService, this.optionsService);
- this._bufferService = this.register(this._instantiationService.createInstance(BufferService));
- this._instantiationService.setService(IBufferService, this._bufferService);
- this._logService = this._instantiationService.createInstance(LogService);
- this._instantiationService.setService(ILogService, this._logService);
- this.coreService = this.register(this._instantiationService.createInstance(CoreService, () => this.scrollToBottom()));
- this._instantiationService.setService(ICoreService, this.coreService);
- this.coreMouseService = this._instantiationService.createInstance(CoreMouseService);
- this._instantiationService.setService(ICoreMouseService, this.coreMouseService);
- this._dirtyRowService = this._instantiationService.createInstance(DirtyRowService);
- this._instantiationService.setService(IDirtyRowService, this._dirtyRowService);
- this.unicodeService = this._instantiationService.createInstance(UnicodeService);
- this._instantiationService.setService(IUnicodeService, this.unicodeService);
- this._charsetService = this._instantiationService.createInstance(CharsetService);
- this._instantiationService.setService(ICharsetService, this._charsetService);
-
- // Register input handler and handle/forward events
- this._inputHandler = new InputHandler(this._bufferService, this._charsetService, this.coreService, this._dirtyRowService, this._logService, this.optionsService, this.coreMouseService, this.unicodeService);
- this.register(forwardEvent(this._inputHandler.onLineFeed, this._onLineFeed));
- this.register(this._inputHandler);
-
- // Setup listeners
- this.register(forwardEvent(this._bufferService.onResize, this._onResize));
- this.register(forwardEvent(this.coreService.onData, this._onData));
- this.register(forwardEvent(this.coreService.onBinary, this._onBinary));
- this.register(this.optionsService.onOptionChange(key => this._updateOptions(key)));
- this.register(this._bufferService.onScroll(event => {
- this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: ScrollSource.TERMINAL });
- this._dirtyRowService.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
- }));
- this.register(this._inputHandler.onScroll(event => {
- this._onScroll.fire({ position: this._bufferService.buffer.ydisp, source: ScrollSource.TERMINAL });
- this._dirtyRowService.markRangeDirty(this._bufferService.buffer.scrollTop, this._bufferService.buffer.scrollBottom);
- }));
-
- // Setup WriteBuffer
- this._writeBuffer = new WriteBuffer((data, promiseResult) => this._inputHandler.parse(data, promiseResult));
- }
-
- public dispose(): void {
- if (this._isDisposed) {
- return;
- }
- super.dispose();
- this._windowsMode?.dispose();
- this._windowsMode = undefined;
- }
-
- public write(data: string | Uint8Array, callback?: () => void): void {
- this._writeBuffer.write(data, callback);
- }
-
- /**
- * Write data to terminal synchonously.
- *
- * This method is unreliable with async parser handlers, thus should not
- * be used anymore. If you need blocking semantics on data input consider
- * `write` with a callback instead.
- *
- * @deprecated Unreliable, will be removed soon.
- */
- public writeSync(data: string | Uint8Array, maxSubsequentCalls?: number): void {
- if (this._logService.logLevel <= LogLevelEnum.WARN && !hasWriteSyncWarnHappened) {
- this._logService.warn('writeSync is unreliable and will be removed soon.');
- hasWriteSyncWarnHappened = true;
- }
- this._writeBuffer.writeSync(data, maxSubsequentCalls);
- }
-
- public resize(x: number, y: number): void {
- if (isNaN(x) || isNaN(y)) {
- return;
- }
-
- x = Math.max(x, MINIMUM_COLS);
- y = Math.max(y, MINIMUM_ROWS);
-
- this._bufferService.resize(x, y);
- }
-
- /**
- * Scroll the terminal down 1 row, creating a blank line.
- * @param isWrapped Whether the new line is wrapped from the previous line.
- */
- public scroll(eraseAttr: IAttributeData, isWrapped: boolean = false): void {
- this._bufferService.scroll(eraseAttr, isWrapped);
- }
-
- /**
- * Scroll the display of the terminal
- * @param disp The number of lines to scroll down (negative scroll up).
- * @param suppressScrollEvent Don't emit the scroll event as scrollLines. This is used
- * to avoid unwanted events being handled by the viewport when the event was triggered from the
- * viewport originally.
- */
- public scrollLines(disp: number, suppressScrollEvent?: boolean, source?: ScrollSource): void {
- this._bufferService.scrollLines(disp, suppressScrollEvent, source);
- }
-
- /**
- * Scroll the display of the terminal by a number of pages.
- * @param pageCount The number of pages to scroll (negative scrolls up).
- */
- public scrollPages(pageCount: number): void {
- this._bufferService.scrollPages(pageCount);
- }
-
- /**
- * Scrolls the display of the terminal to the top.
- */
- public scrollToTop(): void {
- this._bufferService.scrollToTop();
- }
-
- /**
- * Scrolls the display of the terminal to the bottom.
- */
- public scrollToBottom(): void {
- this._bufferService.scrollToBottom();
- }
-
- public scrollToLine(line: number): void {
- this._bufferService.scrollToLine(line);
- }
-
- /** Add handler for ESC escape sequence. See xterm.d.ts for details. */
- public registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable {
- return this._inputHandler.registerEscHandler(id, callback);
- }
-
- /** Add handler for DCS escape sequence. See xterm.d.ts for details. */
- public registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable {
- return this._inputHandler.registerDcsHandler(id, callback);
- }
-
- /** Add handler for CSI escape sequence. See xterm.d.ts for details. */
- public registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable {
- return this._inputHandler.registerCsiHandler(id, callback);
- }
-
- /** Add handler for OSC escape sequence. See xterm.d.ts for details. */
- public registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable {
- return this._inputHandler.registerOscHandler(ident, callback);
- }
-
- protected _setup(): void {
- if (this.optionsService.rawOptions.windowsMode) {
- this._enableWindowsMode();
- }
- }
-
- public reset(): void {
- this._inputHandler.reset();
- this._bufferService.reset();
- this._charsetService.reset();
- this.coreService.reset();
- this.coreMouseService.reset();
- }
-
- protected _updateOptions(key: string): void {
- // TODO: These listeners should be owned by individual components
- switch (key) {
- case 'scrollback':
- this.buffers.resize(this.cols, this.rows);
- break;
- case 'windowsMode':
- if (this.optionsService.rawOptions.windowsMode) {
- this._enableWindowsMode();
- } else {
- this._windowsMode?.dispose();
- this._windowsMode = undefined;
- }
- break;
- }
- }
-
- protected _enableWindowsMode(): void {
- if (!this._windowsMode) {
- const disposables: IDisposable[] = [];
- disposables.push(this.onLineFeed(updateWindowsModeWrappedState.bind(null, this._bufferService)));
- disposables.push(this.registerCsiHandler({ final: 'H' }, () => {
- updateWindowsModeWrappedState(this._bufferService);
- return false;
- }));
- this._windowsMode = {
- dispose: () => {
- for (const d of disposables) {
- d.dispose();
- }
- }
- };
- }
- }
-}
diff --git a/node_modules/xterm/src/common/EventEmitter.ts b/node_modules/xterm/src/common/EventEmitter.ts
deleted file mode 100644
index 4684809..0000000
--- a/node_modules/xterm/src/common/EventEmitter.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IDisposable } from 'common/Types';
-
-interface IListener<T, U = void> {
- (arg1: T, arg2: U): void;
-}
-
-export interface IEvent<T, U = void> {
- (listener: (arg1: T, arg2: U) => any): IDisposable;
-}
-
-export interface IEventEmitter<T, U = void> {
- event: IEvent<T, U>;
- fire(arg1: T, arg2: U): void;
- dispose(): void;
-}
-
-export class EventEmitter<T, U = void> implements IEventEmitter<T, U> {
- private _listeners: IListener<T, U>[] = [];
- private _event?: IEvent<T, U>;
- private _disposed: boolean = false;
-
- public get event(): IEvent<T, U> {
- if (!this._event) {
- this._event = (listener: (arg1: T, arg2: U) => any) => {
- this._listeners.push(listener);
- const disposable = {
- dispose: () => {
- if (!this._disposed) {
- for (let i = 0; i < this._listeners.length; i++) {
- if (this._listeners[i] === listener) {
- this._listeners.splice(i, 1);
- return;
- }
- }
- }
- }
- };
- return disposable;
- };
- }
- return this._event;
- }
-
- public fire(arg1: T, arg2: U): void {
- const queue: IListener<T, U>[] = [];
- for (let i = 0; i < this._listeners.length; i++) {
- queue.push(this._listeners[i]);
- }
- for (let i = 0; i < queue.length; i++) {
- queue[i].call(undefined, arg1, arg2);
- }
- }
-
- public dispose(): void {
- if (this._listeners) {
- this._listeners.length = 0;
- }
- this._disposed = true;
- }
-}
-
-export function forwardEvent<T>(from: IEvent<T>, to: IEventEmitter<T>): IDisposable {
- return from(e => to.fire(e));
-}
diff --git a/node_modules/xterm/src/common/InputHandler.ts b/node_modules/xterm/src/common/InputHandler.ts
deleted file mode 100644
index d5b8d94..0000000
--- a/node_modules/xterm/src/common/InputHandler.ts
+++ /dev/null
@@ -1,3230 +0,0 @@
-/**
- * Copyright (c) 2014 The xterm.js authors. All rights reserved.
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- * @license MIT
- */
-
-import { IInputHandler, IAttributeData, IDisposable, IWindowOptions, IColorEvent, IParseStack, ColorIndex, ColorRequestType } from 'common/Types';
-import { C0, C1 } from 'common/data/EscapeSequences';
-import { CHARSETS, DEFAULT_CHARSET } from 'common/data/Charsets';
-import { EscapeSequenceParser } from 'common/parser/EscapeSequenceParser';
-import { Disposable } from 'common/Lifecycle';
-import { concat } from 'common/TypedArrayUtils';
-import { StringToUtf32, stringFromCodePoint, utf32ToString, Utf8ToUtf32 } from 'common/input/TextDecoder';
-import { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { IParsingState, IDcsHandler, IEscapeSequenceParser, IParams, IFunctionIdentifier } from 'common/parser/Types';
-import { NULL_CELL_CODE, NULL_CELL_WIDTH, Attributes, FgFlags, BgFlags, Content, UnderlineStyle } from 'common/buffer/Constants';
-import { CellData } from 'common/buffer/CellData';
-import { AttributeData } from 'common/buffer/AttributeData';
-import { ICoreService, IBufferService, IOptionsService, ILogService, IDirtyRowService, ICoreMouseService, ICharsetService, IUnicodeService, LogLevelEnum } from 'common/services/Services';
-import { OscHandler } from 'common/parser/OscParser';
-import { DcsHandler } from 'common/parser/DcsParser';
-import { IBuffer } from 'common/buffer/Types';
-import { parseColor } from 'common/input/XParseColor';
-
-/**
- * Map collect to glevel. Used in `selectCharset`.
- */
-const GLEVEL: { [key: string]: number } = { '(': 0, ')': 1, '*': 2, '+': 3, '-': 1, '.': 2 };
-
-/**
- * VT commands done by the parser - FIXME: move this to the parser?
- */
-// @vt: #Y ESC CSI "Control Sequence Introducer" "ESC [" "Start of a CSI sequence."
-// @vt: #Y ESC OSC "Operating System Command" "ESC ]" "Start of an OSC sequence."
-// @vt: #Y ESC DCS "Device Control String" "ESC P" "Start of a DCS sequence."
-// @vt: #Y ESC ST "String Terminator" "ESC \" "Terminator used for string type sequences."
-// @vt: #Y ESC PM "Privacy Message" "ESC ^" "Start of a privacy message."
-// @vt: #Y ESC APC "Application Program Command" "ESC _" "Start of an APC sequence."
-// @vt: #Y C1 CSI "Control Sequence Introducer" "\x9B" "Start of a CSI sequence."
-// @vt: #Y C1 OSC "Operating System Command" "\x9D" "Start of an OSC sequence."
-// @vt: #Y C1 DCS "Device Control String" "\x90" "Start of a DCS sequence."
-// @vt: #Y C1 ST "String Terminator" "\x9C" "Terminator used for string type sequences."
-// @vt: #Y C1 PM "Privacy Message" "\x9E" "Start of a privacy message."
-// @vt: #Y C1 APC "Application Program Command" "\x9F" "Start of an APC sequence."
-// @vt: #Y C0 NUL "Null" "\0, \x00" "NUL is ignored."
-// @vt: #Y C0 ESC "Escape" "\e, \x1B" "Start of a sequence. Cancels any other sequence."
-
-/**
- * Document common VT features here that are currently unsupported
- */
-// @vt: #N DCS SIXEL "SIXEL Graphics" "DCS Ps ; Ps ; Ps ; q Pt ST" "Draw SIXEL image starting at cursor position."
-// @vt: #N OSC 1 "Set Icon Name" "OSC 1 ; Pt BEL" "Set icon name."
-
-/**
- * Max length of the UTF32 input buffer. Real memory consumption is 4 times higher.
- */
-const MAX_PARSEBUFFER_LENGTH = 131072;
-
-/**
- * Limit length of title and icon name stacks.
- */
-const STACK_LIMIT = 10;
-
-// map params to window option
-function paramToWindowOption(n: number, opts: IWindowOptions): boolean {
- if (n > 24) {
- return opts.setWinLines || false;
- }
- switch (n) {
- case 1: return !!opts.restoreWin;
- case 2: return !!opts.minimizeWin;
- case 3: return !!opts.setWinPosition;
- case 4: return !!opts.setWinSizePixels;
- case 5: return !!opts.raiseWin;
- case 6: return !!opts.lowerWin;
- case 7: return !!opts.refreshWin;
- case 8: return !!opts.setWinSizeChars;
- case 9: return !!opts.maximizeWin;
- case 10: return !!opts.fullscreenWin;
- case 11: return !!opts.getWinState;
- case 13: return !!opts.getWinPosition;
- case 14: return !!opts.getWinSizePixels;
- case 15: return !!opts.getScreenSizePixels;
- case 16: return !!opts.getCellSizePixels;
- case 18: return !!opts.getWinSizeChars;
- case 19: return !!opts.getScreenSizeChars;
- case 20: return !!opts.getIconTitle;
- case 21: return !!opts.getWinTitle;
- case 22: return !!opts.pushTitle;
- case 23: return !!opts.popTitle;
- case 24: return !!opts.setWinLines;
- }
- return false;
-}
-
-export enum WindowsOptionsReportType {
- GET_WIN_SIZE_PIXELS = 0,
- GET_CELL_SIZE_PIXELS = 1
-}
-
-// create a warning log if an async handler takes longer than the limit (in ms)
-const SLOW_ASYNC_LIMIT = 5000;
-
-/**
- * DCS subparser implementations
- */
-
-/**
- * DCS $ q Pt ST
- * DECRQSS (https://vt100.net/docs/vt510-rm/DECRQSS.html)
- * Request Status String (DECRQSS), VT420 and up.
- * Response: DECRPSS (https://vt100.net/docs/vt510-rm/DECRPSS.html)
- *
- * @vt: #P[See limited support below.] DCS DECRQSS "Request Selection or Setting" "DCS $ q Pt ST" "Request several terminal settings."
- * Response is in the form `ESC P 1 $ r Pt ST` for valid requests, where `Pt` contains the corresponding CSI string,
- * `ESC P 0 ST` for invalid requests.
- *
- * Supported requests and responses:
- *
- * | Type | Request | Response (`Pt`) |
- * | -------------------------------- | ----------------- | ----------------------------------------------------- |
- * | Graphic Rendition (SGR) | `DCS $ q m ST` | always reporting `0m` (currently broken) |
- * | Top and Bottom Margins (DECSTBM) | `DCS $ q r ST` | `Ps ; Ps r` |
- * | Cursor Style (DECSCUSR) | `DCS $ q SP q ST` | `Ps SP q` |
- * | Protection Attribute (DECSCA) | `DCS $ q " q ST` | always reporting `0 " q` (DECSCA is unsupported) |
- * | Conformance Level (DECSCL) | `DCS $ q " p ST` | always reporting `61 ; 1 " p` (DECSCL is unsupported) |
- *
- *
- * TODO:
- * - fix SGR report
- * - either implement DECSCA or remove the report
- * - either check which conformance is better suited or remove the report completely
- * --> we are currently a mixture of all up to VT400 but dont follow anyone strictly
- */
-class DECRQSS implements IDcsHandler {
- private _data: Uint32Array = new Uint32Array(0);
-
- constructor(
- private _bufferService: IBufferService,
- private _coreService: ICoreService,
- private _logService: ILogService,
- private _optionsService: IOptionsService
- ) { }
-
- public hook(params: IParams): void {
- this._data = new Uint32Array(0);
- }
-
- public put(data: Uint32Array, start: number, end: number): void {
- this._data = concat(this._data, data.subarray(start, end));
- }
-
- public unhook(success: boolean): boolean {
- if (!success) {
- this._data = new Uint32Array(0);
- return true;
- }
- const data = utf32ToString(this._data);
- this._data = new Uint32Array(0);
- switch (data) {
- // valid: DCS 1 $ r Pt ST (xterm)
- case '"q': // DECSCA
- this._coreService.triggerDataEvent(`${C0.ESC}P1$r0"q${C0.ESC}\\`);
- break;
- case '"p': // DECSCL
- this._coreService.triggerDataEvent(`${C0.ESC}P1$r61;1"p${C0.ESC}\\`);
- break;
- case 'r': // DECSTBM
- const pt = '' + (this._bufferService.buffer.scrollTop + 1) +
- ';' + (this._bufferService.buffer.scrollBottom + 1) + 'r';
- this._coreService.triggerDataEvent(`${C0.ESC}P1$r${pt}${C0.ESC}\\`);
- break;
- case 'm': // SGR
- // TODO: report real settings instead of 0m
- this._coreService.triggerDataEvent(`${C0.ESC}P1$r0m${C0.ESC}\\`);
- break;
- case ' q': // DECSCUSR
- const STYLES: { [key: string]: number } = { 'block': 2, 'underline': 4, 'bar': 6 };
- let style = STYLES[this._optionsService.rawOptions.cursorStyle];
- style -= this._optionsService.rawOptions.cursorBlink ? 1 : 0;
- this._coreService.triggerDataEvent(`${C0.ESC}P1$r${style} q${C0.ESC}\\`);
- break;
- default:
- // invalid: DCS 0 $ r Pt ST (xterm)
- this._logService.debug('Unknown DCS $q %s', data);
- this._coreService.triggerDataEvent(`${C0.ESC}P0$r${C0.ESC}\\`);
- }
- return true;
- }
-}
-
-/**
- * DCS Ps; Ps| Pt ST
- * DECUDK (https://vt100.net/docs/vt510-rm/DECUDK.html)
- * not supported
- *
- * @vt: #N DCS DECUDK "User Defined Keys" "DCS Ps ; Ps | Pt ST" "Definitions for user-defined keys."
- */
-
-/**
- * DCS + q Pt ST (xterm)
- * Request Terminfo String
- * not implemented
- *
- * @vt: #N DCS XTGETTCAP "Request Terminfo String" "DCS + q Pt ST" "Request Terminfo String."
- */
-
-/**
- * DCS + p Pt ST (xterm)
- * Set Terminfo Data
- * not supported
- *
- * @vt: #N DCS XTSETTCAP "Set Terminfo Data" "DCS + p Pt ST" "Set Terminfo Data."
- */
-
-
-
-/**
- * The terminal's standard implementation of IInputHandler, this handles all
- * input from the Parser.
- *
- * Refer to http://invisible-island.net/xterm/ctlseqs/ctlseqs.html to understand
- * each function's header comment.
- */
-export class InputHandler extends Disposable implements IInputHandler {
- private _parseBuffer: Uint32Array = new Uint32Array(4096);
- private _stringDecoder: StringToUtf32 = new StringToUtf32();
- private _utf8Decoder: Utf8ToUtf32 = new Utf8ToUtf32();
- private _workCell: CellData = new CellData();
- private _windowTitle = '';
- private _iconName = '';
- protected _windowTitleStack: string[] = [];
- protected _iconNameStack: string[] = [];
-
- private _curAttrData: IAttributeData = DEFAULT_ATTR_DATA.clone();
- private _eraseAttrDataInternal: IAttributeData = DEFAULT_ATTR_DATA.clone();
-
- private _activeBuffer: IBuffer;
-
- private _onRequestBell = new EventEmitter<void>();
- public get onRequestBell(): IEvent<void> { return this._onRequestBell.event; }
- private _onRequestRefreshRows = new EventEmitter<number, number>();
- public get onRequestRefreshRows(): IEvent<number, number> { return this._onRequestRefreshRows.event; }
- private _onRequestReset = new EventEmitter<void>();
- public get onRequestReset(): IEvent<void> { return this._onRequestReset.event; }
- private _onRequestSendFocus = new EventEmitter<void>();
- public get onRequestSendFocus(): IEvent<void> { return this._onRequestSendFocus.event; }
- private _onRequestSyncScrollBar = new EventEmitter<void>();
- public get onRequestSyncScrollBar(): IEvent<void> { return this._onRequestSyncScrollBar.event; }
- private _onRequestWindowsOptionsReport = new EventEmitter<WindowsOptionsReportType>();
- public get onRequestWindowsOptionsReport(): IEvent<WindowsOptionsReportType> { return this._onRequestWindowsOptionsReport.event; }
-
- private _onA11yChar = new EventEmitter<string>();
- public get onA11yChar(): IEvent<string> { return this._onA11yChar.event; }
- private _onA11yTab = new EventEmitter<number>();
- public get onA11yTab(): IEvent<number> { return this._onA11yTab.event; }
- private _onCursorMove = new EventEmitter<void>();
- public get onCursorMove(): IEvent<void> { return this._onCursorMove.event; }
- private _onLineFeed = new EventEmitter<void>();
- public get onLineFeed(): IEvent<void> { return this._onLineFeed.event; }
- private _onScroll = new EventEmitter<number>();
- public get onScroll(): IEvent<number> { return this._onScroll.event; }
- private _onTitleChange = new EventEmitter<string>();
- public get onTitleChange(): IEvent<string> { return this._onTitleChange.event; }
- private _onColor = new EventEmitter<IColorEvent>();
- public get onColor(): IEvent<IColorEvent> { return this._onColor.event; }
-
- private _parseStack: IParseStack = {
- paused: false,
- cursorStartX: 0,
- cursorStartY: 0,
- decodedLength: 0,
- position: 0
- };
-
- constructor(
- private readonly _bufferService: IBufferService,
- private readonly _charsetService: ICharsetService,
- private readonly _coreService: ICoreService,
- private readonly _dirtyRowService: IDirtyRowService,
- private readonly _logService: ILogService,
- private readonly _optionsService: IOptionsService,
- private readonly _coreMouseService: ICoreMouseService,
- private readonly _unicodeService: IUnicodeService,
- private readonly _parser: IEscapeSequenceParser = new EscapeSequenceParser()
- ) {
- super();
- this.register(this._parser);
-
- // Track properties used in performance critical code manually to avoid using slow getters
- this._activeBuffer = this._bufferService.buffer;
- this.register(this._bufferService.buffers.onBufferActivate(e => this._activeBuffer = e.activeBuffer));
-
- /**
- * custom fallback handlers
- */
- this._parser.setCsiHandlerFallback((ident, params) => {
- this._logService.debug('Unknown CSI code: ', { identifier: this._parser.identToString(ident), params: params.toArray() });
- });
- this._parser.setEscHandlerFallback(ident => {
- this._logService.debug('Unknown ESC code: ', { identifier: this._parser.identToString(ident) });
- });
- this._parser.setExecuteHandlerFallback(code => {
- this._logService.debug('Unknown EXECUTE code: ', { code });
- });
- this._parser.setOscHandlerFallback((identifier, action, data) => {
- this._logService.debug('Unknown OSC code: ', { identifier, action, data });
- });
- this._parser.setDcsHandlerFallback((ident, action, payload) => {
- if (action === 'HOOK') {
- payload = payload.toArray();
- }
- this._logService.debug('Unknown DCS code: ', { identifier: this._parser.identToString(ident), action, payload });
- });
-
- /**
- * print handler
- */
- this._parser.setPrintHandler((data, start, end) => this.print(data, start, end));
-
- /**
- * CSI handler
- */
- this._parser.registerCsiHandler({ final: '@' }, params => this.insertChars(params));
- this._parser.registerCsiHandler({ intermediates: ' ', final: '@' }, params => this.scrollLeft(params));
- this._parser.registerCsiHandler({ final: 'A' }, params => this.cursorUp(params));
- this._parser.registerCsiHandler({ intermediates: ' ', final: 'A' }, params => this.scrollRight(params));
- this._parser.registerCsiHandler({ final: 'B' }, params => this.cursorDown(params));
- this._parser.registerCsiHandler({ final: 'C' }, params => this.cursorForward(params));
- this._parser.registerCsiHandler({ final: 'D' }, params => this.cursorBackward(params));
- this._parser.registerCsiHandler({ final: 'E' }, params => this.cursorNextLine(params));
- this._parser.registerCsiHandler({ final: 'F' }, params => this.cursorPrecedingLine(params));
- this._parser.registerCsiHandler({ final: 'G' }, params => this.cursorCharAbsolute(params));
- this._parser.registerCsiHandler({ final: 'H' }, params => this.cursorPosition(params));
- this._parser.registerCsiHandler({ final: 'I' }, params => this.cursorForwardTab(params));
- this._parser.registerCsiHandler({ final: 'J' }, params => this.eraseInDisplay(params));
- this._parser.registerCsiHandler({ prefix: '?', final: 'J' }, params => this.eraseInDisplay(params));
- this._parser.registerCsiHandler({ final: 'K' }, params => this.eraseInLine(params));
- this._parser.registerCsiHandler({ prefix: '?', final: 'K' }, params => this.eraseInLine(params));
- this._parser.registerCsiHandler({ final: 'L' }, params => this.insertLines(params));
- this._parser.registerCsiHandler({ final: 'M' }, params => this.deleteLines(params));
- this._parser.registerCsiHandler({ final: 'P' }, params => this.deleteChars(params));
- this._parser.registerCsiHandler({ final: 'S' }, params => this.scrollUp(params));
- this._parser.registerCsiHandler({ final: 'T' }, params => this.scrollDown(params));
- this._parser.registerCsiHandler({ final: 'X' }, params => this.eraseChars(params));
- this._parser.registerCsiHandler({ final: 'Z' }, params => this.cursorBackwardTab(params));
- this._parser.registerCsiHandler({ final: '`' }, params => this.charPosAbsolute(params));
- this._parser.registerCsiHandler({ final: 'a' }, params => this.hPositionRelative(params));
- this._parser.registerCsiHandler({ final: 'b' }, params => this.repeatPrecedingCharacter(params));
- this._parser.registerCsiHandler({ final: 'c' }, params => this.sendDeviceAttributesPrimary(params));
- this._parser.registerCsiHandler({ prefix: '>', final: 'c' }, params => this.sendDeviceAttributesSecondary(params));
- this._parser.registerCsiHandler({ final: 'd' }, params => this.linePosAbsolute(params));
- this._parser.registerCsiHandler({ final: 'e' }, params => this.vPositionRelative(params));
- this._parser.registerCsiHandler({ final: 'f' }, params => this.hVPosition(params));
- this._parser.registerCsiHandler({ final: 'g' }, params => this.tabClear(params));
- this._parser.registerCsiHandler({ final: 'h' }, params => this.setMode(params));
- this._parser.registerCsiHandler({ prefix: '?', final: 'h' }, params => this.setModePrivate(params));
- this._parser.registerCsiHandler({ final: 'l' }, params => this.resetMode(params));
- this._parser.registerCsiHandler({ prefix: '?', final: 'l' }, params => this.resetModePrivate(params));
- this._parser.registerCsiHandler({ final: 'm' }, params => this.charAttributes(params));
- this._parser.registerCsiHandler({ final: 'n' }, params => this.deviceStatus(params));
- this._parser.registerCsiHandler({ prefix: '?', final: 'n' }, params => this.deviceStatusPrivate(params));
- this._parser.registerCsiHandler({ intermediates: '!', final: 'p' }, params => this.softReset(params));
- this._parser.registerCsiHandler({ intermediates: ' ', final: 'q' }, params => this.setCursorStyle(params));
- this._parser.registerCsiHandler({ final: 'r' }, params => this.setScrollRegion(params));
- this._parser.registerCsiHandler({ final: 's' }, params => this.saveCursor(params));
- this._parser.registerCsiHandler({ final: 't' }, params => this.windowOptions(params));
- this._parser.registerCsiHandler({ final: 'u' }, params => this.restoreCursor(params));
- this._parser.registerCsiHandler({ intermediates: '\'', final: '}' }, params => this.insertColumns(params));
- this._parser.registerCsiHandler({ intermediates: '\'', final: '~' }, params => this.deleteColumns(params));
-
- /**
- * execute handler
- */
- this._parser.setExecuteHandler(C0.BEL, () => this.bell());
- this._parser.setExecuteHandler(C0.LF, () => this.lineFeed());
- this._parser.setExecuteHandler(C0.VT, () => this.lineFeed());
- this._parser.setExecuteHandler(C0.FF, () => this.lineFeed());
- this._parser.setExecuteHandler(C0.CR, () => this.carriageReturn());
- this._parser.setExecuteHandler(C0.BS, () => this.backspace());
- this._parser.setExecuteHandler(C0.HT, () => this.tab());
- this._parser.setExecuteHandler(C0.SO, () => this.shiftOut());
- this._parser.setExecuteHandler(C0.SI, () => this.shiftIn());
- // FIXME: What do to with missing? Old code just added those to print.
-
- this._parser.setExecuteHandler(C1.IND, () => this.index());
- this._parser.setExecuteHandler(C1.NEL, () => this.nextLine());
- this._parser.setExecuteHandler(C1.HTS, () => this.tabSet());
-
- /**
- * OSC handler
- */
- // 0 - icon name + title
- this._parser.registerOscHandler(0, new OscHandler(data => { this.setTitle(data); this.setIconName(data); return true; }));
- // 1 - icon name
- this._parser.registerOscHandler(1, new OscHandler(data => this.setIconName(data)));
- // 2 - title
- this._parser.registerOscHandler(2, new OscHandler(data => this.setTitle(data)));
- // 3 - set property X in the form "prop=value"
- // 4 - Change Color Number
- this._parser.registerOscHandler(4, new OscHandler(data => this.setOrReportIndexedColor(data)));
- // 5 - Change Special Color Number
- // 6 - Enable/disable Special Color Number c
- // 7 - current directory? (not in xterm spec, see https://gitlab.com/gnachman/iterm2/issues/3939)
- // 10 - Change VT100 text foreground color to Pt.
- this._parser.registerOscHandler(10, new OscHandler(data => this.setOrReportFgColor(data)));
- // 11 - Change VT100 text background color to Pt.
- this._parser.registerOscHandler(11, new OscHandler(data => this.setOrReportBgColor(data)));
- // 12 - Change text cursor color to Pt.
- this._parser.registerOscHandler(12, new OscHandler(data => this.setOrReportCursorColor(data)));
- // 13 - Change mouse foreground color to Pt.
- // 14 - Change mouse background color to Pt.
- // 15 - Change Tektronix foreground color to Pt.
- // 16 - Change Tektronix background color to Pt.
- // 17 - Change highlight background color to Pt.
- // 18 - Change Tektronix cursor color to Pt.
- // 19 - Change highlight foreground color to Pt.
- // 46 - Change Log File to Pt.
- // 50 - Set Font to Pt.
- // 51 - reserved for Emacs shell.
- // 52 - Manipulate Selection Data.
- // 104 ; c - Reset Color Number c.
- this._parser.registerOscHandler(104, new OscHandler(data => this.restoreIndexedColor(data)));
- // 105 ; c - Reset Special Color Number c.
- // 106 ; c; f - Enable/disable Special Color Number c.
- // 110 - Reset VT100 text foreground color.
- this._parser.registerOscHandler(110, new OscHandler(data => this.restoreFgColor(data)));
- // 111 - Reset VT100 text background color.
- this._parser.registerOscHandler(111, new OscHandler(data => this.restoreBgColor(data)));
- // 112 - Reset text cursor color.
- this._parser.registerOscHandler(112, new OscHandler(data => this.restoreCursorColor(data)));
- // 113 - Reset mouse foreground color.
- // 114 - Reset mouse background color.
- // 115 - Reset Tektronix foreground color.
- // 116 - Reset Tektronix background color.
- // 117 - Reset highlight color.
- // 118 - Reset Tektronix cursor color.
- // 119 - Reset highlight foreground color.
-
- /**
- * ESC handlers
- */
- this._parser.registerEscHandler({ final: '7' }, () => this.saveCursor());
- this._parser.registerEscHandler({ final: '8' }, () => this.restoreCursor());
- this._parser.registerEscHandler({ final: 'D' }, () => this.index());
- this._parser.registerEscHandler({ final: 'E' }, () => this.nextLine());
- this._parser.registerEscHandler({ final: 'H' }, () => this.tabSet());
- this._parser.registerEscHandler({ final: 'M' }, () => this.reverseIndex());
- this._parser.registerEscHandler({ final: '=' }, () => this.keypadApplicationMode());
- this._parser.registerEscHandler({ final: '>' }, () => this.keypadNumericMode());
- this._parser.registerEscHandler({ final: 'c' }, () => this.fullReset());
- this._parser.registerEscHandler({ final: 'n' }, () => this.setgLevel(2));
- this._parser.registerEscHandler({ final: 'o' }, () => this.setgLevel(3));
- this._parser.registerEscHandler({ final: '|' }, () => this.setgLevel(3));
- this._parser.registerEscHandler({ final: '}' }, () => this.setgLevel(2));
- this._parser.registerEscHandler({ final: '~' }, () => this.setgLevel(1));
- this._parser.registerEscHandler({ intermediates: '%', final: '@' }, () => this.selectDefaultCharset());
- this._parser.registerEscHandler({ intermediates: '%', final: 'G' }, () => this.selectDefaultCharset());
- for (const flag in CHARSETS) {
- this._parser.registerEscHandler({ intermediates: '(', final: flag }, () => this.selectCharset('(' + flag));
- this._parser.registerEscHandler({ intermediates: ')', final: flag }, () => this.selectCharset(')' + flag));
- this._parser.registerEscHandler({ intermediates: '*', final: flag }, () => this.selectCharset('*' + flag));
- this._parser.registerEscHandler({ intermediates: '+', final: flag }, () => this.selectCharset('+' + flag));
- this._parser.registerEscHandler({ intermediates: '-', final: flag }, () => this.selectCharset('-' + flag));
- this._parser.registerEscHandler({ intermediates: '.', final: flag }, () => this.selectCharset('.' + flag));
- this._parser.registerEscHandler({ intermediates: '/', final: flag }, () => this.selectCharset('/' + flag)); // TODO: supported?
- }
- this._parser.registerEscHandler({ intermediates: '#', final: '8' }, () => this.screenAlignmentPattern());
-
- /**
- * error handler
- */
- this._parser.setErrorHandler((state: IParsingState) => {
- this._logService.error('Parsing error: ', state);
- return state;
- });
-
- /**
- * DCS handler
- */
- this._parser.registerDcsHandler({ intermediates: '$', final: 'q' }, new DECRQSS(this._bufferService, this._coreService, this._logService, this._optionsService));
- }
-
- public dispose(): void {
- super.dispose();
- }
-
- /**
- * Async parse support.
- */
- private _preserveStack(cursorStartX: number, cursorStartY: number, decodedLength: number, position: number): void {
- this._parseStack.paused = true;
- this._parseStack.cursorStartX = cursorStartX;
- this._parseStack.cursorStartY = cursorStartY;
- this._parseStack.decodedLength = decodedLength;
- this._parseStack.position = position;
- }
-
- private _logSlowResolvingAsync(p: Promise<boolean>): void {
- // log a limited warning about an async handler taking too long
- if (this._logService.logLevel <= LogLevelEnum.WARN) {
- Promise.race([p, new Promise((res, rej) => setTimeout(() => rej('#SLOW_TIMEOUT'), SLOW_ASYNC_LIMIT))])
- .catch(err => {
- if (err !== '#SLOW_TIMEOUT') {
- throw err;
- }
- console.warn(`async parser handler taking longer than ${SLOW_ASYNC_LIMIT} ms`);
- });
- }
- }
-
- /**
- * Parse call with async handler support.
- *
- * Whether the stack state got preserved for the next call, is indicated by the return value:
- * - undefined (void):
- * all handlers were sync, no stack save, continue normally with next chunk
- * - Promise\<boolean\>:
- * execution stopped at async handler, stack saved, continue with
- * same chunk and the promise resolve value as `promiseResult` until the method returns `undefined`
- *
- * Note: This method should only be called by `Terminal.write` to ensure correct execution order and
- * proper continuation of async parser handlers.
- */
- public parse(data: string | Uint8Array, promiseResult?: boolean): void | Promise<boolean> {
- let result: void | Promise<boolean>;
- let cursorStartX = this._activeBuffer.x;
- let cursorStartY = this._activeBuffer.y;
- let start = 0;
- const wasPaused = this._parseStack.paused;
-
- if (wasPaused) {
- // assumption: _parseBuffer never mutates between async calls
- if (result = this._parser.parse(this._parseBuffer, this._parseStack.decodedLength, promiseResult)) {
- this._logSlowResolvingAsync(result);
- return result;
- }
- cursorStartX = this._parseStack.cursorStartX;
- cursorStartY = this._parseStack.cursorStartY;
- this._parseStack.paused = false;
- if (data.length > MAX_PARSEBUFFER_LENGTH) {
- start = this._parseStack.position + MAX_PARSEBUFFER_LENGTH;
- }
- }
-
- // Log debug data, the log level gate is to prevent extra work in this hot path
- if (this._logService.logLevel <= LogLevelEnum.DEBUG) {
- this._logService.debug(`parsing data${typeof data === 'string' ? ` "${data}"` : ` "${Array.prototype.map.call(data, e => String.fromCharCode(e)).join('')}"`}`, typeof data === 'string'
- ? data.split('').map(e => e.charCodeAt(0))
- : data
- );
- }
-
- // resize input buffer if needed
- if (this._parseBuffer.length < data.length) {
- if (this._parseBuffer.length < MAX_PARSEBUFFER_LENGTH) {
- this._parseBuffer = new Uint32Array(Math.min(data.length, MAX_PARSEBUFFER_LENGTH));
- }
- }
-
- // Clear the dirty row service so we know which lines changed as a result of parsing
- // Important: do not clear between async calls, otherwise we lost pending update information.
- if (!wasPaused) {
- this._dirtyRowService.clearRange();
- }
-
- // process big data in smaller chunks
- if (data.length > MAX_PARSEBUFFER_LENGTH) {
- for (let i = start; i < data.length; i += MAX_PARSEBUFFER_LENGTH) {
- const end = i + MAX_PARSEBUFFER_LENGTH < data.length ? i + MAX_PARSEBUFFER_LENGTH : data.length;
- const len = (typeof data === 'string')
- ? this._stringDecoder.decode(data.substring(i, end), this._parseBuffer)
- : this._utf8Decoder.decode(data.subarray(i, end), this._parseBuffer);
- if (result = this._parser.parse(this._parseBuffer, len)) {
- this._preserveStack(cursorStartX, cursorStartY, len, i);
- this._logSlowResolvingAsync(result);
- return result;
- }
- }
- } else {
- if (!wasPaused) {
- const len = (typeof data === 'string')
- ? this._stringDecoder.decode(data, this._parseBuffer)
- : this._utf8Decoder.decode(data, this._parseBuffer);
- if (result = this._parser.parse(this._parseBuffer, len)) {
- this._preserveStack(cursorStartX, cursorStartY, len, 0);
- this._logSlowResolvingAsync(result);
- return result;
- }
- }
- }
-
- if (this._activeBuffer.x !== cursorStartX || this._activeBuffer.y !== cursorStartY) {
- this._onCursorMove.fire();
- }
-
- // Refresh any dirty rows accumulated as part of parsing
- this._onRequestRefreshRows.fire(this._dirtyRowService.start, this._dirtyRowService.end);
- }
-
- public print(data: Uint32Array, start: number, end: number): void {
- let code: number;
- let chWidth: number;
- const charset = this._charsetService.charset;
- const screenReaderMode = this._optionsService.rawOptions.screenReaderMode;
- const cols = this._bufferService.cols;
- const wraparoundMode = this._coreService.decPrivateModes.wraparound;
- const insertMode = this._coreService.modes.insertMode;
- const curAttr = this._curAttrData;
- let bufferRow = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!;
-
- this._dirtyRowService.markDirty(this._activeBuffer.y);
-
- // handle wide chars: reset start_cell-1 if we would overwrite the second cell of a wide char
- if (this._activeBuffer.x && end - start > 0 && bufferRow.getWidth(this._activeBuffer.x - 1) === 2) {
- bufferRow.setCellFromCodePoint(this._activeBuffer.x - 1, 0, 1, curAttr.fg, curAttr.bg, curAttr.extended);
- }
-
- for (let pos = start; pos < end; ++pos) {
- code = data[pos];
-
- // calculate print space
- // expensive call, therefore we save width in line buffer
- chWidth = this._unicodeService.wcwidth(code);
-
- // get charset replacement character
- // charset is only defined for ASCII, therefore we only
- // search for an replacement char if code < 127
- if (code < 127 && charset) {
- const ch = charset[String.fromCharCode(code)];
- if (ch) {
- code = ch.charCodeAt(0);
- }
- }
-
- if (screenReaderMode) {
- this._onA11yChar.fire(stringFromCodePoint(code));
- }
-
- // insert combining char at last cursor position
- // this._activeBuffer.x should never be 0 for a combining char
- // since they always follow a cell consuming char
- // therefore we can test for this._activeBuffer.x to avoid overflow left
- if (!chWidth && this._activeBuffer.x) {
- if (!bufferRow.getWidth(this._activeBuffer.x - 1)) {
- // found empty cell after fullwidth, need to go 2 cells back
- // it is save to step 2 cells back here
- // since an empty cell is only set by fullwidth chars
- bufferRow.addCodepointToCell(this._activeBuffer.x - 2, code);
- } else {
- bufferRow.addCodepointToCell(this._activeBuffer.x - 1, code);
- }
- continue;
- }
-
- // goto next line if ch would overflow
- // NOTE: To avoid costly width checks here,
- // the terminal does not allow a cols < 2.
- if (this._activeBuffer.x + chWidth - 1 >= cols) {
- // autowrap - DECAWM
- // automatically wraps to the beginning of the next line
- if (wraparoundMode) {
- // clear left over cells to the right
- while (this._activeBuffer.x < cols) {
- bufferRow.setCellFromCodePoint(this._activeBuffer.x++, 0, 1, curAttr.fg, curAttr.bg, curAttr.extended);
- }
- this._activeBuffer.x = 0;
- this._activeBuffer.y++;
- if (this._activeBuffer.y === this._activeBuffer.scrollBottom + 1) {
- this._activeBuffer.y--;
- this._bufferService.scroll(this._eraseAttrData(), true);
- } else {
- if (this._activeBuffer.y >= this._bufferService.rows) {
- this._activeBuffer.y = this._bufferService.rows - 1;
- }
- // The line already exists (eg. the initial viewport), mark it as a
- // wrapped line
- this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!.isWrapped = true;
- }
- // row changed, get it again
- bufferRow = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!;
- } else {
- this._activeBuffer.x = cols - 1;
- if (chWidth === 2) {
- // FIXME: check for xterm behavior
- // What to do here? We got a wide char that does not fit into last cell
- continue;
- }
- }
- }
-
- // insert mode: move characters to right
- if (insertMode) {
- // right shift cells according to the width
- bufferRow.insertCells(this._activeBuffer.x, chWidth, this._activeBuffer.getNullCell(curAttr), curAttr);
- // test last cell - since the last cell has only room for
- // a halfwidth char any fullwidth shifted there is lost
- // and will be set to empty cell
- if (bufferRow.getWidth(cols - 1) === 2) {
- bufferRow.setCellFromCodePoint(cols - 1, NULL_CELL_CODE, NULL_CELL_WIDTH, curAttr.fg, curAttr.bg, curAttr.extended);
- }
- }
-
- // write current char to buffer and advance cursor
- bufferRow.setCellFromCodePoint(this._activeBuffer.x++, code, chWidth, curAttr.fg, curAttr.bg, curAttr.extended);
-
- // fullwidth char - also set next cell to placeholder stub and advance cursor
- // for graphemes bigger than fullwidth we can simply loop to zero
- // we already made sure above, that this._activeBuffer.x + chWidth will not overflow right
- if (chWidth > 0) {
- while (--chWidth) {
- // other than a regular empty cell a cell following a wide char has no width
- bufferRow.setCellFromCodePoint(this._activeBuffer.x++, 0, 0, curAttr.fg, curAttr.bg, curAttr.extended);
- }
- }
- }
- // store last char in Parser.precedingCodepoint for REP to work correctly
- // This needs to check whether:
- // - fullwidth + surrogates: reset
- // - combining: only base char gets carried on (bug in xterm?)
- if (end - start > 0) {
- bufferRow.loadCell(this._activeBuffer.x - 1, this._workCell);
- if (this._workCell.getWidth() === 2 || this._workCell.getCode() > 0xFFFF) {
- this._parser.precedingCodepoint = 0;
- } else if (this._workCell.isCombined()) {
- this._parser.precedingCodepoint = this._workCell.getChars().charCodeAt(0);
- } else {
- this._parser.precedingCodepoint = this._workCell.content;
- }
- }
-
- // handle wide chars: reset cell to the right if it is second cell of a wide char
- if (this._activeBuffer.x < cols && end - start > 0 && bufferRow.getWidth(this._activeBuffer.x) === 0 && !bufferRow.hasContent(this._activeBuffer.x)) {
- bufferRow.setCellFromCodePoint(this._activeBuffer.x, 0, 1, curAttr.fg, curAttr.bg, curAttr.extended);
- }
-
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- }
-
- /**
- * Forward registerCsiHandler from parser.
- */
- public registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable {
- if (id.final === 't' && !id.prefix && !id.intermediates) {
- // security: always check whether window option is allowed
- return this._parser.registerCsiHandler(id, params => {
- if (!paramToWindowOption(params.params[0], this._optionsService.rawOptions.windowOptions)) {
- return true;
- }
- return callback(params);
- });
- }
- return this._parser.registerCsiHandler(id, callback);
- }
-
- /**
- * Forward registerDcsHandler from parser.
- */
- public registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable {
- return this._parser.registerDcsHandler(id, new DcsHandler(callback));
- }
-
- /**
- * Forward registerEscHandler from parser.
- */
- public registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable {
- return this._parser.registerEscHandler(id, callback);
- }
-
- /**
- * Forward registerOscHandler from parser.
- */
- public registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable {
- return this._parser.registerOscHandler(ident, new OscHandler(callback));
- }
-
- /**
- * BEL
- * Bell (Ctrl-G).
- *
- * @vt: #Y C0 BEL "Bell" "\a, \x07" "Ring the bell."
- * The behavior of the bell is further customizable with `ITerminalOptions.bellStyle`
- * and `ITerminalOptions.bellSound`.
- */
- public bell(): boolean {
- this._onRequestBell.fire();
- return true;
- }
-
- /**
- * LF
- * Line Feed or New Line (NL). (LF is Ctrl-J).
- *
- * @vt: #Y C0 LF "Line Feed" "\n, \x0A" "Move the cursor one row down, scrolling if needed."
- * Scrolling is restricted to scroll margins and will only happen on the bottom line.
- *
- * @vt: #Y C0 VT "Vertical Tabulation" "\v, \x0B" "Treated as LF."
- * @vt: #Y C0 FF "Form Feed" "\f, \x0C" "Treated as LF."
- */
- public lineFeed(): boolean {
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- if (this._optionsService.rawOptions.convertEol) {
- this._activeBuffer.x = 0;
- }
- this._activeBuffer.y++;
- if (this._activeBuffer.y === this._activeBuffer.scrollBottom + 1) {
- this._activeBuffer.y--;
- this._bufferService.scroll(this._eraseAttrData());
- } else if (this._activeBuffer.y >= this._bufferService.rows) {
- this._activeBuffer.y = this._bufferService.rows - 1;
- }
- // If the end of the line is hit, prevent this action from wrapping around to the next line.
- if (this._activeBuffer.x >= this._bufferService.cols) {
- this._activeBuffer.x--;
- }
- this._dirtyRowService.markDirty(this._activeBuffer.y);
-
- this._onLineFeed.fire();
- return true;
- }
-
- /**
- * CR
- * Carriage Return (Ctrl-M).
- *
- * @vt: #Y C0 CR "Carriage Return" "\r, \x0D" "Move the cursor to the beginning of the row."
- */
- public carriageReturn(): boolean {
- this._activeBuffer.x = 0;
- return true;
- }
-
- /**
- * BS
- * Backspace (Ctrl-H).
- *
- * @vt: #Y C0 BS "Backspace" "\b, \x08" "Move the cursor one position to the left."
- * By default it is not possible to move the cursor past the leftmost position.
- * If `reverse wrap-around` (`CSI ? 45 h`) is set, a previous soft line wrap (DECAWM)
- * can be undone with BS within the scroll margins. In that case the cursor will wrap back
- * to the end of the previous row. Note that it is not possible to peek back into the scrollbuffer
- * with the cursor, thus at the home position (top-leftmost cell) this has no effect.
- */
- public backspace(): boolean {
- // reverse wrap-around is disabled
- if (!this._coreService.decPrivateModes.reverseWraparound) {
- this._restrictCursor();
- if (this._activeBuffer.x > 0) {
- this._activeBuffer.x--;
- }
- return true;
- }
-
- // reverse wrap-around is enabled
- // other than for normal operation mode, reverse wrap-around allows the cursor
- // to be at x=cols to be able to address the last cell of a row by BS
- this._restrictCursor(this._bufferService.cols);
-
- if (this._activeBuffer.x > 0) {
- this._activeBuffer.x--;
- } else {
- /**
- * reverse wrap-around handling:
- * Our implementation deviates from xterm on purpose. Details:
- * - only previous soft NLs can be reversed (isWrapped=true)
- * - only works within scrollborders (top/bottom, left/right not yet supported)
- * - cannot peek into scrollbuffer
- * - any cursor movement sequence keeps working as expected
- */
- if (this._activeBuffer.x === 0
- && this._activeBuffer.y > this._activeBuffer.scrollTop
- && this._activeBuffer.y <= this._activeBuffer.scrollBottom
- && this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)?.isWrapped) {
- this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!.isWrapped = false;
- this._activeBuffer.y--;
- this._activeBuffer.x = this._bufferService.cols - 1;
- // find last taken cell - last cell can have 3 different states:
- // - hasContent(true) + hasWidth(1): narrow char - we are done
- // - hasWidth(0): second part of wide char - we are done
- // - hasContent(false) + hasWidth(1): empty cell due to early wrapping wide char, go one cell further back
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y)!;
- if (line.hasWidth(this._activeBuffer.x) && !line.hasContent(this._activeBuffer.x)) {
- this._activeBuffer.x--;
- // We do this only once, since width=1 + hasContent=false currently happens only once before
- // early wrapping of a wide char.
- // This needs to be fixed once we support graphemes taking more than 2 cells.
- }
- }
- }
- this._restrictCursor();
- return true;
- }
-
- /**
- * TAB
- * Horizontal Tab (HT) (Ctrl-I).
- *
- * @vt: #Y C0 HT "Horizontal Tabulation" "\t, \x09" "Move the cursor to the next character tab stop."
- */
- public tab(): boolean {
- if (this._activeBuffer.x >= this._bufferService.cols) {
- return true;
- }
- const originalX = this._activeBuffer.x;
- this._activeBuffer.x = this._activeBuffer.nextStop();
- if (this._optionsService.rawOptions.screenReaderMode) {
- this._onA11yTab.fire(this._activeBuffer.x - originalX);
- }
- return true;
- }
-
- /**
- * SO
- * Shift Out (Ctrl-N) -> Switch to Alternate Character Set. This invokes the
- * G1 character set.
- *
- * @vt: #P[Only limited ISO-2022 charset support.] C0 SO "Shift Out" "\x0E" "Switch to an alternative character set."
- */
- public shiftOut(): boolean {
- this._charsetService.setgLevel(1);
- return true;
- }
-
- /**
- * SI
- * Shift In (Ctrl-O) -> Switch to Standard Character Set. This invokes the G0
- * character set (the default).
- *
- * @vt: #Y C0 SI "Shift In" "\x0F" "Return to regular character set after Shift Out."
- */
- public shiftIn(): boolean {
- this._charsetService.setgLevel(0);
- return true;
- }
-
- /**
- * Restrict cursor to viewport size / scroll margin (origin mode).
- */
- private _restrictCursor(maxCol: number = this._bufferService.cols - 1): void {
- this._activeBuffer.x = Math.min(maxCol, Math.max(0, this._activeBuffer.x));
- this._activeBuffer.y = this._coreService.decPrivateModes.origin
- ? Math.min(this._activeBuffer.scrollBottom, Math.max(this._activeBuffer.scrollTop, this._activeBuffer.y))
- : Math.min(this._bufferService.rows - 1, Math.max(0, this._activeBuffer.y));
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- }
-
- /**
- * Set absolute cursor position.
- */
- private _setCursor(x: number, y: number): void {
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- if (this._coreService.decPrivateModes.origin) {
- this._activeBuffer.x = x;
- this._activeBuffer.y = this._activeBuffer.scrollTop + y;
- } else {
- this._activeBuffer.x = x;
- this._activeBuffer.y = y;
- }
- this._restrictCursor();
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- }
-
- /**
- * Set relative cursor position.
- */
- private _moveCursor(x: number, y: number): void {
- // for relative changes we have to make sure we are within 0 .. cols/rows - 1
- // before calculating the new position
- this._restrictCursor();
- this._setCursor(this._activeBuffer.x + x, this._activeBuffer.y + y);
- }
-
- /**
- * CSI Ps A
- * Cursor Up Ps Times (default = 1) (CUU).
- *
- * @vt: #Y CSI CUU "Cursor Up" "CSI Ps A" "Move cursor `Ps` times up (default=1)."
- * If the cursor would pass the top scroll margin, it will stop there.
- */
- public cursorUp(params: IParams): boolean {
- // stop at scrollTop
- const diffToTop = this._activeBuffer.y - this._activeBuffer.scrollTop;
- if (diffToTop >= 0) {
- this._moveCursor(0, -Math.min(diffToTop, params.params[0] || 1));
- } else {
- this._moveCursor(0, -(params.params[0] || 1));
- }
- return true;
- }
-
- /**
- * CSI Ps B
- * Cursor Down Ps Times (default = 1) (CUD).
- *
- * @vt: #Y CSI CUD "Cursor Down" "CSI Ps B" "Move cursor `Ps` times down (default=1)."
- * If the cursor would pass the bottom scroll margin, it will stop there.
- */
- public cursorDown(params: IParams): boolean {
- // stop at scrollBottom
- const diffToBottom = this._activeBuffer.scrollBottom - this._activeBuffer.y;
- if (diffToBottom >= 0) {
- this._moveCursor(0, Math.min(diffToBottom, params.params[0] || 1));
- } else {
- this._moveCursor(0, params.params[0] || 1);
- }
- return true;
- }
-
- /**
- * CSI Ps C
- * Cursor Forward Ps Times (default = 1) (CUF).
- *
- * @vt: #Y CSI CUF "Cursor Forward" "CSI Ps C" "Move cursor `Ps` times forward (default=1)."
- */
- public cursorForward(params: IParams): boolean {
- this._moveCursor(params.params[0] || 1, 0);
- return true;
- }
-
- /**
- * CSI Ps D
- * Cursor Backward Ps Times (default = 1) (CUB).
- *
- * @vt: #Y CSI CUB "Cursor Backward" "CSI Ps D" "Move cursor `Ps` times backward (default=1)."
- */
- public cursorBackward(params: IParams): boolean {
- this._moveCursor(-(params.params[0] || 1), 0);
- return true;
- }
-
- /**
- * CSI Ps E
- * Cursor Next Line Ps Times (default = 1) (CNL).
- * Other than cursorDown (CUD) also set the cursor to first column.
- *
- * @vt: #Y CSI CNL "Cursor Next Line" "CSI Ps E" "Move cursor `Ps` times down (default=1) and to the first column."
- * Same as CUD, additionally places the cursor at the first column.
- */
- public cursorNextLine(params: IParams): boolean {
- this.cursorDown(params);
- this._activeBuffer.x = 0;
- return true;
- }
-
- /**
- * CSI Ps F
- * Cursor Previous Line Ps Times (default = 1) (CPL).
- * Other than cursorUp (CUU) also set the cursor to first column.
- *
- * @vt: #Y CSI CPL "Cursor Backward" "CSI Ps F" "Move cursor `Ps` times up (default=1) and to the first column."
- * Same as CUU, additionally places the cursor at the first column.
- */
- public cursorPrecedingLine(params: IParams): boolean {
- this.cursorUp(params);
- this._activeBuffer.x = 0;
- return true;
- }
-
- /**
- * CSI Ps G
- * Cursor Character Absolute [column] (default = [row,1]) (CHA).
- *
- * @vt: #Y CSI CHA "Cursor Horizontal Absolute" "CSI Ps G" "Move cursor to `Ps`-th column of the active row (default=1)."
- */
- public cursorCharAbsolute(params: IParams): boolean {
- this._setCursor((params.params[0] || 1) - 1, this._activeBuffer.y);
- return true;
- }
-
- /**
- * CSI Ps ; Ps H
- * Cursor Position [row;column] (default = [1,1]) (CUP).
- *
- * @vt: #Y CSI CUP "Cursor Position" "CSI Ps ; Ps H" "Set cursor to position [`Ps`, `Ps`] (default = [1, 1])."
- * If ORIGIN mode is set, places the cursor to the absolute position within the scroll margins.
- * If ORIGIN mode is not set, places the cursor to the absolute position within the viewport.
- * Note that the coordinates are 1-based, thus the top left position starts at `1 ; 1`.
- */
- public cursorPosition(params: IParams): boolean {
- this._setCursor(
- // col
- (params.length >= 2) ? (params.params[1] || 1) - 1 : 0,
- // row
- (params.params[0] || 1) - 1
- );
- return true;
- }
-
- /**
- * CSI Pm ` Character Position Absolute
- * [column] (default = [row,1]) (HPA).
- * Currently same functionality as CHA.
- *
- * @vt: #Y CSI HPA "Horizontal Position Absolute" "CSI Ps ` " "Same as CHA."
- */
- public charPosAbsolute(params: IParams): boolean {
- this._setCursor((params.params[0] || 1) - 1, this._activeBuffer.y);
- return true;
- }
-
- /**
- * CSI Pm a Character Position Relative
- * [columns] (default = [row,col+1]) (HPR)
- *
- * @vt: #Y CSI HPR "Horizontal Position Relative" "CSI Ps a" "Same as CUF."
- */
- public hPositionRelative(params: IParams): boolean {
- this._moveCursor(params.params[0] || 1, 0);
- return true;
- }
-
- /**
- * CSI Pm d Vertical Position Absolute (VPA)
- * [row] (default = [1,column])
- *
- * @vt: #Y CSI VPA "Vertical Position Absolute" "CSI Ps d" "Move cursor to `Ps`-th row (default=1)."
- */
- public linePosAbsolute(params: IParams): boolean {
- this._setCursor(this._activeBuffer.x, (params.params[0] || 1) - 1);
- return true;
- }
-
- /**
- * CSI Pm e Vertical Position Relative (VPR)
- * [rows] (default = [row+1,column])
- * reuse CSI Ps B ?
- *
- * @vt: #Y CSI VPR "Vertical Position Relative" "CSI Ps e" "Move cursor `Ps` times down (default=1)."
- */
- public vPositionRelative(params: IParams): boolean {
- this._moveCursor(0, params.params[0] || 1);
- return true;
- }
-
- /**
- * CSI Ps ; Ps f
- * Horizontal and Vertical Position [row;column] (default =
- * [1,1]) (HVP).
- * Same as CUP.
- *
- * @vt: #Y CSI HVP "Horizontal and Vertical Position" "CSI Ps ; Ps f" "Same as CUP."
- */
- public hVPosition(params: IParams): boolean {
- this.cursorPosition(params);
- return true;
- }
-
- /**
- * CSI Ps g Tab Clear (TBC).
- * Ps = 0 -> Clear Current Column (default).
- * Ps = 3 -> Clear All.
- * Potentially:
- * Ps = 2 -> Clear Stops on Line.
- * http://vt100.net/annarbor/aaa-ug/section6.html
- *
- * @vt: #Y CSI TBC "Tab Clear" "CSI Ps g" "Clear tab stops at current position (0) or all (3) (default=0)."
- * Clearing tabstops off the active row (Ps = 2, VT100) is currently not supported.
- */
- public tabClear(params: IParams): boolean {
- const param = params.params[0];
- if (param === 0) {
- delete this._activeBuffer.tabs[this._activeBuffer.x];
- } else if (param === 3) {
- this._activeBuffer.tabs = {};
- }
- return true;
- }
-
- /**
- * CSI Ps I
- * Cursor Forward Tabulation Ps tab stops (default = 1) (CHT).
- *
- * @vt: #Y CSI CHT "Cursor Horizontal Tabulation" "CSI Ps I" "Move cursor `Ps` times tabs forward (default=1)."
- */
- public cursorForwardTab(params: IParams): boolean {
- if (this._activeBuffer.x >= this._bufferService.cols) {
- return true;
- }
- let param = params.params[0] || 1;
- while (param--) {
- this._activeBuffer.x = this._activeBuffer.nextStop();
- }
- return true;
- }
-
- /**
- * CSI Ps Z Cursor Backward Tabulation Ps tab stops (default = 1) (CBT).
- *
- * @vt: #Y CSI CBT "Cursor Backward Tabulation" "CSI Ps Z" "Move cursor `Ps` tabs backward (default=1)."
- */
- public cursorBackwardTab(params: IParams): boolean {
- if (this._activeBuffer.x >= this._bufferService.cols) {
- return true;
- }
- let param = params.params[0] || 1;
-
- while (param--) {
- this._activeBuffer.x = this._activeBuffer.prevStop();
- }
- return true;
- }
-
-
- /**
- * Helper method to erase cells in a terminal row.
- * The cell gets replaced with the eraseChar of the terminal.
- * @param y row index
- * @param start first cell index to be erased
- * @param end end - 1 is last erased cell
- * @param cleanWrap clear the isWrapped flag
- */
- private _eraseInBufferLine(y: number, start: number, end: number, clearWrap: boolean = false): void {
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
- line.replaceCells(
- start,
- end,
- this._activeBuffer.getNullCell(this._eraseAttrData()),
- this._eraseAttrData()
- );
- if (clearWrap) {
- line.isWrapped = false;
- }
- }
-
- /**
- * Helper method to reset cells in a terminal row.
- * The cell gets replaced with the eraseChar of the terminal and the isWrapped property is set to false.
- * @param y row index
- */
- private _resetBufferLine(y: number): void {
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
- line.fill(this._activeBuffer.getNullCell(this._eraseAttrData()));
- this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase + y);
- line.isWrapped = false;
- }
-
- /**
- * CSI Ps J Erase in Display (ED).
- * Ps = 0 -> Erase Below (default).
- * Ps = 1 -> Erase Above.
- * Ps = 2 -> Erase All.
- * Ps = 3 -> Erase Saved Lines (xterm).
- * CSI ? Ps J
- * Erase in Display (DECSED).
- * Ps = 0 -> Selective Erase Below (default).
- * Ps = 1 -> Selective Erase Above.
- * Ps = 2 -> Selective Erase All.
- *
- * @vt: #Y CSI ED "Erase In Display" "CSI Ps J" "Erase various parts of the viewport."
- * Supported param values:
- *
- * | Ps | Effect |
- * | -- | ------------------------------------------------------------ |
- * | 0 | Erase from the cursor through the end of the viewport. |
- * | 1 | Erase from the beginning of the viewport through the cursor. |
- * | 2 | Erase complete viewport. |
- * | 3 | Erase scrollback. |
- *
- * @vt: #P[Protection attributes are not supported.] CSI DECSED "Selective Erase In Display" "CSI ? Ps J" "Currently the same as ED."
- */
- public eraseInDisplay(params: IParams): boolean {
- this._restrictCursor(this._bufferService.cols);
- let j;
- switch (params.params[0]) {
- case 0:
- j = this._activeBuffer.y;
- this._dirtyRowService.markDirty(j);
- this._eraseInBufferLine(j++, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0);
- for (; j < this._bufferService.rows; j++) {
- this._resetBufferLine(j);
- }
- this._dirtyRowService.markDirty(j);
- break;
- case 1:
- j = this._activeBuffer.y;
- this._dirtyRowService.markDirty(j);
- // Deleted front part of line and everything before. This line will no longer be wrapped.
- this._eraseInBufferLine(j, 0, this._activeBuffer.x + 1, true);
- if (this._activeBuffer.x + 1 >= this._bufferService.cols) {
- // Deleted entire previous line. This next line can no longer be wrapped.
- this._activeBuffer.lines.get(j + 1)!.isWrapped = false;
- }
- while (j--) {
- this._resetBufferLine(j);
- }
- this._dirtyRowService.markDirty(0);
- break;
- case 2:
- j = this._bufferService.rows;
- this._dirtyRowService.markDirty(j - 1);
- while (j--) {
- this._resetBufferLine(j);
- }
- this._dirtyRowService.markDirty(0);
- break;
- case 3:
- // Clear scrollback (everything not in viewport)
- const scrollBackSize = this._activeBuffer.lines.length - this._bufferService.rows;
- if (scrollBackSize > 0) {
- this._activeBuffer.lines.trimStart(scrollBackSize);
- this._activeBuffer.ybase = Math.max(this._activeBuffer.ybase - scrollBackSize, 0);
- this._activeBuffer.ydisp = Math.max(this._activeBuffer.ydisp - scrollBackSize, 0);
- // Force a scroll event to refresh viewport
- this._onScroll.fire(0);
- }
- break;
- }
- return true;
- }
-
- /**
- * CSI Ps K Erase in Line (EL).
- * Ps = 0 -> Erase to Right (default).
- * Ps = 1 -> Erase to Left.
- * Ps = 2 -> Erase All.
- * CSI ? Ps K
- * Erase in Line (DECSEL).
- * Ps = 0 -> Selective Erase to Right (default).
- * Ps = 1 -> Selective Erase to Left.
- * Ps = 2 -> Selective Erase All.
- *
- * @vt: #Y CSI EL "Erase In Line" "CSI Ps K" "Erase various parts of the active row."
- * Supported param values:
- *
- * | Ps | Effect |
- * | -- | -------------------------------------------------------- |
- * | 0 | Erase from the cursor through the end of the row. |
- * | 1 | Erase from the beginning of the line through the cursor. |
- * | 2 | Erase complete line. |
- *
- * @vt: #P[Protection attributes are not supported.] CSI DECSEL "Selective Erase In Line" "CSI ? Ps K" "Currently the same as EL."
- */
- public eraseInLine(params: IParams): boolean {
- this._restrictCursor(this._bufferService.cols);
- switch (params.params[0]) {
- case 0:
- this._eraseInBufferLine(this._activeBuffer.y, this._activeBuffer.x, this._bufferService.cols, this._activeBuffer.x === 0);
- break;
- case 1:
- this._eraseInBufferLine(this._activeBuffer.y, 0, this._activeBuffer.x + 1, false);
- break;
- case 2:
- this._eraseInBufferLine(this._activeBuffer.y, 0, this._bufferService.cols, true);
- break;
- }
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- return true;
- }
-
- /**
- * CSI Ps L
- * Insert Ps Line(s) (default = 1) (IL).
- *
- * @vt: #Y CSI IL "Insert Line" "CSI Ps L" "Insert `Ps` blank lines at active row (default=1)."
- * For every inserted line at the scroll top one line at the scroll bottom gets removed.
- * The cursor is set to the first column.
- * IL has no effect if the cursor is outside the scroll margins.
- */
- public insertLines(params: IParams): boolean {
- this._restrictCursor();
- let param = params.params[0] || 1;
-
- if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {
- return true;
- }
-
- const row: number = this._activeBuffer.ybase + this._activeBuffer.y;
-
- const scrollBottomRowsOffset = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom;
- const scrollBottomAbsolute = this._bufferService.rows - 1 + this._activeBuffer.ybase - scrollBottomRowsOffset + 1;
- while (param--) {
- // test: echo -e '\e[44m\e[1L\e[0m'
- // blankLine(true) - xterm/linux behavior
- this._activeBuffer.lines.splice(scrollBottomAbsolute - 1, 1);
- this._activeBuffer.lines.splice(row, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
- }
-
- this._dirtyRowService.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom);
- this._activeBuffer.x = 0; // see https://vt100.net/docs/vt220-rm/chapter4.html - vt220 only?
- return true;
- }
-
- /**
- * CSI Ps M
- * Delete Ps Line(s) (default = 1) (DL).
- *
- * @vt: #Y CSI DL "Delete Line" "CSI Ps M" "Delete `Ps` lines at active row (default=1)."
- * For every deleted line at the scroll top one blank line at the scroll bottom gets appended.
- * The cursor is set to the first column.
- * DL has no effect if the cursor is outside the scroll margins.
- */
- public deleteLines(params: IParams): boolean {
- this._restrictCursor();
- let param = params.params[0] || 1;
-
- if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {
- return true;
- }
-
- const row: number = this._activeBuffer.ybase + this._activeBuffer.y;
-
- let j: number;
- j = this._bufferService.rows - 1 - this._activeBuffer.scrollBottom;
- j = this._bufferService.rows - 1 + this._activeBuffer.ybase - j;
- while (param--) {
- // test: echo -e '\e[44m\e[1M\e[0m'
- // blankLine(true) - xterm/linux behavior
- this._activeBuffer.lines.splice(row, 1);
- this._activeBuffer.lines.splice(j, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
- }
-
- this._dirtyRowService.markRangeDirty(this._activeBuffer.y, this._activeBuffer.scrollBottom);
- this._activeBuffer.x = 0; // see https://vt100.net/docs/vt220-rm/chapter4.html - vt220 only?
- return true;
- }
-
- /**
- * CSI Ps @
- * Insert Ps (Blank) Character(s) (default = 1) (ICH).
- *
- * @vt: #Y CSI ICH "Insert Characters" "CSI Ps @" "Insert `Ps` (blank) characters (default = 1)."
- * The ICH sequence inserts `Ps` blank characters. The cursor remains at the beginning of the blank characters.
- * Text between the cursor and right margin moves to the right. Characters moved past the right margin are lost.
- *
- *
- * FIXME: check against xterm - should not work outside of scroll margins (see VT520 manual)
- */
- public insertChars(params: IParams): boolean {
- this._restrictCursor();
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
- if (line) {
- line.insertCells(
- this._activeBuffer.x,
- params.params[0] || 1,
- this._activeBuffer.getNullCell(this._eraseAttrData()),
- this._eraseAttrData()
- );
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- }
- return true;
- }
-
- /**
- * CSI Ps P
- * Delete Ps Character(s) (default = 1) (DCH).
- *
- * @vt: #Y CSI DCH "Delete Character" "CSI Ps P" "Delete `Ps` characters (default=1)."
- * As characters are deleted, the remaining characters between the cursor and right margin move to the left.
- * Character attributes move with the characters. The terminal adds blank characters at the right margin.
- *
- *
- * FIXME: check against xterm - should not work outside of scroll margins (see VT520 manual)
- */
- public deleteChars(params: IParams): boolean {
- this._restrictCursor();
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
- if (line) {
- line.deleteCells(
- this._activeBuffer.x,
- params.params[0] || 1,
- this._activeBuffer.getNullCell(this._eraseAttrData()),
- this._eraseAttrData()
- );
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- }
- return true;
- }
-
- /**
- * CSI Ps S Scroll up Ps lines (default = 1) (SU).
- *
- * @vt: #Y CSI SU "Scroll Up" "CSI Ps S" "Scroll `Ps` lines up (default=1)."
- *
- *
- * FIXME: scrolled out lines at top = 1 should add to scrollback (xterm)
- */
- public scrollUp(params: IParams): boolean {
- let param = params.params[0] || 1;
-
- while (param--) {
- this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 1);
- this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 0, this._activeBuffer.getBlankLine(this._eraseAttrData()));
- }
- this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
- return true;
- }
-
- /**
- * CSI Ps T Scroll down Ps lines (default = 1) (SD).
- *
- * @vt: #Y CSI SD "Scroll Down" "CSI Ps T" "Scroll `Ps` lines down (default=1)."
- */
- public scrollDown(params: IParams): boolean {
- let param = params.params[0] || 1;
-
- while (param--) {
- this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollBottom, 1);
- this._activeBuffer.lines.splice(this._activeBuffer.ybase + this._activeBuffer.scrollTop, 0, this._activeBuffer.getBlankLine(DEFAULT_ATTR_DATA));
- }
- this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
- return true;
- }
-
- /**
- * CSI Ps SP @ Scroll left Ps columns (default = 1) (SL) ECMA-48
- *
- * Notation: (Pn)
- * Representation: CSI Pn 02/00 04/00
- * Parameter default value: Pn = 1
- * SL causes the data in the presentation component to be moved by n character positions
- * if the line orientation is horizontal, or by n line positions if the line orientation
- * is vertical, such that the data appear to move to the left; where n equals the value of Pn.
- * The active presentation position is not affected by this control function.
- *
- * Supported:
- * - always left shift (no line orientation setting respected)
- *
- * @vt: #Y CSI SL "Scroll Left" "CSI Ps SP @" "Scroll viewport `Ps` times to the left."
- * SL moves the content of all lines within the scroll margins `Ps` times to the left.
- * SL has no effect outside of the scroll margins.
- */
- public scrollLeft(params: IParams): boolean {
- if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {
- return true;
- }
- const param = params.params[0] || 1;
- for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
- line.deleteCells(0, param, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData());
- line.isWrapped = false;
- }
- this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
- return true;
- }
-
- /**
- * CSI Ps SP A Scroll right Ps columns (default = 1) (SR) ECMA-48
- *
- * Notation: (Pn)
- * Representation: CSI Pn 02/00 04/01
- * Parameter default value: Pn = 1
- * SR causes the data in the presentation component to be moved by n character positions
- * if the line orientation is horizontal, or by n line positions if the line orientation
- * is vertical, such that the data appear to move to the right; where n equals the value of Pn.
- * The active presentation position is not affected by this control function.
- *
- * Supported:
- * - always right shift (no line orientation setting respected)
- *
- * @vt: #Y CSI SR "Scroll Right" "CSI Ps SP A" "Scroll viewport `Ps` times to the right."
- * SL moves the content of all lines within the scroll margins `Ps` times to the right.
- * Content at the right margin is lost.
- * SL has no effect outside of the scroll margins.
- */
- public scrollRight(params: IParams): boolean {
- if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {
- return true;
- }
- const param = params.params[0] || 1;
- for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
- line.insertCells(0, param, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData());
- line.isWrapped = false;
- }
- this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
- return true;
- }
-
- /**
- * CSI Pm ' }
- * Insert Ps Column(s) (default = 1) (DECIC), VT420 and up.
- *
- * @vt: #Y CSI DECIC "Insert Columns" "CSI Ps ' }" "Insert `Ps` columns at cursor position."
- * DECIC inserts `Ps` times blank columns at the cursor position for all lines with the scroll margins,
- * moving content to the right. Content at the right margin is lost.
- * DECIC has no effect outside the scrolling margins.
- */
- public insertColumns(params: IParams): boolean {
- if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {
- return true;
- }
- const param = params.params[0] || 1;
- for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
- line.insertCells(this._activeBuffer.x, param, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData());
- line.isWrapped = false;
- }
- this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
- return true;
- }
-
- /**
- * CSI Pm ' ~
- * Delete Ps Column(s) (default = 1) (DECDC), VT420 and up.
- *
- * @vt: #Y CSI DECDC "Delete Columns" "CSI Ps ' ~" "Delete `Ps` columns at cursor position."
- * DECDC deletes `Ps` times columns at the cursor position for all lines with the scroll margins,
- * moving content to the left. Blank columns are added at the right margin.
- * DECDC has no effect outside the scrolling margins.
- */
- public deleteColumns(params: IParams): boolean {
- if (this._activeBuffer.y > this._activeBuffer.scrollBottom || this._activeBuffer.y < this._activeBuffer.scrollTop) {
- return true;
- }
- const param = params.params[0] || 1;
- for (let y = this._activeBuffer.scrollTop; y <= this._activeBuffer.scrollBottom; ++y) {
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + y)!;
- line.deleteCells(this._activeBuffer.x, param, this._activeBuffer.getNullCell(this._eraseAttrData()), this._eraseAttrData());
- line.isWrapped = false;
- }
- this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
- return true;
- }
-
- /**
- * CSI Ps X
- * Erase Ps Character(s) (default = 1) (ECH).
- *
- * @vt: #Y CSI ECH "Erase Character" "CSI Ps X" "Erase `Ps` characters from current cursor position to the right (default=1)."
- * ED erases `Ps` characters from current cursor position to the right.
- * ED works inside or outside the scrolling margins.
- */
- public eraseChars(params: IParams): boolean {
- this._restrictCursor();
- const line = this._activeBuffer.lines.get(this._activeBuffer.ybase + this._activeBuffer.y);
- if (line) {
- line.replaceCells(
- this._activeBuffer.x,
- this._activeBuffer.x + (params.params[0] || 1),
- this._activeBuffer.getNullCell(this._eraseAttrData()),
- this._eraseAttrData()
- );
- this._dirtyRowService.markDirty(this._activeBuffer.y);
- }
- return true;
- }
-
- /**
- * CSI Ps b Repeat the preceding graphic character Ps times (REP).
- * From ECMA 48 (@see http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-048.pdf)
- * Notation: (Pn)
- * Representation: CSI Pn 06/02
- * Parameter default value: Pn = 1
- * REP is used to indicate that the preceding character in the data stream,
- * if it is a graphic character (represented by one or more bit combinations) including SPACE,
- * is to be repeated n times, where n equals the value of Pn.
- * If the character preceding REP is a control function or part of a control function,
- * the effect of REP is not defined by this Standard.
- *
- * Since we propagate the terminal as xterm-256color we have to follow xterm's behavior:
- * - fullwidth + surrogate chars are ignored
- * - for combining chars only the base char gets repeated
- * - text attrs are applied normally
- * - wrap around is respected
- * - any valid sequence resets the carried forward char
- *
- * Note: To get reset on a valid sequence working correctly without much runtime penalty,
- * the preceding codepoint is stored on the parser in `this.print` and reset during `parser.parse`.
- *
- * @vt: #Y CSI REP "Repeat Preceding Character" "CSI Ps b" "Repeat preceding character `Ps` times (default=1)."
- * REP repeats the previous character `Ps` times advancing the cursor, also wrapping if DECAWM is set.
- * REP has no effect if the sequence does not follow a printable ASCII character
- * (NOOP for any other sequence in between or NON ASCII characters).
- */
- public repeatPrecedingCharacter(params: IParams): boolean {
- if (!this._parser.precedingCodepoint) {
- return true;
- }
- // call print to insert the chars and handle correct wrapping
- const length = params.params[0] || 1;
- const data = new Uint32Array(length);
- for (let i = 0; i < length; ++i) {
- data[i] = this._parser.precedingCodepoint;
- }
- this.print(data, 0, data.length);
- return true;
- }
-
- /**
- * CSI Ps c Send Device Attributes (Primary DA).
- * Ps = 0 or omitted -> request attributes from terminal. The
- * response depends on the decTerminalID resource setting.
- * -> CSI ? 1 ; 2 c (``VT100 with Advanced Video Option'')
- * -> CSI ? 1 ; 0 c (``VT101 with No Options'')
- * -> CSI ? 6 c (``VT102'')
- * -> CSI ? 6 0 ; 1 ; 2 ; 6 ; 8 ; 9 ; 1 5 ; c (``VT220'')
- * The VT100-style response parameters do not mean anything by
- * themselves. VT220 parameters do, telling the host what fea-
- * tures the terminal supports:
- * Ps = 1 -> 132-columns.
- * Ps = 2 -> Printer.
- * Ps = 6 -> Selective erase.
- * Ps = 8 -> User-defined keys.
- * Ps = 9 -> National replacement character sets.
- * Ps = 1 5 -> Technical characters.
- * Ps = 2 2 -> ANSI color, e.g., VT525.
- * Ps = 2 9 -> ANSI text locator (i.e., DEC Locator mode).
- *
- * @vt: #Y CSI DA1 "Primary Device Attributes" "CSI c" "Send primary device attributes."
- *
- *
- * TODO: fix and cleanup response
- */
- public sendDeviceAttributesPrimary(params: IParams): boolean {
- if (params.params[0] > 0) {
- return true;
- }
- if (this._is('xterm') || this._is('rxvt-unicode') || this._is('screen')) {
- this._coreService.triggerDataEvent(C0.ESC + '[?1;2c');
- } else if (this._is('linux')) {
- this._coreService.triggerDataEvent(C0.ESC + '[?6c');
- }
- return true;
- }
-
- /**
- * CSI > Ps c
- * Send Device Attributes (Secondary DA).
- * Ps = 0 or omitted -> request the terminal's identification
- * code. The response depends on the decTerminalID resource set-
- * ting. It should apply only to VT220 and up, but xterm extends
- * this to VT100.
- * -> CSI > Pp ; Pv ; Pc c
- * where Pp denotes the terminal type
- * Pp = 0 -> ``VT100''.
- * Pp = 1 -> ``VT220''.
- * and Pv is the firmware version (for xterm, this was originally
- * the XFree86 patch number, starting with 95). In a DEC termi-
- * nal, Pc indicates the ROM cartridge registration number and is
- * always zero.
- * More information:
- * xterm/charproc.c - line 2012, for more information.
- * vim responds with ^[[?0c or ^[[?1c after the terminal's response (?)
- *
- * @vt: #Y CSI DA2 "Secondary Device Attributes" "CSI > c" "Send primary device attributes."
- *
- *
- * TODO: fix and cleanup response
- */
- public sendDeviceAttributesSecondary(params: IParams): boolean {
- if (params.params[0] > 0) {
- return true;
- }
- // xterm and urxvt
- // seem to spit this
- // out around ~370 times (?).
- if (this._is('xterm')) {
- this._coreService.triggerDataEvent(C0.ESC + '[>0;276;0c');
- } else if (this._is('rxvt-unicode')) {
- this._coreService.triggerDataEvent(C0.ESC + '[>85;95;0c');
- } else if (this._is('linux')) {
- // not supported by linux console.
- // linux console echoes parameters.
- this._coreService.triggerDataEvent(params.params[0] + 'c');
- } else if (this._is('screen')) {
- this._coreService.triggerDataEvent(C0.ESC + '[>83;40003;0c');
- }
- return true;
- }
-
- /**
- * Evaluate if the current terminal is the given argument.
- * @param term The terminal name to evaluate
- */
- private _is(term: string): boolean {
- return (this._optionsService.rawOptions.termName + '').indexOf(term) === 0;
- }
-
- /**
- * CSI Pm h Set Mode (SM).
- * Ps = 2 -> Keyboard Action Mode (AM).
- * Ps = 4 -> Insert Mode (IRM).
- * Ps = 1 2 -> Send/receive (SRM).
- * Ps = 2 0 -> Automatic Newline (LNM).
- *
- * @vt: #P[Only IRM is supported.] CSI SM "Set Mode" "CSI Pm h" "Set various terminal modes."
- * Supported param values by SM:
- *
- * | Param | Action | Support |
- * | ----- | -------------------------------------- | ------- |
- * | 2 | Keyboard Action Mode (KAM). Always on. | #N |
- * | 4 | Insert Mode (IRM). | #Y |
- * | 12 | Send/receive (SRM). Always off. | #N |
- * | 20 | Automatic Newline (LNM). Always off. | #N |
- */
- public setMode(params: IParams): boolean {
- for (let i = 0; i < params.length; i++) {
- switch (params.params[i]) {
- case 4:
- this._coreService.modes.insertMode = true;
- break;
- case 20:
- // this._t.convertEol = true;
- break;
- }
- }
- return true;
- }
-
- /**
- * CSI ? Pm h
- * DEC Private Mode Set (DECSET).
- * Ps = 1 -> Application Cursor Keys (DECCKM).
- * Ps = 2 -> Designate USASCII for character sets G0-G3
- * (DECANM), and set VT100 mode.
- * Ps = 3 -> 132 Column Mode (DECCOLM).
- * Ps = 4 -> Smooth (Slow) Scroll (DECSCLM).
- * Ps = 5 -> Reverse Video (DECSCNM).
- * Ps = 6 -> Origin Mode (DECOM).
- * Ps = 7 -> Wraparound Mode (DECAWM).
- * Ps = 8 -> Auto-repeat Keys (DECARM).
- * Ps = 9 -> Send Mouse X & Y on button press. See the sec-
- * tion Mouse Tracking.
- * Ps = 1 0 -> Show toolbar (rxvt).
- * Ps = 1 2 -> Start Blinking Cursor (att610).
- * Ps = 1 8 -> Print form feed (DECPFF).
- * Ps = 1 9 -> Set print extent to full screen (DECPEX).
- * Ps = 2 5 -> Show Cursor (DECTCEM).
- * Ps = 3 0 -> Show scrollbar (rxvt).
- * Ps = 3 5 -> Enable font-shifting functions (rxvt).
- * Ps = 3 8 -> Enter Tektronix Mode (DECTEK).
- * Ps = 4 0 -> Allow 80 -> 132 Mode.
- * Ps = 4 1 -> more(1) fix (see curses resource).
- * Ps = 4 2 -> Enable Nation Replacement Character sets (DECN-
- * RCM).
- * Ps = 4 4 -> Turn On Margin Bell.
- * Ps = 4 5 -> Reverse-wraparound Mode.
- * Ps = 4 6 -> Start Logging. This is normally disabled by a
- * compile-time option.
- * Ps = 4 7 -> Use Alternate Screen Buffer. (This may be dis-
- * abled by the titeInhibit resource).
- * Ps = 6 6 -> Application keypad (DECNKM).
- * Ps = 6 7 -> Backarrow key sends backspace (DECBKM).
- * Ps = 1 0 0 0 -> Send Mouse X & Y on button press and
- * release. See the section Mouse Tracking.
- * Ps = 1 0 0 1 -> Use Hilite Mouse Tracking.
- * Ps = 1 0 0 2 -> Use Cell Motion Mouse Tracking.
- * Ps = 1 0 0 3 -> Use All Motion Mouse Tracking.
- * Ps = 1 0 0 4 -> Send FocusIn/FocusOut events.
- * Ps = 1 0 0 5 -> Enable Extended Mouse Mode.
- * Ps = 1 0 1 0 -> Scroll to bottom on tty output (rxvt).
- * Ps = 1 0 1 1 -> Scroll to bottom on key press (rxvt).
- * Ps = 1 0 3 4 -> Interpret "meta" key, sets eighth bit.
- * (enables the eightBitInput resource).
- * Ps = 1 0 3 5 -> Enable special modifiers for Alt and Num-
- * Lock keys. (This enables the numLock resource).
- * Ps = 1 0 3 6 -> Send ESC when Meta modifies a key. (This
- * enables the metaSendsEscape resource).
- * Ps = 1 0 3 7 -> Send DEL from the editing-keypad Delete
- * key.
- * Ps = 1 0 3 9 -> Send ESC when Alt modifies a key. (This
- * enables the altSendsEscape resource).
- * Ps = 1 0 4 0 -> Keep selection even if not highlighted.
- * (This enables the keepSelection resource).
- * Ps = 1 0 4 1 -> Use the CLIPBOARD selection. (This enables
- * the selectToClipboard resource).
- * Ps = 1 0 4 2 -> Enable Urgency window manager hint when
- * Control-G is received. (This enables the bellIsUrgent
- * resource).
- * Ps = 1 0 4 3 -> Enable raising of the window when Control-G
- * is received. (enables the popOnBell resource).
- * Ps = 1 0 4 7 -> Use Alternate Screen Buffer. (This may be
- * disabled by the titeInhibit resource).
- * Ps = 1 0 4 8 -> Save cursor as in DECSC. (This may be dis-
- * abled by the titeInhibit resource).
- * Ps = 1 0 4 9 -> Save cursor as in DECSC and use Alternate
- * Screen Buffer, clearing it first. (This may be disabled by
- * the titeInhibit resource). This combines the effects of the 1
- * 0 4 7 and 1 0 4 8 modes. Use this with terminfo-based
- * applications rather than the 4 7 mode.
- * Ps = 1 0 5 0 -> Set terminfo/termcap function-key mode.
- * Ps = 1 0 5 1 -> Set Sun function-key mode.
- * Ps = 1 0 5 2 -> Set HP function-key mode.
- * Ps = 1 0 5 3 -> Set SCO function-key mode.
- * Ps = 1 0 6 0 -> Set legacy keyboard emulation (X11R6).
- * Ps = 1 0 6 1 -> Set VT220 keyboard emulation.
- * Ps = 2 0 0 4 -> Set bracketed paste mode.
- * Modes:
- * http: *vt100.net/docs/vt220-rm/chapter4.html
- *
- * @vt: #P[See below for supported modes.] CSI DECSET "DEC Private Set Mode" "CSI ? Pm h" "Set various terminal attributes."
- * Supported param values by DECSET:
- *
- * | param | Action | Support |
- * | ----- | ------------------------------------------------------- | --------|
- * | 1 | Application Cursor Keys (DECCKM). | #Y |
- * | 2 | Designate US-ASCII for character sets G0-G3 (DECANM). | #Y |
- * | 3 | 132 Column Mode (DECCOLM). | #Y |
- * | 6 | Origin Mode (DECOM). | #Y |
- * | 7 | Auto-wrap Mode (DECAWM). | #Y |
- * | 8 | Auto-repeat Keys (DECARM). Always on. | #N |
- * | 9 | X10 xterm mouse protocol. | #Y |
- * | 12 | Start Blinking Cursor. | #Y |
- * | 25 | Show Cursor (DECTCEM). | #Y |
- * | 45 | Reverse wrap-around. | #Y |
- * | 47 | Use Alternate Screen Buffer. | #Y |
- * | 66 | Application keypad (DECNKM). | #Y |
- * | 1000 | X11 xterm mouse protocol. | #Y |
- * | 1002 | Use Cell Motion Mouse Tracking. | #Y |
- * | 1003 | Use All Motion Mouse Tracking. | #Y |
- * | 1004 | Send FocusIn/FocusOut events | #Y |
- * | 1005 | Enable UTF-8 Mouse Mode. | #N |
- * | 1006 | Enable SGR Mouse Mode. | #Y |
- * | 1015 | Enable urxvt Mouse Mode. | #N |
- * | 1047 | Use Alternate Screen Buffer. | #Y |
- * | 1048 | Save cursor as in DECSC. | #Y |
- * | 1049 | Save cursor and switch to alternate buffer clearing it. | #P[Does not clear the alternate buffer.] |
- * | 2004 | Set bracketed paste mode. | #Y |
- *
- *
- * FIXME: implement DECSCNM, 1049 should clear altbuffer
- */
- public setModePrivate(params: IParams): boolean {
- for (let i = 0; i < params.length; i++) {
- switch (params.params[i]) {
- case 1:
- this._coreService.decPrivateModes.applicationCursorKeys = true;
- break;
- case 2:
- this._charsetService.setgCharset(0, DEFAULT_CHARSET);
- this._charsetService.setgCharset(1, DEFAULT_CHARSET);
- this._charsetService.setgCharset(2, DEFAULT_CHARSET);
- this._charsetService.setgCharset(3, DEFAULT_CHARSET);
- // set VT100 mode here
- break;
- case 3:
- /**
- * DECCOLM - 132 column mode.
- * This is only active if 'SetWinLines' (24) is enabled
- * through `options.windowsOptions`.
- */
- if (this._optionsService.rawOptions.windowOptions.setWinLines) {
- this._bufferService.resize(132, this._bufferService.rows);
- this._onRequestReset.fire();
- }
- break;
- case 6:
- this._coreService.decPrivateModes.origin = true;
- this._setCursor(0, 0);
- break;
- case 7:
- this._coreService.decPrivateModes.wraparound = true;
- break;
- case 12:
- // this.cursorBlink = true;
- break;
- case 45:
- this._coreService.decPrivateModes.reverseWraparound = true;
- break;
- case 66:
- this._logService.debug('Serial port requested application keypad.');
- this._coreService.decPrivateModes.applicationKeypad = true;
- this._onRequestSyncScrollBar.fire();
- break;
- case 9: // X10 Mouse
- // no release, no motion, no wheel, no modifiers.
- this._coreMouseService.activeProtocol = 'X10';
- break;
- case 1000: // vt200 mouse
- // no motion.
- this._coreMouseService.activeProtocol = 'VT200';
- break;
- case 1002: // button event mouse
- this._coreMouseService.activeProtocol = 'DRAG';
- break;
- case 1003: // any event mouse
- // any event - sends motion events,
- // even if there is no button held down.
- this._coreMouseService.activeProtocol = 'ANY';
- break;
- case 1004: // send focusin/focusout events
- // focusin: ^[[I
- // focusout: ^[[O
- this._coreService.decPrivateModes.sendFocus = true;
- this._onRequestSendFocus.fire();
- break;
- case 1005: // utf8 ext mode mouse - removed in #2507
- this._logService.debug('DECSET 1005 not supported (see #2507)');
- break;
- case 1006: // sgr ext mode mouse
- this._coreMouseService.activeEncoding = 'SGR';
- break;
- case 1015: // urxvt ext mode mouse - removed in #2507
- this._logService.debug('DECSET 1015 not supported (see #2507)');
- break;
- case 25: // show cursor
- this._coreService.isCursorHidden = false;
- break;
- case 1048: // alt screen cursor
- this.saveCursor();
- break;
- case 1049: // alt screen buffer cursor
- this.saveCursor();
- // FALL-THROUGH
- case 47: // alt screen buffer
- case 1047: // alt screen buffer
- this._bufferService.buffers.activateAltBuffer(this._eraseAttrData());
- this._coreService.isCursorInitialized = true;
- this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1);
- this._onRequestSyncScrollBar.fire();
- break;
- case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)
- this._coreService.decPrivateModes.bracketedPasteMode = true;
- break;
- }
- }
- return true;
- }
-
-
- /**
- * CSI Pm l Reset Mode (RM).
- * Ps = 2 -> Keyboard Action Mode (AM).
- * Ps = 4 -> Replace Mode (IRM).
- * Ps = 1 2 -> Send/receive (SRM).
- * Ps = 2 0 -> Normal Linefeed (LNM).
- *
- * @vt: #P[Only IRM is supported.] CSI RM "Reset Mode" "CSI Pm l" "Set various terminal attributes."
- * Supported param values by RM:
- *
- * | Param | Action | Support |
- * | ----- | -------------------------------------- | ------- |
- * | 2 | Keyboard Action Mode (KAM). Always on. | #N |
- * | 4 | Replace Mode (IRM). (default) | #Y |
- * | 12 | Send/receive (SRM). Always off. | #N |
- * | 20 | Normal Linefeed (LNM). Always off. | #N |
- *
- *
- * FIXME: why is LNM commented out?
- */
- public resetMode(params: IParams): boolean {
- for (let i = 0; i < params.length; i++) {
- switch (params.params[i]) {
- case 4:
- this._coreService.modes.insertMode = false;
- break;
- case 20:
- // this._t.convertEol = false;
- break;
- }
- }
- return true;
- }
-
- /**
- * CSI ? Pm l
- * DEC Private Mode Reset (DECRST).
- * Ps = 1 -> Normal Cursor Keys (DECCKM).
- * Ps = 2 -> Designate VT52 mode (DECANM).
- * Ps = 3 -> 80 Column Mode (DECCOLM).
- * Ps = 4 -> Jump (Fast) Scroll (DECSCLM).
- * Ps = 5 -> Normal Video (DECSCNM).
- * Ps = 6 -> Normal Cursor Mode (DECOM).
- * Ps = 7 -> No Wraparound Mode (DECAWM).
- * Ps = 8 -> No Auto-repeat Keys (DECARM).
- * Ps = 9 -> Don't send Mouse X & Y on button press.
- * Ps = 1 0 -> Hide toolbar (rxvt).
- * Ps = 1 2 -> Stop Blinking Cursor (att610).
- * Ps = 1 8 -> Don't print form feed (DECPFF).
- * Ps = 1 9 -> Limit print to scrolling region (DECPEX).
- * Ps = 2 5 -> Hide Cursor (DECTCEM).
- * Ps = 3 0 -> Don't show scrollbar (rxvt).
- * Ps = 3 5 -> Disable font-shifting functions (rxvt).
- * Ps = 4 0 -> Disallow 80 -> 132 Mode.
- * Ps = 4 1 -> No more(1) fix (see curses resource).
- * Ps = 4 2 -> Disable Nation Replacement Character sets (DEC-
- * NRCM).
- * Ps = 4 4 -> Turn Off Margin Bell.
- * Ps = 4 5 -> No Reverse-wraparound Mode.
- * Ps = 4 6 -> Stop Logging. (This is normally disabled by a
- * compile-time option).
- * Ps = 4 7 -> Use Normal Screen Buffer.
- * Ps = 6 6 -> Numeric keypad (DECNKM).
- * Ps = 6 7 -> Backarrow key sends delete (DECBKM).
- * Ps = 1 0 0 0 -> Don't send Mouse X & Y on button press and
- * release. See the section Mouse Tracking.
- * Ps = 1 0 0 1 -> Don't use Hilite Mouse Tracking.
- * Ps = 1 0 0 2 -> Don't use Cell Motion Mouse Tracking.
- * Ps = 1 0 0 3 -> Don't use All Motion Mouse Tracking.
- * Ps = 1 0 0 4 -> Don't send FocusIn/FocusOut events.
- * Ps = 1 0 0 5 -> Disable Extended Mouse Mode.
- * Ps = 1 0 1 0 -> Don't scroll to bottom on tty output
- * (rxvt).
- * Ps = 1 0 1 1 -> Don't scroll to bottom on key press (rxvt).
- * Ps = 1 0 3 4 -> Don't interpret "meta" key. (This disables
- * the eightBitInput resource).
- * Ps = 1 0 3 5 -> Disable special modifiers for Alt and Num-
- * Lock keys. (This disables the numLock resource).
- * Ps = 1 0 3 6 -> Don't send ESC when Meta modifies a key.
- * (This disables the metaSendsEscape resource).
- * Ps = 1 0 3 7 -> Send VT220 Remove from the editing-keypad
- * Delete key.
- * Ps = 1 0 3 9 -> Don't send ESC when Alt modifies a key.
- * (This disables the altSendsEscape resource).
- * Ps = 1 0 4 0 -> Do not keep selection when not highlighted.
- * (This disables the keepSelection resource).
- * Ps = 1 0 4 1 -> Use the PRIMARY selection. (This disables
- * the selectToClipboard resource).
- * Ps = 1 0 4 2 -> Disable Urgency window manager hint when
- * Control-G is received. (This disables the bellIsUrgent
- * resource).
- * Ps = 1 0 4 3 -> Disable raising of the window when Control-
- * G is received. (This disables the popOnBell resource).
- * Ps = 1 0 4 7 -> Use Normal Screen Buffer, clearing screen
- * first if in the Alternate Screen. (This may be disabled by
- * the titeInhibit resource).
- * Ps = 1 0 4 8 -> Restore cursor as in DECRC. (This may be
- * disabled by the titeInhibit resource).
- * Ps = 1 0 4 9 -> Use Normal Screen Buffer and restore cursor
- * as in DECRC. (This may be disabled by the titeInhibit
- * resource). This combines the effects of the 1 0 4 7 and 1 0
- * 4 8 modes. Use this with terminfo-based applications rather
- * than the 4 7 mode.
- * Ps = 1 0 5 0 -> Reset terminfo/termcap function-key mode.
- * Ps = 1 0 5 1 -> Reset Sun function-key mode.
- * Ps = 1 0 5 2 -> Reset HP function-key mode.
- * Ps = 1 0 5 3 -> Reset SCO function-key mode.
- * Ps = 1 0 6 0 -> Reset legacy keyboard emulation (X11R6).
- * Ps = 1 0 6 1 -> Reset keyboard emulation to Sun/PC style.
- * Ps = 2 0 0 4 -> Reset bracketed paste mode.
- *
- * @vt: #P[See below for supported modes.] CSI DECRST "DEC Private Reset Mode" "CSI ? Pm l" "Reset various terminal attributes."
- * Supported param values by DECRST:
- *
- * | param | Action | Support |
- * | ----- | ------------------------------------------------------- | ------- |
- * | 1 | Normal Cursor Keys (DECCKM). | #Y |
- * | 2 | Designate VT52 mode (DECANM). | #N |
- * | 3 | 80 Column Mode (DECCOLM). | #B[Switches to old column width instead of 80.] |
- * | 6 | Normal Cursor Mode (DECOM). | #Y |
- * | 7 | No Wraparound Mode (DECAWM). | #Y |
- * | 8 | No Auto-repeat Keys (DECARM). | #N |
- * | 9 | Don't send Mouse X & Y on button press. | #Y |
- * | 12 | Stop Blinking Cursor. | #Y |
- * | 25 | Hide Cursor (DECTCEM). | #Y |
- * | 45 | No reverse wrap-around. | #Y |
- * | 47 | Use Normal Screen Buffer. | #Y |
- * | 66 | Numeric keypad (DECNKM). | #Y |
- * | 1000 | Don't send Mouse reports. | #Y |
- * | 1002 | Don't use Cell Motion Mouse Tracking. | #Y |
- * | 1003 | Don't use All Motion Mouse Tracking. | #Y |
- * | 1004 | Don't send FocusIn/FocusOut events. | #Y |
- * | 1005 | Disable UTF-8 Mouse Mode. | #N |
- * | 1006 | Disable SGR Mouse Mode. | #Y |
- * | 1015 | Disable urxvt Mouse Mode. | #N |
- * | 1047 | Use Normal Screen Buffer (clearing screen if in alt). | #Y |
- * | 1048 | Restore cursor as in DECRC. | #Y |
- * | 1049 | Use Normal Screen Buffer and restore cursor. | #Y |
- * | 2004 | Reset bracketed paste mode. | #Y |
- *
- *
- * FIXME: DECCOLM is currently broken (already fixed in window options PR)
- */
- public resetModePrivate(params: IParams): boolean {
- for (let i = 0; i < params.length; i++) {
- switch (params.params[i]) {
- case 1:
- this._coreService.decPrivateModes.applicationCursorKeys = false;
- break;
- case 3:
- /**
- * DECCOLM - 80 column mode.
- * This is only active if 'SetWinLines' (24) is enabled
- * through `options.windowsOptions`.
- */
- if (this._optionsService.rawOptions.windowOptions.setWinLines) {
- this._bufferService.resize(80, this._bufferService.rows);
- this._onRequestReset.fire();
- }
- break;
- case 6:
- this._coreService.decPrivateModes.origin = false;
- this._setCursor(0, 0);
- break;
- case 7:
- this._coreService.decPrivateModes.wraparound = false;
- break;
- case 12:
- // this.cursorBlink = false;
- break;
- case 45:
- this._coreService.decPrivateModes.reverseWraparound = false;
- break;
- case 66:
- this._logService.debug('Switching back to normal keypad.');
- this._coreService.decPrivateModes.applicationKeypad = false;
- this._onRequestSyncScrollBar.fire();
- break;
- case 9: // X10 Mouse
- case 1000: // vt200 mouse
- case 1002: // button event mouse
- case 1003: // any event mouse
- this._coreMouseService.activeProtocol = 'NONE';
- break;
- case 1004: // send focusin/focusout events
- this._coreService.decPrivateModes.sendFocus = false;
- break;
- case 1005: // utf8 ext mode mouse - removed in #2507
- this._logService.debug('DECRST 1005 not supported (see #2507)');
- break;
- case 1006: // sgr ext mode mouse
- this._coreMouseService.activeEncoding = 'DEFAULT';
- break;
- case 1015: // urxvt ext mode mouse - removed in #2507
- this._logService.debug('DECRST 1015 not supported (see #2507)');
- break;
- case 25: // hide cursor
- this._coreService.isCursorHidden = true;
- break;
- case 1048: // alt screen cursor
- this.restoreCursor();
- break;
- case 1049: // alt screen buffer cursor
- // FALL-THROUGH
- case 47: // normal screen buffer
- case 1047: // normal screen buffer - clearing it first
- // Ensure the selection manager has the correct buffer
- this._bufferService.buffers.activateNormalBuffer();
- if (params.params[i] === 1049) {
- this.restoreCursor();
- }
- this._coreService.isCursorInitialized = true;
- this._onRequestRefreshRows.fire(0, this._bufferService.rows - 1);
- this._onRequestSyncScrollBar.fire();
- break;
- case 2004: // bracketed paste mode (https://cirw.in/blog/bracketed-paste)
- this._coreService.decPrivateModes.bracketedPasteMode = false;
- break;
- }
- }
- return true;
- }
-
- /**
- * Helper to write color information packed with color mode.
- */
- private _updateAttrColor(color: number, mode: number, c1: number, c2: number, c3: number): number {
- if (mode === 2) {
- color |= Attributes.CM_RGB;
- color &= ~Attributes.RGB_MASK;
- color |= AttributeData.fromColorRGB([c1, c2, c3]);
- } else if (mode === 5) {
- color &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
- color |= Attributes.CM_P256 | (c1 & 0xff);
- }
- return color;
- }
-
- /**
- * Helper to extract and apply color params/subparams.
- * Returns advance for params index.
- */
- private _extractColor(params: IParams, pos: number, attr: IAttributeData): number {
- // normalize params
- // meaning: [target, CM, ign, val, val, val]
- // RGB : [ 38/48, 2, ign, r, g, b]
- // P256 : [ 38/48, 5, ign, v, ign, ign]
- const accu = [0, 0, -1, 0, 0, 0];
-
- // alignment placeholder for non color space sequences
- let cSpace = 0;
-
- // return advance we took in params
- let advance = 0;
-
- do {
- accu[advance + cSpace] = params.params[pos + advance];
- if (params.hasSubParams(pos + advance)) {
- const subparams = params.getSubParams(pos + advance)!;
- let i = 0;
- do {
- if (accu[1] === 5) {
- cSpace = 1;
- }
- accu[advance + i + 1 + cSpace] = subparams[i];
- } while (++i < subparams.length && i + advance + 1 + cSpace < accu.length);
- break;
- }
- // exit early if can decide color mode with semicolons
- if ((accu[1] === 5 && advance + cSpace >= 2)
- || (accu[1] === 2 && advance + cSpace >= 5)) {
- break;
- }
- // offset colorSpace slot for semicolon mode
- if (accu[1]) {
- cSpace = 1;
- }
- } while (++advance + pos < params.length && advance + cSpace < accu.length);
-
- // set default values to 0
- for (let i = 2; i < accu.length; ++i) {
- if (accu[i] === -1) {
- accu[i] = 0;
- }
- }
-
- // apply colors
- switch (accu[0]) {
- case 38:
- attr.fg = this._updateAttrColor(attr.fg, accu[1], accu[3], accu[4], accu[5]);
- break;
- case 48:
- attr.bg = this._updateAttrColor(attr.bg, accu[1], accu[3], accu[4], accu[5]);
- break;
- case 58:
- attr.extended = attr.extended.clone();
- attr.extended.underlineColor = this._updateAttrColor(attr.extended.underlineColor, accu[1], accu[3], accu[4], accu[5]);
- }
-
- return advance;
- }
-
- /**
- * SGR 4 subparams:
- * 4:0 - equal to SGR 24 (turn off all underline)
- * 4:1 - equal to SGR 4 (single underline)
- * 4:2 - equal to SGR 21 (double underline)
- * 4:3 - curly underline
- * 4:4 - dotted underline
- * 4:5 - dashed underline
- */
- private _processUnderline(style: number, attr: IAttributeData): void {
- // treat extended attrs as immutable, thus always clone from old one
- // this is needed since the buffer only holds references to it
- attr.extended = attr.extended.clone();
-
- // default to 1 == single underline
- if (!~style || style > 5) {
- style = 1;
- }
- attr.extended.underlineStyle = style;
- attr.fg |= FgFlags.UNDERLINE;
-
- // 0 deactivates underline
- if (style === 0) {
- attr.fg &= ~FgFlags.UNDERLINE;
- }
-
- // update HAS_EXTENDED in BG
- attr.updateExtended();
- }
-
- /**
- * CSI Pm m Character Attributes (SGR).
- *
- * @vt: #P[See below for supported attributes.] CSI SGR "Select Graphic Rendition" "CSI Pm m" "Set/Reset various text attributes."
- * SGR selects one or more character attributes at the same time. Multiple params (up to 32)
- * are applied in order from left to right. The changed attributes are applied to all new
- * characters received. If you move characters in the viewport by scrolling or any other means,
- * then the attributes move with the characters.
- *
- * Supported param values by SGR:
- *
- * | Param | Meaning | Support |
- * | --------- | -------------------------------------------------------- | ------- |
- * | 0 | Normal (default). Resets any other preceding SGR. | #Y |
- * | 1 | Bold. (also see `options.drawBoldTextInBrightColors`) | #Y |
- * | 2 | Faint, decreased intensity. | #Y |
- * | 3 | Italic. | #Y |
- * | 4 | Underlined (see below for style support). | #Y |
- * | 5 | Slowly blinking. | #N |
- * | 6 | Rapidly blinking. | #N |
- * | 7 | Inverse. Flips foreground and background color. | #Y |
- * | 8 | Invisible (hidden). | #Y |
- * | 9 | Crossed-out characters (strikethrough). | #Y |
- * | 21 | Doubly underlined. | #P[Currently outputs a single underline.] |
- * | 22 | Normal (neither bold nor faint). | #Y |
- * | 23 | No italic. | #Y |
- * | 24 | Not underlined. | #Y |
- * | 25 | Steady (not blinking). | #Y |
- * | 27 | Positive (not inverse). | #Y |
- * | 28 | Visible (not hidden). | #Y |
- * | 29 | Not Crossed-out (strikethrough). | #Y |
- * | 30 | Foreground color: Black. | #Y |
- * | 31 | Foreground color: Red. | #Y |
- * | 32 | Foreground color: Green. | #Y |
- * | 33 | Foreground color: Yellow. | #Y |
- * | 34 | Foreground color: Blue. | #Y |
- * | 35 | Foreground color: Magenta. | #Y |
- * | 36 | Foreground color: Cyan. | #Y |
- * | 37 | Foreground color: White. | #Y |
- * | 38 | Foreground color: Extended color. | #P[Support for RGB and indexed colors, see below.] |
- * | 39 | Foreground color: Default (original). | #Y |
- * | 40 | Background color: Black. | #Y |
- * | 41 | Background color: Red. | #Y |
- * | 42 | Background color: Green. | #Y |
- * | 43 | Background color: Yellow. | #Y |
- * | 44 | Background color: Blue. | #Y |
- * | 45 | Background color: Magenta. | #Y |
- * | 46 | Background color: Cyan. | #Y |
- * | 47 | Background color: White. | #Y |
- * | 48 | Background color: Extended color. | #P[Support for RGB and indexed colors, see below.] |
- * | 49 | Background color: Default (original). | #Y |
- * | 90 - 97 | Bright foreground color (analogous to 30 - 37). | #Y |
- * | 100 - 107 | Bright background color (analogous to 40 - 47). | #Y |
- *
- * Underline supports subparams to denote the style in the form `4 : x`:
- *
- * | x | Meaning | Support |
- * | ------ | ------------------------------------------------------------- | ------- |
- * | 0 | No underline. Same as `SGR 24 m`. | #Y |
- * | 1 | Single underline. Same as `SGR 4 m`. | #Y |
- * | 2 | Double underline. | #P[Currently outputs a single underline.] |
- * | 3 | Curly underline. | #P[Currently outputs a single underline.] |
- * | 4 | Dotted underline. | #P[Currently outputs a single underline.] |
- * | 5 | Dashed underline. | #P[Currently outputs a single underline.] |
- * | other | Single underline. Same as `SGR 4 m`. | #Y |
- *
- * Extended colors are supported for foreground (Ps=38) and background (Ps=48) as follows:
- *
- * | Ps + 1 | Meaning | Support |
- * | ------ | ------------------------------------------------------------- | ------- |
- * | 0 | Implementation defined. | #N |
- * | 1 | Transparent. | #N |
- * | 2 | RGB color as `Ps ; 2 ; R ; G ; B` or `Ps : 2 : : R : G : B`. | #Y |
- * | 3 | CMY color. | #N |
- * | 4 | CMYK color. | #N |
- * | 5 | Indexed (256 colors) as `Ps ; 5 ; INDEX` or `Ps : 5 : INDEX`. | #Y |
- *
- *
- * FIXME: blinking is implemented in attrs, but not working in renderers?
- * FIXME: remove dead branch for p=100
- */
- public charAttributes(params: IParams): boolean {
- // Optimize a single SGR0.
- if (params.length === 1 && params.params[0] === 0) {
- this._curAttrData.fg = DEFAULT_ATTR_DATA.fg;
- this._curAttrData.bg = DEFAULT_ATTR_DATA.bg;
- return true;
- }
-
- const l = params.length;
- let p;
- const attr = this._curAttrData;
-
- for (let i = 0; i < l; i++) {
- p = params.params[i];
- if (p >= 30 && p <= 37) {
- // fg color 8
- attr.fg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
- attr.fg |= Attributes.CM_P16 | (p - 30);
- } else if (p >= 40 && p <= 47) {
- // bg color 8
- attr.bg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
- attr.bg |= Attributes.CM_P16 | (p - 40);
- } else if (p >= 90 && p <= 97) {
- // fg color 16
- attr.fg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
- attr.fg |= Attributes.CM_P16 | (p - 90) | 8;
- } else if (p >= 100 && p <= 107) {
- // bg color 16
- attr.bg &= ~(Attributes.CM_MASK | Attributes.PCOLOR_MASK);
- attr.bg |= Attributes.CM_P16 | (p - 100) | 8;
- } else if (p === 0) {
- // default
- attr.fg = DEFAULT_ATTR_DATA.fg;
- attr.bg = DEFAULT_ATTR_DATA.bg;
- } else if (p === 1) {
- // bold text
- attr.fg |= FgFlags.BOLD;
- } else if (p === 3) {
- // italic text
- attr.bg |= BgFlags.ITALIC;
- } else if (p === 4) {
- // underlined text
- attr.fg |= FgFlags.UNDERLINE;
- this._processUnderline(params.hasSubParams(i) ? params.getSubParams(i)![0] : UnderlineStyle.SINGLE, attr);
- } else if (p === 5) {
- // blink
- attr.fg |= FgFlags.BLINK;
- } else if (p === 7) {
- // inverse and positive
- // test with: echo -e '\e[31m\e[42mhello\e[7mworld\e[27mhi\e[m'
- attr.fg |= FgFlags.INVERSE;
- } else if (p === 8) {
- // invisible
- attr.fg |= FgFlags.INVISIBLE;
- } else if (p === 9) {
- // strikethrough
- attr.fg |= FgFlags.STRIKETHROUGH;
- } else if (p === 2) {
- // dimmed text
- attr.bg |= BgFlags.DIM;
- } else if (p === 21) {
- // double underline
- this._processUnderline(UnderlineStyle.DOUBLE, attr);
- } else if (p === 22) {
- // not bold nor faint
- attr.fg &= ~FgFlags.BOLD;
- attr.bg &= ~BgFlags.DIM;
- } else if (p === 23) {
- // not italic
- attr.bg &= ~BgFlags.ITALIC;
- } else if (p === 24) {
- // not underlined
- attr.fg &= ~FgFlags.UNDERLINE;
- } else if (p === 25) {
- // not blink
- attr.fg &= ~FgFlags.BLINK;
- } else if (p === 27) {
- // not inverse
- attr.fg &= ~FgFlags.INVERSE;
- } else if (p === 28) {
- // not invisible
- attr.fg &= ~FgFlags.INVISIBLE;
- } else if (p === 29) {
- // not strikethrough
- attr.fg &= ~FgFlags.STRIKETHROUGH;
- } else if (p === 39) {
- // reset fg
- attr.fg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
- attr.fg |= DEFAULT_ATTR_DATA.fg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);
- } else if (p === 49) {
- // reset bg
- attr.bg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
- attr.bg |= DEFAULT_ATTR_DATA.bg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);
- } else if (p === 38 || p === 48 || p === 58) {
- // fg color 256 and RGB
- i += this._extractColor(params, i, attr);
- } else if (p === 59) {
- attr.extended = attr.extended.clone();
- attr.extended.underlineColor = -1;
- attr.updateExtended();
- } else if (p === 100) { // FIXME: dead branch, p=100 already handled above!
- // reset fg/bg
- attr.fg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
- attr.fg |= DEFAULT_ATTR_DATA.fg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);
- attr.bg &= ~(Attributes.CM_MASK | Attributes.RGB_MASK);
- attr.bg |= DEFAULT_ATTR_DATA.bg & (Attributes.PCOLOR_MASK | Attributes.RGB_MASK);
- } else {
- this._logService.debug('Unknown SGR attribute: %d.', p);
- }
- }
- return true;
- }
-
- /**
- * CSI Ps n Device Status Report (DSR).
- * Ps = 5 -> Status Report. Result (``OK'') is
- * CSI 0 n
- * Ps = 6 -> Report Cursor Position (CPR) [row;column].
- * Result is
- * CSI r ; c R
- * CSI ? Ps n
- * Device Status Report (DSR, DEC-specific).
- * Ps = 6 -> Report Cursor Position (CPR) [row;column] as CSI
- * ? r ; c R (assumes page is zero).
- * Ps = 1 5 -> Report Printer status as CSI ? 1 0 n (ready).
- * or CSI ? 1 1 n (not ready).
- * Ps = 2 5 -> Report UDK status as CSI ? 2 0 n (unlocked)
- * or CSI ? 2 1 n (locked).
- * Ps = 2 6 -> Report Keyboard status as
- * CSI ? 2 7 ; 1 ; 0 ; 0 n (North American).
- * The last two parameters apply to VT400 & up, and denote key-
- * board ready and LK01 respectively.
- * Ps = 5 3 -> Report Locator status as
- * CSI ? 5 3 n Locator available, if compiled-in, or
- * CSI ? 5 0 n No Locator, if not.
- *
- * @vt: #Y CSI DSR "Device Status Report" "CSI Ps n" "Request cursor position (CPR) with `Ps` = 6."
- */
- public deviceStatus(params: IParams): boolean {
- switch (params.params[0]) {
- case 5:
- // status report
- this._coreService.triggerDataEvent(`${C0.ESC}[0n`);
- break;
- case 6:
- // cursor position
- const y = this._activeBuffer.y + 1;
- const x = this._activeBuffer.x + 1;
- this._coreService.triggerDataEvent(`${C0.ESC}[${y};${x}R`);
- break;
- }
- return true;
- }
-
- // @vt: #P[Only CPR is supported.] CSI DECDSR "DEC Device Status Report" "CSI ? Ps n" "Only CPR is supported (same as DSR)."
- public deviceStatusPrivate(params: IParams): boolean {
- // modern xterm doesnt seem to
- // respond to any of these except ?6, 6, and 5
- switch (params.params[0]) {
- case 6:
- // cursor position
- const y = this._activeBuffer.y + 1;
- const x = this._activeBuffer.x + 1;
- this._coreService.triggerDataEvent(`${C0.ESC}[?${y};${x}R`);
- break;
- case 15:
- // no printer
- // this.handler(C0.ESC + '[?11n');
- break;
- case 25:
- // dont support user defined keys
- // this.handler(C0.ESC + '[?21n');
- break;
- case 26:
- // north american keyboard
- // this.handler(C0.ESC + '[?27;1;0;0n');
- break;
- case 53:
- // no dec locator/mouse
- // this.handler(C0.ESC + '[?50n');
- break;
- }
- return true;
- }
-
- /**
- * CSI ! p Soft terminal reset (DECSTR).
- * http://vt100.net/docs/vt220-rm/table4-10.html
- *
- * @vt: #Y CSI DECSTR "Soft Terminal Reset" "CSI ! p" "Reset several terminal attributes to initial state."
- * There are two terminal reset sequences - RIS and DECSTR. While RIS performs almost a full terminal bootstrap,
- * DECSTR only resets certain attributes. For most needs DECSTR should be sufficient.
- *
- * The following terminal attributes are reset to default values:
- * - IRM is reset (dafault = false)
- * - scroll margins are reset (default = viewport size)
- * - erase attributes are reset to default
- * - charsets are reset
- * - DECSC data is reset to initial values
- * - DECOM is reset to absolute mode
- *
- *
- * FIXME: there are several more attributes missing (see VT520 manual)
- */
- public softReset(params: IParams): boolean {
- this._coreService.isCursorHidden = false;
- this._onRequestSyncScrollBar.fire();
- this._activeBuffer.scrollTop = 0;
- this._activeBuffer.scrollBottom = this._bufferService.rows - 1;
- this._curAttrData = DEFAULT_ATTR_DATA.clone();
- this._coreService.reset();
- this._charsetService.reset();
-
- // reset DECSC data
- this._activeBuffer.savedX = 0;
- this._activeBuffer.savedY = this._activeBuffer.ybase;
- this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg;
- this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg;
- this._activeBuffer.savedCharset = this._charsetService.charset;
-
- // reset DECOM
- this._coreService.decPrivateModes.origin = false;
- return true;
- }
-
- /**
- * CSI Ps SP q Set cursor style (DECSCUSR, VT520).
- * Ps = 0 -> blinking block.
- * Ps = 1 -> blinking block (default).
- * Ps = 2 -> steady block.
- * Ps = 3 -> blinking underline.
- * Ps = 4 -> steady underline.
- * Ps = 5 -> blinking bar (xterm).
- * Ps = 6 -> steady bar (xterm).
- *
- * @vt: #Y CSI DECSCUSR "Set Cursor Style" "CSI Ps SP q" "Set cursor style."
- * Supported cursor styles:
- * - empty, 0 or 1: steady block
- * - 2: blink block
- * - 3: steady underline
- * - 4: blink underline
- * - 5: steady bar
- * - 6: blink bar
- */
- public setCursorStyle(params: IParams): boolean {
- const param = params.params[0] || 1;
- switch (param) {
- case 1:
- case 2:
- this._optionsService.options.cursorStyle = 'block';
- break;
- case 3:
- case 4:
- this._optionsService.options.cursorStyle = 'underline';
- break;
- case 5:
- case 6:
- this._optionsService.options.cursorStyle = 'bar';
- break;
- }
- const isBlinking = param % 2 === 1;
- this._optionsService.options.cursorBlink = isBlinking;
- return true;
- }
-
- /**
- * CSI Ps ; Ps r
- * Set Scrolling Region [top;bottom] (default = full size of win-
- * dow) (DECSTBM).
- *
- * @vt: #Y CSI DECSTBM "Set Top and Bottom Margin" "CSI Ps ; Ps r" "Set top and bottom margins of the viewport [top;bottom] (default = viewport size)."
- */
- public setScrollRegion(params: IParams): boolean {
- const top = params.params[0] || 1;
- let bottom: number;
-
- if (params.length < 2 || (bottom = params.params[1]) > this._bufferService.rows || bottom === 0) {
- bottom = this._bufferService.rows;
- }
-
- if (bottom > top) {
- this._activeBuffer.scrollTop = top - 1;
- this._activeBuffer.scrollBottom = bottom - 1;
- this._setCursor(0, 0);
- }
- return true;
- }
-
- /**
- * CSI Ps ; Ps ; Ps t - Various window manipulations and reports (xterm)
- *
- * Note: Only those listed below are supported. All others are left to integrators and
- * need special treatment based on the embedding environment.
- *
- * Ps = 1 4 supported
- * Report xterm text area size in pixels.
- * Result is CSI 4 ; height ; width t
- * Ps = 14 ; 2 not implemented
- * Ps = 16 supported
- * Report xterm character cell size in pixels.
- * Result is CSI 6 ; height ; width t
- * Ps = 18 supported
- * Report the size of the text area in characters.
- * Result is CSI 8 ; height ; width t
- * Ps = 20 supported
- * Report xterm window's icon label.
- * Result is OSC L label ST
- * Ps = 21 supported
- * Report xterm window's title.
- * Result is OSC l label ST
- * Ps = 22 ; 0 -> Save xterm icon and window title on stack. supported
- * Ps = 22 ; 1 -> Save xterm icon title on stack. supported
- * Ps = 22 ; 2 -> Save xterm window title on stack. supported
- * Ps = 23 ; 0 -> Restore xterm icon and window title from stack. supported
- * Ps = 23 ; 1 -> Restore xterm icon title from stack. supported
- * Ps = 23 ; 2 -> Restore xterm window title from stack. supported
- * Ps >= 24 not implemented
- */
- public windowOptions(params: IParams): boolean {
- if (!paramToWindowOption(params.params[0], this._optionsService.rawOptions.windowOptions)) {
- return true;
- }
- const second = (params.length > 1) ? params.params[1] : 0;
- switch (params.params[0]) {
- case 14: // GetWinSizePixels, returns CSI 4 ; height ; width t
- if (second !== 2) {
- this._onRequestWindowsOptionsReport.fire(WindowsOptionsReportType.GET_WIN_SIZE_PIXELS);
- }
- break;
- case 16: // GetCellSizePixels, returns CSI 6 ; height ; width t
- this._onRequestWindowsOptionsReport.fire(WindowsOptionsReportType.GET_CELL_SIZE_PIXELS);
- break;
- case 18: // GetWinSizeChars, returns CSI 8 ; height ; width t
- if (this._bufferService) {
- this._coreService.triggerDataEvent(`${C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);
- }
- break;
- case 22: // PushTitle
- if (second === 0 || second === 2) {
- this._windowTitleStack.push(this._windowTitle);
- if (this._windowTitleStack.length > STACK_LIMIT) {
- this._windowTitleStack.shift();
- }
- }
- if (second === 0 || second === 1) {
- this._iconNameStack.push(this._iconName);
- if (this._iconNameStack.length > STACK_LIMIT) {
- this._iconNameStack.shift();
- }
- }
- break;
- case 23: // PopTitle
- if (second === 0 || second === 2) {
- if (this._windowTitleStack.length) {
- this.setTitle(this._windowTitleStack.pop()!);
- }
- }
- if (second === 0 || second === 1) {
- if (this._iconNameStack.length) {
- this.setIconName(this._iconNameStack.pop()!);
- }
- }
- break;
- }
- return true;
- }
-
-
- /**
- * CSI s
- * ESC 7
- * Save cursor (ANSI.SYS).
- *
- * @vt: #P[TODO...] CSI SCOSC "Save Cursor" "CSI s" "Save cursor position, charmap and text attributes."
- * @vt: #Y ESC SC "Save Cursor" "ESC 7" "Save cursor position, charmap and text attributes."
- */
- public saveCursor(params?: IParams): boolean {
- this._activeBuffer.savedX = this._activeBuffer.x;
- this._activeBuffer.savedY = this._activeBuffer.ybase + this._activeBuffer.y;
- this._activeBuffer.savedCurAttrData.fg = this._curAttrData.fg;
- this._activeBuffer.savedCurAttrData.bg = this._curAttrData.bg;
- this._activeBuffer.savedCharset = this._charsetService.charset;
- return true;
- }
-
-
- /**
- * CSI u
- * ESC 8
- * Restore cursor (ANSI.SYS).
- *
- * @vt: #P[TODO...] CSI SCORC "Restore Cursor" "CSI u" "Restore cursor position, charmap and text attributes."
- * @vt: #Y ESC RC "Restore Cursor" "ESC 8" "Restore cursor position, charmap and text attributes."
- */
- public restoreCursor(params?: IParams): boolean {
- this._activeBuffer.x = this._activeBuffer.savedX || 0;
- this._activeBuffer.y = Math.max(this._activeBuffer.savedY - this._activeBuffer.ybase, 0);
- this._curAttrData.fg = this._activeBuffer.savedCurAttrData.fg;
- this._curAttrData.bg = this._activeBuffer.savedCurAttrData.bg;
- this._charsetService.charset = (this as any)._savedCharset;
- if (this._activeBuffer.savedCharset) {
- this._charsetService.charset = this._activeBuffer.savedCharset;
- }
- this._restrictCursor();
- return true;
- }
-
-
- /**
- * OSC 2; <data> ST (set window title)
- * Proxy to set window title.
- *
- * @vt: #P[Icon name is not exposed.] OSC 0 "Set Windows Title and Icon Name" "OSC 0 ; Pt BEL" "Set window title and icon name."
- * Icon name is not supported. For Window Title see below.
- *
- * @vt: #Y OSC 2 "Set Windows Title" "OSC 2 ; Pt BEL" "Set window title."
- * xterm.js does not manipulate the title directly, instead exposes changes via the event `Terminal.onTitleChange`.
- */
- public setTitle(data: string): boolean {
- this._windowTitle = data;
- this._onTitleChange.fire(data);
- return true;
- }
-
- /**
- * OSC 1; <data> ST
- * Note: Icon name is not exposed.
- */
- public setIconName(data: string): boolean {
- this._iconName = data;
- return true;
- }
-
- /**
- * OSC 4; <num> ; <text> ST (set ANSI color <num> to <text>)
- *
- * @vt: #Y OSC 4 "Set ANSI color" "OSC 4 ; c ; spec BEL" "Change color number `c` to the color specified by `spec`."
- * `c` is the color index between 0 and 255. The color format of `spec` is derived from `XParseColor` (see OSC 10 for supported formats).
- * There may be multipe `c ; spec` pairs present in the same instruction.
- * If `spec` contains `?` the terminal returns a sequence with the currently set color.
- */
- public setOrReportIndexedColor(data: string): boolean {
- const event: IColorEvent = [];
- const slots = data.split(';');
- while (slots.length > 1) {
- const idx = slots.shift() as string;
- const spec = slots.shift() as string;
- if (/^\d+$/.exec(idx)) {
- const index = parseInt(idx);
- if (0 <= index && index < 256) {
- if (spec === '?') {
- event.push({ type: ColorRequestType.REPORT, index });
- } else {
- const color = parseColor(spec);
- if (color) {
- event.push({ type: ColorRequestType.SET, index, color });
- }
- }
- }
- }
- }
- if (event.length) {
- this._onColor.fire(event);
- }
- return true;
- }
-
- // special colors - OSC 10 | 11 | 12
- private _specialColors = [ColorIndex.FOREGROUND, ColorIndex.BACKGROUND, ColorIndex.CURSOR];
-
- /**
- * Apply colors requests for special colors in OSC 10 | 11 | 12.
- * Since these commands are stacking from multiple parameters,
- * we handle them in a loop with an entry offset to `_specialColors`.
- */
- private _setOrReportSpecialColor(data: string, offset: number): boolean {
- const slots = data.split(';');
- for (let i = 0; i < slots.length; ++i, ++offset) {
- if (offset >= this._specialColors.length) break;
- if (slots[i] === '?') {
- this._onColor.fire([{ type: ColorRequestType.REPORT, index: this._specialColors[offset] }]);
- } else {
- const color = parseColor(slots[i]);
- if (color) {
- this._onColor.fire([{ type: ColorRequestType.SET, index: this._specialColors[offset], color }]);
- }
- }
- }
- return true;
- }
-
- /**
- * OSC 10 ; <xcolor name>|<?> ST - set or query default foreground color
- *
- * @vt: #Y OSC 10 "Set or query default foreground color" "OSC 10 ; Pt BEL" "Set or query default foreground color."
- * To set the color, the following color specification formats are supported:
- * - `rgb:<red>/<green>/<blue>` for `<red>, <green>, <blue>` in `h | hh | hhh | hhhh`, where
- * `h` is a single hexadecimal digit (case insignificant). The different widths scale
- * from 4 bit (`h`) to 16 bit (`hhhh`) and get converted to 8 bit (`hh`).
- * - `#RGB` - 4 bits per channel, expanded to `#R0G0B0`
- * - `#RRGGBB` - 8 bits per channel
- * - `#RRRGGGBBB` - 12 bits per channel, truncated to `#RRGGBB`
- * - `#RRRRGGGGBBBB` - 16 bits per channel, truncated to `#RRGGBB`
- *
- * **Note:** X11 named colors are currently unsupported.
- *
- * If `Pt` contains `?` instead of a color specification, the terminal
- * returns a sequence with the current default foreground color
- * (use that sequence to restore the color after changes).
- *
- * **Note:** Other than xterm, xterm.js does not support OSC 12 - 19.
- * Therefore stacking multiple `Pt` separated by `;` only works for the first two entries.
- */
- public setOrReportFgColor(data: string): boolean {
- return this._setOrReportSpecialColor(data, 0);
- }
-
- /**
- * OSC 11 ; <xcolor name>|<?> ST - set or query default background color
- *
- * @vt: #Y OSC 11 "Set or query default background color" "OSC 11 ; Pt BEL" "Same as OSC 10, but for default background."
- */
- public setOrReportBgColor(data: string): boolean {
- return this._setOrReportSpecialColor(data, 1);
- }
-
- /**
- * OSC 12 ; <xcolor name>|<?> ST - set or query default cursor color
- *
- * @vt: #Y OSC 12 "Set or query default cursor color" "OSC 12 ; Pt BEL" "Same as OSC 10, but for default cursor color."
- */
- public setOrReportCursorColor(data: string): boolean {
- return this._setOrReportSpecialColor(data, 2);
- }
-
- /**
- * OSC 104 ; <num> ST - restore ANSI color <num>
- *
- * @vt: #Y OSC 104 "Reset ANSI color" "OSC 104 ; c BEL" "Reset color number `c` to themed color."
- * `c` is the color index between 0 and 255. This function restores the default color for `c` as
- * specified by the loaded theme. Any number of `c` parameters may be given.
- * If no parameters are given, the entire indexed color table will be reset.
- */
- public restoreIndexedColor(data: string): boolean {
- if (!data) {
- this._onColor.fire([{ type: ColorRequestType.RESTORE }]);
- return true;
- }
- const event: IColorEvent = [];
- const slots = data.split(';');
- for (let i = 0; i < slots.length; ++i) {
- if (/^\d+$/.exec(slots[i])) {
- const index = parseInt(slots[i]);
- if (0 <= index && index < 256) {
- event.push({ type: ColorRequestType.RESTORE, index });
- }
- }
- }
- if (event.length) {
- this._onColor.fire(event);
- }
- return true;
- }
-
- /**
- * OSC 110 ST - restore default foreground color
- *
- * @vt: #Y OSC 110 "Restore default foreground color" "OSC 110 BEL" "Restore default foreground to themed color."
- */
- public restoreFgColor(data: string): boolean {
- this._onColor.fire([{ type: ColorRequestType.RESTORE, index: ColorIndex.FOREGROUND }]);
- return true;
- }
-
- /**
- * OSC 111 ST - restore default background color
- *
- * @vt: #Y OSC 111 "Restore default background color" "OSC 111 BEL" "Restore default background to themed color."
- */
- public restoreBgColor(data: string): boolean {
- this._onColor.fire([{ type: ColorRequestType.RESTORE, index: ColorIndex.BACKGROUND }]);
- return true;
- }
-
- /**
- * OSC 112 ST - restore default cursor color
- *
- * @vt: #Y OSC 112 "Restore default cursor color" "OSC 112 BEL" "Restore default cursor to themed color."
- */
- public restoreCursorColor(data: string): boolean {
- this._onColor.fire([{ type: ColorRequestType.RESTORE, index: ColorIndex.CURSOR }]);
- return true;
- }
-
- /**
- * ESC E
- * C1.NEL
- * DEC mnemonic: NEL (https://vt100.net/docs/vt510-rm/NEL)
- * Moves cursor to first position on next line.
- *
- * @vt: #Y C1 NEL "Next Line" "\x85" "Move the cursor to the beginning of the next row."
- * @vt: #Y ESC NEL "Next Line" "ESC E" "Move the cursor to the beginning of the next row."
- */
- public nextLine(): boolean {
- this._activeBuffer.x = 0;
- this.index();
- return true;
- }
-
- /**
- * ESC =
- * DEC mnemonic: DECKPAM (https://vt100.net/docs/vt510-rm/DECKPAM.html)
- * Enables the numeric keypad to send application sequences to the host.
- */
- public keypadApplicationMode(): boolean {
- this._logService.debug('Serial port requested application keypad.');
- this._coreService.decPrivateModes.applicationKeypad = true;
- this._onRequestSyncScrollBar.fire();
- return true;
- }
-
- /**
- * ESC >
- * DEC mnemonic: DECKPNM (https://vt100.net/docs/vt510-rm/DECKPNM.html)
- * Enables the keypad to send numeric characters to the host.
- */
- public keypadNumericMode(): boolean {
- this._logService.debug('Switching back to normal keypad.');
- this._coreService.decPrivateModes.applicationKeypad = false;
- this._onRequestSyncScrollBar.fire();
- return true;
- }
-
- /**
- * ESC % @
- * ESC % G
- * Select default character set. UTF-8 is not supported (string are unicode anyways)
- * therefore ESC % G does the same.
- */
- public selectDefaultCharset(): boolean {
- this._charsetService.setgLevel(0);
- this._charsetService.setgCharset(0, DEFAULT_CHARSET); // US (default)
- return true;
- }
-
- /**
- * ESC ( C
- * Designate G0 Character Set, VT100, ISO 2022.
- * ESC ) C
- * Designate G1 Character Set (ISO 2022, VT100).
- * ESC * C
- * Designate G2 Character Set (ISO 2022, VT220).
- * ESC + C
- * Designate G3 Character Set (ISO 2022, VT220).
- * ESC - C
- * Designate G1 Character Set (VT300).
- * ESC . C
- * Designate G2 Character Set (VT300).
- * ESC / C
- * Designate G3 Character Set (VT300). C = A -> ISO Latin-1 Supplemental. - Supported?
- */
- public selectCharset(collectAndFlag: string): boolean {
- if (collectAndFlag.length !== 2) {
- this.selectDefaultCharset();
- return true;
- }
- if (collectAndFlag[0] === '/') {
- return true; // TODO: Is this supported?
- }
- this._charsetService.setgCharset(GLEVEL[collectAndFlag[0]], CHARSETS[collectAndFlag[1]] || DEFAULT_CHARSET);
- return true;
- }
-
- /**
- * ESC D
- * C1.IND
- * DEC mnemonic: IND (https://vt100.net/docs/vt510-rm/IND.html)
- * Moves the cursor down one line in the same column.
- *
- * @vt: #Y C1 IND "Index" "\x84" "Move the cursor one line down scrolling if needed."
- * @vt: #Y ESC IND "Index" "ESC D" "Move the cursor one line down scrolling if needed."
- */
- public index(): boolean {
- this._restrictCursor();
- this._activeBuffer.y++;
- if (this._activeBuffer.y === this._activeBuffer.scrollBottom + 1) {
- this._activeBuffer.y--;
- this._bufferService.scroll(this._eraseAttrData());
- } else if (this._activeBuffer.y >= this._bufferService.rows) {
- this._activeBuffer.y = this._bufferService.rows - 1;
- }
- this._restrictCursor();
- return true;
- }
-
- /**
- * ESC H
- * C1.HTS
- * DEC mnemonic: HTS (https://vt100.net/docs/vt510-rm/HTS.html)
- * Sets a horizontal tab stop at the column position indicated by
- * the value of the active column when the terminal receives an HTS.
- *
- * @vt: #Y C1 HTS "Horizontal Tabulation Set" "\x88" "Places a tab stop at the current cursor position."
- * @vt: #Y ESC HTS "Horizontal Tabulation Set" "ESC H" "Places a tab stop at the current cursor position."
- */
- public tabSet(): boolean {
- this._activeBuffer.tabs[this._activeBuffer.x] = true;
- return true;
- }
-
- /**
- * ESC M
- * C1.RI
- * DEC mnemonic: HTS
- * Moves the cursor up one line in the same column. If the cursor is at the top margin,
- * the page scrolls down.
- *
- * @vt: #Y ESC IR "Reverse Index" "ESC M" "Move the cursor one line up scrolling if needed."
- */
- public reverseIndex(): boolean {
- this._restrictCursor();
- if (this._activeBuffer.y === this._activeBuffer.scrollTop) {
- // possibly move the code below to term.reverseScroll();
- // test: echo -ne '\e[1;1H\e[44m\eM\e[0m'
- // blankLine(true) is xterm/linux behavior
- const scrollRegionHeight = this._activeBuffer.scrollBottom - this._activeBuffer.scrollTop;
- this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase + this._activeBuffer.y, scrollRegionHeight, 1);
- this._activeBuffer.lines.set(this._activeBuffer.ybase + this._activeBuffer.y, this._activeBuffer.getBlankLine(this._eraseAttrData()));
- this._dirtyRowService.markRangeDirty(this._activeBuffer.scrollTop, this._activeBuffer.scrollBottom);
- } else {
- this._activeBuffer.y--;
- this._restrictCursor(); // quickfix to not run out of bounds
- }
- return true;
- }
-
- /**
- * ESC c
- * DEC mnemonic: RIS (https://vt100.net/docs/vt510-rm/RIS.html)
- * Reset to initial state.
- */
- public fullReset(): boolean {
- this._parser.reset();
- this._onRequestReset.fire();
- return true;
- }
-
- public reset(): void {
- this._curAttrData = DEFAULT_ATTR_DATA.clone();
- this._eraseAttrDataInternal = DEFAULT_ATTR_DATA.clone();
- }
-
- /**
- * back_color_erase feature for xterm.
- */
- private _eraseAttrData(): IAttributeData {
- this._eraseAttrDataInternal.bg &= ~(Attributes.CM_MASK | 0xFFFFFF);
- this._eraseAttrDataInternal.bg |= this._curAttrData.bg & ~0xFC000000;
- return this._eraseAttrDataInternal;
- }
-
- /**
- * ESC n
- * ESC o
- * ESC |
- * ESC }
- * ESC ~
- * DEC mnemonic: LS (https://vt100.net/docs/vt510-rm/LS.html)
- * When you use a locking shift, the character set remains in GL or GR until
- * you use another locking shift. (partly supported)
- */
- public setgLevel(level: number): boolean {
- this._charsetService.setgLevel(level);
- return true;
- }
-
- /**
- * ESC # 8
- * DEC mnemonic: DECALN (https://vt100.net/docs/vt510-rm/DECALN.html)
- * This control function fills the complete screen area with
- * a test pattern (E) used for adjusting screen alignment.
- *
- * @vt: #Y ESC DECALN "Screen Alignment Pattern" "ESC # 8" "Fill viewport with a test pattern (E)."
- */
- public screenAlignmentPattern(): boolean {
- // prepare cell data
- const cell = new CellData();
- cell.content = 1 << Content.WIDTH_SHIFT | 'E'.charCodeAt(0);
- cell.fg = this._curAttrData.fg;
- cell.bg = this._curAttrData.bg;
-
-
- this._setCursor(0, 0);
- for (let yOffset = 0; yOffset < this._bufferService.rows; ++yOffset) {
- const row = this._activeBuffer.ybase + this._activeBuffer.y + yOffset;
- const line = this._activeBuffer.lines.get(row);
- if (line) {
- line.fill(cell);
- line.isWrapped = false;
- }
- }
- this._dirtyRowService.markAllDirty();
- this._setCursor(0, 0);
- return true;
- }
-}
diff --git a/node_modules/xterm/src/common/Lifecycle.ts b/node_modules/xterm/src/common/Lifecycle.ts
deleted file mode 100644
index 56bcfdc..0000000
--- a/node_modules/xterm/src/common/Lifecycle.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IDisposable } from 'common/Types';
-
-/**
- * A base class that can be extended to provide convenience methods for managing the lifecycle of an
- * object and its components.
- */
-export abstract class Disposable implements IDisposable {
- protected _disposables: IDisposable[] = [];
- protected _isDisposed: boolean = false;
-
- constructor() {
- }
-
- /**
- * Disposes the object, triggering the `dispose` method on all registered IDisposables.
- */
- public dispose(): void {
- this._isDisposed = true;
- for (const d of this._disposables) {
- d.dispose();
- }
- this._disposables.length = 0;
- }
-
- /**
- * Registers a disposable object.
- * @param d The disposable to register.
- * @returns The disposable.
- */
- public register<T extends IDisposable>(d: T): T {
- this._disposables.push(d);
- return d;
- }
-
- /**
- * Unregisters a disposable object if it has been registered, if not do
- * nothing.
- * @param d The disposable to unregister.
- */
- public unregister<T extends IDisposable>(d: T): void {
- const index = this._disposables.indexOf(d);
- if (index !== -1) {
- this._disposables.splice(index, 1);
- }
- }
-}
-
-/**
- * Dispose of all disposables in an array and set its length to 0.
- */
-export function disposeArray(disposables: IDisposable[]): void {
- for (const d of disposables) {
- d.dispose();
- }
- disposables.length = 0;
-}
-
-/**
- * Creates a disposable that will dispose of an array of disposables when disposed.
- */
-export function getDisposeArrayDisposable(array: IDisposable[]): IDisposable {
- return { dispose: () => disposeArray(array) };
-}
diff --git a/node_modules/xterm/src/common/Platform.ts b/node_modules/xterm/src/common/Platform.ts
deleted file mode 100644
index 7b823b1..0000000
--- a/node_modules/xterm/src/common/Platform.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Copyright (c) 2016 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-interface INavigator {
- userAgent: string;
- language: string;
- platform: string;
-}
-
-// We're declaring a navigator global here as we expect it in all runtimes (node and browser), but
-// we want this module to live in common.
-declare const navigator: INavigator;
-
-const isNode = (typeof navigator === 'undefined') ? true : false;
-const userAgent = (isNode) ? 'node' : navigator.userAgent;
-const platform = (isNode) ? 'node' : navigator.platform;
-
-export const isFirefox = userAgent.includes('Firefox');
-export const isLegacyEdge = userAgent.includes('Edge');
-export const isSafari = /^((?!chrome|android).)*safari/i.test(userAgent);
-
-// Find the users platform. We use this to interpret the meta key
-// and ISO third level shifts.
-// http://stackoverflow.com/q/19877924/577598
-export const isMac = ['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'].includes(platform);
-export const isIpad = platform === 'iPad';
-export const isIphone = platform === 'iPhone';
-export const isWindows = ['Windows', 'Win16', 'Win32', 'WinCE'].includes(platform);
-export const isLinux = platform.indexOf('Linux') >= 0;
diff --git a/node_modules/xterm/src/common/TypedArrayUtils.ts b/node_modules/xterm/src/common/TypedArrayUtils.ts
deleted file mode 100644
index 158c717..0000000
--- a/node_modules/xterm/src/common/TypedArrayUtils.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-export type TypedArray = Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array;
-
-
-/**
- * polyfill for TypedArray.fill
- * This is needed to support .fill in all safari versions and IE 11.
- */
-export function fill<T extends TypedArray>(array: T, value: number, start?: number, end?: number): T {
- // all modern engines that support .fill
- if (array.fill) {
- return array.fill(value, start, end) as T;
- }
- return fillFallback(array, value, start, end);
-}
-
-export function fillFallback<T extends TypedArray>(array: T, value: number, start: number = 0, end: number = array.length): T {
- // safari and IE 11
- // since IE 11 does not support Array.prototype.fill either
- // we cannot use the suggested polyfill from MDN
- // instead we simply fall back to looping
- if (start >= array.length) {
- return array;
- }
- start = (array.length + start) % array.length;
- if (end >= array.length) {
- end = array.length;
- } else {
- end = (array.length + end) % array.length;
- }
- for (let i = start; i < end; ++i) {
- array[i] = value;
- }
- return array;
-}
-
-/**
- * Concat two typed arrays `a` and `b`.
- * Returns a new typed array.
- */
-export function concat<T extends TypedArray>(a: T, b: T): T {
- const result = new (a.constructor as any)(a.length + b.length);
- result.set(a);
- result.set(b, a.length);
- return result;
-}
diff --git a/node_modules/xterm/src/common/Types.d.ts b/node_modules/xterm/src/common/Types.d.ts
deleted file mode 100644
index fee426e..0000000
--- a/node_modules/xterm/src/common/Types.d.ts
+++ /dev/null
@@ -1,483 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IFunctionIdentifier, ITerminalOptions as IPublicTerminalOptions } from 'xterm';
-import { IEvent, IEventEmitter } from 'common/EventEmitter';
-import { IDeleteEvent, IInsertEvent } from 'common/CircularList';
-import { IParams } from 'common/parser/Types';
-import { ICoreMouseService, ICoreService, IOptionsService, IUnicodeService } from 'common/services/Services';
-import { IBufferSet } from 'common/buffer/Types';
-
-export interface ICoreTerminal {
- coreMouseService: ICoreMouseService;
- coreService: ICoreService;
- optionsService: IOptionsService;
- unicodeService: IUnicodeService;
- buffers: IBufferSet;
- options: ITerminalOptions;
- registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable;
- registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable;
- registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable;
- registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable;
-}
-
-export interface IDisposable {
- dispose(): void;
-}
-
-// TODO: The options that are not in the public API should be reviewed
-export interface ITerminalOptions extends IPublicTerminalOptions {
- [key: string]: any;
- cancelEvents?: boolean;
- convertEol?: boolean;
- termName?: string;
-}
-
-export type XtermListener = (...args: any[]) => void;
-
-/**
- * A keyboard event interface which does not depend on the DOM, KeyboardEvent implicitly extends
- * this event.
- */
-export interface IKeyboardEvent {
- altKey: boolean;
- ctrlKey: boolean;
- shiftKey: boolean;
- metaKey: boolean;
- /** @deprecated See KeyboardEvent.keyCode */
- keyCode: number;
- key: string;
- type: string;
-}
-
-export interface IScrollEvent {
- position: number;
- source: ScrollSource;
-}
-
-export const enum ScrollSource {
- TERMINAL,
- VIEWPORT,
-}
-
-export interface ICircularList<T> {
- length: number;
- maxLength: number;
- isFull: boolean;
-
- onDeleteEmitter: IEventEmitter<IDeleteEvent>;
- onDelete: IEvent<IDeleteEvent>;
- onInsertEmitter: IEventEmitter<IInsertEvent>;
- onInsert: IEvent<IInsertEvent>;
- onTrimEmitter: IEventEmitter<number>;
- onTrim: IEvent<number>;
-
- get(index: number): T | undefined;
- set(index: number, value: T): void;
- push(value: T): void;
- recycle(): T;
- pop(): T | undefined;
- splice(start: number, deleteCount: number, ...items: T[]): void;
- trimStart(count: number): void;
- shiftElements(start: number, count: number, offset: number): void;
-}
-
-export const enum KeyboardResultType {
- SEND_KEY,
- SELECT_ALL,
- PAGE_UP,
- PAGE_DOWN
-}
-
-export interface IKeyboardResult {
- type: KeyboardResultType;
- cancel: boolean;
- key: string | undefined;
-}
-
-export interface ICharset {
- [key: string]: string | undefined;
-}
-
-export type CharData = [number, string, number, number];
-export type IColorRGB = [number, number, number];
-
-export interface IExtendedAttrs {
- underlineStyle: number;
- underlineColor: number;
- clone(): IExtendedAttrs;
- isEmpty(): boolean;
-}
-
-/** Attribute data */
-export interface IAttributeData {
- fg: number;
- bg: number;
- extended: IExtendedAttrs;
-
- clone(): IAttributeData;
-
- // flags
- isInverse(): number;
- isBold(): number;
- isUnderline(): number;
- isBlink(): number;
- isInvisible(): number;
- isItalic(): number;
- isDim(): number;
- isStrikethrough(): number;
-
- // color modes
- getFgColorMode(): number;
- getBgColorMode(): number;
- isFgRGB(): boolean;
- isBgRGB(): boolean;
- isFgPalette(): boolean;
- isBgPalette(): boolean;
- isFgDefault(): boolean;
- isBgDefault(): boolean;
- isAttributeDefault(): boolean;
-
- // colors
- getFgColor(): number;
- getBgColor(): number;
-
- // extended attrs
- hasExtendedAttrs(): number;
- updateExtended(): void;
- getUnderlineColor(): number;
- getUnderlineColorMode(): number;
- isUnderlineColorRGB(): boolean;
- isUnderlineColorPalette(): boolean;
- isUnderlineColorDefault(): boolean;
- getUnderlineStyle(): number;
-}
-
-/** Cell data */
-export interface ICellData extends IAttributeData {
- content: number;
- combinedData: string;
- isCombined(): number;
- getWidth(): number;
- getChars(): string;
- getCode(): number;
- setFromCharData(value: CharData): void;
- getAsCharData(): CharData;
-}
-
-/**
- * Interface for a line in the terminal buffer.
- */
-export interface IBufferLine {
- length: number;
- isWrapped: boolean;
- get(index: number): CharData;
- set(index: number, value: CharData): void;
- loadCell(index: number, cell: ICellData): ICellData;
- setCell(index: number, cell: ICellData): void;
- setCellFromCodePoint(index: number, codePoint: number, width: number, fg: number, bg: number, eAttrs: IExtendedAttrs): void;
- addCodepointToCell(index: number, codePoint: number): void;
- insertCells(pos: number, n: number, ch: ICellData, eraseAttr?: IAttributeData): void;
- deleteCells(pos: number, n: number, fill: ICellData, eraseAttr?: IAttributeData): void;
- replaceCells(start: number, end: number, fill: ICellData, eraseAttr?: IAttributeData): void;
- resize(cols: number, fill: ICellData): void;
- fill(fillCellData: ICellData): void;
- copyFrom(line: IBufferLine): void;
- clone(): IBufferLine;
- getTrimmedLength(): number;
- translateToString(trimRight?: boolean, startCol?: number, endCol?: number): string;
-
- /* direct access to cell attrs */
- getWidth(index: number): number;
- hasWidth(index: number): number;
- getFg(index: number): number;
- getBg(index: number): number;
- hasContent(index: number): number;
- getCodePoint(index: number): number;
- isCombined(index: number): number;
- getString(index: number): string;
-}
-
-export interface IMarker extends IDisposable {
- readonly id: number;
- readonly isDisposed: boolean;
- readonly line: number;
- onDispose: IEvent<void>;
-}
-export interface IModes {
- insertMode: boolean;
-}
-
-export interface IDecPrivateModes {
- applicationCursorKeys: boolean;
- applicationKeypad: boolean;
- bracketedPasteMode: boolean;
- origin: boolean;
- reverseWraparound: boolean;
- sendFocus: boolean;
- wraparound: boolean; // defaults: xterm - true, vt100 - false
-}
-
-export interface IRowRange {
- start: number;
- end: number;
-}
-
-/**
- * Interface for mouse events in the core.
- */
-export const enum CoreMouseButton {
- LEFT = 0,
- MIDDLE = 1,
- RIGHT = 2,
- NONE = 3,
- WHEEL = 4,
- // additional buttons 1..8
- // untested!
- AUX1 = 8,
- AUX2 = 9,
- AUX3 = 10,
- AUX4 = 11,
- AUX5 = 12,
- AUX6 = 13,
- AUX7 = 14,
- AUX8 = 15
-}
-
-export const enum CoreMouseAction {
- UP = 0, // buttons, wheel
- DOWN = 1, // buttons, wheel
- LEFT = 2, // wheel only
- RIGHT = 3, // wheel only
- MOVE = 32 // buttons only
-}
-
-export interface ICoreMouseEvent {
- /** column (zero based). */
- col: number;
- /** row (zero based). */
- row: number;
- /**
- * Button the action occured. Due to restrictions of the tracking protocols
- * it is not possible to report multiple buttons at once.
- * Wheel is treated as a button.
- * There are invalid combinations of buttons and actions possible
- * (like move + wheel), those are silently ignored by the CoreMouseService.
- */
- button: CoreMouseButton;
- action: CoreMouseAction;
- /**
- * Modifier states.
- * Protocols will add/ignore those based on specific restrictions.
- */
- ctrl?: boolean;
- alt?: boolean;
- shift?: boolean;
-}
-
-/**
- * CoreMouseEventType
- * To be reported to the browser component which events a mouse
- * protocol wants to be catched and forwarded as an ICoreMouseEvent
- * to CoreMouseService.
- */
-export const enum CoreMouseEventType {
- NONE = 0,
- /** any mousedown event */
- DOWN = 1,
- /** any mouseup event */
- UP = 2,
- /** any mousemove event while a button is held */
- DRAG = 4,
- /** any mousemove event without a button */
- MOVE = 8,
- /** any wheel event */
- WHEEL = 16
-}
-
-/**
- * Mouse protocol interface.
- * A mouse protocol can be registered and activated at the CoreMouseService.
- * `events` should contain a list of needed events as a hint for the browser component
- * to install/remove the appropriate event handlers.
- * `restrict` applies further protocol specific restrictions like not allowed
- * modifiers or filtering invalid event types.
- */
-export interface ICoreMouseProtocol {
- events: CoreMouseEventType;
- restrict: (e: ICoreMouseEvent) => boolean;
-}
-
-/**
- * CoreMouseEncoding
- * The tracking encoding can be registered and activated at the CoreMouseService.
- * If a ICoreMouseEvent passes all procotol restrictions it will be encoded
- * with the active encoding and sent out.
- * Note: Returning an empty string will supress sending a mouse report,
- * which can be used to skip creating falsey reports in limited encodings
- * (DEFAULT only supports up to 223 1-based as coord value).
- */
-export type CoreMouseEncoding = (event: ICoreMouseEvent) => string;
-
-/**
- * windowOptions
- */
-export interface IWindowOptions {
- restoreWin?: boolean;
- minimizeWin?: boolean;
- setWinPosition?: boolean;
- setWinSizePixels?: boolean;
- raiseWin?: boolean;
- lowerWin?: boolean;
- refreshWin?: boolean;
- setWinSizeChars?: boolean;
- maximizeWin?: boolean;
- fullscreenWin?: boolean;
- getWinState?: boolean;
- getWinPosition?: boolean;
- getWinSizePixels?: boolean;
- getScreenSizePixels?: boolean;
- getCellSizePixels?: boolean;
- getWinSizeChars?: boolean;
- getScreenSizeChars?: boolean;
- getIconTitle?: boolean;
- getWinTitle?: boolean;
- pushTitle?: boolean;
- popTitle?: boolean;
- setWinLines?: boolean;
-}
-
-// color events from common, used for OSC 4/10/11/12 and 104/110/111/112
-export const enum ColorRequestType {
- REPORT = 0,
- SET = 1,
- RESTORE = 2
-}
-export const enum ColorIndex {
- FOREGROUND = 256,
- BACKGROUND = 257,
- CURSOR = 258
-}
-export interface IColorReportRequest {
- type: ColorRequestType.REPORT;
- index: ColorIndex;
-}
-export interface IColorSetRequest {
- type: ColorRequestType.SET;
- index: ColorIndex;
- color: IColorRGB;
-}
-export interface IColorRestoreRequest {
- type: ColorRequestType.RESTORE;
- index?: ColorIndex;
-}
-export type IColorEvent = (IColorReportRequest | IColorSetRequest | IColorRestoreRequest)[];
-
-
-/**
- * Calls the parser and handles actions generated by the parser.
- */
-export interface IInputHandler {
- onTitleChange: IEvent<string>;
-
- parse(data: string | Uint8Array, promiseResult?: boolean): void | Promise<boolean>;
- print(data: Uint32Array, start: number, end: number): void;
- registerCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean | Promise<boolean>): IDisposable;
- registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean | Promise<boolean>): IDisposable;
- registerEscHandler(id: IFunctionIdentifier, callback: () => boolean | Promise<boolean>): IDisposable;
- registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable;
-
- /** C0 BEL */ bell(): boolean;
- /** C0 LF */ lineFeed(): boolean;
- /** C0 CR */ carriageReturn(): boolean;
- /** C0 BS */ backspace(): boolean;
- /** C0 HT */ tab(): boolean;
- /** C0 SO */ shiftOut(): boolean;
- /** C0 SI */ shiftIn(): boolean;
-
- /** CSI @ */ insertChars(params: IParams): boolean;
- /** CSI SP @ */ scrollLeft(params: IParams): boolean;
- /** CSI A */ cursorUp(params: IParams): boolean;
- /** CSI SP A */ scrollRight(params: IParams): boolean;
- /** CSI B */ cursorDown(params: IParams): boolean;
- /** CSI C */ cursorForward(params: IParams): boolean;
- /** CSI D */ cursorBackward(params: IParams): boolean;
- /** CSI E */ cursorNextLine(params: IParams): boolean;
- /** CSI F */ cursorPrecedingLine(params: IParams): boolean;
- /** CSI G */ cursorCharAbsolute(params: IParams): boolean;
- /** CSI H */ cursorPosition(params: IParams): boolean;
- /** CSI I */ cursorForwardTab(params: IParams): boolean;
- /** CSI J */ eraseInDisplay(params: IParams): boolean;
- /** CSI K */ eraseInLine(params: IParams): boolean;
- /** CSI L */ insertLines(params: IParams): boolean;
- /** CSI M */ deleteLines(params: IParams): boolean;
- /** CSI P */ deleteChars(params: IParams): boolean;
- /** CSI S */ scrollUp(params: IParams): boolean;
- /** CSI T */ scrollDown(params: IParams, collect?: string): boolean;
- /** CSI X */ eraseChars(params: IParams): boolean;
- /** CSI Z */ cursorBackwardTab(params: IParams): boolean;
- /** CSI ` */ charPosAbsolute(params: IParams): boolean;
- /** CSI a */ hPositionRelative(params: IParams): boolean;
- /** CSI b */ repeatPrecedingCharacter(params: IParams): boolean;
- /** CSI c */ sendDeviceAttributesPrimary(params: IParams): boolean;
- /** CSI > c */ sendDeviceAttributesSecondary(params: IParams): boolean;
- /** CSI d */ linePosAbsolute(params: IParams): boolean;
- /** CSI e */ vPositionRelative(params: IParams): boolean;
- /** CSI f */ hVPosition(params: IParams): boolean;
- /** CSI g */ tabClear(params: IParams): boolean;
- /** CSI h */ setMode(params: IParams, collect?: string): boolean;
- /** CSI l */ resetMode(params: IParams, collect?: string): boolean;
- /** CSI m */ charAttributes(params: IParams): boolean;
- /** CSI n */ deviceStatus(params: IParams, collect?: string): boolean;
- /** CSI p */ softReset(params: IParams, collect?: string): boolean;
- /** CSI q */ setCursorStyle(params: IParams, collect?: string): boolean;
- /** CSI r */ setScrollRegion(params: IParams, collect?: string): boolean;
- /** CSI s */ saveCursor(params: IParams): boolean;
- /** CSI u */ restoreCursor(params: IParams): boolean;
- /** CSI ' } */ insertColumns(params: IParams): boolean;
- /** CSI ' ~ */ deleteColumns(params: IParams): boolean;
-
- /** OSC 0
- OSC 2 */ setTitle(data: string): boolean;
- /** OSC 4 */ setOrReportIndexedColor(data: string): boolean;
- /** OSC 10 */ setOrReportFgColor(data: string): boolean;
- /** OSC 11 */ setOrReportBgColor(data: string): boolean;
- /** OSC 12 */ setOrReportCursorColor(data: string): boolean;
- /** OSC 104 */ restoreIndexedColor(data: string): boolean;
- /** OSC 110 */ restoreFgColor(data: string): boolean;
- /** OSC 111 */ restoreBgColor(data: string): boolean;
- /** OSC 112 */ restoreCursorColor(data: string): boolean;
-
- /** ESC E */ nextLine(): boolean;
- /** ESC = */ keypadApplicationMode(): boolean;
- /** ESC > */ keypadNumericMode(): boolean;
- /** ESC % G
- ESC % @ */ selectDefaultCharset(): boolean;
- /** ESC ( C
- ESC ) C
- ESC * C
- ESC + C
- ESC - C
- ESC . C
- ESC / C */ selectCharset(collectAndFlag: string): boolean;
- /** ESC D */ index(): boolean;
- /** ESC H */ tabSet(): boolean;
- /** ESC M */ reverseIndex(): boolean;
- /** ESC c */ fullReset(): boolean;
- /** ESC n
- ESC o
- ESC |
- ESC }
- ESC ~ */ setgLevel(level: number): boolean;
- /** ESC # 8 */ screenAlignmentPattern(): boolean;
-}
-
-interface IParseStack {
- paused: boolean;
- cursorStartX: number;
- cursorStartY: number;
- decodedLength: number;
- position: number;
-}
diff --git a/node_modules/xterm/src/common/WindowsMode.ts b/node_modules/xterm/src/common/WindowsMode.ts
deleted file mode 100644
index 7cff094..0000000
--- a/node_modules/xterm/src/common/WindowsMode.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { CHAR_DATA_CODE_INDEX, NULL_CELL_CODE, WHITESPACE_CELL_CODE } from 'common/buffer/Constants';
-import { IBufferService } from 'common/services/Services';
-
-export function updateWindowsModeWrappedState(bufferService: IBufferService): void {
- // Winpty does not support wraparound mode which means that lines will never
- // be marked as wrapped. This causes issues for things like copying a line
- // retaining the wrapped new line characters or if consumers are listening
- // in on the data stream.
- //
- // The workaround for this is to listen to every incoming line feed and mark
- // the line as wrapped if the last character in the previous line is not a
- // space. This is certainly not without its problems, but generally on
- // Windows when text reaches the end of the terminal it's likely going to be
- // wrapped.
- const line = bufferService.buffer.lines.get(bufferService.buffer.ybase + bufferService.buffer.y - 1);
- const lastChar = line?.get(bufferService.cols - 1);
-
- const nextLine = bufferService.buffer.lines.get(bufferService.buffer.ybase + bufferService.buffer.y);
- if (nextLine && lastChar) {
- nextLine.isWrapped = (lastChar[CHAR_DATA_CODE_INDEX] !== NULL_CELL_CODE && lastChar[CHAR_DATA_CODE_INDEX] !== WHITESPACE_CELL_CODE);
- }
-}
diff --git a/node_modules/xterm/src/common/buffer/AttributeData.ts b/node_modules/xterm/src/common/buffer/AttributeData.ts
deleted file mode 100644
index 43d378e..0000000
--- a/node_modules/xterm/src/common/buffer/AttributeData.ts
+++ /dev/null
@@ -1,148 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IAttributeData, IColorRGB, IExtendedAttrs } from 'common/Types';
-import { Attributes, FgFlags, BgFlags, UnderlineStyle } from 'common/buffer/Constants';
-
-export class AttributeData implements IAttributeData {
- public static toColorRGB(value: number): IColorRGB {
- return [
- value >>> Attributes.RED_SHIFT & 255,
- value >>> Attributes.GREEN_SHIFT & 255,
- value & 255
- ];
- }
-
- public static fromColorRGB(value: IColorRGB): number {
- return (value[0] & 255) << Attributes.RED_SHIFT | (value[1] & 255) << Attributes.GREEN_SHIFT | value[2] & 255;
- }
-
- public clone(): IAttributeData {
- const newObj = new AttributeData();
- newObj.fg = this.fg;
- newObj.bg = this.bg;
- newObj.extended = this.extended.clone();
- return newObj;
- }
-
- // data
- public fg = 0;
- public bg = 0;
- public extended = new ExtendedAttrs();
-
- // flags
- public isInverse(): number { return this.fg & FgFlags.INVERSE; }
- public isBold(): number { return this.fg & FgFlags.BOLD; }
- public isUnderline(): number { return this.fg & FgFlags.UNDERLINE; }
- public isBlink(): number { return this.fg & FgFlags.BLINK; }
- public isInvisible(): number { return this.fg & FgFlags.INVISIBLE; }
- public isItalic(): number { return this.bg & BgFlags.ITALIC; }
- public isDim(): number { return this.bg & BgFlags.DIM; }
- public isStrikethrough(): number { return this.fg & FgFlags.STRIKETHROUGH; }
-
- // color modes
- public getFgColorMode(): number { return this.fg & Attributes.CM_MASK; }
- public getBgColorMode(): number { return this.bg & Attributes.CM_MASK; }
- public isFgRGB(): boolean { return (this.fg & Attributes.CM_MASK) === Attributes.CM_RGB; }
- public isBgRGB(): boolean { return (this.bg & Attributes.CM_MASK) === Attributes.CM_RGB; }
- public isFgPalette(): boolean { return (this.fg & Attributes.CM_MASK) === Attributes.CM_P16 || (this.fg & Attributes.CM_MASK) === Attributes.CM_P256; }
- public isBgPalette(): boolean { return (this.bg & Attributes.CM_MASK) === Attributes.CM_P16 || (this.bg & Attributes.CM_MASK) === Attributes.CM_P256; }
- public isFgDefault(): boolean { return (this.fg & Attributes.CM_MASK) === 0; }
- public isBgDefault(): boolean { return (this.bg & Attributes.CM_MASK) === 0; }
- public isAttributeDefault(): boolean { return this.fg === 0 && this.bg === 0; }
-
- // colors
- public getFgColor(): number {
- switch (this.fg & Attributes.CM_MASK) {
- case Attributes.CM_P16:
- case Attributes.CM_P256: return this.fg & Attributes.PCOLOR_MASK;
- case Attributes.CM_RGB: return this.fg & Attributes.RGB_MASK;
- default: return -1; // CM_DEFAULT defaults to -1
- }
- }
- public getBgColor(): number {
- switch (this.bg & Attributes.CM_MASK) {
- case Attributes.CM_P16:
- case Attributes.CM_P256: return this.bg & Attributes.PCOLOR_MASK;
- case Attributes.CM_RGB: return this.bg & Attributes.RGB_MASK;
- default: return -1; // CM_DEFAULT defaults to -1
- }
- }
-
- // extended attrs
- public hasExtendedAttrs(): number {
- return this.bg & BgFlags.HAS_EXTENDED;
- }
- public updateExtended(): void {
- if (this.extended.isEmpty()) {
- this.bg &= ~BgFlags.HAS_EXTENDED;
- } else {
- this.bg |= BgFlags.HAS_EXTENDED;
- }
- }
- public getUnderlineColor(): number {
- if ((this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor) {
- switch (this.extended.underlineColor & Attributes.CM_MASK) {
- case Attributes.CM_P16:
- case Attributes.CM_P256: return this.extended.underlineColor & Attributes.PCOLOR_MASK;
- case Attributes.CM_RGB: return this.extended.underlineColor & Attributes.RGB_MASK;
- default: return this.getFgColor();
- }
- }
- return this.getFgColor();
- }
- public getUnderlineColorMode(): number {
- return (this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor
- ? this.extended.underlineColor & Attributes.CM_MASK
- : this.getFgColorMode();
- }
- public isUnderlineColorRGB(): boolean {
- return (this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor
- ? (this.extended.underlineColor & Attributes.CM_MASK) === Attributes.CM_RGB
- : this.isFgRGB();
- }
- public isUnderlineColorPalette(): boolean {
- return (this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor
- ? (this.extended.underlineColor & Attributes.CM_MASK) === Attributes.CM_P16
- || (this.extended.underlineColor & Attributes.CM_MASK) === Attributes.CM_P256
- : this.isFgPalette();
- }
- public isUnderlineColorDefault(): boolean {
- return (this.bg & BgFlags.HAS_EXTENDED) && ~this.extended.underlineColor
- ? (this.extended.underlineColor & Attributes.CM_MASK) === 0
- : this.isFgDefault();
- }
- public getUnderlineStyle(): UnderlineStyle {
- return this.fg & FgFlags.UNDERLINE
- ? (this.bg & BgFlags.HAS_EXTENDED ? this.extended.underlineStyle : UnderlineStyle.SINGLE)
- : UnderlineStyle.NONE;
- }
-}
-
-
-/**
- * Extended attributes for a cell.
- * Holds information about different underline styles and color.
- */
-export class ExtendedAttrs implements IExtendedAttrs {
- constructor(
- // underline style, NONE is empty
- public underlineStyle: UnderlineStyle = UnderlineStyle.NONE,
- // underline color, -1 is empty (same as FG)
- public underlineColor: number = -1
- ) {}
-
- public clone(): IExtendedAttrs {
- return new ExtendedAttrs(this.underlineStyle, this.underlineColor);
- }
-
- /**
- * Convenient method to indicate whether the object holds no additional information,
- * that needs to be persistant in the buffer.
- */
- public isEmpty(): boolean {
- return this.underlineStyle === UnderlineStyle.NONE;
- }
-}
diff --git a/node_modules/xterm/src/common/buffer/Buffer.ts b/node_modules/xterm/src/common/buffer/Buffer.ts
deleted file mode 100644
index 7596fef..0000000
--- a/node_modules/xterm/src/common/buffer/Buffer.ts
+++ /dev/null
@@ -1,702 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { CircularList, IInsertEvent } from 'common/CircularList';
-import { IBuffer, BufferIndex, IBufferStringIterator, IBufferStringIteratorResult } from 'common/buffer/Types';
-import { IBufferLine, ICellData, IAttributeData, ICharset } from 'common/Types';
-import { BufferLine, DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
-import { CellData } from 'common/buffer/CellData';
-import { NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_WIDTH, WHITESPACE_CELL_CODE, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_CHAR_INDEX } from 'common/buffer/Constants';
-import { reflowLargerApplyNewLayout, reflowLargerCreateNewLayout, reflowLargerGetLinesToRemove, reflowSmallerGetNewLineLengths, getWrappedLineTrimmedLength } from 'common/buffer/BufferReflow';
-import { Marker } from 'common/buffer/Marker';
-import { IOptionsService, IBufferService } from 'common/services/Services';
-import { DEFAULT_CHARSET } from 'common/data/Charsets';
-import { ExtendedAttrs } from 'common/buffer/AttributeData';
-
-export const MAX_BUFFER_SIZE = 4294967295; // 2^32 - 1
-
-/**
- * This class represents a terminal buffer (an internal state of the terminal), where the
- * following information is stored (in high-level):
- * - text content of this particular buffer
- * - cursor position
- * - scroll position
- */
-export class Buffer implements IBuffer {
- public lines: CircularList<IBufferLine>;
- public ydisp: number = 0;
- public ybase: number = 0;
- public y: number = 0;
- public x: number = 0;
- public scrollBottom: number;
- public scrollTop: number;
- // TODO: Type me
- public tabs: any;
- public savedY: number = 0;
- public savedX: number = 0;
- public savedCurAttrData = DEFAULT_ATTR_DATA.clone();
- public savedCharset: ICharset | undefined = DEFAULT_CHARSET;
- public markers: Marker[] = [];
- private _nullCell: ICellData = CellData.fromCharData([0, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE]);
- private _whitespaceCell: ICellData = CellData.fromCharData([0, WHITESPACE_CELL_CHAR, WHITESPACE_CELL_WIDTH, WHITESPACE_CELL_CODE]);
- private _cols: number;
- private _rows: number;
- private _isClearing: boolean = false;
-
- constructor(
- private _hasScrollback: boolean,
- private _optionsService: IOptionsService,
- private _bufferService: IBufferService
- ) {
- this._cols = this._bufferService.cols;
- this._rows = this._bufferService.rows;
- this.lines = new CircularList<IBufferLine>(this._getCorrectBufferLength(this._rows));
- this.scrollTop = 0;
- this.scrollBottom = this._rows - 1;
- this.setupTabStops();
- }
-
- public getNullCell(attr?: IAttributeData): ICellData {
- if (attr) {
- this._nullCell.fg = attr.fg;
- this._nullCell.bg = attr.bg;
- this._nullCell.extended = attr.extended;
- } else {
- this._nullCell.fg = 0;
- this._nullCell.bg = 0;
- this._nullCell.extended = new ExtendedAttrs();
- }
- return this._nullCell;
- }
-
- public getWhitespaceCell(attr?: IAttributeData): ICellData {
- if (attr) {
- this._whitespaceCell.fg = attr.fg;
- this._whitespaceCell.bg = attr.bg;
- this._whitespaceCell.extended = attr.extended;
- } else {
- this._whitespaceCell.fg = 0;
- this._whitespaceCell.bg = 0;
- this._whitespaceCell.extended = new ExtendedAttrs();
- }
- return this._whitespaceCell;
- }
-
- public getBlankLine(attr: IAttributeData, isWrapped?: boolean): IBufferLine {
- return new BufferLine(this._bufferService.cols, this.getNullCell(attr), isWrapped);
- }
-
- public get hasScrollback(): boolean {
- return this._hasScrollback && this.lines.maxLength > this._rows;
- }
-
- public get isCursorInViewport(): boolean {
- const absoluteY = this.ybase + this.y;
- const relativeY = absoluteY - this.ydisp;
- return (relativeY >= 0 && relativeY < this._rows);
- }
-
- /**
- * Gets the correct buffer length based on the rows provided, the terminal's
- * scrollback and whether this buffer is flagged to have scrollback or not.
- * @param rows The terminal rows to use in the calculation.
- */
- private _getCorrectBufferLength(rows: number): number {
- if (!this._hasScrollback) {
- return rows;
- }
-
- const correctBufferLength = rows + this._optionsService.rawOptions.scrollback;
-
- return correctBufferLength > MAX_BUFFER_SIZE ? MAX_BUFFER_SIZE : correctBufferLength;
- }
-
- /**
- * Fills the buffer's viewport with blank lines.
- */
- public fillViewportRows(fillAttr?: IAttributeData): void {
- if (this.lines.length === 0) {
- if (fillAttr === undefined) {
- fillAttr = DEFAULT_ATTR_DATA;
- }
- let i = this._rows;
- while (i--) {
- this.lines.push(this.getBlankLine(fillAttr));
- }
- }
- }
-
- /**
- * Clears the buffer to it's initial state, discarding all previous data.
- */
- public clear(): void {
- this.ydisp = 0;
- this.ybase = 0;
- this.y = 0;
- this.x = 0;
- this.lines = new CircularList<IBufferLine>(this._getCorrectBufferLength(this._rows));
- this.scrollTop = 0;
- this.scrollBottom = this._rows - 1;
- this.setupTabStops();
- }
-
- /**
- * Resizes the buffer, adjusting its data accordingly.
- * @param newCols The new number of columns.
- * @param newRows The new number of rows.
- */
- public resize(newCols: number, newRows: number): void {
- // store reference to null cell with default attrs
- const nullCell = this.getNullCell(DEFAULT_ATTR_DATA);
-
- // Increase max length if needed before adjustments to allow space to fill
- // as required.
- const newMaxLength = this._getCorrectBufferLength(newRows);
- if (newMaxLength > this.lines.maxLength) {
- this.lines.maxLength = newMaxLength;
- }
-
- // The following adjustments should only happen if the buffer has been
- // initialized/filled.
- if (this.lines.length > 0) {
- // Deal with columns increasing (reducing needs to happen after reflow)
- if (this._cols < newCols) {
- for (let i = 0; i < this.lines.length; i++) {
- this.lines.get(i)!.resize(newCols, nullCell);
- }
- }
-
- // Resize rows in both directions as needed
- let addToY = 0;
- if (this._rows < newRows) {
- for (let y = this._rows; y < newRows; y++) {
- if (this.lines.length < newRows + this.ybase) {
- if (this._optionsService.rawOptions.windowsMode) {
- // Just add the new missing rows on Windows as conpty reprints the screen with it's
- // view of the world. Once a line enters scrollback for conpty it remains there
- this.lines.push(new BufferLine(newCols, nullCell));
- } else {
- if (this.ybase > 0 && this.lines.length <= this.ybase + this.y + addToY + 1) {
- // There is room above the buffer and there are no empty elements below the line,
- // scroll up
- this.ybase--;
- addToY++;
- if (this.ydisp > 0) {
- // Viewport is at the top of the buffer, must increase downwards
- this.ydisp--;
- }
- } else {
- // Add a blank line if there is no buffer left at the top to scroll to, or if there
- // are blank lines after the cursor
- this.lines.push(new BufferLine(newCols, nullCell));
- }
- }
- }
- }
- } else { // (this._rows >= newRows)
- for (let y = this._rows; y > newRows; y--) {
- if (this.lines.length > newRows + this.ybase) {
- if (this.lines.length > this.ybase + this.y + 1) {
- // The line is a blank line below the cursor, remove it
- this.lines.pop();
- } else {
- // The line is the cursor, scroll down
- this.ybase++;
- this.ydisp++;
- }
- }
- }
- }
-
- // Reduce max length if needed after adjustments, this is done after as it
- // would otherwise cut data from the bottom of the buffer.
- if (newMaxLength < this.lines.maxLength) {
- // Trim from the top of the buffer and adjust ybase and ydisp.
- const amountToTrim = this.lines.length - newMaxLength;
- if (amountToTrim > 0) {
- this.lines.trimStart(amountToTrim);
- this.ybase = Math.max(this.ybase - amountToTrim, 0);
- this.ydisp = Math.max(this.ydisp - amountToTrim, 0);
- this.savedY = Math.max(this.savedY - amountToTrim, 0);
- }
- this.lines.maxLength = newMaxLength;
- }
-
- // Make sure that the cursor stays on screen
- this.x = Math.min(this.x, newCols - 1);
- this.y = Math.min(this.y, newRows - 1);
- if (addToY) {
- this.y += addToY;
- }
- this.savedX = Math.min(this.savedX, newCols - 1);
-
- this.scrollTop = 0;
- }
-
- this.scrollBottom = newRows - 1;
-
- if (this._isReflowEnabled) {
- this._reflow(newCols, newRows);
-
- // Trim the end of the line off if cols shrunk
- if (this._cols > newCols) {
- for (let i = 0; i < this.lines.length; i++) {
- this.lines.get(i)!.resize(newCols, nullCell);
- }
- }
- }
-
- this._cols = newCols;
- this._rows = newRows;
- }
-
- private get _isReflowEnabled(): boolean {
- return this._hasScrollback && !this._optionsService.rawOptions.windowsMode;
- }
-
- private _reflow(newCols: number, newRows: number): void {
- if (this._cols === newCols) {
- return;
- }
-
- // Iterate through rows, ignore the last one as it cannot be wrapped
- if (newCols > this._cols) {
- this._reflowLarger(newCols, newRows);
- } else {
- this._reflowSmaller(newCols, newRows);
- }
- }
-
- private _reflowLarger(newCols: number, newRows: number): void {
- const toRemove: number[] = reflowLargerGetLinesToRemove(this.lines, this._cols, newCols, this.ybase + this.y, this.getNullCell(DEFAULT_ATTR_DATA));
- if (toRemove.length > 0) {
- const newLayoutResult = reflowLargerCreateNewLayout(this.lines, toRemove);
- reflowLargerApplyNewLayout(this.lines, newLayoutResult.layout);
- this._reflowLargerAdjustViewport(newCols, newRows, newLayoutResult.countRemoved);
- }
- }
-
- private _reflowLargerAdjustViewport(newCols: number, newRows: number, countRemoved: number): void {
- const nullCell = this.getNullCell(DEFAULT_ATTR_DATA);
- // Adjust viewport based on number of items removed
- let viewportAdjustments = countRemoved;
- while (viewportAdjustments-- > 0) {
- if (this.ybase === 0) {
- if (this.y > 0) {
- this.y--;
- }
- if (this.lines.length < newRows) {
- // Add an extra row at the bottom of the viewport
- this.lines.push(new BufferLine(newCols, nullCell));
- }
- } else {
- if (this.ydisp === this.ybase) {
- this.ydisp--;
- }
- this.ybase--;
- }
- }
- this.savedY = Math.max(this.savedY - countRemoved, 0);
- }
-
- private _reflowSmaller(newCols: number, newRows: number): void {
- const nullCell = this.getNullCell(DEFAULT_ATTR_DATA);
- // Gather all BufferLines that need to be inserted into the Buffer here so that they can be
- // batched up and only committed once
- const toInsert = [];
- let countToInsert = 0;
- // Go backwards as many lines may be trimmed and this will avoid considering them
- for (let y = this.lines.length - 1; y >= 0; y--) {
- // Check whether this line is a problem
- let nextLine = this.lines.get(y) as BufferLine;
- if (!nextLine || !nextLine.isWrapped && nextLine.getTrimmedLength() <= newCols) {
- continue;
- }
-
- // Gather wrapped lines and adjust y to be the starting line
- const wrappedLines: BufferLine[] = [nextLine];
- while (nextLine.isWrapped && y > 0) {
- nextLine = this.lines.get(--y) as BufferLine;
- wrappedLines.unshift(nextLine);
- }
-
- // If these lines contain the cursor don't touch them, the program will handle fixing up
- // wrapped lines with the cursor
- const absoluteY = this.ybase + this.y;
- if (absoluteY >= y && absoluteY < y + wrappedLines.length) {
- continue;
- }
-
- const lastLineLength = wrappedLines[wrappedLines.length - 1].getTrimmedLength();
- const destLineLengths = reflowSmallerGetNewLineLengths(wrappedLines, this._cols, newCols);
- const linesToAdd = destLineLengths.length - wrappedLines.length;
- let trimmedLines: number;
- if (this.ybase === 0 && this.y !== this.lines.length - 1) {
- // If the top section of the buffer is not yet filled
- trimmedLines = Math.max(0, this.y - this.lines.maxLength + linesToAdd);
- } else {
- trimmedLines = Math.max(0, this.lines.length - this.lines.maxLength + linesToAdd);
- }
-
- // Add the new lines
- const newLines: BufferLine[] = [];
- for (let i = 0; i < linesToAdd; i++) {
- const newLine = this.getBlankLine(DEFAULT_ATTR_DATA, true) as BufferLine;
- newLines.push(newLine);
- }
- if (newLines.length > 0) {
- toInsert.push({
- // countToInsert here gets the actual index, taking into account other inserted items.
- // using this we can iterate through the list forwards
- start: y + wrappedLines.length + countToInsert,
- newLines
- });
- countToInsert += newLines.length;
- }
- wrappedLines.push(...newLines);
-
- // Copy buffer data to new locations, this needs to happen backwards to do in-place
- let destLineIndex = destLineLengths.length - 1; // Math.floor(cellsNeeded / newCols);
- let destCol = destLineLengths[destLineIndex]; // cellsNeeded % newCols;
- if (destCol === 0) {
- destLineIndex--;
- destCol = destLineLengths[destLineIndex];
- }
- let srcLineIndex = wrappedLines.length - linesToAdd - 1;
- let srcCol = lastLineLength;
- while (srcLineIndex >= 0) {
- const cellsToCopy = Math.min(srcCol, destCol);
- if (wrappedLines[destLineIndex] === undefined) {
- // Sanity check that the line exists, this has been known to fail for an unknown reason
- // which would stop the reflow from happening if an exception would throw.
- break;
- }
- wrappedLines[destLineIndex].copyCellsFrom(wrappedLines[srcLineIndex], srcCol - cellsToCopy, destCol - cellsToCopy, cellsToCopy, true);
- destCol -= cellsToCopy;
- if (destCol === 0) {
- destLineIndex--;
- destCol = destLineLengths[destLineIndex];
- }
- srcCol -= cellsToCopy;
- if (srcCol === 0) {
- srcLineIndex--;
- const wrappedLinesIndex = Math.max(srcLineIndex, 0);
- srcCol = getWrappedLineTrimmedLength(wrappedLines, wrappedLinesIndex, this._cols);
- }
- }
-
- // Null out the end of the line ends if a wide character wrapped to the following line
- for (let i = 0; i < wrappedLines.length; i++) {
- if (destLineLengths[i] < newCols) {
- wrappedLines[i].setCell(destLineLengths[i], nullCell);
- }
- }
-
- // Adjust viewport as needed
- let viewportAdjustments = linesToAdd - trimmedLines;
- while (viewportAdjustments-- > 0) {
- if (this.ybase === 0) {
- if (this.y < newRows - 1) {
- this.y++;
- this.lines.pop();
- } else {
- this.ybase++;
- this.ydisp++;
- }
- } else {
- // Ensure ybase does not exceed its maximum value
- if (this.ybase < Math.min(this.lines.maxLength, this.lines.length + countToInsert) - newRows) {
- if (this.ybase === this.ydisp) {
- this.ydisp++;
- }
- this.ybase++;
- }
- }
- }
- this.savedY = Math.min(this.savedY + linesToAdd, this.ybase + newRows - 1);
- }
-
- // Rearrange lines in the buffer if there are any insertions, this is done at the end rather
- // than earlier so that it's a single O(n) pass through the buffer, instead of O(n^2) from many
- // costly calls to CircularList.splice.
- if (toInsert.length > 0) {
- // Record buffer insert events and then play them back backwards so that the indexes are
- // correct
- const insertEvents: IInsertEvent[] = [];
-
- // Record original lines so they don't get overridden when we rearrange the list
- const originalLines: BufferLine[] = [];
- for (let i = 0; i < this.lines.length; i++) {
- originalLines.push(this.lines.get(i) as BufferLine);
- }
- const originalLinesLength = this.lines.length;
-
- let originalLineIndex = originalLinesLength - 1;
- let nextToInsertIndex = 0;
- let nextToInsert = toInsert[nextToInsertIndex];
- this.lines.length = Math.min(this.lines.maxLength, this.lines.length + countToInsert);
- let countInsertedSoFar = 0;
- for (let i = Math.min(this.lines.maxLength - 1, originalLinesLength + countToInsert - 1); i >= 0; i--) {
- if (nextToInsert && nextToInsert.start > originalLineIndex + countInsertedSoFar) {
- // Insert extra lines here, adjusting i as needed
- for (let nextI = nextToInsert.newLines.length - 1; nextI >= 0; nextI--) {
- this.lines.set(i--, nextToInsert.newLines[nextI]);
- }
- i++;
-
- // Create insert events for later
- insertEvents.push({
- index: originalLineIndex + 1,
- amount: nextToInsert.newLines.length
- });
-
- countInsertedSoFar += nextToInsert.newLines.length;
- nextToInsert = toInsert[++nextToInsertIndex];
- } else {
- this.lines.set(i, originalLines[originalLineIndex--]);
- }
- }
-
- // Update markers
- let insertCountEmitted = 0;
- for (let i = insertEvents.length - 1; i >= 0; i--) {
- insertEvents[i].index += insertCountEmitted;
- this.lines.onInsertEmitter.fire(insertEvents[i]);
- insertCountEmitted += insertEvents[i].amount;
- }
- const amountToTrim = Math.max(0, originalLinesLength + countToInsert - this.lines.maxLength);
- if (amountToTrim > 0) {
- this.lines.onTrimEmitter.fire(amountToTrim);
- }
- }
- }
-
- // private _reflowSmallerGetLinesNeeded()
-
- /**
- * Translates a string index back to a BufferIndex.
- * To get the correct buffer position the string must start at `startCol` 0
- * (default in translateBufferLineToString).
- * The method also works on wrapped line strings given rows were not trimmed.
- * The method operates on the CharData string length, there are no
- * additional content or boundary checks. Therefore the string and the buffer
- * should not be altered in between.
- * TODO: respect trim flag after fixing #1685
- * @param lineIndex line index the string was retrieved from
- * @param stringIndex index within the string
- * @param startCol column offset the string was retrieved from
- */
- public stringIndexToBufferIndex(lineIndex: number, stringIndex: number, trimRight: boolean = false): BufferIndex {
- while (stringIndex) {
- const line = this.lines.get(lineIndex);
- if (!line) {
- return [-1, -1];
- }
- const length = (trimRight) ? line.getTrimmedLength() : line.length;
- for (let i = 0; i < length; ++i) {
- if (line.get(i)[CHAR_DATA_WIDTH_INDEX]) {
- // empty cells report a string length of 0, but get replaced
- // with a whitespace in translateToString, thus replace with 1
- stringIndex -= line.get(i)[CHAR_DATA_CHAR_INDEX].length || 1;
- }
- if (stringIndex < 0) {
- return [lineIndex, i];
- }
- }
- lineIndex++;
- }
- return [lineIndex, 0];
- }
-
- /**
- * Translates a buffer line to a string, with optional start and end columns.
- * Wide characters will count as two columns in the resulting string. This
- * function is useful for getting the actual text underneath the raw selection
- * position.
- * @param line The line being translated.
- * @param trimRight Whether to trim whitespace to the right.
- * @param startCol The column to start at.
- * @param endCol The column to end at.
- */
- public translateBufferLineToString(lineIndex: number, trimRight: boolean, startCol: number = 0, endCol?: number): string {
- const line = this.lines.get(lineIndex);
- if (!line) {
- return '';
- }
- return line.translateToString(trimRight, startCol, endCol);
- }
-
- public getWrappedRangeForLine(y: number): { first: number, last: number } {
- let first = y;
- let last = y;
- // Scan upwards for wrapped lines
- while (first > 0 && this.lines.get(first)!.isWrapped) {
- first--;
- }
- // Scan downwards for wrapped lines
- while (last + 1 < this.lines.length && this.lines.get(last + 1)!.isWrapped) {
- last++;
- }
- return { first, last };
- }
-
- /**
- * Setup the tab stops.
- * @param i The index to start setting up tab stops from.
- */
- public setupTabStops(i?: number): void {
- if (i !== null && i !== undefined) {
- if (!this.tabs[i]) {
- i = this.prevStop(i);
- }
- } else {
- this.tabs = {};
- i = 0;
- }
-
- for (; i < this._cols; i += this._optionsService.rawOptions.tabStopWidth) {
- this.tabs[i] = true;
- }
- }
-
- /**
- * Move the cursor to the previous tab stop from the given position (default is current).
- * @param x The position to move the cursor to the previous tab stop.
- */
- public prevStop(x?: number): number {
- if (x === null || x === undefined) {
- x = this.x;
- }
- while (!this.tabs[--x] && x > 0);
- return x >= this._cols ? this._cols - 1 : x < 0 ? 0 : x;
- }
-
- /**
- * Move the cursor one tab stop forward from the given position (default is current).
- * @param x The position to move the cursor one tab stop forward.
- */
- public nextStop(x?: number): number {
- if (x === null || x === undefined) {
- x = this.x;
- }
- while (!this.tabs[++x] && x < this._cols);
- return x >= this._cols ? this._cols - 1 : x < 0 ? 0 : x;
- }
-
- public clearMarkers(y?: number): void {
- this._isClearing = true;
- if (y !== undefined) {
- for (let i = 0; i < this.markers.length; i++) {
- if (this.markers[i].line === y) {
- this.markers[i].dispose();
- this.markers.splice(i--, 1);
- }
- }
- } else {
- for (const marker of this.markers) {
- marker.dispose();
- }
- this.markers = [];
- }
- this._isClearing = false;
- }
-
- public addMarker(y: number): Marker {
- const marker = new Marker(y);
- this.markers.push(marker);
- marker.register(this.lines.onTrim(amount => {
- marker.line -= amount;
- // The marker should be disposed when the line is trimmed from the buffer
- if (marker.line < 0) {
- marker.dispose();
- }
- }));
- marker.register(this.lines.onInsert(event => {
- if (marker.line >= event.index) {
- marker.line += event.amount;
- }
- }));
- marker.register(this.lines.onDelete(event => {
- // Delete the marker if it's within the range
- if (marker.line >= event.index && marker.line < event.index + event.amount) {
- marker.dispose();
- }
-
- // Shift the marker if it's after the deleted range
- if (marker.line > event.index) {
- marker.line -= event.amount;
- }
- }));
- marker.register(marker.onDispose(() => this._removeMarker(marker)));
- return marker;
- }
-
- private _removeMarker(marker: Marker): void {
- if (!this._isClearing) {
- this.markers.splice(this.markers.indexOf(marker), 1);
- }
- }
-
- public iterator(trimRight: boolean, startIndex?: number, endIndex?: number, startOverscan?: number, endOverscan?: number): IBufferStringIterator {
- return new BufferStringIterator(this, trimRight, startIndex, endIndex, startOverscan, endOverscan);
- }
-}
-
-/**
- * Iterator to get unwrapped content strings from the buffer.
- * The iterator returns at least the string data between the borders
- * `startIndex` and `endIndex` (exclusive) and will expand the lines
- * by `startOverscan` to the top and by `endOverscan` to the bottom,
- * if no new line was found in between.
- * It will never read/return string data beyond `startIndex - startOverscan`
- * or `endIndex + endOverscan`. Therefore the first and last line might be truncated.
- * It is possible to always get the full string for the first and last line as well
- * by setting the overscan values to the actual buffer length. This not recommended
- * since it might return the whole buffer within a single string in a worst case scenario.
- */
-export class BufferStringIterator implements IBufferStringIterator {
- private _current: number;
-
- constructor (
- private _buffer: IBuffer,
- private _trimRight: boolean,
- private _startIndex: number = 0,
- private _endIndex: number = _buffer.lines.length,
- private _startOverscan: number = 0,
- private _endOverscan: number = 0
- ) {
- if (this._startIndex < 0) {
- this._startIndex = 0;
- }
- if (this._endIndex > this._buffer.lines.length) {
- this._endIndex = this._buffer.lines.length;
- }
- this._current = this._startIndex;
- }
-
- public hasNext(): boolean {
- return this._current < this._endIndex;
- }
-
- public next(): IBufferStringIteratorResult {
- const range = this._buffer.getWrappedRangeForLine(this._current);
- // limit search window to overscan value at both borders
- if (range.first < this._startIndex - this._startOverscan) {
- range.first = this._startIndex - this._startOverscan;
- }
- if (range.last > this._endIndex + this._endOverscan) {
- range.last = this._endIndex + this._endOverscan;
- }
- // limit to current buffer length
- range.first = Math.max(range.first, 0);
- range.last = Math.min(range.last, this._buffer.lines.length);
- let content = '';
- for (let i = range.first; i <= range.last; ++i) {
- content += this._buffer.translateBufferLineToString(i, this._trimRight);
- }
- this._current = range.last + 1;
- return { range, content };
- }
-}
diff --git a/node_modules/xterm/src/common/buffer/BufferLine.ts b/node_modules/xterm/src/common/buffer/BufferLine.ts
deleted file mode 100644
index f0bf4fc..0000000
--- a/node_modules/xterm/src/common/buffer/BufferLine.ts
+++ /dev/null
@@ -1,441 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { CharData, IBufferLine, ICellData, IAttributeData, IExtendedAttrs } from 'common/Types';
-import { stringFromCodePoint } from 'common/input/TextDecoder';
-import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_ATTR_INDEX, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE, WHITESPACE_CELL_CHAR, Content, BgFlags } from 'common/buffer/Constants';
-import { CellData } from 'common/buffer/CellData';
-import { AttributeData, ExtendedAttrs } from 'common/buffer/AttributeData';
-
-/**
- * buffer memory layout:
- *
- * | uint32_t | uint32_t | uint32_t |
- * | `content` | `FG` | `BG` |
- * | wcwidth(2) comb(1) codepoint(21) | flags(8) R(8) G(8) B(8) | flags(8) R(8) G(8) B(8) |
- */
-
-
-/** typed array slots taken by one cell */
-const CELL_SIZE = 3;
-
-/**
- * Cell member indices.
- *
- * Direct access:
- * `content = data[column * CELL_SIZE + Cell.CONTENT];`
- * `fg = data[column * CELL_SIZE + Cell.FG];`
- * `bg = data[column * CELL_SIZE + Cell.BG];`
- */
-const enum Cell {
- CONTENT = 0,
- FG = 1, // currently simply holds all known attrs
- BG = 2 // currently unused
-}
-
-export const DEFAULT_ATTR_DATA = Object.freeze(new AttributeData());
-
-/**
- * Typed array based bufferline implementation.
- *
- * There are 2 ways to insert data into the cell buffer:
- * - `setCellFromCodepoint` + `addCodepointToCell`
- * Use these for data that is already UTF32.
- * Used during normal input in `InputHandler` for faster buffer access.
- * - `setCell`
- * This method takes a CellData object and stores the data in the buffer.
- * Use `CellData.fromCharData` to create the CellData object (e.g. from JS string).
- *
- * To retrieve data from the buffer use either one of the primitive methods
- * (if only one particular value is needed) or `loadCell`. For `loadCell` in a loop
- * memory allocs / GC pressure can be greatly reduced by reusing the CellData object.
- */
-export class BufferLine implements IBufferLine {
- protected _data: Uint32Array;
- protected _combined: {[index: number]: string} = {};
- protected _extendedAttrs: {[index: number]: ExtendedAttrs} = {};
- public length: number;
-
- constructor(cols: number, fillCellData?: ICellData, public isWrapped: boolean = false) {
- this._data = new Uint32Array(cols * CELL_SIZE);
- const cell = fillCellData || CellData.fromCharData([0, NULL_CELL_CHAR, NULL_CELL_WIDTH, NULL_CELL_CODE]);
- for (let i = 0; i < cols; ++i) {
- this.setCell(i, cell);
- }
- this.length = cols;
- }
-
- /**
- * Get cell data CharData.
- * @deprecated
- */
- public get(index: number): CharData {
- const content = this._data[index * CELL_SIZE + Cell.CONTENT];
- const cp = content & Content.CODEPOINT_MASK;
- return [
- this._data[index * CELL_SIZE + Cell.FG],
- (content & Content.IS_COMBINED_MASK)
- ? this._combined[index]
- : (cp) ? stringFromCodePoint(cp) : '',
- content >> Content.WIDTH_SHIFT,
- (content & Content.IS_COMBINED_MASK)
- ? this._combined[index].charCodeAt(this._combined[index].length - 1)
- : cp
- ];
- }
-
- /**
- * Set cell data from CharData.
- * @deprecated
- */
- public set(index: number, value: CharData): void {
- this._data[index * CELL_SIZE + Cell.FG] = value[CHAR_DATA_ATTR_INDEX];
- if (value[CHAR_DATA_CHAR_INDEX].length > 1) {
- this._combined[index] = value[1];
- this._data[index * CELL_SIZE + Cell.CONTENT] = index | Content.IS_COMBINED_MASK | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);
- } else {
- this._data[index * CELL_SIZE + Cell.CONTENT] = value[CHAR_DATA_CHAR_INDEX].charCodeAt(0) | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);
- }
- }
-
- /**
- * primitive getters
- * use these when only one value is needed, otherwise use `loadCell`
- */
- public getWidth(index: number): number {
- return this._data[index * CELL_SIZE + Cell.CONTENT] >> Content.WIDTH_SHIFT;
- }
-
- /** Test whether content has width. */
- public hasWidth(index: number): number {
- return this._data[index * CELL_SIZE + Cell.CONTENT] & Content.WIDTH_MASK;
- }
-
- /** Get FG cell component. */
- public getFg(index: number): number {
- return this._data[index * CELL_SIZE + Cell.FG];
- }
-
- /** Get BG cell component. */
- public getBg(index: number): number {
- return this._data[index * CELL_SIZE + Cell.BG];
- }
-
- /**
- * Test whether contains any chars.
- * Basically an empty has no content, but other cells might differ in FG/BG
- * from real empty cells.
- * */
- public hasContent(index: number): number {
- return this._data[index * CELL_SIZE + Cell.CONTENT] & Content.HAS_CONTENT_MASK;
- }
-
- /**
- * Get codepoint of the cell.
- * To be in line with `code` in CharData this either returns
- * a single UTF32 codepoint or the last codepoint of a combined string.
- */
- public getCodePoint(index: number): number {
- const content = this._data[index * CELL_SIZE + Cell.CONTENT];
- if (content & Content.IS_COMBINED_MASK) {
- return this._combined[index].charCodeAt(this._combined[index].length - 1);
- }
- return content & Content.CODEPOINT_MASK;
- }
-
- /** Test whether the cell contains a combined string. */
- public isCombined(index: number): number {
- return this._data[index * CELL_SIZE + Cell.CONTENT] & Content.IS_COMBINED_MASK;
- }
-
- /** Returns the string content of the cell. */
- public getString(index: number): string {
- const content = this._data[index * CELL_SIZE + Cell.CONTENT];
- if (content & Content.IS_COMBINED_MASK) {
- return this._combined[index];
- }
- if (content & Content.CODEPOINT_MASK) {
- return stringFromCodePoint(content & Content.CODEPOINT_MASK);
- }
- // return empty string for empty cells
- return '';
- }
-
- /**
- * Load data at `index` into `cell`. This is used to access cells in a way that's more friendly
- * to GC as it significantly reduced the amount of new objects/references needed.
- */
- public loadCell(index: number, cell: ICellData): ICellData {
- const startIndex = index * CELL_SIZE;
- cell.content = this._data[startIndex + Cell.CONTENT];
- cell.fg = this._data[startIndex + Cell.FG];
- cell.bg = this._data[startIndex + Cell.BG];
- if (cell.content & Content.IS_COMBINED_MASK) {
- cell.combinedData = this._combined[index];
- }
- if (cell.bg & BgFlags.HAS_EXTENDED) {
- cell.extended = this._extendedAttrs[index];
- }
- return cell;
- }
-
- /**
- * Set data at `index` to `cell`.
- */
- public setCell(index: number, cell: ICellData): void {
- if (cell.content & Content.IS_COMBINED_MASK) {
- this._combined[index] = cell.combinedData;
- }
- if (cell.bg & BgFlags.HAS_EXTENDED) {
- this._extendedAttrs[index] = cell.extended;
- }
- this._data[index * CELL_SIZE + Cell.CONTENT] = cell.content;
- this._data[index * CELL_SIZE + Cell.FG] = cell.fg;
- this._data[index * CELL_SIZE + Cell.BG] = cell.bg;
- }
-
- /**
- * Set cell data from input handler.
- * Since the input handler see the incoming chars as UTF32 codepoints,
- * it gets an optimized access method.
- */
- public setCellFromCodePoint(index: number, codePoint: number, width: number, fg: number, bg: number, eAttrs: IExtendedAttrs): void {
- if (bg & BgFlags.HAS_EXTENDED) {
- this._extendedAttrs[index] = eAttrs;
- }
- this._data[index * CELL_SIZE + Cell.CONTENT] = codePoint | (width << Content.WIDTH_SHIFT);
- this._data[index * CELL_SIZE + Cell.FG] = fg;
- this._data[index * CELL_SIZE + Cell.BG] = bg;
- }
-
- /**
- * Add a codepoint to a cell from input handler.
- * During input stage combining chars with a width of 0 follow and stack
- * onto a leading char. Since we already set the attrs
- * by the previous `setDataFromCodePoint` call, we can omit it here.
- */
- public addCodepointToCell(index: number, codePoint: number): void {
- let content = this._data[index * CELL_SIZE + Cell.CONTENT];
- if (content & Content.IS_COMBINED_MASK) {
- // we already have a combined string, simply add
- this._combined[index] += stringFromCodePoint(codePoint);
- } else {
- if (content & Content.CODEPOINT_MASK) {
- // normal case for combining chars:
- // - move current leading char + new one into combined string
- // - set combined flag
- this._combined[index] = stringFromCodePoint(content & Content.CODEPOINT_MASK) + stringFromCodePoint(codePoint);
- content &= ~Content.CODEPOINT_MASK; // set codepoint in buffer to 0
- content |= Content.IS_COMBINED_MASK;
- } else {
- // should not happen - we actually have no data in the cell yet
- // simply set the data in the cell buffer with a width of 1
- content = codePoint | (1 << Content.WIDTH_SHIFT);
- }
- this._data[index * CELL_SIZE + Cell.CONTENT] = content;
- }
- }
-
- public insertCells(pos: number, n: number, fillCellData: ICellData, eraseAttr?: IAttributeData): void {
- pos %= this.length;
-
- // handle fullwidth at pos: reset cell one to the left if pos is second cell of a wide char
- if (pos && this.getWidth(pos - 1) === 2) {
- this.setCellFromCodePoint(pos - 1, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());
- }
-
- if (n < this.length - pos) {
- const cell = new CellData();
- for (let i = this.length - pos - n - 1; i >= 0; --i) {
- this.setCell(pos + n + i, this.loadCell(pos + i, cell));
- }
- for (let i = 0; i < n; ++i) {
- this.setCell(pos + i, fillCellData);
- }
- } else {
- for (let i = pos; i < this.length; ++i) {
- this.setCell(i, fillCellData);
- }
- }
-
- // handle fullwidth at line end: reset last cell if it is first cell of a wide char
- if (this.getWidth(this.length - 1) === 2) {
- this.setCellFromCodePoint(this.length - 1, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());
- }
- }
-
- public deleteCells(pos: number, n: number, fillCellData: ICellData, eraseAttr?: IAttributeData): void {
- pos %= this.length;
- if (n < this.length - pos) {
- const cell = new CellData();
- for (let i = 0; i < this.length - pos - n; ++i) {
- this.setCell(pos + i, this.loadCell(pos + n + i, cell));
- }
- for (let i = this.length - n; i < this.length; ++i) {
- this.setCell(i, fillCellData);
- }
- } else {
- for (let i = pos; i < this.length; ++i) {
- this.setCell(i, fillCellData);
- }
- }
-
- // handle fullwidth at pos:
- // - reset pos-1 if wide char
- // - reset pos if width==0 (previous second cell of a wide char)
- if (pos && this.getWidth(pos - 1) === 2) {
- this.setCellFromCodePoint(pos - 1, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());
- }
- if (this.getWidth(pos) === 0 && !this.hasContent(pos)) {
- this.setCellFromCodePoint(pos, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());
- }
- }
-
- public replaceCells(start: number, end: number, fillCellData: ICellData, eraseAttr?: IAttributeData): void {
- // handle fullwidth at start: reset cell one to the left if start is second cell of a wide char
- if (start && this.getWidth(start - 1) === 2) {
- this.setCellFromCodePoint(start - 1, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());
- }
- // handle fullwidth at last cell + 1: reset to empty cell if it is second part of a wide char
- if (end < this.length && this.getWidth(end - 1) === 2) {
- this.setCellFromCodePoint(end, 0, 1, eraseAttr?.fg || 0, eraseAttr?.bg || 0, eraseAttr?.extended || new ExtendedAttrs());
- }
-
- while (start < end && start < this.length) {
- this.setCell(start++, fillCellData);
- }
- }
-
- public resize(cols: number, fillCellData: ICellData): void {
- if (cols === this.length) {
- return;
- }
- if (cols > this.length) {
- const data = new Uint32Array(cols * CELL_SIZE);
- if (this.length) {
- if (cols * CELL_SIZE < this._data.length) {
- data.set(this._data.subarray(0, cols * CELL_SIZE));
- } else {
- data.set(this._data);
- }
- }
- this._data = data;
- for (let i = this.length; i < cols; ++i) {
- this.setCell(i, fillCellData);
- }
- } else {
- if (cols) {
- const data = new Uint32Array(cols * CELL_SIZE);
- data.set(this._data.subarray(0, cols * CELL_SIZE));
- this._data = data;
- // Remove any cut off combined data, FIXME: repeat this for extended attrs
- const keys = Object.keys(this._combined);
- for (let i = 0; i < keys.length; i++) {
- const key = parseInt(keys[i], 10);
- if (key >= cols) {
- delete this._combined[key];
- }
- }
- } else {
- this._data = new Uint32Array(0);
- this._combined = {};
- }
- }
- this.length = cols;
- }
-
- /** fill a line with fillCharData */
- public fill(fillCellData: ICellData): void {
- this._combined = {};
- this._extendedAttrs = {};
- for (let i = 0; i < this.length; ++i) {
- this.setCell(i, fillCellData);
- }
- }
-
- /** alter to a full copy of line */
- public copyFrom(line: BufferLine): void {
- if (this.length !== line.length) {
- this._data = new Uint32Array(line._data);
- } else {
- // use high speed copy if lengths are equal
- this._data.set(line._data);
- }
- this.length = line.length;
- this._combined = {};
- for (const el in line._combined) {
- this._combined[el] = line._combined[el];
- }
- this._extendedAttrs = {};
- for (const el in line._extendedAttrs) {
- this._extendedAttrs[el] = line._extendedAttrs[el];
- }
- this.isWrapped = line.isWrapped;
- }
-
- /** create a new clone */
- public clone(): IBufferLine {
- const newLine = new BufferLine(0);
- newLine._data = new Uint32Array(this._data);
- newLine.length = this.length;
- for (const el in this._combined) {
- newLine._combined[el] = this._combined[el];
- }
- for (const el in this._extendedAttrs) {
- newLine._extendedAttrs[el] = this._extendedAttrs[el];
- }
- newLine.isWrapped = this.isWrapped;
- return newLine;
- }
-
- public getTrimmedLength(): number {
- for (let i = this.length - 1; i >= 0; --i) {
- if ((this._data[i * CELL_SIZE + Cell.CONTENT] & Content.HAS_CONTENT_MASK)) {
- return i + (this._data[i * CELL_SIZE + Cell.CONTENT] >> Content.WIDTH_SHIFT);
- }
- }
- return 0;
- }
-
- public copyCellsFrom(src: BufferLine, srcCol: number, destCol: number, length: number, applyInReverse: boolean): void {
- const srcData = src._data;
- if (applyInReverse) {
- for (let cell = length - 1; cell >= 0; cell--) {
- for (let i = 0; i < CELL_SIZE; i++) {
- this._data[(destCol + cell) * CELL_SIZE + i] = srcData[(srcCol + cell) * CELL_SIZE + i];
- }
- }
- } else {
- for (let cell = 0; cell < length; cell++) {
- for (let i = 0; i < CELL_SIZE; i++) {
- this._data[(destCol + cell) * CELL_SIZE + i] = srcData[(srcCol + cell) * CELL_SIZE + i];
- }
- }
- }
-
- // Move any combined data over as needed, FIXME: repeat for extended attrs
- const srcCombinedKeys = Object.keys(src._combined);
- for (let i = 0; i < srcCombinedKeys.length; i++) {
- const key = parseInt(srcCombinedKeys[i], 10);
- if (key >= srcCol) {
- this._combined[key - srcCol + destCol] = src._combined[key];
- }
- }
- }
-
- public translateToString(trimRight: boolean = false, startCol: number = 0, endCol: number = this.length): string {
- if (trimRight) {
- endCol = Math.min(endCol, this.getTrimmedLength());
- }
- let result = '';
- while (startCol < endCol) {
- const content = this._data[startCol * CELL_SIZE + Cell.CONTENT];
- const cp = content & Content.CODEPOINT_MASK;
- result += (content & Content.IS_COMBINED_MASK) ? this._combined[startCol] : (cp) ? stringFromCodePoint(cp) : WHITESPACE_CELL_CHAR;
- startCol += (content >> Content.WIDTH_SHIFT) || 1; // always advance by 1
- }
- return result;
- }
-}
diff --git a/node_modules/xterm/src/common/buffer/BufferRange.ts b/node_modules/xterm/src/common/buffer/BufferRange.ts
deleted file mode 100644
index a49cf48..0000000
--- a/node_modules/xterm/src/common/buffer/BufferRange.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-/**
- * Copyright (c) 2021 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBufferRange } from 'xterm';
-
-export function getRangeLength(range: IBufferRange, bufferCols: number): number {
- if (range.start.y > range.end.y) {
- throw new Error(`Buffer range end (${range.end.x}, ${range.end.y}) cannot be before start (${range.start.x}, ${range.start.y})`);
- }
- return bufferCols * (range.end.y - range.start.y) + (range.end.x - range.start.x + 1);
-}
diff --git a/node_modules/xterm/src/common/buffer/BufferReflow.ts b/node_modules/xterm/src/common/buffer/BufferReflow.ts
deleted file mode 100644
index ece9a96..0000000
--- a/node_modules/xterm/src/common/buffer/BufferReflow.ts
+++ /dev/null
@@ -1,220 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { BufferLine } from 'common/buffer/BufferLine';
-import { CircularList } from 'common/CircularList';
-import { IBufferLine, ICellData } from 'common/Types';
-
-export interface INewLayoutResult {
- layout: number[];
- countRemoved: number;
-}
-
-/**
- * Evaluates and returns indexes to be removed after a reflow larger occurs. Lines will be removed
- * when a wrapped line unwraps.
- * @param lines The buffer lines.
- * @param newCols The columns after resize.
- */
-export function reflowLargerGetLinesToRemove(lines: CircularList<IBufferLine>, oldCols: number, newCols: number, bufferAbsoluteY: number, nullCell: ICellData): number[] {
- // Gather all BufferLines that need to be removed from the Buffer here so that they can be
- // batched up and only committed once
- const toRemove: number[] = [];
-
- for (let y = 0; y < lines.length - 1; y++) {
- // Check if this row is wrapped
- let i = y;
- let nextLine = lines.get(++i) as BufferLine;
- if (!nextLine.isWrapped) {
- continue;
- }
-
- // Check how many lines it's wrapped for
- const wrappedLines: BufferLine[] = [lines.get(y) as BufferLine];
- while (i < lines.length && nextLine.isWrapped) {
- wrappedLines.push(nextLine);
- nextLine = lines.get(++i) as BufferLine;
- }
-
- // If these lines contain the cursor don't touch them, the program will handle fixing up wrapped
- // lines with the cursor
- if (bufferAbsoluteY >= y && bufferAbsoluteY < i) {
- y += wrappedLines.length - 1;
- continue;
- }
-
- // Copy buffer data to new locations
- let destLineIndex = 0;
- let destCol = getWrappedLineTrimmedLength(wrappedLines, destLineIndex, oldCols);
- let srcLineIndex = 1;
- let srcCol = 0;
- while (srcLineIndex < wrappedLines.length) {
- const srcTrimmedTineLength = getWrappedLineTrimmedLength(wrappedLines, srcLineIndex, oldCols);
- const srcRemainingCells = srcTrimmedTineLength - srcCol;
- const destRemainingCells = newCols - destCol;
- const cellsToCopy = Math.min(srcRemainingCells, destRemainingCells);
-
- wrappedLines[destLineIndex].copyCellsFrom(wrappedLines[srcLineIndex], srcCol, destCol, cellsToCopy, false);
-
- destCol += cellsToCopy;
- if (destCol === newCols) {
- destLineIndex++;
- destCol = 0;
- }
- srcCol += cellsToCopy;
- if (srcCol === srcTrimmedTineLength) {
- srcLineIndex++;
- srcCol = 0;
- }
-
- // Make sure the last cell isn't wide, if it is copy it to the current dest
- if (destCol === 0 && destLineIndex !== 0) {
- if (wrappedLines[destLineIndex - 1].getWidth(newCols - 1) === 2) {
- wrappedLines[destLineIndex].copyCellsFrom(wrappedLines[destLineIndex - 1], newCols - 1, destCol++, 1, false);
- // Null out the end of the last row
- wrappedLines[destLineIndex - 1].setCell(newCols - 1, nullCell);
- }
- }
- }
-
- // Clear out remaining cells or fragments could remain;
- wrappedLines[destLineIndex].replaceCells(destCol, newCols, nullCell);
-
- // Work backwards and remove any rows at the end that only contain null cells
- let countToRemove = 0;
- for (let i = wrappedLines.length - 1; i > 0; i--) {
- if (i > destLineIndex || wrappedLines[i].getTrimmedLength() === 0) {
- countToRemove++;
- } else {
- break;
- }
- }
-
- if (countToRemove > 0) {
- toRemove.push(y + wrappedLines.length - countToRemove); // index
- toRemove.push(countToRemove);
- }
-
- y += wrappedLines.length - 1;
- }
- return toRemove;
-}
-
-/**
- * Creates and return the new layout for lines given an array of indexes to be removed.
- * @param lines The buffer lines.
- * @param toRemove The indexes to remove.
- */
-export function reflowLargerCreateNewLayout(lines: CircularList<IBufferLine>, toRemove: number[]): INewLayoutResult {
- const layout: number[] = [];
- // First iterate through the list and get the actual indexes to use for rows
- let nextToRemoveIndex = 0;
- let nextToRemoveStart = toRemove[nextToRemoveIndex];
- let countRemovedSoFar = 0;
- for (let i = 0; i < lines.length; i++) {
- if (nextToRemoveStart === i) {
- const countToRemove = toRemove[++nextToRemoveIndex];
-
- // Tell markers that there was a deletion
- lines.onDeleteEmitter.fire({
- index: i - countRemovedSoFar,
- amount: countToRemove
- });
-
- i += countToRemove - 1;
- countRemovedSoFar += countToRemove;
- nextToRemoveStart = toRemove[++nextToRemoveIndex];
- } else {
- layout.push(i);
- }
- }
- return {
- layout,
- countRemoved: countRemovedSoFar
- };
-}
-
-/**
- * Applies a new layout to the buffer. This essentially does the same as many splice calls but it's
- * done all at once in a single iteration through the list since splice is very expensive.
- * @param lines The buffer lines.
- * @param newLayout The new layout to apply.
- */
-export function reflowLargerApplyNewLayout(lines: CircularList<IBufferLine>, newLayout: number[]): void {
- // Record original lines so they don't get overridden when we rearrange the list
- const newLayoutLines: BufferLine[] = [];
- for (let i = 0; i < newLayout.length; i++) {
- newLayoutLines.push(lines.get(newLayout[i]) as BufferLine);
- }
-
- // Rearrange the list
- for (let i = 0; i < newLayoutLines.length; i++) {
- lines.set(i, newLayoutLines[i]);
- }
- lines.length = newLayout.length;
-}
-
-/**
- * Gets the new line lengths for a given wrapped line. The purpose of this function it to pre-
- * compute the wrapping points since wide characters may need to be wrapped onto the following line.
- * This function will return an array of numbers of where each line wraps to, the resulting array
- * will only contain the values `newCols` (when the line does not end with a wide character) and
- * `newCols - 1` (when the line does end with a wide character), except for the last value which
- * will contain the remaining items to fill the line.
- *
- * Calling this with a `newCols` value of `1` will lock up.
- *
- * @param wrappedLines The wrapped lines to evaluate.
- * @param oldCols The columns before resize.
- * @param newCols The columns after resize.
- */
-export function reflowSmallerGetNewLineLengths(wrappedLines: BufferLine[], oldCols: number, newCols: number): number[] {
- const newLineLengths: number[] = [];
- const cellsNeeded = wrappedLines.map((l, i) => getWrappedLineTrimmedLength(wrappedLines, i, oldCols)).reduce((p, c) => p + c);
-
- // Use srcCol and srcLine to find the new wrapping point, use that to get the cellsAvailable and
- // linesNeeded
- let srcCol = 0;
- let srcLine = 0;
- let cellsAvailable = 0;
- while (cellsAvailable < cellsNeeded) {
- if (cellsNeeded - cellsAvailable < newCols) {
- // Add the final line and exit the loop
- newLineLengths.push(cellsNeeded - cellsAvailable);
- break;
- }
- srcCol += newCols;
- const oldTrimmedLength = getWrappedLineTrimmedLength(wrappedLines, srcLine, oldCols);
- if (srcCol > oldTrimmedLength) {
- srcCol -= oldTrimmedLength;
- srcLine++;
- }
- const endsWithWide = wrappedLines[srcLine].getWidth(srcCol - 1) === 2;
- if (endsWithWide) {
- srcCol--;
- }
- const lineLength = endsWithWide ? newCols - 1 : newCols;
- newLineLengths.push(lineLength);
- cellsAvailable += lineLength;
- }
-
- return newLineLengths;
-}
-
-export function getWrappedLineTrimmedLength(lines: BufferLine[], i: number, cols: number): number {
- // If this is the last row in the wrapped line, get the actual trimmed length
- if (i === lines.length - 1) {
- return lines[i].getTrimmedLength();
- }
- // Detect whether the following line starts with a wide character and the end of the current line
- // is null, if so then we can be pretty sure the null character should be excluded from the line
- // length]
- const endsInNull = !(lines[i].hasContent(cols - 1)) && lines[i].getWidth(cols - 1) === 1;
- const followingLineStartsWithWide = lines[i + 1].getWidth(0) === 2;
- if (endsInNull && followingLineStartsWithWide) {
- return cols - 1;
- }
- return cols;
-}
diff --git a/node_modules/xterm/src/common/buffer/BufferSet.ts b/node_modules/xterm/src/common/buffer/BufferSet.ts
deleted file mode 100644
index de220e8..0000000
--- a/node_modules/xterm/src/common/buffer/BufferSet.ts
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBuffer, IBufferSet } from 'common/buffer/Types';
-import { IAttributeData } from 'common/Types';
-import { Buffer } from 'common/buffer/Buffer';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { IOptionsService, IBufferService } from 'common/services/Services';
-import { Disposable } from 'common/Lifecycle';
-
-/**
- * The BufferSet represents the set of two buffers used by xterm terminals (normal and alt) and
- * provides also utilities for working with them.
- */
-export class BufferSet extends Disposable implements IBufferSet {
- private _normal!: Buffer;
- private _alt!: Buffer;
- private _activeBuffer!: Buffer;
-
- private _onBufferActivate = this.register(new EventEmitter<{activeBuffer: IBuffer, inactiveBuffer: IBuffer}>());
- public get onBufferActivate(): IEvent<{activeBuffer: IBuffer, inactiveBuffer: IBuffer}> { return this._onBufferActivate.event; }
-
- /**
- * Create a new BufferSet for the given terminal.
- * @param _terminal - The terminal the BufferSet will belong to
- */
- constructor(
- private readonly _optionsService: IOptionsService,
- private readonly _bufferService: IBufferService
- ) {
- super();
- this.reset();
- }
-
- public reset(): void {
- this._normal = new Buffer(true, this._optionsService, this._bufferService);
- this._normal.fillViewportRows();
-
- // The alt buffer should never have scrollback.
- // See http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-The-Alternate-Screen-Buffer
- this._alt = new Buffer(false, this._optionsService, this._bufferService);
- this._activeBuffer = this._normal;
- this._onBufferActivate.fire({
- activeBuffer: this._normal,
- inactiveBuffer: this._alt
- });
-
- this.setupTabStops();
- }
-
- /**
- * Returns the alt Buffer of the BufferSet
- */
- public get alt(): Buffer {
- return this._alt;
- }
-
- /**
- * Returns the normal Buffer of the BufferSet
- */
- public get active(): Buffer {
- return this._activeBuffer;
- }
-
- /**
- * Returns the currently active Buffer of the BufferSet
- */
- public get normal(): Buffer {
- return this._normal;
- }
-
- /**
- * Sets the normal Buffer of the BufferSet as its currently active Buffer
- */
- public activateNormalBuffer(): void {
- if (this._activeBuffer === this._normal) {
- return;
- }
- this._normal.x = this._alt.x;
- this._normal.y = this._alt.y;
- // The alt buffer should always be cleared when we switch to the normal
- // buffer. This frees up memory since the alt buffer should always be new
- // when activated.
- this._alt.clear();
- this._activeBuffer = this._normal;
- this._onBufferActivate.fire({
- activeBuffer: this._normal,
- inactiveBuffer: this._alt
- });
- }
-
- /**
- * Sets the alt Buffer of the BufferSet as its currently active Buffer
- */
- public activateAltBuffer(fillAttr?: IAttributeData): void {
- if (this._activeBuffer === this._alt) {
- return;
- }
- // Since the alt buffer is always cleared when the normal buffer is
- // activated, we want to fill it when switching to it.
- this._alt.fillViewportRows(fillAttr);
- this._alt.x = this._normal.x;
- this._alt.y = this._normal.y;
- this._activeBuffer = this._alt;
- this._onBufferActivate.fire({
- activeBuffer: this._alt,
- inactiveBuffer: this._normal
- });
- }
-
- /**
- * Resizes both normal and alt buffers, adjusting their data accordingly.
- * @param newCols The new number of columns.
- * @param newRows The new number of rows.
- */
- public resize(newCols: number, newRows: number): void {
- this._normal.resize(newCols, newRows);
- this._alt.resize(newCols, newRows);
- }
-
- /**
- * Setup the tab stops.
- * @param i The index to start setting up tab stops from.
- */
- public setupTabStops(i?: number): void {
- this._normal.setupTabStops(i);
- this._alt.setupTabStops(i);
- }
-}
diff --git a/node_modules/xterm/src/common/buffer/CellData.ts b/node_modules/xterm/src/common/buffer/CellData.ts
deleted file mode 100644
index a87b579..0000000
--- a/node_modules/xterm/src/common/buffer/CellData.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { CharData, ICellData, IExtendedAttrs } from 'common/Types';
-import { stringFromCodePoint } from 'common/input/TextDecoder';
-import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_ATTR_INDEX, Content } from 'common/buffer/Constants';
-import { AttributeData, ExtendedAttrs } from 'common/buffer/AttributeData';
-
-/**
- * CellData - represents a single Cell in the terminal buffer.
- */
-export class CellData extends AttributeData implements ICellData {
- /** Helper to create CellData from CharData. */
- public static fromCharData(value: CharData): CellData {
- const obj = new CellData();
- obj.setFromCharData(value);
- return obj;
- }
- /** Primitives from terminal buffer. */
- public content = 0;
- public fg = 0;
- public bg = 0;
- public extended: IExtendedAttrs = new ExtendedAttrs();
- public combinedData = '';
- /** Whether cell contains a combined string. */
- public isCombined(): number {
- return this.content & Content.IS_COMBINED_MASK;
- }
- /** Width of the cell. */
- public getWidth(): number {
- return this.content >> Content.WIDTH_SHIFT;
- }
- /** JS string of the content. */
- public getChars(): string {
- if (this.content & Content.IS_COMBINED_MASK) {
- return this.combinedData;
- }
- if (this.content & Content.CODEPOINT_MASK) {
- return stringFromCodePoint(this.content & Content.CODEPOINT_MASK);
- }
- return '';
- }
- /**
- * Codepoint of cell
- * Note this returns the UTF32 codepoint of single chars,
- * if content is a combined string it returns the codepoint
- * of the last char in string to be in line with code in CharData.
- * */
- public getCode(): number {
- return (this.isCombined())
- ? this.combinedData.charCodeAt(this.combinedData.length - 1)
- : this.content & Content.CODEPOINT_MASK;
- }
- /** Set data from CharData */
- public setFromCharData(value: CharData): void {
- this.fg = value[CHAR_DATA_ATTR_INDEX];
- this.bg = 0;
- let combined = false;
- // surrogates and combined strings need special treatment
- if (value[CHAR_DATA_CHAR_INDEX].length > 2) {
- combined = true;
- }
- else if (value[CHAR_DATA_CHAR_INDEX].length === 2) {
- const code = value[CHAR_DATA_CHAR_INDEX].charCodeAt(0);
- // if the 2-char string is a surrogate create single codepoint
- // everything else is combined
- if (0xD800 <= code && code <= 0xDBFF) {
- const second = value[CHAR_DATA_CHAR_INDEX].charCodeAt(1);
- if (0xDC00 <= second && second <= 0xDFFF) {
- this.content = ((code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000) | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);
- }
- else {
- combined = true;
- }
- }
- else {
- combined = true;
- }
- }
- else {
- this.content = value[CHAR_DATA_CHAR_INDEX].charCodeAt(0) | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);
- }
- if (combined) {
- this.combinedData = value[CHAR_DATA_CHAR_INDEX];
- this.content = Content.IS_COMBINED_MASK | (value[CHAR_DATA_WIDTH_INDEX] << Content.WIDTH_SHIFT);
- }
- }
- /** Get data as CharData. */
- public getAsCharData(): CharData {
- return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
- }
-}
diff --git a/node_modules/xterm/src/common/buffer/Constants.ts b/node_modules/xterm/src/common/buffer/Constants.ts
deleted file mode 100644
index a2c1b88..0000000
--- a/node_modules/xterm/src/common/buffer/Constants.ts
+++ /dev/null
@@ -1,139 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-export const DEFAULT_COLOR = 256;
-export const DEFAULT_ATTR = (0 << 18) | (DEFAULT_COLOR << 9) | (256 << 0);
-
-export const CHAR_DATA_ATTR_INDEX = 0;
-export const CHAR_DATA_CHAR_INDEX = 1;
-export const CHAR_DATA_WIDTH_INDEX = 2;
-export const CHAR_DATA_CODE_INDEX = 3;
-
-/**
- * Null cell - a real empty cell (containing nothing).
- * Note that code should always be 0 for a null cell as
- * several test condition of the buffer line rely on this.
- */
-export const NULL_CELL_CHAR = '';
-export const NULL_CELL_WIDTH = 1;
-export const NULL_CELL_CODE = 0;
-
-/**
- * Whitespace cell.
- * This is meant as a replacement for empty cells when needed
- * during rendering lines to preserve correct aligment.
- */
-export const WHITESPACE_CELL_CHAR = ' ';
-export const WHITESPACE_CELL_WIDTH = 1;
-export const WHITESPACE_CELL_CODE = 32;
-
-/**
- * Bitmasks for accessing data in `content`.
- */
-export const enum Content {
- /**
- * bit 1..21 codepoint, max allowed in UTF32 is 0x10FFFF (21 bits taken)
- * read: `codepoint = content & Content.codepointMask;`
- * write: `content |= codepoint & Content.codepointMask;`
- * shortcut if precondition `codepoint <= 0x10FFFF` is met:
- * `content |= codepoint;`
- */
- CODEPOINT_MASK = 0x1FFFFF,
-
- /**
- * bit 22 flag indication whether a cell contains combined content
- * read: `isCombined = content & Content.isCombined;`
- * set: `content |= Content.isCombined;`
- * clear: `content &= ~Content.isCombined;`
- */
- IS_COMBINED_MASK = 0x200000, // 1 << 21
-
- /**
- * bit 1..22 mask to check whether a cell contains any string data
- * we need to check for codepoint and isCombined bits to see
- * whether a cell contains anything
- * read: `isEmpty = !(content & Content.hasContent)`
- */
- HAS_CONTENT_MASK = 0x3FFFFF,
-
- /**
- * bit 23..24 wcwidth value of cell, takes 2 bits (ranges from 0..2)
- * read: `width = (content & Content.widthMask) >> Content.widthShift;`
- * `hasWidth = content & Content.widthMask;`
- * as long as wcwidth is highest value in `content`:
- * `width = content >> Content.widthShift;`
- * write: `content |= (width << Content.widthShift) & Content.widthMask;`
- * shortcut if precondition `0 <= width <= 3` is met:
- * `content |= width << Content.widthShift;`
- */
- WIDTH_MASK = 0xC00000, // 3 << 22
- WIDTH_SHIFT = 22
-}
-
-export const enum Attributes {
- /**
- * bit 1..8 blue in RGB, color in P256 and P16
- */
- BLUE_MASK = 0xFF,
- BLUE_SHIFT = 0,
- PCOLOR_MASK = 0xFF,
- PCOLOR_SHIFT = 0,
-
- /**
- * bit 9..16 green in RGB
- */
- GREEN_MASK = 0xFF00,
- GREEN_SHIFT = 8,
-
- /**
- * bit 17..24 red in RGB
- */
- RED_MASK = 0xFF0000,
- RED_SHIFT = 16,
-
- /**
- * bit 25..26 color mode: DEFAULT (0) | P16 (1) | P256 (2) | RGB (3)
- */
- CM_MASK = 0x3000000,
- CM_DEFAULT = 0,
- CM_P16 = 0x1000000,
- CM_P256 = 0x2000000,
- CM_RGB = 0x3000000,
-
- /**
- * bit 1..24 RGB room
- */
- RGB_MASK = 0xFFFFFF
-}
-
-export const enum FgFlags {
- /**
- * bit 27..32
- */
- INVERSE = 0x4000000,
- BOLD = 0x8000000,
- UNDERLINE = 0x10000000,
- BLINK = 0x20000000,
- INVISIBLE = 0x40000000,
- STRIKETHROUGH = 0x80000000,
-}
-
-export const enum BgFlags {
- /**
- * bit 27..32 (upper 3 unused)
- */
- ITALIC = 0x4000000,
- DIM = 0x8000000,
- HAS_EXTENDED = 0x10000000
-}
-
-export const enum UnderlineStyle {
- NONE = 0,
- SINGLE = 1,
- DOUBLE = 2,
- CURLY = 3,
- DOTTED = 4,
- DASHED = 5
-}
diff --git a/node_modules/xterm/src/common/buffer/Marker.ts b/node_modules/xterm/src/common/buffer/Marker.ts
deleted file mode 100644
index 72c4085..0000000
--- a/node_modules/xterm/src/common/buffer/Marker.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { Disposable } from 'common/Lifecycle';
-import { IMarker } from 'common/Types';
-
-export class Marker extends Disposable implements IMarker {
- private static _nextId = 1;
-
- private _id: number = Marker._nextId++;
- public isDisposed: boolean = false;
-
- public get id(): number { return this._id; }
-
- private _onDispose = new EventEmitter<void>();
- public get onDispose(): IEvent<void> { return this._onDispose.event; }
-
- constructor(
- public line: number
- ) {
- super();
- }
-
- public dispose(): void {
- if (this.isDisposed) {
- return;
- }
- this.isDisposed = true;
- this.line = -1;
- // Emit before super.dispose such that dispose listeners get a change to react
- this._onDispose.fire();
- super.dispose();
- }
-}
diff --git a/node_modules/xterm/src/common/buffer/Types.d.ts b/node_modules/xterm/src/common/buffer/Types.d.ts
deleted file mode 100644
index 36b70b7..0000000
--- a/node_modules/xterm/src/common/buffer/Types.d.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IAttributeData, ICircularList, IBufferLine, ICellData, IMarker, ICharset, IDisposable } from 'common/Types';
-import { IEvent } from 'common/EventEmitter';
-
-// BufferIndex denotes a position in the buffer: [rowIndex, colIndex]
-export type BufferIndex = [number, number];
-
-export interface IBufferStringIteratorResult {
- range: {first: number, last: number};
- content: string;
-}
-
-export interface IBufferStringIterator {
- hasNext(): boolean;
- next(): IBufferStringIteratorResult;
-}
-
-export interface IBuffer {
- readonly lines: ICircularList<IBufferLine>;
- ydisp: number;
- ybase: number;
- y: number;
- x: number;
- tabs: any;
- scrollBottom: number;
- scrollTop: number;
- hasScrollback: boolean;
- savedY: number;
- savedX: number;
- savedCharset: ICharset | undefined;
- savedCurAttrData: IAttributeData;
- isCursorInViewport: boolean;
- markers: IMarker[];
- translateBufferLineToString(lineIndex: number, trimRight: boolean, startCol?: number, endCol?: number): string;
- getWrappedRangeForLine(y: number): { first: number, last: number };
- nextStop(x?: number): number;
- prevStop(x?: number): number;
- getBlankLine(attr: IAttributeData, isWrapped?: boolean): IBufferLine;
- stringIndexToBufferIndex(lineIndex: number, stringIndex: number, trimRight?: boolean): number[];
- iterator(trimRight: boolean, startIndex?: number, endIndex?: number, startOverscan?: number, endOverscan?: number): IBufferStringIterator;
- getNullCell(attr?: IAttributeData): ICellData;
- getWhitespaceCell(attr?: IAttributeData): ICellData;
- addMarker(y: number): IMarker;
- clearMarkers(y?: number): void;
-}
-
-export interface IBufferSet extends IDisposable {
- alt: IBuffer;
- normal: IBuffer;
- active: IBuffer;
-
- onBufferActivate: IEvent<{ activeBuffer: IBuffer, inactiveBuffer: IBuffer }>;
-
- activateNormalBuffer(): void;
- activateAltBuffer(fillAttr?: IAttributeData): void;
- reset(): void;
- resize(newCols: number, newRows: number): void;
- setupTabStops(i?: number): void;
-}
diff --git a/node_modules/xterm/src/common/data/Charsets.ts b/node_modules/xterm/src/common/data/Charsets.ts
deleted file mode 100644
index c72d5a2..0000000
--- a/node_modules/xterm/src/common/data/Charsets.ts
+++ /dev/null
@@ -1,256 +0,0 @@
-/**
- * Copyright (c) 2016 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ICharset } from 'common/Types';
-
-/**
- * The character sets supported by the terminal. These enable several languages
- * to be represented within the terminal with only 8-bit encoding. See ISO 2022
- * for a discussion on character sets. Only VT100 character sets are supported.
- */
-export const CHARSETS: { [key: string]: ICharset | undefined } = {};
-
-/**
- * The default character set, US.
- */
-export const DEFAULT_CHARSET: ICharset | undefined = CHARSETS['B'];
-
-/**
- * DEC Special Character and Line Drawing Set.
- * Reference: http://vt100.net/docs/vt102-ug/table5-13.html
- * A lot of curses apps use this if they see TERM=xterm.
- * testing: echo -e '\e(0a\e(B'
- * The xterm output sometimes seems to conflict with the
- * reference above. xterm seems in line with the reference
- * when running vttest however.
- * The table below now uses xterm's output from vttest.
- */
-CHARSETS['0'] = {
- '`': '\u25c6', // '◆'
- 'a': '\u2592', // '▒'
- 'b': '\u2409', // '␉' (HT)
- 'c': '\u240c', // '␌' (FF)
- 'd': '\u240d', // '␍' (CR)
- 'e': '\u240a', // '␊' (LF)
- 'f': '\u00b0', // '°'
- 'g': '\u00b1', // '±'
- 'h': '\u2424', // '␤' (NL)
- 'i': '\u240b', // '␋' (VT)
- 'j': '\u2518', // '┘'
- 'k': '\u2510', // '┐'
- 'l': '\u250c', // '┌'
- 'm': '\u2514', // '└'
- 'n': '\u253c', // '┼'
- 'o': '\u23ba', // '⎺'
- 'p': '\u23bb', // '⎻'
- 'q': '\u2500', // '─'
- 'r': '\u23bc', // '⎼'
- 's': '\u23bd', // '⎽'
- 't': '\u251c', // '├'
- 'u': '\u2524', // '┤'
- 'v': '\u2534', // '┴'
- 'w': '\u252c', // '┬'
- 'x': '\u2502', // '│'
- 'y': '\u2264', // '≤'
- 'z': '\u2265', // '≥'
- '{': '\u03c0', // 'π'
- '|': '\u2260', // '≠'
- '}': '\u00a3', // '£'
- '~': '\u00b7' // '·'
-};
-
-/**
- * British character set
- * ESC (A
- * Reference: http://vt100.net/docs/vt220-rm/table2-5.html
- */
-CHARSETS['A'] = {
- '#': '£'
-};
-
-/**
- * United States character set
- * ESC (B
- */
-CHARSETS['B'] = undefined;
-
-/**
- * Dutch character set
- * ESC (4
- * Reference: http://vt100.net/docs/vt220-rm/table2-6.html
- */
-CHARSETS['4'] = {
- '#': '£',
- '@': '¾',
- '[': 'ij',
- '\\': '½',
- ']': '|',
- '{': '¨',
- '|': 'f',
- '}': '¼',
- '~': '´'
-};
-
-/**
- * Finnish character set
- * ESC (C or ESC (5
- * Reference: http://vt100.net/docs/vt220-rm/table2-7.html
- */
-CHARSETS['C'] =
-CHARSETS['5'] = {
- '[': 'Ä',
- '\\': 'Ö',
- ']': 'Å',
- '^': 'Ü',
- '`': 'é',
- '{': 'ä',
- '|': 'ö',
- '}': 'å',
- '~': 'ü'
-};
-
-/**
- * French character set
- * ESC (R
- * Reference: http://vt100.net/docs/vt220-rm/table2-8.html
- */
-CHARSETS['R'] = {
- '#': '£',
- '@': 'à',
- '[': '°',
- '\\': 'ç',
- ']': '§',
- '{': 'é',
- '|': 'ù',
- '}': 'è',
- '~': '¨'
-};
-
-/**
- * French Canadian character set
- * ESC (Q
- * Reference: http://vt100.net/docs/vt220-rm/table2-9.html
- */
-CHARSETS['Q'] = {
- '@': 'à',
- '[': 'â',
- '\\': 'ç',
- ']': 'ê',
- '^': 'î',
- '`': 'ô',
- '{': 'é',
- '|': 'ù',
- '}': 'è',
- '~': 'û'
-};
-
-/**
- * German character set
- * ESC (K
- * Reference: http://vt100.net/docs/vt220-rm/table2-10.html
- */
-CHARSETS['K'] = {
- '@': '§',
- '[': 'Ä',
- '\\': 'Ö',
- ']': 'Ü',
- '{': 'ä',
- '|': 'ö',
- '}': 'ü',
- '~': 'ß'
-};
-
-/**
- * Italian character set
- * ESC (Y
- * Reference: http://vt100.net/docs/vt220-rm/table2-11.html
- */
-CHARSETS['Y'] = {
- '#': '£',
- '@': '§',
- '[': '°',
- '\\': 'ç',
- ']': 'é',
- '`': 'ù',
- '{': 'à',
- '|': 'ò',
- '}': 'è',
- '~': 'ì'
-};
-
-/**
- * Norwegian/Danish character set
- * ESC (E or ESC (6
- * Reference: http://vt100.net/docs/vt220-rm/table2-12.html
- */
-CHARSETS['E'] =
-CHARSETS['6'] = {
- '@': 'Ä',
- '[': 'Æ',
- '\\': 'Ø',
- ']': 'Å',
- '^': 'Ü',
- '`': 'ä',
- '{': 'æ',
- '|': 'ø',
- '}': 'å',
- '~': 'ü'
-};
-
-/**
- * Spanish character set
- * ESC (Z
- * Reference: http://vt100.net/docs/vt220-rm/table2-13.html
- */
-CHARSETS['Z'] = {
- '#': '£',
- '@': '§',
- '[': '¡',
- '\\': 'Ñ',
- ']': '¿',
- '{': '°',
- '|': 'ñ',
- '}': 'ç'
-};
-
-/**
- * Swedish character set
- * ESC (H or ESC (7
- * Reference: http://vt100.net/docs/vt220-rm/table2-14.html
- */
-CHARSETS['H'] =
-CHARSETS['7'] = {
- '@': 'É',
- '[': 'Ä',
- '\\': 'Ö',
- ']': 'Å',
- '^': 'Ü',
- '`': 'é',
- '{': 'ä',
- '|': 'ö',
- '}': 'å',
- '~': 'ü'
-};
-
-/**
- * Swiss character set
- * ESC (=
- * Reference: http://vt100.net/docs/vt220-rm/table2-15.html
- */
-CHARSETS['='] = {
- '#': 'ù',
- '@': 'à',
- '[': 'é',
- '\\': 'ç',
- ']': 'ê',
- '^': 'î',
- // eslint-disable-next-line @typescript-eslint/naming-convention
- '_': 'è',
- '`': 'ô',
- '{': 'ä',
- '|': 'ö',
- '}': 'ü',
- '~': 'û'
-};
diff --git a/node_modules/xterm/src/common/data/EscapeSequences.ts b/node_modules/xterm/src/common/data/EscapeSequences.ts
deleted file mode 100644
index e35f01d..0000000
--- a/node_modules/xterm/src/common/data/EscapeSequences.ts
+++ /dev/null
@@ -1,150 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-/**
- * C0 control codes
- * See = https://en.wikipedia.org/wiki/C0_and_C1_control_codes
- */
-export namespace C0 {
- /** Null (Caret = ^@, C = \0) */
- export const NUL = '\x00';
- /** Start of Heading (Caret = ^A) */
- export const SOH = '\x01';
- /** Start of Text (Caret = ^B) */
- export const STX = '\x02';
- /** End of Text (Caret = ^C) */
- export const ETX = '\x03';
- /** End of Transmission (Caret = ^D) */
- export const EOT = '\x04';
- /** Enquiry (Caret = ^E) */
- export const ENQ = '\x05';
- /** Acknowledge (Caret = ^F) */
- export const ACK = '\x06';
- /** Bell (Caret = ^G, C = \a) */
- export const BEL = '\x07';
- /** Backspace (Caret = ^H, C = \b) */
- export const BS = '\x08';
- /** Character Tabulation, Horizontal Tabulation (Caret = ^I, C = \t) */
- export const HT = '\x09';
- /** Line Feed (Caret = ^J, C = \n) */
- export const LF = '\x0a';
- /** Line Tabulation, Vertical Tabulation (Caret = ^K, C = \v) */
- export const VT = '\x0b';
- /** Form Feed (Caret = ^L, C = \f) */
- export const FF = '\x0c';
- /** Carriage Return (Caret = ^M, C = \r) */
- export const CR = '\x0d';
- /** Shift Out (Caret = ^N) */
- export const SO = '\x0e';
- /** Shift In (Caret = ^O) */
- export const SI = '\x0f';
- /** Data Link Escape (Caret = ^P) */
- export const DLE = '\x10';
- /** Device Control One (XON) (Caret = ^Q) */
- export const DC1 = '\x11';
- /** Device Control Two (Caret = ^R) */
- export const DC2 = '\x12';
- /** Device Control Three (XOFF) (Caret = ^S) */
- export const DC3 = '\x13';
- /** Device Control Four (Caret = ^T) */
- export const DC4 = '\x14';
- /** Negative Acknowledge (Caret = ^U) */
- export const NAK = '\x15';
- /** Synchronous Idle (Caret = ^V) */
- export const SYN = '\x16';
- /** End of Transmission Block (Caret = ^W) */
- export const ETB = '\x17';
- /** Cancel (Caret = ^X) */
- export const CAN = '\x18';
- /** End of Medium (Caret = ^Y) */
- export const EM = '\x19';
- /** Substitute (Caret = ^Z) */
- export const SUB = '\x1a';
- /** Escape (Caret = ^[, C = \e) */
- export const ESC = '\x1b';
- /** File Separator (Caret = ^\) */
- export const FS = '\x1c';
- /** Group Separator (Caret = ^]) */
- export const GS = '\x1d';
- /** Record Separator (Caret = ^^) */
- export const RS = '\x1e';
- /** Unit Separator (Caret = ^_) */
- export const US = '\x1f';
- /** Space */
- export const SP = '\x20';
- /** Delete (Caret = ^?) */
- export const DEL = '\x7f';
-}
-
-/**
- * C1 control codes
- * See = https://en.wikipedia.org/wiki/C0_and_C1_control_codes
- */
-export namespace C1 {
- /** padding character */
- export const PAD = '\x80';
- /** High Octet Preset */
- export const HOP = '\x81';
- /** Break Permitted Here */
- export const BPH = '\x82';
- /** No Break Here */
- export const NBH = '\x83';
- /** Index */
- export const IND = '\x84';
- /** Next Line */
- export const NEL = '\x85';
- /** Start of Selected Area */
- export const SSA = '\x86';
- /** End of Selected Area */
- export const ESA = '\x87';
- /** Horizontal Tabulation Set */
- export const HTS = '\x88';
- /** Horizontal Tabulation With Justification */
- export const HTJ = '\x89';
- /** Vertical Tabulation Set */
- export const VTS = '\x8a';
- /** Partial Line Down */
- export const PLD = '\x8b';
- /** Partial Line Up */
- export const PLU = '\x8c';
- /** Reverse Index */
- export const RI = '\x8d';
- /** Single-Shift 2 */
- export const SS2 = '\x8e';
- /** Single-Shift 3 */
- export const SS3 = '\x8f';
- /** Device Control String */
- export const DCS = '\x90';
- /** Private Use 1 */
- export const PU1 = '\x91';
- /** Private Use 2 */
- export const PU2 = '\x92';
- /** Set Transmit State */
- export const STS = '\x93';
- /** Destructive backspace, intended to eliminate ambiguity about meaning of BS. */
- export const CCH = '\x94';
- /** Message Waiting */
- export const MW = '\x95';
- /** Start of Protected Area */
- export const SPA = '\x96';
- /** End of Protected Area */
- export const EPA = '\x97';
- /** Start of String */
- export const SOS = '\x98';
- /** Single Graphic Character Introducer */
- export const SGCI = '\x99';
- /** Single Character Introducer */
- export const SCI = '\x9a';
- /** Control Sequence Introducer */
- export const CSI = '\x9b';
- /** String Terminator */
- export const ST = '\x9c';
- /** Operating System Command */
- export const OSC = '\x9d';
- /** Privacy Message */
- export const PM = '\x9e';
- /** Application Program Command */
- export const APC = '\x9f';
-}
diff --git a/node_modules/xterm/src/common/input/Keyboard.ts b/node_modules/xterm/src/common/input/Keyboard.ts
deleted file mode 100644
index b4b3dce..0000000
--- a/node_modules/xterm/src/common/input/Keyboard.ts
+++ /dev/null
@@ -1,375 +0,0 @@
-/**
- * Copyright (c) 2014 The xterm.js authors. All rights reserved.
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- * @license MIT
- */
-
-import { IKeyboardEvent, IKeyboardResult, KeyboardResultType } from 'common/Types';
-import { C0 } from 'common/data/EscapeSequences';
-
-// reg + shift key mappings for digits and special chars
-const KEYCODE_KEY_MAPPINGS: { [key: number]: [string, string]} = {
- // digits 0-9
- 48: ['0', ')'],
- 49: ['1', '!'],
- 50: ['2', '@'],
- 51: ['3', '#'],
- 52: ['4', '$'],
- 53: ['5', '%'],
- 54: ['6', '^'],
- 55: ['7', '&'],
- 56: ['8', '*'],
- 57: ['9', '('],
-
- // special chars
- 186: [';', ':'],
- 187: ['=', '+'],
- 188: [',', '<'],
- 189: ['-', '_'],
- 190: ['.', '>'],
- 191: ['/', '?'],
- 192: ['`', '~'],
- 219: ['[', '{'],
- 220: ['\\', '|'],
- 221: [']', '}'],
- 222: ['\'', '"']
-};
-
-export function evaluateKeyboardEvent(
- ev: IKeyboardEvent,
- applicationCursorMode: boolean,
- isMac: boolean,
- macOptionIsMeta: boolean
-): IKeyboardResult {
- const result: IKeyboardResult = {
- type: KeyboardResultType.SEND_KEY,
- // Whether to cancel event propagation (NOTE: this may not be needed since the event is
- // canceled at the end of keyDown
- cancel: false,
- // The new key even to emit
- key: undefined
- };
- const modifiers = (ev.shiftKey ? 1 : 0) | (ev.altKey ? 2 : 0) | (ev.ctrlKey ? 4 : 0) | (ev.metaKey ? 8 : 0);
- switch (ev.keyCode) {
- case 0:
- if (ev.key === 'UIKeyInputUpArrow') {
- if (applicationCursorMode) {
- result.key = C0.ESC + 'OA';
- } else {
- result.key = C0.ESC + '[A';
- }
- }
- else if (ev.key === 'UIKeyInputLeftArrow') {
- if (applicationCursorMode) {
- result.key = C0.ESC + 'OD';
- } else {
- result.key = C0.ESC + '[D';
- }
- }
- else if (ev.key === 'UIKeyInputRightArrow') {
- if (applicationCursorMode) {
- result.key = C0.ESC + 'OC';
- } else {
- result.key = C0.ESC + '[C';
- }
- }
- else if (ev.key === 'UIKeyInputDownArrow') {
- if (applicationCursorMode) {
- result.key = C0.ESC + 'OB';
- } else {
- result.key = C0.ESC + '[B';
- }
- }
- break;
- case 8:
- // backspace
- if (ev.shiftKey) {
- result.key = C0.BS; // ^H
- break;
- } else if (ev.altKey) {
- result.key = C0.ESC + C0.DEL; // \e ^?
- break;
- }
- result.key = C0.DEL; // ^?
- break;
- case 9:
- // tab
- if (ev.shiftKey) {
- result.key = C0.ESC + '[Z';
- break;
- }
- result.key = C0.HT;
- result.cancel = true;
- break;
- case 13:
- // return/enter
- result.key = ev.altKey ? C0.ESC + C0.CR : C0.CR;
- result.cancel = true;
- break;
- case 27:
- // escape
- result.key = C0.ESC;
- if (ev.altKey) {
- result.key = C0.ESC + C0.ESC;
- }
- result.cancel = true;
- break;
- case 37:
- // left-arrow
- if (ev.metaKey) {
- break;
- }
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'D';
- // HACK: Make Alt + left-arrow behave like Ctrl + left-arrow: move one word backwards
- // http://unix.stackexchange.com/a/108106
- // macOS uses different escape sequences than linux
- if (result.key === C0.ESC + '[1;3D') {
- result.key = C0.ESC + (isMac ? 'b' : '[1;5D');
- }
- } else if (applicationCursorMode) {
- result.key = C0.ESC + 'OD';
- } else {
- result.key = C0.ESC + '[D';
- }
- break;
- case 39:
- // right-arrow
- if (ev.metaKey) {
- break;
- }
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'C';
- // HACK: Make Alt + right-arrow behave like Ctrl + right-arrow: move one word forward
- // http://unix.stackexchange.com/a/108106
- // macOS uses different escape sequences than linux
- if (result.key === C0.ESC + '[1;3C') {
- result.key = C0.ESC + (isMac ? 'f' : '[1;5C');
- }
- } else if (applicationCursorMode) {
- result.key = C0.ESC + 'OC';
- } else {
- result.key = C0.ESC + '[C';
- }
- break;
- case 38:
- // up-arrow
- if (ev.metaKey) {
- break;
- }
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'A';
- // HACK: Make Alt + up-arrow behave like Ctrl + up-arrow
- // http://unix.stackexchange.com/a/108106
- // macOS uses different escape sequences than linux
- if (!isMac && result.key === C0.ESC + '[1;3A') {
- result.key = C0.ESC + '[1;5A';
- }
- } else if (applicationCursorMode) {
- result.key = C0.ESC + 'OA';
- } else {
- result.key = C0.ESC + '[A';
- }
- break;
- case 40:
- // down-arrow
- if (ev.metaKey) {
- break;
- }
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'B';
- // HACK: Make Alt + down-arrow behave like Ctrl + down-arrow
- // http://unix.stackexchange.com/a/108106
- // macOS uses different escape sequences than linux
- if (!isMac && result.key === C0.ESC + '[1;3B') {
- result.key = C0.ESC + '[1;5B';
- }
- } else if (applicationCursorMode) {
- result.key = C0.ESC + 'OB';
- } else {
- result.key = C0.ESC + '[B';
- }
- break;
- case 45:
- // insert
- if (!ev.shiftKey && !ev.ctrlKey) {
- // <Ctrl> or <Shift> + <Insert> are used to
- // copy-paste on some systems.
- result.key = C0.ESC + '[2~';
- }
- break;
- case 46:
- // delete
- if (modifiers) {
- result.key = C0.ESC + '[3;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[3~';
- }
- break;
- case 36:
- // home
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'H';
- } else if (applicationCursorMode) {
- result.key = C0.ESC + 'OH';
- } else {
- result.key = C0.ESC + '[H';
- }
- break;
- case 35:
- // end
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'F';
- } else if (applicationCursorMode) {
- result.key = C0.ESC + 'OF';
- } else {
- result.key = C0.ESC + '[F';
- }
- break;
- case 33:
- // page up
- if (ev.shiftKey) {
- result.type = KeyboardResultType.PAGE_UP;
- } else {
- result.key = C0.ESC + '[5~';
- }
- break;
- case 34:
- // page down
- if (ev.shiftKey) {
- result.type = KeyboardResultType.PAGE_DOWN;
- } else {
- result.key = C0.ESC + '[6~';
- }
- break;
- case 112:
- // F1-F12
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'P';
- } else {
- result.key = C0.ESC + 'OP';
- }
- break;
- case 113:
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'Q';
- } else {
- result.key = C0.ESC + 'OQ';
- }
- break;
- case 114:
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'R';
- } else {
- result.key = C0.ESC + 'OR';
- }
- break;
- case 115:
- if (modifiers) {
- result.key = C0.ESC + '[1;' + (modifiers + 1) + 'S';
- } else {
- result.key = C0.ESC + 'OS';
- }
- break;
- case 116:
- if (modifiers) {
- result.key = C0.ESC + '[15;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[15~';
- }
- break;
- case 117:
- if (modifiers) {
- result.key = C0.ESC + '[17;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[17~';
- }
- break;
- case 118:
- if (modifiers) {
- result.key = C0.ESC + '[18;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[18~';
- }
- break;
- case 119:
- if (modifiers) {
- result.key = C0.ESC + '[19;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[19~';
- }
- break;
- case 120:
- if (modifiers) {
- result.key = C0.ESC + '[20;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[20~';
- }
- break;
- case 121:
- if (modifiers) {
- result.key = C0.ESC + '[21;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[21~';
- }
- break;
- case 122:
- if (modifiers) {
- result.key = C0.ESC + '[23;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[23~';
- }
- break;
- case 123:
- if (modifiers) {
- result.key = C0.ESC + '[24;' + (modifiers + 1) + '~';
- } else {
- result.key = C0.ESC + '[24~';
- }
- break;
- default:
- // a-z and space
- if (ev.ctrlKey && !ev.shiftKey && !ev.altKey && !ev.metaKey) {
- if (ev.keyCode >= 65 && ev.keyCode <= 90) {
- result.key = String.fromCharCode(ev.keyCode - 64);
- } else if (ev.keyCode === 32) {
- result.key = C0.NUL;
- } else if (ev.keyCode >= 51 && ev.keyCode <= 55) {
- // escape, file sep, group sep, record sep, unit sep
- result.key = String.fromCharCode(ev.keyCode - 51 + 27);
- } else if (ev.keyCode === 56) {
- result.key = C0.DEL;
- } else if (ev.keyCode === 219) {
- result.key = C0.ESC;
- } else if (ev.keyCode === 220) {
- result.key = C0.FS;
- } else if (ev.keyCode === 221) {
- result.key = C0.GS;
- }
- } else if ((!isMac || macOptionIsMeta) && ev.altKey && !ev.metaKey) {
- // On macOS this is a third level shift when !macOptionIsMeta. Use <Esc> instead.
- const keyMapping = KEYCODE_KEY_MAPPINGS[ev.keyCode];
- const key = keyMapping?.[!ev.shiftKey ? 0 : 1];
- if (key) {
- result.key = C0.ESC + key;
- } else if (ev.keyCode >= 65 && ev.keyCode <= 90) {
- const keyCode = ev.ctrlKey ? ev.keyCode - 64 : ev.keyCode + 32;
- result.key = C0.ESC + String.fromCharCode(keyCode);
- }
- } else if (isMac && !ev.altKey && !ev.ctrlKey && !ev.shiftKey && ev.metaKey) {
- if (ev.keyCode === 65) { // cmd + a
- result.type = KeyboardResultType.SELECT_ALL;
- }
- } else if (ev.key && !ev.ctrlKey && !ev.altKey && !ev.metaKey && ev.keyCode >= 48 && ev.key.length === 1) {
- // Include only keys that that result in a _single_ character; don't include num lock, volume up, etc.
- result.key = ev.key;
- } else if (ev.key && ev.ctrlKey) {
- if (ev.key === '_') { // ^_
- result.key = C0.US;
- }
- }
- break;
- }
-
- return result;
-}
diff --git a/node_modules/xterm/src/common/input/TextDecoder.ts b/node_modules/xterm/src/common/input/TextDecoder.ts
deleted file mode 100644
index 715e919..0000000
--- a/node_modules/xterm/src/common/input/TextDecoder.ts
+++ /dev/null
@@ -1,346 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-/**
- * Polyfill - Convert UTF32 codepoint into JS string.
- * Note: The built-in String.fromCodePoint happens to be much slower
- * due to additional sanity checks. We can avoid them since
- * we always operate on legal UTF32 (granted by the input decoders)
- * and use this faster version instead.
- */
-export function stringFromCodePoint(codePoint: number): string {
- if (codePoint > 0xFFFF) {
- codePoint -= 0x10000;
- return String.fromCharCode((codePoint >> 10) + 0xD800) + String.fromCharCode((codePoint % 0x400) + 0xDC00);
- }
- return String.fromCharCode(codePoint);
-}
-
-/**
- * Convert UTF32 char codes into JS string.
- * Basically the same as `stringFromCodePoint` but for multiple codepoints
- * in a loop (which is a lot faster).
- */
-export function utf32ToString(data: Uint32Array, start: number = 0, end: number = data.length): string {
- let result = '';
- for (let i = start; i < end; ++i) {
- let codepoint = data[i];
- if (codepoint > 0xFFFF) {
- // JS strings are encoded as UTF16, thus a non BMP codepoint gets converted into a surrogate pair
- // conversion rules:
- // - subtract 0x10000 from code point, leaving a 20 bit number
- // - add high 10 bits to 0xD800 --> first surrogate
- // - add low 10 bits to 0xDC00 --> second surrogate
- codepoint -= 0x10000;
- result += String.fromCharCode((codepoint >> 10) + 0xD800) + String.fromCharCode((codepoint % 0x400) + 0xDC00);
- } else {
- result += String.fromCharCode(codepoint);
- }
- }
- return result;
-}
-
-/**
- * StringToUtf32 - decodes UTF16 sequences into UTF32 codepoints.
- * To keep the decoder in line with JS strings it handles single surrogates as UCS2.
- */
-export class StringToUtf32 {
- private _interim: number = 0;
-
- /**
- * Clears interim and resets decoder to clean state.
- */
- public clear(): void {
- this._interim = 0;
- }
-
- /**
- * Decode JS string to UTF32 codepoints.
- * The methods assumes stream input and will store partly transmitted
- * surrogate pairs and decode them with the next data chunk.
- * Note: The method does no bound checks for target, therefore make sure
- * the provided input data does not exceed the size of `target`.
- * Returns the number of written codepoints in `target`.
- */
- public decode(input: string, target: Uint32Array): number {
- const length = input.length;
-
- if (!length) {
- return 0;
- }
-
- let size = 0;
- let startPos = 0;
-
- // handle leftover surrogate high
- if (this._interim) {
- const second = input.charCodeAt(startPos++);
- if (0xDC00 <= second && second <= 0xDFFF) {
- target[size++] = (this._interim - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
- } else {
- // illegal codepoint (USC2 handling)
- target[size++] = this._interim;
- target[size++] = second;
- }
- this._interim = 0;
- }
-
- for (let i = startPos; i < length; ++i) {
- const code = input.charCodeAt(i);
- // surrogate pair first
- if (0xD800 <= code && code <= 0xDBFF) {
- if (++i >= length) {
- this._interim = code;
- return size;
- }
- const second = input.charCodeAt(i);
- if (0xDC00 <= second && second <= 0xDFFF) {
- target[size++] = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
- } else {
- // illegal codepoint (USC2 handling)
- target[size++] = code;
- target[size++] = second;
- }
- continue;
- }
- if (code === 0xFEFF) {
- // BOM
- continue;
- }
- target[size++] = code;
- }
- return size;
- }
-}
-
-/**
- * Utf8Decoder - decodes UTF8 byte sequences into UTF32 codepoints.
- */
-export class Utf8ToUtf32 {
- public interim: Uint8Array = new Uint8Array(3);
-
- /**
- * Clears interim bytes and resets decoder to clean state.
- */
- public clear(): void {
- this.interim.fill(0);
- }
-
- /**
- * Decodes UTF8 byte sequences in `input` to UTF32 codepoints in `target`.
- * The methods assumes stream input and will store partly transmitted bytes
- * and decode them with the next data chunk.
- * Note: The method does no bound checks for target, therefore make sure
- * the provided data chunk does not exceed the size of `target`.
- * Returns the number of written codepoints in `target`.
- */
- public decode(input: Uint8Array, target: Uint32Array): number {
- const length = input.length;
-
- if (!length) {
- return 0;
- }
-
- let size = 0;
- let byte1: number;
- let byte2: number;
- let byte3: number;
- let byte4: number;
- let codepoint = 0;
- let startPos = 0;
-
- // handle leftover bytes
- if (this.interim[0]) {
- let discardInterim = false;
- let cp = this.interim[0];
- cp &= ((((cp & 0xE0) === 0xC0)) ? 0x1F : (((cp & 0xF0) === 0xE0)) ? 0x0F : 0x07);
- let pos = 0;
- let tmp: number;
- while ((tmp = this.interim[++pos] & 0x3F) && pos < 4) {
- cp <<= 6;
- cp |= tmp;
- }
- // missing bytes - read ahead from input
- const type = (((this.interim[0] & 0xE0) === 0xC0)) ? 2 : (((this.interim[0] & 0xF0) === 0xE0)) ? 3 : 4;
- const missing = type - pos;
- while (startPos < missing) {
- if (startPos >= length) {
- return 0;
- }
- tmp = input[startPos++];
- if ((tmp & 0xC0) !== 0x80) {
- // wrong continuation, discard interim bytes completely
- startPos--;
- discardInterim = true;
- break;
- } else {
- // need to save so we can continue short inputs in next call
- this.interim[pos++] = tmp;
- cp <<= 6;
- cp |= tmp & 0x3F;
- }
- }
- if (!discardInterim) {
- // final test is type dependent
- if (type === 2) {
- if (cp < 0x80) {
- // wrong starter byte
- startPos--;
- } else {
- target[size++] = cp;
- }
- } else if (type === 3) {
- if (cp < 0x0800 || (cp >= 0xD800 && cp <= 0xDFFF) || cp === 0xFEFF) {
- // illegal codepoint or BOM
- } else {
- target[size++] = cp;
- }
- } else {
- if (cp < 0x010000 || cp > 0x10FFFF) {
- // illegal codepoint
- } else {
- target[size++] = cp;
- }
- }
- }
- this.interim.fill(0);
- }
-
- // loop through input
- const fourStop = length - 4;
- let i = startPos;
- while (i < length) {
- /**
- * ASCII shortcut with loop unrolled to 4 consecutive ASCII chars.
- * This is a compromise between speed gain for ASCII
- * and penalty for non ASCII:
- * For best ASCII performance the char should be stored directly into target,
- * but even a single attempt to write to target and compare afterwards
- * penalizes non ASCII really bad (-50%), thus we load the char into byteX first,
- * which reduces ASCII performance by ~15%.
- * This trial for ASCII reduces non ASCII performance by ~10% which seems acceptible
- * compared to the gains.
- * Note that this optimization only takes place for 4 consecutive ASCII chars,
- * for any shorter it bails out. Worst case - all 4 bytes being read but
- * thrown away due to the last being a non ASCII char (-10% performance).
- */
- while (i < fourStop
- && !((byte1 = input[i]) & 0x80)
- && !((byte2 = input[i + 1]) & 0x80)
- && !((byte3 = input[i + 2]) & 0x80)
- && !((byte4 = input[i + 3]) & 0x80))
- {
- target[size++] = byte1;
- target[size++] = byte2;
- target[size++] = byte3;
- target[size++] = byte4;
- i += 4;
- }
-
- // reread byte1
- byte1 = input[i++];
-
- // 1 byte
- if (byte1 < 0x80) {
- target[size++] = byte1;
-
- // 2 bytes
- } else if ((byte1 & 0xE0) === 0xC0) {
- if (i >= length) {
- this.interim[0] = byte1;
- return size;
- }
- byte2 = input[i++];
- if ((byte2 & 0xC0) !== 0x80) {
- // wrong continuation
- i--;
- continue;
- }
- codepoint = (byte1 & 0x1F) << 6 | (byte2 & 0x3F);
- if (codepoint < 0x80) {
- // wrong starter byte
- i--;
- continue;
- }
- target[size++] = codepoint;
-
- // 3 bytes
- } else if ((byte1 & 0xF0) === 0xE0) {
- if (i >= length) {
- this.interim[0] = byte1;
- return size;
- }
- byte2 = input[i++];
- if ((byte2 & 0xC0) !== 0x80) {
- // wrong continuation
- i--;
- continue;
- }
- if (i >= length) {
- this.interim[0] = byte1;
- this.interim[1] = byte2;
- return size;
- }
- byte3 = input[i++];
- if ((byte3 & 0xC0) !== 0x80) {
- // wrong continuation
- i--;
- continue;
- }
- codepoint = (byte1 & 0x0F) << 12 | (byte2 & 0x3F) << 6 | (byte3 & 0x3F);
- if (codepoint < 0x0800 || (codepoint >= 0xD800 && codepoint <= 0xDFFF) || codepoint === 0xFEFF) {
- // illegal codepoint or BOM, no i-- here
- continue;
- }
- target[size++] = codepoint;
-
- // 4 bytes
- } else if ((byte1 & 0xF8) === 0xF0) {
- if (i >= length) {
- this.interim[0] = byte1;
- return size;
- }
- byte2 = input[i++];
- if ((byte2 & 0xC0) !== 0x80) {
- // wrong continuation
- i--;
- continue;
- }
- if (i >= length) {
- this.interim[0] = byte1;
- this.interim[1] = byte2;
- return size;
- }
- byte3 = input[i++];
- if ((byte3 & 0xC0) !== 0x80) {
- // wrong continuation
- i--;
- continue;
- }
- if (i >= length) {
- this.interim[0] = byte1;
- this.interim[1] = byte2;
- this.interim[2] = byte3;
- return size;
- }
- byte4 = input[i++];
- if ((byte4 & 0xC0) !== 0x80) {
- // wrong continuation
- i--;
- continue;
- }
- codepoint = (byte1 & 0x07) << 18 | (byte2 & 0x3F) << 12 | (byte3 & 0x3F) << 6 | (byte4 & 0x3F);
- if (codepoint < 0x010000 || codepoint > 0x10FFFF) {
- // illegal codepoint, no i-- here
- continue;
- }
- target[size++] = codepoint;
- } else {
- // illegal byte, just skip
- }
- }
- return size;
- }
-}
diff --git a/node_modules/xterm/src/common/input/UnicodeV6.ts b/node_modules/xterm/src/common/input/UnicodeV6.ts
deleted file mode 100644
index b308203..0000000
--- a/node_modules/xterm/src/common/input/UnicodeV6.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-import { IUnicodeVersionProvider } from 'common/services/Services';
-import { fill } from 'common/TypedArrayUtils';
-
-type CharWidth = 0 | 1 | 2;
-
-const BMP_COMBINING = [
- [0x0300, 0x036F], [0x0483, 0x0486], [0x0488, 0x0489],
- [0x0591, 0x05BD], [0x05BF, 0x05BF], [0x05C1, 0x05C2],
- [0x05C4, 0x05C5], [0x05C7, 0x05C7], [0x0600, 0x0603],
- [0x0610, 0x0615], [0x064B, 0x065E], [0x0670, 0x0670],
- [0x06D6, 0x06E4], [0x06E7, 0x06E8], [0x06EA, 0x06ED],
- [0x070F, 0x070F], [0x0711, 0x0711], [0x0730, 0x074A],
- [0x07A6, 0x07B0], [0x07EB, 0x07F3], [0x0901, 0x0902],
- [0x093C, 0x093C], [0x0941, 0x0948], [0x094D, 0x094D],
- [0x0951, 0x0954], [0x0962, 0x0963], [0x0981, 0x0981],
- [0x09BC, 0x09BC], [0x09C1, 0x09C4], [0x09CD, 0x09CD],
- [0x09E2, 0x09E3], [0x0A01, 0x0A02], [0x0A3C, 0x0A3C],
- [0x0A41, 0x0A42], [0x0A47, 0x0A48], [0x0A4B, 0x0A4D],
- [0x0A70, 0x0A71], [0x0A81, 0x0A82], [0x0ABC, 0x0ABC],
- [0x0AC1, 0x0AC5], [0x0AC7, 0x0AC8], [0x0ACD, 0x0ACD],
- [0x0AE2, 0x0AE3], [0x0B01, 0x0B01], [0x0B3C, 0x0B3C],
- [0x0B3F, 0x0B3F], [0x0B41, 0x0B43], [0x0B4D, 0x0B4D],
- [0x0B56, 0x0B56], [0x0B82, 0x0B82], [0x0BC0, 0x0BC0],
- [0x0BCD, 0x0BCD], [0x0C3E, 0x0C40], [0x0C46, 0x0C48],
- [0x0C4A, 0x0C4D], [0x0C55, 0x0C56], [0x0CBC, 0x0CBC],
- [0x0CBF, 0x0CBF], [0x0CC6, 0x0CC6], [0x0CCC, 0x0CCD],
- [0x0CE2, 0x0CE3], [0x0D41, 0x0D43], [0x0D4D, 0x0D4D],
- [0x0DCA, 0x0DCA], [0x0DD2, 0x0DD4], [0x0DD6, 0x0DD6],
- [0x0E31, 0x0E31], [0x0E34, 0x0E3A], [0x0E47, 0x0E4E],
- [0x0EB1, 0x0EB1], [0x0EB4, 0x0EB9], [0x0EBB, 0x0EBC],
- [0x0EC8, 0x0ECD], [0x0F18, 0x0F19], [0x0F35, 0x0F35],
- [0x0F37, 0x0F37], [0x0F39, 0x0F39], [0x0F71, 0x0F7E],
- [0x0F80, 0x0F84], [0x0F86, 0x0F87], [0x0F90, 0x0F97],
- [0x0F99, 0x0FBC], [0x0FC6, 0x0FC6], [0x102D, 0x1030],
- [0x1032, 0x1032], [0x1036, 0x1037], [0x1039, 0x1039],
- [0x1058, 0x1059], [0x1160, 0x11FF], [0x135F, 0x135F],
- [0x1712, 0x1714], [0x1732, 0x1734], [0x1752, 0x1753],
- [0x1772, 0x1773], [0x17B4, 0x17B5], [0x17B7, 0x17BD],
- [0x17C6, 0x17C6], [0x17C9, 0x17D3], [0x17DD, 0x17DD],
- [0x180B, 0x180D], [0x18A9, 0x18A9], [0x1920, 0x1922],
- [0x1927, 0x1928], [0x1932, 0x1932], [0x1939, 0x193B],
- [0x1A17, 0x1A18], [0x1B00, 0x1B03], [0x1B34, 0x1B34],
- [0x1B36, 0x1B3A], [0x1B3C, 0x1B3C], [0x1B42, 0x1B42],
- [0x1B6B, 0x1B73], [0x1DC0, 0x1DCA], [0x1DFE, 0x1DFF],
- [0x200B, 0x200F], [0x202A, 0x202E], [0x2060, 0x2063],
- [0x206A, 0x206F], [0x20D0, 0x20EF], [0x302A, 0x302F],
- [0x3099, 0x309A], [0xA806, 0xA806], [0xA80B, 0xA80B],
- [0xA825, 0xA826], [0xFB1E, 0xFB1E], [0xFE00, 0xFE0F],
- [0xFE20, 0xFE23], [0xFEFF, 0xFEFF], [0xFFF9, 0xFFFB]
-];
-const HIGH_COMBINING = [
- [0x10A01, 0x10A03], [0x10A05, 0x10A06], [0x10A0C, 0x10A0F],
- [0x10A38, 0x10A3A], [0x10A3F, 0x10A3F], [0x1D167, 0x1D169],
- [0x1D173, 0x1D182], [0x1D185, 0x1D18B], [0x1D1AA, 0x1D1AD],
- [0x1D242, 0x1D244], [0xE0001, 0xE0001], [0xE0020, 0xE007F],
- [0xE0100, 0xE01EF]
-];
-
-// BMP lookup table, lazy initialized during first addon loading
-let table: Uint8Array;
-
-function bisearch(ucs: number, data: number[][]): boolean {
- let min = 0;
- let max = data.length - 1;
- let mid;
- if (ucs < data[0][0] || ucs > data[max][1]) {
- return false;
- }
- while (max >= min) {
- mid = (min + max) >> 1;
- if (ucs > data[mid][1]) {
- min = mid + 1;
- } else if (ucs < data[mid][0]) {
- max = mid - 1;
- } else {
- return true;
- }
- }
- return false;
-}
-
-export class UnicodeV6 implements IUnicodeVersionProvider {
- public readonly version = '6';
-
- constructor() {
- // init lookup table once
- if (!table) {
- table = new Uint8Array(65536);
- fill(table, 1);
- table[0] = 0;
- // control chars
- fill(table, 0, 1, 32);
- fill(table, 0, 0x7f, 0xa0);
-
- // apply wide char rules first
- // wide chars
- fill(table, 2, 0x1100, 0x1160);
- table[0x2329] = 2;
- table[0x232a] = 2;
- fill(table, 2, 0x2e80, 0xa4d0);
- table[0x303f] = 1; // wrongly in last line
-
- fill(table, 2, 0xac00, 0xd7a4);
- fill(table, 2, 0xf900, 0xfb00);
- fill(table, 2, 0xfe10, 0xfe1a);
- fill(table, 2, 0xfe30, 0xfe70);
- fill(table, 2, 0xff00, 0xff61);
- fill(table, 2, 0xffe0, 0xffe7);
-
- // apply combining last to ensure we overwrite
- // wrongly wide set chars:
- // the original algo evals combining first and falls
- // through to wide check so we simply do here the opposite
- // combining 0
- for (let r = 0; r < BMP_COMBINING.length; ++r) {
- fill(table, 0, BMP_COMBINING[r][0], BMP_COMBINING[r][1] + 1);
- }
- }
- }
-
- public wcwidth(num: number): CharWidth {
- if (num < 32) return 0;
- if (num < 127) return 1;
- if (num < 65536) return table[num] as CharWidth;
- if (bisearch(num, HIGH_COMBINING)) return 0;
- if ((num >= 0x20000 && num <= 0x2fffd) || (num >= 0x30000 && num <= 0x3fffd)) return 2;
- return 1;
- }
-}
diff --git a/node_modules/xterm/src/common/input/WriteBuffer.ts b/node_modules/xterm/src/common/input/WriteBuffer.ts
deleted file mode 100644
index cc84c9a..0000000
--- a/node_modules/xterm/src/common/input/WriteBuffer.ts
+++ /dev/null
@@ -1,224 +0,0 @@
-
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-declare const setTimeout: (handler: () => void, timeout?: number) => void;
-
-/**
- * Safety watermark to avoid memory exhaustion and browser engine crash on fast data input.
- * Enable flow control to avoid this limit and make sure that your backend correctly
- * propagates this to the underlying pty. (see docs for further instructions)
- * Since this limit is meant as a safety parachute to prevent browser crashs,
- * it is set to a very high number. Typically xterm.js gets unresponsive with
- * a 100 times lower number (>500 kB).
- */
-const DISCARD_WATERMARK = 50000000; // ~50 MB
-
-/**
- * The max number of ms to spend on writes before allowing the renderer to
- * catch up with a 0ms setTimeout. A value of < 33 to keep us close to
- * 30fps, and a value of < 16 to try to run at 60fps. Of course, the real FPS
- * depends on the time it takes for the renderer to draw the frame.
- */
-const WRITE_TIMEOUT_MS = 12;
-
-/**
- * Threshold of max held chunks in the write buffer, that were already processed.
- * This is a tradeoff between extensive write buffer shifts (bad runtime) and high
- * memory consumption by data thats not used anymore.
- */
-const WRITE_BUFFER_LENGTH_THRESHOLD = 50;
-
-// queueMicrotask polyfill for nodejs < v11
-const qmt: (cb: () => void) => void = (typeof queueMicrotask === 'undefined')
- ? (cb: () => void) => { Promise.resolve().then(cb); }
- : queueMicrotask;
-
-
-export class WriteBuffer {
- private _writeBuffer: (string | Uint8Array)[] = [];
- private _callbacks: ((() => void) | undefined)[] = [];
- private _pendingData = 0;
- private _bufferOffset = 0;
- private _isSyncWriting = false;
- private _syncCalls = 0;
-
- constructor(private _action: (data: string | Uint8Array, promiseResult?: boolean) => void | Promise<boolean>) { }
-
- /**
- * @deprecated Unreliable, to be removed soon.
- */
- public writeSync(data: string | Uint8Array, maxSubsequentCalls?: number): void {
- // stop writeSync recursions with maxSubsequentCalls argument
- // This is dangerous to use as it will lose the current data chunk
- // and return immediately.
- if (maxSubsequentCalls !== undefined && this._syncCalls > maxSubsequentCalls) {
- // comment next line if a whole loop block should only contain x `writeSync` calls
- // (total flat vs. deep nested limit)
- this._syncCalls = 0;
- return;
- }
- // append chunk to buffer
- this._pendingData += data.length;
- this._writeBuffer.push(data);
- this._callbacks.push(undefined);
-
- // increase recursion counter
- this._syncCalls++;
- // exit early if another writeSync loop is active
- if (this._isSyncWriting) {
- return;
- }
- this._isSyncWriting = true;
-
- // force sync processing on pending data chunks to avoid in-band data scrambling
- // does the same as innerWrite but without event loop
- // we have to do it here as single loop steps to not corrupt loop subject
- // by another writeSync call triggered from _action
- let chunk: string | Uint8Array | undefined;
- while (chunk = this._writeBuffer.shift()) {
- this._action(chunk);
- const cb = this._callbacks.shift();
- if (cb) cb();
- }
- // reset to avoid reprocessing of chunks with scheduled innerWrite call
- // stopping scheduled innerWrite by offset > length condition
- this._pendingData = 0;
- this._bufferOffset = 0x7FFFFFFF;
-
- // allow another writeSync to loop
- this._isSyncWriting = false;
- this._syncCalls = 0;
- }
-
- public write(data: string | Uint8Array, callback?: () => void): void {
- if (this._pendingData > DISCARD_WATERMARK) {
- throw new Error('write data discarded, use flow control to avoid losing data');
- }
-
- // schedule chunk processing for next event loop run
- if (!this._writeBuffer.length) {
- this._bufferOffset = 0;
- setTimeout(() => this._innerWrite());
- }
-
- this._pendingData += data.length;
- this._writeBuffer.push(data);
- this._callbacks.push(callback);
- }
-
- /**
- * Inner write call, that enters the sliced chunk processing by timing.
- *
- * `lastTime` indicates, when the last _innerWrite call had started.
- * It is used to aggregate async handler execution under a timeout constraint
- * effectively lowering the redrawing needs, schematically:
- *
- * macroTask _innerWrite:
- * if (Date.now() - (lastTime | 0) < WRITE_TIMEOUT_MS):
- * schedule microTask _innerWrite(lastTime)
- * else:
- * schedule macroTask _innerWrite(0)
- *
- * overall execution order on task queues:
- *
- * macrotasks: [...] --> _innerWrite(0) --> [...] --> screenUpdate --> [...]
- * m t: |
- * i a: [...]
- * c s: |
- * r k: while < timeout:
- * o s: _innerWrite(timeout)
- *
- * `promiseResult` depicts the promise resolve value of an async handler.
- * This value gets carried forward through all saved stack states of the
- * paused parser for proper continuation.
- *
- * Note, for pure sync code `lastTime` and `promiseResult` have no meaning.
- */
- protected _innerWrite(lastTime: number = 0, promiseResult: boolean = true): void {
- const startTime = lastTime || Date.now();
- while (this._writeBuffer.length > this._bufferOffset) {
- const data = this._writeBuffer[this._bufferOffset];
- const result = this._action(data, promiseResult);
- if (result) {
- /**
- * If we get a promise as return value, we re-schedule the continuation
- * as thenable on the promise and exit right away.
- *
- * The exit here means, that we block input processing at the current active chunk,
- * the exact execution position within the chunk is preserved by the saved
- * stack content in InputHandler and EscapeSequenceParser.
- *
- * Resuming happens automatically from that saved stack state.
- * Also the resolved promise value is passed along the callstack to
- * `EscapeSequenceParser.parse` to correctly resume the stopped handler loop.
- *
- * Exceptions on async handlers will be logged to console async, but do not interrupt
- * the input processing (continues with next handler at the current input position).
- */
-
- /**
- * If a promise takes long to resolve, we should schedule continuation behind setTimeout.
- * This might already be too late, if our .then enters really late (executor + prev thens took very long).
- * This cannot be solved here for the handler itself (it is the handlers responsibility to slice hard work),
- * but we can at least schedule a screen update as we gain control.
- */
- const continuation: (r: boolean) => void = (r: boolean) => Date.now() - startTime >= WRITE_TIMEOUT_MS
- ? setTimeout(() => this._innerWrite(0, r))
- : this._innerWrite(startTime, r);
-
- /**
- * Optimization considerations:
- * The continuation above favors FPS over throughput by eval'ing `startTime` on resolve.
- * This might schedule too many screen updates with bad throughput drops (in case a slow
- * resolving handler sliced its work properly behind setTimeout calls). We cannot spot
- * this condition here, also the renderer has no way to spot nonsense updates either.
- * FIXME: A proper fix for this would track the FPS at the renderer entry level separately.
- *
- * If favoring of FPS shows bad throughtput impact, use the following instead. It favors
- * throughput by eval'ing `startTime` upfront pulling at least one more chunk into the
- * current microtask queue (executed before setTimeout).
- */
- // const continuation: (r: boolean) => void = Date.now() - startTime >= WRITE_TIMEOUT_MS
- // ? r => setTimeout(() => this._innerWrite(0, r))
- // : r => this._innerWrite(startTime, r);
-
- // Handle exceptions synchronously to current band position, idea:
- // 1. spawn a single microtask which we allow to throw hard
- // 2. spawn a promise immediately resolving to `true`
- // (executed on the same queue, thus properly aligned before continuation happens)
- result.catch(err => {
- qmt(() => {throw err;});
- return Promise.resolve(false);
- }).then(continuation);
- return;
- }
-
- const cb = this._callbacks[this._bufferOffset];
- if (cb) cb();
- this._bufferOffset++;
- this._pendingData -= data.length;
-
- if (Date.now() - startTime >= WRITE_TIMEOUT_MS) {
- break;
- }
- }
- if (this._writeBuffer.length > this._bufferOffset) {
- // Allow renderer to catch up before processing the next batch
- // trim already processed chunks if we are above threshold
- if (this._bufferOffset > WRITE_BUFFER_LENGTH_THRESHOLD) {
- this._writeBuffer = this._writeBuffer.slice(this._bufferOffset);
- this._callbacks = this._callbacks.slice(this._bufferOffset);
- this._bufferOffset = 0;
- }
- setTimeout(() => this._innerWrite());
- } else {
- this._writeBuffer.length = 0;
- this._callbacks.length = 0;
- this._pendingData = 0;
- this._bufferOffset = 0;
- }
- }
-}
diff --git a/node_modules/xterm/src/common/input/XParseColor.ts b/node_modules/xterm/src/common/input/XParseColor.ts
deleted file mode 100644
index 8c023a3..0000000
--- a/node_modules/xterm/src/common/input/XParseColor.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Copyright (c) 2021 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-
-// 'rgb:' rule - matching: r/g/b | rr/gg/bb | rrr/ggg/bbb | rrrr/gggg/bbbb (hex digits)
-const RGB_REX = /^([\da-f]{1})\/([\da-f]{1})\/([\da-f]{1})$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/;
-// '#...' rule - matching any hex digits
-const HASH_REX = /^[\da-f]+$/;
-
-/**
- * Parse color spec to RGB values (8 bit per channel).
- * See `man xparsecolor` for details about certain format specifications.
- *
- * Supported formats:
- * - rgb:<red>/<green>/<blue> with <red>, <green>, <blue> in h | hh | hhh | hhhh
- * - #RGB, #RRGGBB, #RRRGGGBBB, #RRRRGGGGBBBB
- *
- * All other formats like rgbi: or device-independent string specifications
- * with float numbering are not supported.
- */
-export function parseColor(data: string): [number, number, number] | undefined {
- if (!data) return;
- // also handle uppercases
- let low = data.toLowerCase();
- if (low.indexOf('rgb:') === 0) {
- // 'rgb:' specifier
- low = low.slice(4);
- const m = RGB_REX.exec(low);
- if (m) {
- const base = m[1] ? 15 : m[4] ? 255 : m[7] ? 4095 : 65535;
- return [
- Math.round(parseInt(m[1] || m[4] || m[7] || m[10], 16) / base * 255),
- Math.round(parseInt(m[2] || m[5] || m[8] || m[11], 16) / base * 255),
- Math.round(parseInt(m[3] || m[6] || m[9] || m[12], 16) / base * 255)
- ];
- }
- } else if (low.indexOf('#') === 0) {
- // '#' specifier
- low = low.slice(1);
- if (HASH_REX.exec(low) && [3, 6, 9, 12].includes(low.length)) {
- const adv = low.length / 3;
- const result: [number, number, number] = [0, 0, 0];
- for (let i = 0; i < 3; ++i) {
- const c = parseInt(low.slice(adv * i, adv * i + adv), 16);
- result[i] = adv === 1 ? c << 4 : adv === 2 ? c : adv === 3 ? c >> 4 : c >> 8;
- }
- return result;
- }
- }
-
- // Named colors are currently not supported due to the large addition to the xterm.js bundle size
- // they would add. In order to support named colors, we would need some way of optionally loading
- // additional payloads so startup/download time is not bloated (see #3530).
-}
-
-// pad hex output to requested bit width
-function pad(n: number, bits: number): string {
- const s = n.toString(16);
- const s2 = s.length < 2 ? '0' + s : s;
- switch (bits) {
- case 4:
- return s[0];
- case 8:
- return s2;
- case 12:
- return (s2 + s2).slice(0, 3);
- default:
- return s2 + s2;
- }
-}
-
-/**
- * Convert a given color to rgb:../../.. string of `bits` depth.
- */
-export function toRgbString(color: [number, number, number], bits: number = 16): string {
- const [r, g, b] = color;
- return `rgb:${pad(r, bits)}/${pad(g, bits)}/${pad(b, bits)}`;
-}
diff --git a/node_modules/xterm/src/common/parser/Constants.ts b/node_modules/xterm/src/common/parser/Constants.ts
deleted file mode 100644
index 85156c3..0000000
--- a/node_modules/xterm/src/common/parser/Constants.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-/**
- * Internal states of EscapeSequenceParser.
- */
-export const enum ParserState {
- GROUND = 0,
- ESCAPE = 1,
- ESCAPE_INTERMEDIATE = 2,
- CSI_ENTRY = 3,
- CSI_PARAM = 4,
- CSI_INTERMEDIATE = 5,
- CSI_IGNORE = 6,
- SOS_PM_APC_STRING = 7,
- OSC_STRING = 8,
- DCS_ENTRY = 9,
- DCS_PARAM = 10,
- DCS_IGNORE = 11,
- DCS_INTERMEDIATE = 12,
- DCS_PASSTHROUGH = 13
-}
-
-/**
-* Internal actions of EscapeSequenceParser.
-*/
-export const enum ParserAction {
- IGNORE = 0,
- ERROR = 1,
- PRINT = 2,
- EXECUTE = 3,
- OSC_START = 4,
- OSC_PUT = 5,
- OSC_END = 6,
- CSI_DISPATCH = 7,
- PARAM = 8,
- COLLECT = 9,
- ESC_DISPATCH = 10,
- CLEAR = 11,
- DCS_HOOK = 12,
- DCS_PUT = 13,
- DCS_UNHOOK = 14
-}
-
-/**
- * Internal states of OscParser.
- */
-export const enum OscState {
- START = 0,
- ID = 1,
- PAYLOAD = 2,
- ABORT = 3
-}
-
-// payload limit for OSC and DCS
-export const PAYLOAD_LIMIT = 10000000;
diff --git a/node_modules/xterm/src/common/parser/DcsParser.ts b/node_modules/xterm/src/common/parser/DcsParser.ts
deleted file mode 100644
index b66524b..0000000
--- a/node_modules/xterm/src/common/parser/DcsParser.ts
+++ /dev/null
@@ -1,192 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IDisposable } from 'common/Types';
-import { IDcsHandler, IParams, IHandlerCollection, IDcsParser, DcsFallbackHandlerType, ISubParserStackState } from 'common/parser/Types';
-import { utf32ToString } from 'common/input/TextDecoder';
-import { Params } from 'common/parser/Params';
-import { PAYLOAD_LIMIT } from 'common/parser/Constants';
-
-const EMPTY_HANDLERS: IDcsHandler[] = [];
-
-export class DcsParser implements IDcsParser {
- private _handlers: IHandlerCollection<IDcsHandler> = Object.create(null);
- private _active: IDcsHandler[] = EMPTY_HANDLERS;
- private _ident: number = 0;
- private _handlerFb: DcsFallbackHandlerType = () => { };
- private _stack: ISubParserStackState = {
- paused: false,
- loopPosition: 0,
- fallThrough: false
- };
-
- public dispose(): void {
- this._handlers = Object.create(null);
- this._handlerFb = () => { };
- this._active = EMPTY_HANDLERS;
- }
-
- public registerHandler(ident: number, handler: IDcsHandler): IDisposable {
- if (this._handlers[ident] === undefined) {
- this._handlers[ident] = [];
- }
- const handlerList = this._handlers[ident];
- handlerList.push(handler);
- return {
- dispose: () => {
- const handlerIndex = handlerList.indexOf(handler);
- if (handlerIndex !== -1) {
- handlerList.splice(handlerIndex, 1);
- }
- }
- };
- }
-
- public clearHandler(ident: number): void {
- if (this._handlers[ident]) delete this._handlers[ident];
- }
-
- public setHandlerFallback(handler: DcsFallbackHandlerType): void {
- this._handlerFb = handler;
- }
-
- public reset(): void {
- // force cleanup leftover handlers
- if (this._active.length) {
- for (let j = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; j >= 0; --j) {
- this._active[j].unhook(false);
- }
- }
- this._stack.paused = false;
- this._active = EMPTY_HANDLERS;
- this._ident = 0;
- }
-
- public hook(ident: number, params: IParams): void {
- // always reset leftover handlers
- this.reset();
- this._ident = ident;
- this._active = this._handlers[ident] || EMPTY_HANDLERS;
- if (!this._active.length) {
- this._handlerFb(this._ident, 'HOOK', params);
- } else {
- for (let j = this._active.length - 1; j >= 0; j--) {
- this._active[j].hook(params);
- }
- }
- }
-
- public put(data: Uint32Array, start: number, end: number): void {
- if (!this._active.length) {
- this._handlerFb(this._ident, 'PUT', utf32ToString(data, start, end));
- } else {
- for (let j = this._active.length - 1; j >= 0; j--) {
- this._active[j].put(data, start, end);
- }
- }
- }
-
- public unhook(success: boolean, promiseResult: boolean = true): void | Promise<boolean> {
- if (!this._active.length) {
- this._handlerFb(this._ident, 'UNHOOK', success);
- } else {
- let handlerResult: boolean | Promise<boolean> = false;
- let j = this._active.length - 1;
- let fallThrough = false;
- if (this._stack.paused) {
- j = this._stack.loopPosition - 1;
- handlerResult = promiseResult;
- fallThrough = this._stack.fallThrough;
- this._stack.paused = false;
- }
- if (!fallThrough && handlerResult === false) {
- for (; j >= 0; j--) {
- handlerResult = this._active[j].unhook(success);
- if (handlerResult === true) {
- break;
- } else if (handlerResult instanceof Promise) {
- this._stack.paused = true;
- this._stack.loopPosition = j;
- this._stack.fallThrough = false;
- return handlerResult;
- }
- }
- j--;
- }
- // cleanup left over handlers (fallThrough for async)
- for (; j >= 0; j--) {
- handlerResult = this._active[j].unhook(false);
- if (handlerResult instanceof Promise) {
- this._stack.paused = true;
- this._stack.loopPosition = j;
- this._stack.fallThrough = true;
- return handlerResult;
- }
- }
- }
- this._active = EMPTY_HANDLERS;
- this._ident = 0;
- }
-}
-
-// predefine empty params as [0] (ZDM)
-const EMPTY_PARAMS = new Params();
-EMPTY_PARAMS.addParam(0);
-
-/**
- * Convenient class to create a DCS handler from a single callback function.
- * Note: The payload is currently limited to 50 MB (hardcoded).
- */
-export class DcsHandler implements IDcsHandler {
- private _data = '';
- private _params: IParams = EMPTY_PARAMS;
- private _hitLimit: boolean = false;
-
- constructor(private _handler: (data: string, params: IParams) => boolean | Promise<boolean>) { }
-
- public hook(params: IParams): void {
- // since we need to preserve params until `unhook`, we have to clone it
- // (only borrowed from parser and spans multiple parser states)
- // perf optimization:
- // clone only, if we have non empty params, otherwise stick with default
- this._params = (params.length > 1 || params.params[0]) ? params.clone() : EMPTY_PARAMS;
- this._data = '';
- this._hitLimit = false;
- }
-
- public put(data: Uint32Array, start: number, end: number): void {
- if (this._hitLimit) {
- return;
- }
- this._data += utf32ToString(data, start, end);
- if (this._data.length > PAYLOAD_LIMIT) {
- this._data = '';
- this._hitLimit = true;
- }
- }
-
- public unhook(success: boolean): boolean | Promise<boolean> {
- let ret: boolean | Promise<boolean> = false;
- if (this._hitLimit) {
- ret = false;
- } else if (success) {
- ret = this._handler(this._data, this._params);
- if (ret instanceof Promise) {
- // need to hold data and params until `ret` got resolved
- // dont care for errors, data will be freed anyway on next start
- return ret.then(res => {
- this._params = EMPTY_PARAMS;
- this._data = '';
- this._hitLimit = false;
- return res;
- });
- }
- }
- this._params = EMPTY_PARAMS;
- this._data = '';
- this._hitLimit = false;
- return ret;
- }
-}
diff --git a/node_modules/xterm/src/common/parser/EscapeSequenceParser.ts b/node_modules/xterm/src/common/parser/EscapeSequenceParser.ts
deleted file mode 100644
index f20a7e9..0000000
--- a/node_modules/xterm/src/common/parser/EscapeSequenceParser.ts
+++ /dev/null
@@ -1,796 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IParsingState, IDcsHandler, IEscapeSequenceParser, IParams, IOscHandler, IHandlerCollection, CsiHandlerType, OscFallbackHandlerType, IOscParser, EscHandlerType, IDcsParser, DcsFallbackHandlerType, IFunctionIdentifier, ExecuteFallbackHandlerType, CsiFallbackHandlerType, EscFallbackHandlerType, PrintHandlerType, PrintFallbackHandlerType, ExecuteHandlerType, IParserStackState, ParserStackType, ResumableHandlersType } from 'common/parser/Types';
-import { ParserState, ParserAction } from 'common/parser/Constants';
-import { Disposable } from 'common/Lifecycle';
-import { IDisposable } from 'common/Types';
-import { fill } from 'common/TypedArrayUtils';
-import { Params } from 'common/parser/Params';
-import { OscParser } from 'common/parser/OscParser';
-import { DcsParser } from 'common/parser/DcsParser';
-
-/**
- * Table values are generated like this:
- * index: currentState << TableValue.INDEX_STATE_SHIFT | charCode
- * value: action << TableValue.TRANSITION_ACTION_SHIFT | nextState
- */
-const enum TableAccess {
- TRANSITION_ACTION_SHIFT = 4,
- TRANSITION_STATE_MASK = 15,
- INDEX_STATE_SHIFT = 8
-}
-
-/**
- * Transition table for EscapeSequenceParser.
- */
-export class TransitionTable {
- public table: Uint8Array;
-
- constructor(length: number) {
- this.table = new Uint8Array(length);
- }
-
- /**
- * Set default transition.
- * @param action default action
- * @param next default next state
- */
- public setDefault(action: ParserAction, next: ParserState): void {
- fill(this.table, action << TableAccess.TRANSITION_ACTION_SHIFT | next);
- }
-
- /**
- * Add a transition to the transition table.
- * @param code input character code
- * @param state current parser state
- * @param action parser action to be done
- * @param next next parser state
- */
- public add(code: number, state: ParserState, action: ParserAction, next: ParserState): void {
- this.table[state << TableAccess.INDEX_STATE_SHIFT | code] = action << TableAccess.TRANSITION_ACTION_SHIFT | next;
- }
-
- /**
- * Add transitions for multiple input character codes.
- * @param codes input character code array
- * @param state current parser state
- * @param action parser action to be done
- * @param next next parser state
- */
- public addMany(codes: number[], state: ParserState, action: ParserAction, next: ParserState): void {
- for (let i = 0; i < codes.length; i++) {
- this.table[state << TableAccess.INDEX_STATE_SHIFT | codes[i]] = action << TableAccess.TRANSITION_ACTION_SHIFT | next;
- }
- }
-}
-
-
-// Pseudo-character placeholder for printable non-ascii characters (unicode).
-const NON_ASCII_PRINTABLE = 0xA0;
-
-
-/**
- * VT500 compatible transition table.
- * Taken from https://vt100.net/emu/dec_ansi_parser.
- */
-export const VT500_TRANSITION_TABLE = (function (): TransitionTable {
- const table: TransitionTable = new TransitionTable(4095);
-
- // range macro for byte
- const BYTE_VALUES = 256;
- const blueprint = Array.apply(null, Array(BYTE_VALUES)).map((unused: any, i: number) => i);
- const r = (start: number, end: number): number[] => blueprint.slice(start, end);
-
- // Default definitions.
- const PRINTABLES = r(0x20, 0x7f); // 0x20 (SP) included, 0x7F (DEL) excluded
- const EXECUTABLES = r(0x00, 0x18);
- EXECUTABLES.push(0x19);
- EXECUTABLES.push.apply(EXECUTABLES, r(0x1c, 0x20));
-
- const states: number[] = r(ParserState.GROUND, ParserState.DCS_PASSTHROUGH + 1);
- let state: any;
-
- // set default transition
- table.setDefault(ParserAction.ERROR, ParserState.GROUND);
- // printables
- table.addMany(PRINTABLES, ParserState.GROUND, ParserAction.PRINT, ParserState.GROUND);
- // global anywhere rules
- for (state in states) {
- table.addMany([0x18, 0x1a, 0x99, 0x9a], state, ParserAction.EXECUTE, ParserState.GROUND);
- table.addMany(r(0x80, 0x90), state, ParserAction.EXECUTE, ParserState.GROUND);
- table.addMany(r(0x90, 0x98), state, ParserAction.EXECUTE, ParserState.GROUND);
- table.add(0x9c, state, ParserAction.IGNORE, ParserState.GROUND); // ST as terminator
- table.add(0x1b, state, ParserAction.CLEAR, ParserState.ESCAPE); // ESC
- table.add(0x9d, state, ParserAction.OSC_START, ParserState.OSC_STRING); // OSC
- table.addMany([0x98, 0x9e, 0x9f], state, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);
- table.add(0x9b, state, ParserAction.CLEAR, ParserState.CSI_ENTRY); // CSI
- table.add(0x90, state, ParserAction.CLEAR, ParserState.DCS_ENTRY); // DCS
- }
- // rules for executables and 7f
- table.addMany(EXECUTABLES, ParserState.GROUND, ParserAction.EXECUTE, ParserState.GROUND);
- table.addMany(EXECUTABLES, ParserState.ESCAPE, ParserAction.EXECUTE, ParserState.ESCAPE);
- table.add(0x7f, ParserState.ESCAPE, ParserAction.IGNORE, ParserState.ESCAPE);
- table.addMany(EXECUTABLES, ParserState.OSC_STRING, ParserAction.IGNORE, ParserState.OSC_STRING);
- table.addMany(EXECUTABLES, ParserState.CSI_ENTRY, ParserAction.EXECUTE, ParserState.CSI_ENTRY);
- table.add(0x7f, ParserState.CSI_ENTRY, ParserAction.IGNORE, ParserState.CSI_ENTRY);
- table.addMany(EXECUTABLES, ParserState.CSI_PARAM, ParserAction.EXECUTE, ParserState.CSI_PARAM);
- table.add(0x7f, ParserState.CSI_PARAM, ParserAction.IGNORE, ParserState.CSI_PARAM);
- table.addMany(EXECUTABLES, ParserState.CSI_IGNORE, ParserAction.EXECUTE, ParserState.CSI_IGNORE);
- table.addMany(EXECUTABLES, ParserState.CSI_INTERMEDIATE, ParserAction.EXECUTE, ParserState.CSI_INTERMEDIATE);
- table.add(0x7f, ParserState.CSI_INTERMEDIATE, ParserAction.IGNORE, ParserState.CSI_INTERMEDIATE);
- table.addMany(EXECUTABLES, ParserState.ESCAPE_INTERMEDIATE, ParserAction.EXECUTE, ParserState.ESCAPE_INTERMEDIATE);
- table.add(0x7f, ParserState.ESCAPE_INTERMEDIATE, ParserAction.IGNORE, ParserState.ESCAPE_INTERMEDIATE);
- // osc
- table.add(0x5d, ParserState.ESCAPE, ParserAction.OSC_START, ParserState.OSC_STRING);
- table.addMany(PRINTABLES, ParserState.OSC_STRING, ParserAction.OSC_PUT, ParserState.OSC_STRING);
- table.add(0x7f, ParserState.OSC_STRING, ParserAction.OSC_PUT, ParserState.OSC_STRING);
- table.addMany([0x9c, 0x1b, 0x18, 0x1a, 0x07], ParserState.OSC_STRING, ParserAction.OSC_END, ParserState.GROUND);
- table.addMany(r(0x1c, 0x20), ParserState.OSC_STRING, ParserAction.IGNORE, ParserState.OSC_STRING);
- // sos/pm/apc does nothing
- table.addMany([0x58, 0x5e, 0x5f], ParserState.ESCAPE, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);
- table.addMany(PRINTABLES, ParserState.SOS_PM_APC_STRING, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);
- table.addMany(EXECUTABLES, ParserState.SOS_PM_APC_STRING, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);
- table.add(0x9c, ParserState.SOS_PM_APC_STRING, ParserAction.IGNORE, ParserState.GROUND);
- table.add(0x7f, ParserState.SOS_PM_APC_STRING, ParserAction.IGNORE, ParserState.SOS_PM_APC_STRING);
- // csi entries
- table.add(0x5b, ParserState.ESCAPE, ParserAction.CLEAR, ParserState.CSI_ENTRY);
- table.addMany(r(0x40, 0x7f), ParserState.CSI_ENTRY, ParserAction.CSI_DISPATCH, ParserState.GROUND);
- table.addMany(r(0x30, 0x3c), ParserState.CSI_ENTRY, ParserAction.PARAM, ParserState.CSI_PARAM);
- table.addMany([0x3c, 0x3d, 0x3e, 0x3f], ParserState.CSI_ENTRY, ParserAction.COLLECT, ParserState.CSI_PARAM);
- table.addMany(r(0x30, 0x3c), ParserState.CSI_PARAM, ParserAction.PARAM, ParserState.CSI_PARAM);
- table.addMany(r(0x40, 0x7f), ParserState.CSI_PARAM, ParserAction.CSI_DISPATCH, ParserState.GROUND);
- table.addMany([0x3c, 0x3d, 0x3e, 0x3f], ParserState.CSI_PARAM, ParserAction.IGNORE, ParserState.CSI_IGNORE);
- table.addMany(r(0x20, 0x40), ParserState.CSI_IGNORE, ParserAction.IGNORE, ParserState.CSI_IGNORE);
- table.add(0x7f, ParserState.CSI_IGNORE, ParserAction.IGNORE, ParserState.CSI_IGNORE);
- table.addMany(r(0x40, 0x7f), ParserState.CSI_IGNORE, ParserAction.IGNORE, ParserState.GROUND);
- table.addMany(r(0x20, 0x30), ParserState.CSI_ENTRY, ParserAction.COLLECT, ParserState.CSI_INTERMEDIATE);
- table.addMany(r(0x20, 0x30), ParserState.CSI_INTERMEDIATE, ParserAction.COLLECT, ParserState.CSI_INTERMEDIATE);
- table.addMany(r(0x30, 0x40), ParserState.CSI_INTERMEDIATE, ParserAction.IGNORE, ParserState.CSI_IGNORE);
- table.addMany(r(0x40, 0x7f), ParserState.CSI_INTERMEDIATE, ParserAction.CSI_DISPATCH, ParserState.GROUND);
- table.addMany(r(0x20, 0x30), ParserState.CSI_PARAM, ParserAction.COLLECT, ParserState.CSI_INTERMEDIATE);
- // esc_intermediate
- table.addMany(r(0x20, 0x30), ParserState.ESCAPE, ParserAction.COLLECT, ParserState.ESCAPE_INTERMEDIATE);
- table.addMany(r(0x20, 0x30), ParserState.ESCAPE_INTERMEDIATE, ParserAction.COLLECT, ParserState.ESCAPE_INTERMEDIATE);
- table.addMany(r(0x30, 0x7f), ParserState.ESCAPE_INTERMEDIATE, ParserAction.ESC_DISPATCH, ParserState.GROUND);
- table.addMany(r(0x30, 0x50), ParserState.ESCAPE, ParserAction.ESC_DISPATCH, ParserState.GROUND);
- table.addMany(r(0x51, 0x58), ParserState.ESCAPE, ParserAction.ESC_DISPATCH, ParserState.GROUND);
- table.addMany([0x59, 0x5a, 0x5c], ParserState.ESCAPE, ParserAction.ESC_DISPATCH, ParserState.GROUND);
- table.addMany(r(0x60, 0x7f), ParserState.ESCAPE, ParserAction.ESC_DISPATCH, ParserState.GROUND);
- // dcs entry
- table.add(0x50, ParserState.ESCAPE, ParserAction.CLEAR, ParserState.DCS_ENTRY);
- table.addMany(EXECUTABLES, ParserState.DCS_ENTRY, ParserAction.IGNORE, ParserState.DCS_ENTRY);
- table.add(0x7f, ParserState.DCS_ENTRY, ParserAction.IGNORE, ParserState.DCS_ENTRY);
- table.addMany(r(0x1c, 0x20), ParserState.DCS_ENTRY, ParserAction.IGNORE, ParserState.DCS_ENTRY);
- table.addMany(r(0x20, 0x30), ParserState.DCS_ENTRY, ParserAction.COLLECT, ParserState.DCS_INTERMEDIATE);
- table.addMany(r(0x30, 0x3c), ParserState.DCS_ENTRY, ParserAction.PARAM, ParserState.DCS_PARAM);
- table.addMany([0x3c, 0x3d, 0x3e, 0x3f], ParserState.DCS_ENTRY, ParserAction.COLLECT, ParserState.DCS_PARAM);
- table.addMany(EXECUTABLES, ParserState.DCS_IGNORE, ParserAction.IGNORE, ParserState.DCS_IGNORE);
- table.addMany(r(0x20, 0x80), ParserState.DCS_IGNORE, ParserAction.IGNORE, ParserState.DCS_IGNORE);
- table.addMany(r(0x1c, 0x20), ParserState.DCS_IGNORE, ParserAction.IGNORE, ParserState.DCS_IGNORE);
- table.addMany(EXECUTABLES, ParserState.DCS_PARAM, ParserAction.IGNORE, ParserState.DCS_PARAM);
- table.add(0x7f, ParserState.DCS_PARAM, ParserAction.IGNORE, ParserState.DCS_PARAM);
- table.addMany(r(0x1c, 0x20), ParserState.DCS_PARAM, ParserAction.IGNORE, ParserState.DCS_PARAM);
- table.addMany(r(0x30, 0x3c), ParserState.DCS_PARAM, ParserAction.PARAM, ParserState.DCS_PARAM);
- table.addMany([0x3c, 0x3d, 0x3e, 0x3f], ParserState.DCS_PARAM, ParserAction.IGNORE, ParserState.DCS_IGNORE);
- table.addMany(r(0x20, 0x30), ParserState.DCS_PARAM, ParserAction.COLLECT, ParserState.DCS_INTERMEDIATE);
- table.addMany(EXECUTABLES, ParserState.DCS_INTERMEDIATE, ParserAction.IGNORE, ParserState.DCS_INTERMEDIATE);
- table.add(0x7f, ParserState.DCS_INTERMEDIATE, ParserAction.IGNORE, ParserState.DCS_INTERMEDIATE);
- table.addMany(r(0x1c, 0x20), ParserState.DCS_INTERMEDIATE, ParserAction.IGNORE, ParserState.DCS_INTERMEDIATE);
- table.addMany(r(0x20, 0x30), ParserState.DCS_INTERMEDIATE, ParserAction.COLLECT, ParserState.DCS_INTERMEDIATE);
- table.addMany(r(0x30, 0x40), ParserState.DCS_INTERMEDIATE, ParserAction.IGNORE, ParserState.DCS_IGNORE);
- table.addMany(r(0x40, 0x7f), ParserState.DCS_INTERMEDIATE, ParserAction.DCS_HOOK, ParserState.DCS_PASSTHROUGH);
- table.addMany(r(0x40, 0x7f), ParserState.DCS_PARAM, ParserAction.DCS_HOOK, ParserState.DCS_PASSTHROUGH);
- table.addMany(r(0x40, 0x7f), ParserState.DCS_ENTRY, ParserAction.DCS_HOOK, ParserState.DCS_PASSTHROUGH);
- table.addMany(EXECUTABLES, ParserState.DCS_PASSTHROUGH, ParserAction.DCS_PUT, ParserState.DCS_PASSTHROUGH);
- table.addMany(PRINTABLES, ParserState.DCS_PASSTHROUGH, ParserAction.DCS_PUT, ParserState.DCS_PASSTHROUGH);
- table.add(0x7f, ParserState.DCS_PASSTHROUGH, ParserAction.IGNORE, ParserState.DCS_PASSTHROUGH);
- table.addMany([0x1b, 0x9c, 0x18, 0x1a], ParserState.DCS_PASSTHROUGH, ParserAction.DCS_UNHOOK, ParserState.GROUND);
- // special handling of unicode chars
- table.add(NON_ASCII_PRINTABLE, ParserState.GROUND, ParserAction.PRINT, ParserState.GROUND);
- table.add(NON_ASCII_PRINTABLE, ParserState.OSC_STRING, ParserAction.OSC_PUT, ParserState.OSC_STRING);
- table.add(NON_ASCII_PRINTABLE, ParserState.CSI_IGNORE, ParserAction.IGNORE, ParserState.CSI_IGNORE);
- table.add(NON_ASCII_PRINTABLE, ParserState.DCS_IGNORE, ParserAction.IGNORE, ParserState.DCS_IGNORE);
- table.add(NON_ASCII_PRINTABLE, ParserState.DCS_PASSTHROUGH, ParserAction.DCS_PUT, ParserState.DCS_PASSTHROUGH);
- return table;
-})();
-
-
-/**
- * EscapeSequenceParser.
- * This class implements the ANSI/DEC compatible parser described by
- * Paul Williams (https://vt100.net/emu/dec_ansi_parser).
- *
- * To implement custom ANSI compliant escape sequences it is not needed to
- * alter this parser, instead consider registering a custom handler.
- * For non ANSI compliant sequences change the transition table with
- * the optional `transitions` constructor argument and
- * reimplement the `parse` method.
- *
- * This parser is currently hardcoded to operate in ZDM (Zero Default Mode)
- * as suggested by the original parser, thus empty parameters are set to 0.
- * This this is not in line with the latest ECMA-48 specification
- * (ZDM was part of the early specs and got completely removed later on).
- *
- * Other than the original parser from vt100.net this parser supports
- * sub parameters in digital parameters separated by colons. Empty sub parameters
- * are set to -1 (no ZDM for sub parameters).
- *
- * About prefix and intermediate bytes:
- * This parser follows the assumptions of the vt100.net parser with these restrictions:
- * - only one prefix byte is allowed as first parameter byte, byte range 0x3c .. 0x3f
- * - max. two intermediates are respected, byte range 0x20 .. 0x2f
- * Note that this is not in line with ECMA-48 which does not limit either of those.
- * Furthermore ECMA-48 allows the prefix byte range at any param byte position. Currently
- * there are no known sequences that follow the broader definition of the specification.
- *
- * TODO: implement error recovery hook via error handler return values
- */
-export class EscapeSequenceParser extends Disposable implements IEscapeSequenceParser {
- public initialState: number;
- public currentState: number;
- public precedingCodepoint: number;
-
- // buffers over several parse calls
- protected _params: Params;
- protected _collect: number;
-
- // handler lookup containers
- protected _printHandler: PrintHandlerType;
- protected _executeHandlers: { [flag: number]: ExecuteHandlerType };
- protected _csiHandlers: IHandlerCollection<CsiHandlerType>;
- protected _escHandlers: IHandlerCollection<EscHandlerType>;
- protected _oscParser: IOscParser;
- protected _dcsParser: IDcsParser;
- protected _errorHandler: (state: IParsingState) => IParsingState;
-
- // fallback handlers
- protected _printHandlerFb: PrintFallbackHandlerType;
- protected _executeHandlerFb: ExecuteFallbackHandlerType;
- protected _csiHandlerFb: CsiFallbackHandlerType;
- protected _escHandlerFb: EscFallbackHandlerType;
- protected _errorHandlerFb: (state: IParsingState) => IParsingState;
-
- // parser stack save for async handler support
- protected _parseStack: IParserStackState = {
- state: ParserStackType.NONE,
- handlers: [],
- handlerPos: 0,
- transition: 0,
- chunkPos: 0
- };
-
- constructor(
- protected readonly _transitions: TransitionTable = VT500_TRANSITION_TABLE
- ) {
- super();
-
- this.initialState = ParserState.GROUND;
- this.currentState = this.initialState;
- this._params = new Params(); // defaults to 32 storable params/subparams
- this._params.addParam(0); // ZDM
- this._collect = 0;
- this.precedingCodepoint = 0;
-
- // set default fallback handlers and handler lookup containers
- this._printHandlerFb = (data, start, end): void => { };
- this._executeHandlerFb = (code: number): void => { };
- this._csiHandlerFb = (ident: number, params: IParams): void => { };
- this._escHandlerFb = (ident: number): void => { };
- this._errorHandlerFb = (state: IParsingState): IParsingState => state;
- this._printHandler = this._printHandlerFb;
- this._executeHandlers = Object.create(null);
- this._csiHandlers = Object.create(null);
- this._escHandlers = Object.create(null);
- this._oscParser = new OscParser();
- this._dcsParser = new DcsParser();
- this._errorHandler = this._errorHandlerFb;
-
- // swallow 7bit ST (ESC+\)
- this.registerEscHandler({ final: '\\' }, () => true);
- }
-
- protected _identifier(id: IFunctionIdentifier, finalRange: number[] = [0x40, 0x7e]): number {
- let res = 0;
- if (id.prefix) {
- if (id.prefix.length > 1) {
- throw new Error('only one byte as prefix supported');
- }
- res = id.prefix.charCodeAt(0);
- if (res && 0x3c > res || res > 0x3f) {
- throw new Error('prefix must be in range 0x3c .. 0x3f');
- }
- }
- if (id.intermediates) {
- if (id.intermediates.length > 2) {
- throw new Error('only two bytes as intermediates are supported');
- }
- for (let i = 0; i < id.intermediates.length; ++i) {
- const intermediate = id.intermediates.charCodeAt(i);
- if (0x20 > intermediate || intermediate > 0x2f) {
- throw new Error('intermediate must be in range 0x20 .. 0x2f');
- }
- res <<= 8;
- res |= intermediate;
- }
- }
- if (id.final.length !== 1) {
- throw new Error('final must be a single byte');
- }
- const finalCode = id.final.charCodeAt(0);
- if (finalRange[0] > finalCode || finalCode > finalRange[1]) {
- throw new Error(`final must be in range ${finalRange[0]} .. ${finalRange[1]}`);
- }
- res <<= 8;
- res |= finalCode;
-
- return res;
- }
-
- public identToString(ident: number): string {
- const res: string[] = [];
- while (ident) {
- res.push(String.fromCharCode(ident & 0xFF));
- ident >>= 8;
- }
- return res.reverse().join('');
- }
-
- public dispose(): void {
- this._csiHandlers = Object.create(null);
- this._executeHandlers = Object.create(null);
- this._escHandlers = Object.create(null);
- this._oscParser.dispose();
- this._dcsParser.dispose();
- }
-
- public setPrintHandler(handler: PrintHandlerType): void {
- this._printHandler = handler;
- }
- public clearPrintHandler(): void {
- this._printHandler = this._printHandlerFb;
- }
-
- public registerEscHandler(id: IFunctionIdentifier, handler: EscHandlerType): IDisposable {
- const ident = this._identifier(id, [0x30, 0x7e]);
- if (this._escHandlers[ident] === undefined) {
- this._escHandlers[ident] = [];
- }
- const handlerList = this._escHandlers[ident];
- handlerList.push(handler);
- return {
- dispose: () => {
- const handlerIndex = handlerList.indexOf(handler);
- if (handlerIndex !== -1) {
- handlerList.splice(handlerIndex, 1);
- }
- }
- };
- }
- public clearEscHandler(id: IFunctionIdentifier): void {
- if (this._escHandlers[this._identifier(id, [0x30, 0x7e])]) delete this._escHandlers[this._identifier(id, [0x30, 0x7e])];
- }
- public setEscHandlerFallback(handler: EscFallbackHandlerType): void {
- this._escHandlerFb = handler;
- }
-
- public setExecuteHandler(flag: string, handler: ExecuteHandlerType): void {
- this._executeHandlers[flag.charCodeAt(0)] = handler;
- }
- public clearExecuteHandler(flag: string): void {
- if (this._executeHandlers[flag.charCodeAt(0)]) delete this._executeHandlers[flag.charCodeAt(0)];
- }
- public setExecuteHandlerFallback(handler: ExecuteFallbackHandlerType): void {
- this._executeHandlerFb = handler;
- }
-
- public registerCsiHandler(id: IFunctionIdentifier, handler: CsiHandlerType): IDisposable {
- const ident = this._identifier(id);
- if (this._csiHandlers[ident] === undefined) {
- this._csiHandlers[ident] = [];
- }
- const handlerList = this._csiHandlers[ident];
- handlerList.push(handler);
- return {
- dispose: () => {
- const handlerIndex = handlerList.indexOf(handler);
- if (handlerIndex !== -1) {
- handlerList.splice(handlerIndex, 1);
- }
- }
- };
- }
- public clearCsiHandler(id: IFunctionIdentifier): void {
- if (this._csiHandlers[this._identifier(id)]) delete this._csiHandlers[this._identifier(id)];
- }
- public setCsiHandlerFallback(callback: (ident: number, params: IParams) => void): void {
- this._csiHandlerFb = callback;
- }
-
- public registerDcsHandler(id: IFunctionIdentifier, handler: IDcsHandler): IDisposable {
- return this._dcsParser.registerHandler(this._identifier(id), handler);
- }
- public clearDcsHandler(id: IFunctionIdentifier): void {
- this._dcsParser.clearHandler(this._identifier(id));
- }
- public setDcsHandlerFallback(handler: DcsFallbackHandlerType): void {
- this._dcsParser.setHandlerFallback(handler);
- }
-
- public registerOscHandler(ident: number, handler: IOscHandler): IDisposable {
- return this._oscParser.registerHandler(ident, handler);
- }
- public clearOscHandler(ident: number): void {
- this._oscParser.clearHandler(ident);
- }
- public setOscHandlerFallback(handler: OscFallbackHandlerType): void {
- this._oscParser.setHandlerFallback(handler);
- }
-
- public setErrorHandler(callback: (state: IParsingState) => IParsingState): void {
- this._errorHandler = callback;
- }
- public clearErrorHandler(): void {
- this._errorHandler = this._errorHandlerFb;
- }
-
- /**
- * Reset parser to initial values.
- *
- * This can also be used to lift the improper continuation error condition
- * when dealing with async handlers. Use this only as a last resort to silence
- * that error when the terminal has no pending data to be processed. Note that
- * the interrupted async handler might continue its work in the future messing
- * up the terminal state even further.
- */
- public reset(): void {
- this.currentState = this.initialState;
- this._oscParser.reset();
- this._dcsParser.reset();
- this._params.reset();
- this._params.addParam(0); // ZDM
- this._collect = 0;
- this.precedingCodepoint = 0;
- // abort pending continuation from async handler
- // Here the RESET type indicates, that the next parse call will
- // ignore any saved stack, instead continues sync with next codepoint from GROUND
- if (this._parseStack.state !== ParserStackType.NONE) {
- this._parseStack.state = ParserStackType.RESET;
- this._parseStack.handlers = []; // also release handlers ref
- }
- }
-
- /**
- * Async parse support.
- */
- protected _preserveStack(
- state: ParserStackType,
- handlers: ResumableHandlersType,
- handlerPos: number,
- transition: number,
- chunkPos: number
- ): void {
- this._parseStack.state = state;
- this._parseStack.handlers = handlers;
- this._parseStack.handlerPos = handlerPos;
- this._parseStack.transition = transition;
- this._parseStack.chunkPos = chunkPos;
- }
-
- /**
- * Parse UTF32 codepoints in `data` up to `length`.
- *
- * Note: For several actions with high data load the parsing is optimized
- * by using local read ahead loops with hardcoded conditions to
- * avoid costly table lookups. Make sure that any change of table values
- * will be reflected in the loop conditions as well and vice versa.
- * Affected states/actions:
- * - GROUND:PRINT
- * - CSI_PARAM:PARAM
- * - DCS_PARAM:PARAM
- * - OSC_STRING:OSC_PUT
- * - DCS_PASSTHROUGH:DCS_PUT
- *
- * Note on asynchronous handler support:
- * Any handler returning a promise will be treated as asynchronous.
- * To keep the in-band blocking working for async handlers, `parse` pauses execution,
- * creates a stack save and returns the promise to the caller.
- * For proper continuation of the paused state it is important
- * to await the promise resolving. On resolve the parse must be repeated
- * with the same chunk of data and the resolved value in `promiseResult`
- * until no promise is returned.
- *
- * Important: With only sync handlers defined, parsing is completely synchronous as well.
- * As soon as an async handler is involved, synchronous parsing is not possible anymore.
- *
- * Boilerplate for proper parsing of multiple chunks with async handlers:
- *
- * ```typescript
- * async function parseMultipleChunks(chunks: Uint32Array[]): Promise<void> {
- * for (const chunk of chunks) {
- * let result: void | Promise<boolean>;
- * let prev: boolean | undefined;
- * while (result = parser.parse(chunk, chunk.length, prev)) {
- * prev = await result;
- * }
- * }
- * // finished parsing all chunks...
- * }
- * ```
- */
- public parse(data: Uint32Array, length: number, promiseResult?: boolean): void | Promise<boolean> {
- let code = 0;
- let transition = 0;
- let start = 0;
- let handlerResult: void | boolean | Promise<boolean>;
-
- // resume from async handler
- if (this._parseStack.state) {
- // allow sync parser reset even in continuation mode
- // Note: can be used to recover parser from improper continuation error below
- if (this._parseStack.state === ParserStackType.RESET) {
- this._parseStack.state = ParserStackType.NONE;
- start = this._parseStack.chunkPos + 1; // continue with next codepoint in GROUND
- } else {
- if (promiseResult === undefined || this._parseStack.state === ParserStackType.FAIL) {
- /**
- * Reject further parsing on improper continuation after pausing.
- * This is a really bad condition with screwed up execution order and prolly messed up
- * terminal state, therefore we exit hard with an exception and reject any further parsing.
- *
- * Note: With `Terminal.write` usage this exception should never occur, as the top level
- * calls are guaranteed to handle async conditions properly. If you ever encounter this
- * exception in your terminal integration it indicates, that you injected data chunks to
- * `InputHandler.parse` or `EscapeSequenceParser.parse` synchronously without waiting for
- * continuation of a running async handler.
- *
- * It is possible to get rid of this error by calling `reset`. But dont rely on that,
- * as the pending async handler still might mess up the terminal later. Instead fix the faulty
- * async handling, so this error will not be thrown anymore.
- */
- this._parseStack.state = ParserStackType.FAIL;
- throw new Error('improper continuation due to previous async handler, giving up parsing');
- }
-
- // we have to resume the old handler loop if:
- // - return value of the promise was `false`
- // - handlers are not exhausted yet
- const handlers = this._parseStack.handlers;
- let handlerPos = this._parseStack.handlerPos - 1;
- switch (this._parseStack.state) {
- case ParserStackType.CSI:
- if (promiseResult === false && handlerPos > -1) {
- for (; handlerPos >= 0; handlerPos--) {
- handlerResult = (handlers as CsiHandlerType[])[handlerPos](this._params);
- if (handlerResult === true) {
- break;
- } else if (handlerResult instanceof Promise) {
- this._parseStack.handlerPos = handlerPos;
- return handlerResult;
- }
- }
- }
- this._parseStack.handlers = [];
- break;
- case ParserStackType.ESC:
- if (promiseResult === false && handlerPos > -1) {
- for (; handlerPos >= 0; handlerPos--) {
- handlerResult = (handlers as EscHandlerType[])[handlerPos]();
- if (handlerResult === true) {
- break;
- } else if (handlerResult instanceof Promise) {
- this._parseStack.handlerPos = handlerPos;
- return handlerResult;
- }
- }
- }
- this._parseStack.handlers = [];
- break;
- case ParserStackType.DCS:
- code = data[this._parseStack.chunkPos];
- handlerResult = this._dcsParser.unhook(code !== 0x18 && code !== 0x1a, promiseResult);
- if (handlerResult) {
- return handlerResult;
- }
- if (code === 0x1b) this._parseStack.transition |= ParserState.ESCAPE;
- this._params.reset();
- this._params.addParam(0); // ZDM
- this._collect = 0;
- break;
- case ParserStackType.OSC:
- code = data[this._parseStack.chunkPos];
- handlerResult = this._oscParser.end(code !== 0x18 && code !== 0x1a, promiseResult);
- if (handlerResult) {
- return handlerResult;
- }
- if (code === 0x1b) this._parseStack.transition |= ParserState.ESCAPE;
- this._params.reset();
- this._params.addParam(0); // ZDM
- this._collect = 0;
- break;
- }
- // cleanup before continuing with the main sync loop
- this._parseStack.state = ParserStackType.NONE;
- start = this._parseStack.chunkPos + 1;
- this.precedingCodepoint = 0;
- this.currentState = this._parseStack.transition & TableAccess.TRANSITION_STATE_MASK;
- }
- }
-
- // continue with main sync loop
-
- // process input string
- for (let i = start; i < length; ++i) {
- code = data[i];
-
- // normal transition & action lookup
- transition = this._transitions.table[this.currentState << TableAccess.INDEX_STATE_SHIFT | (code < 0xa0 ? code : NON_ASCII_PRINTABLE)];
- switch (transition >> TableAccess.TRANSITION_ACTION_SHIFT) {
- case ParserAction.PRINT:
- // read ahead with loop unrolling
- // Note: 0x20 (SP) is included, 0x7F (DEL) is excluded
- for (let j = i + 1; ; ++j) {
- if (j >= length || (code = data[j]) < 0x20 || (code > 0x7e && code < NON_ASCII_PRINTABLE)) {
- this._printHandler(data, i, j);
- i = j - 1;
- break;
- }
- if (++j >= length || (code = data[j]) < 0x20 || (code > 0x7e && code < NON_ASCII_PRINTABLE)) {
- this._printHandler(data, i, j);
- i = j - 1;
- break;
- }
- if (++j >= length || (code = data[j]) < 0x20 || (code > 0x7e && code < NON_ASCII_PRINTABLE)) {
- this._printHandler(data, i, j);
- i = j - 1;
- break;
- }
- if (++j >= length || (code = data[j]) < 0x20 || (code > 0x7e && code < NON_ASCII_PRINTABLE)) {
- this._printHandler(data, i, j);
- i = j - 1;
- break;
- }
- }
- break;
- case ParserAction.EXECUTE:
- if (this._executeHandlers[code]) this._executeHandlers[code]();
- else this._executeHandlerFb(code);
- this.precedingCodepoint = 0;
- break;
- case ParserAction.IGNORE:
- break;
- case ParserAction.ERROR:
- const inject: IParsingState = this._errorHandler(
- {
- position: i,
- code,
- currentState: this.currentState,
- collect: this._collect,
- params: this._params,
- abort: false
- });
- if (inject.abort) return;
- // inject values: currently not implemented
- break;
- case ParserAction.CSI_DISPATCH:
- // Trigger CSI Handler
- const handlers = this._csiHandlers[this._collect << 8 | code];
- let j = handlers ? handlers.length - 1 : -1;
- for (; j >= 0; j--) {
- // true means success and to stop bubbling
- // a promise indicates an async handler that needs to finish before progressing
- handlerResult = handlers[j](this._params);
- if (handlerResult === true) {
- break;
- } else if (handlerResult instanceof Promise) {
- this._preserveStack(ParserStackType.CSI, handlers, j, transition, i);
- return handlerResult;
- }
- }
- if (j < 0) {
- this._csiHandlerFb(this._collect << 8 | code, this._params);
- }
- this.precedingCodepoint = 0;
- break;
- case ParserAction.PARAM:
- // inner loop: digits (0x30 - 0x39) and ; (0x3b) and : (0x3a)
- do {
- switch (code) {
- case 0x3b:
- this._params.addParam(0); // ZDM
- break;
- case 0x3a:
- this._params.addSubParam(-1);
- break;
- default: // 0x30 - 0x39
- this._params.addDigit(code - 48);
- }
- } while (++i < length && (code = data[i]) > 0x2f && code < 0x3c);
- i--;
- break;
- case ParserAction.COLLECT:
- this._collect <<= 8;
- this._collect |= code;
- break;
- case ParserAction.ESC_DISPATCH:
- const handlersEsc = this._escHandlers[this._collect << 8 | code];
- let jj = handlersEsc ? handlersEsc.length - 1 : -1;
- for (; jj >= 0; jj--) {
- // true means success and to stop bubbling
- // a promise indicates an async handler that needs to finish before progressing
- handlerResult = handlersEsc[jj]();
- if (handlerResult === true) {
- break;
- } else if (handlerResult instanceof Promise) {
- this._preserveStack(ParserStackType.ESC, handlersEsc, jj, transition, i);
- return handlerResult;
- }
- }
- if (jj < 0) {
- this._escHandlerFb(this._collect << 8 | code);
- }
- this.precedingCodepoint = 0;
- break;
- case ParserAction.CLEAR:
- this._params.reset();
- this._params.addParam(0); // ZDM
- this._collect = 0;
- break;
- case ParserAction.DCS_HOOK:
- this._dcsParser.hook(this._collect << 8 | code, this._params);
- break;
- case ParserAction.DCS_PUT:
- // inner loop - exit DCS_PUT: 0x18, 0x1a, 0x1b, 0x7f, 0x80 - 0x9f
- // unhook triggered by: 0x1b, 0x9c (success) and 0x18, 0x1a (abort)
- for (let j = i + 1; ; ++j) {
- if (j >= length || (code = data[j]) === 0x18 || code === 0x1a || code === 0x1b || (code > 0x7f && code < NON_ASCII_PRINTABLE)) {
- this._dcsParser.put(data, i, j);
- i = j - 1;
- break;
- }
- }
- break;
- case ParserAction.DCS_UNHOOK:
- handlerResult = this._dcsParser.unhook(code !== 0x18 && code !== 0x1a);
- if (handlerResult) {
- this._preserveStack(ParserStackType.DCS, [], 0, transition, i);
- return handlerResult;
- }
- if (code === 0x1b) transition |= ParserState.ESCAPE;
- this._params.reset();
- this._params.addParam(0); // ZDM
- this._collect = 0;
- this.precedingCodepoint = 0;
- break;
- case ParserAction.OSC_START:
- this._oscParser.start();
- break;
- case ParserAction.OSC_PUT:
- // inner loop: 0x20 (SP) included, 0x7F (DEL) included
- for (let j = i + 1; ; j++) {
- if (j >= length || (code = data[j]) < 0x20 || (code > 0x7f && code < NON_ASCII_PRINTABLE)) {
- this._oscParser.put(data, i, j);
- i = j - 1;
- break;
- }
- }
- break;
- case ParserAction.OSC_END:
- handlerResult = this._oscParser.end(code !== 0x18 && code !== 0x1a);
- if (handlerResult) {
- this._preserveStack(ParserStackType.OSC, [], 0, transition, i);
- return handlerResult;
- }
- if (code === 0x1b) transition |= ParserState.ESCAPE;
- this._params.reset();
- this._params.addParam(0); // ZDM
- this._collect = 0;
- this.precedingCodepoint = 0;
- break;
- }
- this.currentState = transition & TableAccess.TRANSITION_STATE_MASK;
- }
- }
-}
diff --git a/node_modules/xterm/src/common/parser/OscParser.ts b/node_modules/xterm/src/common/parser/OscParser.ts
deleted file mode 100644
index 32710ae..0000000
--- a/node_modules/xterm/src/common/parser/OscParser.ts
+++ /dev/null
@@ -1,238 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IOscHandler, IHandlerCollection, OscFallbackHandlerType, IOscParser, ISubParserStackState } from 'common/parser/Types';
-import { OscState, PAYLOAD_LIMIT } from 'common/parser/Constants';
-import { utf32ToString } from 'common/input/TextDecoder';
-import { IDisposable } from 'common/Types';
-
-const EMPTY_HANDLERS: IOscHandler[] = [];
-
-export class OscParser implements IOscParser {
- private _state = OscState.START;
- private _active = EMPTY_HANDLERS;
- private _id = -1;
- private _handlers: IHandlerCollection<IOscHandler> = Object.create(null);
- private _handlerFb: OscFallbackHandlerType = () => { };
- private _stack: ISubParserStackState = {
- paused: false,
- loopPosition: 0,
- fallThrough: false
- };
-
- public registerHandler(ident: number, handler: IOscHandler): IDisposable {
- if (this._handlers[ident] === undefined) {
- this._handlers[ident] = [];
- }
- const handlerList = this._handlers[ident];
- handlerList.push(handler);
- return {
- dispose: () => {
- const handlerIndex = handlerList.indexOf(handler);
- if (handlerIndex !== -1) {
- handlerList.splice(handlerIndex, 1);
- }
- }
- };
- }
- public clearHandler(ident: number): void {
- if (this._handlers[ident]) delete this._handlers[ident];
- }
- public setHandlerFallback(handler: OscFallbackHandlerType): void {
- this._handlerFb = handler;
- }
-
- public dispose(): void {
- this._handlers = Object.create(null);
- this._handlerFb = () => { };
- this._active = EMPTY_HANDLERS;
- }
-
- public reset(): void {
- // force cleanup handlers if payload was already sent
- if (this._state === OscState.PAYLOAD) {
- for (let j = this._stack.paused ? this._stack.loopPosition - 1 : this._active.length - 1; j >= 0; --j) {
- this._active[j].end(false);
- }
- }
- this._stack.paused = false;
- this._active = EMPTY_HANDLERS;
- this._id = -1;
- this._state = OscState.START;
- }
-
- private _start(): void {
- this._active = this._handlers[this._id] || EMPTY_HANDLERS;
- if (!this._active.length) {
- this._handlerFb(this._id, 'START');
- } else {
- for (let j = this._active.length - 1; j >= 0; j--) {
- this._active[j].start();
- }
- }
- }
-
- private _put(data: Uint32Array, start: number, end: number): void {
- if (!this._active.length) {
- this._handlerFb(this._id, 'PUT', utf32ToString(data, start, end));
- } else {
- for (let j = this._active.length - 1; j >= 0; j--) {
- this._active[j].put(data, start, end);
- }
- }
- }
-
- public start(): void {
- // always reset leftover handlers
- this.reset();
- this._state = OscState.ID;
- }
-
- /**
- * Put data to current OSC command.
- * Expects the identifier of the OSC command in the form
- * OSC id ; payload ST/BEL
- * Payload chunks are not further processed and get
- * directly passed to the handlers.
- */
- public put(data: Uint32Array, start: number, end: number): void {
- if (this._state === OscState.ABORT) {
- return;
- }
- if (this._state === OscState.ID) {
- while (start < end) {
- const code = data[start++];
- if (code === 0x3b) {
- this._state = OscState.PAYLOAD;
- this._start();
- break;
- }
- if (code < 0x30 || 0x39 < code) {
- this._state = OscState.ABORT;
- return;
- }
- if (this._id === -1) {
- this._id = 0;
- }
- this._id = this._id * 10 + code - 48;
- }
- }
- if (this._state === OscState.PAYLOAD && end - start > 0) {
- this._put(data, start, end);
- }
- }
-
- /**
- * Indicates end of an OSC command.
- * Whether the OSC got aborted or finished normally
- * is indicated by `success`.
- */
- public end(success: boolean, promiseResult: boolean = true): void | Promise<boolean> {
- if (this._state === OscState.START) {
- return;
- }
- // do nothing if command was faulty
- if (this._state !== OscState.ABORT) {
- // if we are still in ID state and get an early end
- // means that the command has no payload thus we still have
- // to announce START and send END right after
- if (this._state === OscState.ID) {
- this._start();
- }
-
- if (!this._active.length) {
- this._handlerFb(this._id, 'END', success);
- } else {
- let handlerResult: boolean | Promise<boolean> = false;
- let j = this._active.length - 1;
- let fallThrough = false;
- if (this._stack.paused) {
- j = this._stack.loopPosition - 1;
- handlerResult = promiseResult;
- fallThrough = this._stack.fallThrough;
- this._stack.paused = false;
- }
- if (!fallThrough && handlerResult === false) {
- for (; j >= 0; j--) {
- handlerResult = this._active[j].end(success);
- if (handlerResult === true) {
- break;
- } else if (handlerResult instanceof Promise) {
- this._stack.paused = true;
- this._stack.loopPosition = j;
- this._stack.fallThrough = false;
- return handlerResult;
- }
- }
- j--;
- }
- // cleanup left over handlers
- // we always have to call .end for proper cleanup,
- // here we use `success` to indicate whether a handler should execute
- for (; j >= 0; j--) {
- handlerResult = this._active[j].end(false);
- if (handlerResult instanceof Promise) {
- this._stack.paused = true;
- this._stack.loopPosition = j;
- this._stack.fallThrough = true;
- return handlerResult;
- }
- }
- }
-
- }
- this._active = EMPTY_HANDLERS;
- this._id = -1;
- this._state = OscState.START;
- }
-}
-
-/**
- * Convenient class to allow attaching string based handler functions
- * as OSC handlers.
- */
-export class OscHandler implements IOscHandler {
- private _data = '';
- private _hitLimit: boolean = false;
-
- constructor(private _handler: (data: string) => boolean | Promise<boolean>) { }
-
- public start(): void {
- this._data = '';
- this._hitLimit = false;
- }
-
- public put(data: Uint32Array, start: number, end: number): void {
- if (this._hitLimit) {
- return;
- }
- this._data += utf32ToString(data, start, end);
- if (this._data.length > PAYLOAD_LIMIT) {
- this._data = '';
- this._hitLimit = true;
- }
- }
-
- public end(success: boolean): boolean | Promise<boolean> {
- let ret: boolean | Promise<boolean> = false;
- if (this._hitLimit) {
- ret = false;
- } else if (success) {
- ret = this._handler(this._data);
- if (ret instanceof Promise) {
- // need to hold data until `ret` got resolved
- // dont care for errors, data will be freed anyway on next start
- return ret.then(res => {
- this._data = '';
- this._hitLimit = false;
- return res;
- });
- }
- }
- this._data = '';
- this._hitLimit = false;
- return ret;
- }
-}
diff --git a/node_modules/xterm/src/common/parser/Params.ts b/node_modules/xterm/src/common/parser/Params.ts
deleted file mode 100644
index 7071453..0000000
--- a/node_modules/xterm/src/common/parser/Params.ts
+++ /dev/null
@@ -1,229 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-import { IParams, ParamsArray } from 'common/parser/Types';
-
-// max value supported for a single param/subparam (clamped to positive int32 range)
-const MAX_VALUE = 0x7FFFFFFF;
-// max allowed subparams for a single sequence (hardcoded limitation)
-const MAX_SUBPARAMS = 256;
-
-/**
- * Params storage class.
- * This type is used by the parser to accumulate sequence parameters and sub parameters
- * and transmit them to the input handler actions.
- *
- * NOTES:
- * - params object for action handlers is borrowed, use `.toArray` or `.clone` to get a copy
- * - never read beyond `params.length - 1` (likely to contain arbitrary data)
- * - `.getSubParams` returns a borrowed typed array, use `.getSubParamsAll` for cloned sub params
- * - hardcoded limitations:
- * - max. value for a single (sub) param is 2^31 - 1 (greater values are clamped to that)
- * - max. 256 sub params possible
- * - negative values are not allowed beside -1 (placeholder for default value)
- *
- * About ZDM (Zero Default Mode):
- * ZDM is not orchestrated by this class. If the parser is in ZDM,
- * it should add 0 for empty params, otherwise -1. This does not apply
- * to subparams, empty subparams should always be added with -1.
- */
-export class Params implements IParams {
- // params store and length
- public params: Int32Array;
- public length: number;
-
- // sub params store and length
- protected _subParams: Int32Array;
- protected _subParamsLength: number;
-
- // sub params offsets from param: param idx --> [start, end] offset
- private _subParamsIdx: Uint16Array;
- private _rejectDigits: boolean;
- private _rejectSubDigits: boolean;
- private _digitIsSub: boolean;
-
- /**
- * Create a `Params` type from JS array representation.
- */
- public static fromArray(values: ParamsArray): Params {
- const params = new Params();
- if (!values.length) {
- return params;
- }
- // skip leading sub params
- for (let i = (Array.isArray(values[0])) ? 1 : 0; i < values.length; ++i) {
- const value = values[i];
- if (Array.isArray(value)) {
- for (let k = 0; k < value.length; ++k) {
- params.addSubParam(value[k]);
- }
- } else {
- params.addParam(value);
- }
- }
- return params;
- }
-
- /**
- * @param maxLength max length of storable parameters
- * @param maxSubParamsLength max length of storable sub parameters
- */
- constructor(public maxLength: number = 32, public maxSubParamsLength: number = 32) {
- if (maxSubParamsLength > MAX_SUBPARAMS) {
- throw new Error('maxSubParamsLength must not be greater than 256');
- }
- this.params = new Int32Array(maxLength);
- this.length = 0;
- this._subParams = new Int32Array(maxSubParamsLength);
- this._subParamsLength = 0;
- this._subParamsIdx = new Uint16Array(maxLength);
- this._rejectDigits = false;
- this._rejectSubDigits = false;
- this._digitIsSub = false;
- }
-
- /**
- * Clone object.
- */
- public clone(): Params {
- const newParams = new Params(this.maxLength, this.maxSubParamsLength);
- newParams.params.set(this.params);
- newParams.length = this.length;
- newParams._subParams.set(this._subParams);
- newParams._subParamsLength = this._subParamsLength;
- newParams._subParamsIdx.set(this._subParamsIdx);
- newParams._rejectDigits = this._rejectDigits;
- newParams._rejectSubDigits = this._rejectSubDigits;
- newParams._digitIsSub = this._digitIsSub;
- return newParams;
- }
-
- /**
- * Get a JS array representation of the current parameters and sub parameters.
- * The array is structured as follows:
- * sequence: "1;2:3:4;5::6"
- * array : [1, 2, [3, 4], 5, [-1, 6]]
- */
- public toArray(): ParamsArray {
- const res: ParamsArray = [];
- for (let i = 0; i < this.length; ++i) {
- res.push(this.params[i]);
- const start = this._subParamsIdx[i] >> 8;
- const end = this._subParamsIdx[i] & 0xFF;
- if (end - start > 0) {
- res.push(Array.prototype.slice.call(this._subParams, start, end));
- }
- }
- return res;
- }
-
- /**
- * Reset to initial empty state.
- */
- public reset(): void {
- this.length = 0;
- this._subParamsLength = 0;
- this._rejectDigits = false;
- this._rejectSubDigits = false;
- this._digitIsSub = false;
- }
-
- /**
- * Add a parameter value.
- * `Params` only stores up to `maxLength` parameters, any later
- * parameter will be ignored.
- * Note: VT devices only stored up to 16 values, xterm seems to
- * store up to 30.
- */
- public addParam(value: number): void {
- this._digitIsSub = false;
- if (this.length >= this.maxLength) {
- this._rejectDigits = true;
- return;
- }
- if (value < -1) {
- throw new Error('values lesser than -1 are not allowed');
- }
- this._subParamsIdx[this.length] = this._subParamsLength << 8 | this._subParamsLength;
- this.params[this.length++] = value > MAX_VALUE ? MAX_VALUE : value;
- }
-
- /**
- * Add a sub parameter value.
- * The sub parameter is automatically associated with the last parameter value.
- * Thus it is not possible to add a subparameter without any parameter added yet.
- * `Params` only stores up to `subParamsLength` sub parameters, any later
- * sub parameter will be ignored.
- */
- public addSubParam(value: number): void {
- this._digitIsSub = true;
- if (!this.length) {
- return;
- }
- if (this._rejectDigits || this._subParamsLength >= this.maxSubParamsLength) {
- this._rejectSubDigits = true;
- return;
- }
- if (value < -1) {
- throw new Error('values lesser than -1 are not allowed');
- }
- this._subParams[this._subParamsLength++] = value > MAX_VALUE ? MAX_VALUE : value;
- this._subParamsIdx[this.length - 1]++;
- }
-
- /**
- * Whether parameter at index `idx` has sub parameters.
- */
- public hasSubParams(idx: number): boolean {
- return ((this._subParamsIdx[idx] & 0xFF) - (this._subParamsIdx[idx] >> 8) > 0);
- }
-
- /**
- * Return sub parameters for parameter at index `idx`.
- * Note: The values are borrowed, thus you need to copy
- * the values if you need to hold them in nonlocal scope.
- */
- public getSubParams(idx: number): Int32Array | null {
- const start = this._subParamsIdx[idx] >> 8;
- const end = this._subParamsIdx[idx] & 0xFF;
- if (end - start > 0) {
- return this._subParams.subarray(start, end);
- }
- return null;
- }
-
- /**
- * Return all sub parameters as {idx: subparams} mapping.
- * Note: The values are not borrowed.
- */
- public getSubParamsAll(): {[idx: number]: Int32Array} {
- const result: {[idx: number]: Int32Array} = {};
- for (let i = 0; i < this.length; ++i) {
- const start = this._subParamsIdx[i] >> 8;
- const end = this._subParamsIdx[i] & 0xFF;
- if (end - start > 0) {
- result[i] = this._subParams.slice(start, end);
- }
- }
- return result;
- }
-
- /**
- * Add a single digit value to current parameter.
- * This is used by the parser to account digits on a char by char basis.
- */
- public addDigit(value: number): void {
- let length;
- if (this._rejectDigits
- || !(length = this._digitIsSub ? this._subParamsLength : this.length)
- || (this._digitIsSub && this._rejectSubDigits)
- ) {
- return;
- }
-
- const store = this._digitIsSub ? this._subParams : this.params;
- const cur = store[length - 1];
- store[length - 1] = ~cur ? Math.min(cur * 10 + value, MAX_VALUE) : value;
- }
-}
diff --git a/node_modules/xterm/src/common/parser/Types.d.ts b/node_modules/xterm/src/common/parser/Types.d.ts
deleted file mode 100644
index 3a621ea..0000000
--- a/node_modules/xterm/src/common/parser/Types.d.ts
+++ /dev/null
@@ -1,274 +0,0 @@
-/**
- * Copyright (c) 2017 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IDisposable } from 'common/Types';
-import { ParserState } from 'common/parser/Constants';
-
-
-/** sequence params serialized to js arrays */
-export type ParamsArray = (number | number[])[];
-
-/** Params constructor type. */
-export interface IParamsConstructor {
- new(maxLength: number, maxSubParamsLength: number): IParams;
-
- /** create params from ParamsArray */
- fromArray(values: ParamsArray): IParams;
-}
-
-/** Interface of Params storage class. */
-export interface IParams {
- /** from ctor */
- maxLength: number;
- maxSubParamsLength: number;
-
- /** param values and its length */
- params: Int32Array;
- length: number;
-
- /** methods */
- clone(): IParams;
- toArray(): ParamsArray;
- reset(): void;
- addParam(value: number): void;
- addSubParam(value: number): void;
- hasSubParams(idx: number): boolean;
- getSubParams(idx: number): Int32Array | null;
- getSubParamsAll(): {[idx: number]: Int32Array};
-}
-
-/**
- * Internal state of EscapeSequenceParser.
- * Used as argument of the error handler to allow
- * introspection at runtime on parse errors.
- * Return it with altered values to recover from
- * faulty states (not yet supported).
- * Set `abort` to `true` to abort the current parsing.
- */
-export interface IParsingState {
- // position in parse string
- position: number;
- // actual character code
- code: number;
- // current parser state
- currentState: ParserState;
- // collect buffer with intermediate characters
- collect: number;
- // params buffer
- params: IParams;
- // should abort (default: false)
- abort: boolean;
-}
-
-/**
- * Command handler interfaces.
- */
-
-/**
- * CSI handler types.
- * Note: `params` is borrowed.
- */
-export type CsiHandlerType = (params: IParams) => boolean | Promise<boolean>;
-export type CsiFallbackHandlerType = (ident: number, params: IParams) => void;
-
-/**
- * DCS handler types.
- */
-export interface IDcsHandler {
- /**
- * Called when a DCS command starts.
- * Prepare needed data structures here.
- * Note: `params` is borrowed.
- */
- hook(params: IParams): void;
- /**
- * Incoming payload chunk.
- * Note: `params` is borrowed.
- */
- put(data: Uint32Array, start: number, end: number): void;
- /**
- * End of DCS command. `success` indicates whether the
- * command finished normally or got aborted, thus final
- * execution of the command should depend on `success`.
- * To save memory also cleanup data structures here.
- */
- unhook(success: boolean): boolean | Promise<boolean>;
-}
-export type DcsFallbackHandlerType = (ident: number, action: 'HOOK' | 'PUT' | 'UNHOOK', payload?: any) => void;
-
-/**
- * ESC handler types.
- */
-export type EscHandlerType = () => boolean | Promise<boolean>;
-export type EscFallbackHandlerType = (identifier: number) => void;
-
-/**
- * EXECUTE handler types.
- */
-export type ExecuteHandlerType = () => boolean;
-export type ExecuteFallbackHandlerType = (ident: number) => void;
-
-/**
- * OSC handler types.
- */
-export interface IOscHandler {
- /**
- * Announces start of this OSC command.
- * Prepare needed data structures here.
- */
- start(): void;
- /**
- * Incoming data chunk.
- * Note: Data is borrowed.
- */
- put(data: Uint32Array, start: number, end: number): void;
- /**
- * End of OSC command. `success` indicates whether the
- * command finished normally or got aborted, thus final
- * execution of the command should depend on `success`.
- * To save memory also cleanup data structures here.
- */
- end(success: boolean): boolean | Promise<boolean>;
-}
-export type OscFallbackHandlerType = (ident: number, action: 'START' | 'PUT' | 'END', payload?: any) => void;
-
-/**
- * PRINT handler types.
- */
-export type PrintHandlerType = (data: Uint32Array, start: number, end: number) => void;
-export type PrintFallbackHandlerType = PrintHandlerType;
-
-
-/**
-* EscapeSequenceParser interface.
-*/
-export interface IEscapeSequenceParser extends IDisposable {
- /**
- * Preceding codepoint to get REP working correctly.
- * This must be set by the print handler as last action.
- * It gets reset by the parser for any valid sequence beside REP itself.
- */
- precedingCodepoint: number;
-
- /**
- * Reset the parser to its initial state (handlers are kept).
- */
- reset(): void;
-
- /**
- * Parse UTF32 codepoints in `data` up to `length`.
- * @param data The data to parse.
- */
- parse(data: Uint32Array, length: number, promiseResult?: boolean): void | Promise<boolean>;
-
- /**
- * Get string from numercial function identifier `ident`.
- * Useful in fallback handlers which expose the low level
- * numcerical function identifier for debugging purposes.
- * Note: A full back translation to `IFunctionIdentifier`
- * is not implemented.
- */
- identToString(ident: number): string;
-
- setPrintHandler(handler: PrintHandlerType): void;
- clearPrintHandler(): void;
-
- registerEscHandler(id: IFunctionIdentifier, handler: EscHandlerType): IDisposable;
- clearEscHandler(id: IFunctionIdentifier): void;
- setEscHandlerFallback(handler: EscFallbackHandlerType): void;
-
- setExecuteHandler(flag: string, handler: ExecuteHandlerType): void;
- clearExecuteHandler(flag: string): void;
- setExecuteHandlerFallback(handler: ExecuteFallbackHandlerType): void;
-
- registerCsiHandler(id: IFunctionIdentifier, handler: CsiHandlerType): IDisposable;
- clearCsiHandler(id: IFunctionIdentifier): void;
- setCsiHandlerFallback(callback: CsiFallbackHandlerType): void;
-
- registerDcsHandler(id: IFunctionIdentifier, handler: IDcsHandler): IDisposable;
- clearDcsHandler(id: IFunctionIdentifier): void;
- setDcsHandlerFallback(handler: DcsFallbackHandlerType): void;
-
- registerOscHandler(ident: number, handler: IOscHandler): IDisposable;
- clearOscHandler(ident: number): void;
- setOscHandlerFallback(handler: OscFallbackHandlerType): void;
-
- setErrorHandler(handler: (state: IParsingState) => IParsingState): void;
- clearErrorHandler(): void;
-}
-
-/**
- * Subparser interfaces.
- * The subparsers are instantiated in `EscapeSequenceParser` and
- * called during `EscapeSequenceParser.parse`.
- */
-export interface ISubParser<T, U> extends IDisposable {
- reset(): void;
- registerHandler(ident: number, handler: T): IDisposable;
- clearHandler(ident: number): void;
- setHandlerFallback(handler: U): void;
- put(data: Uint32Array, start: number, end: number): void;
-}
-
-export interface IOscParser extends ISubParser<IOscHandler, OscFallbackHandlerType> {
- start(): void;
- end(success: boolean, promiseResult?: boolean): void | Promise<boolean>;
-}
-
-export interface IDcsParser extends ISubParser<IDcsHandler, DcsFallbackHandlerType> {
- hook(ident: number, params: IParams): void;
- unhook(success: boolean, promiseResult?: boolean): void | Promise<boolean>;
-}
-
-/**
- * Interface to denote a specific ESC, CSI or DCS handler slot.
- * The values are used to create an integer respresentation during handler
- * regristation before passed to the subparsers as `ident`.
- * The integer translation is made to allow a faster handler access
- * in `EscapeSequenceParser.parse`.
- */
-export interface IFunctionIdentifier {
- prefix?: string;
- intermediates?: string;
- final: string;
-}
-
-export interface IHandlerCollection<T> {
- [key: string]: T[];
-}
-
-/**
- * Types for async parser support.
- */
-
-// type of saved stack state in parser
-export const enum ParserStackType {
- NONE = 0,
- FAIL,
- RESET,
- CSI,
- ESC,
- OSC,
- DCS
-}
-
-// aggregate of resumable handler lists
-export type ResumableHandlersType = CsiHandlerType[] | EscHandlerType[];
-
-// saved stack state of the parser
-export interface IParserStackState {
- state: ParserStackType;
- handlers: ResumableHandlersType;
- handlerPos: number;
- transition: number;
- chunkPos: number;
-}
-
-// saved stack state of subparser (OSC and DCS)
-export interface ISubParserStackState {
- paused: boolean;
- loopPosition: number;
- fallThrough: boolean;
-}
diff --git a/node_modules/xterm/src/common/public/AddonManager.ts b/node_modules/xterm/src/common/public/AddonManager.ts
deleted file mode 100644
index 06c7812..0000000
--- a/node_modules/xterm/src/common/public/AddonManager.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ITerminalAddon, IDisposable, Terminal } from 'xterm';
-
-export interface ILoadedAddon {
- instance: ITerminalAddon;
- dispose: () => void;
- isDisposed: boolean;
-}
-
-export class AddonManager implements IDisposable {
- protected _addons: ILoadedAddon[] = [];
-
- constructor() {
- }
-
- public dispose(): void {
- for (let i = this._addons.length - 1; i >= 0; i--) {
- this._addons[i].instance.dispose();
- }
- }
-
- public loadAddon(terminal: Terminal, instance: ITerminalAddon): void {
- const loadedAddon: ILoadedAddon = {
- instance,
- dispose: instance.dispose,
- isDisposed: false
- };
- this._addons.push(loadedAddon);
- instance.dispose = () => this._wrappedAddonDispose(loadedAddon);
- instance.activate(terminal as any);
- }
-
- private _wrappedAddonDispose(loadedAddon: ILoadedAddon): void {
- if (loadedAddon.isDisposed) {
- // Do nothing if already disposed
- return;
- }
- let index = -1;
- for (let i = 0; i < this._addons.length; i++) {
- if (this._addons[i] === loadedAddon) {
- index = i;
- break;
- }
- }
- if (index === -1) {
- throw new Error('Could not dispose an addon that has not been loaded');
- }
- loadedAddon.isDisposed = true;
- loadedAddon.dispose.apply(loadedAddon.instance);
- this._addons.splice(index, 1);
- }
-}
diff --git a/node_modules/xterm/src/common/public/BufferApiView.ts b/node_modules/xterm/src/common/public/BufferApiView.ts
deleted file mode 100644
index ca9ef2d..0000000
--- a/node_modules/xterm/src/common/public/BufferApiView.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Copyright (c) 2021 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBuffer as IBufferApi, IBufferLine as IBufferLineApi, IBufferCell as IBufferCellApi } from 'xterm';
-import { IBuffer } from 'common/buffer/Types';
-import { BufferLineApiView } from 'common/public/BufferLineApiView';
-import { CellData } from 'common/buffer/CellData';
-
-export class BufferApiView implements IBufferApi {
- constructor(
- private _buffer: IBuffer,
- public readonly type: 'normal' | 'alternate'
- ) { }
-
- public init(buffer: IBuffer): BufferApiView {
- this._buffer = buffer;
- return this;
- }
-
- public get cursorY(): number { return this._buffer.y; }
- public get cursorX(): number { return this._buffer.x; }
- public get viewportY(): number { return this._buffer.ydisp; }
- public get baseY(): number { return this._buffer.ybase; }
- public get length(): number { return this._buffer.lines.length; }
- public getLine(y: number): IBufferLineApi | undefined {
- const line = this._buffer.lines.get(y);
- if (!line) {
- return undefined;
- }
- return new BufferLineApiView(line);
- }
- public getNullCell(): IBufferCellApi { return new CellData(); }
-}
diff --git a/node_modules/xterm/src/common/public/BufferLineApiView.ts b/node_modules/xterm/src/common/public/BufferLineApiView.ts
deleted file mode 100644
index 6037501..0000000
--- a/node_modules/xterm/src/common/public/BufferLineApiView.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * Copyright (c) 2021 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { CellData } from 'common/buffer/CellData';
-import { IBufferLine, ICellData } from 'common/Types';
-import { IBufferCell as IBufferCellApi, IBufferLine as IBufferLineApi } from 'xterm';
-
-export class BufferLineApiView implements IBufferLineApi {
- constructor(private _line: IBufferLine) { }
-
- public get isWrapped(): boolean { return this._line.isWrapped; }
- public get length(): number { return this._line.length; }
- public getCell(x: number, cell?: IBufferCellApi): IBufferCellApi | undefined {
- if (x < 0 || x >= this._line.length) {
- return undefined;
- }
-
- if (cell) {
- this._line.loadCell(x, cell as ICellData);
- return cell;
- }
- return this._line.loadCell(x, new CellData());
- }
- public translateToString(trimRight?: boolean, startColumn?: number, endColumn?: number): string {
- return this._line.translateToString(trimRight, startColumn, endColumn);
- }
-}
diff --git a/node_modules/xterm/src/common/public/BufferNamespaceApi.ts b/node_modules/xterm/src/common/public/BufferNamespaceApi.ts
deleted file mode 100644
index d86f6bf..0000000
--- a/node_modules/xterm/src/common/public/BufferNamespaceApi.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (c) 2021 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBuffer as IBufferApi, IBufferNamespace as IBufferNamespaceApi } from 'xterm';
-import { BufferApiView } from 'common/public/BufferApiView';
-import { IEvent, EventEmitter } from 'common/EventEmitter';
-import { ICoreTerminal } from 'common/Types';
-
-export class BufferNamespaceApi implements IBufferNamespaceApi {
- private _normal: BufferApiView;
- private _alternate: BufferApiView;
- private _onBufferChange = new EventEmitter<IBufferApi>();
- public get onBufferChange(): IEvent<IBufferApi> { return this._onBufferChange.event; }
-
- constructor(private _core: ICoreTerminal) {
- this._normal = new BufferApiView(this._core.buffers.normal, 'normal');
- this._alternate = new BufferApiView(this._core.buffers.alt, 'alternate');
- this._core.buffers.onBufferActivate(() => this._onBufferChange.fire(this.active));
- }
- public get active(): IBufferApi {
- if (this._core.buffers.active === this._core.buffers.normal) { return this.normal; }
- if (this._core.buffers.active === this._core.buffers.alt) { return this.alternate; }
- throw new Error('Active buffer is neither normal nor alternate');
- }
- public get normal(): IBufferApi {
- return this._normal.init(this._core.buffers.normal);
- }
- public get alternate(): IBufferApi {
- return this._alternate.init(this._core.buffers.alt);
- }
-}
diff --git a/node_modules/xterm/src/common/public/ParserApi.ts b/node_modules/xterm/src/common/public/ParserApi.ts
deleted file mode 100644
index 67df4be..0000000
--- a/node_modules/xterm/src/common/public/ParserApi.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/**
- * Copyright (c) 2021 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IParams } from 'common/parser/Types';
-import { IDisposable, IFunctionIdentifier, IParser } from 'xterm';
-import { ICoreTerminal } from 'common/Types';
-
-export class ParserApi implements IParser {
- constructor(private _core: ICoreTerminal) { }
-
- public registerCsiHandler(id: IFunctionIdentifier, callback: (params: (number | number[])[]) => boolean | Promise<boolean>): IDisposable {
- return this._core.registerCsiHandler(id, (params: IParams) => callback(params.toArray()));
- }
- public addCsiHandler(id: IFunctionIdentifier, callback: (params: (number | number[])[]) => boolean | Promise<boolean>): IDisposable {
- return this.registerCsiHandler(id, callback);
- }
- public registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: (number | number[])[]) => boolean | Promise<boolean>): IDisposable {
- return this._core.registerDcsHandler(id, (data: string, params: IParams) => callback(data, params.toArray()));
- }
- public addDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: (number | number[])[]) => boolean | Promise<boolean>): IDisposable {
- return this.registerDcsHandler(id, callback);
- }
- public registerEscHandler(id: IFunctionIdentifier, handler: () => boolean | Promise<boolean>): IDisposable {
- return this._core.registerEscHandler(id, handler);
- }
- public addEscHandler(id: IFunctionIdentifier, handler: () => boolean | Promise<boolean>): IDisposable {
- return this.registerEscHandler(id, handler);
- }
- public registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable {
- return this._core.registerOscHandler(ident, callback);
- }
- public addOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable {
- return this.registerOscHandler(ident, callback);
- }
-}
diff --git a/node_modules/xterm/src/common/public/UnicodeApi.ts b/node_modules/xterm/src/common/public/UnicodeApi.ts
deleted file mode 100644
index 8a669a0..0000000
--- a/node_modules/xterm/src/common/public/UnicodeApi.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (c) 2021 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ICoreTerminal } from 'common/Types';
-import { IUnicodeHandling, IUnicodeVersionProvider } from 'xterm';
-
-export class UnicodeApi implements IUnicodeHandling {
- constructor(private _core: ICoreTerminal) { }
-
- public register(provider: IUnicodeVersionProvider): void {
- this._core.unicodeService.register(provider);
- }
-
- public get versions(): string[] {
- return this._core.unicodeService.versions;
- }
-
- public get activeVersion(): string {
- return this._core.unicodeService.activeVersion;
- }
-
- public set activeVersion(version: string) {
- this._core.unicodeService.activeVersion = version;
- }
-}
diff --git a/node_modules/xterm/src/common/services/BufferService.ts b/node_modules/xterm/src/common/services/BufferService.ts
deleted file mode 100644
index bba60dd..0000000
--- a/node_modules/xterm/src/common/services/BufferService.ts
+++ /dev/null
@@ -1,185 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBufferService, IOptionsService } from 'common/services/Services';
-import { BufferSet } from 'common/buffer/BufferSet';
-import { IBufferSet, IBuffer } from 'common/buffer/Types';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { Disposable } from 'common/Lifecycle';
-import { IAttributeData, IBufferLine, ScrollSource } from 'common/Types';
-
-export const MINIMUM_COLS = 2; // Less than 2 can mess with wide chars
-export const MINIMUM_ROWS = 1;
-
-export class BufferService extends Disposable implements IBufferService {
- public serviceBrand: any;
-
- public cols: number;
- public rows: number;
- public buffers: IBufferSet;
- /** Whether the user is scrolling (locks the scroll position) */
- public isUserScrolling: boolean = false;
-
- private _onResize = new EventEmitter<{ cols: number, rows: number }>();
- public get onResize(): IEvent<{ cols: number, rows: number }> { return this._onResize.event; }
- private _onScroll = new EventEmitter<number>();
- public get onScroll(): IEvent<number> { return this._onScroll.event; }
-
- public get buffer(): IBuffer { return this.buffers.active; }
-
- /** An IBufferline to clone/copy from for new blank lines */
- private _cachedBlankLine: IBufferLine | undefined;
-
- constructor(
- @IOptionsService private _optionsService: IOptionsService
- ) {
- super();
- this.cols = Math.max(_optionsService.rawOptions.cols || 0, MINIMUM_COLS);
- this.rows = Math.max(_optionsService.rawOptions.rows || 0, MINIMUM_ROWS);
- this.buffers = new BufferSet(_optionsService, this);
- }
-
- public dispose(): void {
- super.dispose();
- this.buffers.dispose();
- }
-
- public resize(cols: number, rows: number): void {
- this.cols = cols;
- this.rows = rows;
- this.buffers.resize(cols, rows);
- this.buffers.setupTabStops(this.cols);
- this._onResize.fire({ cols, rows });
- }
-
- public reset(): void {
- this.buffers.reset();
- this.isUserScrolling = false;
- }
-
- /**
- * Scroll the terminal down 1 row, creating a blank line.
- * @param isWrapped Whether the new line is wrapped from the previous line.
- */
- public scroll(eraseAttr: IAttributeData, isWrapped: boolean = false): void {
- const buffer = this.buffer;
-
- let newLine: IBufferLine | undefined;
- newLine = this._cachedBlankLine;
- if (!newLine || newLine.length !== this.cols || newLine.getFg(0) !== eraseAttr.fg || newLine.getBg(0) !== eraseAttr.bg) {
- newLine = buffer.getBlankLine(eraseAttr, isWrapped);
- this._cachedBlankLine = newLine;
- }
- newLine.isWrapped = isWrapped;
-
- const topRow = buffer.ybase + buffer.scrollTop;
- const bottomRow = buffer.ybase + buffer.scrollBottom;
-
- if (buffer.scrollTop === 0) {
- // Determine whether the buffer is going to be trimmed after insertion.
- const willBufferBeTrimmed = buffer.lines.isFull;
-
- // Insert the line using the fastest method
- if (bottomRow === buffer.lines.length - 1) {
- if (willBufferBeTrimmed) {
- buffer.lines.recycle().copyFrom(newLine);
- } else {
- buffer.lines.push(newLine.clone());
- }
- } else {
- buffer.lines.splice(bottomRow + 1, 0, newLine.clone());
- }
-
- // Only adjust ybase and ydisp when the buffer is not trimmed
- if (!willBufferBeTrimmed) {
- buffer.ybase++;
- // Only scroll the ydisp with ybase if the user has not scrolled up
- if (!this.isUserScrolling) {
- buffer.ydisp++;
- }
- } else {
- // When the buffer is full and the user has scrolled up, keep the text
- // stable unless ydisp is right at the top
- if (this.isUserScrolling) {
- buffer.ydisp = Math.max(buffer.ydisp - 1, 0);
- }
- }
- } else {
- // scrollTop is non-zero which means no line will be going to the
- // scrollback, instead we can just shift them in-place.
- const scrollRegionHeight = bottomRow - topRow + 1 /* as it's zero-based */;
- buffer.lines.shiftElements(topRow + 1, scrollRegionHeight - 1, -1);
- buffer.lines.set(bottomRow, newLine.clone());
- }
-
- // Move the viewport to the bottom of the buffer unless the user is
- // scrolling.
- if (!this.isUserScrolling) {
- buffer.ydisp = buffer.ybase;
- }
-
- this._onScroll.fire(buffer.ydisp);
- }
-
- /**
- * Scroll the display of the terminal
- * @param disp The number of lines to scroll down (negative scroll up).
- * @param suppressScrollEvent Don't emit the scroll event as scrollLines. This is used
- * to avoid unwanted events being handled by the viewport when the event was triggered from the
- * viewport originally.
- */
- public scrollLines(disp: number, suppressScrollEvent?: boolean, source?: ScrollSource): void {
- const buffer = this.buffer;
- if (disp < 0) {
- if (buffer.ydisp === 0) {
- return;
- }
- this.isUserScrolling = true;
- } else if (disp + buffer.ydisp >= buffer.ybase) {
- this.isUserScrolling = false;
- }
-
- const oldYdisp = buffer.ydisp;
- buffer.ydisp = Math.max(Math.min(buffer.ydisp + disp, buffer.ybase), 0);
-
- // No change occurred, don't trigger scroll/refresh
- if (oldYdisp === buffer.ydisp) {
- return;
- }
-
- if (!suppressScrollEvent) {
- this._onScroll.fire(buffer.ydisp);
- }
- }
-
- /**
- * Scroll the display of the terminal by a number of pages.
- * @param pageCount The number of pages to scroll (negative scrolls up).
- */
- public scrollPages(pageCount: number): void {
- this.scrollLines(pageCount * (this.rows - 1));
- }
-
- /**
- * Scrolls the display of the terminal to the top.
- */
- public scrollToTop(): void {
- this.scrollLines(-this.buffer.ydisp);
- }
-
- /**
- * Scrolls the display of the terminal to the bottom.
- */
- public scrollToBottom(): void {
- this.scrollLines(this.buffer.ybase - this.buffer.ydisp);
- }
-
- public scrollToLine(line: number): void {
- const scrollAmount = line - this.buffer.ydisp;
- if (scrollAmount !== 0) {
- this.scrollLines(scrollAmount);
- }
- }
-}
diff --git a/node_modules/xterm/src/common/services/CharsetService.ts b/node_modules/xterm/src/common/services/CharsetService.ts
deleted file mode 100644
index c538106..0000000
--- a/node_modules/xterm/src/common/services/CharsetService.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ICharsetService } from 'common/services/Services';
-import { ICharset } from 'common/Types';
-
-export class CharsetService implements ICharsetService {
- public serviceBrand: any;
-
- public charset: ICharset | undefined;
- public glevel: number = 0;
-
- private _charsets: (ICharset | undefined)[] = [];
-
- public reset(): void {
- this.charset = undefined;
- this._charsets = [];
- this.glevel = 0;
- }
-
- public setgLevel(g: number): void {
- this.glevel = g;
- this.charset = this._charsets[g];
- }
-
- public setgCharset(g: number, charset: ICharset | undefined): void {
- this._charsets[g] = charset;
- if (this.glevel === g) {
- this.charset = charset;
- }
- }
-}
diff --git a/node_modules/xterm/src/common/services/CoreMouseService.ts b/node_modules/xterm/src/common/services/CoreMouseService.ts
deleted file mode 100644
index 0b0dc36..0000000
--- a/node_modules/xterm/src/common/services/CoreMouseService.ts
+++ /dev/null
@@ -1,309 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-import { IBufferService, ICoreService, ICoreMouseService } from 'common/services/Services';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { ICoreMouseProtocol, ICoreMouseEvent, CoreMouseEncoding, CoreMouseEventType, CoreMouseButton, CoreMouseAction } from 'common/Types';
-
-/**
- * Supported default protocols.
- */
-const DEFAULT_PROTOCOLS: {[key: string]: ICoreMouseProtocol} = {
- /**
- * NONE
- * Events: none
- * Modifiers: none
- */
- NONE: {
- events: CoreMouseEventType.NONE,
- restrict: () => false
- },
- /**
- * X10
- * Events: mousedown
- * Modifiers: none
- */
- X10: {
- events: CoreMouseEventType.DOWN,
- restrict: (e: ICoreMouseEvent) => {
- // no wheel, no move, no up
- if (e.button === CoreMouseButton.WHEEL || e.action !== CoreMouseAction.DOWN) {
- return false;
- }
- // no modifiers
- e.ctrl = false;
- e.alt = false;
- e.shift = false;
- return true;
- }
- },
- /**
- * VT200
- * Events: mousedown / mouseup / wheel
- * Modifiers: all
- */
- VT200: {
- events: CoreMouseEventType.DOWN | CoreMouseEventType.UP | CoreMouseEventType.WHEEL,
- restrict: (e: ICoreMouseEvent) => {
- // no move
- if (e.action === CoreMouseAction.MOVE) {
- return false;
- }
- return true;
- }
- },
- /**
- * DRAG
- * Events: mousedown / mouseup / wheel / mousedrag
- * Modifiers: all
- */
- DRAG: {
- events: CoreMouseEventType.DOWN | CoreMouseEventType.UP | CoreMouseEventType.WHEEL | CoreMouseEventType.DRAG,
- restrict: (e: ICoreMouseEvent) => {
- // no move without button
- if (e.action === CoreMouseAction.MOVE && e.button === CoreMouseButton.NONE) {
- return false;
- }
- return true;
- }
- },
- /**
- * ANY
- * Events: all mouse related events
- * Modifiers: all
- */
- ANY: {
- events:
- CoreMouseEventType.DOWN | CoreMouseEventType.UP | CoreMouseEventType.WHEEL
- | CoreMouseEventType.DRAG | CoreMouseEventType.MOVE,
- restrict: (e: ICoreMouseEvent) => true
- }
-};
-
-const enum Modifiers {
- SHIFT = 4,
- ALT = 8,
- CTRL = 16
-}
-
-// helper for default encoders to generate the event code.
-function eventCode(e: ICoreMouseEvent, isSGR: boolean): number {
- let code = (e.ctrl ? Modifiers.CTRL : 0) | (e.shift ? Modifiers.SHIFT : 0) | (e.alt ? Modifiers.ALT : 0);
- if (e.button === CoreMouseButton.WHEEL) {
- code |= 64;
- code |= e.action;
- } else {
- code |= e.button & 3;
- if (e.button & 4) {
- code |= 64;
- }
- if (e.button & 8) {
- code |= 128;
- }
- if (e.action === CoreMouseAction.MOVE) {
- code |= CoreMouseAction.MOVE;
- } else if (e.action === CoreMouseAction.UP && !isSGR) {
- // special case - only SGR can report button on release
- // all others have to go with NONE
- code |= CoreMouseButton.NONE;
- }
- }
- return code;
-}
-
-const S = String.fromCharCode;
-
-/**
- * Supported default encodings.
- */
-const DEFAULT_ENCODINGS: {[key: string]: CoreMouseEncoding} = {
- /**
- * DEFAULT - CSI M Pb Px Py
- * Single byte encoding for coords and event code.
- * Can encode values up to 223 (1-based).
- */
- DEFAULT: (e: ICoreMouseEvent) => {
- const params = [eventCode(e, false) + 32, e.col + 32, e.row + 32];
- // supress mouse report if we exceed addressible range
- // Note this is handled differently by emulators
- // - xterm: sends 0;0 coords instead
- // - vte, konsole: no report
- if (params[0] > 255 || params[1] > 255 || params[2] > 255) {
- return '';
- }
- return `\x1b[M${S(params[0])}${S(params[1])}${S(params[2])}`;
- },
- /**
- * SGR - CSI < Pb ; Px ; Py M|m
- * No encoding limitation.
- * Can report button on release and works with a well formed sequence.
- */
- SGR: (e: ICoreMouseEvent) => {
- const final = (e.action === CoreMouseAction.UP && e.button !== CoreMouseButton.WHEEL) ? 'm' : 'M';
- return `\x1b[<${eventCode(e, true)};${e.col};${e.row}${final}`;
- }
-};
-
-/**
- * CoreMouseService
- *
- * Provides mouse tracking reports with different protocols and encodings.
- * - protocols: NONE (default), X10, VT200, DRAG, ANY
- * - encodings: DEFAULT, SGR (UTF8, URXVT removed in #2507)
- *
- * Custom protocols/encodings can be added by `addProtocol` / `addEncoding`.
- * To activate a protocol/encoding, set `activeProtocol` / `activeEncoding`.
- * Switching a protocol will send a notification event `onProtocolChange`
- * with a list of needed events to track.
- *
- * The service handles the mouse tracking state and decides whether to send
- * a tracking report to the backend based on protocol and encoding limitations.
- * To send a mouse event call `triggerMouseEvent`.
- */
-export class CoreMouseService implements ICoreMouseService {
- private _protocols: {[name: string]: ICoreMouseProtocol} = {};
- private _encodings: {[name: string]: CoreMouseEncoding} = {};
- private _activeProtocol: string = '';
- private _activeEncoding: string = '';
- private _onProtocolChange = new EventEmitter<CoreMouseEventType>();
- private _lastEvent: ICoreMouseEvent | null = null;
-
- constructor(
- @IBufferService private readonly _bufferService: IBufferService,
- @ICoreService private readonly _coreService: ICoreService
- ) {
- // register default protocols and encodings
- for (const name of Object.keys(DEFAULT_PROTOCOLS)) this.addProtocol(name, DEFAULT_PROTOCOLS[name]);
- for (const name of Object.keys(DEFAULT_ENCODINGS)) this.addEncoding(name, DEFAULT_ENCODINGS[name]);
- // call reset to set defaults
- this.reset();
- }
-
- public addProtocol(name: string, protocol: ICoreMouseProtocol): void {
- this._protocols[name] = protocol;
- }
-
- public addEncoding(name: string, encoding: CoreMouseEncoding): void {
- this._encodings[name] = encoding;
- }
-
- public get activeProtocol(): string {
- return this._activeProtocol;
- }
-
- public get areMouseEventsActive(): boolean {
- return this._protocols[this._activeProtocol].events !== 0;
- }
-
- public set activeProtocol(name: string) {
- if (!this._protocols[name]) {
- throw new Error(`unknown protocol "${name}"`);
- }
- this._activeProtocol = name;
- this._onProtocolChange.fire(this._protocols[name].events);
- }
-
- public get activeEncoding(): string {
- return this._activeEncoding;
- }
-
- public set activeEncoding(name: string) {
- if (!this._encodings[name]) {
- throw new Error(`unknown encoding "${name}"`);
- }
- this._activeEncoding = name;
- }
-
- public reset(): void {
- this.activeProtocol = 'NONE';
- this.activeEncoding = 'DEFAULT';
- this._lastEvent = null;
- }
-
- /**
- * Event to announce changes in mouse tracking.
- */
- public get onProtocolChange(): IEvent<CoreMouseEventType> {
- return this._onProtocolChange.event;
- }
-
- /**
- * Triggers a mouse event to be sent.
- *
- * Returns true if the event passed all protocol restrictions and a report
- * was sent, otherwise false. The return value may be used to decide whether
- * the default event action in the bowser component should be omitted.
- *
- * Note: The method will change values of the given event object
- * to fullfill protocol and encoding restrictions.
- */
- public triggerMouseEvent(e: ICoreMouseEvent): boolean {
- // range check for col/row
- if (e.col < 0 || e.col >= this._bufferService.cols
- || e.row < 0 || e.row >= this._bufferService.rows) {
- return false;
- }
-
- // filter nonsense combinations of button + action
- if (e.button === CoreMouseButton.WHEEL && e.action === CoreMouseAction.MOVE) {
- return false;
- }
- if (e.button === CoreMouseButton.NONE && e.action !== CoreMouseAction.MOVE) {
- return false;
- }
- if (e.button !== CoreMouseButton.WHEEL && (e.action === CoreMouseAction.LEFT || e.action === CoreMouseAction.RIGHT)) {
- return false;
- }
-
- // report 1-based coords
- e.col++;
- e.row++;
-
- // debounce move at grid level
- if (e.action === CoreMouseAction.MOVE && this._lastEvent && this._compareEvents(this._lastEvent, e)) {
- return false;
- }
-
- // apply protocol restrictions
- if (!this._protocols[this._activeProtocol].restrict(e)) {
- return false;
- }
-
- // encode report and send
- const report = this._encodings[this._activeEncoding](e);
- if (report) {
- // always send DEFAULT as binary data
- if (this._activeEncoding === 'DEFAULT') {
- this._coreService.triggerBinaryEvent(report);
- } else {
- this._coreService.triggerDataEvent(report, true);
- }
- }
-
- this._lastEvent = e;
-
- return true;
- }
-
- public explainEvents(events: CoreMouseEventType): {[event: string]: boolean} {
- return {
- down: !!(events & CoreMouseEventType.DOWN),
- up: !!(events & CoreMouseEventType.UP),
- drag: !!(events & CoreMouseEventType.DRAG),
- move: !!(events & CoreMouseEventType.MOVE),
- wheel: !!(events & CoreMouseEventType.WHEEL)
- };
- }
-
- private _compareEvents(e1: ICoreMouseEvent, e2: ICoreMouseEvent): boolean {
- if (e1.col !== e2.col) return false;
- if (e1.row !== e2.row) return false;
- if (e1.button !== e2.button) return false;
- if (e1.action !== e2.action) return false;
- if (e1.ctrl !== e2.ctrl) return false;
- if (e1.alt !== e2.alt) return false;
- if (e1.shift !== e2.shift) return false;
- return true;
- }
-}
diff --git a/node_modules/xterm/src/common/services/CoreService.ts b/node_modules/xterm/src/common/services/CoreService.ts
deleted file mode 100644
index 20a3460..0000000
--- a/node_modules/xterm/src/common/services/CoreService.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ICoreService, ILogService, IOptionsService, IBufferService } from 'common/services/Services';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { IDecPrivateModes, IModes } from 'common/Types';
-import { clone } from 'common/Clone';
-import { Disposable } from 'common/Lifecycle';
-
-const DEFAULT_MODES: IModes = Object.freeze({
- insertMode: false
-});
-
-const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({
- applicationCursorKeys: false,
- applicationKeypad: false,
- bracketedPasteMode: false,
- origin: false,
- reverseWraparound: false,
- sendFocus: false,
- wraparound: true // defaults: xterm - true, vt100 - false
-});
-
-export class CoreService extends Disposable implements ICoreService {
- public serviceBrand: any;
-
- public isCursorInitialized: boolean = false;
- public isCursorHidden: boolean = false;
- public modes: IModes;
- public decPrivateModes: IDecPrivateModes;
-
- // Circular dependency, this must be unset or memory will leak after Terminal.dispose
- private _scrollToBottom: (() => void) | undefined;
-
- private _onData = this.register(new EventEmitter<string>());
- public get onData(): IEvent<string> { return this._onData.event; }
- private _onUserInput = this.register(new EventEmitter<void>());
- public get onUserInput(): IEvent<void> { return this._onUserInput.event; }
- private _onBinary = this.register(new EventEmitter<string>());
- public get onBinary(): IEvent<string> { return this._onBinary.event; }
-
- constructor(
- // TODO: Move this into a service
- scrollToBottom: () => void,
- @IBufferService private readonly _bufferService: IBufferService,
- @ILogService private readonly _logService: ILogService,
- @IOptionsService private readonly _optionsService: IOptionsService
- ) {
- super();
- this._scrollToBottom = scrollToBottom;
- this.register({ dispose: () => this._scrollToBottom = undefined });
- this.modes = clone(DEFAULT_MODES);
- this.decPrivateModes = clone(DEFAULT_DEC_PRIVATE_MODES);
- }
-
- public reset(): void {
- this.modes = clone(DEFAULT_MODES);
- this.decPrivateModes = clone(DEFAULT_DEC_PRIVATE_MODES);
- }
-
- public triggerDataEvent(data: string, wasUserInput: boolean = false): void {
- // Prevents all events to pty process if stdin is disabled
- if (this._optionsService.rawOptions.disableStdin) {
- return;
- }
-
- // Input is being sent to the terminal, the terminal should focus the prompt.
- const buffer = this._bufferService.buffer;
- if (buffer.ybase !== buffer.ydisp) {
- this._scrollToBottom!();
- }
-
- // Fire onUserInput so listeners can react as well (eg. clear selection)
- if (wasUserInput) {
- this._onUserInput.fire();
- }
-
- // Fire onData API
- this._logService.debug(`sending data "${data}"`, () => data.split('').map(e => e.charCodeAt(0)));
- this._onData.fire(data);
- }
-
- public triggerBinaryEvent(data: string): void {
- if (this._optionsService.rawOptions.disableStdin) {
- return;
- }
- this._logService.debug(`sending binary "${data}"`, () => data.split('').map(e => e.charCodeAt(0)));
- this._onBinary.fire(data);
- }
-}
diff --git a/node_modules/xterm/src/common/services/DirtyRowService.ts b/node_modules/xterm/src/common/services/DirtyRowService.ts
deleted file mode 100644
index 1c43b67..0000000
--- a/node_modules/xterm/src/common/services/DirtyRowService.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IBufferService, IDirtyRowService } from 'common/services/Services';
-
-export class DirtyRowService implements IDirtyRowService {
- public serviceBrand: any;
-
- private _start!: number;
- private _end!: number;
-
- public get start(): number { return this._start; }
- public get end(): number { return this._end; }
-
- constructor(
- @IBufferService private readonly _bufferService: IBufferService
- ) {
- this.clearRange();
- }
-
- public clearRange(): void {
- this._start = this._bufferService.buffer.y;
- this._end = this._bufferService.buffer.y;
- }
-
- public markDirty(y: number): void {
- if (y < this._start) {
- this._start = y;
- } else if (y > this._end) {
- this._end = y;
- }
- }
-
- public markRangeDirty(y1: number, y2: number): void {
- if (y1 > y2) {
- const temp = y1;
- y1 = y2;
- y2 = temp;
- }
- if (y1 < this._start) {
- this._start = y1;
- }
- if (y2 > this._end) {
- this._end = y2;
- }
- }
-
- public markAllDirty(): void {
- this.markRangeDirty(0, this._bufferService.rows - 1);
- }
-}
diff --git a/node_modules/xterm/src/common/services/InstantiationService.ts b/node_modules/xterm/src/common/services/InstantiationService.ts
deleted file mode 100644
index 8280948..0000000
--- a/node_modules/xterm/src/common/services/InstantiationService.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- *
- * This was heavily inspired from microsoft/vscode's dependency injection system (MIT).
- */
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-import { IInstantiationService, IServiceIdentifier } from 'common/services/Services';
-import { getServiceDependencies } from 'common/services/ServiceRegistry';
-
-export class ServiceCollection {
-
- private _entries = new Map<IServiceIdentifier<any>, any>();
-
- constructor(...entries: [IServiceIdentifier<any>, any][]) {
- for (const [id, service] of entries) {
- this.set(id, service);
- }
- }
-
- public set<T>(id: IServiceIdentifier<T>, instance: T): T {
- const result = this._entries.get(id);
- this._entries.set(id, instance);
- return result;
- }
-
- public forEach(callback: (id: IServiceIdentifier<any>, instance: any) => any): void {
- this._entries.forEach((value, key) => callback(key, value));
- }
-
- public has(id: IServiceIdentifier<any>): boolean {
- return this._entries.has(id);
- }
-
- public get<T>(id: IServiceIdentifier<T>): T | undefined {
- return this._entries.get(id);
- }
-}
-
-export class InstantiationService implements IInstantiationService {
- public serviceBrand: undefined;
-
- private readonly _services: ServiceCollection = new ServiceCollection();
-
- constructor() {
- this._services.set(IInstantiationService, this);
- }
-
- public setService<T>(id: IServiceIdentifier<T>, instance: T): void {
- this._services.set(id, instance);
- }
-
- public getService<T>(id: IServiceIdentifier<T>): T | undefined {
- return this._services.get(id);
- }
-
- public createInstance<T>(ctor: any, ...args: any[]): T {
- const serviceDependencies = getServiceDependencies(ctor).sort((a, b) => a.index - b.index);
-
- const serviceArgs: any[] = [];
- for (const dependency of serviceDependencies) {
- const service = this._services.get(dependency.id);
- if (!service) {
- throw new Error(`[createInstance] ${ctor.name} depends on UNKNOWN service ${dependency.id}.`);
- }
- serviceArgs.push(service);
- }
-
- const firstServiceArgPos = serviceDependencies.length > 0 ? serviceDependencies[0].index : args.length;
-
- // check for argument mismatches, adjust static args if needed
- if (args.length !== firstServiceArgPos) {
- throw new Error(`[createInstance] First service dependency of ${ctor.name} at position ${firstServiceArgPos + 1} conflicts with ${args.length} static arguments`);
- }
-
- // now create the instance
- return new ctor(...[...args, ...serviceArgs]);
- }
-}
diff --git a/node_modules/xterm/src/common/services/LogService.ts b/node_modules/xterm/src/common/services/LogService.ts
deleted file mode 100644
index d356656..0000000
--- a/node_modules/xterm/src/common/services/LogService.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { ILogService, IOptionsService, LogLevelEnum } from 'common/services/Services';
-
-type LogType = (message?: any, ...optionalParams: any[]) => void;
-
-interface IConsole {
- log: LogType;
- error: LogType;
- info: LogType;
- trace: LogType;
- warn: LogType;
-}
-
-// console is available on both node.js and browser contexts but the common
-// module doesn't depend on them so we need to explicitly declare it.
-declare const console: IConsole;
-
-const optionsKeyToLogLevel: { [key: string]: LogLevelEnum } = {
- debug: LogLevelEnum.DEBUG,
- info: LogLevelEnum.INFO,
- warn: LogLevelEnum.WARN,
- error: LogLevelEnum.ERROR,
- off: LogLevelEnum.OFF
-};
-
-const LOG_PREFIX = 'xterm.js: ';
-
-export class LogService implements ILogService {
- public serviceBrand: any;
-
- public logLevel: LogLevelEnum = LogLevelEnum.OFF;
-
- constructor(
- @IOptionsService private readonly _optionsService: IOptionsService
- ) {
- this._updateLogLevel();
- this._optionsService.onOptionChange(key => {
- if (key === 'logLevel') {
- this._updateLogLevel();
- }
- });
- }
-
- private _updateLogLevel(): void {
- this.logLevel = optionsKeyToLogLevel[this._optionsService.rawOptions.logLevel];
- }
-
- private _evalLazyOptionalParams(optionalParams: any[]): void {
- for (let i = 0; i < optionalParams.length; i++) {
- if (typeof optionalParams[i] === 'function') {
- optionalParams[i] = optionalParams[i]();
- }
- }
- }
-
- private _log(type: LogType, message: string, optionalParams: any[]): void {
- this._evalLazyOptionalParams(optionalParams);
- type.call(console, LOG_PREFIX + message, ...optionalParams);
- }
-
- public debug(message: string, ...optionalParams: any[]): void {
- if (this.logLevel <= LogLevelEnum.DEBUG) {
- this._log(console.log, message, optionalParams);
- }
- }
-
- public info(message: string, ...optionalParams: any[]): void {
- if (this.logLevel <= LogLevelEnum.INFO) {
- this._log(console.info, message, optionalParams);
- }
- }
-
- public warn(message: string, ...optionalParams: any[]): void {
- if (this.logLevel <= LogLevelEnum.WARN) {
- this._log(console.warn, message, optionalParams);
- }
- }
-
- public error(message: string, ...optionalParams: any[]): void {
- if (this.logLevel <= LogLevelEnum.ERROR) {
- this._log(console.error, message, optionalParams);
- }
- }
-}
diff --git a/node_modules/xterm/src/common/services/OptionsService.ts b/node_modules/xterm/src/common/services/OptionsService.ts
deleted file mode 100644
index 43fe998..0000000
--- a/node_modules/xterm/src/common/services/OptionsService.ts
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IOptionsService, ITerminalOptions, FontWeight } from 'common/services/Services';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { isMac } from 'common/Platform';
-
-// Source: https://freesound.org/people/altemark/sounds/45759/
-// This sound is released under the Creative Commons Attribution 3.0 Unported
-// (CC BY 3.0) license. It was created by 'altemark'. No modifications have been
-// made, apart from the conversion to base64.
-export const DEFAULT_BELL_SOUND = 'data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';
-
-export const DEFAULT_OPTIONS: Readonly<ITerminalOptions> = {
- cols: 80,
- rows: 24,
- cursorBlink: false,
- cursorStyle: 'block',
- cursorWidth: 1,
- customGlyphs: true,
- bellSound: DEFAULT_BELL_SOUND,
- bellStyle: 'none',
- drawBoldTextInBrightColors: true,
- fastScrollModifier: 'alt',
- fastScrollSensitivity: 5,
- fontFamily: 'courier-new, courier, monospace',
- fontSize: 15,
- fontWeight: 'normal',
- fontWeightBold: 'bold',
- lineHeight: 1.0,
- linkTooltipHoverDuration: 500,
- letterSpacing: 0,
- logLevel: 'info',
- scrollback: 1000,
- scrollSensitivity: 1,
- screenReaderMode: false,
- macOptionIsMeta: false,
- macOptionClickForcesSelection: false,
- minimumContrastRatio: 1,
- disableStdin: false,
- allowProposedApi: true,
- allowTransparency: false,
- tabStopWidth: 8,
- theme: {},
- rightClickSelectsWord: isMac,
- rendererType: 'canvas',
- windowOptions: {},
- windowsMode: false,
- wordSeparator: ' ()[]{}\',"`',
- altClickMovesCursor: true,
- convertEol: false,
- termName: 'xterm',
- cancelEvents: false
-};
-
-const FONT_WEIGHT_OPTIONS: Extract<FontWeight, string>[] = ['normal', 'bold', '100', '200', '300', '400', '500', '600', '700', '800', '900'];
-
-export class OptionsService implements IOptionsService {
- public serviceBrand: any;
-
- public readonly rawOptions: ITerminalOptions;
- public options: ITerminalOptions;
-
- private _onOptionChange = new EventEmitter<string>();
- public get onOptionChange(): IEvent<string> { return this._onOptionChange.event; }
-
- constructor(options: Partial<ITerminalOptions>) {
- // set the default value of each option
- const defaultOptions = { ...DEFAULT_OPTIONS };
- for (const key in options) {
- if (key in defaultOptions) {
- try {
- const newValue = options[key];
- defaultOptions[key] = this._sanitizeAndValidateOption(key, newValue);
- } catch (e) {
- console.error(e);
- }
- }
- }
-
- // set up getters and setters for each option
- this.rawOptions = defaultOptions;
- this.options = { ... defaultOptions };
- this._setupOptions();
- }
-
- private _setupOptions(): void {
- const getter = (propName: string): any => {
- if (!(propName in DEFAULT_OPTIONS)) {
- throw new Error(`No option with key "${propName}"`);
- }
- return this.rawOptions[propName];
- };
-
- const setter = (propName: string, value: any): void => {
- if (!(propName in DEFAULT_OPTIONS)) {
- throw new Error(`No option with key "${propName}"`);
- }
-
- value = this._sanitizeAndValidateOption(propName, value);
- // Don't fire an option change event if they didn't change
- if (this.rawOptions[propName] !== value) {
- this.rawOptions[propName] = value;
- this._onOptionChange.fire(propName);
- }
- };
-
- for (const propName in this.rawOptions) {
- const desc = {
- get: getter.bind(this, propName),
- set: setter.bind(this, propName)
- };
- Object.defineProperty(this.options, propName, desc);
- }
- }
-
- public setOption(key: string, value: any): void {
- this.options[key] = value;
- }
-
- private _sanitizeAndValidateOption(key: string, value: any): any {
- switch (key) {
- case 'bellStyle':
- case 'cursorStyle':
- case 'rendererType':
- case 'wordSeparator':
- if (!value) {
- value = DEFAULT_OPTIONS[key];
- }
- break;
- case 'fontWeight':
- case 'fontWeightBold':
- if (typeof value === 'number' && 1 <= value && value <= 1000) {
- // already valid numeric value
- break;
- }
- value = FONT_WEIGHT_OPTIONS.includes(value) ? value : DEFAULT_OPTIONS[key];
- break;
- case 'cursorWidth':
- value = Math.floor(value);
- // Fall through for bounds check
- case 'lineHeight':
- case 'tabStopWidth':
- if (value < 1) {
- throw new Error(`${key} cannot be less than 1, value: ${value}`);
- }
- break;
- case 'minimumContrastRatio':
- value = Math.max(1, Math.min(21, Math.round(value * 10) / 10));
- break;
- case 'scrollback':
- value = Math.min(value, 4294967295);
- if (value < 0) {
- throw new Error(`${key} cannot be less than 0, value: ${value}`);
- }
- break;
- case 'fastScrollSensitivity':
- case 'scrollSensitivity':
- if (value <= 0) {
- throw new Error(`${key} cannot be less than or equal to 0, value: ${value}`);
- }
- case 'rows':
- case 'cols':
- if (!value && value !== 0) {
- throw new Error(`${key} must be numeric, value: ${value}`);
- }
- break;
- }
- return value;
- }
-
- public getOption(key: string): any {
- return this.options[key];
- }
-}
diff --git a/node_modules/xterm/src/common/services/ServiceRegistry.ts b/node_modules/xterm/src/common/services/ServiceRegistry.ts
deleted file mode 100644
index 6510fb8..0000000
--- a/node_modules/xterm/src/common/services/ServiceRegistry.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- *
- * This was heavily inspired from microsoft/vscode's dependency injection system (MIT).
- */
-/*---------------------------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for license information.
- *--------------------------------------------------------------------------------------------*/
-
-import { IServiceIdentifier } from 'common/services/Services';
-
-const DI_TARGET = 'di$target';
-const DI_DEPENDENCIES = 'di$dependencies';
-
-export const serviceRegistry: Map<string, IServiceIdentifier<any>> = new Map();
-
-export function getServiceDependencies(ctor: any): { id: IServiceIdentifier<any>, index: number, optional: boolean }[] {
- return ctor[DI_DEPENDENCIES] || [];
-}
-
-export function createDecorator<T>(id: string): IServiceIdentifier<T> {
- if (serviceRegistry.has(id)) {
- return serviceRegistry.get(id)!;
- }
-
- const decorator: any = function (target: Function, key: string, index: number): any {
- if (arguments.length !== 3) {
- throw new Error('@IServiceName-decorator can only be used to decorate a parameter');
- }
-
- storeServiceDependency(decorator, target, index);
- };
-
- decorator.toString = () => id;
-
- serviceRegistry.set(id, decorator);
- return decorator;
-}
-
-function storeServiceDependency(id: Function, target: Function, index: number): void {
- if ((target as any)[DI_TARGET] === target) {
- (target as any)[DI_DEPENDENCIES].push({ id, index });
- } else {
- (target as any)[DI_DEPENDENCIES] = [{ id, index }];
- (target as any)[DI_TARGET] = target;
- }
-}
diff --git a/node_modules/xterm/src/common/services/Services.ts b/node_modules/xterm/src/common/services/Services.ts
deleted file mode 100644
index 90dca98..0000000
--- a/node_modules/xterm/src/common/services/Services.ts
+++ /dev/null
@@ -1,300 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IEvent } from 'common/EventEmitter';
-import { IBuffer, IBufferSet } from 'common/buffer/Types';
-import { IDecPrivateModes, ICoreMouseEvent, CoreMouseEncoding, ICoreMouseProtocol, CoreMouseEventType, ICharset, IWindowOptions, IModes, IAttributeData, ScrollSource } from 'common/Types';
-import { createDecorator } from 'common/services/ServiceRegistry';
-
-export const IBufferService = createDecorator<IBufferService>('BufferService');
-export interface IBufferService {
- serviceBrand: undefined;
-
- readonly cols: number;
- readonly rows: number;
- readonly buffer: IBuffer;
- readonly buffers: IBufferSet;
- isUserScrolling: boolean;
- onResize: IEvent<{ cols: number, rows: number }>;
- onScroll: IEvent<number>;
- scroll(eraseAttr: IAttributeData, isWrapped?: boolean): void;
- scrollToBottom(): void;
- scrollToTop(): void;
- scrollToLine(line: number): void;
- scrollLines(disp: number, suppressScrollEvent?: boolean, source?: ScrollSource): void;
- scrollPages(pageCount: number): void;
- resize(cols: number, rows: number): void;
- reset(): void;
-}
-
-export const ICoreMouseService = createDecorator<ICoreMouseService>('CoreMouseService');
-export interface ICoreMouseService {
- activeProtocol: string;
- activeEncoding: string;
- areMouseEventsActive: boolean;
- addProtocol(name: string, protocol: ICoreMouseProtocol): void;
- addEncoding(name: string, encoding: CoreMouseEncoding): void;
- reset(): void;
-
- /**
- * Triggers a mouse event to be sent.
- *
- * Returns true if the event passed all protocol restrictions and a report
- * was sent, otherwise false. The return value may be used to decide whether
- * the default event action in the bowser component should be omitted.
- *
- * Note: The method will change values of the given event object
- * to fullfill protocol and encoding restrictions.
- */
- triggerMouseEvent(event: ICoreMouseEvent): boolean;
-
- /**
- * Event to announce changes in mouse tracking.
- */
- onProtocolChange: IEvent<CoreMouseEventType>;
-
- /**
- * Human readable version of mouse events.
- */
- explainEvents(events: CoreMouseEventType): { [event: string]: boolean };
-}
-
-export const ICoreService = createDecorator<ICoreService>('CoreService');
-export interface ICoreService {
- serviceBrand: undefined;
-
- /**
- * Initially the cursor will not be visible until the first time the terminal
- * is focused.
- */
- isCursorInitialized: boolean;
- isCursorHidden: boolean;
-
- readonly modes: IModes;
- readonly decPrivateModes: IDecPrivateModes;
-
- readonly onData: IEvent<string>;
- readonly onUserInput: IEvent<void>;
- readonly onBinary: IEvent<string>;
-
- reset(): void;
-
- /**
- * Triggers the onData event in the public API.
- * @param data The data that is being emitted.
- * @param wasFromUser Whether the data originated from the user (as opposed to
- * resulting from parsing incoming data). When true this will also:
- * - Scroll to the bottom of the buffer.s
- * - Fire the `onUserInput` event (so selection can be cleared).
- */
- triggerDataEvent(data: string, wasUserInput?: boolean): void;
-
- /**
- * Triggers the onBinary event in the public API.
- * @param data The data that is being emitted.
- */
- triggerBinaryEvent(data: string): void;
-}
-
-export const ICharsetService = createDecorator<ICharsetService>('CharsetService');
-export interface ICharsetService {
- serviceBrand: undefined;
-
- charset: ICharset | undefined;
- readonly glevel: number;
-
- reset(): void;
-
- /**
- * Set the G level of the terminal.
- * @param g
- */
- setgLevel(g: number): void;
-
- /**
- * Set the charset for the given G level of the terminal.
- * @param g
- * @param charset
- */
- setgCharset(g: number, charset: ICharset | undefined): void;
-}
-
-export const IDirtyRowService = createDecorator<IDirtyRowService>('DirtyRowService');
-export interface IDirtyRowService {
- serviceBrand: undefined;
-
- readonly start: number;
- readonly end: number;
-
- clearRange(): void;
- markDirty(y: number): void;
- markRangeDirty(y1: number, y2: number): void;
- markAllDirty(): void;
-}
-
-export interface IServiceIdentifier<T> {
- (...args: any[]): void;
- type: T;
-}
-
-export interface IBrandedService {
- serviceBrand: undefined;
-}
-
-type GetLeadingNonServiceArgs<Args> =
- Args extends [...IBrandedService[]] ? []
- : Args extends [infer A1, ...IBrandedService[]] ? [A1]
- : Args extends [infer A1, infer A2, ...IBrandedService[]] ? [A1, A2]
- : Args extends [infer A1, infer A2, infer A3, ...IBrandedService[]] ? [A1, A2, A3]
- : Args extends [infer A1, infer A2, infer A3, infer A4, ...IBrandedService[]] ? [A1, A2, A3, A4]
- : Args extends [infer A1, infer A2, infer A3, infer A4, infer A5, ...IBrandedService[]] ? [A1, A2, A3, A4, A5]
- : Args extends [infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, ...IBrandedService[]] ? [A1, A2, A3, A4, A5, A6]
- : Args extends [infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, infer A7, ...IBrandedService[]] ? [A1, A2, A3, A4, A5, A6, A7]
- : Args extends [infer A1, infer A2, infer A3, infer A4, infer A5, infer A6, infer A7, infer A8, ...IBrandedService[]] ? [A1, A2, A3, A4, A5, A6, A7, A8]
- : never;
-
-export const IInstantiationService = createDecorator<IInstantiationService>('InstantiationService');
-export interface IInstantiationService {
- serviceBrand: undefined;
-
- setService<T>(id: IServiceIdentifier<T>, instance: T): void;
- getService<T>(id: IServiceIdentifier<T>): T | undefined;
- createInstance<Ctor extends new (...args: any[]) => any, R extends InstanceType<Ctor>>(t: Ctor, ...args: GetLeadingNonServiceArgs<ConstructorParameters<Ctor>>): R;
-}
-
-export enum LogLevelEnum {
- DEBUG = 0,
- INFO = 1,
- WARN = 2,
- ERROR = 3,
- OFF = 4
-}
-
-export const ILogService = createDecorator<ILogService>('LogService');
-export interface ILogService {
- serviceBrand: undefined;
-
- logLevel: LogLevelEnum;
-
- debug(message: any, ...optionalParams: any[]): void;
- info(message: any, ...optionalParams: any[]): void;
- warn(message: any, ...optionalParams: any[]): void;
- error(message: any, ...optionalParams: any[]): void;
-}
-
-export const IOptionsService = createDecorator<IOptionsService>('OptionsService');
-export interface IOptionsService {
- serviceBrand: undefined;
-
- /**
- * Read only access to the raw options object, this is an internal-only fast path for accessing
- * single options without any validation as we trust TypeScript to enforce correct usage
- * internally.
- */
- readonly rawOptions: Readonly<ITerminalOptions>;
- readonly options: ITerminalOptions;
-
- readonly onOptionChange: IEvent<string>;
-
- setOption<T>(key: string, value: T): void;
- getOption<T>(key: string): T | undefined;
-}
-
-export type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | number;
-export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'off';
-
-export type RendererType = 'dom' | 'canvas';
-
-export interface ITerminalOptions {
- allowProposedApi: boolean;
- allowTransparency: boolean;
- altClickMovesCursor: boolean;
- bellSound: string;
- bellStyle: 'none' | 'sound' /* | 'visual' | 'both' */;
- cols: number;
- convertEol: boolean;
- cursorBlink: boolean;
- cursorStyle: 'block' | 'underline' | 'bar';
- cursorWidth: number;
- customGlyphs: boolean;
- disableStdin: boolean;
- drawBoldTextInBrightColors: boolean;
- fastScrollModifier: 'alt' | 'ctrl' | 'shift' | undefined;
- fastScrollSensitivity: number;
- fontSize: number;
- fontFamily: string;
- fontWeight: FontWeight;
- fontWeightBold: FontWeight;
- letterSpacing: number;
- lineHeight: number;
- linkTooltipHoverDuration: number;
- logLevel: LogLevel;
- macOptionIsMeta: boolean;
- macOptionClickForcesSelection: boolean;
- minimumContrastRatio: number;
- rendererType: RendererType;
- rightClickSelectsWord: boolean;
- rows: number;
- screenReaderMode: boolean;
- scrollback: number;
- scrollSensitivity: number;
- tabStopWidth: number;
- theme: ITheme;
- windowsMode: boolean;
- windowOptions: IWindowOptions;
- wordSeparator: string;
-
- [key: string]: any;
- cancelEvents: boolean;
- termName: string;
-}
-
-export interface ITheme {
- foreground?: string;
- background?: string;
- cursor?: string;
- cursorAccent?: string;
- selection?: string;
- black?: string;
- red?: string;
- green?: string;
- yellow?: string;
- blue?: string;
- magenta?: string;
- cyan?: string;
- white?: string;
- brightBlack?: string;
- brightRed?: string;
- brightGreen?: string;
- brightYellow?: string;
- brightBlue?: string;
- brightMagenta?: string;
- brightCyan?: string;
- brightWhite?: string;
-}
-
-export const IUnicodeService = createDecorator<IUnicodeService>('UnicodeService');
-export interface IUnicodeService {
- serviceBrand: undefined;
- /** Register an Unicode version provider. */
- register(provider: IUnicodeVersionProvider): void;
- /** Registered Unicode versions. */
- readonly versions: string[];
- /** Currently active version. */
- activeVersion: string;
- /** Event triggered, when activate version changed. */
- readonly onChange: IEvent<string>;
-
- /**
- * Unicode version dependent
- */
- wcwidth(codepoint: number): number;
- getStringCellWidth(s: string): number;
-}
-
-export interface IUnicodeVersionProvider {
- readonly version: string;
- wcwidth(ucs: number): 0 | 1 | 2;
-}
diff --git a/node_modules/xterm/src/common/services/UnicodeService.ts b/node_modules/xterm/src/common/services/UnicodeService.ts
deleted file mode 100644
index e96b757..0000000
--- a/node_modules/xterm/src/common/services/UnicodeService.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-/**
- * Copyright (c) 2019 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-import { IUnicodeService, IUnicodeVersionProvider } from 'common/services/Services';
-import { EventEmitter, IEvent } from 'common/EventEmitter';
-import { UnicodeV6 } from 'common/input/UnicodeV6';
-
-
-export class UnicodeService implements IUnicodeService {
- public serviceBrand: any;
-
- private _providers: {[key: string]: IUnicodeVersionProvider} = Object.create(null);
- private _active: string = '';
- private _activeProvider: IUnicodeVersionProvider;
- private _onChange = new EventEmitter<string>();
- public get onChange(): IEvent<string> { return this._onChange.event; }
-
- constructor() {
- const defaultProvider = new UnicodeV6();
- this.register(defaultProvider);
- this._active = defaultProvider.version;
- this._activeProvider = defaultProvider;
- }
-
- public get versions(): string[] {
- return Object.keys(this._providers);
- }
-
- public get activeVersion(): string {
- return this._active;
- }
-
- public set activeVersion(version: string) {
- if (!this._providers[version]) {
- throw new Error(`unknown Unicode version "${version}"`);
- }
- this._active = version;
- this._activeProvider = this._providers[version];
- this._onChange.fire(version);
- }
-
- public register(provider: IUnicodeVersionProvider): void {
- this._providers[provider.version] = provider;
- }
-
- /**
- * Unicode version dependent interface.
- */
- public wcwidth(num: number): number {
- return this._activeProvider.wcwidth(num);
- }
-
- public getStringCellWidth(s: string): number {
- let result = 0;
- const length = s.length;
- for (let i = 0; i < length; ++i) {
- let code = s.charCodeAt(i);
- // surrogate pair first
- if (0xD800 <= code && code <= 0xDBFF) {
- if (++i >= length) {
- // this should not happen with strings retrieved from
- // Buffer.translateToString as it converts from UTF-32
- // and therefore always should contain the second part
- // for any other string we still have to handle it somehow:
- // simply treat the lonely surrogate first as a single char (UCS-2 behavior)
- return result + this.wcwidth(code);
- }
- const second = s.charCodeAt(i);
- // convert surrogate pair to high codepoint only for valid second part (UTF-16)
- // otherwise treat them independently (UCS-2 behavior)
- if (0xDC00 <= second && second <= 0xDFFF) {
- code = (code - 0xD800) * 0x400 + second - 0xDC00 + 0x10000;
- } else {
- result += this.wcwidth(second);
- }
- }
- result += this.wcwidth(code);
- }
- return result;
- }
-}
diff --git a/node_modules/xterm/src/headless/Terminal.ts b/node_modules/xterm/src/headless/Terminal.ts
deleted file mode 100644
index 7f138ce..0000000
--- a/node_modules/xterm/src/headless/Terminal.ts
+++ /dev/null
@@ -1,170 +0,0 @@
-/**
- * Copyright (c) 2014 The xterm.js authors. All rights reserved.
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
- * @license MIT
- *
- * Originally forked from (with the author's permission):
- * Fabrice Bellard's javascript vt100 for jslinux:
- * http://bellard.org/jslinux/
- * Copyright (c) 2011 Fabrice Bellard
- * The original design remains. The terminal itself
- * has been extended to include xterm CSI codes, among
- * other features.
- *
- * Terminal Emulation References:
- * http://vt100.net/
- * http://invisible-island.net/xterm/ctlseqs/ctlseqs.txt
- * http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
- * http://invisible-island.net/vttest/
- * http://www.inwap.com/pdp10/ansicode.txt
- * http://linux.die.net/man/4/console_codes
- * http://linux.die.net/man/7/urxvt
- */
-
-import { DEFAULT_ATTR_DATA } from 'common/buffer/BufferLine';
-import { IBuffer } from 'common/buffer/Types';
-import { CoreTerminal } from 'common/CoreTerminal';
-import { EventEmitter, forwardEvent, IEvent } from 'common/EventEmitter';
-import { ITerminalOptions as IInitializedTerminalOptions } from 'common/services/Services';
-import { IMarker, ITerminalOptions, ScrollSource } from 'common/Types';
-
-export class Terminal extends CoreTerminal {
- // TODO: We should remove options once components adopt optionsService
- public get options(): IInitializedTerminalOptions { return this.optionsService.options; }
-
- private _onBell = new EventEmitter<void>();
- public get onBell(): IEvent<void> { return this._onBell.event; }
- private _onCursorMove = new EventEmitter<void>();
- public get onCursorMove(): IEvent<void> { return this._onCursorMove.event; }
- private _onTitleChange = new EventEmitter<string>();
- public get onTitleChange(): IEvent<string> { return this._onTitleChange.event; }
-
- private _onA11yCharEmitter = new EventEmitter<string>();
- public get onA11yChar(): IEvent<string> { return this._onA11yCharEmitter.event; }
- private _onA11yTabEmitter = new EventEmitter<number>();
- public get onA11yTab(): IEvent<number> { return this._onA11yTabEmitter.event; }
-
- /**
- * Creates a new `Terminal` object.
- *
- * @param options An object containing a set of options, the available options are:
- * - `cursorBlink` (boolean): Whether the terminal cursor blinks
- * - `cols` (number): The number of columns of the terminal (horizontal size)
- * - `rows` (number): The number of rows of the terminal (vertical size)
- *
- * @public
- * @class Xterm Xterm
- * @alias module:xterm/src/xterm
- */
- constructor(
- options: ITerminalOptions = {}
- ) {
- super(options);
-
- this._setup();
-
- // Setup InputHandler listeners
- this.register(this._inputHandler.onRequestBell(() => this.bell()));
- this.register(this._inputHandler.onRequestReset(() => this.reset()));
- this.register(forwardEvent(this._inputHandler.onCursorMove, this._onCursorMove));
- this.register(forwardEvent(this._inputHandler.onTitleChange, this._onTitleChange));
- this.register(forwardEvent(this._inputHandler.onA11yChar, this._onA11yCharEmitter));
- this.register(forwardEvent(this._inputHandler.onA11yTab, this._onA11yTabEmitter));
- }
-
- public dispose(): void {
- if (this._isDisposed) {
- return;
- }
- super.dispose();
- this.write = () => { };
- }
-
- /**
- * Convenience property to active buffer.
- */
- public get buffer(): IBuffer {
- return this.buffers.active;
- }
-
- protected _updateOptions(key: string): void {
- super._updateOptions(key);
-
- // TODO: These listeners should be owned by individual components
- switch (key) {
- case 'tabStopWidth': this.buffers.setupTabStops(); break;
- }
- }
-
- // TODO: Support paste here?
-
- public get markers(): IMarker[] {
- return this.buffer.markers;
- }
-
- public addMarker(cursorYOffset: number): IMarker | undefined {
- // Disallow markers on the alt buffer
- if (this.buffer !== this.buffers.normal) {
- return;
- }
-
- return this.buffer.addMarker(this.buffer.ybase + this.buffer.y + cursorYOffset);
- }
-
- public bell(): void {
- this._onBell.fire();
- }
-
- /**
- * Resizes the terminal.
- *
- * @param x The number of columns to resize to.
- * @param y The number of rows to resize to.
- */
- public resize(x: number, y: number): void {
- if (x === this.cols && y === this.rows) {
- return;
- }
-
- super.resize(x, y);
- }
-
- /**
- * Clear the entire buffer, making the prompt line the new first line.
- */
- public clear(): void {
- if (this.buffer.ybase === 0 && this.buffer.y === 0) {
- // Don't clear if it's already clear
- return;
- }
- this.buffer.lines.set(0, this.buffer.lines.get(this.buffer.ybase + this.buffer.y)!);
- this.buffer.lines.length = 1;
- this.buffer.ydisp = 0;
- this.buffer.ybase = 0;
- this.buffer.y = 0;
- for (let i = 1; i < this.rows; i++) {
- this.buffer.lines.push(this.buffer.getBlankLine(DEFAULT_ATTR_DATA));
- }
- this._onScroll.fire({ position: this.buffer.ydisp, source: ScrollSource.TERMINAL });
- }
-
- /**
- * Reset terminal.
- * Note: Calling this directly from JS is synchronous but does not clear
- * input buffers and does not reset the parser, thus the terminal will
- * continue to apply pending input data.
- * If you need in band reset (synchronous with input data) consider
- * using DECSTR (soft reset, CSI ! p) or RIS instead (hard reset, ESC c).
- */
- public reset(): void {
- /**
- * Since _setup handles a full terminal creation, we have to carry forward
- * a few things that should not reset.
- */
- this.options.rows = this.rows;
- this.options.cols = this.cols;
-
- this._setup();
- super.reset();
- }
-}
diff --git a/node_modules/xterm/src/headless/Types.d.ts b/node_modules/xterm/src/headless/Types.d.ts
deleted file mode 100644
index 868e5c1..0000000
--- a/node_modules/xterm/src/headless/Types.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { IBuffer, IBufferSet } from 'common/buffer/Types';
-import { IEvent } from 'common/EventEmitter';
-import { IFunctionIdentifier, IParams } from 'common/parser/Types';
-import { ICoreTerminal, IDisposable, IMarker, ITerminalOptions } from 'common/Types';
-
-export interface ITerminal extends ICoreTerminal {
- rows: number;
- cols: number;
- buffer: IBuffer;
- buffers: IBufferSet;
- markers: IMarker[];
- // TODO: We should remove options once components adopt optionsService
- options: ITerminalOptions;
-
- onCursorMove: IEvent<void>;
- onData: IEvent<string>;
- onBinary: IEvent<string>;
- onLineFeed: IEvent<void>;
- onResize: IEvent<{ cols: number, rows: number }>;
- onTitleChange: IEvent<string>;
- resize(columns: number, rows: number): void;
- addCsiHandler(id: IFunctionIdentifier, callback: (params: IParams) => boolean): IDisposable;
- addDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: IParams) => boolean): IDisposable;
- addEscHandler(id: IFunctionIdentifier, callback: () => boolean): IDisposable;
- addOscHandler(ident: number, callback: (data: string) => boolean): IDisposable;
- addMarker(cursorYOffset: number): IMarker | undefined;
- dispose(): void;
- clear(): void;
- write(data: string | Uint8Array, callback?: () => void): void;
- reset(): void;
-}
diff --git a/node_modules/xterm/src/headless/public/Terminal.ts b/node_modules/xterm/src/headless/public/Terminal.ts
deleted file mode 100644
index 5a35fae..0000000
--- a/node_modules/xterm/src/headless/public/Terminal.ts
+++ /dev/null
@@ -1,216 +0,0 @@
-/**
- * Copyright (c) 2018 The xterm.js authors. All rights reserved.
- * @license MIT
- */
-
-import { IEvent } from 'common/EventEmitter';
-import { BufferNamespaceApi } from 'common/public/BufferNamespaceApi';
-import { ParserApi } from 'common/public/ParserApi';
-import { UnicodeApi } from 'common/public/UnicodeApi';
-import { IBufferNamespace as IBufferNamespaceApi, IMarker, IModes, IParser, ITerminalAddon, IUnicodeHandling, Terminal as ITerminalApi } from 'xterm-headless';
-import { Terminal as TerminalCore } from 'headless/Terminal';
-import { AddonManager } from 'common/public/AddonManager';
-import { ITerminalOptions } from 'common/Types';
-
-/**
- * The set of options that only have an effect when set in the Terminal constructor.
- */
-const CONSTRUCTOR_ONLY_OPTIONS = ['cols', 'rows'];
-
-export class Terminal implements ITerminalApi {
- private _core: TerminalCore;
- private _addonManager: AddonManager;
- private _parser: IParser | undefined;
- private _buffer: BufferNamespaceApi | undefined;
- private _publicOptions: ITerminalOptions;
-
- constructor(options?: ITerminalOptions) {
- this._core = new TerminalCore(options);
- this._addonManager = new AddonManager();
-
- this._publicOptions = { ... this._core.options };
- const getter = (propName: string): any => {
- return this._core.options[propName];
- };
- const setter = (propName: string, value: any): void => {
- this._checkReadonlyOptions(propName);
- this._core.options[propName] = value;
- };
-
- for (const propName in this._core.options) {
- Object.defineProperty(this._publicOptions, propName, {
- get: () => {
- return this._core.options[propName];
- },
- set: (value: any) => {
- this._checkReadonlyOptions(propName);
- this._core.options[propName] = value;
- }
- });
- const desc = {
- get: getter.bind(this, propName),
- set: setter.bind(this, propName)
- };
- Object.defineProperty(this._publicOptions, propName, desc);
- }
- }
-
- private _checkReadonlyOptions(propName: string): void {
- // Throw an error if any constructor only option is modified
- // from terminal.options
- // Modifications from anywhere else are allowed
- if (CONSTRUCTOR_ONLY_OPTIONS.includes(propName)) {
- throw new Error(`Option "${propName}" can only be set in the constructor`);
- }
- }
-
- private _checkProposedApi(): void {
- if (!this._core.optionsService.options.allowProposedApi) {
- throw new Error('You must set the allowProposedApi option to true to use proposed API');
- }
- }
-
- public get onBell(): IEvent<void> { return this._core.onBell; }
- public get onBinary(): IEvent<string> { return this._core.onBinary; }
- public get onCursorMove(): IEvent<void> { return this._core.onCursorMove; }
- public get onData(): IEvent<string> { return this._core.onData; }
- public get onLineFeed(): IEvent<void> { return this._core.onLineFeed; }
- public get onResize(): IEvent<{ cols: number, rows: number }> { return this._core.onResize; }
- public get onScroll(): IEvent<number> { return this._core.onScroll; }
- public get onTitleChange(): IEvent<string> { return this._core.onTitleChange; }
-
- public get parser(): IParser {
- this._checkProposedApi();
- if (!this._parser) {
- this._parser = new ParserApi(this._core);
- }
- return this._parser;
- }
- public get unicode(): IUnicodeHandling {
- this._checkProposedApi();
- return new UnicodeApi(this._core);
- }
- public get rows(): number { return this._core.rows; }
- public get cols(): number { return this._core.cols; }
- public get buffer(): IBufferNamespaceApi {
- this._checkProposedApi();
- if (!this._buffer) {
- this._buffer = new BufferNamespaceApi(this._core);
- }
- return this._buffer;
- }
- public get markers(): ReadonlyArray<IMarker> {
- this._checkProposedApi();
- return this._core.markers;
- }
- public get modes(): IModes {
- const m = this._core.coreService.decPrivateModes;
- let mouseTrackingMode: 'none' | 'x10' | 'vt200' | 'drag' | 'any' = 'none';
- switch (this._core.coreMouseService.activeProtocol) {
- case 'X10': mouseTrackingMode = 'x10'; break;
- case 'VT200': mouseTrackingMode = 'vt200'; break;
- case 'DRAG': mouseTrackingMode = 'drag'; break;
- case 'ANY': mouseTrackingMode = 'any'; break;
- }
- return {
- applicationCursorKeysMode: m.applicationCursorKeys,
- applicationKeypadMode: m.applicationKeypad,
- bracketedPasteMode: m.bracketedPasteMode,
- insertMode: this._core.coreService.modes.insertMode,
- mouseTrackingMode: mouseTrackingMode,
- originMode: m.origin,
- reverseWraparoundMode: m.reverseWraparound,
- sendFocusMode: m.sendFocus,
- wraparoundMode: m.wraparound
- };
- }
- public get options(): ITerminalOptions {
- return this._publicOptions;
- }
- public set options(options: ITerminalOptions) {
- for (const propName in options) {
- this._publicOptions[propName] = options[propName];
- }
- }
- public resize(columns: number, rows: number): void {
- this._verifyIntegers(columns, rows);
- this._core.resize(columns, rows);
- }
- public registerMarker(cursorYOffset: number = 0): IMarker | undefined {
- this._checkProposedApi();
- this._verifyIntegers(cursorYOffset);
- return this._core.addMarker(cursorYOffset);
- }
- public addMarker(cursorYOffset: number): IMarker | undefined {
- return this.registerMarker(cursorYOffset);
- }
- public dispose(): void {
- this._addonManager.dispose();
- this._core.dispose();
- }
- public scrollLines(amount: number): void {
- this._verifyIntegers(amount);
- this._core.scrollLines(amount);
- }
- public scrollPages(pageCount: number): void {
- this._verifyIntegers(pageCount);
- this._core.scrollPages(pageCount);
- }
- public scrollToTop(): void {
- this._core.scrollToTop();
- }
- public scrollToBottom(): void {
- this._core.scrollToBottom();
- }
- public scrollToLine(line: number): void {
- this._verifyIntegers(line);
- this._core.scrollToLine(line);
- }
- public clear(): void {
- this._core.clear();
- }
- public write(data: string | Uint8Array, callback?: () => void): void {
- this._core.write(data, callback);
- }
- public writeUtf8(data: Uint8Array, callback?: () => void): void {
- this._core.write(data, callback);
- }
- public writeln(data: string | Uint8Array, callback?: () => void): void {
- this._core.write(data);
- this._core.write('\r\n', callback);
- }
- public getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string;
- public getOption(key: 'allowTransparency' | 'altClickMovesCursor' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'visualBell'): boolean;
- public getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number;
- public getOption(key: string): any;
- public getOption(key: any): any {
- return this._core.optionsService.getOption(key);
- }
- public setOption(key: 'bellSound' | 'fontFamily' | 'termName' | 'wordSeparator', value: string): void;
- public setOption(key: 'fontWeight' | 'fontWeightBold', value: 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | number): void;
- public setOption(key: 'logLevel', value: 'debug' | 'info' | 'warn' | 'error' | 'off'): void;
- public setOption(key: 'bellStyle', value: 'none' | 'visual' | 'sound' | 'both'): void;
- public setOption(key: 'cursorStyle', value: 'block' | 'underline' | 'bar'): void;
- public setOption(key: 'allowTransparency' | 'altClickMovesCursor' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'visualBell', value: boolean): void;
- public setOption(key: 'fontSize' | 'letterSpacing' | 'lineHeight' | 'tabStopWidth' | 'scrollback', value: number): void;
- public setOption(key: 'cols' | 'rows', value: number): void;
- public setOption(key: string, value: any): void;
- public setOption(key: any, value: any): void {
- this._core.optionsService.setOption(key, value);
- }
- public reset(): void {
- this._core.reset();
- }
- public loadAddon(addon: ITerminalAddon): void {
- // TODO: This could cause issues if the addon calls renderer apis
- return this._addonManager.loadAddon(this as any, addon);
- }
-
- private _verifyIntegers(...values: number[]): void {
- for (const value of values) {
- if (value === Infinity || isNaN(value) || value % 1 !== 0) {
- throw new Error('This API only accepts integers');
- }
- }
- }
-}
diff --git a/node_modules/xterm/typings/xterm.d.ts b/node_modules/xterm/typings/xterm.d.ts
deleted file mode 100644
index 2cd4daa..0000000
--- a/node_modules/xterm/typings/xterm.d.ts
+++ /dev/null
@@ -1,1811 +0,0 @@
-/**
- * @license MIT
- *
- * This contains the type declarations for the xterm.js library. Note that
- * some interfaces differ between this file and the actual implementation in
- * src/, that's because this file declares the *public* API which is intended
- * to be stable and consumed by external programs.
- */
-
-/// <reference lib="dom"/>
-
-declare module 'xterm' {
- /**
- * A string or number representing text font weight.
- */
- export type FontWeight = 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | number;
-
- /**
- * A string representing log level.
- */
- export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'off';
-
- /**
- * A string representing a renderer type.
- */
- export type RendererType = 'dom' | 'canvas';
-
- /**
- * An object containing start up options for the terminal.
- */
- export interface ITerminalOptions {
- /**
- * Whether to allow the use of proposed API. When false, any usage of APIs
- * marked as experimental/proposed will throw an error. This defaults to
- * true currently, but will change to false in v5.0.
- */
- allowProposedApi?: boolean;
-
- /**
- * Whether background should support non-opaque color. It must be set before
- * executing the `Terminal.open()` method and can't be changed later without
- * executing it again. Note that enabling this can negatively impact
- * performance.
- */
- allowTransparency?: boolean;
-
- /**
- * If enabled, alt + click will move the prompt cursor to position
- * underneath the mouse. The default is true.
- */
- altClickMovesCursor?: boolean;
-
- /**
- * A data uri of the sound to use for the bell when `bellStyle = 'sound'`.
- */
- bellSound?: string;
-
- /**
- * The type of the bell notification the terminal will use.
- */
- bellStyle?: 'none' | 'sound';
-
- /**
- * When enabled the cursor will be set to the beginning of the next line
- * with every new line. This is equivalent to sending '\r\n' for each '\n'.
- * Normally the termios settings of the underlying PTY deals with the
- * translation of '\n' to '\r\n' and this setting should not be used. If you
- * deal with data from a non-PTY related source, this settings might be
- * useful.
- */
- convertEol?: boolean;
-
- /**
- * The number of columns in the terminal.
- */
- cols?: number;
-
- /**
- * Whether the cursor blinks.
- */
- cursorBlink?: boolean;
-
- /**
- * The style of the cursor.
- */
- cursorStyle?: 'block' | 'underline' | 'bar';
-
- /**
- * The width of the cursor in CSS pixels when `cursorStyle` is set to 'bar'.
- */
- cursorWidth?: number;
-
- /**
- * Whether to draw custom glyphs for block element and box drawing characters instead of using
- * the font. This should typically result in better rendering with continuous lines, even when
- * line height and letter spacing is used. Note that this doesn't work with the DOM renderer
- * which renders all characters using the font. The default is true.
- */
- customGlyphs?: boolean;
-
- /**
- * Whether input should be disabled.
- */
- disableStdin?: boolean;
-
- /**
- * Whether to draw bold text in bright colors. The default is true.
- */
- drawBoldTextInBrightColors?: boolean;
-
- /**
- * The modifier key hold to multiply scroll speed.
- */
- fastScrollModifier?: 'alt' | 'ctrl' | 'shift' | undefined;
-
- /**
- * The scroll speed multiplier used for fast scrolling.
- */
- fastScrollSensitivity?: number;
-
- /**
- * The font size used to render text.
- */
- fontSize?: number;
-
- /**
- * The font family used to render text.
- */
- fontFamily?: string;
-
- /**
- * The font weight used to render non-bold text.
- */
- fontWeight?: FontWeight;
-
- /**
- * The font weight used to render bold text.
- */
- fontWeightBold?: FontWeight;
-
- /**
- * The spacing in whole pixels between characters.
- */
- letterSpacing?: number;
-
- /**
- * The line height used to render text.
- */
- lineHeight?: number;
-
- /**
- * The duration in milliseconds before link tooltip events fire when
- * hovering on a link.
- * @deprecated This will be removed when the link matcher API is removed.
- */
- linkTooltipHoverDuration?: number;
-
- /**
- * What log level to use, this will log for all levels below and including
- * what is set:
- *
- * 1. debug
- * 2. info (default)
- * 3. warn
- * 4. error
- * 5. off
- */
- logLevel?: LogLevel;
-
- /**
- * Whether to treat option as the meta key.
- */
- macOptionIsMeta?: boolean;
-
- /**
- * Whether holding a modifier key will force normal selection behavior,
- * regardless of whether the terminal is in mouse events mode. This will
- * also prevent mouse events from being emitted by the terminal. For
- * example, this allows you to use xterm.js' regular selection inside tmux
- * with mouse mode enabled.
- */
- macOptionClickForcesSelection?: boolean;
-
- /**
- * The minimum contrast ratio for text in the terminal, setting this will
- * change the foreground color dynamically depending on whether the contrast
- * ratio is met. Example values:
- *
- * - 1: The default, do nothing.
- * - 4.5: Minimum for WCAG AA compliance.
- * - 7: Minimum for WCAG AAA compliance.
- * - 21: White on black or black on white.
- */
- minimumContrastRatio?: number;
-
- /**
- * The type of renderer to use, this allows using the fallback DOM renderer
- * when canvas is too slow for the environment. The following features do
- * not work when the DOM renderer is used:
- *
- * - Letter spacing
- * - Cursor blink
- */
- rendererType?: RendererType;
-
- /**
- * Whether to select the word under the cursor on right click, this is
- * standard behavior in a lot of macOS applications.
- */
- rightClickSelectsWord?: boolean;
-
- /**
- * The number of rows in the terminal.
- */
- rows?: number;
-
- /**
- * Whether screen reader support is enabled. When on this will expose
- * supporting elements in the DOM to support NVDA on Windows and VoiceOver
- * on macOS.
- */
- screenReaderMode?: boolean;
-
- /**
- * The amount of scrollback in the terminal. Scrollback is the amount of
- * rows that are retained when lines are scrolled beyond the initial
- * viewport.
- */
- scrollback?: number;
-
- /**
- * The scrolling speed multiplier used for adjusting normal scrolling speed.
- */
- scrollSensitivity?: number;
-
- /**
- * The size of tab stops in the terminal.
- */
- tabStopWidth?: number;
-
- /**
- * The color theme of the terminal.
- */
- theme?: ITheme;
-
- /**
- * Whether "Windows mode" is enabled. Because Windows backends winpty and
- * conpty operate by doing line wrapping on their side, xterm.js does not
- * have access to wrapped lines. When Windows mode is enabled the following
- * changes will be in effect:
- *
- * - Reflow is disabled.
- * - Lines are assumed to be wrapped if the last character of the line is
- * not whitespace.
- */
- windowsMode?: boolean;
-
- /**
- * A string containing all characters that are considered word separated by the
- * double click to select work logic.
- */
- wordSeparator?: string;
-
- /**
- * Enable various window manipulation and report features.
- * All features are disabled by default for security reasons.
- */
- windowOptions?: IWindowOptions;
- }
-
- /**
- * Contains colors to theme the terminal with.
- */
- export interface ITheme {
- /** The default foreground color */
- foreground?: string;
- /** The default background color */
- background?: string;
- /** The cursor color */
- cursor?: string;
- /** The accent color of the cursor (fg color for a block cursor) */
- cursorAccent?: string;
- /** The selection background color (can be transparent) */
- selection?: string;
- /** ANSI black (eg. `\x1b[30m`) */
- black?: string;
- /** ANSI red (eg. `\x1b[31m`) */
- red?: string;
- /** ANSI green (eg. `\x1b[32m`) */
- green?: string;
- /** ANSI yellow (eg. `\x1b[33m`) */
- yellow?: string;
- /** ANSI blue (eg. `\x1b[34m`) */
- blue?: string;
- /** ANSI magenta (eg. `\x1b[35m`) */
- magenta?: string;
- /** ANSI cyan (eg. `\x1b[36m`) */
- cyan?: string;
- /** ANSI white (eg. `\x1b[37m`) */
- white?: string;
- /** ANSI bright black (eg. `\x1b[1;30m`) */
- brightBlack?: string;
- /** ANSI bright red (eg. `\x1b[1;31m`) */
- brightRed?: string;
- /** ANSI bright green (eg. `\x1b[1;32m`) */
- brightGreen?: string;
- /** ANSI bright yellow (eg. `\x1b[1;33m`) */
- brightYellow?: string;
- /** ANSI bright blue (eg. `\x1b[1;34m`) */
- brightBlue?: string;
- /** ANSI bright magenta (eg. `\x1b[1;35m`) */
- brightMagenta?: string;
- /** ANSI bright cyan (eg. `\x1b[1;36m`) */
- brightCyan?: string;
- /** ANSI bright white (eg. `\x1b[1;37m`) */
- brightWhite?: string;
- }
-
- /**
- * An object containing options for a link matcher.
- */
- export interface ILinkMatcherOptions {
- /**
- * The index of the link from the regex.match(text) call. This defaults to 0
- * (for regular expressions without capture groups).
- */
- matchIndex?: number;
-
- /**
- * A callback that validates whether to create an individual link, pass
- * whether the link is valid to the callback.
- */
- validationCallback?: (uri: string, callback: (isValid: boolean) => void) => void;
-
- /**
- * A callback that fires when the mouse hovers over a link for a period of
- * time (defined by {@link ITerminalOptions.linkTooltipHoverDuration}).
- */
- tooltipCallback?: (event: MouseEvent, uri: string, location: IViewportRange) => boolean | void;
-
- /**
- * A callback that fires when the mouse leaves a link. Note that this can
- * happen even when tooltipCallback hasn't fired for the link yet.
- */
- leaveCallback?: () => void;
-
- /**
- * The priority of the link matcher, this defines the order in which the
- * link matcher is evaluated relative to others, from highest to lowest. The
- * default value is 0.
- */
- priority?: number;
-
- /**
- * A callback that fires when the mousedown and click events occur that
- * determines whether a link will be activated upon click. This enables
- * only activating a link when a certain modifier is held down, if not the
- * mouse event will continue propagation (eg. double click to select word).
- */
- willLinkActivate?: (event: MouseEvent, uri: string) => boolean;
- }
-
- /**
- * An object that can be disposed via a dispose function.
- */
- export interface IDisposable {
- dispose(): void;
- }
-
- /**
- * An event that can be listened to.
- * @returns an `IDisposable` to stop listening.
- */
- export interface IEvent<T, U = void> {
- (listener: (arg1: T, arg2: U) => any): IDisposable;
- }
-
- /**
- * Represents a specific line in the terminal that is tracked when scrollback
- * is trimmed and lines are added or removed. This is a single line that may
- * be part of a larger wrapped line.
- */
- export interface IMarker extends IDisposableWithEvent {
- /**
- * A unique identifier for this marker.
- */
- readonly id: number;
-
- /**
- * The actual line index in the buffer at this point in time. This is set to
- * -1 if the marker has been disposed.
- */
- readonly line: number;
- }
-
- /**
- * Represents a disposable with an
- * @param onDispose event listener and
- * @param isDisposed property.
- */
- export interface IDisposableWithEvent extends IDisposable {
- /**
- * Event listener to get notified when this gets disposed.
- */
- onDispose: IEvent<void>;
-
- /**
- * Whether this is disposed.
- */
- readonly isDisposed: boolean;
- }
-
- /**
- * Represents a decoration in the terminal that is associated with a particular marker and DOM element.
- */
- export interface IDecoration extends IDisposableWithEvent {
- /*
- * The marker for the decoration in the terminal.
- */
- readonly marker: IMarker;
-
- /**
- * An event fired when the decoration
- * is rendered, returns the dom element
- * associated with the decoration.
- */
- readonly onRender: IEvent<HTMLElement>;
-
- /**
- * The HTMLElement that gets created after the
- * first _onRender call, or undefined if accessed before
- * that.
- */
- readonly element: HTMLElement | undefined;
- }
-
- /**
- * Options provided when registering a decoration
- * containing a @param marker, @param anchor,
- * @param x offset from the anchor, @param width in cells
- * and @param height in cells.
- */
- export interface IDecorationOptions {
- /**
- * The line in the terminal where
- * the decoration will be displayed
- */
- marker: IMarker;
-
- /*
- * Where the decoration will be anchored -
- * defaults to the left edge
- */
- anchor?: 'right' | 'left';
-
- /**
- * The x position offset relative to the anchor
- */
- x?: number;
-
-
- /**
- * The width of the decoration in cells, which defaults to
- * cell width
- */
- width?: number;
-
- /**
- * The height of the decoration in cells, which defaults to
- * cell height
- */
- height?: number;
- }
-
- /**
- * The set of localizable strings.
- */
- export interface ILocalizableStrings {
- /**
- * The aria label for the underlying input textarea for the terminal.
- */
- promptLabel: string;
-
- /**
- * Announcement for when line reading is suppressed due to too many lines
- * being printed to the terminal when `screenReaderMode` is enabled.
- */
- tooMuchOutput: string;
- }
-
- /**
- * Enable various window manipulation and report features (CSI Ps ; Ps ; Ps t).
- *
- * Most settings have no default implementation, as they heavily rely on
- * the embedding environment.
- *
- * To implement a feature, create a custom CSI hook like this:
- * ```ts
- * term.parser.addCsiHandler({final: 't'}, params => {
- * const ps = params[0];
- * switch (ps) {
- * case XY:
- * ... // your implementation for option XY
- * return true; // signal Ps=XY was handled
- * }
- * return false; // any Ps that was not handled
- * });
- * ```
- *
- * Note on security:
- * Most features are meant to deal with some information of the host machine
- * where the terminal runs on. This is seen as a security risk possibly leaking
- * sensitive data of the host to the program in the terminal. Therefore all options
- * (even those without a default implementation) are guarded by the boolean flag
- * and disabled by default.
- */
- export interface IWindowOptions {
- /**
- * Ps=1 De-iconify window.
- * No default implementation.
- */
- restoreWin?: boolean;
- /**
- * Ps=2 Iconify window.
- * No default implementation.
- */
- minimizeWin?: boolean;
- /**
- * Ps=3 ; x ; y
- * Move window to [x, y].
- * No default implementation.
- */
- setWinPosition?: boolean;
- /**
- * Ps = 4 ; height ; width
- * Resize the window to given `height` and `width` in pixels.
- * Omitted parameters should reuse the current height or width.
- * Zero parameters should use the display's height or width.
- * No default implementation.
- */
- setWinSizePixels?: boolean;
- /**
- * Ps=5 Raise the window to the front of the stacking order.
- * No default implementation.
- */
- raiseWin?: boolean;
- /**
- * Ps=6 Lower the xterm window to the bottom of the stacking order.
- * No default implementation.
- */
- lowerWin?: boolean;
- /** Ps=7 Refresh the window. */
- refreshWin?: boolean;
- /**
- * Ps = 8 ; height ; width
- * Resize the text area to given height and width in characters.
- * Omitted parameters should reuse the current height or width.
- * Zero parameters use the display's height or width.
- * No default implementation.
- */
- setWinSizeChars?: boolean;
- /**
- * Ps=9 ; 0 Restore maximized window.
- * Ps=9 ; 1 Maximize window (i.e., resize to screen size).
- * Ps=9 ; 2 Maximize window vertically.
- * Ps=9 ; 3 Maximize window horizontally.
- * No default implementation.
- */
- maximizeWin?: boolean;
- /**
- * Ps=10 ; 0 Undo full-screen mode.
- * Ps=10 ; 1 Change to full-screen.
- * Ps=10 ; 2 Toggle full-screen.
- * No default implementation.
- */
- fullscreenWin?: boolean;
- /** Ps=11 Report xterm window state.
- * If the xterm window is non-iconified, it returns "CSI 1 t".
- * If the xterm window is iconified, it returns "CSI 2 t".
- * No default implementation.
- */
- getWinState?: boolean;
- /**
- * Ps=13 Report xterm window position. Result is "CSI 3 ; x ; y t".
- * Ps=13 ; 2 Report xterm text-area position. Result is "CSI 3 ; x ; y t".
- * No default implementation.
- */
- getWinPosition?: boolean;
- /**
- * Ps=14 Report xterm text area size in pixels. Result is "CSI 4 ; height ; width t".
- * Ps=14 ; 2 Report xterm window size in pixels. Result is "CSI 4 ; height ; width t".
- * Has a default implementation.
- */
- getWinSizePixels?: boolean;
- /**
- * Ps=15 Report size of the screen in pixels. Result is "CSI 5 ; height ; width t".
- * No default implementation.
- */
- getScreenSizePixels?: boolean;
- /**
- * Ps=16 Report xterm character cell size in pixels. Result is "CSI 6 ; height ; width t".
- * Has a default implementation.
- */
- getCellSizePixels?: boolean;
- /**
- * Ps=18 Report the size of the text area in characters. Result is "CSI 8 ; height ; width t".
- * Has a default implementation.
- */
- getWinSizeChars?: boolean;
- /**
- * Ps=19 Report the size of the screen in characters. Result is "CSI 9 ; height ; width t".
- * No default implementation.
- */
- getScreenSizeChars?: boolean;
- /**
- * Ps=20 Report xterm window's icon label. Result is "OSC L label ST".
- * No default implementation.
- */
- getIconTitle?: boolean;
- /**
- * Ps=21 Report xterm window's title. Result is "OSC l label ST".
- * No default implementation.
- */
- getWinTitle?: boolean;
- /**
- * Ps=22 ; 0 Save xterm icon and window title on stack.
- * Ps=22 ; 1 Save xterm icon title on stack.
- * Ps=22 ; 2 Save xterm window title on stack.
- * All variants have a default implementation.
- */
- pushTitle?: boolean;
- /**
- * Ps=23 ; 0 Restore xterm icon and window title from stack.
- * Ps=23 ; 1 Restore xterm icon title from stack.
- * Ps=23 ; 2 Restore xterm window title from stack.
- * All variants have a default implementation.
- */
- popTitle?: boolean;
- /**
- * Ps>=24 Resize to Ps lines (DECSLPP).
- * DECSLPP is not implemented. This settings is also used to
- * enable / disable DECCOLM (earlier variant of DECSLPP).
- */
- setWinLines?: boolean;
- }
-
- /**
- * The class that represents an xterm.js terminal.
- */
- export class Terminal implements IDisposable {
- /**
- * The element containing the terminal.
- */
- readonly element: HTMLElement | undefined;
-
- /**
- * The textarea that accepts input for the terminal.
- */
- readonly textarea: HTMLTextAreaElement | undefined;
-
- /**
- * The number of rows in the terminal's viewport. Use
- * `ITerminalOptions.rows` to set this in the constructor and
- * `Terminal.resize` for when the terminal exists.
- */
- readonly rows: number;
-
- /**
- * The number of columns in the terminal's viewport. Use
- * `ITerminalOptions.cols` to set this in the constructor and
- * `Terminal.resize` for when the terminal exists.
- */
- readonly cols: number;
-
- /**
- * (EXPERIMENTAL) The terminal's current buffer, this might be either the
- * normal buffer or the alt buffer depending on what's running in the
- * terminal.
- */
- readonly buffer: IBufferNamespace;
-
- /**
- * (EXPERIMENTAL) Get all markers registered against the buffer. If the alt
- * buffer is active this will always return [].
- */
- readonly markers: ReadonlyArray<IMarker>;
-
- /**
- * (EXPERIMENTAL) Get the parser interface to register
- * custom escape sequence handlers.
- */
- readonly parser: IParser;
-
- /**
- * (EXPERIMENTAL) Get the Unicode handling interface
- * to register and switch Unicode version.
- */
- readonly unicode: IUnicodeHandling;
-
- /**
- * Gets the terminal modes as set by SM/DECSET.
- */
- readonly modes: IModes;
-
- /**
- * Gets or sets the terminal options. This supports setting multiple options.
- *
- * @example Get a single option
- * ```typescript
- * console.log(terminal.options.fontSize);
- * ```
- *
- * @example Set a single option
- * ```typescript
- * terminal.options.fontSize = 12;
- * ```
- *
- * @example Set multiple options
- * ```typescript
- * terminal.options = {
- * fontSize: 12,
- * fontFamily: 'Arial',
- * };
- * ```
- */
- options: ITerminalOptions;
-
- /**
- * Natural language strings that can be localized.
- */
- static strings: ILocalizableStrings;
-
- /**
- * Creates a new `Terminal` object.
- *
- * @param options An object containing a set of options.
- */
- constructor(options?: ITerminalOptions);
-
- /**
- * Adds an event listener for when the bell is triggered.
- * @returns an `IDisposable` to stop listening.
- */
- onBell: IEvent<void>;
-
- /**
- * Adds an event listener for when a binary event fires. This is used to
- * enable non UTF-8 conformant binary messages to be sent to the backend.
- * Currently this is only used for a certain type of mouse reports that
- * happen to be not UTF-8 compatible.
- * The event value is a JS string, pass it to the underlying pty as
- * binary data, e.g. `pty.write(Buffer.from(data, 'binary'))`.
- * @returns an `IDisposable` to stop listening.
- */
- onBinary: IEvent<string>;
-
- /**
- * Adds an event listener for the cursor moves.
- * @returns an `IDisposable` to stop listening.
- */
- onCursorMove: IEvent<void>;
-
- /**
- * Adds an event listener for when a data event fires. This happens for
- * example when the user types or pastes into the terminal. The event value
- * is whatever `string` results, in a typical setup, this should be passed
- * on to the backing pty.
- * @returns an `IDisposable` to stop listening.
- */
- onData: IEvent<string>;
-
- /**
- * Adds an event listener for when a key is pressed. The event value contains the
- * string that will be sent in the data event as well as the DOM event that
- * triggered it.
- * @returns an `IDisposable` to stop listening.
- */
- onKey: IEvent<{ key: string, domEvent: KeyboardEvent }>;
-
- /**
- * Adds an event listener for when a line feed is added.
- * @returns an `IDisposable` to stop listening.
- */
- onLineFeed: IEvent<void>;
-
- /**
- * Adds an event listener for when rows are rendered. The event value
- * contains the start row and end rows of the rendered area (ranges from `0`
- * to `Terminal.rows - 1`).
- * @returns an `IDisposable` to stop listening.
- */
- onRender: IEvent<{ start: number, end: number }>;
-
- /**
- * Adds an event listener for when the terminal is resized. The event value
- * contains the new size.
- * @returns an `IDisposable` to stop listening.
- */
- onResize: IEvent<{ cols: number, rows: number }>;
-
- /**
- * Adds an event listener for when a scroll occurs. The event value is the
- * new position of the viewport.
- * @returns an `IDisposable` to stop listening.
- */
- onScroll: IEvent<number>;
-
- /**
- * Adds an event listener for when a selection change occurs.
- * @returns an `IDisposable` to stop listening.
- */
- onSelectionChange: IEvent<void>;
-
- /**
- * Adds an event listener for when an OSC 0 or OSC 2 title change occurs.
- * The event value is the new title.
- * @returns an `IDisposable` to stop listening.
- */
- onTitleChange: IEvent<string>;
-
- /**
- * Unfocus the terminal.
- */
- blur(): void;
-
- /**
- * Focus the terminal.
- */
- focus(): void;
-
- /**
- * Resizes the terminal. It's best practice to debounce calls to resize,
- * this will help ensure that the pty can respond to the resize event
- * before another one occurs.
- * @param x The number of columns to resize to.
- * @param y The number of rows to resize to.
- */
- resize(columns: number, rows: number): void;
-
- /**
- * Opens the terminal within an element.
- * @param parent The element to create the terminal within. This element
- * must be visible (have dimensions) when `open` is called as several DOM-
- * based measurements need to be performed when this function is called.
- */
- open(parent: HTMLElement): void;
-
- /**
- * Attaches a custom key event handler which is run before keys are
- * processed, giving consumers of xterm.js ultimate control as to what keys
- * should be processed by the terminal and what keys should not.
- * @param customKeyEventHandler The custom KeyboardEvent handler to attach.
- * This is a function that takes a KeyboardEvent, allowing consumers to stop
- * propagation and/or prevent the default action. The function returns
- * whether the event should be processed by xterm.js.
- */
- attachCustomKeyEventHandler(customKeyEventHandler: (event: KeyboardEvent) => boolean): void;
-
- /**
- * (EXPERIMENTAL) Registers a link matcher, allowing custom link patterns to
- * be matched and handled.
- * @deprecated The link matcher API is now deprecated in favor of the link
- * provider API, see `registerLinkProvider`.
- * @param regex The regular expression to search for, specifically this
- * searches the textContent of the rows. You will want to use \s to match a
- * space ' ' character for example.
- * @param handler The callback when the link is called.
- * @param options Options for the link matcher.
- * @return The ID of the new matcher, this can be used to deregister.
- */
- registerLinkMatcher(regex: RegExp, handler: (event: MouseEvent, uri: string) => void, options?: ILinkMatcherOptions): number;
-
- /**
- * (EXPERIMENTAL) Deregisters a link matcher if it has been registered.
- * @deprecated The link matcher API is now deprecated in favor of the link
- * provider API, see `registerLinkProvider`.
- * @param matcherId The link matcher's ID (returned after register)
- */
- deregisterLinkMatcher(matcherId: number): void;
-
- /**
- * Registers a link provider, allowing a custom parser to be used to match
- * and handle links. Multiple link providers can be used, they will be asked
- * in the order in which they are registered.
- * @param linkProvider The link provider to use to detect links.
- */
- registerLinkProvider(linkProvider: ILinkProvider): IDisposable;
-
- /**
- * (EXPERIMENTAL) Registers a character joiner, allowing custom sequences of
- * characters to be rendered as a single unit. This is useful in particular
- * for rendering ligatures and graphemes, among other things.
- *
- * Each registered character joiner is called with a string of text
- * representing a portion of a line in the terminal that can be rendered as
- * a single unit. The joiner must return a sorted array, where each entry is
- * itself an array of length two, containing the start (inclusive) and end
- * (exclusive) index of a substring of the input that should be rendered as
- * a single unit. When multiple joiners are provided, the results of each
- * are collected. If there are any overlapping substrings between them, they
- * are combined into one larger unit that is drawn together.
- *
- * All character joiners that are registered get called every time a line is
- * rendered in the terminal, so it is essential for the handler function to
- * run as quickly as possible to avoid slowdowns when rendering. Similarly,
- * joiners should strive to return the smallest possible substrings to
- * render together, since they aren't drawn as optimally as individual
- * characters.
- *
- * NOTE: character joiners are only used by the canvas renderer.
- *
- * @param handler The function that determines character joins. It is called
- * with a string of text that is eligible for joining and returns an array
- * where each entry is an array containing the start (inclusive) and end
- * (exclusive) indexes of ranges that should be rendered as a single unit.
- * @return The ID of the new joiner, this can be used to deregister
- */
- registerCharacterJoiner(handler: (text: string) => [number, number][]): number;
-
- /**
- * (EXPERIMENTAL) Deregisters the character joiner if one was registered.
- * NOTE: character joiners are only used by the canvas renderer.
- * @param joinerId The character joiner's ID (returned after register)
- */
- deregisterCharacterJoiner(joinerId: number): void;
-
- /**
- * (EXPERIMENTAL) Adds a marker to the normal buffer and returns it. If the
- * alt buffer is active, undefined is returned.
- * @param cursorYOffset The y position offset of the marker from the cursor.
- * @returns The new marker or undefined.
- */
- registerMarker(cursorYOffset?: number): IMarker | undefined;
-
- /**
- * @deprecated use `registerMarker` instead.
- */
- addMarker(cursorYOffset: number): IMarker | undefined;
-
- /**
- * (EXPERIMENTAL) Adds a decoration to the terminal using
- * @param decorationOptions, which takes a marker and an optional anchor,
- * width, height, and x offset from the anchor. Returns the decoration or
- * undefined if the alt buffer is active or the marker has already been disposed of.
- * @throws when options include a negative x offset.
- */
- registerDecoration(decorationOptions: IDecorationOptions): IDecoration | undefined;
-
- /**
- * Gets whether the terminal has an active selection.
- */
- hasSelection(): boolean;
-
- /**
- * Gets the terminal's current selection, this is useful for implementing
- * copy behavior outside of xterm.js.
- */
- getSelection(): string;
-
- /**
- * Gets the selection position or undefined if there is no selection.
- */
- getSelectionPosition(): ISelectionPosition | undefined;
-
- /**
- * Clears the current terminal selection.
- */
- clearSelection(): void;
-
- /**
- * Selects text within the terminal.
- * @param column The column the selection starts at.
- * @param row The row the selection starts at.
- * @param length The length of the selection.
- */
- select(column: number, row: number, length: number): void;
-
- /**
- * Selects all text within the terminal.
- */
- selectAll(): void;
-
- /**
- * Selects text in the buffer between 2 lines.
- * @param start The 0-based line index to select from (inclusive).
- * @param end The 0-based line index to select to (inclusive).
- */
- selectLines(start: number, end: number): void;
-
- /*
- * Disposes of the terminal, detaching it from the DOM and removing any
- * active listeners.
- */
- dispose(): void;
-
- /**
- * Scroll the display of the terminal
- * @param amount The number of lines to scroll down (negative scroll up).
- */
- scrollLines(amount: number): void;
-
- /**
- * Scroll the display of the terminal by a number of pages.
- * @param pageCount The number of pages to scroll (negative scrolls up).
- */
- scrollPages(pageCount: number): void;
-
- /**
- * Scrolls the display of the terminal to the top.
- */
- scrollToTop(): void;
-
- /**
- * Scrolls the display of the terminal to the bottom.
- */
- scrollToBottom(): void;
-
- /**
- * Scrolls to a line within the buffer.
- * @param line The 0-based line index to scroll to.
- */
- scrollToLine(line: number): void;
-
- /**
- * Clear the entire buffer, making the prompt line the new first line.
- */
- clear(): void;
-
- /**
- * Write data to the terminal.
- * @param data The data to write to the terminal. This can either be raw
- * bytes given as Uint8Array from the pty or a string. Raw bytes will always
- * be treated as UTF-8 encoded, string data as UTF-16.
- * @param callback Optional callback that fires when the data was processed
- * by the parser.
- */
- write(data: string | Uint8Array, callback?: () => void): void;
-
- /**
- * Writes data to the terminal, followed by a break line character (\n).
- * @param data The data to write to the terminal. This can either be raw
- * bytes given as Uint8Array from the pty or a string. Raw bytes will always
- * be treated as UTF-8 encoded, string data as UTF-16.
- * @param callback Optional callback that fires when the data was processed
- * by the parser.
- */
- writeln(data: string | Uint8Array, callback?: () => void): void;
-
- /**
- * Write UTF8 data to the terminal.
- * @param data The data to write to the terminal.
- * @param callback Optional callback when data was processed.
- * @deprecated use `write` instead
- */
- writeUtf8(data: Uint8Array, callback?: () => void): void;
-
- /**
- * Writes text to the terminal, performing the necessary transformations for pasted text.
- * @param data The text to write to the terminal.
- */
- paste(data: string): void;
-
- /**
- * Retrieves an option's value from the terminal.
- * @param key The option key.
- * @deprecated Use `options` instead.
- */
- getOption(key: 'bellSound' | 'bellStyle' | 'cursorStyle' | 'fontFamily' | 'logLevel' | 'rendererType' | 'termName' | 'wordSeparator'): string;
- /**
- * Retrieves an option's value from the terminal.
- * @param key The option key.
- * @deprecated Use `options` instead.
- */
- getOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'rightClickSelectsWord' | 'popOnBell' | 'visualBell' | 'windowsMode'): boolean;
- /**
- * Retrieves an option's value from the terminal.
- * @param key The option key.
- * @deprecated Use `options` instead.
- */
- getOption(key: 'cols' | 'fontSize' | 'letterSpacing' | 'lineHeight' | 'rows' | 'tabStopWidth' | 'scrollback'): number;
- /**
- * Retrieves an option's value from the terminal.
- * @param key The option key.
- * @deprecated Use `options` instead.
- */
- getOption(key: 'fontWeight' | 'fontWeightBold'): FontWeight;
- /**
- * Retrieves an option's value from the terminal.
- * @param key The option key.
- * @deprecated Use `options` instead.
- */
- getOption(key: string): any;
-
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'fontFamily' | 'termName' | 'bellSound' | 'wordSeparator', value: string): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'fontWeight' | 'fontWeightBold', value: null | 'normal' | 'bold' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | number): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'logLevel', value: LogLevel): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'bellStyle', value: null | 'none' | 'visual' | 'sound' | 'both'): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'cursorStyle', value: null | 'block' | 'underline' | 'bar'): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'allowTransparency' | 'cancelEvents' | 'convertEol' | 'cursorBlink' | 'disableStdin' | 'macOptionIsMeta' | 'popOnBell' | 'rightClickSelectsWord' | 'visualBell' | 'windowsMode', value: boolean): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'fontSize' | 'letterSpacing' | 'lineHeight' | 'tabStopWidth' | 'scrollback', value: number): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'theme', value: ITheme): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: 'cols' | 'rows', value: number): void;
- /**
- * Sets an option on the terminal.
- * @param key The option key.
- * @param value The option value.
- * @deprecated Use `options` instead.
- */
- setOption(key: string, value: any): void;
-
- /**
- * Tells the renderer to refresh terminal content between two rows
- * (inclusive) at the next opportunity.
- * @param start The row to start from (between 0 and this.rows - 1).
- * @param end The row to end at (between start and this.rows - 1).
- */
- refresh(start: number, end: number): void;
-
- /**
- * Clears the texture atlas of the canvas renderer if it's active. Doing this will force a
- * redraw of all glyphs which can workaround issues causing the texture to become corrupt, for
- * example Chromium/Nvidia has an issue where the texture gets messed up when resuming the OS
- * from sleep.
- */
- clearTextureAtlas(): void;
-
- /**
- * Perform a full reset (RIS, aka '\x1bc').
- */
- reset(): void;
-
- /**
- * Loads an addon into this instance of xterm.js.
- * @param addon The addon to load.
- */
- loadAddon(addon: ITerminalAddon): void;
- }
-
- /**
- * An addon that can provide additional functionality to the terminal.
- */
- export interface ITerminalAddon extends IDisposable {
- /**
- * This is called when the addon is activated.
- */
- activate(terminal: Terminal): void;
- }
-
- /**
- * An object representing a selection within the terminal.
- */
- interface ISelectionPosition {
- /**
- * The start column of the selection.
- */
- startColumn: number;
-
- /**
- * The start row of the selection.
- */
- startRow: number;
-
- /**
- * The end column of the selection.
- */
- endColumn: number;
-
- /**
- * The end row of the selection.
- */
- endRow: number;
- }
-
- /**
- * An object representing a range within the viewport of the terminal.
- */
- export interface IViewportRange {
- /**
- * The start of the range.
- */
- start: IViewportRangePosition;
-
- /**
- * The end of the range.
- */
- end: IViewportRangePosition;
- }
-
- /**
- * An object representing a cell position within the viewport of the terminal.
- */
- interface IViewportRangePosition {
- /**
- * The x position of the cell. This is a 0-based index that refers to the
- * space in between columns, not the column itself. Index 0 refers to the
- * left side of the viewport, index `Terminal.cols` refers to the right side
- * of the viewport. This can be thought of as how a cursor is positioned in
- * a text editor.
- */
- x: number;
-
- /**
- * The y position of the cell. This is a 0-based index that refers to a
- * specific row.
- */
- y: number;
- }
-
- /**
- * A custom link provider.
- */
- interface ILinkProvider {
- /**
- * Provides a link a buffer position
- * @param bufferLineNumber The y position of the buffer to check for links
- * within.
- * @param callback The callback to be fired when ready with the resulting
- * link(s) for the line or `undefined`.
- */
- provideLinks(bufferLineNumber: number, callback: (links: ILink[] | undefined) => void): void;
- }
-
- /**
- * A link within the terminal.
- */
- interface ILink {
- /**
- * The buffer range of the link.
- */
- range: IBufferRange;
-
- /**
- * The text of the link.
- */
- text: string;
-
- /**
- * What link decorations to show when hovering the link, this property is tracked and changes
- * made after the link is provided will trigger changes. If not set, all decroations will be
- * enabled.
- */
- decorations?: ILinkDecorations;
-
- /**
- * Calls when the link is activated.
- * @param event The mouse event triggering the callback.
- * @param text The text of the link.
- */
- activate(event: MouseEvent, text: string): void;
-
- /**
- * Called when the mouse hovers the link. To use this to create a DOM-based hover tooltip,
- * create the hover element within `Terminal.element` and add the `xterm-hover` class to it,
- * that will cause mouse events to not fall through and activate other links.
- * @param event The mouse event triggering the callback.
- * @param text The text of the link.
- */
- hover?(event: MouseEvent, text: string): void;
-
- /**
- * Called when the mouse leaves the link.
- * @param event The mouse event triggering the callback.
- * @param text The text of the link.
- */
- leave?(event: MouseEvent, text: string): void;
-
- /**
- * Called when the link is released and no longer used by xterm.js.
- */
- dispose?(): void;
- }
-
- /**
- * A set of decorations that can be applied to links.
- */
- interface ILinkDecorations {
- /**
- * Whether the cursor is set to pointer.
- */
- pointerCursor: boolean;
-
- /**
- * Whether the underline is visible
- */
- underline: boolean;
- }
-
- /**
- * A range within a buffer.
- */
- interface IBufferRange {
- /**
- * The start position of the range.
- */
- start: IBufferCellPosition;
-
- /**
- * The end position of the range.
- */
- end: IBufferCellPosition;
- }
-
- /**
- * A position within a buffer.
- */
- interface IBufferCellPosition {
- /**
- * The x position within the buffer (1-based).
- */
- x: number;
-
- /**
- * The y position within the buffer (1-based).
- */
- y: number;
- }
-
- /**
- * Represents a terminal buffer.
- */
- interface IBuffer {
- /**
- * The type of the buffer.
- */
- readonly type: 'normal' | 'alternate';
-
- /**
- * The y position of the cursor. This ranges between `0` (when the
- * cursor is at baseY) and `Terminal.rows - 1` (when the cursor is on the
- * last row).
- */
- readonly cursorY: number;
-
- /**
- * The x position of the cursor. This ranges between `0` (left side) and
- * `Terminal.cols` (after last cell of the row).
- */
- readonly cursorX: number;
-
- /**
- * The line within the buffer where the top of the viewport is.
- */
- readonly viewportY: number;
-
- /**
- * The line within the buffer where the top of the bottom page is (when
- * fully scrolled down).
- */
- readonly baseY: number;
-
- /**
- * The amount of lines in the buffer.
- */
- readonly length: number;
-
- /**
- * Gets a line from the buffer, or undefined if the line index does not
- * exist.
- *
- * Note that the result of this function should be used immediately after
- * calling as when the terminal updates it could lead to unexpected
- * behavior.
- *
- * @param y The line index to get.
- */
- getLine(y: number): IBufferLine | undefined;
-
- /**
- * Creates an empty cell object suitable as a cell reference in
- * `line.getCell(x, cell)`. Use this to avoid costly recreation of
- * cell objects when dealing with tons of cells.
- */
- getNullCell(): IBufferCell;
- }
-
- /**
- * Represents the terminal's set of buffers.
- */
- interface IBufferNamespace {
- /**
- * The active buffer, this will either be the normal or alternate buffers.
- */
- readonly active: IBuffer;
-
- /**
- * The normal buffer.
- */
- readonly normal: IBuffer;
-
- /**
- * The alternate buffer, this becomes the active buffer when an application
- * enters this mode via DECSET (`CSI ? 4 7 h`)
- */
- readonly alternate: IBuffer;
-
- /**
- * Adds an event listener for when the active buffer changes.
- * @returns an `IDisposable` to stop listening.
- */
- onBufferChange: IEvent<IBuffer>;
- }
-
- /**
- * Represents a line in the terminal's buffer.
- */
- interface IBufferLine {
- /**
- * Whether the line is wrapped from the previous line.
- */
- readonly isWrapped: boolean;
-
- /**
- * The length of the line, all call to getCell beyond the length will result
- * in `undefined`. Note that this may exceed columns as the line array may
- * not be trimmed after a resize, compare against {@link Terminal.cols} to
- * get the actual maximum length of a line.
- */
- readonly length: number;
-
- /**
- * Gets a cell from the line, or undefined if the line index does not exist.
- *
- * Note that the result of this function should be used immediately after
- * calling as when the terminal updates it could lead to unexpected
- * behavior.
- *
- * @param x The character index to get.
- * @param cell Optional cell object to load data into for performance
- * reasons. This is mainly useful when every cell in the buffer is being
- * looped over to avoid creating new objects for every cell.
- */
- getCell(x: number, cell?: IBufferCell): IBufferCell | undefined;
-
- /**
- * Gets the line as a string. Note that this is gets only the string for the
- * line, not taking isWrapped into account.
- *
- * @param trimRight Whether to trim any whitespace at the right of the line.
- * @param startColumn The column to start from (inclusive).
- * @param endColumn The column to end at (exclusive).
- */
- translateToString(trimRight?: boolean, startColumn?: number, endColumn?: number): string;
- }
-
- /**
- * Represents a single cell in the terminal's buffer.
- */
- interface IBufferCell {
- /**
- * The width of the character. Some examples:
- *
- * - `1` for most cells.
- * - `2` for wide character like CJK glyphs.
- * - `0` for cells immediately following cells with a width of `2`.
- */
- getWidth(): number;
-
- /**
- * The character(s) within the cell. Examples of what this can contain:
- *
- * - A normal width character
- * - A wide character (eg. CJK)
- * - An emoji
- */
- getChars(): string;
-
- /**
- * Gets the UTF32 codepoint of single characters, if content is a combined
- * string it returns the codepoint of the last character in the string.
- */
- getCode(): number;
-
- /**
- * Gets the number representation of the foreground color mode, this can be
- * used to perform quick comparisons of 2 cells to see if they're the same.
- * Use `isFgRGB`, `isFgPalette` and `isFgDefault` to check what color mode
- * a cell is.
- */
- getFgColorMode(): number;
-
- /**
- * Gets the number representation of the background color mode, this can be
- * used to perform quick comparisons of 2 cells to see if they're the same.
- * Use `isBgRGB`, `isBgPalette` and `isBgDefault` to check what color mode
- * a cell is.
- */
- getBgColorMode(): number;
-
- /**
- * Gets a cell's foreground color number, this differs depending on what the
- * color mode of the cell is:
- *
- * - Default: This should be 0, representing the default foreground color
- * (CSI 39 m).
- * - Palette: This is a number from 0 to 255 of ANSI colors (CSI 3(0-7) m,
- * CSI 9(0-7) m, CSI 38 ; 5 ; 0-255 m).
- * - RGB: A hex value representing a 'true color': 0xRRGGBB.
- * (CSI 3 8 ; 2 ; Pi ; Pr ; Pg ; Pb)
- */
- getFgColor(): number;
-
- /**
- * Gets a cell's background color number, this differs depending on what the
- * color mode of the cell is:
- *
- * - Default: This should be 0, representing the default background color
- * (CSI 49 m).
- * - Palette: This is a number from 0 to 255 of ANSI colors
- * (CSI 4(0-7) m, CSI 10(0-7) m, CSI 48 ; 5 ; 0-255 m).
- * - RGB: A hex value representing a 'true color': 0xRRGGBB
- * (CSI 4 8 ; 2 ; Pi ; Pr ; Pg ; Pb)
- */
- getBgColor(): number;
-
- /** Whether the cell has the bold attribute (CSI 1 m). */
- isBold(): number;
- /** Whether the cell has the italic attribute (CSI 3 m). */
- isItalic(): number;
- /** Whether the cell has the dim attribute (CSI 2 m). */
- isDim(): number;
- /** Whether the cell has the underline attribute (CSI 4 m). */
- isUnderline(): number;
- /** Whether the cell has the blink attribute (CSI 5 m). */
- isBlink(): number;
- /** Whether the cell has the inverse attribute (CSI 7 m). */
- isInverse(): number;
- /** Whether the cell has the invisible attribute (CSI 8 m). */
- isInvisible(): number;
- /** Whether the cell has the strikethrough attribute (CSI 9 m). */
- isStrikethrough(): number;
-
- /** Whether the cell is using the RGB foreground color mode. */
- isFgRGB(): boolean;
- /** Whether the cell is using the RGB background color mode. */
- isBgRGB(): boolean;
- /** Whether the cell is using the palette foreground color mode. */
- isFgPalette(): boolean;
- /** Whether the cell is using the palette background color mode. */
- isBgPalette(): boolean;
- /** Whether the cell is using the default foreground color mode. */
- isFgDefault(): boolean;
- /** Whether the cell is using the default background color mode. */
- isBgDefault(): boolean;
-
- /** Whether the cell has the default attribute (no color or style). */
- isAttributeDefault(): boolean;
- }
-
- /**
- * Data type to register a CSI, DCS or ESC callback in the parser
- * in the form:
- * ESC I..I F
- * CSI Prefix P..P I..I F
- * DCS Prefix P..P I..I F data_bytes ST
- *
- * with these rules/restrictions:
- * - prefix can only be used with CSI and DCS
- * - only one leading prefix byte is recognized by the parser
- * before any other parameter bytes (P..P)
- * - intermediate bytes are recognized up to 2
- *
- * For custom sequences make sure to read ECMA-48 and the resources at
- * vt100.net to not clash with existing sequences or reserved address space.
- * General recommendations:
- * - use private address space (see ECMA-48)
- * - use max one intermediate byte (technically not limited by the spec,
- * in practice there are no sequences with more than one intermediate byte,
- * thus parsers might get confused with more intermediates)
- * - test against other common emulators to check whether they escape/ignore
- * the sequence correctly
- *
- * Notes: OSC command registration is handled differently (see addOscHandler)
- * APC, PM or SOS is currently not supported.
- */
- export interface IFunctionIdentifier {
- /**
- * Optional prefix byte, must be in range \x3c .. \x3f.
- * Usable in CSI and DCS.
- */
- prefix?: string;
- /**
- * Optional intermediate bytes, must be in range \x20 .. \x2f.
- * Usable in CSI, DCS and ESC.
- */
- intermediates?: string;
- /**
- * Final byte, must be in range \x40 .. \x7e for CSI and DCS,
- * \x30 .. \x7e for ESC.
- */
- final: string;
- }
-
- /**
- * Allows hooking into the parser for custom handling of escape sequences.
- *
- * Note on sync vs. async handlers:
- * xterm.js implements all parser actions with synchronous handlers.
- * In general custom handlers should also operate in sync mode wherever
- * possible to keep the parser fast.
- * Still the exposed interfaces allow to register async handlers by returning
- * a `Promise<boolean>`. Here the parser will pause input processing until
- * the promise got resolved or rejected (in-band blocking). This "full stop"
- * on the input chain allows to implement backpressure from a certain async
- * action while the terminal state will not progress any further from input.
- * It does not mean that the terminal state will not change at all in between,
- * as user actions like resize or reset are still processed immediately.
- * It is an error to assume a stable terminal state while giving back control
- * in between, e.g. by multiple chained `then` calls.
- * Downside of an async handler is a rather bad throughput performance,
- * thus use async handlers only as a last resort or for actions that have
- * to rely on async interfaces itself.
- */
- export interface IParser {
- /**
- * Adds a handler for CSI escape sequences.
- * @param id Specifies the function identifier under which the callback
- * gets registered, e.g. {final: 'm'} for SGR.
- * @param callback The function to handle the sequence. The callback is
- * called with the numerical params. If the sequence has subparams the
- * array will contain subarrays with their numercial values.
- * Return `true` if the sequence was handled, `false` if the parser should try
- * a previous handler. The most recently added handler is tried first.
- * @return An IDisposable you can call to remove this handler.
- */
- registerCsiHandler(id: IFunctionIdentifier, callback: (params: (number | number[])[]) => boolean | Promise<boolean>): IDisposable;
-
- /**
- * Adds a handler for DCS escape sequences.
- * @param id Specifies the function identifier under which the callback
- * gets registered, e.g. {intermediates: '$' final: 'q'} for DECRQSS.
- * @param callback The function to handle the sequence. Note that the
- * function will only be called once if the sequence finished sucessfully.
- * There is currently no way to intercept smaller data chunks, data chunks
- * will be stored up until the sequence is finished. Since DCS sequences
- * are not limited by the amount of data this might impose a problem for
- * big payloads. Currently xterm.js limits DCS payload to 10 MB
- * which should give enough room for most use cases.
- * The function gets the payload and numerical parameters as arguments.
- * Return `true` if the sequence was handled, `false` if the parser should try
- * a previous handler. The most recently added handler is tried first.
- * @return An IDisposable you can call to remove this handler.
- */
- registerDcsHandler(id: IFunctionIdentifier, callback: (data: string, param: (number | number[])[]) => boolean | Promise<boolean>): IDisposable;
-
- /**
- * Adds a handler for ESC escape sequences.
- * @param id Specifies the function identifier under which the callback
- * gets registered, e.g. {intermediates: '%' final: 'G'} for
- * default charset selection.
- * @param callback The function to handle the sequence.
- * Return `true` if the sequence was handled, `false` if the parser should try
- * a previous handler. The most recently added handler is tried first.
- * @return An IDisposable you can call to remove this handler.
- */
- registerEscHandler(id: IFunctionIdentifier, handler: () => boolean | Promise<boolean>): IDisposable;
-
- /**
- * Adds a handler for OSC escape sequences.
- * @param ident The number (first parameter) of the sequence.
- * @param callback The function to handle the sequence. Note that the
- * function will only be called once if the sequence finished sucessfully.
- * There is currently no way to intercept smaller data chunks, data chunks
- * will be stored up until the sequence is finished. Since OSC sequences
- * are not limited by the amount of data this might impose a problem for
- * big payloads. Currently xterm.js limits OSC payload to 10 MB
- * which should give enough room for most use cases.
- * The callback is called with OSC data string.
- * Return `true` if the sequence was handled, `false` if the parser should try
- * a previous handler. The most recently added handler is tried first.
- * @return An IDisposable you can call to remove this handler.
- */
- registerOscHandler(ident: number, callback: (data: string) => boolean | Promise<boolean>): IDisposable;
- }
-
- /**
- * (EXPERIMENTAL) Unicode version provider.
- * Used to register custom Unicode versions with `Terminal.unicode.register`.
- */
- export interface IUnicodeVersionProvider {
- /**
- * String indicating the Unicode version provided.
- */
- readonly version: string;
-
- /**
- * Unicode version dependent wcwidth implementation.
- */
- wcwidth(codepoint: number): 0 | 1 | 2;
- }
-
- /**
- * (EXPERIMENTAL) Unicode handling interface.
- */
- export interface IUnicodeHandling {
- /**
- * Register a custom Unicode version provider.
- */
- register(provider: IUnicodeVersionProvider): void;
-
- /**
- * Registered Unicode versions.
- */
- readonly versions: ReadonlyArray<string>;
-
- /**
- * Getter/setter for active Unicode version.
- */
- activeVersion: string;
- }
-
- /**
- * Terminal modes as set by SM/DECSET.
- */
- export interface IModes {
- /**
- * Application Cursor Keys (DECCKM): `CSI ? 1 h`
- */
- readonly applicationCursorKeysMode: boolean;
- /**
- * Application Keypad Mode (DECNKM): `CSI ? 6 6 h`
- */
- readonly applicationKeypadMode: boolean;
- /**
- * Bracketed Paste Mode: `CSI ? 2 0 0 4 h`
- */
- readonly bracketedPasteMode: boolean;
- /**
- * Insert Mode (IRM): `CSI 4 h`
- */
- readonly insertMode: boolean;
- /**
- * Mouse Tracking, this can be one of the following:
- * - none: This is the default value and can be reset with DECRST
- * - x10: Send Mouse X & Y on button press `CSI ? 9 h`
- * - vt200: Send Mouse X & Y on button press and release `CSI ? 1 0 0 0 h`
- * - drag: Use Cell Motion Mouse Tracking `CSI ? 1 0 0 2 h`
- * - any: Use All Motion Mouse Tracking `CSI ? 1 0 0 3 h`
- */
- readonly mouseTrackingMode: 'none' | 'x10' | 'vt200' | 'drag' | 'any';
- /**
- * Origin Mode (DECOM): `CSI ? 6 h`
- */
- readonly originMode: boolean;
- /**
- * Reverse-wraparound Mode: `CSI ? 4 5 h`
- */
- readonly reverseWraparoundMode: boolean;
- /**
- * Send FocusIn/FocusOut events: `CSI ? 1 0 0 4 h`
- */
- readonly sendFocusMode: boolean;
- /**
- * Auto-Wrap Mode (DECAWM): `CSI ? 7 h`
- */
- readonly wraparoundMode: boolean
- }
-}