jupyterlab 4.0.0a34__py3-none-any.whl → 4.0.0a36__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jupyterlab/_version.py +1 -1
- jupyterlab/browser_check.py +1 -1
- jupyterlab/commands.py +6 -6
- jupyterlab/extensions/manager.py +2 -2
- jupyterlab/extensions/pypi.py +3 -1
- jupyterlab/galata/@jupyterlab/galata-extension/build_log.json +123 -113
- jupyterlab/galata/@jupyterlab/galata-extension/package.json +14 -14
- jupyterlab/galata/@jupyterlab/galata-extension/static/{remoteEntry.cb0123713c966aac8a3c.js → remoteEntry.bad0ab5ce64f7f5c8312.js} +6 -6
- jupyterlab/galata/__init__.py +0 -1
- jupyterlab/labapp.py +6 -6
- jupyterlab/node-version-check.js +0 -1
- jupyterlab/schemas/@jupyterlab/application-extension/package.json.orig +19 -18
- jupyterlab/schemas/@jupyterlab/apputils-extension/package.json.orig +24 -22
- jupyterlab/schemas/@jupyterlab/apputils-extension/sanitizer.json +6 -0
- jupyterlab/schemas/@jupyterlab/cell-toolbar-extension/package.json.orig +9 -8
- jupyterlab/schemas/@jupyterlab/celltags-extension/package.json.orig +63 -0
- jupyterlab/schemas/@jupyterlab/celltags-extension/plugin.json +33 -0
- jupyterlab/schemas/@jupyterlab/codemirror-extension/package.json.orig +19 -15
- jupyterlab/schemas/@jupyterlab/codemirror-extension/plugin.json +14 -0
- jupyterlab/schemas/@jupyterlab/completer-extension/package.json.orig +10 -9
- jupyterlab/schemas/@jupyterlab/console-extension/package.json.orig +22 -21
- jupyterlab/schemas/@jupyterlab/console-extension/tracker.json +3 -92
- jupyterlab/schemas/@jupyterlab/csvviewer-extension/package.json.orig +16 -15
- jupyterlab/schemas/@jupyterlab/debugger-extension/package.json.orig +21 -19
- jupyterlab/schemas/@jupyterlab/docmanager-extension/package.json.orig +21 -20
- jupyterlab/schemas/@jupyterlab/documentsearch-extension/package.json.orig +10 -9
- jupyterlab/schemas/@jupyterlab/extensionmanager-extension/package.json.orig +11 -10
- jupyterlab/schemas/@jupyterlab/filebrowser-extension/browser.json +13 -2
- jupyterlab/schemas/@jupyterlab/filebrowser-extension/package.json.orig +20 -19
- jupyterlab/schemas/@jupyterlab/filebrowser-extension/widget.json +2 -1
- jupyterlab/schemas/@jupyterlab/fileeditor-extension/package.json.orig +33 -30
- jupyterlab/schemas/@jupyterlab/fileeditor-extension/plugin.json +48 -119
- jupyterlab/schemas/@jupyterlab/help-extension/package.json.orig +16 -15
- jupyterlab/schemas/@jupyterlab/htmlviewer-extension/package.json.orig +12 -11
- jupyterlab/schemas/@jupyterlab/hub-extension/package.json.orig +9 -8
- jupyterlab/schemas/@jupyterlab/imageviewer-extension/package.json.orig +10 -9
- jupyterlab/schemas/@jupyterlab/inspector-extension/package.json.orig +13 -12
- jupyterlab/schemas/@jupyterlab/launcher-extension/package.json.orig +14 -13
- jupyterlab/schemas/@jupyterlab/logconsole-extension/package.json.orig +17 -16
- jupyterlab/schemas/@jupyterlab/lsp-extension/package.json.orig +13 -12
- jupyterlab/schemas/@jupyterlab/mainmenu-extension/package.json.orig +17 -16
- jupyterlab/schemas/@jupyterlab/markdownviewer-extension/package.json.orig +13 -12
- jupyterlab/schemas/@jupyterlab/metadataform-extension/package.json.orig +11 -10
- jupyterlab/schemas/@jupyterlab/notebook-extension/package.json.orig +47 -40
- jupyterlab/schemas/@jupyterlab/notebook-extension/panel.json +1 -1
- jupyterlab/schemas/@jupyterlab/notebook-extension/tools.json +143 -0
- jupyterlab/schemas/@jupyterlab/notebook-extension/tracker.json +12 -146
- jupyterlab/schemas/@jupyterlab/running-extension/package.json.orig +17 -16
- jupyterlab/schemas/@jupyterlab/settingeditor-extension/package.json.orig +15 -14
- jupyterlab/schemas/@jupyterlab/shortcuts-extension/package.json.orig +17 -16
- jupyterlab/schemas/@jupyterlab/statusbar-extension/package.json.orig +10 -9
- jupyterlab/schemas/@jupyterlab/terminal-extension/package.json.orig +17 -16
- jupyterlab/schemas/@jupyterlab/toc-extension/package.json.orig +10 -9
- jupyterlab/schemas/@jupyterlab/tooltip-extension/package.json.orig +18 -17
- jupyterlab/schemas/@jupyterlab/translation-extension/package.json.orig +9 -8
- jupyterlab/semver.py +2 -2
- jupyterlab/staging/package.json +168 -163
- jupyterlab/staging/webpack.config.js +1 -1
- jupyterlab/staging/yarn.lock +2537 -2358
- jupyterlab/static/1168.6a7f50ce99d9120d558d.js +2 -0
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/1581.32450c6144cb4b0a4559.js → jupyterlab/static/1581.41bb01f5d4047061f002.js +3 -3
- jupyterlab/static/{9597.d23df3e7b0bf2fa53c0e.js → 1954.8b80dffad1ab65f151b3.js} +2 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/2091.bd1d16d1337fa22555ee.js → jupyterlab/static/2091.f770bddee64cc71cbb38.js +2 -2
- jupyterlab/static/2800.14c52357e80a857341c2.js +2 -0
- jupyterlab/static/2829.d72b2ee221fa5ba98c38.js +2 -0
- jupyterlab/static/2990.6dd42ddb50a872f3a914.js +2 -0
- jupyterlab/static/2995.960715f713d01070e5a7.js +2 -0
- jupyterlab/static/3056.7ac8b30ccd5aad42e0c7.js +2 -0
- jupyterlab/static/3308.49c993cd8597acb46935.js +2 -0
- jupyterlab/static/3547.f1596a95dc36296cdb06.js +2 -0
- jupyterlab/static/3783.d68dff3a9631f0665413.js +2 -0
- jupyterlab/static/383.9b32cc3cdf831a212dbe.js +2 -0
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/4008.9030f3b9de5aecde1790.js → jupyterlab/static/4008.b915ce51b76e4eea444a.js +3 -3
- jupyterlab/static/{3621.c7d35be08ce3952739f0.js → 4207.216305846d1afcde3718.js} +2 -2
- jupyterlab/static/4405.2a2632db9de9492d375b.js +2 -0
- jupyterlab/static/49.ced85eba3bfd117cd00f.js +2 -0
- jupyterlab/static/4986.04c2fe2a543c02880ba9.js +2 -0
- jupyterlab/static/6532.31ea041feb9581e651bc.js +2 -0
- jupyterlab/static/6831.86709d4fba398c4eb414.js +2 -0
- jupyterlab/static/6888.7fab95080c34bfe2cfd0.js +2 -0
- jupyterlab/static/720.c0e1eda90fe360aee794.js +2 -0
- jupyterlab/static/7245.ba37c7df026eab813275.js +2 -0
- jupyterlab/static/745.bf57c40e3c4951b45c9e.js +2 -0
- jupyterlab/static/{7451.3dd436449be9a87731ad.js → 7451.e06be24e1fee9b2e4387.js} +3 -3
- jupyterlab/static/{7473.5a991e5d8a3cd593069e.js → 7473.2e5c4257832f1aaa2f7a.js} +2 -2
- jupyterlab/static/7763.bd770588e14bb53e5869.js +3 -0
- jupyterlab/static/7763.bd770588e14bb53e5869.js.LICENSE.txt +5 -0
- jupyterlab/static/812.f31a0b0d1a5719e044c8.js +2 -0
- jupyterlab/static/830.8410da9c86cd6835b3ea.js +2 -0
- jupyterlab/static/8302.9c4fa45b6f90d0c97e69.js +2 -0
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/8768.bf9cf013482344a5bf29.js → jupyterlab/static/8768.a81e5b90356c6d3f905d.js +3 -3
- jupyterlab/static/8771.f48f4e16fcd5cc64f473.js +2 -0
- jupyterlab/static/8823.bff403d7f8fdfcc8e770.js +2 -0
- jupyterlab/static/{9.b85eb270581c06f724c5.js → 9.16e9cdccbe815399d46d.js} +2 -2
- jupyterlab/static/9065.c22fad1c8445f09b60ba.js +2 -0
- jupyterlab/static/9265.f021a836a4f8c1e4f2f5.js +2 -0
- jupyterlab/static/build_log.json +140 -129
- jupyterlab/static/index.html +1 -1
- jupyterlab/static/jlab_core.96941e5e852fedd23450.js +2 -0
- jupyterlab/static/main.20e744f8e1918f54d90d.js +2 -0
- jupyterlab/static/package.json +168 -163
- jupyterlab/static/third-party-licenses.json +201 -231
- jupyterlab/tests/mock_packages/extension/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/consumer/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/provider/package.json +3 -3
- jupyterlab/tests/mock_packages/interop/token/package.json +2 -2
- jupyterlab/tests/mock_packages/mimeextension/package.json +1 -1
- jupyterlab/tests/mock_packages/test-hyphens/MANIFEST.in +1 -1
- jupyterlab/tests/mock_packages/test-hyphens/package.json +2 -2
- jupyterlab/tests/mock_packages/test-hyphens/pyproject.toml +2 -2
- jupyterlab/tests/mock_packages/test-hyphens/setup.py +2 -2
- jupyterlab/tests/test_build_api.py +1 -1
- jupyterlab/tests/test_jupyterlab.py +1 -1
- jupyterlab/themes/@jupyterlab/theme-dark-extension/index.css +1 -1
- jupyterlab/themes/@jupyterlab/theme-light-extension/index.css +1 -1
- jupyterlab/upgrade_extension.py +2 -2
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/package.json.orig +19 -18
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/package.json.orig +24 -22
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/sanitizer.json +6 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/cell-toolbar-extension/package.json.orig +9 -8
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/celltags-extension/package.json.orig +63 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/celltags-extension/plugin.json +33 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/codemirror-extension/package.json.orig +19 -15
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/codemirror-extension/plugin.json +14 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/completer-extension/package.json.orig +10 -9
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/package.json.orig +22 -21
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/tracker.json +3 -92
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/package.json.orig +16 -15
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/debugger-extension/package.json.orig +21 -19
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/package.json.orig +21 -20
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/documentsearch-extension/package.json.orig +10 -9
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/extensionmanager-extension/package.json.orig +11 -10
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/browser.json +13 -2
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/package.json.orig +20 -19
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/widget.json +2 -1
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/package.json.orig +83 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/plugin.json +48 -119
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/package.json.orig +16 -15
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/htmlviewer-extension/package.json.orig +12 -11
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/hub-extension/package.json.orig +9 -8
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/imageviewer-extension/package.json.orig +10 -9
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/package.json.orig +13 -12
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/launcher-extension/package.json.orig +14 -13
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/logconsole-extension/package.json.orig +17 -16
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/lsp-extension/package.json.orig +13 -12
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/mainmenu-extension/package.json.orig +17 -16
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/markdownviewer-extension/package.json.orig +13 -12
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/metadataform-extension/package.json.orig +11 -10
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/package.json.orig +93 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/panel.json +1 -1
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tools.json +143 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json +12 -146
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/running-extension/package.json.orig +17 -16
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/package.json.orig +15 -14
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/shortcuts-extension/package.json.orig +17 -16
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/statusbar-extension/package.json.orig +10 -9
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/terminal-extension/package.json.orig +17 -16
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/toc-extension/package.json.orig +10 -9
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/package.json.orig +18 -17
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/translation-extension/package.json.orig +9 -8
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/1168.6a7f50ce99d9120d558d.js +2 -0
- jupyterlab/static/1581.32450c6144cb4b0a4559.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/1581.41bb01f5d4047061f002.js +3 -3
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/9597.d23df3e7b0bf2fa53c0e.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/1954.8b80dffad1ab65f151b3.js +2 -2
- jupyterlab/static/2091.bd1d16d1337fa22555ee.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2091.f770bddee64cc71cbb38.js +2 -2
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2800.14c52357e80a857341c2.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2829.d72b2ee221fa5ba98c38.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2990.6dd42ddb50a872f3a914.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/2995.960715f713d01070e5a7.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/3056.7ac8b30ccd5aad42e0c7.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/3308.49c993cd8597acb46935.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/3547.f1596a95dc36296cdb06.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/3783.d68dff3a9631f0665413.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/383.9b32cc3cdf831a212dbe.js +2 -0
- jupyterlab/static/4008.9030f3b9de5aecde1790.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4008.b915ce51b76e4eea444a.js +3 -3
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/3621.c7d35be08ce3952739f0.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4207.216305846d1afcde3718.js +2 -2
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4405.2a2632db9de9492d375b.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/49.ced85eba3bfd117cd00f.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4986.04c2fe2a543c02880ba9.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/6532.31ea041feb9581e651bc.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/6831.86709d4fba398c4eb414.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/6888.7fab95080c34bfe2cfd0.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/720.c0e1eda90fe360aee794.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/7245.ba37c7df026eab813275.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/745.bf57c40e3c4951b45c9e.js +2 -0
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/7451.3dd436449be9a87731ad.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/7451.e06be24e1fee9b2e4387.js +3 -3
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/7473.5a991e5d8a3cd593069e.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/7473.2e5c4257832f1aaa2f7a.js +2 -2
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/7763.bd770588e14bb53e5869.js +3 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/7763.bd770588e14bb53e5869.js.LICENSE.txt +5 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/812.f31a0b0d1a5719e044c8.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/830.8410da9c86cd6835b3ea.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8302.9c4fa45b6f90d0c97e69.js +2 -0
- jupyterlab/static/8768.bf9cf013482344a5bf29.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8768.a81e5b90356c6d3f905d.js +3 -3
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8771.f48f4e16fcd5cc64f473.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8823.bff403d7f8fdfcc8e770.js +2 -0
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/9.b85eb270581c06f724c5.js → jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/9.16e9cdccbe815399d46d.js +2 -2
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/9065.c22fad1c8445f09b60ba.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/9265.f021a836a4f8c1e4f2f5.js +2 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/build_log.json +140 -129
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/index.html +1 -1
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/jlab_core.96941e5e852fedd23450.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/main.20e744f8e1918f54d90d.js +2 -0
- jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/package.json +321 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/third-party-licenses.json +201 -231
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-dark-extension/index.css +1 -1
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-light-extension/index.css +1 -1
- {jupyterlab-4.0.0a34.dist-info → jupyterlab-4.0.0a36.dist-info}/METADATA +6 -6
- {jupyterlab-4.0.0a34.dist-info → jupyterlab-4.0.0a36.dist-info}/RECORD +421 -409
- jupyterlab/schemas/@jupyterlab/codemirror-extension/commands.json +0 -163
- jupyterlab/static/1006.9e412681cc0a06b61bf0.js +0 -2
- jupyterlab/static/1168.bd99b385277fda74c7e7.js +0 -2
- jupyterlab/static/1954.e3e678023a9794f54585.js +0 -2
- jupyterlab/static/25.41aa912787b694d8e5fd.js +0 -2
- jupyterlab/static/2800.16d71ffa4e49ede65248.js +0 -2
- jupyterlab/static/2990.ae4cac57633852d78ace.js +0 -2
- jupyterlab/static/2995.62e4f58854308bee4243.js +0 -2
- jupyterlab/static/3308.f1e75f094a71b22133c2.js +0 -2
- jupyterlab/static/3547.01d98ea9bac709628521.js +0 -2
- jupyterlab/static/49.0032a5d19ef33742cc10.js +0 -2
- jupyterlab/static/4986.f7d81e5438193cbc45f7.js +0 -2
- jupyterlab/static/6269.3431fb9d9d780c0af4e9.js +0 -2
- jupyterlab/static/6831.4fa7fe3986c1b89a11a6.js +0 -2
- jupyterlab/static/6888.56ad73d7d649b17bea59.js +0 -2
- jupyterlab/static/720.8b67294950536cd212a2.js +0 -2
- jupyterlab/static/745.a725095c1dff5725613b.js +0 -2
- jupyterlab/static/812.5594afdaab66ef435363.js +0 -2
- jupyterlab/static/830.a78d703922e2e43ffc1b.js +0 -2
- jupyterlab/static/8765.7390a33662098cb71047.js +0 -2
- jupyterlab/static/8771.548ec818cfcd85939fa1.js +0 -2
- jupyterlab/static/8823.a0fc337e55dfe2e131ee.js +0 -2
- jupyterlab/static/911.f79cede096e683d1ea34.js +0 -3
- jupyterlab/static/911.f79cede096e683d1ea34.js.LICENSE.txt +0 -5
- jupyterlab/static/9265.056a822009c8b133bf91.js +0 -2
- jupyterlab/static/9876.52330d1e634c74729e59.js +0 -2
- jupyterlab/static/jlab_core.64dcdf20f2f9401cbce1.js +0 -2
- jupyterlab/static/main.6cb176d6b49a21ca2405.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/schemas/@jupyterlab/codemirror-extension/commands.json +0 -163
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/package.json.orig +0 -80
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/package.json.orig +0 -86
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/1006.9e412681cc0a06b61bf0.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/1168.bd99b385277fda74c7e7.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/1954.e3e678023a9794f54585.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/25.41aa912787b694d8e5fd.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/2800.16d71ffa4e49ede65248.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/2990.ae4cac57633852d78ace.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/2995.62e4f58854308bee4243.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/3308.f1e75f094a71b22133c2.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/3547.01d98ea9bac709628521.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/49.0032a5d19ef33742cc10.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/4986.f7d81e5438193cbc45f7.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/6269.3431fb9d9d780c0af4e9.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/6831.4fa7fe3986c1b89a11a6.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/6888.56ad73d7d649b17bea59.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/720.8b67294950536cd212a2.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/745.a725095c1dff5725613b.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/812.5594afdaab66ef435363.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/830.a78d703922e2e43ffc1b.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/8765.7390a33662098cb71047.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/8771.548ec818cfcd85939fa1.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/8823.a0fc337e55dfe2e131ee.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/911.f79cede096e683d1ea34.js +0 -3
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/911.f79cede096e683d1ea34.js.LICENSE.txt +0 -5
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/9265.056a822009c8b133bf91.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/9876.52330d1e634c74729e59.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/jlab_core.64dcdf20f2f9401cbce1.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/main.6cb176d6b49a21ca2405.js +0 -2
- jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/package.json +0 -316
- /jupyterlab/static/{1581.32450c6144cb4b0a4559.js.LICENSE.txt → 1581.41bb01f5d4047061f002.js.LICENSE.txt} +0 -0
- /jupyterlab/static/{4008.9030f3b9de5aecde1790.js.LICENSE.txt → 4008.b915ce51b76e4eea444a.js.LICENSE.txt} +0 -0
- /jupyterlab/static/{7451.3dd436449be9a87731ad.js.LICENSE.txt → 7451.e06be24e1fee9b2e4387.js.LICENSE.txt} +0 -0
- /jupyterlab/static/{8768.bf9cf013482344a5bf29.js.LICENSE.txt → 8768.a81e5b90356c6d3f905d.js.LICENSE.txt} +0 -0
- /jupyterlab/tests/mock_packages/test-hyphens/{test-hyphens → test_hyphens}/__init__.py +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/etc/jupyter/jupyter_notebook_config.d/jupyterlab.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/etc/jupyter/jupyter_server_config.d/jupyterlab.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/commands.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/context-menu.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/property-inspector.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/shell.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/application-extension/top-bar.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/notification.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/palette.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/print.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/themes.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/apputils-extension/workspaces.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/cell-toolbar-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/completer-extension/manager.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/completer.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/console-extension/foreign.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/csv.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/csvviewer-extension/tsv.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/debugger-extension/main.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/download.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/docmanager-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/documentsearch-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/extensionmanager-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/download.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/open-browser-tab.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/filebrowser-extension/open-with.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/fileeditor-extension/completer.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/about.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/jupyter-forum.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/help-extension/launch-classic.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/htmlviewer-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/hub-extension/menu.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/imageviewer-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/consoles.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/inspector.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/inspector-extension/notebooks.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/launcher-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/logconsole-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/lsp-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/mainmenu-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/markdownviewer-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/metadataform-extension/metadataforms.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/completer.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/export.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/running-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/form-ui.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/settingeditor-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/shortcuts-extension/shortcuts.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/statusbar-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/terminal-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/toc-extension/registry.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/consoles.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/files.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/tooltip-extension/notebooks.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/schemas/@jupyterlab/translation-extension/plugin.json +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1036.f6c57d1265adca83594e.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1036.f6c57d1265adca83594e.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1085.36072613d5461d9bc753.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1142.228652acc76ea404048d.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1294.d1735230fc7e9a21e8ad.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1410.8dd0e390c69996cecb38.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1420.78e8c0a87a74a5c616ed.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1452.40a07727b78492442421.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1467.3ee02202fa11332e5b99.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1550.373973a4651e6d0cf8b8.js +0 -0
- /jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/1581.32450c6144cb4b0a4559.js.LICENSE.txt → /jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/1581.41bb01f5d4047061f002.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1608.cf6b65b59e4ff19b5622.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1716.9bf4d1620425b087fc9a.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1776.5218a3aec719d764977f.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1861.762ed9052ac12c338de6.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1903.73f4b592ee795a6b61ab.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1945.dd876fc4110972ab9979.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/1993.2f82b3bafd40aa9605d3.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2039.7b8fad64fe512bdd5632.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2090.7c57efa83d49c74accca.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2104.fcc8c0f01e052700b3b0.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2145.2ed879d424a6ee02d531.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2254.13d594629c684d67a6b2.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2295.cf513646f24b357692bc.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2320.24d37d8ae619f877e334.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2363.d86742077aed696694b9.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2459.33094feaa394e0b72837.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2485.2b62703ab935947006af.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2617.af93dca9ab5f243bf60e.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2646.7f21306af05485d0bc39.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2857.008f1a1c91b1fa06999e.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2909.9a160a86a2172c389238.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/292.7c2a7b3af0bd14d7f49e.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/2929.686155e4d274cfa9cd32.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3123.1df15835a1681fb411f4.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3127.0bd0b2da7c02c81dc7d7.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3306.19d86a7230d467f0a01a.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3528.c34d6dc8140ed3d19f4d.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3549.05e5283aa1815f6c0b86.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3601.92dd7c517619f0141013.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/373c04fd2418f5c77eea.eot +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/378.1bd75509552813ebea37.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3807.33034141b48b767e6974.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3923.7ffdf2670160c7be7da5.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3935.200aeb85f6884cbd976d.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3935.200aeb85f6884cbd976d.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3962.68d34fc6c9af390e95f2.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/3f6d3488cf65374f6f67.woff +0 -0
- /jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/4008.9030f3b9de5aecde1790.js.LICENSE.txt → /jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/4008.b915ce51b76e4eea444a.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4017.7cf5c0f4ab2e2fe099f4.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4043.7d4235e5ef237743c246.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4139.640d2da69a839bbb23a1.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4155.784ca1752696680bf373.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4283.5ea107a9413cf350657d.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4291.7fc9442700a996c261cd.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4419.8d7204ceb62af06d8422.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4452.e12b3923387884215888.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4519.38b6c4e1bfad86478cf2.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4562.29166c568a222122f128.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4591.314ddb1d18112749d6d0.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/46.0fb036ed8ad4b2af0e5e.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4743.290178067fcbe2b935dd.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/4878.9c8b7dff9f2aa987457d.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/489.2bb514a4f1aeca4522e4.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5041.8834f33c4d437bd3d845.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5157.3a8e834fbef3a8fc2b4f.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5201.43ed99b05a13cb751923.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5203.d020c43293395b5d5c55.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5331.af889dce3fae12a95db2.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5440.0f50e7c3df2baf685125.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5521.f65521bcfb0c479b5fba.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/581.67a15269b8e899ea2588.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5881.c7ae1a260275cb511eda.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/5959.41c3dbb934f7aa83e2af.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6163.231924d17191f1a9a738.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6207.226a2fd91c0e203aee57.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6243.4fc871a5a7ffb2e327b4.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6267.d266ae2f83d17cb51279.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6359.3b09504ed85bb3f71967.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6443.31e269857ec0085f7934.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6595.abbc5e7c2fb4b02cd772.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/6815.c467fac9cf7db8d0e236.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7080.0b3dcc246068147dc7a3.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7112.a59ee2cd442d601beeeb.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7173.f506f29f75a4ef3362ad.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7294.78897ca348581a9dae29.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7294.78897ca348581a9dae29.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7317.df1ecbfc7db0b063eedf.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7318.f2a3b81f6c31efdfa363.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7363.edc5172d0cfe93aa9ff3.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7384.921ddca683d28f988f4e.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7390.186ad933c12e960be502.js +0 -0
- /jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/7451.3dd436449be9a87731ad.js.LICENSE.txt → /jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/7451.e06be24e1fee9b2e4387.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7511.26a3826fcdb9c224c361.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7669.8e939de0670f120fce13.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7702.d3ddc7062e198eb6e938.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7730.7e3a9fb140d2d55a51fc.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7731.987cee17c2debd482054.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7823.94efbaadd84fc03f9d87.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7827.fee0cdeaf6e306bbef3d.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7848.e49d7a34ea52aebaf01b.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7877.dcf82bd8c368d9f16b51.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/7887.313787ace9dbcea19b08.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/795.f94649e166b50e0e5c10.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/79d088064beb3826054f.eot +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8002.0b0117f4610a941dfe76.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8010.a24689afeaeab57102d3.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8012.29bb6d58445d67c859f8.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8285.629ddf7ab87c4102aee2.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8319.5820120f3fd5db7531d6.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8347.299c1a8fba5fd34992e6.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8405.97a74ca186f6f332afe3.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8493.e3975ff82548a415fac5.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8498.160275f2a073c621d541.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8710.d0976e9e521791ab5b19.js +0 -0
- /jupyterlab-4.0.0a34.data/data/share/jupyter/lab/static/8768.bf9cf013482344a5bf29.js.LICENSE.txt → /jupyterlab-4.0.0a36.data/data/share/jupyter/lab/static/8768.a81e5b90356c6d3f905d.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8787.94119f9e3846afa58ae0.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8805.52c5236ced15d35e3286.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8875.8da7cb48fb402ac6f8a5.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/8ea8791754915a898a31.woff2 +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9030.d0c99a0b0db0c7b0a0cb.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9055.3d9971cc90ec4423025c.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9109.fab4c4429f3212218a66.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9192.1a84f137ac27348644bf.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9222.f210f5553fdbc1bb5d74.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9362.36daaf0799b79dc3e343.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9409.d6502e7a30f5163c83f6.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/942.cb7b08b587bc7a30269a.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9421.1ef475b30b23aab2395f.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9445.a6d51ef124feeae99757.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9621.9694856bdac57c707675.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9653.b1366d17fefa13259f3a.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9674eb1bd55047179038.svg +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9738.c078f05c0d7cb5bde4a9.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9747.56b3d4353668e791b7de.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9747.56b3d4353668e791b7de.js.LICENSE.txt +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/9834b82ad26e2a37583d.woff2 +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/a3b9817780214caf01e8.svg +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/af6397503fcefbd61397.ttf +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/be0a084962d8066884f7.svg +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/bootstrap.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/cb9e9e693192413cde2b.woff +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/cda59d6efffa685830fd.ttf +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/e4299464e7b012968eed.eot +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/e42a88444448ac3d6054.woff2 +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/e8711bbb871afd8e9dea.ttf +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/f9217f66874b0c01cd8c.woff +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/index.out.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/static/style.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-dark-extension/index.js +0 -0
- {jupyterlab-4.0.0a34.data → jupyterlab-4.0.0a36.data}/data/share/jupyter/lab/themes/@jupyterlab/theme-light-extension/index.js +0 -0
- {jupyterlab-4.0.0a34.dist-info → jupyterlab-4.0.0a36.dist-info}/WHEEL +0 -0
- {jupyterlab-4.0.0a34.dist-info → jupyterlab-4.0.0a36.dist-info}/entry_points.txt +0 -0
- {jupyterlab-4.0.0a34.dist-info → jupyterlab-4.0.0a36.dist-info}/licenses/LICENSE +0 -0
@@ -1,2 +0,0 @@
|
|
1
|
-
"use strict";(self["webpackChunk_jupyterlab_application_top"]=self["webpackChunk_jupyterlab_application_top"]||[]).push([[4986],{74405:(t,e,i)=>{i.d(e,{BO:()=>Ot,D0:()=>kt,F6:()=>Y,Gz:()=>Xt,IS:()=>_t,Py:()=>dt,QQ:()=>G,Wl:()=>U,Xs:()=>Pt,YW:()=>pt,as:()=>T,bg:()=>k,cp:()=>w,f_:()=>Vt,gc:()=>A,gm:()=>S,jT:()=>V,n0:()=>D,nZ:()=>M,q6:()=>ft,r$:()=>W,uU:()=>Et,xv:()=>s,yy:()=>Tt});class s{constructor(){}lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,false,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,true,1,0)}replace(t,e,i){let s=[];this.decompose(0,t,s,2);if(i.length)i.decompose(0,i.length,s,1|2);this.decompose(e,this.length,s,1);return r.from(s,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){let i=[];this.decompose(t,e,i,0);return r.from(i,e-t)}eq(t){if(t==this)return true;if(t.length!=this.length||t.lines!=this.lines)return false;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1);let s=new a(this),n=new a(t);for(let r=e,o=e;;){s.next(r);n.next(r);r=0;if(s.lineBreak!=n.lineBreak||s.done!=n.done||s.value!=n.value)return false;o+=s.value.length;if(s.done||o>=i)return true}}iter(t=1){return new a(this,t)}iterRange(t,e=this.length){return new f(this,t,e)}iterLines(t,e){let i;if(t==null){i=this.iter()}else{if(e==null)e=this.lines+1;let s=this.line(t).from;i=this.iterRange(s,Math.max(s,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new c(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];this.flatten(t);return t}static of(t){if(t.length==0)throw new RangeError("A document must have at least one line");if(t.length==1&&!t[0])return s.empty;return t.length<=32?new n(t):r.from(n.split(t,[]))}}class n extends s{constructor(t,e=o(t)){super();this.text=t;this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,s){for(let n=0;;n++){let r=this.text[n],o=s+r.length;if((e?i:o)>=t)return new u(s,o,i,r);s=o+1;i++}}decompose(t,e,i,s){let r=t<=0&&e>=this.length?this:new n(h(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(s&1){let t=i.pop();let e=l(r.text,t.text.slice(),0,r.length);if(e.length<=32){i.push(new n(e,t.length+r.length))}else{let t=e.length>>1;i.push(new n(e.slice(0,t)),new n(e.slice(t)))}}else{i.push(r)}}replace(t,e,i){if(!(i instanceof n))return super.replace(t,e,i);let s=l(this.text,l(i.text,h(this.text,0,t)),e);let o=this.length+i.length-(e-t);if(s.length<=32)return new n(s,o);return r.from(n.split(s,[]),o)}sliceString(t,e=this.length,i="\n"){let s="";for(let n=0,r=0;n<=e&&r<this.text.length;r++){let o=this.text[r],l=n+o.length;if(n>t&&r)s+=i;if(t<l&&e>n)s+=o.slice(Math.max(0,t-n),e-n);n=l+1}return s}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],s=-1;for(let r of t){i.push(r);s+=r.length+1;if(i.length==32){e.push(new n(i,s));i=[];s=-1}}if(s>-1)e.push(new n(i,s));return e}}class r extends s{constructor(t,e){super();this.children=t;this.length=e;this.lines=0;for(let i of t)this.lines+=i.lines}lineInner(t,e,i,s){for(let n=0;;n++){let r=this.children[n],o=s+r.length,l=i+r.lines-1;if((e?l:o)>=t)return r.lineInner(t,e,i,s);s=o+1;i=l+1}}decompose(t,e,i,s){for(let n=0,r=0;r<=e&&n<this.children.length;n++){let o=this.children[n],l=r+o.length;if(t<=l&&e>=r){let n=s&((r<=t?1:0)|(l>=e?2:0));if(r>=t&&l<=e&&!n)i.push(o);else o.decompose(t-r,e-r,i,n)}r=l+1}}replace(t,e,i){if(i.lines<this.lines)for(let s=0,n=0;s<this.children.length;s++){let o=this.children[s],l=n+o.length;if(t>=n&&e<=l){let h=o.replace(t-n,e-n,i);let a=this.lines-o.lines+h.lines;if(h.lines<a>>5-1&&h.lines>a>>5+1){let n=this.children.slice();n[s]=h;return new r(n,this.length-(e-t)+i.length)}return super.replace(n,l,h)}n=l+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){let s="";for(let n=0,r=0;n<this.children.length&&r<=e;n++){let o=this.children[n],l=r+o.length;if(r>t&&n)s+=i;if(t<l&&e>r)s+=o.sliceString(t-r,e-r,i);r=l+1}return s}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof r))return 0;let i=0;let[s,n,o,l]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;s+=e,n+=e){if(s==o||n==l)return i;let r=this.children[s],h=t.children[n];if(r!=h)return i+r.scanIdentical(h,e);i+=r.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let n of t)i+=n.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new n(i,e)}let s=Math.max(32,i>>5),o=s<<1,l=s>>1;let h=[],a=0,f=-1,c=[];function u(t){let e;if(t.lines>o&&t instanceof r){for(let e of t.children)u(e)}else if(t.lines>l&&(a>l||!a)){d();h.push(t)}else if(t instanceof n&&a&&(e=c[c.length-1])instanceof n&&t.lines+e.lines<=32){a+=t.lines;f+=t.length+1;c[c.length-1]=new n(e.text.concat(t.text),e.length+1+t.length)}else{if(a+t.lines>s)d();a+=t.lines;f+=t.length+1;c.push(t)}}function d(){if(a==0)return;h.push(c.length==1?c[0]:r.from(c,f));f=-1;a=c.length=0}for(let n of t)u(n);d();return h.length==1?h[0]:new r(h,e)}}s.empty=new n([""],0);function o(t){let e=-1;for(let i of t)e+=i.length+1;return e}function l(t,e,i=0,s=1e9){for(let n=0,r=0,o=true;r<t.length&&n<=s;r++){let l=t[r],h=n+l.length;if(h>=i){if(h>s)l=l.slice(0,s-n);if(n<i)l=l.slice(i-n);if(o){e[e.length-1]+=l;o=false}else e.push(l)}n=h+1}return e}function h(t,e,i){return l(t,[""],e,i)}class a{constructor(t,e=1){this.dir=e;this.done=false;this.lineBreak=false;this.value="";this.nodes=[t];this.offsets=[e>0?1:(t instanceof n?t.text.length:t.children.length)<<1]}nextInner(t,e){this.done=this.lineBreak=false;for(;;){let i=this.nodes.length-1;let s=this.nodes[i],r=this.offsets[i],o=r>>1;let l=s instanceof n?s.text.length:s.children.length;if(o==(e>0?l:0)){if(i==0){this.done=true;this.value="";return this}if(e>0)this.offsets[i-1]++;this.nodes.pop();this.offsets.pop()}else if((r&1)==(e>0?0:1)){this.offsets[i]+=e;if(t==0){this.lineBreak=true;this.value="\n";return this}t--}else if(s instanceof n){let n=s.text[o+(e<0?-1:0)];this.offsets[i]+=e;if(n.length>Math.max(0,t)){this.value=t==0?n:e>0?n.slice(t):n.slice(0,n.length-t);return this}t-=n.length}else{let r=s.children[o+(e<0?-1:0)];if(t>r.length){t-=r.length;this.offsets[i]+=e}else{if(e<0)this.offsets[i]--;this.nodes.push(r);this.offsets.push(e>0?1:(r instanceof n?r.text.length:r.children.length)<<1)}}}}next(t=0){if(t<0){this.nextInner(-t,-this.dir);t=this.value.length}return this.nextInner(t,this.dir)}}class f{constructor(t,e,i){this.value="";this.done=false;this.cursor=new a(t,e>i?-1:1);this.pos=e>i?t.length:0;this.from=Math.min(e,i);this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to){this.value="";this.done=true;return this}t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;if(t>i)t=i;i-=t;let{value:s}=this.cursor.next(t);this.pos+=(s.length+t)*e;this.value=s.length<=i?s:e<0?s.slice(s.length-i):s.slice(0,i);this.done=!this.value;return this}next(t=0){if(t<0)t=Math.max(t,this.from-this.pos);else if(t>0)t=Math.min(t,this.to-this.pos);return this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class c{constructor(t){this.inner=t;this.afterBreak=true;this.value="";this.done=false}next(t=0){let{done:e,lineBreak:i,value:s}=this.inner.next(t);if(e){this.done=true;this.value=""}else if(i){if(this.afterBreak){this.value=""}else{this.afterBreak=true;this.next()}}else{this.value=s;this.afterBreak=false}return this}get lineBreak(){return false}}if(typeof Symbol!="undefined"){s.prototype[Symbol.iterator]=function(){return this.iter()};a.prototype[Symbol.iterator]=f.prototype[Symbol.iterator]=c.prototype[Symbol.iterator]=function(){return this}}class u{constructor(t,e,i,s){this.from=t;this.to=e;this.number=i;this.text=s}get length(){return this.to-this.from}}let d="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let Jt=1;Jt<d.length;Jt++)d[Jt]+=d[Jt-1];function p(t){for(let e=1;e<d.length;e+=2)if(d[e]>t)return d[e-1]<=t;return false}function g(t){return t>=127462&&t<=127487}const m=8205;function w(t,e,i=true,s=true){return(i?v:y)(t,e,s)}function v(t,e,i){if(e==t.length)return e;if(e&&b(t.charCodeAt(e))&&x(t.charCodeAt(e-1)))e--;let s=S(t,e);e+=M(s);while(e<t.length){let n=S(t,e);if(s==m||n==m||i&&p(n)){e+=M(n);s=n}else if(g(n)){let i=0,s=e-2;while(s>=0&&g(S(t,s))){i++;s-=2}if(i%2==0)break;else e+=2}else{break}}return e}function y(t,e,i){while(e>0){let s=v(t,e-2,i);if(s<e)return s;e--}return 0}function b(t){return t>=56320&&t<57344}function x(t){return t>=55296&&t<56320}function S(t,e){let i=t.charCodeAt(e);if(!x(i)||e+1==t.length)return i;let s=t.charCodeAt(e+1);if(!b(s))return i;return(i-55296<<10)+(s-56320)+65536}function k(t){if(t<=65535)return String.fromCharCode(t);t-=65536;return String.fromCharCode((t>>10)+55296,(t&1023)+56320)}function M(t){return t<65536?1:2}const C=/\r\n?|\n/;var A=function(t){t[t["Simple"]=0]="Simple";t[t["TrackDel"]=1]="TrackDel";t[t["TrackBefore"]=2]="TrackBefore";t[t["TrackAfter"]=3]="TrackAfter";return t}(A||(A={}));class D{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;e<this.sections.length;e+=2)t+=this.sections[e];return t}get newLength(){let t=0;for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e+1];t+=i<0?this.sections[e]:i}return t}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(t){for(let e=0,i=0,s=0;e<this.sections.length;){let n=this.sections[e++],r=this.sections[e++];if(r<0){t(i,s,n);s+=n}else{s+=r}i+=n}}iterChangedRanges(t,e=false){R(this,t,e)}get invertedDesc(){let t=[];for(let e=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];if(s<0)t.push(i,s);else t.push(s,i)}return new D(t)}composeDesc(t){return this.empty?t:t.empty?this:L(this,t)}mapDesc(t,e=false){return t.empty?this:B(this,t,e)}mapPos(t,e=-1,i=A.Simple){let s=0,n=0;for(let r=0;r<this.sections.length;){let o=this.sections[r++],l=this.sections[r++],h=s+o;if(l<0){if(h>t)return n+(t-s);n+=o}else{if(i!=A.Simple&&h>=t&&(i==A.TrackDel&&s<t&&h>t||i==A.TrackBefore&&s<t||i==A.TrackAfter&&h>t))return null;if(h>t||h==t&&e<0&&!o)return t==s||e<0?n:n+l;n+=l}s=h}if(t>s)throw new RangeError(`Position ${t} is out of range for changeset of length ${s}`);return n}touchesRange(t,e=t){for(let i=0,s=0;i<this.sections.length&&s<=e;){let n=this.sections[i++],r=this.sections[i++],o=s+n;if(r>=0&&s<=e&&o>=t)return s<t&&o>e?"cover":true;s=o}return false}toString(){let t="";for(let e=0;e<this.sections.length;){let i=this.sections[e++],s=this.sections[e++];t+=(t?" ":"")+i+(s>=0?":"+s:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>typeof t!="number")))throw new RangeError("Invalid JSON representation of ChangeDesc");return new D(t)}static create(t){return new D(t)}}class T extends D{constructor(t,e){super(t);this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");R(this,((e,i,s,n,r)=>t=t.replace(s,s+(i-e),r)),false);return t}mapDesc(t,e=false){return B(this,t,e,true)}invert(t){let e=this.sections.slice(),i=[];for(let n=0,r=0;n<e.length;n+=2){let o=e[n],l=e[n+1];if(l>=0){e[n]=l;e[n+1]=o;let h=n>>1;while(i.length<h)i.push(s.empty);i.push(o?t.slice(r,r+o):s.empty)}r+=o}return new T(e,i)}compose(t){return this.empty?t:t.empty?this:L(this,t,true)}map(t,e=false){return t.empty?this:B(this,t,e,true)}iterChanges(t,e=false){R(this,t,e)}get desc(){return D.create(this.sections)}filter(t){let e=[],i=[],s=[];let n=new P(this);t:for(let r=0,o=0;;){let l=r==t.length?1e9:t[r++];while(o<l||o==l&&n.len==0){if(n.done)break t;let t=Math.min(n.len,l-o);O(s,t,-1);let r=n.ins==-1?-1:n.off==0?n.ins:0;O(e,t,r);if(r>0)E(i,e,n.text);n.forward(t);o+=t}let h=t[r++];while(o<h){if(n.done)break t;let t=Math.min(n.len,h-o);O(e,t,-1);O(s,t,n.ins==-1?-1:n.off==0?n.ins:0);n.forward(t);o+=t}}return{changes:new T(e,i),filtered:D.create(s)}}toJSON(){let t=[];for(let e=0;e<this.sections.length;e+=2){let i=this.sections[e],s=this.sections[e+1];if(s<0)t.push(i);else if(s==0)t.push([i]);else t.push([i].concat(this.inserted[e>>1].toJSON()))}return t}static of(t,e,i){let n=[],r=[],o=0;let l=null;function h(t=false){if(!t&&!n.length)return;if(o<e)O(n,e-o,-1);let i=new T(n,r);l=l?l.compose(i.map(l)):i;n=[];r=[];o=0}function a(t){if(Array.isArray(t)){for(let e of t)a(e)}else if(t instanceof T){if(t.length!=e)throw new RangeError(`Mismatched change set length (got ${t.length}, expected ${e})`);h();l=l?l.compose(t.map(l)):t}else{let{from:l,to:a=l,insert:f}=t;if(l>a||l<0||a>e)throw new RangeError(`Invalid change range ${l} to ${a} (in doc of length ${e})`);let c=!f?s.empty:typeof f=="string"?s.of(f.split(i||C)):f;let u=c.length;if(l==a&&u==0)return;if(l<o)h();if(l>o)O(n,l-o,-1);O(n,a-l,u);E(r,n,c);o=a}}a(t);h(!l);return l}static empty(t){return new T(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let n=0;n<t.length;n++){let r=t[n];if(typeof r=="number"){e.push(r,-1)}else if(!Array.isArray(r)||typeof r[0]!="number"||r.some(((t,e)=>e&&typeof t!="string"))){throw new RangeError("Invalid JSON representation of ChangeSet")}else if(r.length==1){e.push(r[0],0)}else{while(i.length<n)i.push(s.empty);i[n]=s.of(r.slice(1));e.push(r[0],i[n].length)}}return new T(e,i)}static createSet(t,e){return new T(t,e)}}function O(t,e,i,s=false){if(e==0&&i<=0)return;let n=t.length-2;if(n>=0&&i<=0&&i==t[n+1])t[n]+=e;else if(e==0&&t[n]==0)t[n+1]+=i;else if(s){t[n]+=e;t[n+1]+=i}else t.push(e,i)}function E(t,e,i){if(i.length==0)return;let n=e.length-2>>1;if(n<t.length){t[t.length-1]=t[t.length-1].append(i)}else{while(t.length<n)t.push(s.empty);t.push(i)}}function R(t,e,i){let n=t.inserted;for(let r=0,o=0,l=0;l<t.sections.length;){let h=t.sections[l++],a=t.sections[l++];if(a<0){r+=h;o+=h}else{let f=r,c=o,u=s.empty;for(;;){f+=h;c+=a;if(a&&n)u=u.append(n[l-2>>1]);if(i||l==t.sections.length||t.sections[l+1]<0)break;h=t.sections[l++];a=t.sections[l++]}e(r,f,o,c,u);r=f;o=c}}}function B(t,e,i,s=false){let n=[],r=s?[]:null;let o=new P(t),l=new P(e);for(let h=-1;;){if(o.ins==-1&&l.ins==-1){let t=Math.min(o.len,l.len);O(n,t,-1);o.forward(t);l.forward(t)}else if(l.ins>=0&&(o.ins<0||h==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!i))){let t=l.len;O(n,l.ins,-1);while(t){let e=Math.min(o.len,t);if(o.ins>=0&&h<o.i&&o.len<=e){O(n,0,o.ins);if(r)E(r,n,o.text);h=o.i}o.forward(e);t-=e}l.next()}else if(o.ins>=0){let t=0,e=o.len;while(e){if(l.ins==-1){let i=Math.min(e,l.len);t+=i;e-=i;l.forward(i)}else if(l.ins==0&&l.len<e){e-=l.len;l.next()}else{break}}O(n,t,h<o.i?o.ins:0);if(r&&h<o.i)E(r,n,o.text);h=o.i;o.forward(o.len-e)}else if(o.done&&l.done){return r?T.createSet(n,r):D.create(n)}else{throw new Error("Mismatched change set lengths")}}}function L(t,e,i=false){let s=[];let n=i?[]:null;let r=new P(t),o=new P(e);for(let l=false;;){if(r.done&&o.done){return n?T.createSet(s,n):D.create(s)}else if(r.ins==0){O(s,r.len,0,l);r.next()}else if(o.len==0&&!o.done){O(s,0,o.ins,l);if(n)E(n,s,o.text);o.next()}else if(r.done||o.done){throw new Error("Mismatched change set lengths")}else{let t=Math.min(r.len2,o.len),e=s.length;if(r.ins==-1){let e=o.ins==-1?-1:o.off?0:o.ins;O(s,t,e,l);if(n&&e)E(n,s,o.text)}else if(o.ins==-1){O(s,r.off?0:r.len,t,l);if(n)E(n,s,r.textBit(t))}else{O(s,r.off?0:r.len,o.off?0:o.ins,l);if(n&&!o.off)E(n,s,o.text)}l=(r.ins>t||o.ins>=0&&o.len>t)&&(l||s.length>e);r.forward2(t);o.forward(t)}}}class P{constructor(t){this.set=t;this.i=0;this.next()}next(){let{sections:t}=this.set;if(this.i<t.length){this.len=t[this.i++];this.ins=t[this.i++]}else{this.len=0;this.ins=-2}this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:t}=this.set,e=this.i-2>>1;return e>=t.length?s.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?s.empty:e[i].slice(this.off,t==null?undefined:this.off+t)}forward(t){if(t==this.len)this.next();else{this.len-=t;this.off+=t}}forward2(t){if(this.ins==-1)this.forward(t);else if(t==this.ins)this.next();else{this.ins-=t;this.off+=t}}}class N{constructor(t,e,i){this.from=t;this.to=e;this.flags=i}get anchor(){return this.flags&16?this.to:this.from}get head(){return this.flags&16?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&4?-1:this.flags&8?1:0}get bidiLevel(){let t=this.flags&3;return t==3?null:t}get goalColumn(){let t=this.flags>>5;return t==33554431?undefined:t}map(t,e=-1){let i,s;if(this.empty){i=s=t.mapPos(this.from,e)}else{i=t.mapPos(this.from,1);s=t.mapPos(this.to,-1)}return i==this.from&&s==this.to?this:new N(i,s,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return V.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return V.range(this.anchor,i)}eq(t){return this.anchor==t.anchor&&this.head==t.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||typeof t.anchor!="number"||typeof t.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return V.range(t.anchor,t.head)}static create(t,e,i){return new N(t,e,i)}}class V{constructor(t,e){this.ranges=t;this.mainIndex=e}map(t,e=-1){if(t.empty)return this;return V.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return false;for(let e=0;e<this.ranges.length;e++)if(!this.ranges[e].eq(t.ranges[e]))return false;return true}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new V([this.main],0)}addRange(t,e=true){return V.create([t].concat(this.ranges),e?0:this.mainIndex+1)}replaceRange(t,e=this.mainIndex){let i=this.ranges.slice();i[e]=t;return V.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map((t=>t.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||typeof t.main!="number"||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new V(t.ranges.map((t=>N.fromJSON(t))),t.main)}static single(t,e=t){return new V([V.range(t,e)],0)}static create(t,e=0){if(t.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,s=0;s<t.length;s++){let n=t[s];if(n.empty?n.from<=i:n.from<i)return V.normalized(t.slice(),e);i=n.to}return new V(t,e)}static cursor(t,e=0,i,s){return N.create(t,t,(e==0?0:e<0?4:8)|(i==null?3:Math.min(2,i))|(s!==null&&s!==void 0?s:33554431)<<5)}static range(t,e,i){let s=(i!==null&&i!==void 0?i:33554431)<<5;return e<t?N.create(e,t,16|s|8):N.create(t,e,s|(e>t?4:0))}static normalized(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from));e=t.indexOf(i);for(let s=1;s<t.length;s++){let i=t[s],n=t[s-1];if(i.empty?i.from<=n.to:i.from<n.to){let r=n.from,o=Math.max(i.to,n.to);if(s<=e)e--;t.splice(--s,2,i.anchor>i.head?V.range(o,r):V.range(r,o))}}return new V(t,e)}}function H(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let I=0;class W{constructor(t,e,i,s,n){this.combine=t;this.compareInput=e;this.compare=i;this.isStatic=s;this.id=I++;this.default=t([]);this.extensions=typeof n=="function"?n(this):n}static define(t={}){return new W(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(!t.combine?F:(t,e)=>t===e),!!t.static,t.enables)}of(t){return new z([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new z(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new z(t,this,2,e)}from(t,e){if(!e)e=t=>t;return this.compute([t],(i=>e(i.field(t))))}}function F(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class z{constructor(t,e,i,s){this.dependencies=t;this.facet=e;this.type=i;this.value=s;this.id=I++}dynamicSlot(t){var e;let i=this.value;let s=this.facet.compareInput;let n=this.id,r=t[n]>>1,o=this.type==2;let l=false,h=false,a=[];for(let f of this.dependencies){if(f=="doc")l=true;else if(f=="selection")h=true;else if((((e=t[f.id])!==null&&e!==void 0?e:1)&1)==0)a.push(t[f.id])}return{create(t){t.values[r]=i(t);return 1},update(t,e){if(l&&e.docChanged||h&&(e.docChanged||e.selection)||j(t,a)){let e=i(t);if(o?!q(e,t.values[r],s):!s(e,t.values[r])){t.values[r]=e;return 1}}return 0},reconfigure:(t,e)=>{let l,h=e.config.address[n];if(h!=null){let n=it(e,h);if(this.dependencies.every((i=>i instanceof W?e.facet(i)===t.facet(i):i instanceof G?e.field(i,false)==t.field(i,false):true))||(o?q(l=i(t),n,s):s(l=i(t),n))){t.values[r]=n;return 0}}else{l=i(t)}t.values[r]=l;return 1}}}}function q(t,e,i){if(t.length!=e.length)return false;for(let s=0;s<t.length;s++)if(!i(t[s],e[s]))return false;return true}function j(t,e){let i=false;for(let s of e)if(et(t,s)&1)i=true;return i}function $(t,e,i){let s=i.map((e=>t[e.id]));let n=i.map((t=>t.type));let r=s.filter((t=>!(t&1)));let o=t[e.id]>>1;function l(t){let i=[];for(let e=0;e<s.length;e++){let r=it(t,s[e]);if(n[e]==2)for(let t of r)i.push(t);else i.push(r)}return e.combine(i)}return{create(t){for(let e of s)et(t,e);t.values[o]=l(t);return 1},update(t,i){if(!j(t,r))return 0;let s=l(t);if(e.compare(s,t.values[o]))return 0;t.values[o]=s;return 1},reconfigure(t,n){let r=j(t,s);let h=n.config.facets[e.id],a=n.facet(e);if(h&&!r&&F(i,h)){t.values[o]=a;return 0}let f=l(t);if(e.compare(f,a)){t.values[o]=a;return 0}t.values[o]=f;return 1}}}const K=W.define({static:true});class G{constructor(t,e,i,s,n){this.id=t;this.createF=e;this.updateF=i;this.compareF=s;this.spec=n;this.provides=undefined}static define(t){let e=new G(I++,t.create,t.update,t.compare||((t,e)=>t===e),t);if(t.provide)e.provides=t.provide(e);return e}create(t){let e=t.facet(K).find((t=>t.field==this));return((e===null||e===void 0?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>{t.values[e]=this.create(t);return 1},update:(t,i)=>{let s=t.values[e];let n=this.updateF(s,i);if(this.compareF(s,n))return 0;t.values[e]=n;return 1},reconfigure:(t,i)=>{if(i.config.address[this.id]!=null){t.values[e]=i.field(this);return 0}t.values[e]=this.create(t);return 1}}}init(t){return[this,K.of({field:this,create:t})]}get extension(){return this}}const _={lowest:4,low:3,default:2,high:1,highest:0};function X(t){return e=>new J(e,t)}const U={highest:X(_.highest),high:X(_.high),default:X(_.default),low:X(_.low),lowest:X(_.lowest)};class J{constructor(t,e){this.inner=t;this.prec=e}}class Y{of(t){return new Q(this,t)}reconfigure(t){return Y.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class Q{constructor(t,e){this.compartment=t;this.inner=e}}class Z{constructor(t,e,i,s,n,r){this.base=t;this.compartments=e;this.dynamicSlots=i;this.address=s;this.staticValues=n;this.facets=r;this.statusTemplate=[];while(this.statusTemplate.length<i.length)this.statusTemplate.push(0)}staticFacet(t){let e=this.address[t.id];return e==null?t.default:this.staticValues[e>>1]}static resolve(t,e,i){let s=[];let n=Object.create(null);let r=new Map;for(let c of tt(t,e,r)){if(c instanceof G)s.push(c);else(n[c.facet.id]||(n[c.facet.id]=[])).push(c)}let o=Object.create(null);let l=[];let h=[];for(let c of s){o[c.id]=h.length<<1;h.push((t=>c.slot(t)))}let a=i===null||i===void 0?void 0:i.config.facets;for(let c in n){let t=n[c],e=t[0].facet;let s=a&&a[c]||[];if(t.every((t=>t.type==0))){o[e.id]=l.length<<1|1;if(F(s,t)){l.push(i.facet(e))}else{let s=e.combine(t.map((t=>t.value)));l.push(i&&e.compare(s,i.facet(e))?i.facet(e):s)}}else{for(let e of t){if(e.type==0){o[e.id]=l.length<<1|1;l.push(e.value)}else{o[e.id]=h.length<<1;h.push((t=>e.dynamicSlot(t)))}}o[e.id]=h.length<<1;h.push((i=>$(i,e,t)))}}let f=h.map((t=>t(o)));return new Z(t,r,f,o,l,n)}}function tt(t,e,i){let s=[[],[],[],[],[]];let n=new Map;function r(t,o){let l=n.get(t);if(l!=null){if(l<=o)return;let e=s[l].indexOf(t);if(e>-1)s[l].splice(e,1);if(t instanceof Q)i.delete(t.compartment)}n.set(t,o);if(Array.isArray(t)){for(let e of t)r(e,o)}else if(t instanceof Q){if(i.has(t.compartment))throw new RangeError(`Duplicate use of compartment in extensions`);let s=e.get(t.compartment)||t.inner;i.set(t.compartment,s);r(s,o)}else if(t instanceof J){r(t.inner,t.prec)}else if(t instanceof G){s[o].push(t);if(t.provides)r(t.provides,o)}else if(t instanceof z){s[o].push(t);if(t.facet.extensions)r(t.facet.extensions,_.default)}else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);r(e,o)}}r(t,_.default);return s.reduce(((t,e)=>t.concat(e)))}function et(t,e){if(e&1)return 2;let i=e>>1;let s=t.status[i];if(s==4)throw new Error("Cyclic dependency between fields and/or facets");if(s&2)return s;t.status[i]=4;let n=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|n}function it(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const st=W.define();const nt=W.define({combine:t=>t.some((t=>t)),static:true});const rt=W.define({combine:t=>t.length?t[0]:undefined,static:true});const ot=W.define();const lt=W.define();const ht=W.define();const at=W.define({combine:t=>t.length?t[0]:false});class ft{constructor(t,e){this.type=t;this.value=e}static define(){return new ct}}class ct{of(t){return new ft(this,t)}}class ut{constructor(t){this.map=t}of(t){return new dt(this,t)}}class dt{constructor(t,e){this.type=t;this.value=e}map(t){let e=this.type.map(this.value,t);return e===undefined?undefined:e==this.value?this:new dt(this.type,e)}is(t){return this.type==t}static define(t={}){return new ut(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let s of t){let t=s.map(e);if(t)i.push(t)}return i}}dt.reconfigure=dt.define();dt.appendConfig=dt.define();class pt{constructor(t,e,i,s,n,r){this.startState=t;this.changes=e;this.selection=i;this.effects=s;this.annotations=n;this.scrollIntoView=r;this._doc=null;this._state=null;if(i)H(i,e.newLength);if(!n.some((t=>t.type==pt.time)))this.annotations=n.concat(pt.time.of(Date.now()))}static create(t,e,i,s,n,r){return new pt(t,e,i,s,n,r)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){if(!this._state)this.startState.applyTransaction(this);return this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value;return undefined}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(pt.userEvent);return!!(e&&(e==t||e.length>t.length&&e.slice(0,t.length)==t&&e[t.length]=="."))}}pt.time=ft.define();pt.userEvent=ft.define();pt.addToHistory=ft.define();pt.remote=ft.define();function gt(t,e){let i=[];for(let s=0,n=0;;){let r,o;if(s<t.length&&(n==e.length||e[n]>=t[s])){r=t[s++];o=t[s++]}else if(n<e.length){r=e[n++];o=e[n++]}else return i;if(!i.length||i[i.length-1]<r)i.push(r,o);else if(i[i.length-1]<o)i[i.length-1]=o}}function mt(t,e,i){var s;let n,r,o;if(i){n=e.changes;r=T.empty(e.changes.length);o=t.changes.compose(e.changes)}else{n=e.changes.map(t.changes);r=t.changes.mapDesc(e.changes,true);o=t.changes.compose(n)}return{changes:o,selection:e.selection?e.selection.map(r):(s=t.selection)===null||s===void 0?void 0:s.map(n),effects:dt.mapEffects(t.effects,n).concat(dt.mapEffects(e.effects,r)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function wt(t,e,i){let s=e.selection,n=St(e.annotations);if(e.userEvent)n=n.concat(pt.userEvent.of(e.userEvent));return{changes:e.changes instanceof T?e.changes:T.of(e.changes||[],i,t.facet(rt)),selection:s&&(s instanceof V?s:V.single(s.anchor,s.head)),effects:St(e.effects),annotations:n,scrollIntoView:!!e.scrollIntoView}}function vt(t,e,i){let s=wt(t,e.length?e[0]:{},t.doc.length);if(e.length&&e[0].filter===false)i=false;for(let r=1;r<e.length;r++){if(e[r].filter===false)i=false;let n=!!e[r].sequential;s=mt(s,wt(t,e[r],n?s.changes.newLength:t.doc.length),n)}let n=pt.create(t,s.changes,s.selection,s.effects,s.annotations,s.scrollIntoView);return bt(i?yt(n):n)}function yt(t){let e=t.startState;let i=true;for(let n of e.facet(ot)){let e=n(t);if(e===false){i=false;break}if(Array.isArray(e))i=i===true?e:gt(i,e)}if(i!==true){let s,n;if(i===false){n=t.changes.invertedDesc;s=T.empty(e.doc.length)}else{let e=t.changes.filter(i);s=e.changes;n=e.filtered.mapDesc(e.changes).invertedDesc}t=pt.create(e,s,t.selection&&t.selection.map(n),dt.mapEffects(t.effects,n),t.annotations,t.scrollIntoView)}let s=e.facet(lt);for(let n=s.length-1;n>=0;n--){let i=s[n](t);if(i instanceof pt)t=i;else if(Array.isArray(i)&&i.length==1&&i[0]instanceof pt)t=i[0];else t=vt(e,St(i),false)}return t}function bt(t){let e=t.startState,i=e.facet(ht),s=t;for(let n=i.length-1;n>=0;n--){let r=i[n](t);if(r&&Object.keys(r).length)s=mt(s,wt(e,r,t.changes.newLength),true)}return s==t?t:pt.create(e,t.changes,t.selection,s.effects,s.annotations,s.scrollIntoView)}const xt=[];function St(t){return t==null?xt:Array.isArray(t)?t:[t]}var kt=function(t){t[t["Word"]=0]="Word";t[t["Space"]=1]="Space";t[t["Other"]=2]="Other";return t}(kt||(kt={}));const Mt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ct;try{Ct=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(Ut){}function At(t){if(Ct)return Ct.test(t);for(let e=0;e<t.length;e++){let i=t[e];if(/\w/.test(i)||i>""&&(i.toUpperCase()!=i.toLowerCase()||Mt.test(i)))return true}return false}function Dt(t){return e=>{if(!/\S/.test(e))return kt.Space;if(At(e))return kt.Word;for(let i=0;i<t.length;i++)if(e.indexOf(t[i])>-1)return kt.Word;return kt.Other}}class Tt{constructor(t,e,i,s,n,r){this.config=t;this.doc=e;this.selection=i;this.values=s;this.status=t.statusTemplate.slice();this.computeSlot=n;if(r)r._state=this;for(let o=0;o<this.config.dynamicSlots.length;o++)et(this,o<<1);this.computeSlot=null}field(t,e=true){let i=this.config.address[t.id];if(i==null){if(e)throw new RangeError("Field is not present in this state");return undefined}et(this,i);return it(this,i)}update(...t){return vt(this,t,true)}applyTransaction(t){let e=this.config,{base:i,compartments:s}=e;for(let r of t.effects){if(r.is(Y.reconfigure)){if(e){s=new Map;e.compartments.forEach(((t,e)=>s.set(e,t)));e=null}s.set(r.value.compartment,r.value.extension)}else if(r.is(dt.reconfigure)){e=null;i=r.value}else if(r.is(dt.appendConfig)){e=null;i=St(i).concat(r.value)}}let n;if(!e){e=Z.resolve(i,s,this);let t=new Tt(e,this.doc,this.selection,e.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null);n=t.values}else{n=t.startState.values.slice()}new Tt(e,t.newDoc,t.newSelection,n,((e,i)=>i.update(e,t)),t)}replaceSelection(t){if(typeof t=="string")t=this.toText(t);return this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:V.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection;let i=t(e.ranges[0]);let s=this.changes(i.changes),n=[i.range];let r=St(i.effects);for(let o=1;o<e.ranges.length;o++){let i=t(e.ranges[o]);let l=this.changes(i.changes),h=l.map(s);for(let t=0;t<o;t++)n[t]=n[t].map(h);let a=s.mapDesc(l,true);n.push(i.range.map(a));s=s.compose(h);r=dt.mapEffects(r,h).concat(dt.mapEffects(St(i.effects),a))}return{changes:s,selection:V.create(n,e.mainIndex),effects:r}}changes(t=[]){if(t instanceof T)return t;return T.of(t,this.doc.length,this.facet(Tt.lineSeparator))}toText(t){return s.of(t.split(this.facet(Tt.lineSeparator)||C))}sliceDoc(t=0,e=this.doc.length){return this.doc.sliceString(t,e,this.lineBreak)}facet(t){let e=this.config.address[t.id];if(e==null)return t.default;et(this,e);return it(this,e)}toJSON(t){let e={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(t)for(let i in t){let s=t[i];if(s instanceof G&&this.config.address[s.id]!=null)e[i]=s.spec.toJSON(this.field(t[i]),this)}return e}static fromJSON(t,e={},i){if(!t||typeof t.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let s=[];if(i)for(let n in i){if(Object.prototype.hasOwnProperty.call(t,n)){let e=i[n],r=t[n];s.push(e.init((t=>e.spec.fromJSON(r,t))))}}return Tt.create({doc:t.doc,selection:V.fromJSON(t.selection),extensions:e.extensions?s.concat([e.extensions]):s})}static create(t={}){let e=Z.resolve(t.extensions||[],new Map);let i=t.doc instanceof s?t.doc:s.of((t.doc||"").split(e.staticFacet(Tt.lineSeparator)||C));let n=!t.selection?V.single(0):t.selection instanceof V?t.selection:V.single(t.selection.anchor,t.selection.head);H(n,i.length);if(!e.staticFacet(nt))n=n.asSingle();return new Tt(e,i,n,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(Tt.tabSize)}get lineBreak(){return this.facet(Tt.lineSeparator)||"\n"}get readOnly(){return this.facet(at)}phrase(t,...e){for(let i of this.facet(Tt.phrases))if(Object.prototype.hasOwnProperty.call(i,t)){t=i[t];break}if(e.length)t=t.replace(/\$(\$|\d*)/g,((t,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>e.length?t:e[s-1]}));return t}languageDataAt(t,e,i=-1){let s=[];for(let n of this.facet(st)){for(let r of n(this,e,i)){if(Object.prototype.hasOwnProperty.call(r,t))s.push(r[t])}}return s}charCategorizer(t){return Dt(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:s}=this.doc.lineAt(t);let n=this.charCategorizer(t);let r=t-i,o=t-i;while(r>0){let t=w(e,r,false);if(n(e.slice(t,r))!=kt.Word)break;r=t}while(o<s){let t=w(e,o);if(n(e.slice(o,t))!=kt.Word)break;o=t}return r==o?null:V.range(r+i,o+i)}}Tt.allowMultipleSelections=nt;Tt.tabSize=W.define({combine:t=>t.length?t[0]:4});Tt.lineSeparator=rt;Tt.readOnly=at;Tt.phrases=W.define({compare(t,e){let i=Object.keys(t),s=Object.keys(e);return i.length==s.length&&i.every((i=>t[i]==e[i]))}});Tt.languageData=st;Tt.changeFilter=ot;Tt.transactionFilter=lt;Tt.transactionExtender=ht;Y.reconfigure=dt.define();function Ot(t,e,i={}){let s={};for(let n of t)for(let t of Object.keys(n)){let e=n[t],r=s[t];if(r===undefined)s[t]=e;else if(r===e||e===undefined);else if(Object.hasOwnProperty.call(i,t))s[t]=i[t](r,e);else throw new Error("Config merge conflict for field "+t)}for(let n in e)if(s[n]===undefined)s[n]=e[n];return s}class Et{eq(t){return this==t}range(t,e=t){return Rt.create(t,e,this)}}Et.prototype.startSide=Et.prototype.endSide=0;Et.prototype.point=false;Et.prototype.mapMode=A.TrackDel;class Rt{constructor(t,e,i){this.from=t;this.to=e;this.value=i}static create(t,e,i){return new Rt(t,e,i)}}function Bt(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Lt{constructor(t,e,i,s){this.from=t;this.to=e;this.value=i;this.maxPoint=s}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,s=0){let n=i?this.to:this.from;for(let r=s,o=n.length;;){if(r==o)return r;let s=r+o>>1;let l=n[s]-t||(i?this.value[s].endSide:this.value[s].startSide)-e;if(s==r)return l>=0?r:o;if(l>=0)o=s;else r=s+1}}between(t,e,i,s){for(let n=this.findIndex(e,-1e9,true),r=this.findIndex(i,1e9,false,n);n<r;n++)if(s(this.from[n]+t,this.to[n]+t,this.value[n])===false)return false}map(t,e){let i=[],s=[],n=[],r=-1,o=-1;for(let l=0;l<this.value.length;l++){let h=this.value[l],a=this.from[l]+t,f=this.to[l]+t,c,u;if(a==f){let t=e.mapPos(a,h.startSide,h.mapMode);if(t==null)continue;c=u=t;if(h.startSide!=h.endSide){u=e.mapPos(a,h.endSide);if(u<c)continue}}else{c=e.mapPos(a,h.startSide);u=e.mapPos(f,h.endSide);if(c>u||c==u&&h.startSide>0&&h.endSide<=0)continue}if((u-c||h.endSide-h.startSide)<0)continue;if(r<0)r=c;if(h.point)o=Math.max(o,u-c);i.push(h);s.push(c-r);n.push(u-r)}return{mapped:i.length?new Lt(s,n,i,o):null,pos:r}}}class Pt{constructor(t,e,i,s){this.chunkPos=t;this.chunk=e;this.nextLayer=i;this.maxPoint=s}static create(t,e,i,s){return new Pt(t,e,i,s)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=false,filterFrom:s=0,filterTo:n=this.length}=t;let r=t.filter;if(e.length==0&&!r)return this;if(i)e=e.slice().sort(Bt);if(this.isEmpty)return e.length?Pt.of(e):this;let o=new It(this,null,-1).goto(0),l=0,h=[];let a=new Vt;while(o.value||l<e.length){if(l<e.length&&(o.from-e[l].from||o.startSide-e[l].value.startSide)>=0){let t=e[l++];if(!a.addInner(t.from,t.to,t.value))h.push(t)}else if(o.rangeIndex==1&&o.chunkIndex<this.chunk.length&&(l==e.length||this.chunkEnd(o.chunkIndex)<e[l].from)&&(!r||s>this.chunkEnd(o.chunkIndex)||n<this.chunkPos[o.chunkIndex])&&a.addChunk(this.chunkPos[o.chunkIndex],this.chunk[o.chunkIndex])){o.nextChunk()}else{if(!r||s>o.to||n<o.from||r(o.from,o.to,o.value)){if(!a.addInner(o.from,o.to,o.value))h.push(Rt.create(o.from,o.to,o.value))}o.next()}}return a.finishInner(this.nextLayer.isEmpty&&!h.length?Pt.empty:this.nextLayer.update({add:h,filter:r,filterFrom:s,filterTo:n}))}map(t){if(t.empty||this.isEmpty)return this;let e=[],i=[],s=-1;for(let r=0;r<this.chunk.length;r++){let n=this.chunkPos[r],o=this.chunk[r];let l=t.touchesRange(n,n+o.length);if(l===false){s=Math.max(s,o.maxPoint);e.push(o);i.push(t.mapPos(n))}else if(l===true){let{mapped:r,pos:l}=o.map(n,t);if(r){s=Math.max(s,r.maxPoint);e.push(r);i.push(l)}}}let n=this.nextLayer.map(t);return e.length==0?n:new Pt(i,e,n||Pt.empty,s)}between(t,e,i){if(this.isEmpty)return;for(let s=0;s<this.chunk.length;s++){let n=this.chunkPos[s],r=this.chunk[s];if(e>=n&&t<=n+r.length&&r.between(n,t-n,e-n,i)===false)return}this.nextLayer.between(t,e,i)}iter(t=0){return Wt.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Wt.from(t).goto(e)}static compare(t,e,i,s,n=-1){let r=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=n));let o=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=n));let l=Ht(r,o,i);let h=new zt(r,l,n);let a=new zt(o,l,n);i.iterGaps(((t,e,i)=>qt(h,t,a,e,i,s)));if(i.empty&&i.length==0)qt(h,0,a,0,0,s)}static eq(t,e,i=0,s){if(s==null)s=1e9-1;let n=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0));let r=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(n.length!=r.length)return false;if(!n.length)return true;let o=Ht(n,r);let l=new zt(n,o,0).goto(i),h=new zt(r,o,0).goto(i);for(;;){if(l.to!=h.to||!jt(l.active,h.active)||l.point&&(!h.point||!l.point.eq(h.point)))return false;if(l.to>s)return true;l.next();h.next()}}static spans(t,e,i,s,n=-1){let r=new zt(t,null,n).goto(e),o=e;let l=r.openStart;for(;;){let t=Math.min(r.to,i);if(r.point){let i=r.activeForPoint(r.to);let n=r.pointFrom<e?i.length+1:Math.min(i.length,l);s.point(o,t,r.point,i,n,r.pointRank);l=Math.min(r.openEnd(t),i.length)}else if(t>o){s.span(o,t,r.active,l);l=r.openEnd(t)}if(r.to>i)return l+(r.point&&r.to>i?1:0);o=r.to;r.next()}}static of(t,e=false){let i=new Vt;for(let s of t instanceof Rt?[t]:e?Nt(t):t)i.add(s.from,s.to,s.value);return i.finish()}}Pt.empty=new Pt([],[],null,-1);function Nt(t){if(t.length>1)for(let e=t[0],i=1;i<t.length;i++){let s=t[i];if(Bt(e,s)>0)return t.slice().sort(Bt);e=s}return t}Pt.empty.nextLayer=Pt.empty;class Vt{constructor(){this.chunks=[];this.chunkPos=[];this.chunkStart=-1;this.last=null;this.lastFrom=-1e9;this.lastTo=-1e9;this.from=[];this.to=[];this.value=[];this.maxPoint=-1;this.setMaxPoint=-1;this.nextLayer=null}finishChunk(t){this.chunks.push(new Lt(this.from,this.to,this.value,this.maxPoint));this.chunkPos.push(this.chunkStart);this.chunkStart=-1;this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint);this.maxPoint=-1;if(t){this.from=[];this.to=[];this.value=[]}}add(t,e,i){if(!this.addInner(t,e,i))(this.nextLayer||(this.nextLayer=new Vt)).add(t,e,i)}addInner(t,e,i){let s=t-this.lastTo||i.startSide-this.last.endSide;if(s<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");if(s<0)return false;if(this.from.length==250)this.finishChunk(true);if(this.chunkStart<0)this.chunkStart=t;this.from.push(t-this.chunkStart);this.to.push(e-this.chunkStart);this.last=i;this.lastFrom=t;this.lastTo=e;this.value.push(i);if(i.point)this.maxPoint=Math.max(this.maxPoint,e-t);return true}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return false;if(this.from.length)this.finishChunk(true);this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint);this.chunks.push(e);this.chunkPos.push(t);let i=e.value.length-1;this.last=e.value[i];this.lastFrom=e.from[i]+t;this.lastTo=e.to[i]+t;return true}finish(){return this.finishInner(Pt.empty)}finishInner(t){if(this.from.length)this.finishChunk(false);if(this.chunks.length==0)return t;let e=Pt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);this.from=null;return e}}function Ht(t,e,i){let s=new Map;for(let r of t)for(let t=0;t<r.chunk.length;t++)if(r.chunk[t].maxPoint<=0)s.set(r.chunk[t],r.chunkPos[t]);let n=new Set;for(let r of e)for(let t=0;t<r.chunk.length;t++){let e=s.get(r.chunk[t]);if(e!=null&&(i?i.mapPos(e):e)==r.chunkPos[t]&&!(i===null||i===void 0?void 0:i.touchesRange(e,e+r.chunk[t].length)))n.add(r.chunk[t])}return n}class It{constructor(t,e,i,s=0){this.layer=t;this.skip=e;this.minPoint=i;this.rank=s}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(t,e=-1e9){this.chunkIndex=this.rangeIndex=0;this.gotoInner(t,e,false);return this}gotoInner(t,e,i){while(this.chunkIndex<this.layer.chunk.length){let e=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(e)||this.layer.chunkEnd(this.chunkIndex)<t||e.maxPoint<this.minPoint))break;this.chunkIndex++;i=false}if(this.chunkIndex<this.layer.chunk.length){let s=this.layer.chunk[this.chunkIndex].findIndex(t-this.layer.chunkPos[this.chunkIndex],e,true);if(!i||this.rangeIndex<s)this.setRangeIndex(s)}this.next()}forward(t,e){if((this.to-t||this.endSide-e)<0)this.gotoInner(t,e,true)}next(){for(;;){if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9;this.value=null;break}else{let t=this.layer.chunkPos[this.chunkIndex],e=this.layer.chunk[this.chunkIndex];let i=t+e.from[this.rangeIndex];this.from=i;this.to=t+e.to[this.rangeIndex];this.value=e.value[this.rangeIndex];this.setRangeIndex(this.rangeIndex+1);if(this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){this.chunkIndex++;if(this.skip){while(this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]))this.chunkIndex++}this.rangeIndex=0}else{this.rangeIndex=t}}nextChunk(){this.chunkIndex++;this.rangeIndex=0;this.next()}compare(t){return this.from-t.from||this.startSide-t.startSide||this.rank-t.rank||this.to-t.to||this.endSide-t.endSide}}class Wt{constructor(t){this.heap=t}static from(t,e=null,i=-1){let s=[];for(let n=0;n<t.length;n++){for(let r=t[n];!r.isEmpty;r=r.nextLayer){if(r.maxPoint>=i)s.push(new It(r,e,i,n))}}return s.length==1?s[0]:new Wt(s)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let i=this.heap.length>>1;i>=0;i--)Ft(this.heap,i);this.next();return this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let i=this.heap.length>>1;i>=0;i--)Ft(this.heap,i);if((this.to-t||this.value.endSide-e)<0)this.next()}next(){if(this.heap.length==0){this.from=this.to=1e9;this.value=null;this.rank=-1}else{let t=this.heap[0];this.from=t.from;this.to=t.to;this.value=t.value;this.rank=t.rank;if(t.value)t.next();Ft(this.heap,0)}}}function Ft(t,e){for(let i=t[e];;){let s=(e<<1)+1;if(s>=t.length)break;let n=t[s];if(s+1<t.length&&n.compare(t[s+1])>=0){n=t[s+1];s++}if(i.compare(n)<0)break;t[s]=i;t[e]=n;e=s}}class zt{constructor(t,e,i){this.minPoint=i;this.active=[];this.activeTo=[];this.activeRank=[];this.minActive=-1;this.point=null;this.pointFrom=0;this.pointRank=0;this.to=-1e9;this.endSide=0;this.openStart=-1;this.cursor=Wt.from(t,e,i)}goto(t,e=-1e9){this.cursor.goto(t,e);this.active.length=this.activeTo.length=this.activeRank.length=0;this.minActive=-1;this.to=t;this.endSide=e;this.openStart=-1;this.next();return this}forward(t,e){while(this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){$t(this.active,t);$t(this.activeTo,t);$t(this.activeRank,t);this.minActive=Gt(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:s,rank:n}=this.cursor;while(e<this.activeRank.length&&this.activeRank[e]<=n)e++;Kt(this.active,e,i);Kt(this.activeTo,e,s);Kt(this.activeRank,e,n);if(t)Kt(t,e,this.cursor.from);this.minActive=Gt(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let s=this.minActive;if(s>-1&&(this.activeTo[s]-this.cursor.from||this.active[s].endSide-this.cursor.startSide)<0){if(this.activeTo[s]>t){this.to=this.activeTo[s];this.endSide=this.active[s].endSide;break}this.removeActive(s);if(i)$t(i,s)}else if(!this.cursor.value){this.to=this.endSide=1e9;break}else if(this.cursor.from>t){this.to=this.cursor.from;this.endSide=this.cursor.startSide;break}else{let t=this.cursor.value;if(!t.point){this.addActive(i);this.cursor.next()}else if(e&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to){this.cursor.next()}else{this.point=t;this.pointFrom=this.cursor.from;this.pointRank=this.cursor.rank;this.to=this.cursor.to;this.endSide=t.endSide;this.cursor.next();this.forward(this.to,this.endSide);break}}}if(i){this.openStart=0;for(let e=i.length-1;e>=0&&i[e]<t;e--)this.openStart++}}activeForPoint(t){if(!this.active.length)return this.active;let e=[];for(let i=this.active.length-1;i>=0;i--){if(this.activeRank[i]<this.pointRank)break;if(this.activeTo[i]>t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)e.push(this.active[i])}return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function qt(t,e,i,s,n,r){t.goto(e);i.goto(s);let o=s+n;let l=s,h=s-e;for(;;){let e=t.to+h-i.to||t.endSide-i.endSide;let s=e<0?t.to+h:i.to,n=Math.min(s,o);if(t.point||i.point){if(!(t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&jt(t.activeForPoint(t.to+h),i.activeForPoint(i.to))))r.comparePoint(l,n,t.point,i.point)}else{if(n>l&&!jt(t.active,i.active))r.compareRange(l,n,t.active,i.active)}if(s>o)break;l=s;if(e<=0)t.next();if(e>=0)i.next()}}function jt(t,e){if(t.length!=e.length)return false;for(let i=0;i<t.length;i++)if(t[i]!=e[i]&&!t[i].eq(e[i]))return false;return true}function $t(t,e){for(let i=e,s=t.length-1;i<s;i++)t[i]=t[i+1];t.pop()}function Kt(t,e,i){for(let s=t.length-1;s>=e;s--)t[s+1]=t[s];t[e]=i}function Gt(t,e){let i=-1,s=1e9;for(let n=0;n<e.length;n++)if((e[n]-s||t[n].endSide-t[i].endSide)<0){i=n;s=e[n]}return i}function _t(t,e,i=t.length){let s=0;for(let n=0;n<i;){if(t.charCodeAt(n)==9){s+=e-s%e;n++}else{s++;n=w(t,n)}}return s}function Xt(t,e,i,s){for(let n=0,r=0;;){if(r>=e)return n;if(n==t.length)break;r+=t.charCodeAt(n)==9?i-r%i:1;n=w(t,n)}return s===true?-1:t.length}},54986:(t,e,i)=>{i.d(e,{p:()=>kt,Nm:()=>re,tk:()=>Ms,SJ:()=>mr,lg:()=>Ut,l9:()=>xt,Sd:()=>cr,gB:()=>nr,v5:()=>br,ZO:()=>Tn,$f:()=>Ls,Eu:()=>Nr,OO:()=>Kt,$1:()=>Vs,mH:()=>gr,hJ:()=>Jn});var s=i(74405);var n=i(67737);var r={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"};var o={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'};var l=typeof navigator!="undefined"&&/Chrome\/(\d+)/.exec(navigator.userAgent);var h=typeof navigator!="undefined"&&/Apple Computer/.test(navigator.vendor);var a=typeof navigator!="undefined"&&/Gecko\/\d+/.test(navigator.userAgent);var f=typeof navigator!="undefined"&&/Mac/.test(navigator.platform);var c=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);var u=l&&(f||+l[1]<57)||a&&f;for(var d=0;d<10;d++)r[48+d]=r[96+d]=String(d);for(var d=1;d<=24;d++)r[d+111]="F"+d;for(var d=65;d<=90;d++){r[d]=String.fromCharCode(d+32);o[d]=String.fromCharCode(d)}for(var p in r)if(!o.hasOwnProperty(p))o[p]=r[p];function g(t){var e=u&&(t.ctrlKey||t.altKey||t.metaKey)||(h||c)&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified";var i=!e&&t.key||(t.shiftKey?o:r)[t.keyCode]||t.key||"Unidentified";if(i=="Esc")i="Escape";if(i=="Del")i="Delete";if(i=="Left")i="ArrowLeft";if(i=="Up")i="ArrowUp";if(i=="Right")i="ArrowRight";if(i=="Down")i="ArrowDown";return i}function m(t){let e;if(t.nodeType==11){e=t.getSelection?t:t.ownerDocument}else{e=t}return e.getSelection()}function w(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):false}function v(t){let e=t.activeElement;while(e&&e.shadowRoot)e=e.shadowRoot.activeElement;return e}function y(t,e){if(!e.anchorNode)return false;try{return w(t,e.anchorNode)}catch(i){return false}}function b(t){if(t.nodeType==3)return P(t,0,t.nodeValue.length).getClientRects();else if(t.nodeType==1)return t.getClientRects();else return[]}function x(t,e,i,s){return i?k(t,e,i,s,-1)||k(t,e,i,s,1):false}function S(t){for(var e=0;;e++){t=t.previousSibling;if(!t)return e}}function k(t,e,i,s,n){for(;;){if(t==i&&e==s)return true;if(e==(n<0?0:M(t))){if(t.nodeName=="DIV")return false;let i=t.parentNode;if(!i||i.nodeType!=1)return false;e=S(t)+(n<0?0:1);t=i}else if(t.nodeType==1){t=t.childNodes[e+(n<0?-1:0)];if(t.nodeType==1&&t.contentEditable=="false")return false;e=n<0?M(t):0}else{return false}}}function M(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}const C={left:0,right:0,top:0,bottom:0};function A(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function D(t){return{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function T(t,e,i,s,n,r,o,l){let h=t.ownerDocument,a=h.defaultView||window;for(let f=t;f;){if(f.nodeType==1){let t,c=f==h.body;if(c){t=D(a)}else{if(f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let e=f.getBoundingClientRect();t={left:e.left,right:e.left+f.clientWidth,top:e.top,bottom:e.top+f.clientHeight}}let u=0,d=0;if(n=="nearest"){if(e.top<t.top){d=-(t.top-e.top+o);if(i>0&&e.bottom>t.bottom+d)d=e.bottom-t.bottom+d+o}else if(e.bottom>t.bottom){d=e.bottom-t.bottom+o;if(i<0&&e.top-d<t.top)d=-(t.top+d-e.top+o)}}else{let s=e.bottom-e.top,r=t.bottom-t.top;let l=n=="center"&&s<=r?e.top+s/2-r/2:n=="start"||n=="center"&&i<0?e.top-o:e.bottom-r+o;d=l-t.top}if(s=="nearest"){if(e.left<t.left){u=-(t.left-e.left+r);if(i>0&&e.right>t.right+u)u=e.right-t.right+u+r}else if(e.right>t.right){u=e.right-t.right+r;if(i<0&&e.left<t.left+u)u=-(t.left+u-e.left+r)}}else{let i=s=="center"?e.left+(e.right-e.left)/2-(t.right-t.left)/2:s=="start"==l?e.left-r:e.right-(t.right-t.left)+r;u=i-t.left}if(u||d){if(c){a.scrollBy(u,d)}else{let t=0,i=0;if(d){let t=f.scrollTop;f.scrollTop+=d;i=f.scrollTop-t}if(u){let e=f.scrollLeft;f.scrollLeft+=u;t=f.scrollLeft-e}e={left:e.left-t,top:e.top-i,right:e.right-t,bottom:e.bottom-i};if(t&&Math.abs(t-u)<1)s="nearest";if(i&&Math.abs(i-d)<1)n="nearest"}}if(c)break;f=f.assignedSlot||f.parentNode}else if(f.nodeType==11){f=f.host}else{break}}}function O(t){let e=t.ownerDocument;for(let i=t.parentNode;i;){if(i==e.body){break}else if(i.nodeType==1){if(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth)return i;i=i.assignedSlot||i.parentNode}else if(i.nodeType==11){i=i.host}else{break}}return null}class E{constructor(){this.anchorNode=null;this.anchorOffset=0;this.focusNode=null;this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){this.set(t.anchorNode,t.anchorOffset,t.focusNode,t.focusOffset)}set(t,e,i,s){this.anchorNode=t;this.anchorOffset=e;this.focusNode=i;this.focusOffset=s}}let R=null;function B(t){if(t.setActive)return t.setActive();if(R)return t.focus(R);let e=[];for(let i=t;i;i=i.parentNode){e.push(i,i.scrollTop,i.scrollLeft);if(i==i.ownerDocument)break}t.focus(R==null?{get preventScroll(){R={preventScroll:true};return true}}:undefined);if(!R){R=false;for(let t=0;t<e.length;){let i=e[t++],s=e[t++],n=e[t++];if(i.scrollTop!=s)i.scrollTop=s;if(i.scrollLeft!=n)i.scrollLeft=n}}}let L;function P(t,e,i=e){let s=L||(L=document.createRange());s.setEnd(t,i);s.setStart(t,e);return s}function N(t,e,i){let s={key:e,code:e,keyCode:i,which:i,cancelable:true};let n=new KeyboardEvent("keydown",s);n.synthetic=true;t.dispatchEvent(n);let r=new KeyboardEvent("keyup",s);r.synthetic=true;t.dispatchEvent(r);return n.defaultPrevented||r.defaultPrevented}function V(t){while(t){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function H(t){while(t.attributes.length)t.removeAttributeNode(t.attributes[0])}function I(t,e){let i=e.focusNode,s=e.focusOffset;if(!i||e.anchorNode!=i||e.anchorOffset!=s)return false;for(;;){if(s){if(i.nodeType!=1)return false;let t=i.childNodes[s-1];if(t.contentEditable=="false")s--;else{i=t;s=M(i)}}else if(i==t){return true}else{s=S(i);i=i.parentNode}}}class W{constructor(t,e,i=true){this.node=t;this.offset=e;this.precise=i}static before(t,e){return new W(t.parentNode,S(t),e)}static after(t,e){return new W(t.parentNode,S(t)+1,e)}}const F=[];class z{constructor(){this.parent=null;this.dom=null;this.dirty=2}get editorView(){if(!this.parent)throw new Error("Accessing view in orphan content view");return this.parent.editorView}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(t){let e=this.posAtStart;for(let i of this.children){if(i==t)return e;e+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(t){return this.posBefore(t)+t.length}coordsAt(t,e){return null}sync(t){if(this.dirty&2){let e=this.dom;let i=null,s;for(let n of this.children){if(n.dirty){if(!n.dom&&(s=i?i.nextSibling:e.firstChild)){let t=z.get(s);if(!t||!t.parent&&t.canReuseDOM(n))n.reuseDOM(s)}n.sync(t);n.dirty=0}s=i?i.nextSibling:e.firstChild;if(t&&!t.written&&t.node==e&&s!=n.dom)t.written=true;if(n.dom.parentNode==e){while(s&&s!=n.dom)s=q(s)}else{e.insertBefore(n.dom,s)}i=n.dom}s=i?i.nextSibling:e.firstChild;if(s&&t&&t.node==e)t.written=true;while(s)s=q(s)}else if(this.dirty&1){for(let e of this.children)if(e.dirty){e.sync(t);e.dirty=0}}}reuseDOM(t){}localPosFromDOM(t,e){let i;if(t==this.dom){i=this.dom.childNodes[e]}else{let s=M(t)==0?0:e==0?-1:1;for(;;){let e=t.parentNode;if(e==this.dom)break;if(s==0&&e.firstChild!=e.lastChild){if(t==e.firstChild)s=-1;else s=1}t=e}if(s<0)i=t;else i=t.nextSibling}if(i==this.dom.firstChild)return 0;while(i&&!z.get(i))i=i.nextSibling;if(!i)return this.length;for(let s=0,n=0;;s++){let t=this.children[s];if(t.dom==i)return n;n+=t.length+t.breakAfter}}domBoundsAround(t,e,i=0){let s=-1,n=-1,r=-1,o=-1;for(let l=0,h=i,a=i;l<this.children.length;l++){let i=this.children[l],f=h+i.length;if(h<t&&f>e)return i.domBoundsAround(t,e,h);if(f>=t&&s==-1){s=l;n=h}if(h>e&&i.dom.parentNode==this.dom){r=l;o=a;break}a=f;h=f+i.breakAfter}return{from:n,to:o<0?i+this.length:o,startDOM:(s?this.children[s-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:r<this.children.length&&r>=0?this.children[r].dom:null}}markDirty(t=false){this.dirty|=2;this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t)e.dirty|=2;if(e.dirty&1)return;e.dirty|=1;t=false}}setParent(t){if(this.parent!=t){this.parent=t;if(this.dirty)this.markParentsDirty(true)}}setDOM(t){if(this.dom)this.dom.cmView=null;this.dom=t;t.cmView=this}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=F){this.markDirty();for(let s=t;s<e;s++){let t=this.children[s];if(t.parent==this)t.destroy()}this.children.splice(t,e-t,...i);for(let s=0;s<i.length;s++)i[s].setParent(this)}ignoreMutation(t){return false}ignoreEvent(t){return false}childCursor(t=this.length){return new j(this.children,t,this.children.length)}childPos(t,e=1){return this.childCursor().findPos(t,e)}toString(){let t=this.constructor.name.replace("View","");return t+(this.children.length?"("+this.children.join()+")":this.length?"["+(t=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(t){return t.cmView}get isEditable(){return true}merge(t,e,i,s,n,r){return false}become(t){return false}canReuseDOM(t){return t.constructor==this.constructor}getSide(){return 0}destroy(){this.parent=null}}z.prototype.breakAfter=0;function q(t){let e=t.nextSibling;t.parentNode.removeChild(t);return e}class j{constructor(t,e,i){this.children=t;this.pos=e;this.i=i;this.off=0}findPos(t,e=1){for(;;){if(t>this.pos||t==this.pos&&(e>0||this.i==0||this.children[this.i-1].breakAfter)){this.off=t-this.pos;return this}let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function $(t,e,i,s,n,r,o,l,h){let{children:a}=t;let f=a.length?a[e]:null;let c=r.length?r[r.length-1]:null;let u=c?c.breakAfter:o;if(e==s&&f&&!o&&!u&&r.length<2&&f.merge(i,n,r.length?c:null,i==0,l,h))return;if(s<a.length){let t=a[s];if(t&&n<t.length){if(e==s){t=t.split(n);n=0}if(!u&&c&&t.merge(0,n,c,true,0,h)){r[r.length-1]=t}else{if(n)t.merge(0,n,null,false,0,h);r.push(t)}}else if(t===null||t===void 0?void 0:t.breakAfter){if(c)c.breakAfter=1;else o=1}s++}if(f){f.breakAfter=o;if(i>0){if(!o&&r.length&&f.merge(i,f.length,r[0],false,l,0)){f.breakAfter=r.shift().breakAfter}else if(i<f.length||f.children.length&&f.children[f.children.length-1].length==0){f.merge(i,f.length,null,false,l,0)}e++}}while(e<s&&r.length){if(a[s-1].become(r[r.length-1])){s--;r.pop();h=r.length?0:l}else if(a[e].become(r[0])){e++;r.shift();l=r.length?0:h}else{break}}if(!r.length&&e&&s<a.length&&!a[e-1].breakAfter&&a[s].merge(0,0,a[e-1],false,l,h))e--;if(e<s||r.length)t.replaceChildren(e,s,r)}function K(t,e,i,s,n,r){let o=t.childCursor();let{i:l,off:h}=o.findPos(i,1);let{i:a,off:f}=o.findPos(e,-1);let c=e-i;for(let u of s)c+=u.length;t.length+=c;$(t,a,f,l,h,s,0,n,r)}let G=typeof navigator!="undefined"?navigator:{userAgent:"",vendor:"",platform:""};let _=typeof document!="undefined"?document:{documentElement:{style:{}}};const X=/Edge\/(\d+)/.exec(G.userAgent);const U=/MSIE \d/.test(G.userAgent);const J=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(G.userAgent);const Y=!!(U||J||X);const Q=!Y&&/gecko\/(\d+)/i.test(G.userAgent);const Z=!Y&&/Chrome\/(\d+)/.exec(G.userAgent);const tt="webkitFontSmoothing"in _.documentElement.style;const et=!Y&&/Apple Computer/.test(G.vendor);const it=et&&(/Mobile\/\w+/.test(G.userAgent)||G.maxTouchPoints>2);var st={mac:it||/Mac/.test(G.platform),windows:/Win/.test(G.platform),linux:/Linux|X11/.test(G.platform),ie:Y,ie_version:U?_.documentMode||6:J?+J[1]:X?+X[1]:0,gecko:Q,gecko_version:Q?+(/Firefox\/(\d+)/.exec(G.userAgent)||[0,0])[1]:0,chrome:!!Z,chrome_version:Z?+Z[1]:0,ios:it,android:/Android\b/.test(G.userAgent),webkit:tt,safari:et,webkit_version:tt?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:_.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const nt=256;class rt extends z{constructor(t){super();this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t){if(!this.dom)this.createDOM();if(this.dom.nodeValue!=this.text){if(t&&t.node==this.dom)t.written=true;this.dom.nodeValue=this.text}}reuseDOM(t){if(t.nodeType==3)this.createDOM(t)}merge(t,e,i){if(i&&(!(i instanceof rt)||this.length-(e-t)+i.length>nt))return false;this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e);this.markDirty();return true}split(t){let e=new rt(this.text.slice(t));this.text=this.text.slice(0,t);this.markDirty();return e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new W(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return lt(this.dom,t,e)}}class ot extends z{constructor(t,e=[],i=0){super();this.mark=t;this.children=e;this.length=i;for(let s of e)s.setParent(this)}setAttrs(t){H(t);if(this.mark.class)t.className=this.mark.class;if(this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}reuseDOM(t){if(t.nodeName==this.mark.tagName.toUpperCase()){this.setDOM(t);this.dirty|=4|2}}sync(t){if(!this.dom)this.setDOM(this.setAttrs(document.createElement(this.mark.tagName)));else if(this.dirty&4)this.setAttrs(this.dom);super.sync(t)}merge(t,e,i,s,n,r){if(i&&(!(i instanceof ot&&i.mark.eq(this.mark))||t&&n<=0||e<this.length&&r<=0))return false;K(this,t,e,i?i.children:[],n-1,r-1);this.markDirty();return true}split(t){let e=[],i=0,s=-1,n=0;for(let o of this.children){let r=i+o.length;if(r>t)e.push(i<t?o.split(t-i):o);if(s<0&&i>=t)s=n;i=r;n++}let r=this.length-t;this.length=t;if(s>-1){this.children.length=s;this.markDirty()}return new ot(this.mark,e,r)}domAtPos(t){return pt(this,t)}coordsAt(t,e){return mt(this,t,e)}}function lt(t,e,i){let s=t.nodeValue.length;if(e>s)e=s;let n=e,r=e,o=0;if(e==0&&i<0||e==s&&i>=0){if(!(st.chrome||st.gecko)){if(e){n--;o=1}else if(r<s){r++;o=-1}}}else{if(i<0)n--;else if(r<s)r++}let l=P(t,n,r).getClientRects();if(!l.length)return C;let h=l[(o?o<0:i>=0)?0:l.length-1];if(st.safari&&!o&&h.width==0)h=Array.prototype.find.call(l,(t=>t.width))||h;return o?A(h,o<0):h||null}class ht extends z{constructor(t,e,i){super();this.widget=t;this.length=e;this.side=i;this.prevWidget=null}static create(t,e,i){return new(t.customView||ht)(t,e,i)}split(t){let e=ht.create(this.widget,this.length-t,this.side);this.length-=t;return e}sync(){if(!this.dom||!this.widget.updateDOM(this.dom)){if(this.dom&&this.prevWidget)this.prevWidget.destroy(this.dom);this.prevWidget=null;this.setDOM(this.widget.toDOM(this.editorView));this.dom.contentEditable="false"}}getSide(){return this.side}merge(t,e,i,s,n,r){if(i&&(!(i instanceof ht)||!this.widget.compare(i.widget)||t>0&&n<=0||e<this.length&&r<=0))return false;this.length=t+(i?i.length:0)+(this.length-e);return true}become(t){if(t.length==this.length&&t instanceof ht&&t.side==this.side){if(this.widget.constructor==t.widget.constructor){if(!this.widget.eq(t.widget))this.markDirty(true);if(this.dom&&!this.prevWidget)this.prevWidget=this.widget;this.widget=t.widget;return true}}return false}ignoreMutation(){return true}ignoreEvent(t){return this.widget.ignoreEvent(t)}get overrideDOMText(){if(this.length==0)return s.xv.empty;let t=this;while(t.parent)t=t.parent;let e=t.editorView,i=e&&e.state.doc,n=this.posAtStart;return i?i.slice(n,n+this.length):s.xv.empty}domAtPos(t){return t==0?W.before(this.dom):W.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let i=this.dom.getClientRects(),s=null;if(!i.length)return C;for(let n=t>0?i.length-1:0;;n+=t>0?-1:1){s=i[n];if(t>0?n==0:n==i.length-1||s.top<s.bottom)break}return this.length?s:A(s,this.side>0)}get isEditable(){return false}destroy(){super.destroy();if(this.dom)this.widget.destroy(this.dom)}}class at extends ht{domAtPos(t){let{topView:e,text:i}=this.widget;if(!e)return new W(i,Math.min(t,i.nodeValue.length));return ft(t,0,e,i,((t,e)=>t.domAtPos(e)),(t=>new W(i,Math.min(t,i.nodeValue.length))))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(t,e){let{topView:i,text:s}=this.widget;if(!i)return Math.min(e,this.length);return ct(t,e,i,s)}ignoreMutation(){return false}get overrideDOMText(){return null}coordsAt(t,e){let{topView:i,text:s}=this.widget;if(!i)return lt(s,t,e);return ft(t,e,i,s,((t,e,i)=>t.coordsAt(e,i)),((t,e)=>lt(s,t,e)))}destroy(){var t;super.destroy();(t=this.widget.topView)===null||t===void 0?void 0:t.destroy()}get isEditable(){return true}canReuseDOM(){return true}}function ft(t,e,i,s,n,r){if(i instanceof ot){for(let o=i.dom.firstChild;o;o=o.nextSibling){let i=z.get(o);if(!i)return r(t,e);let l=w(o,s);let h=i.length+(l?s.nodeValue.length:0);if(t<h||t==h&&i.getSide()<=0)return l?ft(t,e,i,s,n,r):n(i,t,e);t-=h}return n(i,i.length,-1)}else if(i.dom==s){return r(t,e)}else{return n(i,t,e)}}function ct(t,e,i,s){if(i instanceof ot){for(let n of i.children){let i=0,r=w(n.dom,s);if(w(n.dom,t))return i+(r?ct(t,e,n,s):n.localPosFromDOM(t,e));i+=r?s.nodeValue.length:n.length}}else if(i.dom==s){return Math.min(e,s.nodeValue.length)}return i.localPosFromDOM(t,e)}class ut extends z{constructor(t){super();this.side=t}get length(){return 0}merge(){return false}become(t){return t instanceof ut&&t.side==this.side}split(){return new ut(this.side)}sync(){if(!this.dom){let t=document.createElement("img");t.className="cm-widgetBuffer";t.setAttribute("aria-hidden","true");this.setDOM(t)}}getSide(){return this.side}domAtPos(t){return W.before(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){let e=this.dom.getBoundingClientRect();let i=dt(this,this.side>0?-1:1);return i&&i.top<e.bottom&&i.bottom>e.top?{left:e.left,right:e.right,top:i.top,bottom:i.bottom}:e}get overrideDOMText(){return s.xv.empty}}rt.prototype.children=ht.prototype.children=ut.prototype.children=F;function dt(t,e){let i=t.parent,s=i?i.children.indexOf(t):-1;while(i&&s>=0){if(e<0?s>0:s<i.children.length){let t=i.children[s+e];if(t instanceof rt){let i=t.coordsAt(e<0?t.length:0,e);if(i)return i}s+=e}else if(i instanceof ot&&i.parent){s=i.parent.children.indexOf(i)+(e<0?0:1);i=i.parent}else{let t=i.dom.lastChild;if(t&&t.nodeName=="BR")return t.getClientRects()[0];break}}return undefined}function pt(t,e){let i=t.dom,{children:s}=t,n=0;for(let r=0;n<s.length;n++){let t=s[n],o=r+t.length;if(o==r&&t.getSide()<=0)continue;if(e>r&&e<o&&t.dom.parentNode==i)return t.domAtPos(e-r);if(e<=r)break;r=o}for(let r=n;r>0;r--){let t=s[r-1];if(t.dom.parentNode==i)return t.domAtPos(t.length)}for(let r=n;r<s.length;r++){let t=s[r];if(t.dom.parentNode==i)return t.domAtPos(0)}return new W(i,0)}function gt(t,e,i){let s,{children:n}=t;if(i>0&&e instanceof ot&&n.length&&(s=n[n.length-1])instanceof ot&&s.mark.eq(e.mark)){gt(s,e.children[0],i-1)}else{n.push(e);e.setParent(t)}t.length+=e.length}function mt(t,e,i){let s=null,n=-1,r=null,o=-1;function l(t,e){for(let i=0,h=0;i<t.children.length&&h<=e;i++){let a=t.children[i],f=h+a.length;if(f>=e){if(a.children.length){l(a,e-h)}else if(!r&&(f>e||h==f&&a.getSide()>0)){r=a;o=e-h}else if(h<e||h==f&&a.getSide()<0){s=a;n=e-h}}h=f}}l(t,e);let h=(i<0?s:r)||s||r;if(h)return h.coordsAt(Math.max(0,h==s?n:o),i);return wt(t)}function wt(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let i=b(e);return i[i.length-1]||null}function vt(t,e){for(let i in t){if(i=="class"&&e.class)e.class+=" "+t.class;else if(i=="style"&&e.style)e.style+=";"+t.style;else e[i]=t[i]}return e}function yt(t,e){if(t==e)return true;if(!t||!e)return false;let i=Object.keys(t),s=Object.keys(e);if(i.length!=s.length)return false;for(let n of i){if(s.indexOf(n)==-1||t[n]!==e[n])return false}return true}function bt(t,e,i){let s=null;if(e)for(let n in e)if(!(i&&n in i))t.removeAttribute(s=n);if(i)for(let n in i)if(!(e&&e[n]==i[n]))t.setAttribute(s=n,i[n]);return!!s}class xt{eq(t){return false}updateDOM(t){return false}compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}get estimatedHeight(){return-1}ignoreEvent(t){return true}get customView(){return null}destroy(t){}}var St=function(t){t[t["Text"]=0]="Text";t[t["WidgetBefore"]=1]="WidgetBefore";t[t["WidgetAfter"]=2]="WidgetAfter";t[t["WidgetRange"]=3]="WidgetRange";return t}(St||(St={}));class kt extends s.uU{constructor(t,e,i,s){super();this.startSide=t;this.endSide=e;this.widget=i;this.spec=s}get heightRelevant(){return false}static mark(t){return new Mt(t)}static widget(t){let e=t.side||0,i=!!t.block;e+=i?e>0?3e8:-4e8:e>0?1e8:-1e8;return new At(t,e,e,i,t.widget||null,false)}static replace(t){let e=!!t.block,i,s;if(t.isBlockGap){i=-5e8;s=4e8}else{let{start:n,end:r}=Dt(t,e);i=(n?e?-3e8:-1:5e8)-1;s=(r?e?2e8:1:-6e8)+1}return new At(t,i,s,e,t.widget||null,true)}static line(t){return new Ct(t)}static set(t,e=false){return s.Xs.of(t,e)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:false}}kt.none=s.Xs.empty;class Mt extends kt{constructor(t){let{start:e,end:i}=Dt(t);super(e?-1:5e8,i?1:-6e8,null,t);this.tagName=t.tagName||"span";this.class=t.class||"";this.attrs=t.attributes||null}eq(t){return this==t||t instanceof Mt&&this.tagName==t.tagName&&this.class==t.class&&yt(this.attrs,t.attrs)}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}Mt.prototype.point=false;class Ct extends kt{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof Ct&&yt(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}Ct.prototype.mapMode=s.gc.TrackBefore;Ct.prototype.point=true;class At extends kt{constructor(t,e,i,n,r,o){super(e,i,r,t);this.block=n;this.isReplace=o;this.mapMode=!n?s.gc.TrackDel:e<=0?s.gc.TrackBefore:s.gc.TrackAfter}get type(){return this.startSide<this.endSide?St.WidgetRange:this.startSide<=0?St.WidgetBefore:St.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&this.widget.estimatedHeight>=5}eq(t){return t instanceof At&&Tt(this.widget,t.widget)&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}At.prototype.point=true;function Dt(t,e=false){let{inclusiveStart:i,inclusiveEnd:s}=t;if(i==null)i=t.inclusive;if(s==null)s=t.inclusive;return{start:i!==null&&i!==void 0?i:e,end:s!==null&&s!==void 0?s:e}}function Tt(t,e){return t==e||!!(t&&e&&t.compare(e))}function Ot(t,e,i,s=0){let n=i.length-1;if(n>=0&&i[n]+s>=t)i[n]=Math.max(i[n],e);else i.push(t,e)}class Et extends z{constructor(){super(...arguments);this.children=[];this.length=0;this.prevAttrs=undefined;this.attrs=null;this.breakAfter=0}merge(t,e,i,s,n,r){if(i){if(!(i instanceof Et))return false;if(!this.dom)i.transferDOM(this)}if(s)this.setDeco(i?i.attrs:null);K(this,t,e,i?i.children:[],n,r);return true}split(t){let e=new Et;e.breakAfter=this.breakAfter;if(this.length==0)return e;let{i,off:s}=this.childPos(t);if(s){e.append(this.children[i].split(s),0);this.children[i].merge(s,this.children[i].length,null,false,0,0);i++}for(let n=i;n<this.children.length;n++)e.append(this.children[n],0);while(i>0&&this.children[i-1].length==0)this.children[--i].destroy();this.children.length=i;this.markDirty();this.length=t;return e}transferDOM(t){if(!this.dom)return;this.markDirty();t.setDOM(this.dom);t.prevAttrs=this.prevAttrs===undefined?this.attrs:this.prevAttrs;this.prevAttrs=undefined;this.dom=null}setDeco(t){if(!yt(this.attrs,t)){if(this.dom){this.prevAttrs=this.attrs;this.markDirty()}this.attrs=t}}append(t,e){gt(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;if(e)this.attrs=vt(e,this.attrs||{});if(i)this.attrs=vt({class:i},this.attrs||{})}domAtPos(t){return pt(this,t)}reuseDOM(t){if(t.nodeName=="DIV"){this.setDOM(t);this.dirty|=4|2}}sync(t){var e;if(!this.dom){this.setDOM(document.createElement("div"));this.dom.className="cm-line";this.prevAttrs=this.attrs?null:undefined}else if(this.dirty&4){H(this.dom);this.dom.className="cm-line";this.prevAttrs=this.attrs?null:undefined}if(this.prevAttrs!==undefined){bt(this.dom,this.prevAttrs,this.attrs);this.dom.classList.add("cm-line");this.prevAttrs=undefined}super.sync(t);let i=this.dom.lastChild;while(i&&z.get(i)instanceof ot)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((e=z.get(i))===null||e===void 0?void 0:e.isEditable)==false&&(!st.ios||!this.children.some((t=>t instanceof rt)))){let t=document.createElement("BR");t.cmIgnore=true;this.dom.appendChild(t)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let t=0;for(let e of this.children){if(!(e instanceof rt)||/[^ -~]/.test(e.text))return null;let i=b(e.dom);if(i.length!=1)return null;t+=i[0].width}return!t?null:{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length}}coordsAt(t,e){return mt(this,t,e)}become(t){return false}get type(){return St.Text}static find(t,e){for(let i=0,s=0;i<t.children.length;i++){let n=t.children[i],r=s+n.length;if(r>=e){if(n instanceof Et)return n;if(r>e)break}s=r+n.breakAfter}return null}}class Rt extends z{constructor(t,e,i){super();this.widget=t;this.length=e;this.type=i;this.breakAfter=0;this.prevWidget=null}merge(t,e,i,s,n,r){if(i&&(!(i instanceof Rt)||!this.widget.compare(i.widget)||t>0&&n<=0||e<this.length&&r<=0))return false;this.length=t+(i?i.length:0)+(this.length-e);return true}domAtPos(t){return t==0?W.before(this.dom):W.after(this.dom,t==this.length)}split(t){let e=this.length-t;this.length=t;let i=new Rt(this.widget,e,this.type);i.breakAfter=this.breakAfter;return i}get children(){return F}sync(){if(!this.dom||!this.widget.updateDOM(this.dom)){if(this.dom&&this.prevWidget)this.prevWidget.destroy(this.dom);this.prevWidget=null;this.setDOM(this.widget.toDOM(this.editorView));this.dom.contentEditable="false"}}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):s.xv.empty}domBoundsAround(){return null}become(t){if(t instanceof Rt&&t.type==this.type&&t.widget.constructor==this.widget.constructor){if(!t.widget.eq(this.widget))this.markDirty(true);if(this.dom&&!this.prevWidget)this.prevWidget=this.widget;this.widget=t.widget;this.length=t.length;this.breakAfter=t.breakAfter;return true}return false}ignoreMutation(){return true}ignoreEvent(t){return this.widget.ignoreEvent(t)}destroy(){super.destroy();if(this.dom)this.widget.destroy(this.dom)}}class Bt{constructor(t,e,i,s){this.doc=t;this.pos=e;this.end=i;this.disallowBlockEffectsFor=s;this.content=[];this.curLine=null;this.breakAtStart=0;this.pendingBuffer=0;this.bufferMarks=[];this.atCursorPos=true;this.openStart=-1;this.openEnd=-1;this.text="";this.textOff=0;this.cursor=t.iter();this.skip=e}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!t.breakAfter&&!(t instanceof Rt&&t.type==St.WidgetBefore)}getLine(){if(!this.curLine){this.content.push(this.curLine=new Et);this.atCursorPos=true}return this.curLine}flushBuffer(t=this.bufferMarks){if(this.pendingBuffer){this.curLine.append(Lt(new ut(-1),t),t.length);this.pendingBuffer=0}}addBlockWidget(t){this.flushBuffer();this.curLine=null;this.content.push(t)}finish(t){if(this.pendingBuffer&&t<=this.bufferMarks.length)this.flushBuffer();else this.pendingBuffer=0;if(!this.posCovered())this.getLine()}buildText(t,e,i){while(t>0){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:s}=this.cursor.next(this.skip);this.skip=0;if(s)throw new Error("Ran out of text content when drawing inline views");if(i){if(!this.posCovered())this.getLine();if(this.content.length)this.content[this.content.length-1].breakAfter=1;else this.breakAtStart=1;this.flushBuffer();this.curLine=null;this.atCursorPos=true;t--;continue}else{this.text=e;this.textOff=0}}let s=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-i));this.getLine().append(Lt(new rt(this.text.slice(this.textOff,this.textOff+s)),e),i);this.atCursorPos=true;this.textOff+=s;t-=s;i=0}}span(t,e,i,s){this.buildText(e-t,i,s);this.pos=e;if(this.openStart<0)this.openStart=s}point(t,e,i,s,n,r){if(this.disallowBlockEffectsFor[r]&&i instanceof At){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let o=e-t;if(i instanceof At){if(i.block){let{type:t}=i;if(t==St.WidgetAfter&&!this.posCovered())this.getLine();this.addBlockWidget(new Rt(i.widget||new Pt("div"),o,t))}else{let r=ht.create(i.widget||new Pt("span"),o,o?0:i.startSide);let l=this.atCursorPos&&!r.isEditable&&n<=s.length&&(t<e||i.startSide>0);let h=!r.isEditable&&(t<e||n>s.length||i.startSide<=0);let a=this.getLine();if(this.pendingBuffer==2&&!l)this.pendingBuffer=0;this.flushBuffer(s);if(l){a.append(Lt(new ut(1),s),n);n=s.length+Math.max(0,n-s.length)}a.append(Lt(r,s),n);this.atCursorPos=h;this.pendingBuffer=!h?0:t<e||n>s.length?1:2;if(this.pendingBuffer)this.bufferMarks=s.slice()}}else if(this.doc.lineAt(this.pos).from==this.pos){this.getLine().addLineDeco(i)}if(o){if(this.textOff+o<=this.text.length){this.textOff+=o}else{this.skip+=o-(this.text.length-this.textOff);this.text="";this.textOff=0}this.pos=e}if(this.openStart<0)this.openStart=n}static build(t,e,i,n,r){let o=new Bt(t,e,i,r);o.openEnd=s.Xs.spans(n,e,i,o);if(o.openStart<0)o.openStart=o.openEnd;o.finish(o.openEnd);return o}}function Lt(t,e){for(let i of e)t=new ot(i,[t],t.length);return t}class Pt extends xt{constructor(t){super();this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}}const Nt=s.r$.define();const Vt=s.r$.define();const Ht=s.r$.define();const It=s.r$.define();const Wt=s.r$.define();const Ft=s.r$.define();const zt=s.r$.define({combine:t=>t.some((t=>t))});const qt=s.r$.define({combine:t=>t.some((t=>t))});class jt{constructor(t,e="nearest",i="nearest",s=5,n=5){this.range=t;this.y=e;this.x=i;this.yMargin=s;this.xMargin=n}map(t){return t.empty?this:new jt(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin)}}const $t=s.Py.define({map:(t,e)=>t.map(e)});function Kt(t,e,i){let s=t.facet(It);if(s.length)s[0](e);else if(window.onerror)window.onerror(String(e),i,undefined,undefined,e);else if(i)console.error(i+":",e);else console.error(e)}const Gt=s.r$.define({combine:t=>t.length?t[0]:true});let _t=0;const Xt=s.r$.define();class Ut{constructor(t,e,i,s){this.id=t;this.create=e;this.domEventHandlers=i;this.extension=s(this)}static define(t,e){const{eventHandlers:i,provide:s,decorations:n}=e||{};return new Ut(_t++,t,i,(t=>{let e=[Xt.of(t)];if(n)e.push(Zt.of((e=>{let i=e.plugin(t);return i?n(i):kt.none})));if(s)e.push(s(t));return e}))}static fromClass(t,e){return Ut.define((e=>new t(e)),e)}}class Jt{constructor(t){this.spec=t;this.mustUpdate=null;this.value=null}update(t){if(!this.value){if(this.spec){try{this.value=this.spec.create(t)}catch(e){Kt(t.state,e,"CodeMirror plugin crashed");this.deactivate()}}}else if(this.mustUpdate){let t=this.mustUpdate;this.mustUpdate=null;if(this.value.update){try{this.value.update(t)}catch(e){Kt(t.state,e,"CodeMirror plugin crashed");if(this.value.destroy)try{this.value.destroy()}catch(i){}this.deactivate()}}}return this}destroy(t){var e;if((e=this.value)===null||e===void 0?void 0:e.destroy){try{this.value.destroy()}catch(i){Kt(t.state,i,"CodeMirror plugin crashed")}}}deactivate(){this.spec=this.value=null}}const Yt=s.r$.define();const Qt=s.r$.define();const Zt=s.r$.define();const te=s.r$.define();const ee=s.r$.define();const ie=s.r$.define();class se{constructor(t,e,i,s){this.fromA=t;this.toA=e;this.fromB=i;this.toB=s}join(t){return new se(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let s=t[e-1];if(s.fromA>i.toA)continue;if(s.toA<i.fromA)break;i=i.join(s);t.splice(e-1,1)}t.splice(e,0,i);return t}static extendWithRanges(t,e){if(e.length==0)return t;let i=[];for(let s=0,n=0,r=0,o=0;;s++){let l=s==t.length?null:t[s],h=r-o;let a=l?l.fromB:1e9;while(n<e.length&&e[n]<a){let t=e[n],s=e[n+1];let r=Math.max(o,t),l=Math.min(a,s);if(r<=l)new se(r+h,l+h,r,l).addToSet(i);if(s>a)break;else n+=2}if(!l)return i;new se(l.fromA,l.toA,l.fromB,l.toB).addToSet(i);r=l.toA;o=l.toB}}}class ne{constructor(t,e,i){this.view=t;this.state=e;this.transactions=i;this.flags=0;this.startState=t.state;this.changes=s.as.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let n=[];this.changes.iterChangedRanges(((t,e,i,s)=>n.push(new se(t,e,i,s))));this.changedRanges=n;let r=t.hasFocus;if(r!=t.inputState.notifiedFocused){t.inputState.notifiedFocused=r;this.flags|=1}}static create(t,e,i){return new ne(t,e,i)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&(8|2))>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return this.flags==0&&this.transactions.length==0}}var re=function(t){t[t["LTR"]=0]="LTR";t[t["RTL"]=1]="RTL";return t}(re||(re={}));const oe=re.LTR,le=re.RTL;function he(t){let e=[];for(let i=0;i<t.length;i++)e.push(1<<+t[i]);return e}const ae=he("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008");const fe=he("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333");const ce=Object.create(null),ue=[];for(let Xr of["()","[]","{}"]){let t=Xr.charCodeAt(0),e=Xr.charCodeAt(1);ce[t]=e;ce[e]=-t}function de(t){return t<=247?ae[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?fe[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8203?256:64336<=t&&t<=65023?4:t==8204?256:1}const pe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ge{constructor(t,e,i){this.from=t;this.to=e;this.level=i}get dir(){return this.level%2?le:oe}side(t,e){return this.dir==e==t?this.to:this.from}static find(t,e,i,s){let n=-1;for(let r=0;r<t.length;r++){let o=t[r];if(o.from<=e&&o.to>=e){if(o.level==i)return r;if(n<0||(s!=0?s<0?o.from<e:o.to>e:t[n].level>o.level))n=r}}if(n<0)throw new RangeError("Index out of range");return n}}const me=[];function we(t,e){let i=t.length,s=e==oe?1:2,n=e==oe?2:1;if(!t||s==1&&!pe.test(t))return ve(i);for(let o=0,l=s,h=s;o<i;o++){let e=de(t.charCodeAt(o));if(e==512)e=l;else if(e==8&&h==4)e=16;me[o]=e==4?2:e;if(e&7)h=e;l=e}for(let o=0,l=s,h=s;o<i;o++){let t=me[o];if(t==128){if(o<i-1&&l==me[o+1]&&l&24)t=me[o]=l;else me[o]=256}else if(t==64){let t=o+1;while(t<i&&me[t]==64)t++;let e=o&&l==8||t<i&&me[t]==8?h==1?1:8:256;for(let i=o;i<t;i++)me[i]=e;o=t-1}else if(t==8&&h==1){me[o]=1}l=t;if(t&7)h=t}for(let o=0,l=0,h=0,a,f,c;o<i;o++){if(f=ce[a=t.charCodeAt(o)]){if(f<0){for(let t=l-3;t>=0;t-=3){if(ue[t+1]==-f){let e=ue[t+2];let i=e&2?s:!(e&4)?0:e&1?n:s;if(i)me[o]=me[ue[t]]=i;l=t;break}}}else if(ue.length==189){break}else{ue[l++]=o;ue[l++]=a;ue[l++]=h}}else if((c=me[o])==2||c==1){let t=c==s;h=t?0:1;for(let e=l-3;e>=0;e-=3){let i=ue[e+2];if(i&2)break;if(t){ue[e+2]|=2}else{if(i&4)break;ue[e+2]|=4}}}}for(let o=0;o<i;o++){if(me[o]==256){let t=o+1;while(t<i&&me[t]==256)t++;let e=(o?me[o-1]:s)==1;let n=(t<i?me[t]:s)==1;let r=e==n?e?1:2:s;for(let i=o;i<t;i++)me[i]=r;o=t-1}}let r=[];if(s==1){for(let t=0;t<i;){let e=t,s=me[t++]!=1;while(t<i&&s==(me[t]!=1))t++;if(s){for(let i=t;i>e;){let t=i,s=me[--i]!=2;while(i>e&&s==(me[i-1]!=2))i--;r.push(new ge(i,t,s?2:1))}}else{r.push(new ge(e,t,0))}}}else{for(let t=0;t<i;){let e=t,s=me[t++]==2;while(t<i&&s==(me[t]==2))t++;r.push(new ge(e,t,s?1:2))}}return r}function ve(t){return[new ge(0,t,0)]}let ye="";function be(t,e,i,n,r){var o;let l=n.head-t.from,h=-1;if(l==0){if(!r||!t.length)return null;if(e[0].level!=i){l=e[0].side(false,i);h=0}}else if(l==t.length){if(r)return null;let t=e[e.length-1];if(t.level!=i){l=t.side(true,i);h=e.length-1}}if(h<0)h=ge.find(e,l,(o=n.bidiLevel)!==null&&o!==void 0?o:-1,n.assoc);let a=e[h];if(l==a.side(r,i)){a=e[h+=r?1:-1];l=a.side(!r,i)}let f=r==(a.dir==i);let c=(0,s.cp)(t.text,l,f);ye=t.text.slice(Math.min(l,c),Math.max(l,c));if(c!=a.side(r,i))return s.jT.cursor(c+t.from,f?-1:1,a.level);let u=h==(r?e.length-1:0)?null:e[h+(r?1:-1)];if(!u&&a.level!=i)return s.jT.cursor(r?t.to:t.from,r?-1:1,i);if(u&&u.level<a.level)return s.jT.cursor(u.side(!r,i)+t.from,r?1:-1,u.level);return s.jT.cursor(c+t.from,r?-1:1,a.level)}const xe="";class Se{constructor(t,e){this.points=t;this.text="";this.lineSeparator=e.facet(s.yy.lineSeparator)}append(t){this.text+=t}lineBreak(){this.text+=xe}readRange(t,e){if(!t)return this;let i=t.parentNode;for(let s=t;;){this.findPointBefore(i,s);this.readNode(s);let t=s.nextSibling;if(t==e)break;let n=z.get(s),r=z.get(t);if(n&&r?n.breakAfter:(n?n.breakAfter:ke(s))||ke(t)&&(s.nodeName!="BR"||s.cmIgnore))this.lineBreak();s=t}this.findPointBefore(i,e);return this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)if(i.node==t)i.pos=this.text.length+Math.min(i.offset,e.length);for(let i=0,s=this.lineSeparator?null:/\r\n?|\n/g;;){let n=-1,r=1,o;if(this.lineSeparator){n=e.indexOf(this.lineSeparator,i);r=this.lineSeparator.length}else if(o=s.exec(e)){n=o.index;r=o[0].length}this.append(e.slice(i,n<0?e.length:n));if(n<0)break;this.lineBreak();if(r>1)for(let e of this.points)if(e.node==t&&e.pos>this.text.length)e.pos-=r-1;i=n+r}}readNode(t){if(t.cmIgnore)return;let e=z.get(t);let i=e&&e.overrideDOMText;if(i!=null){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;){if(t.lineBreak)this.lineBreak();else this.append(t.value)}}else if(t.nodeType==3){this.readTextNode(t)}else if(t.nodeName=="BR"){if(t.nextSibling)this.lineBreak()}else if(t.nodeType==1){this.readRange(t.firstChild,null)}}findPointBefore(t,e){for(let i of this.points)if(i.node==t&&t.childNodes[i.offset]==e)i.pos=this.text.length}findPointInside(t,e){for(let i of this.points)if(t.nodeType==3?i.node==t:t.contains(i.node))i.pos=this.text.length+Math.min(e,i.offset)}}function ke(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}class Me{constructor(t,e){this.node=t;this.offset=e;this.pos=-1}}class Ce extends z{constructor(t){super();this.view=t;this.compositionDeco=kt.none;this.decorations=[];this.dynamicDecorationMap=[];this.minWidth=0;this.minWidthFrom=0;this.minWidthTo=0;this.impreciseAnchor=null;this.impreciseHead=null;this.forceSelection=false;this.lastUpdate=Date.now();this.setDOM(t.contentDOM);this.children=[new Et];this.children[0].setParent(this);this.updateDeco();this.updateInner([new se(0,0,0,t.state.doc.length)],0)}get editorView(){return this.view}get length(){return this.view.state.doc.length}update(t){let e=t.changedRanges;if(this.minWidth>0&&e.length){if(!e.every((({fromA:t,toA:e})=>e<this.minWidthFrom||t>this.minWidthTo))){this.minWidth=this.minWidthFrom=this.minWidthTo=0}else{this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1);this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)}}if(this.view.inputState.composing<0)this.compositionDeco=kt.none;else if(t.transactions.length||this.dirty)this.compositionDeco=Oe(this.view,t.changes);if((st.ie||st.chrome)&&!this.compositionDeco.size&&t&&t.state.doc.lines!=t.startState.doc.lines)this.forceSelection=true;let i=this.decorations,s=this.updateDeco();let n=Pe(i,s,t.changes);e=se.extendWithRanges(e,n);if(this.dirty==0&&e.length==0){return false}else{this.updateInner(e,t.startState.doc.length);if(t.transactions.length)this.lastUpdate=Date.now();return true}}updateInner(t,e){this.view.viewState.mustMeasureContent=true;this.updateChildren(t,e);let{observer:i}=this.view;i.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight+"px";this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=st.chrome||st.ios?{node:i.selectionRange.focusNode,written:false}:undefined;this.sync(t);this.dirty=0;if(t&&(t.written||i.selectionRange.focusNode!=t.node))this.forceSelection=true;this.dom.style.height=""}));let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let n of this.children)if(n instanceof Rt&&n.widget instanceof De)s.push(n.dom);i.updateGaps(s)}updateChildren(t,e){let i=this.childCursor(e);for(let s=t.length-1;;s--){let e=s>=0?t[s]:null;if(!e)break;let{fromA:n,toA:r,fromB:o,toB:l}=e;let{content:h,breakAtStart:a,openStart:f,openEnd:c}=Bt.build(this.view.state.doc,o,l,this.decorations,this.dynamicDecorationMap);let{i:u,off:d}=i.findPos(r,1);let{i:p,off:g}=i.findPos(n,-1);$(this,p,g,u,d,h,a,f,c)}}updateSelection(t=false,e=false){if(t||!this.view.observer.selectionRange.focusNode)this.view.observer.readSelectionRange();if(!(e||this.mayControlSelection()))return;let i=this.forceSelection;this.forceSelection=false;let s=this.view.state.selection.main;let n=this.domAtPos(s.anchor);let r=s.empty?n:this.domAtPos(s.head);if(st.gecko&&s.empty&&Ae(n)){let t=document.createTextNode("");this.view.observer.ignore((()=>n.node.insertBefore(t,n.node.childNodes[n.offset]||null)));n=r=new W(t,0);i=true}let o=this.view.observer.selectionRange;if(i||!o.focusNode||!x(n.node,n.offset,o.anchorNode,o.anchorOffset)||!x(r.node,r.offset,o.focusNode,o.focusOffset)){this.view.observer.ignore((()=>{if(st.android&&st.chrome&&this.dom.contains(o.focusNode)&&Ne(o.focusNode,this.dom)){this.dom.blur();this.dom.focus({preventScroll:true})}let t=m(this.view.root);if(!t);else if(s.empty){if(st.gecko){let t=Be(n.node,n.offset);if(t&&t!=(1|2)){let e=Re(n.node,n.offset,t==1?1:-1);if(e)n=new W(e,t==1?0:e.nodeValue.length)}}t.collapse(n.node,n.offset);if(s.bidiLevel!=null&&o.cursorBidiLevel!=null)o.cursorBidiLevel=s.bidiLevel}else if(t.extend){t.collapse(n.node,n.offset);try{t.extend(r.node,r.offset)}catch(e){}}else{let e=document.createRange();if(s.anchor>s.head)[n,r]=[r,n];e.setEnd(r.node,r.offset);e.setStart(n.node,n.offset);t.removeAllRanges();t.addRange(e)}}));this.view.observer.setSelectionRange(n,r)}this.impreciseAnchor=n.precise?null:new W(o.anchorNode,o.anchorOffset);this.impreciseHead=r.precise?null:new W(o.focusNode,o.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:t}=this,e=t.state.selection.main;let i=m(t.root);let{anchorNode:s,anchorOffset:n}=t.observer.selectionRange;if(!i||!e.empty||!e.assoc||!i.modify)return;let r=Et.find(this,e.head);if(!r)return;let o=r.posAtStart;if(e.head==o||e.head==o+r.length)return;let l=this.coordsAt(e.head,-1),h=this.coordsAt(e.head,1);if(!l||!h||l.bottom>h.top)return;let a=this.domAtPos(e.head+e.assoc);i.collapse(a.node,a.offset);i.modify("move",e.assoc<0?"forward":"backward","lineboundary");t.observer.readSelectionRange();let f=t.observer.selectionRange;if(t.docView.posFromDOM(f.anchorNode,f.anchorOffset)!=e.from)i.collapse(s,n)}mayControlSelection(){let t=this.view.root.activeElement;return t==this.dom||y(this.dom,this.view.observer.selectionRange)&&!(t&&this.dom.contains(t))}nearest(t){for(let e=t;e;){let t=z.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;e<this.children.length-1;){let t=this.children[e];if(i<t.length||t instanceof Et)break;e++;i=0}return this.children[e].domAtPos(i)}coordsAt(t,e){for(let i=this.length,s=this.children.length-1;;s--){let n=this.children[s],r=i-n.breakAfter-n.length;if(t>r||t==r&&n.type!=St.WidgetBefore&&n.type!=St.WidgetAfter&&(!s||e==2||this.children[s-1].breakAfter||this.children[s-1].type==St.WidgetBefore&&e>-2))return n.coordsAt(t-r,e);i=r}}measureVisibleLineHeights(t){let e=[],{from:i,to:s}=t;let n=this.view.contentDOM.clientWidth;let r=n>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1;let o=-1,l=this.view.textDirection==re.LTR;for(let h=0,a=0;a<this.children.length;a++){let t=this.children[a],f=h+t.length;if(f>s)break;if(h>=i){let i=t.dom.getBoundingClientRect();e.push(i.height);if(r){let e=t.dom.lastChild;let s=e?b(e):[];if(s.length){let t=s[s.length-1];let e=l?t.right-i.left:i.right-t.left;if(e>o){o=e;this.minWidth=n;this.minWidthFrom=h;this.minWidthTo=f}}}}h=f+t.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return getComputedStyle(this.children[e].dom).direction=="rtl"?re.RTL:re.LTR}measureTextSize(){for(let s of this.children){if(s instanceof Et){let t=s.measureTextSize();if(t)return t}}let t=document.createElement("div"),e,i;t.className="cm-line";t.style.width="99999px";t.textContent="abc def ghi jkl mno pqr stu";this.view.observer.ignore((()=>{this.dom.appendChild(t);let s=b(t.firstChild)[0];e=t.getBoundingClientRect().height;i=s?s.width/27:7;t.remove()}));return{lineHeight:e,charWidth:i}}childCursor(t=this.length){let e=this.children.length;if(e)t-=this.children[--e].length;return new j(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,s=0;;s++){let n=s==e.viewports.length?null:e.viewports[s];let r=n?n.from-1:this.length;if(r>i){let s=e.lineBlockAt(r).bottom-e.lineBlockAt(i).top;t.push(kt.replace({widget:new De(s),block:true,inclusive:true,isBlockGap:true}).range(i,r))}if(!n)break;i=n.to+1}return kt.set(t)}updateDeco(){let t=this.view.state.facet(Zt).map(((t,e)=>{let i=this.dynamicDecorationMap[e]=typeof t=="function";return i?t(this.view):t}));for(let e=t.length;e<t.length+3;e++)this.dynamicDecorationMap[e]=false;return this.decorations=[...t,this.compositionDeco,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco]}scrollIntoView(t){let{range:e}=t;let i=this.coordsAt(e.head,e.empty?e.assoc:e.head>e.anchor?-1:1),s;if(!i)return;if(!e.empty&&(s=this.coordsAt(e.anchor,e.anchor>e.head?-1:1)))i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)};let n=0,r=0,o=0,l=0;for(let a of this.view.state.facet(ee).map((t=>t(this.view))))if(a){let{left:t,right:e,top:i,bottom:s}=a;if(t!=null)n=Math.max(n,t);if(e!=null)r=Math.max(r,e);if(i!=null)o=Math.max(o,i);if(s!=null)l=Math.max(l,s)}let h={left:i.left-n,top:i.top-o,right:i.right+r,bottom:i.bottom+l};T(this.view.scrollDOM,h,e.head<e.anchor?-1:1,t.x,t.y,t.xMargin,t.yMargin,this.view.textDirection==re.LTR)}}function Ae(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}class De extends xt{constructor(t){super();this.height=t}toDOM(){let t=document.createElement("div");this.updateDOM(t);return t}eq(t){return t.height==this.height}updateDOM(t){t.style.height=this.height+"px";return true}get estimatedHeight(){return this.height}}function Te(t){let e=t.observer.selectionRange;let i=e.focusNode&&Re(e.focusNode,e.focusOffset,0);if(!i)return null;let s=t.docView.nearest(i);if(!s)return null;if(s instanceof Et){let t=i;while(t.parentNode!=s.dom)t=t.parentNode;let e=t.previousSibling;while(e&&!z.get(e))e=e.previousSibling;let n=e?z.get(e).posAtEnd:s.posAtStart;return{from:n,to:n,node:t,text:i}}else{for(;;){let{parent:t}=s;if(!t)return null;if(t instanceof Et)break;s=t}let t=s.posAtStart;return{from:t,to:t+s.length,node:s.dom,text:i}}}function Oe(t,e){let i=Te(t);if(!i)return kt.none;let{from:s,to:n,node:r,text:o}=i;let l=e.mapPos(s,1),h=Math.max(l,e.mapPos(n,-1));let{state:a}=t,f=r.nodeType==3?r.nodeValue:new Se([],a).readRange(r.firstChild,null).text;if(h-l<f.length){if(a.doc.sliceString(l,Math.min(a.doc.length,l+f.length),xe)==f)h=l+f.length;else if(a.doc.sliceString(Math.max(0,h-f.length),h,xe)==f)l=h-f.length;else return kt.none}else if(a.doc.sliceString(l,h,xe)!=f){return kt.none}let c=z.get(r);if(c instanceof at)c=c.widget.topView;else if(c)c.parent=null;return kt.set(kt.replace({widget:new Ee(r,o,c),inclusive:true}).range(l,h))}class Ee extends xt{constructor(t,e,i){super();this.top=t;this.text=e;this.topView=i}eq(t){return this.top==t.top&&this.text==t.text}toDOM(){return this.top}ignoreEvent(){return false}get customView(){return at}}function Re(t,e,i){for(;;){if(t.nodeType==3)return t;if(t.nodeType==1&&e>0&&i<=0){t=t.childNodes[e-1];e=M(t)}else if(t.nodeType==1&&e<t.childNodes.length&&i>=0){t=t.childNodes[e];e=0}else{return null}}}function Be(t,e){if(t.nodeType!=1)return 0;return(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}class Le{constructor(){this.changes=[]}compareRange(t,e){Ot(t,e,this.changes)}comparePoint(t,e){Ot(t,e,this.changes)}}function Pe(t,e,i){let n=new Le;s.Xs.compare(t,e,i,n);return n.changes}function Ne(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode){if(i.nodeType==1&&i.contentEditable=="false"){return true}}return false}function Ve(t,e,i=1){let n=t.charCategorizer(e);let r=t.doc.lineAt(e),o=e-r.from;if(r.length==0)return s.jT.cursor(e);if(o==0)i=1;else if(o==r.length)i=-1;let l=o,h=o;if(i<0)l=(0,s.cp)(r.text,o,false);else h=(0,s.cp)(r.text,o);let a=n(r.text.slice(l,h));while(l>0){let t=(0,s.cp)(r.text,l,false);if(n(r.text.slice(t,l))!=a)break;l=t}while(h<r.length){let t=(0,s.cp)(r.text,h);if(n(r.text.slice(h,t))!=a)break;h=t}return s.jT.range(l+r.from,h+r.from)}function He(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function Ie(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function We(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function Fe(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function ze(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function qe(t,e,i){let s,n,r,o,l=false;let h,a,f,c;for(let p=t.firstChild;p;p=p.nextSibling){let t=b(p);for(let u=0;u<t.length;u++){let d=t[u];if(n&&We(n,d))d=Fe(ze(d,n.bottom),n.top);let g=He(e,d),m=Ie(i,d);if(g==0&&m==0)return p.nodeType==3?je(p,e,i):qe(p,e,i);if(!s||o>m||o==m&&r>g){s=p;n=d;r=g;o=m;l=!g||(g>0?u<t.length-1:u>0)}if(g==0){if(i>d.bottom&&(!f||f.bottom<d.bottom)){h=p;f=d}else if(i<d.top&&(!c||c.top>d.top)){a=p;c=d}}else if(f&&We(f,d)){f=ze(f,d.bottom)}else if(c&&We(c,d)){c=Fe(c,d.top)}}}if(f&&f.bottom>=i){s=h;n=f}else if(c&&c.top<=i){s=a;n=c}if(!s)return{node:t,offset:0};let u=Math.max(n.left,Math.min(n.right,e));if(s.nodeType==3)return je(s,u,i);if(l&&s.contentEditable!="false")return qe(s,u,i);let d=Array.prototype.indexOf.call(t.childNodes,s)+(e>=(n.left+n.right)/2?1:0);return{node:t,offset:d}}function je(t,e,i){let s=t.nodeValue.length;let n=-1,r=1e9,o=0;for(let l=0;l<s;l++){let s=P(t,l,l+1).getClientRects();for(let h=0;h<s.length;h++){let a=s[h];if(a.top==a.bottom)continue;if(!o)o=e-a.left;let f=(a.top>i?a.top-i:i-a.bottom)-1;if(a.left-1<=e&&a.right+1>=e&&f<r){let i=e>=(a.left+a.right)/2,s=i;if(st.chrome||st.gecko){let e=P(t,l).getBoundingClientRect();if(e.left==a.right)s=!i}if(f<=0)return{node:t,offset:l+(s?1:0)};n=l+(s?1:0);r=f}}}return{node:t,offset:n>-1?n:o>0?t.nodeValue.length:0}}function $e(t,{x:e,y:i},s,n=-1){var r;let o=t.contentDOM.getBoundingClientRect(),l=o.top+t.viewState.paddingTop;let h,{docHeight:a}=t.viewState;let f=i-l;if(f<0)return 0;if(f>a)return t.state.doc.length;for(let w=t.defaultLineHeight/2,v=false;;){h=t.elementAtHeight(f);if(h.type==St.Text)break;for(;;){f=n>0?h.bottom+w:h.top-w;if(f>=0&&f<=a)break;if(v)return s?null:0;v=true;n=-n}}i=l+f;let c=h.from;if(c<t.viewport.from)return t.viewport.from==0?0:s?null:Ke(t,o,h,e,i);if(c>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:s?null:Ke(t,o,h,e,i);let u=t.dom.ownerDocument;let d=t.root.elementFromPoint?t.root:u;let p=d.elementFromPoint(e,i);if(p&&!t.contentDOM.contains(p))p=null;if(!p){e=Math.max(o.left+1,Math.min(o.right-1,e));p=d.elementFromPoint(e,i);if(p&&!t.contentDOM.contains(p))p=null}let g,m=-1;if(p&&((r=t.docView.nearest(p))===null||r===void 0?void 0:r.isEditable)!=false){if(u.caretPositionFromPoint){let t=u.caretPositionFromPoint(e,i);if(t)({offsetNode:g,offset:m}=t)}else if(u.caretRangeFromPoint){let s=u.caretRangeFromPoint(e,i);if(s){({startContainer:g,startOffset:m}=s);if(!t.contentDOM.contains(g)||st.safari&&Ge(g,m,e)||st.chrome&&_e(g,m,e))g=undefined}}}if(!g||!t.docView.dom.contains(g)){let s=Et.find(t.docView,c);if(!s)return f>h.top+h.height/2?h.to:h.from;({node:g,offset:m}=qe(s.dom,e,i))}return t.docView.posFromDOM(g,m)}function Ke(t,e,i,n,r){let o=Math.round((n-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&i.height>t.defaultLineHeight*1.5){let e=Math.floor((r-i.top)/t.defaultLineHeight);o+=e*t.viewState.heightOracle.lineLength}let l=t.state.sliceDoc(i.from,i.to);return i.from+(0,s.Gz)(l,o,t.state.tabSize)}function Ge(t,e,i){let s;if(t.nodeType!=3||e!=(s=t.nodeValue.length))return false;for(let n=t.nextSibling;n;n=n.nextSibling)if(n.nodeType!=1||n.nodeName!="BR")return false;return P(t,s-1,s).getBoundingClientRect().left>i}function _e(t,e,i){if(e!=0)return false;for(let n=t;;){let t=n.parentNode;if(!t||t.nodeType!=1||t.firstChild!=n)return false;if(t.classList.contains("cm-line"))break;n=t}let s=t.nodeType==1?t.getBoundingClientRect():P(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return i-s.left>5}function Xe(t,e,i,n){let r=t.state.doc.lineAt(e.head);let o=!n||!t.lineWrapping?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(o){let e=t.dom.getBoundingClientRect();let n=t.textDirectionAt(r.from);let l=t.posAtCoords({x:i==(n==re.LTR)?e.right-1:e.left+1,y:(o.top+o.bottom)/2});if(l!=null)return s.jT.cursor(l,i?-1:1)}let l=Et.find(t.docView,e.head);let h=l?i?l.posAtEnd:l.posAtStart:i?r.to:r.from;return s.jT.cursor(h,i?-1:1)}function Ue(t,e,i,n){let r=t.state.doc.lineAt(e.head),o=t.bidiSpans(r);let l=t.textDirectionAt(r.from);for(let h=e,a=null;;){let e=be(r,o,l,h,i),f=ye;if(!e){if(r.number==(i?t.state.doc.lines:1))return h;f="\n";r=t.state.doc.line(r.number+(i?1:-1));o=t.bidiSpans(r);e=s.jT.cursor(i?r.from:r.to)}if(!a){if(!n)return e;a=n(f)}else if(!a(f)){return h}h=e}}function Je(t,e,i){let n=t.state.charCategorizer(e);let r=n(i);return t=>{let e=n(t);if(r==s.D0.Space)r=e;return r==e}}function Ye(t,e,i,n){let r=e.head,o=i?1:-1;if(r==(i?t.state.doc.length:0))return s.jT.cursor(r,e.assoc);let l=e.goalColumn,h;let a=t.contentDOM.getBoundingClientRect();let f=t.coordsAtPos(r),c=t.documentTop;if(f){if(l==null)l=f.left-a.left;h=o<0?f.top:f.bottom}else{let e=t.viewState.lineBlockAt(r);if(l==null)l=Math.min(a.right-a.left,t.defaultCharacterWidth*(r-e.from));h=(o<0?e.top:e.bottom)+c}let u=a.left+l;let d=n!==null&&n!==void 0?n:t.defaultLineHeight>>1;for(let p=0;;p+=10){let i=h+(d+p)*o;let n=$e(t,{x:u,y:i},false,o);if(i<a.top||i>a.bottom||(o<0?n<r:n>r))return s.jT.cursor(n,e.assoc,undefined,l)}}function Qe(t,e,i){let n=t.state.facet(te).map((e=>e(t)));for(;;){let t=false;for(let r of n){r.between(i.from-1,i.from+1,((n,r,o)=>{if(i.from>n&&i.from<r){i=e.head>i.from?s.jT.cursor(n,1):s.jT.cursor(r,-1);t=true}}))}if(!t)return i}}class Ze{constructor(t){this.lastKeyCode=0;this.lastKeyTime=0;this.lastTouchTime=0;this.lastFocusTime=0;this.lastScrollTop=0;this.lastScrollLeft=0;this.chromeScrollHack=-1;this.pendingIOSKey=undefined;this.lastSelectionOrigin=null;this.lastSelectionTime=0;this.lastEscPress=0;this.lastContextMenu=0;this.scrollHandlers=[];this.registeredEvents=[];this.customHandlers=[];this.composing=-1;this.compositionFirstChange=null;this.compositionEndedAt=0;this.mouseSelection=null;let e=(e,i)=>{if(this.ignoreDuringComposition(i))return;if(i.type=="keydown"&&this.keydown(t,i))return;if(this.mustFlushObserver(i))t.observer.forceFlush();if(this.runCustomHandlers(i.type,t,i))i.preventDefault();else e(t,i)};for(let i in ai){let s=ai[i];t.contentDOM.addEventListener(i,(i=>{if(hi(t,i))e(s,i)}),fi[i]);this.registeredEvents.push(i)}t.scrollDOM.addEventListener("mousedown",(i=>{if(i.target==t.scrollDOM)e(ai.mousedown,i)}));if(st.chrome&&st.chrome_version==102){t.scrollDOM.addEventListener("wheel",(()=>{if(this.chromeScrollHack<0)t.contentDOM.style.pointerEvents="none";else window.clearTimeout(this.chromeScrollHack);this.chromeScrollHack=setTimeout((()=>{this.chromeScrollHack=-1;t.contentDOM.style.pointerEvents=""}),100)}),{passive:true})}this.notifiedFocused=t.hasFocus;if(st.safari)t.contentDOM.addEventListener("input",(()=>null))}setSelectionOrigin(t){this.lastSelectionOrigin=t;this.lastSelectionTime=Date.now()}ensureHandlers(t,e){var i;let s;this.customHandlers=[];for(let n of e)if(s=(i=n.update(t).spec)===null||i===void 0?void 0:i.domEventHandlers){this.customHandlers.push({plugin:n.value,handlers:s});for(let e in s)if(this.registeredEvents.indexOf(e)<0&&e!="scroll"){this.registeredEvents.push(e);t.contentDOM.addEventListener(e,(i=>{if(!hi(t,i))return;if(this.runCustomHandlers(e,t,i))i.preventDefault()}))}}}runCustomHandlers(t,e,i){for(let n of this.customHandlers){let r=n.handlers[t];if(r){try{if(r.call(n.plugin,i,e)||i.defaultPrevented)return true}catch(s){Kt(e.state,s)}}}return false}runScrollHandlers(t,e){this.lastScrollTop=t.scrollDOM.scrollTop;this.lastScrollLeft=t.scrollDOM.scrollLeft;for(let s of this.customHandlers){let n=s.handlers.scroll;if(n){try{n.call(s.plugin,e,t)}catch(i){Kt(t.state,i)}}}}keydown(t,e){this.lastKeyCode=e.keyCode;this.lastKeyTime=Date.now();if(e.keyCode==9&&Date.now()<this.lastEscPress+2e3)return true;if(st.android&&st.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8)){t.observer.delayAndroidKey(e.key,e.keyCode);return true}let i;if(st.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((i=ti.find((t=>t.keyCode==e.keyCode)))&&!e.ctrlKey||ei.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)){this.pendingIOSKey=i||e;setTimeout((()=>this.flushIOSKey(t)),250);return true}return false}flushIOSKey(t){let e=this.pendingIOSKey;if(!e)return false;this.pendingIOSKey=undefined;return N(t.contentDOM,e.key,e.keyCode)}ignoreDuringComposition(t){if(!/^key/.test(t.type))return false;if(this.composing>0)return true;if(st.safari&&!st.ios&&Date.now()-this.compositionEndedAt<100){this.compositionEndedAt=0;return true}return false}mustFlushObserver(t){return t.type=="keydown"&&t.keyCode!=229}startMouseSelection(t){if(this.mouseSelection)this.mouseSelection.destroy();this.mouseSelection=t}update(t){if(this.mouseSelection)this.mouseSelection.update(t);if(t.transactions.length)this.lastKeyCode=this.lastSelectionTime=0}destroy(){if(this.mouseSelection)this.mouseSelection.destroy()}}const ti=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}];const ei="dthko";const ii=[16,17,18,20,91,92,224,225];function si(t){return t*.7+8}class ni{constructor(t,e,i,n){this.view=t;this.style=i;this.mustSelect=n;this.scrollSpeed={x:0,y:0};this.scrolling=-1;this.lastEvent=e;this.scrollParent=O(t.contentDOM);let r=t.contentDOM.ownerDocument;r.addEventListener("mousemove",this.move=this.move.bind(this));r.addEventListener("mouseup",this.up=this.up.bind(this));this.extend=e.shiftKey;this.multiple=t.state.facet(s.yy.allowMultipleSelections)&&ri(t,e);this.dragMove=oi(t,e);this.dragging=li(t,e)&&ki(e)==1?null:false;if(this.dragging===false){e.preventDefault();this.select(e)}}move(t){var e;if(t.buttons==0)return this.destroy();if(this.dragging!==false)return;this.select(this.lastEvent=t);let i=0,s=0;let n=((e=this.scrollParent)===null||e===void 0?void 0:e.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};if(t.clientX<=n.left)i=-si(n.left-t.clientX);else if(t.clientX>=n.right)i=si(t.clientX-n.right);if(t.clientY<=n.top)s=-si(n.top-t.clientY);else if(t.clientY>=n.bottom)s=si(t.clientY-n.bottom);this.setScrollSpeed(i,s)}up(t){if(this.dragging==null)this.select(this.lastEvent);if(!this.dragging)t.preventDefault();this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move);t.removeEventListener("mouseup",this.up);this.view.inputState.mouseSelection=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e};if(t||e){if(this.scrolling<0)this.scrolling=setInterval((()=>this.scroll()),50)}else if(this.scrolling>-1){clearInterval(this.scrolling);this.scrolling=-1}}scroll(){if(this.scrollParent){this.scrollParent.scrollLeft+=this.scrollSpeed.x;this.scrollParent.scrollTop+=this.scrollSpeed.y}else{this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y)}if(this.dragging===false)this.select(this.lastEvent)}select(t){let e=this.style.get(t,this.extend,this.multiple);if(this.mustSelect||!e.eq(this.view.state.selection)||e.main.assoc!=this.view.state.selection.main.assoc)this.view.dispatch({selection:e,userEvent:"select.pointer"});this.mustSelect=false}update(t){if(t.docChanged&&this.dragging)this.dragging=this.dragging.map(t.changes);if(this.style.update(t))setTimeout((()=>this.select(this.lastEvent)),20)}}function ri(t,e){let i=t.state.facet(Nt);return i.length?i[0](e):st.mac?e.metaKey:e.ctrlKey}function oi(t,e){let i=t.state.facet(Vt);return i.length?i[0](e):st.mac?!e.altKey:!e.ctrlKey}function li(t,e){let{main:i}=t.state.selection;if(i.empty)return false;let s=m(t.root);if(!s||s.rangeCount==0)return true;let n=s.getRangeAt(0).getClientRects();for(let r=0;r<n.length;r++){let t=n[r];if(t.left<=e.clientX&&t.right>=e.clientX&&t.top<=e.clientY&&t.bottom>=e.clientY)return true}return false}function hi(t,e){if(!e.bubbles)return true;if(e.defaultPrevented)return false;for(let i=e.target,s;i!=t.contentDOM;i=i.parentNode)if(!i||i.nodeType==11||(s=z.get(i))&&s.ignoreEvent(e))return false;return true}const ai=Object.create(null);const fi=Object.create(null);const ci=st.ie&&st.ie_version<15||st.ios&&st.webkit_version<604;function ui(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px";i.focus();setTimeout((()=>{t.focus();i.remove();di(t,i.value)}),50)}function di(t,e){let{state:i}=t,n,r=1,o=i.toText(e);let l=o.lines==i.selection.ranges.length;let h=Oi!=null&&i.selection.ranges.every((t=>t.empty))&&Oi==o.toString();if(h){let t=-1;n=i.changeByRange((n=>{let h=i.doc.lineAt(n.from);if(h.from==t)return{range:n};t=h.from;let a=i.toText((l?o.line(r++).text:e)+i.lineBreak);return{changes:{from:h.from,insert:a},range:s.jT.cursor(n.from+a.length)}}))}else if(l){n=i.changeByRange((t=>{let e=o.line(r++);return{changes:{from:t.from,to:t.to,insert:e.text},range:s.jT.cursor(t.from+e.length)}}))}else{n=i.replaceSelection(o)}t.dispatch(n,{userEvent:"input.paste",scrollIntoView:true})}ai.keydown=(t,e)=>{t.inputState.setSelectionOrigin("select");if(e.keyCode==27)t.inputState.lastEscPress=Date.now();else if(ii.indexOf(e.keyCode)<0)t.inputState.lastEscPress=0};ai.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now();t.inputState.setSelectionOrigin("select.pointer")};ai.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};fi.touchstart=fi.touchmove={passive:true};ai.mousedown=(t,e)=>{t.observer.flush();if(t.inputState.lastTouchTime>Date.now()-2e3)return;let i=null;for(let s of t.state.facet(Ht)){i=s(t,e);if(i)break}if(!i&&e.button==0)i=Mi(t,e);if(i){let s=t.root.activeElement!=t.contentDOM;if(s)t.observer.ignore((()=>B(t.contentDOM)));t.inputState.startMouseSelection(new ni(t,e,i,s))}};function pi(t,e,i,n){if(n==1){return s.jT.cursor(e,i)}else if(n==2){return Ve(t.state,e,i)}else{let i=Et.find(t.docView,e),n=t.state.doc.lineAt(i?i.posAtEnd:e);let r=i?i.posAtStart:n.from,o=i?i.posAtEnd:n.to;if(o<t.state.doc.length&&o==n.to)o++;return s.jT.range(r,o)}}let gi=(t,e)=>t>=e.top&&t<=e.bottom;let mi=(t,e,i)=>gi(e,i)&&t>=i.left&&t<=i.right;function wi(t,e,i,s){let n=Et.find(t.docView,e);if(!n)return 1;let r=e-n.posAtStart;if(r==0)return 1;if(r==n.length)return-1;let o=n.coordsAt(r,-1);if(o&&mi(i,s,o))return-1;let l=n.coordsAt(r,1);if(l&&mi(i,s,l))return 1;return o&&gi(s,o)?-1:1}function vi(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},false);return{pos:i,bias:wi(t,i,e.clientX,e.clientY)}}const yi=st.ie&&st.ie_version<=11;let bi=null,xi=0,Si=0;function ki(t){if(!yi)return t.detail;let e=bi,i=Si;bi=t;Si=Date.now();return xi=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(xi+1)%3:1}function Mi(t,e){let i=vi(t,e),n=ki(e);let r=t.state.selection;return{update(t){if(t.docChanged){i.pos=t.changes.mapPos(i.pos);r=r.map(t.changes)}},get(e,o,l){let h=vi(t,e);let a=pi(t,h.pos,h.bias,n);if(i.pos!=h.pos&&!o){let e=pi(t,i.pos,i.bias,n);let r=Math.min(e.from,a.from),o=Math.max(e.to,a.to);a=r<a.from?s.jT.range(r,o):s.jT.range(o,r)}if(o)return r.replaceRange(r.main.extend(a.from,a.to));else if(l&&r.ranges.length>1&&r.ranges.some((t=>t.eq(a))))return Ci(r,a);else if(l)return r.addRange(a);else return s.jT.create([a])}}}function Ci(t,e){for(let i=0;;i++){if(t.ranges[i].eq(e))return s.jT.create(t.ranges.slice(0,i).concat(t.ranges.slice(i+1)),t.mainIndex==i?0:t.mainIndex-(t.mainIndex>i?1:0))}}ai.dragstart=(t,e)=>{let{selection:{main:i}}=t.state;let{mouseSelection:s}=t.inputState;if(s)s.dragging=i;if(e.dataTransfer){e.dataTransfer.setData("Text",t.state.sliceDoc(i.from,i.to));e.dataTransfer.effectAllowed="copyMove"}};function Ai(t,e,i,s){if(!i)return;let n=t.posAtCoords({x:e.clientX,y:e.clientY},false);e.preventDefault();let{mouseSelection:r}=t.inputState;let o=s&&r&&r.dragging&&r.dragMove?{from:r.dragging.from,to:r.dragging.to}:null;let l={from:n,insert:i};let h=t.state.changes(o?[o,l]:l);t.focus();t.dispatch({changes:h,selection:{anchor:h.mapPos(n,-1),head:h.mapPos(n,1)},userEvent:o?"move.drop":"input.drop"})}ai.drop=(t,e)=>{if(!e.dataTransfer)return;if(t.state.readOnly)return e.preventDefault();let i=e.dataTransfer.files;if(i&&i.length){e.preventDefault();let s=Array(i.length),n=0;let r=()=>{if(++n==i.length)Ai(t,e,s.filter((t=>t!=null)).join(t.state.lineBreak),false)};for(let t=0;t<i.length;t++){let e=new FileReader;e.onerror=r;e.onload=()=>{if(!/[\x00-\x08\x0e-\x1f]{2}/.test(e.result))s[t]=e.result;r()};e.readAsText(i[t])}}else{Ai(t,e,e.dataTransfer.getData("Text"),true)}};ai.paste=(t,e)=>{if(t.state.readOnly)return e.preventDefault();t.observer.flush();let i=ci?null:e.clipboardData;if(i){di(t,i.getData("text/plain"));e.preventDefault()}else{ui(t)}};function Di(t,e){let i=t.dom.parentNode;if(!i)return;let s=i.appendChild(document.createElement("textarea"));s.style.cssText="position: fixed; left: -10000px; top: 10px";s.value=e;s.focus();s.selectionEnd=e.length;s.selectionStart=0;setTimeout((()=>{s.remove();t.focus()}),50)}function Ti(t){let e=[],i=[],s=false;for(let n of t.selection.ranges)if(!n.empty){e.push(t.sliceDoc(n.from,n.to));i.push(n)}if(!e.length){let n=-1;for(let{from:s}of t.selection.ranges){let r=t.doc.lineAt(s);if(r.number>n){e.push(r.text);i.push({from:r.from,to:Math.min(t.doc.length,r.to+1)})}n=r.number}s=true}return{text:e.join(t.lineBreak),ranges:i,linewise:s}}let Oi=null;ai.copy=ai.cut=(t,e)=>{let{text:i,ranges:s,linewise:n}=Ti(t.state);if(!i&&!n)return;Oi=n?i:null;let r=ci?null:e.clipboardData;if(r){e.preventDefault();r.clearData();r.setData("text/plain",i)}else{Di(t,i)}if(e.type=="cut"&&!t.state.readOnly)t.dispatch({changes:s,scrollIntoView:true,userEvent:"delete.cut"})};function Ei(t){setTimeout((()=>{if(t.hasFocus!=t.inputState.notifiedFocused)t.update([])}),10)}ai.focus=t=>{t.inputState.lastFocusTime=Date.now();if(!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)){t.scrollDOM.scrollTop=t.inputState.lastScrollTop;t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft}Ei(t)};ai.blur=t=>{t.observer.clearSelectionRange();Ei(t)};ai.compositionstart=ai.compositionupdate=t=>{if(t.inputState.compositionFirstChange==null)t.inputState.compositionFirstChange=true;if(t.inputState.composing<0){t.inputState.composing=0}};ai.compositionend=t=>{t.inputState.composing=-1;t.inputState.compositionEndedAt=Date.now();t.inputState.compositionFirstChange=null;if(st.chrome&&st.android)t.observer.flushSoon();setTimeout((()=>{if(t.inputState.composing<0&&t.docView.compositionDeco.size)t.update([])}),50)};ai.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};ai.beforeinput=(t,e)=>{var i;let s;if(st.chrome&&st.android&&(s=ti.find((t=>t.inputType==e.inputType)))){t.observer.delayAndroidKey(s.key,s.keyCode);if(s.key=="Backspace"||s.key=="Delete"){let e=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout((()=>{var i;if((((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0)>e+10&&t.hasFocus){t.contentDOM.blur();t.focus()}}),100)}}};const Ri=["pre-wrap","normal","pre-line","break-spaces"];class Bi{constructor(t){this.lineWrapping=t;this.doc=s.xv.empty;this.heightSamples={};this.lineHeight=14;this.charWidth=7;this.lineLength=30;this.heightChanged=false}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;if(this.lineWrapping)i+=Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength);return this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;let e=1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5)));return e*this.lineHeight}setDoc(t){this.doc=t;return this}mustRefreshForWrapping(t){return Ri.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=false;for(let i=0;i<t.length;i++){let s=t[i];if(s<0){i++}else if(!this.heightSamples[Math.floor(s*10)]){e=true;this.heightSamples[Math.floor(s*10)]=true}}return e}refresh(t,e,i,s,n){let r=Ri.indexOf(t)>-1;let o=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=r;this.lineWrapping=r;this.lineHeight=e;this.charWidth=i;this.lineLength=s;if(o){this.heightSamples={};for(let t=0;t<n.length;t++){let e=n[t];if(e<0)t++;else this.heightSamples[Math.floor(e*10)]=true}}return o}}class Li{constructor(t,e){this.from=t;this.heights=e;this.index=0}get more(){return this.index<this.heights.length}}class Pi{constructor(t,e,i,s,n){this.from=t;this.length=e;this.top=i;this.height=s;this.type=n}get to(){return this.from+this.length}get bottom(){return this.top+this.height}join(t){let e=(Array.isArray(this.type)?this.type:[this]).concat(Array.isArray(t.type)?t.type:[t]);return new Pi(this.from,this.length+t.length,this.top,this.height+t.height,e)}}var Ni=function(t){t[t["ByPos"]=0]="ByPos";t[t["ByHeight"]=1]="ByHeight";t[t["ByPosNoHeight"]=2]="ByPosNoHeight";return t}(Ni||(Ni={}));const Vi=.001;class Hi{constructor(t,e,i=2){this.length=t;this.height=e;this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(t){this.flags=(t?2:0)|this.flags&~2}setHeight(t,e){if(this.height!=e){if(Math.abs(this.height-e)>Vi)t.heightChanged=true;this.height=e}}replace(t,e,i){return Hi.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,s){let n=this;for(let r=s.length-1;r>=0;r--){let{fromA:o,toA:l,fromB:h,toB:a}=s[r];let f=n.lineAt(o,Ni.ByPosNoHeight,e,0,0);let c=f.to>=l?f:n.lineAt(l,Ni.ByPosNoHeight,e,0,0);a+=c.to-l;l=c.to;while(r>0&&f.from<=s[r-1].toA){o=s[r-1].fromA;h=s[r-1].fromB;r--;if(o<f.from)f=n.lineAt(o,Ni.ByPosNoHeight,e,0,0)}h+=f.from-o;o=f.from;let u=$i.build(i,t,h,a);n=n.replace(o,l,u)}return n.updateHeight(i,0)}static empty(){return new Wi(0,0)}static of(t){if(t.length==1)return t[0];let e=0,i=t.length,s=0,n=0;for(;;){if(e==i){if(s>n*2){let n=t[e-1];if(n.break)t.splice(--e,1,n.left,null,n.right);else t.splice(--e,1,n.left,n.right);i+=1+n.break;s-=n.size}else if(n>s*2){let e=t[i];if(e.break)t.splice(i,1,e.left,null,e.right);else t.splice(i,1,e.left,e.right);i+=2+e.break;n-=e.size}else{break}}else if(s<n){let i=t[e++];if(i)s+=i.size}else{let e=t[--i];if(e)n+=e.size}}let r=0;if(t[e-1]==null){r=1;e--}else if(t[e]==null){r=1;i++}return new zi(Hi.of(t.slice(0,e)),r,Hi.of(t.slice(i)))}}Hi.prototype.size=1;class Ii extends Hi{constructor(t,e,i){super(t,e);this.type=i}blockAt(t,e,i,s){return new Pi(s,this.length,i,this.height,this.type)}lineAt(t,e,i,s,n){return this.blockAt(0,i,s,n)}forEachLine(t,e,i,s,n,r){if(t<=n+this.length&&e>=n)r(this.blockAt(0,i,s,n))}updateHeight(t,e=0,i=false,s){if(s&&s.from<=e&&s.more)this.setHeight(t,s.heights[s.index++]);this.outdated=false;return this}toString(){return`block(${this.length})`}}class Wi extends Ii{constructor(t,e){super(t,e,St.Text);this.collapsed=0;this.widgetHeight=0}replace(t,e,i){let s=i[0];if(i.length==1&&(s instanceof Wi||s instanceof Fi&&s.flags&4)&&Math.abs(this.length-s.length)<10){if(s instanceof Fi)s=new Wi(s.length,this.height);else s.height=this.height;if(!this.outdated)s.outdated=false;return s}else{return Hi.of(i)}}updateHeight(t,e=0,i=false,s){if(s&&s.from<=e&&s.more)this.setHeight(t,s.heights[s.index++]);else if(i||this.outdated)this.setHeight(t,Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed)));this.outdated=false;return this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Fi extends Hi{constructor(t){super(t,0)}lines(t,e){let i=t.lineAt(e).number,s=t.lineAt(e+this.length).number;return{firstLine:i,lastLine:s,lineHeight:this.height/(s-i+1)}}blockAt(t,e,i,s){let{firstLine:n,lastLine:r,lineHeight:o}=this.lines(e,s);let l=Math.max(0,Math.min(r-n,Math.floor((t-i)/o)));let{from:h,length:a}=e.line(n+l);return new Pi(h,a,i+o*l,o,St.Text)}lineAt(t,e,i,s,n){if(e==Ni.ByHeight)return this.blockAt(t,i,s,n);if(e==Ni.ByPosNoHeight){let{from:e,to:s}=i.lineAt(t);return new Pi(e,s-e,0,0,St.Text)}let{firstLine:r,lineHeight:o}=this.lines(i,n);let{from:l,length:h,number:a}=i.lineAt(t);return new Pi(l,h,s+o*(a-r),o,St.Text)}forEachLine(t,e,i,s,n,r){let{firstLine:o,lineHeight:l}=this.lines(i,n);for(let h=Math.max(t,n),a=Math.min(n+this.length,e);h<=a;){let e=i.lineAt(h);if(h==t)s+=l*(e.number-o);r(new Pi(e.from,e.length,s,l,St.Text));s+=l;h=e.to+1}}replace(t,e,i){let s=this.length-e;if(s>0){let t=i[i.length-1];if(t instanceof Fi)i[i.length-1]=new Fi(t.length+s);else i.push(null,new Fi(s-1))}if(t>0){let e=i[0];if(e instanceof Fi)i[0]=new Fi(t+e.length);else i.unshift(new Fi(t-1),null)}return Hi.of(i)}decomposeLeft(t,e){e.push(new Fi(t-1),null)}decomposeRight(t,e){e.push(null,new Fi(this.length-t-1))}updateHeight(t,e=0,i=false,s){let n=e+this.length;if(s&&s.from<=e+this.length&&s.more){let i=[],r=Math.max(e,s.from),o=-1;let l=t.heightChanged;if(s.from>e)i.push(new Fi(s.from-e-1).updateHeight(t,e));while(r<=n&&s.more){let e=t.doc.lineAt(r).length;if(i.length)i.push(null);let n=s.heights[s.index++];if(o==-1)o=n;else if(Math.abs(n-o)>=Vi)o=-2;let l=new Wi(e,n);l.outdated=false;i.push(l);r+=e+1}if(r<=n)i.push(null,new Fi(n-r).updateHeight(t,r));let h=Hi.of(i);t.heightChanged=l||o<0||Math.abs(h.height-this.height)>=Vi||Math.abs(o-this.lines(t.doc,e).lineHeight)>=Vi;return h}else if(i||this.outdated){this.setHeight(t,t.heightForGap(e,e+this.length));this.outdated=false}return this}toString(){return`gap(${this.length})`}}class zi extends Hi{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0));this.left=t;this.right=i;this.size=t.size+i.size}get break(){return this.flags&1}blockAt(t,e,i,s){let n=i+this.left.height;return t<n?this.left.blockAt(t,e,i,s):this.right.blockAt(t,e,n,s+this.left.length+this.break)}lineAt(t,e,i,s,n){let r=s+this.left.height,o=n+this.left.length+this.break;let l=e==Ni.ByHeight?t<r:t<o;let h=l?this.left.lineAt(t,e,i,s,n):this.right.lineAt(t,e,i,r,o);if(this.break||(l?h.to<o:h.from>o))return h;let a=e==Ni.ByPosNoHeight?Ni.ByPosNoHeight:Ni.ByPos;if(l)return h.join(this.right.lineAt(o,a,i,r,o));else return this.left.lineAt(o,a,i,s,n).join(h)}forEachLine(t,e,i,s,n,r){let o=s+this.left.height,l=n+this.left.length+this.break;if(this.break){if(t<l)this.left.forEachLine(t,e,i,s,n,r);if(e>=l)this.right.forEachLine(t,e,i,o,l,r)}else{let h=this.lineAt(l,Ni.ByPos,i,s,n);if(t<h.from)this.left.forEachLine(t,h.from-1,i,s,n,r);if(h.to>=t&&h.from<=e)r(h);if(e>h.to)this.right.forEachLine(h.to+1,e,i,o,l,r)}}replace(t,e,i){let s=this.left.length+this.break;if(e<s)return this.balanced(this.left.replace(t,e,i),this.right);if(t>this.left.length)return this.balanced(this.left,this.right.replace(t-s,e-s,i));let n=[];if(t>0)this.decomposeLeft(t,n);let r=n.length;for(let o of i)n.push(o);if(t>0)qi(n,r-1);if(e<this.length){let t=n.length;this.decomposeRight(e,n);qi(n,t)}return Hi.of(n)}decomposeLeft(t,e){let i=this.left.length;if(t<=i)return this.left.decomposeLeft(t,e);e.push(this.left);if(this.break){i++;if(t>=i)e.push(null)}if(t>i)this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,s=i+this.break;if(t>=s)return this.right.decomposeRight(t-s,e);if(t<i)this.left.decomposeRight(t,e);if(this.break&&t<s)e.push(null);e.push(this.right)}balanced(t,e){if(t.size>2*e.size||e.size>2*t.size)return Hi.of(this.break?[t,null,e]:[t,e]);this.left=t;this.right=e;this.height=t.height+e.height;this.outdated=t.outdated||e.outdated;this.size=t.size+e.size;this.length=t.length+this.break+e.length;return this}updateHeight(t,e=0,i=false,s){let{left:n,right:r}=this,o=e+n.length+this.break,l=null;if(s&&s.from<=e+n.length&&s.more)l=n=n.updateHeight(t,e,i,s);else n.updateHeight(t,e,i);if(s&&s.from<=o+r.length&&s.more)l=r=r.updateHeight(t,o,i,s);else r.updateHeight(t,o,i);if(l)return this.balanced(n,r);this.height=this.left.height+this.right.height;this.outdated=false;return this}toString(){return this.left+(this.break?" ":"-")+this.right}}function qi(t,e){let i,s;if(t[e]==null&&(i=t[e-1])instanceof Fi&&(s=t[e+1])instanceof Fi)t.splice(e-1,3,new Fi(i.length+1+s.length))}const ji=5;class $i{constructor(t,e){this.pos=t;this.oracle=e;this.nodes=[];this.lineStart=-1;this.lineEnd=-1;this.covering=null;this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];if(i instanceof Wi)i.length+=t-this.pos;else if(t>this.pos||!this.isCovered)this.nodes.push(new Wi(t-this.pos,-1));this.writtenTo=t;if(e>t){this.nodes.push(null);this.writtenTo++;this.lineStart=-1}}this.pos=e}point(t,e,i){if(t<e||i.heightRelevant){let s=i.widget?i.widget.estimatedHeight:0;if(s<0)s=this.oracle.lineHeight;let n=e-t;if(i.block){this.addBlock(new Ii(n,s,i.type))}else if(n||s>=ji){this.addLineDeco(s,n)}}else if(e>t){this.span(t,e)}if(this.lineEnd>-1&&this.lineEnd<this.pos)this.lineEnd=this.oracle.doc.lineAt(this.pos).to}enterLine(){if(this.lineStart>-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t;this.lineEnd=e;if(this.writtenTo<t){if(this.writtenTo<t-1||this.nodes[this.nodes.length-1]==null)this.nodes.push(this.blankContent(this.writtenTo,t-1));this.nodes.push(null)}if(this.pos>t)this.nodes.push(new Wi(this.pos-t,-1));this.writtenTo=this.pos}blankContent(t,e){let i=new Fi(e-t);if(this.oracle.doc.lineAt(t).to==e)i.flags|=4;return i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Wi)return t;let e=new Wi(0,-1);this.nodes.push(e);return e}addBlock(t){this.enterLine();if(t.type==St.WidgetAfter&&!this.isCovered)this.ensureLine();this.nodes.push(t);this.writtenTo=this.pos=this.pos+t.length;if(t.type!=St.WidgetBefore)this.covering=t}addLineDeco(t,e){let i=this.ensureLine();i.length+=e;i.collapsed+=e;i.widgetHeight=Math.max(i.widgetHeight,t);this.writtenTo=this.pos=this.pos+e}finish(t){let e=this.nodes.length==0?null:this.nodes[this.nodes.length-1];if(this.lineStart>-1&&!(e instanceof Wi)&&!this.isCovered)this.nodes.push(new Wi(0,-1));else if(this.writtenTo<this.pos||e==null)this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=t;for(let s of this.nodes){if(s instanceof Wi)s.updateHeight(this.oracle,i);i+=s?s.length:1}return this.nodes}static build(t,e,i,n){let r=new $i(i,t);s.Xs.spans(e,i,n,r,0);return r.finish(i)}}function Ki(t,e,i){let n=new Gi;s.Xs.compare(t,e,i,n,0);return n.changes}class Gi{constructor(){this.changes=[]}compareRange(){}comparePoint(t,e,i,s){if(t<e||i&&i.heightRelevant||s&&s.heightRelevant)Ot(t,e,this.changes,5)}}function _i(t,e){let i=t.getBoundingClientRect();let s=t.ownerDocument,n=s.defaultView||window;let r=Math.max(0,i.left),o=Math.min(n.innerWidth,i.right);let l=Math.max(0,i.top),h=Math.min(n.innerHeight,i.bottom);for(let a=t.parentNode;a&&a!=s.body;){if(a.nodeType==1){let e=a;let i=window.getComputedStyle(e);if((e.scrollHeight>e.clientHeight||e.scrollWidth>e.clientWidth)&&i.overflow!="visible"){let i=e.getBoundingClientRect();r=Math.max(r,i.left);o=Math.min(o,i.right);l=Math.max(l,i.top);h=a==t.parentNode?i.bottom:Math.min(h,i.bottom)}a=i.position=="absolute"||i.position=="fixed"?e.offsetParent:e.parentNode}else if(a.nodeType==11){a=a.host}else{break}}return{left:r-i.left,right:Math.max(r,o)-i.left,top:l-(i.top+e),bottom:Math.max(l,h)-(i.top+e)}}function Xi(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class Ui{constructor(t,e,i){this.from=t;this.to=e;this.size=i}static same(t,e){if(t.length!=e.length)return false;for(let i=0;i<t.length;i++){let s=t[i],n=e[i];if(s.from!=n.from||s.to!=n.to||s.size!=n.size)return false}return true}draw(t){return kt.replace({widget:new Ji(this.size,t)}).range(this.from,this.to)}}class Ji extends xt{constructor(t,e){super();this.size=t;this.vertical=e}eq(t){return t.size==this.size&&t.vertical==this.vertical}toDOM(){let t=document.createElement("div");if(this.vertical){t.style.height=this.size+"px"}else{t.style.width=this.size+"px";t.style.height="2px";t.style.display="inline-block"}return t}get estimatedHeight(){return this.vertical?this.size:-1}}class Yi{constructor(t){this.state=t;this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0};this.inView=true;this.paddingTop=0;this.paddingBottom=0;this.contentDOMWidth=0;this.contentDOMHeight=0;this.editorHeight=0;this.editorWidth=0;this.scaler=ss;this.scrollTarget=null;this.printing=false;this.mustMeasureContent=true;this.defaultTextDirection=re.LTR;this.visibleRanges=[];this.mustEnforceCursorAssoc=false;let e=t.facet(Qt).some((t=>typeof t!="function"&&t.class=="cm-lineWrapping"));this.heightOracle=new Bi(e);this.stateDeco=t.facet(Zt).filter((t=>typeof t!="function"));this.heightMap=Hi.empty().applyChanges(this.stateDeco,s.xv.empty,this.heightOracle.setDoc(t.doc),[new se(0,0,0,t.doc.length)]);this.viewport=this.getViewport(0,null);this.updateViewportLines();this.updateForViewport();this.lineGaps=this.ensureLineGaps([]);this.lineGapDeco=kt.set(this.lineGaps.map((t=>t.draw(false))));this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let s=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>s>=t&&s<=e))){let{from:e,to:i}=this.lineBlockAt(s);t.push(new Qi(e,i))}}this.viewports=t.sort(((t,e)=>t.from-e.from));this.scaler=this.heightMap.height<=7e6?ss:new ns(this.heightOracle.doc,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[];this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.state.doc,0,0,(t=>{this.viewportLines.push(this.scaler.scale==1?t:rs(t,this.scaler))}))}update(t,e=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Zt).filter((t=>typeof t!="function"));let n=t.changedRanges;let r=se.extendWithRanges(n,Ki(i,this.stateDeco,t?t.changes:s.as.empty(this.state.doc.length)));let o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),r);if(this.heightMap.height!=o)t.flags|=2;let l=r.length?this.mapViewport(this.viewport,t.changes):this.viewport;if(e&&(e.range.head<l.from||e.range.head>l.to)||!this.viewportIsAppropriate(l))l=this.getViewport(0,e);let h=!t.changes.empty||t.flags&2||l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l;this.updateForViewport();if(h)this.updateViewportLines();if(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes)));t.flags|=this.computeVisibleRanges();if(e)this.scrollTarget=e;if(!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(qt))this.mustEnforceCursorAssoc=true}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e);let n=this.heightOracle;let r=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?re.RTL:re.LTR;let o=this.heightOracle.mustRefreshForWrapping(r);let l=o||this.mustMeasureContent||this.contentDOMHeight!=e.clientHeight;this.contentDOMHeight=e.clientHeight;this.mustMeasureContent=false;let h=0,a=0;let f=parseInt(i.paddingTop)||0,c=parseInt(i.paddingBottom)||0;if(this.paddingTop!=f||this.paddingBottom!=c){this.paddingTop=f;this.paddingBottom=c;h|=8|2}if(this.editorWidth!=t.scrollDOM.clientWidth){if(n.lineWrapping)l=true;this.editorWidth=t.scrollDOM.clientWidth;h|=8}let u=(this.printing?Xi:_i)(e,this.paddingTop);let d=u.top-this.pixelViewport.top,p=u.bottom-this.pixelViewport.bottom;this.pixelViewport=u;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView){this.inView=g;if(g)l=true}if(!this.inView&&!this.scrollTarget)return 0;let m=e.clientWidth;if(this.contentDOMWidth!=m||this.editorHeight!=t.scrollDOM.clientHeight){this.contentDOMWidth=m;this.editorHeight=t.scrollDOM.clientHeight;h|=8}if(l){let e=t.docView.measureVisibleLineHeights(this.viewport);if(n.mustRefreshForHeights(e))o=true;if(o||n.lineWrapping&&Math.abs(m-this.contentDOMWidth)>n.charWidth){let{lineHeight:i,charWidth:s}=t.docView.measureTextSize();o=i>0&&n.refresh(r,i,s,m/s,e);if(o){t.docView.minWidth=0;h|=8}}if(d>0&&p>0)a=Math.max(d,p);else if(d<0&&p<0)a=Math.min(d,p);n.heightChanged=false;for(let i of this.viewports){let r=i.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(i);this.heightMap=(o?Hi.empty().applyChanges(this.stateDeco,s.xv.empty,this.heightOracle,[new se(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(n,0,o,new Li(i.from,r))}if(n.heightChanged)h|=2}let w=!this.viewportIsAppropriate(this.viewport,a)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);if(w)this.viewport=this.getViewport(a,this.scrollTarget);this.updateForViewport();if(h&2||w)this.updateViewportLines();if(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,t));h|=this.computeVisibleRanges();if(this.mustEnforceCursorAssoc){this.mustEnforceCursorAssoc=false;t.docView.enforceCursorAssoc()}return h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2));let s=this.heightMap,n=this.state.doc,{visibleTop:r,visibleBottom:o}=this;let l=new Qi(s.lineAt(r-i*1e3,Ni.ByHeight,n,0,0).from,s.lineAt(o+(1-i)*1e3,Ni.ByHeight,n,0,0).to);if(e){let{head:t}=e.range;if(t<l.from||t>l.to){let i=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top);let r=s.lineAt(t,Ni.ByPos,n,0,0),o;if(e.y=="center")o=(r.top+r.bottom)/2-i/2;else if(e.y=="start"||e.y=="nearest"&&t<l.from)o=r.top;else o=r.bottom-i;l=new Qi(s.lineAt(o-1e3/2,Ni.ByHeight,n,0,0).from,s.lineAt(o+i+1e3/2,Ni.ByHeight,n,0,0).to)}}return l}mapViewport(t,e){let i=e.mapPos(t.from,-1),s=e.mapPos(t.to,1);return new Qi(this.heightMap.lineAt(i,Ni.ByPos,this.state.doc,0,0).from,this.heightMap.lineAt(s,Ni.ByPos,this.state.doc,0,0).to)}viewportIsAppropriate({from:t,to:e},i=0){if(!this.inView)return true;let{top:s}=this.heightMap.lineAt(t,Ni.ByPos,this.state.doc,0,0);let{bottom:n}=this.heightMap.lineAt(e,Ni.ByPos,this.state.doc,0,0);let{visibleTop:r,visibleBottom:o}=this;return(t==0||s<=r-Math.max(10,Math.min(-i,250)))&&(e==this.state.doc.length||n>=o+Math.max(10,Math.min(i,250)))&&(s>r-2*1e3&&n<o+2*1e3)}mapLineGaps(t,e){if(!t.length||e.empty)return t;let i=[];for(let s of t)if(!e.touchesRange(s.from,s.to))i.push(new Ui(e.mapPos(s.from),e.mapPos(s.to),s.size));return i}ensureLineGaps(t,e){let i=this.heightOracle.lineWrapping;let n=i?1e4:2e3,r=n>>1,o=n<<1;if(this.defaultTextDirection!=re.LTR&&!i)return[];let l=[];let h=(n,o,a,f)=>{if(o-n<r)return;let c=this.state.selection.main,u=[c.from];if(!c.empty)u.push(c.to);for(let t of u){if(t>n&&t<o){h(n,t-10,a,f);h(t+10,o,a,f);return}}let d=is(t,(t=>t.from>=a.from&&t.to<=a.to&&Math.abs(t.from-n)<r&&Math.abs(t.to-o)<r&&!u.some((e=>t.from<e&&t.to>e))));if(!d){if(o<a.to&&e&&i&&e.visibleRanges.some((t=>t.from<=o&&t.to>=o))){let t=e.moveToLineBoundary(s.jT.cursor(o),false,true).head;if(t>n)o=t}d=new Ui(n,o,this.gapSize(a,n,o,f))}l.push(d)};for(let s of this.viewportLines){if(s.length<o)continue;let t=Zi(s.from,s.to,this.stateDeco);if(t.total<o)continue;let e=this.scrollTarget?this.scrollTarget.range.head:null;let r,l;if(i){let i=n/this.heightOracle.lineLength*this.heightOracle.lineHeight;let o,h;if(e!=null){let n=es(t,e);let r=((this.visibleBottom-this.visibleTop)/2+i)/s.height;o=n-r;h=n+r}else{o=(this.visibleTop-s.top-i)/s.height;h=(this.visibleBottom-s.top+i)/s.height}r=ts(t,o);l=ts(t,h)}else{let i=t.total*this.heightOracle.charWidth;let s=n*this.heightOracle.charWidth;let o,h;if(e!=null){let n=es(t,e);let r=((this.pixelViewport.right-this.pixelViewport.left)/2+s)/i;o=n-r;h=n+r}else{o=(this.pixelViewport.left-s)/i;h=(this.pixelViewport.right+s)/i}r=ts(t,o);l=ts(t,h)}if(r>s.from)h(s.from,r,s,t);if(l<s.to)h(l,s.to,s,t)}return l}gapSize(t,e,i,s){let n=es(s,i)-es(s,e);if(this.heightOracle.lineWrapping){return t.height*n}else{return s.total*this.heightOracle.charWidth*n}}updateLineGaps(t){if(!Ui.same(t,this.lineGaps)){this.lineGaps=t;this.lineGapDeco=kt.set(t.map((t=>t.draw(this.heightOracle.lineWrapping))))}}computeVisibleRanges(){let t=this.stateDeco;if(this.lineGaps.length)t=t.concat(this.lineGapDeco);let e=[];s.Xs.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));this.visibleRanges=e;return i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||rs(this.heightMap.lineAt(t,Ni.ByPos,this.state.doc,0,0),this.scaler)}lineBlockAtHeight(t){return rs(this.heightMap.lineAt(this.scaler.fromDOM(t),Ni.ByHeight,this.state.doc,0,0),this.scaler)}elementAtHeight(t){return rs(this.heightMap.blockAt(this.scaler.fromDOM(t),this.state.doc,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Qi{constructor(t,e){this.from=t;this.to=e}}function Zi(t,e,i){let n=[],r=t,o=0;s.Xs.spans(i,t,e,{span(){},point(t,e){if(t>r){n.push({from:r,to:t});o+=t-r}r=e}},20);if(r<e){n.push({from:r,to:e});o+=e-r}return{total:o,ranges:n}}function ts({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let s=Math.floor(t*i);for(let n=0;;n++){let{from:t,to:i}=e[n],r=i-t;if(s<=r)return t+s;s-=r}}function es(t,e){let i=0;for(let{from:s,to:n}of t.ranges){if(e<=n){i+=e-s;break}i+=n-s}return i/t.total}function is(t,e){for(let i of t)if(e(i))return i;return undefined}const ss={toDOM(t){return t},fromDOM(t){return t},scale:1};class ns{constructor(t,e,i){let s=0,n=0,r=0;this.viewports=i.map((({from:i,to:n})=>{let r=e.lineAt(i,Ni.ByPos,t,0,0).top;let o=e.lineAt(n,Ni.ByPos,t,0,0).bottom;s+=o-r;return{from:i,to:n,top:r,bottom:o,domTop:0,domBottom:0}}));this.scale=(7e6-s)/(e.height-s);for(let o of this.viewports){o.domTop=r+(o.top-n)*this.scale;r=o.domBottom=o.domTop+(o.bottom-o.top);n=o.bottom}}toDOM(t){for(let e=0,i=0,s=0;;e++){let n=e<this.viewports.length?this.viewports[e]:null;if(!n||t<n.top)return s+(t-i)*this.scale;if(t<=n.bottom)return n.domTop+(t-n.top);i=n.bottom;s=n.domBottom}}fromDOM(t){for(let e=0,i=0,s=0;;e++){let n=e<this.viewports.length?this.viewports[e]:null;if(!n||t<n.domTop)return i+(t-s)/this.scale;if(t<=n.domBottom)return n.top+(t-n.domTop);i=n.bottom;s=n.domBottom}}}function rs(t,e){if(e.scale==1)return t;let i=e.toDOM(t.top),s=e.toDOM(t.bottom);return new Pi(t.from,t.length,i,s-i,Array.isArray(t.type)?t.type.map((t=>rs(t,e))):t.type)}const os=s.r$.define({combine:t=>t.join(" ")});const ls=s.r$.define({combine:t=>t.indexOf(true)>-1});const hs=n.StyleModule.newName(),as=n.StyleModule.newName(),fs=n.StyleModule.newName();const cs={"&light":"."+as,"&dark":"."+fs};function us(t,e,i){return new n.StyleModule(e,{finish(e){return/&/.test(e)?e.replace(/&\w*/,(e=>{if(e=="&")return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e}})}const ds=us("."+hs,{"&.cm-editor":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},"&.cm-focused .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},cs);class ps{constructor(t,e,i,n){this.typeOver=n;this.bounds=null;this.text="";let{impreciseHead:r,impreciseAnchor:o}=t.docView;if(t.state.readOnly&&e>-1){this.newSel=null}else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,i,0))){let e=r||o?[]:ws(t);let i=new Se(e,t.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM);this.text=i.text;this.newSel=vs(e,this.bounds.from)}else{let e=t.observer.selectionRange;let i=r&&r.node==e.focusNode&&r.offset==e.focusOffset||!w(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset);let n=o&&o.node==e.anchorNode&&o.offset==e.anchorOffset||!w(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset);this.newSel=s.jT.single(n,i)}}}function gs(t,e){let i;let{newSel:n}=e,r=t.state.selection.main;if(e.bounds){let{from:n,to:o}=e.bounds;let l=r.from,h=null;if(t.inputState.lastKeyCode===8&&t.inputState.lastKeyTime>Date.now()-100||st.android&&e.text.length<o-n){l=r.to;h="end"}let a=ms(t.state.doc.sliceString(n,o,xe),e.text,l-n,h);if(a){if(st.chrome&&t.inputState.lastKeyCode==13&&a.toB==a.from+2&&e.text.slice(a.from,a.toB)==xe+xe)a.toB--;i={from:n+a.from,to:n+a.toA,insert:s.xv.of(e.text.slice(a.from,a.toB).split(xe))}}}else if(n&&(!t.hasFocus||!t.state.facet(Gt)||n.main.eq(r))){n=null}if(!i&&!n)return false;if(!i&&e.typeOver&&!r.empty&&n&&n.main.empty){i={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}}else if(i&&i.from>=r.from&&i.to<=r.to&&(i.from!=r.from||i.to!=r.to)&&r.to-r.from-(i.to-i.from)<=4){i={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,r.to))}}else if((st.mac||st.android)&&i&&i.from==i.to&&i.from==r.head-1&&/^\. ?$/.test(i.insert.toString())){if(n&&i.insert.length==2)n=s.jT.single(n.main.anchor-1,n.main.head-1);i={from:r.from,to:r.to,insert:s.xv.of([" "])}}else if(st.chrome&&i&&i.from==i.to&&i.from==r.head&&i.insert.toString()=="\n "&&t.lineWrapping){if(n)n=s.jT.single(n.main.anchor-1,n.main.head-1);i={from:r.from,to:r.to,insert:s.xv.of([" "])}}if(i){let e=t.state;if(st.ios&&t.inputState.flushIOSKey(t))return true;if(st.android&&(i.from==r.from&&i.to==r.to&&i.insert.length==1&&i.insert.lines==2&&N(t.contentDOM,"Enter",13)||i.from==r.from-1&&i.to==r.to&&i.insert.length==0&&N(t.contentDOM,"Backspace",8)||i.from==r.from&&i.to==r.to+1&&i.insert.length==0&&N(t.contentDOM,"Delete",46)))return true;let o=i.insert.toString();if(t.state.facet(Ft).some((e=>e(t,i.from,i.to,o))))return true;if(t.inputState.composing>=0)t.inputState.composing++;let l;if(i.from>=r.from&&i.to<=r.to&&i.to-i.from>=(r.to-r.from)/3&&(!n||n.main.empty&&n.main.from==i.from+i.insert.length)&&t.inputState.composing<0){let s=r.from<i.from?e.sliceDoc(r.from,i.from):"";let n=r.to>i.to?e.sliceDoc(i.to,r.to):"";l=e.replaceSelection(t.state.toText(s+i.insert.sliceString(0,undefined,t.state.lineBreak)+n))}else{let o=e.changes(i);let h=n&&!e.selection.main.eq(n.main)&&n.main.to<=o.newLength?n.main:undefined;if(e.selection.ranges.length>1&&t.inputState.composing>=0&&i.to<=r.to&&i.to>=r.to-10){let n=t.state.sliceDoc(i.from,i.to);let a=Te(t)||t.state.doc.lineAt(r.head);let f=r.to-i.to,c=r.to-r.from;l=e.changeByRange((l=>{if(l.from==r.from&&l.to==r.to)return{changes:o,range:h||l.map(o)};let u=l.to-f,d=u-n.length;if(l.to-l.from!=c||t.state.sliceDoc(d,u)!=n||a&&l.to>=a.from&&l.from<=a.to)return{range:l};let p=e.changes({from:d,to:u,insert:i.insert}),g=l.to-r.to;return{changes:p,range:!h?l.map(p):s.jT.range(Math.max(0,h.anchor+g),Math.max(0,h.head+g))}}))}else{l={changes:o,selection:h&&e.selection.replaceRange(h)}}}let h="input.type";if(t.composing){h+=".compose";if(t.inputState.compositionFirstChange){h+=".start";t.inputState.compositionFirstChange=false}}t.dispatch(l,{scrollIntoView:true,userEvent:h});return true}else if(n&&!n.main.eq(r)){let e=false,i="select";if(t.inputState.lastSelectionTime>Date.now()-50){if(t.inputState.lastSelectionOrigin=="select")e=true;i=t.inputState.lastSelectionOrigin}t.dispatch({selection:n,scrollIntoView:e,userEvent:i});return true}else{return false}}function ms(t,e,i,s){let n=Math.min(t.length,e.length);let r=0;while(r<n&&t.charCodeAt(r)==e.charCodeAt(r))r++;if(r==n&&t.length==e.length)return null;let o=t.length,l=e.length;while(o>0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1)){o--;l--}if(s=="end"){let t=Math.max(0,r-Math.min(o,l));i-=o+t-r}if(o<r&&t.length<e.length){let t=i<=r&&i>=o?r-i:0;r-=t;l=r+(l-o);o=r}else if(l<r){let t=i<=r&&i>=l?r-i:0;r-=t;o=r+(o-l);l=r}return{from:r,toA:o,toB:l}}function ws(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:s,focusNode:n,focusOffset:r}=t.observer.selectionRange;if(i){e.push(new Me(i,s));if(n!=i||r!=s)e.push(new Me(n,r))}return e}function vs(t,e){if(t.length==0)return null;let i=t[0].pos,n=t.length==2?t[1].pos:i;return i>-1&&n>-1?s.jT.single(i+e,n+e):null}const ys={childList:true,characterData:true,subtree:true,attributes:true,characterDataOldValue:true};const bs=st.ie&&st.ie_version<=11;class xs{constructor(t){this.view=t;this.active=false;this.selectionRange=new E;this.selectionChanged=false;this.delayedFlush=-1;this.resizeTimeout=-1;this.queue=[];this.delayedAndroidKey=null;this.flushingAndroidKey=-1;this.lastChange=0;this.scrollTargets=[];this.intersection=null;this.resizeScroll=null;this.resizeContent=null;this.intersecting=false;this.gapIntersection=null;this.gaps=[];this.parentCheck=-1;this.dom=t.contentDOM;this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);if((st.ie&&st.ie_version<=11||st.ios&&t.composing)&&e.some((t=>t.type=="childList"&&t.removedNodes.length||t.type=="characterData"&&t.oldValue.length>t.target.nodeValue.length)))this.flushSoon();else this.flush()}));if(bs)this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue});this.flushSoon()};this.onSelectionChange=this.onSelectionChange.bind(this);this.onResize=this.onResize.bind(this);this.onPrint=this.onPrint.bind(this);this.onScroll=this.onScroll.bind(this);if(typeof ResizeObserver=="function"){this.resizeScroll=new ResizeObserver((()=>{var t;if(((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75)this.onResize()}));this.resizeScroll.observe(t.scrollDOM);this.resizeContent=new ResizeObserver((()=>this.view.requestMeasure()));this.resizeContent.observe(t.contentDOM)}this.addWindowListeners(this.win=t.win);this.start();if(typeof IntersectionObserver=="function"){this.intersection=new IntersectionObserver((t=>{if(this.parentCheck<0)this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3);if(t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting){this.intersecting=!this.intersecting;if(this.intersecting!=this.view.inView)this.onScrollChanged(document.createEvent("Event"))}}),{});this.intersection.observe(this.dom);this.gapIntersection=new IntersectionObserver((t=>{if(t.length>0&&t[t.length-1].intersectionRatio>0)this.onScrollChanged(document.createEvent("Event"))}),{})}this.listenForScroll();this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runScrollHandlers(this.view,t);if(this.intersecting)this.view.measure()}onScroll(t){if(this.intersecting)this.flush(false);this.onScrollChanged(t)}onResize(){if(this.resizeTimeout<0)this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1;this.view.requestMeasure()}),50)}onPrint(){this.view.viewState.printing=true;this.view.measure();setTimeout((()=>{this.view.viewState.printing=false;this.view.requestMeasure()}),500)}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,s=this.selectionRange;if(i.state.facet(Gt)?i.root.activeElement!=this.dom:!y(i.dom,s))return;let n=s.anchorNode&&i.docView.nearest(s.anchorNode);if(n&&n.ignoreEvent(t)){if(!e)this.selectionChanged=false;return}if((st.ie&&st.ie_version<=11||st.android&&st.chrome)&&!i.state.selection.main.empty&&s.focusNode&&x(s.focusNode,s.focusOffset,s.anchorNode,s.anchorOffset))this.flushSoon();else this.flush(false)}readSelectionRange(){let{view:t}=this;let e=st.safari&&t.root.nodeType==11&&v(this.dom.ownerDocument)==this.dom&&ks(this.view)||m(t.root);if(!e||this.selectionRange.eq(e))return false;let i=y(this.dom,e);if(i&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime<Date.now()-300&&I(this.dom,e)){this.view.inputState.lastFocusTime=0;t.docView.updateSelection();return false}this.selectionRange.setRange(e);if(i)this.selectionChanged=true;return true}setSelectionRange(t,e){this.selectionRange.set(t.node,t.offset,e.node,e.offset);this.selectionChanged=false}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let t=0,e=null;for(let i=this.dom;i;){if(i.nodeType==1){if(!e&&t<this.scrollTargets.length&&this.scrollTargets[t]==i)t++;else if(!e)e=this.scrollTargets.slice(0,t);if(e)e.push(i);i=i.assignedSlot||i.parentNode}else if(i.nodeType==11){i=i.host}else{break}}if(t<this.scrollTargets.length&&!e)e=this.scrollTargets.slice(0,t);if(e){for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);for(let t of this.scrollTargets=e)t.addEventListener("scroll",this.onScroll)}}ignore(t){if(!this.active)return t();try{this.stop();return t()}finally{this.start();this.clear()}}start(){if(this.active)return;this.observer.observe(this.dom,ys);if(bs)this.dom.addEventListener("DOMCharacterDataModified",this.onCharData);this.active=true}stop(){if(!this.active)return;this.active=false;this.observer.disconnect();if(bs)this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData)}clear(){this.processRecords();this.queue.length=0;this.selectionChanged=false}delayAndroidKey(t,e){var i;if(!this.delayedAndroidKey){let t=()=>{let t=this.delayedAndroidKey;if(t){this.clearDelayedAndroidKey();if(!this.flush()&&t.force)N(this.dom,t.key,t.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}if(!this.delayedAndroidKey||t=="Enter")this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange<Date.now()-50||!!((i=this.delayedAndroidKey)===null||i===void 0?void 0:i.force)}}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey);this.delayedAndroidKey=null;this.flushingAndroidKey=-1}flushSoon(){if(this.delayedFlush<0)this.delayedFlush=this.view.win.requestAnimationFrame((()=>{this.delayedFlush=-1;this.flush()}))}forceFlush(){if(this.delayedFlush>=0){this.view.win.cancelAnimationFrame(this.delayedFlush);this.delayedFlush=-1}this.flush()}processRecords(){let t=this.queue;for(let n of this.observer.takeRecords())t.push(n);if(t.length)this.queue=[];let e=-1,i=-1,s=false;for(let n of t){let t=this.readMutation(n);if(!t)continue;if(t.typeOver)s=true;if(e==-1){({from:e,to:i}=t)}else{e=Math.min(t.from,e);i=Math.max(t.to,i)}}return{from:e,to:i,typeOver:s}}readChange(){let{from:t,to:e,typeOver:i}=this.processRecords();let s=this.selectionChanged&&y(this.dom,this.selectionRange);if(t<0&&!s)return null;if(t>-1)this.lastChange=Date.now();this.view.inputState.lastFocusTime=0;this.selectionChanged=false;return new ps(this.view,t,e,i)}flush(t=true){if(this.delayedFlush>=0||this.delayedAndroidKey)return false;if(t)this.readSelectionRange();let e=this.readChange();if(!e)return false;let i=this.view.state;let s=gs(this.view,e);if(this.view.state==i)this.view.update([]);return s}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;e.markDirty(t.type=="attributes");if(t.type=="attributes")e.dirty|=4;if(t.type=="childList"){let i=Ss(e,t.previousSibling||t.target.previousSibling,-1);let s=Ss(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:s?e.posBefore(s):e.posAtEnd,typeOver:false}}else if(t.type=="characterData"){return{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}}else{return null}}setWindow(t){if(t!=this.win){this.removeWindowListeners(this.win);this.win=t;this.addWindowListeners(this.win)}}addWindowListeners(t){t.addEventListener("resize",this.onResize);t.addEventListener("beforeprint",this.onPrint);t.addEventListener("scroll",this.onScroll);t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll);t.removeEventListener("resize",this.onResize);t.removeEventListener("beforeprint",this.onPrint);t.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var t,e,i,s;this.stop();(t=this.intersection)===null||t===void 0?void 0:t.disconnect();(e=this.gapIntersection)===null||e===void 0?void 0:e.disconnect();(i=this.resizeScroll)===null||i===void 0?void 0:i.disconnect();(s=this.resizeContent)===null||s===void 0?void 0:s.disconnect();for(let n of this.scrollTargets)n.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win);clearTimeout(this.parentCheck);clearTimeout(this.resizeTimeout);this.win.cancelAnimationFrame(this.delayedFlush);this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function Ss(t,e,i){while(e){let s=z.get(e);if(s&&s.parent==t)return s;let n=e.parentNode;e=n!=t.dom?n:i>0?e.nextSibling:e.previousSibling}return null}function ks(t){let e=null;function i(t){t.preventDefault();t.stopImmediatePropagation();e=t.getTargetRanges()[0]}t.contentDOM.addEventListener("beforeinput",i,true);t.dom.ownerDocument.execCommand("indent");t.contentDOM.removeEventListener("beforeinput",i,true);if(!e)return null;let s=e.startContainer,n=e.startOffset;let r=e.endContainer,o=e.endOffset;let l=t.docView.domAtPos(t.state.selection.main.anchor);if(x(l.node,l.offset,r,o))[s,n,r,o]=[r,o,s,n];return{anchorNode:s,anchorOffset:n,focusNode:r,focusOffset:o}}class Ms{constructor(t={}){this.plugins=[];this.pluginMap=new Map;this.editorAttrs={};this.contentAttrs={};this.bidiCache=[];this.destroyed=false;this.updateState=2;this.measureScheduled=-1;this.measureRequests=[];this.contentDOM=document.createElement("div");this.scrollDOM=document.createElement("div");this.scrollDOM.tabIndex=-1;this.scrollDOM.className="cm-scroller";this.scrollDOM.appendChild(this.contentDOM);this.announceDOM=document.createElement("div");this.announceDOM.style.cssText="position: fixed; top: -10000px";this.announceDOM.setAttribute("aria-live","polite");this.dom=document.createElement("div");this.dom.appendChild(this.announceDOM);this.dom.appendChild(this.scrollDOM);this._dispatch=t.dispatch||(t=>this.update([t]));this.dispatch=this.dispatch.bind(this);this._root=t.root||V(t.parent)||document;this.viewState=new Yi(t.state||s.yy.create(t));this.plugins=this.state.facet(Xt).map((t=>new Jt(t)));for(let e of this.plugins)e.update(this);this.observer=new xs(this);this.inputState=new Ze(this);this.inputState.ensureHandlers(this,this.plugins);this.docView=new Ce(this);this.mountStyles();this.updateAttrs();this.updateState=0;this.requestMeasure();if(t.parent)t.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...t){this._dispatch(t.length==1&&t[0]instanceof s.YW?t[0]:this.state.update(...t))}update(t){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e=false,i=false,n;let r=this.state;for(let s of t){if(s.startState!=r)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");r=s.state}if(this.destroyed){this.viewState.state=r;return}let o=this.observer.delayedAndroidKey,l=null;if(o){this.observer.clearDelayedAndroidKey();l=this.observer.readChange();if(l&&!this.state.doc.eq(r.doc)||!this.state.selection.eq(r.selection))l=null}else{this.observer.clear()}if(r.facet(s.yy.phrases)!=this.state.facet(s.yy.phrases))return this.setState(r);n=ne.create(this,r,t);let h=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(h)h=h.map(e.changes);if(e.scrollIntoView){let{main:t}=e.state.selection;h=new jt(t.empty?t:s.jT.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)if(t.is($t))h=t.value}this.viewState.update(n,h);this.bidiCache=Ds.update(this.bidiCache,n.changes);if(!n.empty){this.updatePlugins(n);this.inputState.update(n)}e=this.docView.update(n);if(this.state.facet(ie)!=this.styleModules)this.mountStyles();i=this.updateAttrs();this.showAnnouncements(t);this.docView.updateSelection(e,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(n.startState.facet(os)!=n.state.facet(os))this.viewState.mustMeasureContent=true;if(e||i||h||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)this.requestMeasure();if(!n.empty)for(let s of this.state.facet(Wt))s(n);if(l){if(!gs(this,l)&&o.force)N(this.contentDOM,o.key,o.keyCode)}}setState(t){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=t;return}this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Yi(t);this.plugins=t.facet(Xt).map((t=>new Jt(t)));this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView=new Ce(this);this.inputState.ensureHandlers(this,this.plugins);this.mountStyles();this.updateAttrs();this.bidiCache=[]}finally{this.updateState=0}if(e)this.focus();this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(Xt),i=t.state.facet(Xt);if(e!=i){let s=[];for(let n of i){let i=e.indexOf(n);if(i<0){s.push(new Jt(n))}else{let e=this.plugins[i];e.mustUpdate=t;s.push(e)}}for(let e of this.plugins)if(e.mustUpdate!=t)e.destroy(this);this.plugins=s;this.pluginMap.clear();this.inputState.ensureHandlers(this,this.plugins)}else{for(let e of this.plugins)e.mustUpdate=t}for(let s=0;s<this.plugins.length;s++)this.plugins[s].update(this)}measure(t=true){if(this.destroyed)return;if(this.measureScheduled>-1)cancelAnimationFrame(this.measureScheduled);this.measureScheduled=0;if(t)this.observer.forceFlush();let e=null;let{scrollHeight:i,scrollTop:s,clientHeight:n}=this.scrollDOM;let r=s>i-n-4?i:s;try{for(let t=0;;t++){this.updateState=1;let i=this.viewport;let s=this.viewState.lineBlockAtHeight(r);let n=this.viewState.measure(this);if(!n&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];if(!(n&4))[this.measureRequests,l]=[l,this.measureRequests];let h=l.map((t=>{try{return t.read(this)}catch(e){Kt(this.state,e);return As}}));let a=ne.create(this,this.state,[]),f=false,c=false;a.flags|=n;if(!e)e=a;else e.flags|=n;this.updateState=2;if(!a.empty){this.updatePlugins(a);this.inputState.update(a);this.updateAttrs();f=this.docView.update(a)}for(let t=0;t<l.length;t++)if(h[t]!=As){try{let e=l[t];if(e.write)e.write(h[t],this)}catch(o){Kt(this.state,o)}}if(this.viewState.editorHeight){if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget);this.viewState.scrollTarget=null;c=true}else{let t=this.viewState.lineBlockAt(s.from).top-s.top;if(t>1||t<-1){this.scrollDOM.scrollTop+=t;c=true}}}if(f)this.docView.updateSelection(true);if(this.viewport.from==i.from&&this.viewport.to==i.to&&!c&&this.measureRequests.length==0)break}}finally{this.updateState=0;this.measureScheduled=-1}if(e&&!e.empty)for(let l of this.state.facet(Wt))l(e)}get themeClasses(){return hs+" "+(this.state.facet(ls)?fs:as)+" "+this.state.facet(os)}updateAttrs(){let t=Ts(this,Yt,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses});let e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:!this.state.facet(Gt)?"false":"true",class:"cm-content",style:`${st.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};if(this.state.readOnly)e["aria-readonly"]="true";Ts(this,Qt,e);let i=this.observer.ignore((()=>{let i=bt(this.contentDOM,this.contentAttrs,e);let s=bt(this.dom,this.editorAttrs,t);return i||s}));this.editorAttrs=t;this.contentAttrs=e;return i}showAnnouncements(t){let e=true;for(let i of t)for(let t of i.effects)if(t.is(Ms.announce)){if(e)this.announceDOM.textContent="";e=false;let i=this.announceDOM.appendChild(document.createElement("div"));i.textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(ie);n.StyleModule.mount(this.root,this.styleModules.concat(ds).reverse())}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");if(this.updateState==0&&this.measureScheduled>-1)this.measure(false)}requestMeasure(t){if(this.measureScheduled<0)this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()));if(t){if(t.key!=null)for(let e=0;e<this.measureRequests.length;e++){if(this.measureRequests[e].key===t.key){this.measureRequests[e]=t;return}}this.measureRequests.push(t)}}plugin(t){let e=this.pluginMap.get(t);if(e===undefined||e&&e.spec!=t)this.pluginMap.set(t,e=this.plugins.find((e=>e.spec==t))||null);return e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(t){this.readMeasured();return this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){this.readMeasured();return this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return Qe(this,t,Ue(this,t,e,i))}moveByGroup(t,e){return Qe(this,t,Ue(this,t,e,(e=>Je(this,t.head,e))))}moveToLineBoundary(t,e,i=true){return Xe(this,t,e,i)}moveVertically(t,e,i){return Qe(this,t,Ye(this,t,e,i))}domAtPos(t){return this.docView.domAtPos(t)}posAtDOM(t,e=0){return this.docView.posFromDOM(t,e)}posAtCoords(t,e=true){this.readMeasured();return $e(this,t,e)}coordsAtPos(t,e=1){this.readMeasured();let i=this.docView.coordsAt(t,e);if(!i||i.left==i.right)return i;let s=this.state.doc.lineAt(t),n=this.bidiSpans(s);let r=n[ge.find(n,t-s.from,-1,e)];return A(i,r.dir==re.LTR==e>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){let e=this.state.facet(zt);if(!e||t<this.viewport.from||t>this.viewport.to)return this.textDirection;this.readMeasured();return this.docView.textDirectionAt(t)}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>Cs)return ve(t.length);let e=this.textDirectionAt(t.from);for(let s of this.bidiCache)if(s.from==t.from&&s.dir==e)return s.order;let i=we(t.text,e);this.bidiCache.push(new Ds(t.from,t.to,e,i));return i}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||st.safari&&((t=this.inputState)===null||t===void 0?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{B(this.contentDOM);this.docView.updateSelection()}))}setRoot(t){if(this._root!=t){this._root=t;this.observer.setWindow((t.nodeType==9?t:t.ownerDocument).defaultView||window);this.mountStyles()}}destroy(){for(let t of this.plugins)t.destroy(this);this.plugins=[];this.inputState.destroy();this.dom.remove();this.observer.destroy();if(this.measureScheduled>-1)cancelAnimationFrame(this.measureScheduled);this.destroyed=true}static scrollIntoView(t,e={}){return $t.of(new jt(typeof t=="number"?s.jT.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}static domEventHandlers(t){return Ut.define((()=>({})),{eventHandlers:t})}static theme(t,e){let i=n.StyleModule.newName();let s=[os.of(i),ie.of(us(`.${i}`,t))];if(e&&e.dark)s.push(ls.of(true));return s}static baseTheme(t){return s.Wl.lowest(ie.of(us("."+hs,t,cs)))}static findFromDOM(t){var e;let i=t.querySelector(".cm-content");let s=i&&z.get(i)||z.get(t);return((e=s===null||s===void 0?void 0:s.rootView)===null||e===void 0?void 0:e.view)||null}}Ms.styleModule=ie;Ms.inputHandler=Ft;Ms.perLineTextDirection=zt;Ms.exceptionSink=It;Ms.updateListener=Wt;Ms.editable=Gt;Ms.mouseSelectionStyle=Ht;Ms.dragMovesSelection=Vt;Ms.clickAddsSelectionRange=Nt;Ms.decorations=Zt;Ms.atomicRanges=te;Ms.scrollMargins=ee;Ms.darkTheme=ls;Ms.contentAttributes=Qt;Ms.editorAttributes=Yt;Ms.lineWrapping=Ms.contentAttributes.of({class:"cm-lineWrapping"});Ms.announce=s.Py.define();const Cs=4096;const As={};class Ds{constructor(t,e,i,s){this.from=t;this.to=e;this.dir=i;this.order=s}static update(t,e){if(e.empty)return t;let i=[],s=t.length?t[t.length-1].dir:re.LTR;for(let n=Math.max(0,t.length-10);n<t.length;n++){let r=t[n];if(r.dir==s&&!e.touchesRange(r.from,r.to))i.push(new Ds(e.mapPos(r.from,1),e.mapPos(r.to,-1),r.dir,r.order))}return i}}function Ts(t,e,i){for(let s=t.state.facet(e),n=s.length-1;n>=0;n--){let e=s[n],r=typeof e=="function"?e(t):e;if(r)vt(r,i)}return i}const Os=st.mac?"mac":st.windows?"win":st.linux?"linux":"key";function Es(t,e){const i=t.split(/-(?!$)/);let s=i[i.length-1];if(s=="Space")s=" ";let n,r,o,l;for(let h=0;h<i.length-1;++h){const t=i[h];if(/^(cmd|meta|m)$/i.test(t))l=true;else if(/^a(lt)?$/i.test(t))n=true;else if(/^(c|ctrl|control)$/i.test(t))r=true;else if(/^s(hift)?$/i.test(t))o=true;else if(/^mod$/i.test(t)){if(e=="mac")l=true;else r=true}else throw new Error("Unrecognized modifier name: "+t)}if(n)s="Alt-"+s;if(r)s="Ctrl-"+s;if(l)s="Meta-"+s;if(o)s="Shift-"+s;return s}function Rs(t,e,i){if(e.altKey)t="Alt-"+t;if(e.ctrlKey)t="Ctrl-"+t;if(e.metaKey)t="Meta-"+t;if(i!==false&&e.shiftKey)t="Shift-"+t;return t}const Bs=s.Wl["default"](Ms.domEventHandlers({keydown(t,e){return Fs(Ns(e.state),t,e,"editor")}}));const Ls=s.r$.define({enables:Bs});const Ps=new WeakMap;function Ns(t){let e=t.facet(Ls);let i=Ps.get(e);if(!i)Ps.set(e,i=Ws(e.reduce(((t,e)=>t.concat(e)),[])));return i}function Vs(t,e,i){return Fs(Ns(t.state),e,t,i)}let Hs=null;const Is=4e3;function Ws(t,e=Os){let i=Object.create(null);let s=Object.create(null);let n=(t,e)=>{let i=s[t];if(i==null)s[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")};let r=(t,s,r,o)=>{var l,h;let a=i[t]||(i[t]=Object.create(null));let f=s.split(/ (?!$)/).map((t=>Es(t,e)));for(let e=1;e<f.length;e++){let i=f.slice(0,e).join(" ");n(i,true);if(!a[i])a[i]={preventDefault:true,run:[e=>{let s=Hs={view:e,prefix:i,scope:t};setTimeout((()=>{if(Hs==s)Hs=null}),Is);return true}]}}let c=f.join(" ");n(c,false);let u=a[c]||(a[c]={preventDefault:false,run:((h=(l=a._any)===null||l===void 0?void 0:l.run)===null||h===void 0?void 0:h.slice())||[]});if(r)u.run.push(r);if(o)u.preventDefault=true};for(let o of t){let t=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let e of t){let t=i[e]||(i[e]=Object.create(null));if(!t._any)t._any={preventDefault:false,run:[]};for(let e in t)t[e].run.push(o.any)}let s=o[e]||o.key;if(!s)continue;for(let e of t){r(e,s,o.run,o.preventDefault);if(o.shift)r(e,"Shift-"+s,o.shift,o.preventDefault)}}return i}function Fs(t,e,i,n){let l=g(e);let h=(0,s.gm)(l,0),a=(0,s.nZ)(h)==l.length&&l!=" ";let f="",c=false;if(Hs&&Hs.view==i&&Hs.scope==n){f=Hs.prefix+" ";if(c=ii.indexOf(e.keyCode)<0)Hs=null}let u=new Set;let d=t=>{if(t){for(let s of t.run)if(!u.has(s)){u.add(s);if(s(i,e))return true}if(t.preventDefault)c=true}return false};let p=t[n],m,w;if(p){if(d(p[f+Rs(l,e,!a)]))return true;if(a&&(e.altKey||e.metaKey||e.ctrlKey)&&(m=r[e.keyCode])&&m!=l){if(d(p[f+Rs(m,e,true)]))return true;else if(e.shiftKey&&(w=o[e.keyCode])!=l&&w!=m&&d(p[f+Rs(w,e,false)]))return true}else if(a&&e.shiftKey){if(d(p[f+Rs(l,e,true)]))return true}if(d(p._any))return true}return c}class zs{constructor(t,e,i,s,n){this.className=t;this.left=e;this.top=i;this.width=s;this.height=n}draw(){let t=document.createElement("div");t.className=this.className;this.adjust(t);return t}update(t,e){if(e.className!=this.className)return false;this.adjust(t);return true}adjust(t){t.style.left=this.left+"px";t.style.top=this.top+"px";if(this.width!=null)t.style.width=this.width+"px";t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,i){if(i.empty){let s=t.coordsAtPos(i.head,i.assoc||1);if(!s)return[];let n=qs(t);return[new zs(e,s.left-n.left,s.top-n.top,null,s.bottom-s.top)]}else{return Ks(t,e,i)}}}function qs(t){let e=t.scrollDOM.getBoundingClientRect();let i=t.textDirection==re.LTR?e.left:e.right-t.scrollDOM.clientWidth;return{left:i-t.scrollDOM.scrollLeft,top:e.top-t.scrollDOM.scrollTop}}function js(t,e,i){let n=s.jT.cursor(e);return{from:Math.max(i.from,t.moveToLineBoundary(n,false,true).from),to:Math.min(i.to,t.moveToLineBoundary(n,true,true).from),type:St.Text}}function $s(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let s of i.type){if(s.to>e||s.to==e&&(s.to==i.to||s.type==St.Text))return s}return i}function Ks(t,e,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let s=Math.max(i.from,t.viewport.from),n=Math.min(i.to,t.viewport.to);let r=t.textDirection==re.LTR;let o=t.contentDOM,l=o.getBoundingClientRect(),h=qs(t);let a=window.getComputedStyle(o.firstChild);let f=l.left+parseInt(a.paddingLeft)+Math.min(0,parseInt(a.textIndent));let c=l.right-parseInt(a.paddingRight);let u=$s(t,s),d=$s(t,n);let p=u.type==St.Text?u:null;let g=d.type==St.Text?d:null;if(t.lineWrapping){if(p)p=js(t,s,p);if(g)g=js(t,n,g)}if(p&&g&&p.from==g.from){return w(v(i.from,i.to,p))}else{let e=p?v(i.from,null,p):y(u,false);let s=g?v(null,i.to,g):y(d,true);let n=[];if((p||u).to<(g||d).from-1)n.push(m(f,e.bottom,c,s.top));else if(e.bottom<s.top&&t.elementAtHeight((e.bottom+s.top)/2).type==St.Text)e.bottom=s.top=(e.bottom+s.top)/2;return w(e).concat(n).concat(w(s))}function m(t,i,s,n){return new zs(e,t-h.left,i-h.top-.01,s-t,n-i+.01)}function w({top:t,bottom:e,horizontal:i}){let s=[];for(let n=0;n<i.length;n+=2)s.push(m(i[n],t,i[n+1],e));return s}function v(e,i,s){let n=1e9,o=-1e9,l=[];function h(e,i,h,a,u){let d=t.coordsAtPos(e,e==s.to?-2:2);let p=t.coordsAtPos(h,h==s.from?2:-2);n=Math.min(d.top,p.top,n);o=Math.max(d.bottom,p.bottom,o);if(u==re.LTR)l.push(r&&i?f:d.left,r&&a?c:p.right);else l.push(!r&&a?f:p.left,!r&&i?c:d.right)}let a=e!==null&&e!==void 0?e:s.from,u=i!==null&&i!==void 0?i:s.to;for(let r of t.visibleRanges)if(r.to>a&&r.from<u){for(let s=Math.max(r.from,a),n=Math.min(r.to,u);;){let r=t.state.doc.lineAt(s);for(let o of t.bidiSpans(r)){let t=o.from+r.from,l=o.to+r.from;if(t>=n)break;if(l>s)h(Math.max(t,s),e==null&&t<=a,Math.min(l,n),i==null&&l>=u,o.dir)}s=r.to+1;if(s>=n)break}}if(l.length==0)h(a,e==null,u,i==null,t.textDirection);return{top:n,bottom:o,horizontal:l}}function y(t,e){let i=l.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}function Gs(t,e){return t.constructor==e.constructor&&t.eq(e)}class _s{constructor(t,e){this.view=t;this.layer=e;this.drawn=[];this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)};this.dom=t.scrollDOM.appendChild(document.createElement("div"));this.dom.classList.add("cm-layer");if(e.above)this.dom.classList.add("cm-layer-above");if(e.class)this.dom.classList.add(e.class);this.dom.setAttribute("aria-hidden","true");this.setOrder(t.state);t.requestMeasure(this.measureReq);if(e.mount)e.mount(this.dom,t)}update(t){if(t.startState.facet(Xs)!=t.state.facet(Xs))this.setOrder(t.state);if(this.layer.update(t,this.dom)||t.geometryChanged)t.view.requestMeasure(this.measureReq)}setOrder(t){let e=0,i=t.facet(Xs);while(e<i.length&&i[e]!=this.layer)e++;this.dom.style.zIndex=String((this.layer.above?150:-1)-e)}measure(){return this.layer.markers(this.view)}draw(t){if(t.length!=this.drawn.length||t.some(((t,e)=>!Gs(t,this.drawn[e])))){let e=this.dom.firstChild,i=0;for(let s of t){if(s.update&&e&&s.constructor&&this.drawn[i].constructor&&s.update(e,this.drawn[i])){e=e.nextSibling;i++}else{this.dom.insertBefore(s.draw(),e)}}while(e){let t=e.nextSibling;e.remove();e=t}this.drawn=t}}destroy(){if(this.layer.destroy)this.layer.destroy(this.dom,this.view);this.dom.remove()}}const Xs=s.r$.define();function Us(t){return[Ut.define((e=>new _s(e,t))),Xs.of(t)]}const Js=!st.ios;const Ys=s.r$.define({combine(t){return(0,s.BO)(t,{cursorBlinkRate:1200,drawRangeCursor:true},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})}});function Qs(t={}){return[Ys.of(t),tn,sn,rn,qt.of(true)]}function Zs(t){return t.startState.facet(Ys)!=t.startState.facet(Ys)}const tn=Us({above:true,markers(t){let{state:e}=t,i=e.facet(Ys);let n=[];for(let r of e.selection.ranges){let o=r==e.selection.main;if(r.empty?!o||Js:i.drawRangeCursor){let e=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary";let i=r.empty?r:s.jT.cursor(r.head,r.head>r.anchor?-1:1);for(let s of zs.forRange(t,e,i))n.push(s)}}return n},update(t,e){if(t.transactions.some((t=>t.scrollIntoView)))e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink";let i=Zs(t);if(i)en(t.state,e);return t.docChanged||t.selectionSet||i},mount(t,e){en(e.state,t)},class:"cm-cursorLayer"});function en(t,e){e.style.animationDuration=t.facet(Ys).cursorBlinkRate+"ms"}const sn=Us({above:false,markers(t){return t.state.selection.ranges.map((e=>e.empty?[]:zs.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e)))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||Zs(t)},class:"cm-selectionLayer"});const nn={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};if(Js)nn[".cm-line"].caretColor="transparent !important";const rn=null&&Prec.highest(Ms.theme(nn));const on=s.Py.define({map(t,e){return t==null?null:e.mapPos(t)}});const ln=s.QQ.define({create(){return null},update(t,e){if(t!=null)t=e.changes.mapPos(t);return e.effects.reduce(((t,e)=>e.is(on)?e.value:t),t)}});const hn=Ut.fromClass(class{constructor(t){this.view=t;this.cursor=null;this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let i=t.state.field(ln);if(i==null){if(this.cursor!=null){(e=this.cursor)===null||e===void 0?void 0:e.remove();this.cursor=null}}else{if(!this.cursor){this.cursor=this.view.scrollDOM.appendChild(document.createElement("div"));this.cursor.className="cm-dropCursor"}if(t.startState.field(ln)!=i||t.docChanged||t.geometryChanged)this.view.requestMeasure(this.measureReq)}}readPos(){let t=this.view.state.field(ln);let e=t!=null&&this.view.coordsAtPos(t);if(!e)return null;let i=this.view.scrollDOM.getBoundingClientRect();return{left:e.left-i.left+this.view.scrollDOM.scrollLeft,top:e.top-i.top+this.view.scrollDOM.scrollTop,height:e.bottom-e.top}}drawCursor(t){if(this.cursor){if(t){this.cursor.style.left=t.left+"px";this.cursor.style.top=t.top+"px";this.cursor.style.height=t.height+"px"}else{this.cursor.style.left="-100000px"}}}destroy(){if(this.cursor)this.cursor.remove()}setDropPos(t){if(this.view.state.field(ln)!=t)this.view.dispatch({effects:on.of(t)})}},{eventHandlers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){if(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function an(){return[ln,hn]}function fn(t,e,i,s,n){e.lastIndex=0;for(let r=t.iterRange(i,s),o=i,l;!r.next().done;o+=r.value.length){if(!r.lineBreak)while(l=e.exec(r.value))n(o+l.index,l)}}function cn(t,e){let i=t.visibleRanges;if(i.length==1&&i[0].from==t.viewport.from&&i[0].to==t.viewport.to)return i;let s=[];for(let{from:n,to:r}of i){n=Math.max(t.state.doc.lineAt(n).from,n-e);r=Math.min(t.state.doc.lineAt(r).to,r+e);if(s.length&&s[s.length-1].to>=n)s[s.length-1].to=r;else s.push({from:n,to:r})}return s}class un{constructor(t){const{regexp:e,decoration:i,decorate:s,boundary:n,maxLength:r=1e3}=t;if(!e.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");this.regexp=e;if(s){this.addMatch=(t,e,i,n)=>s(n,i,i+t[0].length,t,e)}else if(typeof i=="function"){this.addMatch=(t,e,s,n)=>{let r=i(t,e,s);if(r)n(s,s+t[0].length,r)}}else if(i){this.addMatch=(t,e,s,n)=>n(s,s+t[0].length,i)}else{throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator")}this.boundary=n;this.maxLength=r}createDeco(t){let e=new s.f_,i=e.add.bind(e);for(let{from:s,to:n}of cn(t,this.maxLength))fn(t.state.doc,this.regexp,s,n,((e,s)=>this.addMatch(s,t,e,i)));return e.finish()}updateDeco(t,e){let i=1e9,s=-1;if(t.docChanged)t.changes.iterChanges(((e,n,r,o)=>{if(o>t.view.viewport.from&&r<t.view.viewport.to){i=Math.min(r,i);s=Math.max(o,s)}}));if(t.viewportChanged||s-i>1e3)return this.createDeco(t.view);if(s>-1)return this.updateRange(t.view,e.map(t.changes),i,s);return e}updateRange(t,e,i,s){for(let n of t.visibleRanges){let r=Math.max(n.from,i),o=Math.min(n.to,s);if(o>r){let i=t.state.doc.lineAt(r),s=i.to<o?t.state.doc.lineAt(o):i;let l=Math.max(n.from,i.from),h=Math.min(n.to,s.to);if(this.boundary){for(;r>i.from;r--)if(this.boundary.test(i.text[r-1-i.from])){l=r;break}for(;o<s.to;o++)if(this.boundary.test(s.text[o-s.from])){h=o;break}}let a=[],f;let c=(t,e,i)=>a.push(i.range(t,e));if(i==s){this.regexp.lastIndex=l-i.from;while((f=this.regexp.exec(i.text))&&f.index<h-i.from)this.addMatch(f,t,f.index+i.from,c)}else{fn(t.state.doc,this.regexp,l,h,((e,i)=>this.addMatch(i,t,e,c)))}e=e.update({filterFrom:l,filterTo:h,filter:(t,e)=>t<l||e>h,add:a})}}return e}}const dn=/x/.unicode!=null?"gu":"g";const pn=new RegExp("[\0-\b\n--\u2028\u2029\ufeff-]",dn);const gn={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let mn=null;function wn(){var t;if(mn==null&&typeof document!="undefined"&&document.body){let e=document.body.style;mn=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return mn||false}const vn=s.r$.define({combine(t){let e=(0,s.BO)(t,{render:null,specialChars:pn,addSpecialChars:null});if(e.replaceTabs=!wn())e.specialChars=new RegExp("\t|"+e.specialChars.source,dn);if(e.addSpecialChars)e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,dn);return e}});function yn(t={}){return[vn.of(t),xn()]}let bn=null;function xn(){return bn||(bn=Ut.fromClass(class{constructor(t){this.view=t;this.decorations=kt.none;this.decorationCache=Object.create(null);this.decorator=this.makeDecorator(t.state.facet(vn));this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new un({regexp:t.specialChars,decoration:(e,i,s)=>{let{doc:n}=i.state;let r=codePointAt(e[0],0);if(r==9){let t=n.lineAt(s);let e=i.state.tabSize,r=countColumn(t.text,e,s-t.from);return kt.replace({widget:new Cn((e-r%e)*this.view.defaultCharacterWidth)})}return this.decorationCache[r]||(this.decorationCache[r]=kt.replace({widget:new Mn(t,r)}))},boundary:t.replaceTabs?undefined:/[^]/})}update(t){let e=t.state.facet(vn);if(t.startState.facet(vn)!=e){this.decorator=this.makeDecorator(e);this.decorations=this.decorator.createDeco(t.view)}else{this.decorations=this.decorator.updateDeco(t,this.decorations)}}},{decorations:t=>t.decorations}))}const Sn="•";function kn(t){if(t>=32)return Sn;if(t==10)return"";return String.fromCharCode(9216+t)}class Mn extends(null&&xt){constructor(t,e){super();this.options=t;this.code=e}eq(t){return t.code==this.code}toDOM(t){let e=kn(this.code);let i=t.state.phrase("Control character")+" "+(gn[this.code]||"0x"+this.code.toString(16));let s=this.options.render&&this.options.render(this.code,i,e);if(s)return s;let n=document.createElement("span");n.textContent=e;n.title=i;n.setAttribute("aria-label",i);n.className="cm-specialChar";return n}ignoreEvent(){return false}}class Cn extends(null&&xt){constructor(t){super();this.width=t}eq(t){return t.width==this.width}toDOM(){let t=document.createElement("span");t.textContent="\t";t.className="cm-tab";t.style.width=this.width+"px";return t}ignoreEvent(){return false}}const An=null&&Ut.fromClass(class{constructor(){this.height=1e3;this.attrs={style:"padding-bottom: 1000px"}}update(t){let{view:e}=t;let i=e.viewState.editorHeight-e.defaultLineHeight-e.documentPadding.top-.5;if(i!=this.height){this.height=i;this.attrs={style:`padding-bottom: ${i}px`}}}});function Dn(){return[An,Qt.of((t=>{var e;return((e=t.plugin(An))===null||e===void 0?void 0:e.attrs)||null}))]}function Tn(){return En}const On=kt.line({class:"cm-activeLine"});const En=Ut.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){if(t.docChanged||t.selectionSet)this.decorations=this.getDeco(t.view)}getDeco(t){let e=-1,i=[];for(let s of t.state.selection.ranges){let n=t.lineBlockAt(s.head);if(n.from>e){i.push(On.range(n.from));e=n.from}}return kt.set(i)}},{decorations:t=>t.decorations});class Rn extends(null&&xt){constructor(t){super();this.content=t}toDOM(){let t=document.createElement("span");t.className="cm-placeholder";t.style.pointerEvents="none";t.appendChild(typeof this.content=="string"?document.createTextNode(this.content):this.content);if(typeof this.content=="string")t.setAttribute("aria-label","placeholder "+this.content);else t.setAttribute("aria-hidden","true");return t}ignoreEvent(){return false}}function Bn(t){return Ut.fromClass(class{constructor(e){this.view=e;this.placeholder=kt.set([kt.widget({widget:new Rn(t),side:1}).range(0)])}get decorations(){return this.view.state.doc.length?kt.none:this.placeholder}},{decorations:t=>t.decorations})}const Ln=2e3;function Pn(t,e,i){let s=Math.min(e.line,i.line),n=Math.max(e.line,i.line);let r=[];if(e.off>Ln||i.off>Ln||e.col<0||i.col<0){let o=Math.min(e.off,i.off),l=Math.max(e.off,i.off);for(let e=s;e<=n;e++){let i=t.doc.line(e);if(i.length<=l)r.push(EditorSelection.range(i.from+o,i.to+l))}}else{let o=Math.min(e.col,i.col),l=Math.max(e.col,i.col);for(let e=s;e<=n;e++){let i=t.doc.line(e);let s=findColumn(i.text,o,t.tabSize,true);if(s<0){r.push(EditorSelection.cursor(i.to))}else{let e=findColumn(i.text,l,t.tabSize);r.push(EditorSelection.range(i.from+s,i.from+e))}}}return r}function Nn(t,e){let i=t.coordsAtPos(t.viewport.from);return i?Math.round(Math.abs((i.left-e)/t.defaultCharacterWidth)):-1}function Vn(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},false);let s=t.state.doc.lineAt(i),n=i-s.from;let r=n>Ln?-1:n==s.length?Nn(t,e.clientX):countColumn(s.text,t.state.tabSize,i-s.from);return{line:s.number,col:r,off:n}}function Hn(t,e){let i=Vn(t,e),s=t.state.selection;if(!i)return null;return{update(t){if(t.docChanged){let e=t.changes.mapPos(t.startState.doc.line(i.line).from);let n=t.state.doc.lineAt(e);i={line:n.number,col:i.col,off:Math.min(i.off,n.length)};s=s.map(t.changes)}},get(e,n,r){let o=Vn(t,e);if(!o)return s;let l=Pn(t.state,i,o);if(!l.length)return s;if(r)return EditorSelection.create(l.concat(s.ranges));else return EditorSelection.create(l)}}}function In(t){let e=(t===null||t===void 0?void 0:t.eventFilter)||(t=>t.altKey&&t.button==0);return Ms.mouseSelectionStyle.of(((t,i)=>e(i)?Hn(t,i):null))}const Wn={Alt:[18,t=>t.altKey],Control:[17,t=>t.ctrlKey],Shift:[16,t=>t.shiftKey],Meta:[91,t=>t.metaKey]};const Fn={style:"cursor: crosshair"};function zn(t={}){let[e,i]=Wn[t.key||"Alt"];let s=Ut.fromClass(class{constructor(t){this.view=t;this.isDown=false}set(t){if(this.isDown!=t){this.isDown=t;this.view.update([])}}},{eventHandlers:{keydown(t){this.set(t.keyCode==e||i(t))},keyup(t){if(t.keyCode==e||!i(t))this.set(false)},mousemove(t){this.set(i(t))}}});return[s,Ms.contentAttributes.of((t=>{var e;return((e=t.plugin(s))===null||e===void 0?void 0:e.isDown)?Fn:null}))]}const qn="-10000px";class jn{constructor(t,e,i){this.facet=e;this.createTooltipView=i;this.input=t.state.facet(e);this.tooltips=this.input.filter((t=>t));this.tooltipViews=this.tooltips.map(i)}update(t){var e;let i=t.state.facet(this.facet);let s=i.filter((t=>t));if(i===this.input){for(let e of this.tooltipViews)if(e.update)e.update(t);return false}let n=[];for(let r=0;r<s.length;r++){let e=s[r],i=-1;if(!e)continue;for(let t=0;t<this.tooltips.length;t++){let s=this.tooltips[t];if(s&&s.create==e.create)i=t}if(i<0){n[r]=this.createTooltipView(e)}else{let e=n[r]=this.tooltipViews[i];if(e.update)e.update(t)}}for(let r of this.tooltipViews)if(n.indexOf(r)<0){r.dom.remove();(e=r.destroy)===null||e===void 0?void 0:e.call(r)}this.input=i;this.tooltips=s;this.tooltipViews=n;return true}}function $n(t={}){return Gn.of(t)}function Kn(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Gn=s.r$.define({combine:t=>{var e,i,s;return{position:st.ios?"absolute":((e=t.find((t=>t.position)))===null||e===void 0?void 0:e.position)||"fixed",parent:((i=t.find((t=>t.parent)))===null||i===void 0?void 0:i.parent)||null,tooltipSpace:((s=t.find((t=>t.tooltipSpace)))===null||s===void 0?void 0:s.tooltipSpace)||Kn}}});const _n=Ut.fromClass(class{constructor(t){this.view=t;this.inView=true;this.lastTransaction=0;this.measureTimeout=-1;let e=t.state.facet(Gn);this.position=e.position;this.parent=e.parent;this.classes=t.themeClasses;this.createContainer();this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this};this.manager=new jn(t,Jn,(t=>this.createTooltip(t)));this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver((t=>{if(Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1)this.measureSoon()}),{threshold:[1]}):null;this.observeIntersection();t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this));this.maybeMeasure()}createContainer(){if(this.parent){this.container=document.createElement("div");this.container.style.position="relative";this.container.className=this.view.themeClasses;this.parent.appendChild(this.container)}else{this.container=this.view.dom}}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){if(this.measureTimeout<0)this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1;this.maybeMeasure()}),50)}update(t){if(t.transactions.length)this.lastTransaction=Date.now();let e=this.manager.update(t);if(e)this.observeIntersection();let i=e||t.geometryChanged;let s=t.state.facet(Gn);if(s.position!=this.position){this.position=s.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=true}if(s.parent!=this.parent){if(this.parent)this.container.remove();this.parent=s.parent;this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=true}else if(this.parent&&this.view.themeClasses!=this.classes){this.classes=this.container.className=this.view.themeClasses}if(i)this.maybeMeasure()}createTooltip(t){let e=t.create(this.view);e.dom.classList.add("cm-tooltip");if(t.arrow&&!e.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow";e.dom.appendChild(t)}e.dom.style.position=this.position;e.dom.style.top=qn;this.container.appendChild(e.dom);if(e.mount)e.mount(this.view);return e}destroy(){var t,e;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews){i.dom.remove();(t=i.destroy)===null||t===void 0?void 0:t.call(i)}(e=this.intersectionObserver)===null||e===void 0?void 0:e.disconnect();clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect();return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(Gn).tooltipSpace(this.view)}}writeMeasure(t){let{editor:e,space:i}=t;let s=[];for(let n=0;n<this.manager.tooltips.length;n++){let r=this.manager.tooltips[n],o=this.manager.tooltipViews[n],{dom:l}=o;let h=t.pos[n],a=t.size[n];if(!h||h.bottom<=Math.max(e.top,i.top)||h.top>=Math.min(e.bottom,i.bottom)||h.right<Math.max(e.left,i.left)-.1||h.left>Math.min(e.right,i.right)+.1){l.style.top=qn;continue}let f=r.arrow?o.dom.querySelector(".cm-tooltip-arrow"):null;let c=f?7:0;let u=a.right-a.left,d=a.bottom-a.top;let p=o.offset||Un,g=this.view.textDirection==re.LTR;let m=a.width>i.right-i.left?g?i.left:i.right-a.width:g?Math.min(h.left-(f?14:0)+p.x,i.right-u):Math.max(i.left,h.left-u+(f?14:0)-p.x);let w=!!r.above;if(!r.strictSide&&(w?h.top-(a.bottom-a.top)-p.y<i.top:h.bottom+(a.bottom-a.top)+p.y>i.bottom)&&w==i.bottom-h.bottom>h.top-i.top)w=!w;let v=(w?h.top-i.top:i.bottom-h.bottom)-c;if(v<d&&o.resize!==false){if(v<this.view.defaultLineHeight){l.style.top=qn;continue}l.style.height=(d=v)+"px"}else if(l.style.height){l.style.height=""}let y=w?h.top-d-c-p.y:h.bottom+c+p.y;let b=m+u;if(o.overlap!==true)for(let t of s)if(t.left<b&&t.right>m&&t.top<y+d&&t.bottom>y)y=w?t.top-d-2-c:t.bottom+c+2;if(this.position=="absolute"){l.style.top=y-t.parent.top+"px";l.style.left=m-t.parent.left+"px"}else{l.style.top=y+"px";l.style.left=m+"px"}if(f)f.style.left=`${h.left+(g?p.x:-p.x)-(m+14-7)}px`;if(o.overlap!==true)s.push({left:m,top:y,right:b,bottom:y+d});l.classList.toggle("cm-tooltip-above",w);l.classList.toggle("cm-tooltip-below",!w);if(o.positioned)o.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length){if(this.view.inView)this.view.requestMeasure(this.measureReq);if(this.inView!=this.view.inView){this.inView=this.view.inView;if(!this.inView)for(let t of this.manager.tooltipViews)t.dom.style.top=qn}}}},{eventHandlers:{scroll(){this.maybeMeasure()}}});const Xn=Ms.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}});const Un={x:0,y:0};const Jn=s.r$.define({enables:[_n,Xn]});const Yn=s.r$.define();class Qn{constructor(t){this.view=t;this.mounted=false;this.dom=document.createElement("div");this.dom.classList.add("cm-tooltip-hover");this.manager=new jn(t,Yn,(t=>this.createHostedView(t)))}static create(t){return new Qn(t)}createHostedView(t){let e=t.create(this.view);e.dom.classList.add("cm-tooltip-section");this.dom.appendChild(e.dom);if(this.mounted&&e.mount)e.mount(this.view);return e}mount(t){for(let e of this.manager.tooltipViews){if(e.mount)e.mount(t)}this.mounted=true}positioned(t){for(let e of this.manager.tooltipViews){if(e.positioned)e.positioned(t)}}update(t){this.manager.update(t)}}const Zn=Jn.compute([Yn],(t=>{let e=t.facet(Yn).filter((t=>t));if(e.length===0)return null;return{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.filter((t=>t.end!=null)).map((t=>t.end))),create:Qn.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class tr{constructor(t,e,i,s,n){this.view=t;this.source=e;this.field=i;this.setHover=s;this.hoverTime=n;this.hoverTimeout=-1;this.restartTimeout=-1;this.pending=null;this.lastMove={x:0,y:0,target:t.dom,time:0};this.checkHover=this.checkHover.bind(this);t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this));t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){if(this.pending){this.pending=null;clearTimeout(this.restartTimeout);this.restartTimeout=setTimeout((()=>this.startHover()),20)}}get active(){return this.view.state.field(this.field)}checkHover(){this.hoverTimeout=-1;if(this.active)return;let t=Date.now()-this.lastMove.time;if(t<this.hoverTime)this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-t);else this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{lastMove:t}=this;let e=this.view.contentDOM.contains(t.target)?this.view.posAtCoords(t):null;if(e==null)return;let i=this.view.coordsAtPos(e);if(i==null||t.y<i.top||t.y>i.bottom||t.x<i.left-this.view.defaultCharacterWidth||t.x>i.right+this.view.defaultCharacterWidth)return;let s=this.view.bidiSpans(this.view.state.doc.lineAt(e)).find((t=>t.from<=e&&t.to>=e));let n=s&&s.dir==re.RTL?-1:1;let r=this.source(this.view,e,t.x<i.left?-n:n);if(r===null||r===void 0?void 0:r.then){let t=this.pending={pos:e};r.then((e=>{if(this.pending==t){this.pending=null;if(e)this.view.dispatch({effects:this.setHover.of(e)})}}),(t=>Kt(this.view.state,t,"hover tooltip")))}else if(r){this.view.dispatch({effects:this.setHover.of(r)})}}mousemove(t){var e;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()};if(this.hoverTimeout<0)this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime);let i=this.active;if(i&&!er(this.lastMove.target)||this.pending){let{pos:s}=i||this.pending,n=(e=i===null||i===void 0?void 0:i.end)!==null&&e!==void 0?e:s;if(s==n?this.view.posAtCoords(this.lastMove)!=s:!ir(this.view,s,n,t.clientX,t.clientY,6)){this.view.dispatch({effects:this.setHover.of(null)});this.pending=null}}}mouseleave(t){clearTimeout(this.hoverTimeout);this.hoverTimeout=-1;if(this.active&&!er(t.relatedTarget))this.view.dispatch({effects:this.setHover.of(null)})}destroy(){clearTimeout(this.hoverTimeout);this.view.dom.removeEventListener("mouseleave",this.mouseleave);this.view.dom.removeEventListener("mousemove",this.mousemove)}}function er(t){for(let e=t;e;e=e.parentNode)if(e.nodeType==1&&e.classList.contains("cm-tooltip"))return true;return false}function ir(t,e,i,s,n,r){let o=document.createRange();let l=t.domAtPos(e),h=t.domAtPos(i);o.setEnd(h.node,h.offset);o.setStart(l.node,l.offset);let a=o.getClientRects();o.detach();for(let f=0;f<a.length;f++){let t=a[f];let e=Math.max(t.top-n,n-t.bottom,t.left-s,s-t.right);if(e<=r)return true}return false}function sr(t,e={}){let i=StateEffect.define();let s=StateField.define({create(){return null},update(t,s){if(t&&(e.hideOnChange&&(s.docChanged||s.selection)||e.hideOn&&e.hideOn(s,t)))return null;if(t&&s.docChanged){let e=s.changes.mapPos(t.pos,-1,MapMode.TrackDel);if(e==null)return null;let i=Object.assign(Object.create(null),t);i.pos=e;if(t.end!=null)i.end=s.changes.mapPos(t.end);t=i}for(let e of s.effects){if(e.is(i))t=e.value;if(e.is(or))t=null}return t},provide:t=>Yn.from(t)});return[s,Ut.define((n=>new tr(n,t,s,i,e.hoverTime||300))),Zn]}function nr(t,e){let i=t.plugin(_n);if(!i)return null;let s=i.manager.tooltips.indexOf(e);return s<0?null:i.manager.tooltipViews[s]}function rr(t){return t.facet(Yn).some((t=>t))}const or=null&&StateEffect.define();const lr=null&&or.of(null);function hr(t){var e;(e=t.plugin(_n))===null||e===void 0?void 0:e.maybeMeasure()}const ar=s.r$.define({combine(t){let e,i;for(let s of t){e=e||s.topContainer;i=i||s.bottomContainer}return{topContainer:e,bottomContainer:i}}});function fr(t){return t?[ar.of(t)]:[]}function cr(t,e){let i=t.plugin(ur);let s=i?i.specs.indexOf(e):-1;return s>-1?i.panels[s]:null}const ur=Ut.fromClass(class{constructor(t){this.input=t.state.facet(gr);this.specs=this.input.filter((t=>t));this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(ar);this.top=new dr(t,true,e.topContainer);this.bottom=new dr(t,false,e.bottomContainer);this.top.sync(this.panels.filter((t=>t.top)));this.bottom.sync(this.panels.filter((t=>!t.top)));for(let i of this.panels){i.dom.classList.add("cm-panel");if(i.mount)i.mount()}}update(t){let e=t.state.facet(ar);if(this.top.container!=e.topContainer){this.top.sync([]);this.top=new dr(t.view,true,e.topContainer)}if(this.bottom.container!=e.bottomContainer){this.bottom.sync([]);this.bottom=new dr(t.view,false,e.bottomContainer)}this.top.syncClasses();this.bottom.syncClasses();let i=t.state.facet(gr);if(i!=this.input){let e=i.filter((t=>t));let s=[],n=[],r=[],o=[];for(let i of e){let e=this.specs.indexOf(i),l;if(e<0){l=i(t.view);o.push(l)}else{l=this.panels[e];if(l.update)l.update(t)}s.push(l);(l.top?n:r).push(l)}this.specs=e;this.panels=s;this.top.sync(n);this.bottom.sync(r);for(let t of o){t.dom.classList.add("cm-panel");if(t.mount)t.mount()}}else{for(let e of this.panels)if(e.update)e.update(t)}}destroy(){this.top.sync([]);this.bottom.sync([])}},{provide:t=>Ms.scrollMargins.of((e=>{let i=e.plugin(t);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class dr{constructor(t,e,i){this.view=t;this.top=e;this.container=i;this.dom=undefined;this.classes="";this.panels=[];this.syncClasses()}sync(t){for(let e of this.panels)if(e.destroy&&t.indexOf(e)<0)e.destroy();this.panels=t;this.syncDOM()}syncDOM(){if(this.panels.length==0){if(this.dom){this.dom.remove();this.dom=undefined}return}if(!this.dom){this.dom=document.createElement("div");this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom";this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels){if(e.dom.parentNode==this.dom){while(t!=e.dom)t=pr(t);t=t.nextSibling}else{this.dom.insertBefore(e.dom,t)}}while(t)t=pr(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!this.container||this.classes==this.view.themeClasses)return;for(let t of this.classes.split(" "))if(t)this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))if(t)this.container.classList.add(t)}}function pr(t){let e=t.nextSibling;t.remove();return e}const gr=s.r$.define({enables:ur});class mr extends s.uU{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return false}destroy(t){}}mr.prototype.elementClass="";mr.prototype.toDOM=undefined;mr.prototype.mapMode=s.gc.TrackBefore;mr.prototype.startSide=mr.prototype.endSide=-1;mr.prototype.point=true;const wr=s.r$.define();const vr={class:"",renderEmptyElements:false,elementStyle:"",markers:()=>s.Xs.empty,lineMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}};const yr=s.r$.define();function br(t){return[Sr(),yr.of(Object.assign(Object.assign({},vr),t))]}const xr=s.r$.define({combine:t=>t.some((t=>t))});function Sr(t){let e=[kr];if(t&&t.fixed===false)e.push(xr.of(true));return e}const kr=Ut.fromClass(class{constructor(t){this.view=t;this.prevViewport=t.viewport;this.dom=document.createElement("div");this.dom.className="cm-gutters";this.dom.setAttribute("aria-hidden","true");this.dom.style.minHeight=this.view.contentHeight+"px";this.gutters=t.state.facet(yr).map((e=>new Dr(t,e)));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(xr);if(this.fixed){this.dom.style.position="sticky"}this.syncGutters(false);t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport;let s=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(s<(i.to-i.from)*.8)}if(t.geometryChanged)this.dom.style.minHeight=this.view.contentHeight+"px";if(this.view.state.facet(xr)!=!this.fixed){this.fixed=!this.fixed;this.dom.style.position=this.fixed?"sticky":""}this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;if(t)this.dom.remove();let i=s.Xs.iter(this.view.state.facet(wr),this.view.viewport.from);let n=[];let r=this.gutters.map((t=>new Ar(t,this.view.viewport,-this.view.documentPadding.top)));for(let s of this.view.viewportLineBlocks){let t;if(Array.isArray(s.type)){for(let e of s.type)if(e.type==St.Text){t=e;break}}else{t=s.type==St.Text?s:undefined}if(!t)continue;if(n.length)n=[];Cr(i,n,s.from);for(let e of r)e.line(this.view,t,n)}for(let s of r)s.finish();if(t)this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(yr),i=t.state.facet(yr);let n=t.docChanged||t.heightChanged||t.viewportChanged||!s.Xs.eq(t.startState.facet(wr),t.state.facet(wr),t.view.viewport.from,t.view.viewport.to);if(e==i){for(let e of this.gutters)if(e.update(t))n=true}else{n=true;let s=[];for(let n of i){let i=e.indexOf(n);if(i<0){s.push(new Dr(this.view,n))}else{this.gutters[i].update(t);s.push(this.gutters[i])}}for(let t of this.gutters){t.dom.remove();if(s.indexOf(t)<0)t.destroy()}for(let t of s)this.dom.appendChild(t.dom);this.gutters=s}return n}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Ms.scrollMargins.of((e=>{let i=e.plugin(t);if(!i||i.gutters.length==0||!i.fixed)return null;return e.textDirection==re.LTR?{left:i.dom.offsetWidth}:{right:i.dom.offsetWidth}}))});function Mr(t){return Array.isArray(t)?t:[t]}function Cr(t,e,i){while(t.value&&t.from<=i){if(t.from==i)e.push(t.value);t.next()}}class Ar{constructor(t,e,i){this.gutter=t;this.height=i;this.localMarkers=[];this.i=0;this.cursor=s.Xs.iter(t.markers,e.from)}line(t,e,i){if(this.localMarkers.length)this.localMarkers=[];Cr(this.cursor,this.localMarkers,e.from);let s=i.length?this.localMarkers.concat(i):this.localMarkers;let n=this.gutter.config.lineMarker(t,e,s);if(n)s.unshift(n);let r=this.gutter;if(s.length==0&&!r.config.renderEmptyElements)return;let o=e.top-this.height;if(this.i==r.elements.length){let i=new Tr(t,e.height,o,s);r.elements.push(i);r.dom.appendChild(i.dom)}else{r.elements[this.i].update(t,e.height,o,s)}this.height=e.bottom;this.i++}finish(){let t=this.gutter;while(t.elements.length>this.i){let e=t.elements.pop();t.dom.removeChild(e.dom);e.destroy()}}}class Dr{constructor(t,e){this.view=t;this.config=e;this.elements=[];this.spacer=null;this.dom=document.createElement("div");this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers){this.dom.addEventListener(i,(s=>{let n=t.lineBlockAtHeight(s.clientY-t.documentTop);if(e.domEventHandlers[i](t,n,s))s.preventDefault()}))}this.markers=Mr(e.markers(t));if(e.initialSpacer){this.spacer=new Tr(t,0,0,[e.initialSpacer(t)]);this.dom.appendChild(this.spacer.dom);this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none"}}update(t){let e=this.markers;this.markers=Mr(this.config.markers(t.view));if(this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);if(e!=this.spacer.markers[0])this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!s.Xs.eq(this.markers,e,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(t):false)}destroy(){for(let t of this.elements)t.destroy()}}class Tr{constructor(t,e,i,s){this.height=-1;this.above=0;this.markers=[];this.dom=document.createElement("div");this.dom.className="cm-gutterElement";this.update(t,e,i,s)}update(t,e,i,s){if(this.height!=e)this.dom.style.height=(this.height=e)+"px";if(this.above!=i)this.dom.style.marginTop=(this.above=i)?i+"px":"";if(!Or(this.markers,s))this.setMarkers(t,s)}setMarkers(t,e){let i="cm-gutterElement",s=this.dom.firstChild;for(let n=0,r=0;;){let o=r,l=n<e.length?e[n++]:null,h=false;if(l){let t=l.elementClass;if(t)i+=" "+t;for(let e=r;e<this.markers.length;e++)if(this.markers[e].compare(l)){o=e;h=true;break}}else{o=this.markers.length}while(r<o){let t=this.markers[r++];if(t.toDOM){t.destroy(s);let e=s.nextSibling;s.remove();s=e}}if(!l)break;if(l.toDOM){if(h)s=s.nextSibling;else this.dom.insertBefore(l.toDOM(t),s)}if(h)r++}this.dom.className=i;this.markers=e}destroy(){this.setMarkers(null,[])}}function Or(t,e){if(t.length!=e.length)return false;for(let i=0;i<t.length;i++)if(!t[i].compare(e[i]))return false;return true}const Er=s.r$.define();const Rr=s.r$.define({combine(t){return(0,s.BO)(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let s in e){let t=i[s],n=e[s];i[s]=t?(e,i,s)=>t(e,i,s)||n(e,i,s):n}return i}})}});class Br extends mr{constructor(t){super();this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Lr(t,e){return t.state.facet(Rr).formatNumber(e,t.state)}const Pr=yr.compute([Rr],(t=>({class:"cm-lineNumbers",renderEmptyElements:false,markers(t){return t.state.facet(Er)},lineMarker(t,e,i){if(i.some((t=>t.toDOM)))return null;return new Br(Lr(t,t.state.doc.lineAt(e.from).number))},lineMarkerChange:t=>t.startState.facet(Rr)!=t.state.facet(Rr),initialSpacer(t){return new Br(Lr(t,Vr(t.state.doc.lines)))},updateSpacer(t,e){let i=Lr(e.view,Vr(e.view.state.doc.lines));return i==t.number?t:new Br(i)},domEventHandlers:t.facet(Rr).domEventHandlers})));function Nr(t={}){return[Rr.of(t),Sr(),Pr]}function Vr(t){let e=9;while(e<t)e=e*10+9;return e}const Hr=new class extends mr{constructor(){super(...arguments);this.elementClass="cm-activeLineGutter"}};const Ir=null&&wr.compute(["selection"],(t=>{let e=[],i=-1;for(let s of t.selection.ranges){let n=t.doc.lineAt(s.head).from;if(n>i){i=n;e.push(Hr.range(n))}}return RangeSet.of(e)}));function Wr(){return Ir}const Fr=new Map;function zr(t){let e=Fr.get(t);if(!e)Fr.set(t,e=kt.mark({attributes:t==="\t"?{class:"cm-highlightTab"}:{class:"cm-highlightSpace","data-display":t.replace(/ /g,"·")}}));return e}function qr(t){return Ut.define((e=>({decorations:t.createDeco(e),update(e){this.decorations=t.updateDeco(e,this.decorations)}})),{decorations:t=>t.decorations})}const jr=qr(new un({regexp:/\t| +/g,decoration:t=>zr(t[0]),boundary:/\S/}));function $r(){return jr}const Kr=qr(new un({regexp:/\s+$/g,decoration:kt.mark({class:"cm-trailingSpace"}),boundary:/\S/}));function Gr(){return Kr}const _r={HeightMap:Hi,HeightOracle:Bi,MeasuredHeights:Li,QueryType:Ni,ChangedRange:se,computeOrder:we,moveVisually:be}}}]);
|
2
|
-
//# sourceMappingURL=4986.f7d81e5438193cbc45f7.js.map?v=f7d81e5438193cbc45f7
|