]> E/V Lambda - evlambda.git/commitdiff
refactor IDE
authorRaphaël Van Dyck <raphael.vandyck@evlambda.org>
Tue, 17 Nov 2026 12:52:25 +0000 (13:52 +0100)
committerRaphaël Van Dyck <raphael.vandyck@evlambda.org>
Tue, 17 Nov 2026 12:52:25 +0000 (13:52 +0100)
35 files changed:
.gitignore
app.js
babel.config.json
eslint.config.js
file-systems/native.js
file-systems/router.js
images/favicon.png [new file with mode: 0644]
package-lock.json
package.json
src/codemirror.jsx
src/components.jsx
src/evaluator.js
src/ide.html
src/ide.jsx
src/lang-evlambda.js
src/lang-evlistener.js [new file with mode: 0644]
src/lezer/evlambda.grammar
src/lezer/evlistener.grammar [new file with mode: 0644]
src/lezer/tokens.js
src/state.js [new file with mode: 0644]
src/styles.scss [deleted file]
src/ufs.js
src/utilities.js
system-files/BIBLIOGRAPHY
system-files/IMPLEMENTATION-NOTES
system-files/LICENSE
system-files/REFERENCE-MANUAL
system-files/TUTORIAL
system-files/USER-MANUAL
system-files/common.css
system-files/common.js
system-files/core.js
system-files/docgen-sample.evl
system-files/evl2html.xslt
webpack.config.js

index b6cfcaed7719d7389bce1c8c381be5b07c785e89..8995864d66621d788ba8e15c8e0adb0dfd6b20c6 100644 (file)
@@ -4,3 +4,5 @@ private/
 /node_modules/
 /src/lezer/evlambda.js
 /src/lezer/evlambda.terms.js
+/src/lezer/evlistener.js
+/src/lezer/evlistener.terms.js
diff --git a/app.js b/app.js
index ac1e2db2f94355d9d6dcd6c99ebbb58ab426d028..fa012efba384dc5e9bbfe3ee25ac685e4ebf7472 100644 (file)
--- a/app.js
+++ b/app.js
@@ -19,8 +19,10 @@ const __dirname = path.dirname(__filename);
 const app = express();
 const port = Number.parseInt(EVLAMBDA_PORT);
 
+app.use('/images', express.static(path.join(__dirname, 'images')));
+
 app.use('/ide', express.static(path.join(__dirname, 'ide'), {
-  setHeaders: (res) => {
+  setHeaders: res => {
     res.set({
       // security requirements to use SharedArrayBuffer
       'Cross-Origin-Opener-Policy': 'same-origin',
index 7ba64ffe6494fb81f8b8f310c97880ce8e9513ef..4f06b0cd37e0b0ded708c26532b4422b0c49f3be 100644 (file)
@@ -1,11 +1,6 @@
 {
   "presets": [
     "@babel/preset-env",
-    [
-      "@babel/preset-react",
-      {
-        "runtime": "classic"
-      }
-    ]
+    "@babel/preset-react"
   ]
 }
index c31f17401434cca5d7f89802d8d153c593e6624f..8c5cb4706e9ab86396c4354a4b77a37ff3d932a8 100644 (file)
@@ -6,11 +6,14 @@ import {fixupPluginRules} from '@eslint/compat';
 import babelParser from '@babel/eslint-parser';
 import babelPlugin from '@babel/eslint-plugin';
 import reactHooks from 'eslint-plugin-react-hooks';
+import stylistic from '@stylistic/eslint-plugin';
 
 export default defineConfig([
   globalIgnores([
     'src/lezer/evlambda.js',
-    'src/lezer/evlambda.terms.js'
+    'src/lezer/evlambda.terms.js',
+    'src/lezer/evlistener.js',
+    'src/lezer/evlistener.terms.js'
   ]),
   {
     files: [
@@ -21,12 +24,16 @@ export default defineConfig([
     },
     plugins: {
       babel: babelPlugin,
-      'react-hooks': fixupPluginRules(reactHooks)
+      'react-hooks': fixupPluginRules(reactHooks),
+      '@stylistic': stylistic
     },
     rules: {
-      'quotes': ['error', 'single'],
       'react-hooks/rules-of-hooks': 'error',
-      'react-hooks/exhaustive-deps': 'error'
+      'react-hooks/exhaustive-deps': 'error',
+      '@stylistic/arrow-parens': ['error', 'as-needed'],
+      '@stylistic/comma-dangle': ['error', 'never'],
+      '@stylistic/quotes': ['error', 'single'],
+      '@stylistic/semi': ['error', 'always']
     }
   }
 ]);
index 653e32b13c63e342c66a70a22008c40463dcf610..c2e6817a430e7454f37cdffe2e4772ef41d6594f 100644 (file)
@@ -16,7 +16,7 @@ function toNativePathname(pathnameSegments, options) {
 
 function checkIsRegularFile(nativePathname) {
   const stat = fs.statSync(nativePathname, {throwIfNoEntry: false});
-  if (stat === undefined) {
+  if (!stat) {
     throw new Error('The file does not exist.');
   }
   if (!stat.isFile()) {
@@ -24,7 +24,7 @@ function checkIsRegularFile(nativePathname) {
   }
 }
 
-export function getCapabilities(options) {
+export function getFileSystemCapabilities(options) {
   return {writable: options.writable};
 }
 
index 75c2b8d8a6709066bbff539f3758007832ce5a3b..29d7791e448c61fbfaa76069ba3a8b79b3b82786 100644 (file)
@@ -3,7 +3,7 @@
 
 import express from 'express';
 import fs from 'fs';
-import { Buffer } from 'buffer';
+import {Buffer} from 'buffer';
 
 class ClientError extends Error {}
 
@@ -44,14 +44,14 @@ function getContents(req) {
 }
 
 function makeRouter(fileSystem, options) {
-  let root = null;
+  let root;
   try {
     root = fs.realpathSync.native(options.root);
-  } catch (exception) {
-    if (exception.code = 'ENOENT') {
+  } catch (error) {
+    if (error.code === 'ENOENT') {
       throw new Error('The root does not exist.');
     } else {
-      throw exception;
+      throw error;
     }
   }
   const stat = fs.statSync(root);
@@ -62,7 +62,7 @@ function makeRouter(fileSystem, options) {
   options.ClientError = ClientError;
   const router = express.Router();
   router.get('/get-capabilities', (req, res) => {
-    res.json(fileSystem.getCapabilities(options));
+    res.json(fileSystem.getFileSystemCapabilities(options));
   });
   router.get('/get-file-contents', (req, res) => {
     const pathnameSegments = getPathnameSegments(req);
diff --git a/images/favicon.png b/images/favicon.png
new file mode 100644 (file)
index 0000000..e94dd12
Binary files /dev/null and b/images/favicon.png differ
index e25f36471588655fb25b2960206e0b6077d8b4cf..00c672866619e8dbd90a24d090ed3c81684cd4a8 100644 (file)
@@ -9,63 +9,63 @@
       "version": "1.0.0",
       "license": "BSD-3-Clause",
       "dependencies": {
+        "@base-ui/react": "^1.9.0",
         "@codemirror/lang-css": "^6.3.1",
         "@codemirror/lang-html": "^6.4.12",
         "@codemirror/lang-javascript": "^6.2.5",
         "@codemirror/lang-xml": "^6.1.0",
+        "@codemirror/theme-one-dark": "^6.1.3",
+        "@emotion/react": "^11.14.0",
+        "@emotion/styled": "^11.14.1",
         "@mathjax/mathjax-stix2-font": "^4.1.3",
-        "@radix-ui/colors": "^3.0.0",
-        "@radix-ui/react-dialog": "^1.1.23",
-        "@radix-ui/react-icons": "^1.3.2",
-        "@radix-ui/react-menubar": "^1.1.24",
-        "@radix-ui/react-toolbar": "^1.1.19",
+        "@mui/icons-material": "^9.5.0",
+        "@mui/material": "^9.5.0",
+        "@mui/system": "^9.5.0",
+        "@tanstack/react-hotkeys": "^0.27.0",
         "codemirror": "^6.0.2",
-        "dotenv": "^17.4.2",
-        "express": "^5.2.1",
-        "jszip": "^3.10.1",
+        "dotenv": "^18.0.10",
+        "express": "^5.3.0",
+        "jszip": "^3.10.2",
         "mathjax": "^4.1.3",
-        "react": "^19.2.8",
-        "react-dom": "^19.2.8",
+        "react": "^19.3.1",
+        "react-dom": "^19.3.1",
         "ua-parser-js": "^2.0.10"
       },
       "devDependencies": {
-        "@babel/cli": "^8.0.4",
-        "@babel/core": "^8.0.1",
-        "@babel/eslint-parser": "^8.0.1",
-        "@babel/eslint-plugin": "^8.0.1",
-        "@babel/preset-env": "^8.0.2",
+        "@babel/cli": "^8.1.0",
+        "@babel/core": "^8.1.2",
+        "@babel/eslint-parser": "^8.1.2",
+        "@babel/eslint-plugin": "^8.1.0",
+        "@babel/preset-env": "^8.0.7",
         "@babel/preset-react": "^8.0.1",
-        "@eslint/compat": "^2.1.0",
-        "@lezer/generator": "^1.8.0",
-        "adm-zip": "^0.6.0",
+        "@eslint/compat": "^2.1.1",
+        "@lezer/generator": "^1.8.1",
+        "@stylistic/eslint-plugin": "^6.0.1",
+        "adm-zip": "^0.6.1",
         "babel-loader": "^10.1.1",
         "copy-webpack-plugin": "^14.0.0",
-        "css-loader": "^7.1.5",
-        "eslint": "^10.9.1",
+        "eslint": "^10.15.0",
         "eslint-plugin-react-hooks": "^7.1.1",
         "eslint-webpack-plugin": "^6.0.0",
         "html-webpack-plugin": "^5.6.8",
         "license-checker": "^25.0.1",
-        "npm-check-updates": "^23.1.0",
-        "sass": "^1.103.1",
-        "sass-loader": "^17.0.1",
-        "style-loader": "^4.0.0",
-        "webpack": "^5.110.3",
-        "webpack-cli": "^7.2.3"
+        "npm-check-updates": "^23.1.1",
+        "webpack": "^5.112.2",
+        "webpack-cli": "^7.3.1"
       }
     },
     "node_modules/@babel/cli": {
-      "version": "8.0.4",
-      "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-8.0.4.tgz",
-      "integrity": "sha512-mgg9G7dJw7xzx/0Sn8eWQkDpEcQrlDdEV4Y4Ii+8Oay88+lK45vNuSavRUj4g+e5Yfw4tkH4U3ObBFOMJhy4oQ==",
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-8.1.0.tgz",
+      "integrity": "sha512-C4fCHysy+LdXz6nsk59mAKoYBrYTxkbJb6sCEqyx1E8C5+77dEc4I4FjmIO6crtWvHxvn+sL5VD/tIjtQMYceQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@jridgewell/trace-mapping": "^0.3.28",
+        "@jridgewell/trace-mapping": "^0.3.31",
         "chokidar": "^5.0.0",
         "commander": "^14.0.2",
         "convert-source-map": "^2.0.0",
-        "glob": "^13.0.0",
+        "glob": "^14.0.0",
         "slash": "^5.1.0"
       },
       "bin": {
       }
     },
     "node_modules/@babel/code-frame": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-8.0.0.tgz",
-      "integrity": "sha512-dYYg153EyN2Ekbqw2zAsbd6/JR+9N2SEoC7YV2GyyqMM7x9bLDTjBD6XBhSMLH0wtIVyJj03jWNriQhaN+eoCw==",
+      "version": "8.0.6",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-8.0.6.tgz",
+      "integrity": "sha512-uMHhvmDmwFiLuiozaoRYTZHqMFuu3fem/X9JY78lohAuLoh8LSGGC8JqUzo2cVuBsBxkjMZNk56CE7ock8Xxkw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-validator-identifier": "^8.0.0",
+        "@babel/helper-validator-identifier": "^8.0.6",
         "js-tokens": "^10.0.0"
       },
       "engines": {
@@ -93,9 +93,9 @@
       }
     },
     "node_modules/@babel/compat-data": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-8.0.0.tgz",
-      "integrity": "sha512-DOjnob/cXOUgDOozCDeq/aK2p5y8dUIVdf6tNhEV1HQRd6I8aQ4f4fbtHRVEvb6lP3BGomrKHiS8ICAASSVQSw==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-8.1.2.tgz",
+      "integrity": "sha512-XvUnYY6D/bJMB88821n7HFmiwFS6feV7vZLxxudRgWnnwAGtOnDa7C+6svNciIN+BAZDY6WEdIeKHaEW9c0LPg==",
       "dev": true,
       "license": "MIT",
       "engines": {
       }
     },
     "node_modules/@babel/core": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/core/-/core-8.0.1.tgz",
-      "integrity": "sha512-5FgxM4dLQpMJHSiVATk8foW263dVHQHBVpXYiimNECVWG01f4nFyEbQixeT6Mwvg7TayREJ2gpKl3o2RoMdnqw==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-8.1.2.tgz",
+      "integrity": "sha512-xqDajHAAOjklW5UtWzFd9vSmlQ16+emgGi0HsyDQFGRQWZ/GjuwCoYGC3PnHxspmOR+HJBzDIOkMxNq/VvC98w==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/code-frame": "^8.0.0",
-        "@babel/generator": "^8.0.0",
-        "@babel/helper-compilation-targets": "^8.0.0",
-        "@babel/helpers": "^8.0.0",
-        "@babel/parser": "^8.0.0",
-        "@babel/template": "^8.0.0",
-        "@babel/traverse": "^8.0.0",
-        "@babel/types": "^8.0.0",
+        "@babel/code-frame": "^8.0.6",
+        "@babel/generator": "^8.1.2",
+        "@babel/helper-compilation-targets": "^8.0.7",
+        "@babel/helpers": "^8.1.2",
+        "@babel/parser": "^8.1.2",
+        "@babel/template": "^8.1.2",
+        "@babel/traverse": "^8.1.2",
+        "@babel/types": "^8.1.2",
         "@types/gensync": "^1.0.5",
         "convert-source-map": "^2.0.0",
         "empathic": "^2.0.1",
         "gensync": "^1.0.0-beta.2",
         "import-meta-resolve": "^4.2.0",
         "json5": "^2.2.3",
-        "obug": "^2.1.1",
-        "semver": "^7.7.3"
+        "obug": "^3.0.0",
+        "verkit": "^0.5.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/eslint-parser": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-8.0.1.tgz",
-      "integrity": "sha512-2javO8pAQv/ld6sS6OcxoLAlzZEZy+xm99bnoAfMhzKSumKhdF5wylpbZB7XTorWr3KLPtx5K95eduJPOy1mzA==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-8.1.2.tgz",
+      "integrity": "sha512-oyB1a5JmJz/Hrw7Qy6c47uAemiD3irqyVyPwGsdzdw7XpdCtKCkmEJqtHnqRSrxiptVJoccrAxU+iDMs9zgeIg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "eslint-scope": "^9.1.0",
         "eslint-visitor-keys": "^5.0.0",
-        "semver": "^7.7.3"
+        "verkit": "^0.5.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/eslint-plugin": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/eslint-plugin/-/eslint-plugin-8.0.1.tgz",
-      "integrity": "sha512-nHigH34PJCSbkPeK4PEzfwfy6O8VWfeucP2ZP8nwf0QcKZBxcX+uD6Zp8uMxrvYvWXYmlhYwU+Ix5N5TMjq3qQ==",
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/@babel/eslint-plugin/-/eslint-plugin-8.1.0.tgz",
+      "integrity": "sha512-LLDd+wOHbRT4ghljq9VWBpARTdOXZ3MLAtKQjXQiPgeOPKzGFjK9jhgCIR2BfaqztPay+9Ry3jcRR7jjjj0DDQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
       },
       "peerDependencies": {
         "@babel/core": "^8.0.0",
-        "@babel/eslint-parser": "^8.0.1",
+        "@babel/eslint-parser": "^8.0.0",
         "eslint": "^9.0.0 || ^10.0.0"
       }
     },
     "node_modules/@babel/generator": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-8.0.0.tgz",
-      "integrity": "sha512-NT9NrVwJsbSV6Y2FSstWa71EETOnzrjkL5/wX3D2mYHtKM+qvqB1DvR4D0Setb/gDBsHzRICifwEWMO8CnTF6g==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-8.1.2.tgz",
+      "integrity": "sha512-tAjURz1NaCZGtdG3hB6gjaIeTVo4XFD4TnbqIEneADVJ1Jpt2NxhPBAjbhius8ulUG5b/P2b56ec1ClJZa2aBQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/parser": "^8.0.0",
-        "@babel/types": "^8.0.0",
-        "@jridgewell/gen-mapping": "^0.3.12",
-        "@jridgewell/trace-mapping": "^0.3.28",
+        "@babel/parser": "^8.1.2",
+        "@babel/types": "^8.1.2",
+        "@jridgewell/gen-mapping": "0.4.0-beta.0",
+        "@jridgewell/trace-mapping": "^0.3.31",
         "@types/jsesc": "^2.5.0",
         "jsesc": "^3.0.2"
       },
       }
     },
     "node_modules/@babel/helper-compilation-targets": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-8.0.0.tgz",
-      "integrity": "sha512-JwculLABZvyPvyLBpwU/E/IbH2uM3mnxNtIJpxnIfb24y1PrdVxK5Dqjle4DpgqpGRnwgC7G8IkzPdSXZrO1Ew==",
+      "version": "8.0.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-8.0.7.tgz",
+      "integrity": "sha512-ilAZCdOOlOVA7dQbaFNw2f/59p6GW33NxTopc3DvEE3efp3ZXTrGX/yZScaKw8/vd9bq31Ag0EcXiLw32bAgJg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/compat-data": "^8.0.0",
+        "@babel/compat-data": "^8.0.5",
         "@babel/helper-validator-option": "^8.0.0",
         "browserslist": "^4.24.0",
-        "lru-cache": "^11.0.0",
-        "semver": "^7.7.3"
+        "flru": "1.0.2",
+        "verkit": "^0.5.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/helper-create-class-features-plugin": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-8.0.1.tgz",
-      "integrity": "sha512-++t3ZktzlLmASAxIlxeXQK9Z2YwUafYGYcvGBFevqOqt16HozVHStUoQvWD09fzAZOb/uJGpUTBuGK41AJAuOA==",
+      "version": "8.0.10",
+      "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-8.0.10.tgz",
+      "integrity": "sha512-a97s55BatmvDeeQ9rngs/IPi1aeQ3vVUbXr0DsNGhzF/vB2w49N+FqD+D0/YEGLziU7zALhrKFlk6FGlvbM38w==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-annotate-as-pure": "^8.0.0",
-        "@babel/helper-member-expression-to-functions": "^8.0.0",
+        "@babel/helper-member-expression-to-functions": "^8.0.5",
         "@babel/helper-optimise-call-expression": "^8.0.0",
         "@babel/helper-replace-supers": "^8.0.1",
         "@babel/helper-skip-transparent-expression-wrappers": "^8.0.0",
-        "@babel/traverse": "^8.0.0",
-        "semver": "^7.7.3"
+        "@babel/traverse": "^8.0.10",
+        "verkit": "^0.5.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/helper-create-regexp-features-plugin": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-8.0.1.tgz",
-      "integrity": "sha512-PydTbcVTiIfVweHMeY1u3MslaD/ZzvnaTNhJp+7ghofelLWshF66Ckc/ZsjStfvRQIKQ4uVG0yEJucyDtyrWgw==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-8.1.2.tgz",
+      "integrity": "sha512-8CIAQ0MF4fJWgofcwAJcAQlpDDL+OxCJY6w2xf8djG42K0UQEvfSlywzjKFmshcWrJFCBojEqhG23lTPpZjLiw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-annotate-as-pure": "^8.0.0",
-        "regexpu-core": "^6.3.1",
-        "semver": "^7.7.3"
+        "regexpu-core": "^6.5.4",
+        "verkit": "^0.5.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/helper-globals": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-8.0.0.tgz",
-      "integrity": "sha512-lLozHOM6sWWlxNo8CYqHy4MBZeTvHXNgVPBfPOGsjPKUzHC2Az9QwB6gxdQmpwHl6GlQtbGgS+lj5887guDiLw==",
+      "version": "8.0.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-8.0.6.tgz",
+      "integrity": "sha512-OdnA/N52LhzFpeUuVz5YGuSWjc7TPHiFmVYZbPlSgExocO2GwbxVpSni9MVs5wwW+wZ4kPuwBEBN9pIPDYz1mA==",
       "dev": true,
       "license": "MIT",
       "engines": {
       }
     },
     "node_modules/@babel/helper-member-expression-to-functions": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-8.0.0.tgz",
-      "integrity": "sha512-xkXrMbtk87Gk7+oKBVmBc6EORg/Qwx++AHESldmHkpvG8wgccdhJJFwrzqlF382Fk8wfXhJHWE/g/43QvEGNPQ==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-8.1.2.tgz",
+      "integrity": "sha512-2SP3fg4vqEN1qwXaaULsgmMC3I+NSi/OVZCObdPO3NSYAVfNq4BZ6akTqU+3dLEUTQHoeYaXEUnyEHaEGkAwVg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/traverse": "^8.0.0",
-        "@babel/types": "^8.0.0"
+        "@babel/helper-skip-transparent-expression-wrappers": "^8.1.0",
+        "@babel/traverse": "^8.1.2",
+        "@babel/types": "^8.1.2"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/helper-module-transforms": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-8.0.1.tgz",
-      "integrity": "sha512-UgAhl1kqiW5ciE0yCXqqvnb4H2n3IELJ7lIIQRezwDPilPEZX5i+Rvbja9MFTkwUn2biEiSMeV31aUzR4Lwakw==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-8.1.2.tgz",
+      "integrity": "sha512-iSa4SKZHScghjyCDWgrkcb/gt+huMuoZ8ZpY0iQQUG1C41XH9Iy3nQA0vcNDTcALItQ0kZ9cuWzqm76p/kkHJA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-module-imports": "^8.0.0",
-        "@babel/helper-validator-identifier": "^8.0.0",
-        "@babel/traverse": "^8.0.0"
+        "@babel/helper-validator-identifier": "^8.0.6",
+        "@babel/traverse": "^8.1.2"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/helper-skip-transparent-expression-wrappers": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-8.0.0.tgz",
-      "integrity": "sha512-xmCA9kP3IhySsqhzwIdWGlDN/1A4cCKNBO/uwZx/3YzmDoMePwno2Q5/Bq0q+tYaKbeF940YiKV/kaW8Mzvpjw==",
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-8.1.0.tgz",
+      "integrity": "sha512-nU02D56QABKl7gDT/7hGpMd2TtWYYcoOj4NT3+Xzr76oJrMl+3SUR8gp3CelvrjkvDUvwj+WZCUzuPBCUJSZoA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/traverse": "^8.0.0",
-        "@babel/types": "^8.0.0"
+        "@babel/traverse": "^8.1.0",
+        "@babel/types": "^8.1.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/helper-string-parser": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.0.0.tgz",
-      "integrity": "sha512-6mJgmFFFIIO82vvoLt9XtRC7/TkzXfts1t/SpRX4IHSzMgqoPYCWesVu1udUPUWioAE/2fcG6WuI8zrkE1gwrg==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-8.1.2.tgz",
+      "integrity": "sha512-TRz5Z0MgfIfWqwEIq/pCpUpEXQxUt2Ig2ZbxG3SdmhSbHMAFFYGOix0kI4JLV371/TA+qWnQ4xWHPWjojkyRFA==",
       "dev": true,
       "license": "MIT",
       "engines": {
       }
     },
     "node_modules/@babel/helper-validator-identifier": {
-      "version": "8.0.4",
-      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.4.tgz",
-      "integrity": "sha512-4wFaiLd0bVo4cIoTXI3zKI038NIWE/cr3jvBjejOVYVxV/m8Ltav1USiGzG1fmS5J2RhgEOgXNNK46cRPnRsrg==",
+      "version": "8.0.6",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-8.0.6.tgz",
+      "integrity": "sha512-HYx0YmuchRxRSpnjvcNffnPS8DCauKNmnumIuHG3jnQAVewRA7kfJGwF13ayEpSZs7s4R/oBH4eppuXcAQd5JQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
       }
     },
     "node_modules/@babel/helpers": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-8.0.0.tgz",
-      "integrity": "sha512-wfbi91pM3py96oIiJEz7qIpyXDytgr9zQC1HEWwlGNVRAEmItuU/0a41ZUKu1sJGyhhOIpc4t5vk4PYzt8wpsg==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-8.1.2.tgz",
+      "integrity": "sha512-BmtiG8H9OUWSTFOgl9jtPYmfDi6uc21Pf4GUxkgGoZnzMIzpDnhkl5gsGJW6wb1jmKCyU565F8IYe5mwOTctfw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/template": "^8.0.0",
-        "@babel/types": "^8.0.0"
+        "@babel/template": "^8.1.2",
+        "@babel/types": "^8.1.2"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/parser": {
-      "version": "8.0.4",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.0.4.tgz",
-      "integrity": "sha512-srpptsAkEbbNIC/q8nT7o+m6CQe8CJUTV/t7MYc9NnWlgYVtHOb7JH6SorxMhN0kuRJjVqXbKClG6xSbPtzz+g==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-8.1.2.tgz",
+      "integrity": "sha512-ZDKU7vaX0VORd2BhaO+3FKr/30TKjbUy3SMZcydiPngnAb+MesgUoh5SJcE5EwEyBj14M5J6fK56GuBqvYmOpw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/types": "^8.0.4"
+        "@babel/types": "^8.1.2"
       },
       "bin": {
         "parser": "bin/babel-parser.js"
       }
     },
     "node_modules/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array/-/plugin-bugfix-safari-rest-destructuring-rhs-array-8.0.1.tgz",
-      "integrity": "sha512-DmR/N+B9+4PbURFj4+zdnWj49/PFAnK2bn8+E4ZAmwn3J5QCxnbG7Ep6aRfz9M8Aw+rBro0kIJQycvzFpl4buQ==",
+      "version": "8.0.6",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-rest-destructuring-rhs-array/-/plugin-bugfix-safari-rest-destructuring-rhs-array-8.0.6.tgz",
+      "integrity": "sha512-vk9CzgaQGcTTBL8F0YNr7LBEka6pXP/I5KcMj0oicGXUquWSNqxiijHGQkHF+s8m910NbGMpn5mU2sFV7AQjBA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/plugin-transform-async-generator-functions": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-8.0.1.tgz",
-      "integrity": "sha512-kqnSMF1YHBzuiQrl68675i5Ma1oljvo+SJsNEZFZVBu5BUrVIZm9KId3ui2PdtLK2sv2zM8sJnjPDfgLxQlEqQ==",
+      "version": "8.0.6",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-8.0.6.tgz",
+      "integrity": "sha512-4K13qZ2TVi9W/NHMg3y0Fguu63cPjGNZT5TpPctIUDdiuIpxo4jwvySGrPWlD6KD00exvpx6Y6l5foFEpnzDcg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^8.0.1",
         "@babel/helper-remap-async-to-generator": "^8.0.1",
-        "@babel/traverse": "^8.0.0"
+        "@babel/traverse": "^8.0.6"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/plugin-transform-block-scoping": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-8.0.1.tgz",
-      "integrity": "sha512-HxiQvKsSCs2jOmMhjDrooHaZYOy6W8bqwXp/zjdgPjsNrda6tK9/CH3a/cVIeg6ge3hSS02ALqvqgIo4rTsuSg==",
+      "version": "8.0.10",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-8.0.10.tgz",
+      "integrity": "sha512-quUFdseabc7Z/gALDVAKy7iaLrErgiuiHR31oxLEzUs+Wn8nYqLGHnunM7WOU24SNEk0DrCHV+oKwlJ6Bp8OGA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/plugin-transform-class-static-block": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-8.0.1.tgz",
-      "integrity": "sha512-NEVK+L0Le8h8tJ+IK0CGS5y9Yi1ZHxLj6M5PeanhMFuq9aSo0XI+Wtmbuyop6fTNukOm7ORNntf/kwid891vqQ==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-8.1.2.tgz",
+      "integrity": "sha512-6YMTik3C/R98+njg1icUI8ZD/NmO9T13iJbVqc7qwYlDYnAz+ef4X56QoXEoUQn2i1EAB1CsB/We/UUFHK8/Jg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-create-class-features-plugin": "^8.0.1",
+        "@babel/helper-create-class-features-plugin": "^8.0.10",
         "@babel/helper-plugin-utils": "^8.0.1"
       },
       "engines": {
       }
     },
     "node_modules/@babel/plugin-transform-classes": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-8.0.1.tgz",
-      "integrity": "sha512-phwyCES8kIMAdVOFw25ztmgAvkl2G+TvUv7azUYyrlR1Qoo3eLJC/MU3MGUKFZ4BWtsJ1NTJM1lKRLzKbswg7w==",
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-8.1.0.tgz",
+      "integrity": "sha512-Rw8veCkRzrpYksK1zxN2oAN8xZbJA9qVV/R5LzaFbDJEnKcwv0rsYMYb5I36eMuOI6svYutG5GuEbcNOjXbAdA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-annotate-as-pure": "^8.0.0",
-        "@babel/helper-compilation-targets": "^8.0.0",
-        "@babel/helper-globals": "^8.0.0",
+        "@babel/helper-compilation-targets": "^8.0.7",
+        "@babel/helper-globals": "^8.0.6",
         "@babel/helper-plugin-utils": "^8.0.1",
         "@babel/helper-replace-supers": "^8.0.1",
-        "@babel/traverse": "^8.0.0"
+        "@babel/traverse": "^8.1.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/plugin-transform-destructuring": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-8.0.1.tgz",
-      "integrity": "sha512-RtR8uLDl0QcCmqMNIkM8gmDeYZ3rS0ZH+sa+I6sfc09yFoqfp9AEPgBstq9KyfVb0lFCVSRFfJXCI70FIl5ccw==",
+      "version": "8.0.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-8.0.5.tgz",
+      "integrity": "sha512-evjxc5fGvpXG2WMGSalpX8IJZVumLIDgk5r5eRhvXRDqFX/GPWq1BeRfJalPCcwJfrR5A/wvegUhx9W5Nr7/mg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/plugin-transform-explicit-resource-management": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-8.0.1.tgz",
-      "integrity": "sha512-VzDIYwBlLCpV6mJfloRdJm8HmYnMqs7O+bGha8yfg2kP7jAdxeCw6yZBVBeaKKQUThtSU52iy+3lB7DhYsbOBA==",
+      "version": "8.0.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-explicit-resource-management/-/plugin-transform-explicit-resource-management-8.0.5.tgz",
+      "integrity": "sha512-Vr20jk/ZxRGu30o0jYvcKl2Pf0tiyr8H9q2ZGxYD6yjOpv9DdP6//I85q0cSOdADZhsu/ZZoApjGVCfl4xnVJw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-plugin-utils": "^8.0.1",
-        "@babel/plugin-transform-destructuring": "^8.0.1"
+        "@babel/plugin-transform-destructuring": "^8.0.5"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/plugin-transform-exponentiation-operator": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-8.0.1.tgz",
-      "integrity": "sha512-DsZvUUklUmDQ7d2vp+VjqgUWD51mGxhZZ1FPdPP9Hcj0vsgGUKX+zEBGp/vzB1O5PZUxWT/Euq5fu39M9dm9wg==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-8.1.2.tgz",
+      "integrity": "sha512-XD1ffIILGPUV/Rv9BUlobcrsugpfo4LxPAHqfx8SQKoRlDTs5cTisHAA3hhQ7suw3JLr9x28P/BHhxQYpnDG1A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^8.0.1"
+        "@babel/helper-plugin-utils": "^8.0.1",
+        "@babel/helper-skip-transparent-expression-wrappers": "^8.1.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/plugin-transform-export-namespace-from": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-8.0.1.tgz",
-      "integrity": "sha512-bFzznm46bvWGaTYKle3iolbBJ+oPBfUjwCPesxlFE3SQ7DaY9EHf/8Y5ZzrodKJi8JDdcAyaVWaDUSVyhULh0g==",
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-8.1.0.tgz",
+      "integrity": "sha512-4NpXrz/RfrjoCC3NZkRNWvLSe+kG/p3RKzWIOFAEqE7AuNOiOPi+3T0iEIUQBqjG42RnmUY0uMV0XlREIubxLQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/plugin-transform-for-of": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-8.0.1.tgz",
-      "integrity": "sha512-rpeXtgELjpIBQH/+YmyFlD9timPEVCyqY+TNednzoeoTYvXSBEeUvYnYE+BK8rB8m6hHiNK7aL9QWKhGifEJCw==",
+      "version": "8.0.7",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-8.0.7.tgz",
+      "integrity": "sha512-h+/9Kyy55fWlnLDmMIWwz21nWLFodIZYpvvCq7gW6Fb55via7sTYPymeTNKbh8N9XZjZ025ClVtg0kxIPnEjGA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/plugin-transform-logical-assignment-operators": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-8.0.1.tgz",
-      "integrity": "sha512-Emvtr5zkEGyCNAmt+qKD5EUh8G0RbxV9EZWrDdX0LuVy5tBq1B3fOIslvVF9aCJmpnwS/AvAT53b9LxAZyXlng==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-8.1.2.tgz",
+      "integrity": "sha512-6X1QzwwiVFshP6vmumH3hUnoDUvGDyehl7E8wQu5B++aT4qRx6VQSjS7Qsdl51a1cB5OpLuElu4R/wr3TAzGRw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-plugin-utils": "^8.0.1"
+        "@babel/helper-plugin-utils": "^8.0.1",
+        "@babel/helper-skip-transparent-expression-wrappers": "^8.1.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/plugin-transform-modules-amd": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-8.0.1.tgz",
-      "integrity": "sha512-FDdhET8y1YFDNRuoynqSf23WTzbBBpbIB2oRrlFX7YYm9uWtFvJDSD1r/epBSjfPkOjeaaLgRW9xNnt3JGx46A==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-8.1.2.tgz",
+      "integrity": "sha512-2STLS26gEdnkdGm3JHPg5utUFiR/Y51R0s/v+eNB+dUFQeyEontLBM0t2JTMSCA75U+vAfHCBmrtnXLjEHzqNg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-module-transforms": "^8.0.1",
+        "@babel/helper-module-transforms": "^8.1.2",
         "@babel/helper-plugin-utils": "^8.0.1"
       },
       "engines": {
       }
     },
     "node_modules/@babel/plugin-transform-modules-commonjs": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-8.0.1.tgz",
-      "integrity": "sha512-PMuzulWrrzFNmY3lXSk/tV9NRb7y0eZZLJY4UEo2TKszroxvUZHAPPi+T9FDyrQhod+TQA+t+8/QYaaMpiEuhA==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-8.1.2.tgz",
+      "integrity": "sha512-bYW5KcM2w1DAXUV2a5HnWWVn+KGdz2EqpLocooynARzjdLjNTxLlftPGPP9APhTdmMrdynVEcu3QCUWhW/FIUw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-module-transforms": "^8.0.1",
+        "@babel/helper-module-transforms": "^8.1.2",
         "@babel/helper-plugin-utils": "^8.0.1"
       },
       "engines": {
       }
     },
     "node_modules/@babel/plugin-transform-modules-systemjs": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-8.0.1.tgz",
-      "integrity": "sha512-0NEHanXmnFEnfT2dLKTXnu7m8GXFsnxRgteBC2aH21hYMBwAgxu5dcTdi/Eg+ToI1HbZe0CHwz4XRLgRNQhYoQ==",
+      "version": "8.1.0",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-8.1.0.tgz",
+      "integrity": "sha512-dwrEjptAfSXkaQiJN1vApWFCwjLMAZ7XtNVbWqrjSsgQIJ1ixy5Zv3lOjGRHGoNRQ5IkD/OObEW2RhOuf64kSw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-module-transforms": "^8.0.1",
+        "@babel/helper-module-transforms": "^8.1.0",
         "@babel/helper-plugin-utils": "^8.0.1",
-        "@babel/helper-validator-identifier": "^8.0.0"
+        "@babel/helper-validator-identifier": "^8.0.6"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/plugin-transform-modules-umd": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-8.0.1.tgz",
-      "integrity": "sha512-XKTa2J2MdkmbVEeChq9f7Or0VYcsF0NyVBgytRyeN9F+J+ETAB2SHhfkG4toz/ssuU0i+h/QgJ6ddo5YakSQcA==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-8.1.2.tgz",
+      "integrity": "sha512-+0diEH9S1PlOR78T2n1a1IdLXf0LraVDJhdkrpx/iWIvnfwDZlHlEr+zK99G47w1IJhbvxZ/FhTHORJ5rgCnuA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-module-transforms": "^8.0.1",
+        "@babel/helper-module-transforms": "^8.1.2",
         "@babel/helper-plugin-utils": "^8.0.1"
       },
       "engines": {
       }
     },
     "node_modules/@babel/plugin-transform-optional-chaining": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-8.0.1.tgz",
-      "integrity": "sha512-WtRS1c94lZGpGHxYLXMEWeoMVcuv8nkiyr8BTs6OYZv7N3Y9xVE8nbdFIl4lDJH6aH8/pLhqAQOL69d/WI9WdA==",
+      "version": "8.0.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-8.0.5.tgz",
+      "integrity": "sha512-w8ouIDKdmUc2oyvBx4S/WtiQM7bMww5LGjB2A4L1+sDWZGw37XxzqOqfgHnPm+2ldINmAqrf2ekzpeJ/sS9poQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/plugin-transform-parameters": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-8.0.1.tgz",
-      "integrity": "sha512-IIwRqroW0CYQwR6+3pnmu27z+H98poScWdnov8z6osumMeEsFxAFBBsDS2CFk2jFpPlGqVr89jK/HXO6i5DzxQ==",
+      "version": "8.0.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-8.0.5.tgz",
+      "integrity": "sha512-oXsstDkzuE+gOqBz2+e1VFqDew0KlGgd9GT4MGptmcIq3uDbxcowHRSaqMCvp3nbiZws4wTm8Phuk9ZJO3NtTg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/plugin-transform-private-property-in-object": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-8.0.1.tgz",
-      "integrity": "sha512-e+yfOqSYBZaf3PARpiQkjZrpWYgmcFLhK+1tevh2CpHR1O9/36IdyPnAZusESX5nzVV/XZTDAtQBRLa8HPT5Dw==",
+      "version": "8.0.5",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-8.0.5.tgz",
+      "integrity": "sha512-OilYoElZMdD/My3fJTh0jLOPy8Y9Jfpcb9nPXG0Bpy4oRbZeeVX39P1cXKsPwnXTBZg7qEKk8TQ0lzpJvdK3yw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-annotate-as-pure": "^8.0.0",
-        "@babel/helper-create-class-features-plugin": "^8.0.1",
+        "@babel/helper-create-class-features-plugin": "^8.0.5",
         "@babel/helper-plugin-utils": "^8.0.1"
       },
       "engines": {
       }
     },
     "node_modules/@babel/plugin-transform-regenerator": {
-      "version": "8.0.2",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-8.0.2.tgz",
-      "integrity": "sha512-aFfsjCRYducRV4dPnpsBbdRkLjboca9FVDg6HZCgy0Ahvk2ZQ/2exmCRC5qS9P6rsWwrmIheNaIM6A1j2F8KMA==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-8.1.2.tgz",
+      "integrity": "sha512-CDkfthA0lFT+qeDesnl3GMFbV+GwgBpLafWJFY2aKBiObST5EdsmVkbf1bxxcmyUb+NDrysiNoZ/qu08FcCSow==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/plugin-transform-spread": {
-      "version": "8.0.1",
-      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-8.0.1.tgz",
-      "integrity": "sha512-O9Bw9FyxlSw1SlMg3S82/GKNZ0x77RPbHezotEy1JTlIM/vk6WO8jW1iF+iTiKLOXNvi+b+LZ9t77Gi+Q0FhGg==",
+      "version": "8.0.8",
+      "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-8.0.8.tgz",
+      "integrity": "sha512-utcuNZcN76LeCKZQ/JjwkhPgKycS/q2K84Im+CDhDToofxx0vQ4ViXwCbJZ6kPKuqKQVBrUQpdZvgxhxcRPepg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@babel/preset-env": {
-      "version": "8.0.2",
-      "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-8.0.2.tgz",
-      "integrity": "sha512-CUGLn9hNBCF/eXnwdFAWERbniCcXCRvnKwLV9fegeUEIqv7YlU2MepsWMMM54GcILx5XYMnRh+JAL+K5G+mK6g==",
+      "version": "8.0.7",
+      "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-8.0.7.tgz",
+      "integrity": "sha512-c4/6ls3f+XPhxE3iT0/Wm7Z3abRS5zH5QmXBT6LPzpxgDKyhPsQk0+xNmChY0Rvh4yotKD87K2Api6f5KSaT8w==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/compat-data": "^8.0.0",
-        "@babel/helper-compilation-targets": "^8.0.0",
+        "@babel/compat-data": "^8.0.5",
+        "@babel/helper-compilation-targets": "^8.0.7",
         "@babel/helper-plugin-utils": "^8.0.1",
         "@babel/helper-validator-option": "^8.0.0",
         "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^8.0.1",
         "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^8.0.1",
         "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^8.0.1",
-        "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "^8.0.1",
+        "@babel/plugin-bugfix-safari-rest-destructuring-rhs-array": "^8.0.6",
         "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^8.0.1",
         "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^8.0.1",
         "@babel/plugin-transform-arrow-functions": "^8.0.1",
-        "@babel/plugin-transform-async-generator-functions": "^8.0.1",
+        "@babel/plugin-transform-async-generator-functions": "^8.0.6",
         "@babel/plugin-transform-async-to-generator": "^8.0.1",
         "@babel/plugin-transform-block-scoped-functions": "^8.0.1",
-        "@babel/plugin-transform-block-scoping": "^8.0.1",
+        "@babel/plugin-transform-block-scoping": "^8.0.7",
         "@babel/plugin-transform-class-properties": "^8.0.1",
-        "@babel/plugin-transform-class-static-block": "^8.0.1",
-        "@babel/plugin-transform-classes": "^8.0.1",
+        "@babel/plugin-transform-class-static-block": "^8.0.5",
+        "@babel/plugin-transform-classes": "^8.0.5",
         "@babel/plugin-transform-computed-properties": "^8.0.1",
-        "@babel/plugin-transform-destructuring": "^8.0.1",
+        "@babel/plugin-transform-destructuring": "^8.0.5",
         "@babel/plugin-transform-dotall-regex": "^8.0.1",
         "@babel/plugin-transform-duplicate-keys": "^8.0.1",
         "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^8.0.1",
         "@babel/plugin-transform-dynamic-import": "^8.0.1",
-        "@babel/plugin-transform-explicit-resource-management": "^8.0.1",
+        "@babel/plugin-transform-explicit-resource-management": "^8.0.5",
         "@babel/plugin-transform-exponentiation-operator": "^8.0.1",
         "@babel/plugin-transform-export-namespace-from": "^8.0.1",
-        "@babel/plugin-transform-for-of": "^8.0.1",
+        "@babel/plugin-transform-for-of": "^8.0.7",
         "@babel/plugin-transform-function-name": "^8.0.1",
         "@babel/plugin-transform-json-strings": "^8.0.1",
         "@babel/plugin-transform-literals": "^8.0.1",
         "@babel/plugin-transform-object-rest-spread": "^8.0.1",
         "@babel/plugin-transform-object-super": "^8.0.1",
         "@babel/plugin-transform-optional-catch-binding": "^8.0.1",
-        "@babel/plugin-transform-optional-chaining": "^8.0.1",
-        "@babel/plugin-transform-parameters": "^8.0.1",
+        "@babel/plugin-transform-optional-chaining": "^8.0.5",
+        "@babel/plugin-transform-parameters": "^8.0.5",
         "@babel/plugin-transform-private-methods": "^8.0.1",
-        "@babel/plugin-transform-private-property-in-object": "^8.0.1",
+        "@babel/plugin-transform-private-property-in-object": "^8.0.5",
         "@babel/plugin-transform-property-literals": "^8.0.1",
-        "@babel/plugin-transform-regenerator": "^8.0.2",
+        "@babel/plugin-transform-regenerator": "^8.0.6",
         "@babel/plugin-transform-regexp-modifiers": "^8.0.1",
         "@babel/plugin-transform-reserved-words": "^8.0.1",
         "@babel/plugin-transform-shorthand-properties": "^8.0.1",
-        "@babel/plugin-transform-spread": "^8.0.1",
+        "@babel/plugin-transform-spread": "^8.0.5",
         "@babel/plugin-transform-sticky-regex": "^8.0.1",
         "@babel/plugin-transform-template-literals": "^8.0.1",
         "@babel/plugin-transform-typeof-symbol": "^8.0.1",
         "@babel/preset-modules": "^0.2.0",
         "babel-plugin-polyfill-corejs3": "^1.0.0",
         "core-js-compat": "^3.48.0",
-        "semver": "^7.7.3"
+        "verkit": "^0.5.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
         "@babel/core": "^8.0.0"
       }
     },
+    "node_modules/@babel/runtime": {
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-8.1.2.tgz",
+      "integrity": "sha512-Ay6HdEKZJAeGs6KKJ/ezCK5ssjFmkvUiR0TEGv/B1abyjLWrQ2RU+M507Ppk0NikhvVFhlEFC1/rHfCiYqSUcw==",
+      "license": "MIT"
+    },
     "node_modules/@babel/template": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/@babel/template/-/template-8.0.0.tgz",
-      "integrity": "sha512-eAD0QW/AlbamBbw0FeGiwasbCVPq5ncW0HNVyLP3B9czqLyh4gvw+5JTSNt6le9+ziAU7mqDZsKTHf3jTb4chQ==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-8.1.2.tgz",
+      "integrity": "sha512-9B3FA5HZWK7rTJ7nU2F03qAc/t80O/WB5YQ7NKYdvmMwpq7EUyN04APNQWpkqwSqWtOsuwR0jMSRYLFoAd1m9A==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/code-frame": "^8.0.0",
-        "@babel/parser": "^8.0.0",
-        "@babel/types": "^8.0.0"
+        "@babel/code-frame": "^8.0.6",
+        "@babel/parser": "^8.1.2",
+        "@babel/types": "^8.1.2"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/traverse": {
-      "version": "8.0.4",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-8.0.4.tgz",
-      "integrity": "sha512-bZnmqzGG8UZneG1lLxBoWIH0G6Gr1D846Yu4/3XnY6FhCndMR49u26nTY08u/dAxWmLWF9vGQOuC+84FfIUoeg==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-8.1.2.tgz",
+      "integrity": "sha512-J8OoydypQO6HGgRYiiHPMj0iBfz2XpSm5hkmd0+OEHWgQFzYL8TEvYq2y4Gu8vxRCa7g06BilFZ0Imiye5jzzg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/code-frame": "^8.0.0",
-        "@babel/generator": "^8.0.0",
-        "@babel/helper-globals": "^8.0.0",
-        "@babel/parser": "^8.0.4",
-        "@babel/template": "^8.0.0",
-        "@babel/types": "^8.0.4",
-        "obug": "^2.1.1"
+        "@babel/code-frame": "^8.0.6",
+        "@babel/generator": "^8.1.2",
+        "@babel/helper-globals": "^8.0.6",
+        "@babel/parser": "^8.1.2",
+        "@babel/template": "^8.1.2",
+        "@babel/types": "^8.1.2",
+        "obug": "^3.0.0"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
     "node_modules/@babel/types": {
-      "version": "8.0.4",
-      "resolved": "https://registry.npmjs.org/@babel/types/-/types-8.0.4.tgz",
-      "integrity": "sha512-eY+Yn3dCqTGmyiq2QRU66lA5FL8lqqqvecHt0fF3uHONIa7ToYsaCiWV8lOKqAs0Rb2SjixiKFROngnulPtt2g==",
+      "version": "8.1.2",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-8.1.2.tgz",
+      "integrity": "sha512-uXt6qt2f5G61jZwNIzK1RKu7l5Xjt1VXtPPOGuVveha9fxbx0QM94U1kM4pFZKTRLjWK+X8vmwjwbIemJjiQTA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-string-parser": "^8.0.0",
-        "@babel/helper-validator-identifier": "^8.0.4"
+        "@babel/helper-string-parser": "^8.1.2",
+        "@babel/helper-validator-identifier": "^8.0.6"
       },
       "engines": {
         "node": "^22.18.0 || >=24.11.0"
       }
     },
+    "node_modules/@base-ui/react": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/@base-ui/react/-/react-1.9.0.tgz",
+      "integrity": "sha512-S8CSYosASBKtpL8SWUfS78rFElfLijiCgA7oHOK22jCJ95FULsYyKwBNFOgudt0RA+/7yNc7F81bOvQnRgbBiQ==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.29.7 || ^8.0.0",
+        "@base-ui/utils": "0.5.0",
+        "@floating-ui/react-dom": "^2.1.9",
+        "@floating-ui/utils": "^0.2.12",
+        "use-sync-external-store": "^1.7.0"
+      },
+      "engines": {
+        "node": ">=14.0.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/mui-org"
+      },
+      "peerDependencies": {
+        "@date-fns/tz": "^1.2.0",
+        "@types/react": "^17 || ^18 || ^19",
+        "date-fns": "^4.0.0",
+        "react": "^17 || ^18 || ^19",
+        "react-dom": "^17 || ^18 || ^19"
+      },
+      "peerDependenciesMeta": {
+        "@date-fns/tz": {
+          "optional": true
+        },
+        "@types/react": {
+          "optional": true
+        },
+        "date-fns": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@base-ui/utils": {
+      "version": "0.5.0",
+      "resolved": "https://registry.npmjs.org/@base-ui/utils/-/utils-0.5.0.tgz",
+      "integrity": "sha512-dYGGcEttjkYiMoa5nHm8vLaJ2UcuTWxo3BFAwOYXeRg/q7UVVvA6cacEIXEs3FgBfK1CGtW1ptElqs7wsx+t9A==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.29.7 || ^8.0.0",
+        "@floating-ui/utils": "^0.2.12",
+        "reselect": "^5.3.0",
+        "use-sync-external-store": "^1.7.0"
+      },
+      "peerDependencies": {
+        "@types/react": "^17 || ^18 || ^19",
+        "react": "^17 || ^18 || ^19",
+        "react-dom": "^17 || ^18 || ^19"
+      },
+      "peerDependenciesMeta": {
+        "@types/react": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@cacheable/memory": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz",
+      "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@cacheable/utils": "^2.5.0",
+        "@keyv/bigmap": "^1.3.1",
+        "hookified": "^1.15.1",
+        "keyv": "^5.6.0"
+      }
+    },
+    "node_modules/@cacheable/utils": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz",
+      "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "hashery": "^1.5.1",
+        "keyv": "^5.6.0"
+      }
+    },
     "node_modules/@codemirror/autocomplete": {
-      "version": "6.20.3",
-      "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.3.tgz",
-      "integrity": "sha512-tlosUqb+3BbxCxZdu4tKeRghPFC+QM7q4X5YhKV2eCmPG+1r2F3f4AaSz5sCrFqUtX4Jh20VFTKecl16MgiV9g==",
+      "version": "6.20.4",
+      "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.4.tgz",
+      "integrity": "sha512-yF8RhOf2SXlg00+qtupzLhrglcas61boqaONiNcbPIebHCpJocpqTBA6dyrtUrQO47hqyTdeob/3XnYilT7TaQ==",
       "license": "MIT",
       "dependencies": {
         "@codemirror/language": "^6.0.0",
       }
     },
     "node_modules/@codemirror/commands": {
-      "version": "6.11.0",
-      "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.11.0.tgz",
-      "integrity": "sha512-/K4Rl5BN0OtTiPWmJCdqODu38XnDMsDxKY5rgrPnCkutPTJf2wVbkoixLfealF5Kwse/s8P8M5jAiURiwSwnFA==",
+      "version": "6.11.1",
+      "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.11.1.tgz",
+      "integrity": "sha512-O/4hG3SC1YwcmQ0d2UVNDs+AsaNWd1iHVxbTeEBuqH+6bExAiPK3iS/BvpY6rZGURALv4ZD3sIgcCmRvw3ehBg==",
       "license": "MIT",
       "dependencies": {
         "@codemirror/language": "^6.0.0",
       }
     },
     "node_modules/@codemirror/language": {
-      "version": "6.12.4",
-      "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.12.4.tgz",
-      "integrity": "sha512-1q4PaT+o6PbgpkJt4Q8Fv5XJxTy4FUZ4MWETtyiDw3J0Pyr9E2vqcKL+k9wcvjNTIsauxvE7OfmWj3FRPHQ76A==",
+      "version": "6.13.1",
+      "resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.13.1.tgz",
+      "integrity": "sha512-zfvU2r3TyylQLMj/te+5CnQ0rSqZi8B1oTCBbQkagcLW4Xc6imab6qN+pEJhsuNOLaJqiRyBXp9UhWA1DhVvDw==",
       "license": "MIT",
       "dependencies": {
         "@codemirror/state": "^6.0.0",
+        "@codemirror/streamparser": "^6.0.0",
         "@codemirror/view": "^6.23.0",
         "@lezer/common": "^1.5.0",
         "@lezer/highlight": "^1.0.0",
       }
     },
     "node_modules/@codemirror/lint": {
-      "version": "6.9.7",
-      "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.7.tgz",
-      "integrity": "sha512-28/+iWLYxKxsvGYhSYL7zaCZqLz5+FFFDq9tVsvGv9kv8RY4fFAchJ5WX9M3YrrRlTIsECjsXPqeNgnSmNP2dg==",
+      "version": "6.9.8",
+      "resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.9.8.tgz",
+      "integrity": "sha512-qNvtcE73xUto/D1RvtgSRI4A1Hg8ekxlvtZpjHpdpisLBnhyu82EUEJMEgaxkjuQCA8vqnrylENWKOsEDCOHcw==",
       "license": "MIT",
       "dependencies": {
         "@codemirror/state": "^6.0.0",
       }
     },
     "node_modules/@codemirror/state": {
-      "version": "6.7.2",
-      "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.2.tgz",
-      "integrity": "sha512-U3RiPX62Wl/Gx4ftQ7UxLlloSfsFTQqKa+7vFBYteZGCzkp6oBqcsD7iSwniWRGobCAmDcwZSY+Six3+3ztdfg==",
+      "version": "6.7.6",
+      "resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.7.6.tgz",
+      "integrity": "sha512-kAz+AncRtKuIknedxT1bq4XwXv4UowhbkHU1myPrtVb/jZtImWuV5BXzv5vK6i3kYACsdiZiQKFQQ5Mq7elW8w==",
       "license": "MIT",
       "dependencies": {
         "@marijn/find-cluster-break": "^1.0.0"
       }
     },
+    "node_modules/@codemirror/streamparser": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/@codemirror/streamparser/-/streamparser-6.0.0.tgz",
+      "integrity": "sha512-JTFPF6xrfjt0mnfGPgzcLiMwYmvIyNaoizp8BYzv8FE8KrT6GBGDZ190rtt+O7Wke3gG/MFHyiY9YGNeimof4w==",
+      "license": "MIT"
+    },
+    "node_modules/@codemirror/theme-one-dark": {
+      "version": "6.1.3",
+      "resolved": "https://registry.npmjs.org/@codemirror/theme-one-dark/-/theme-one-dark-6.1.3.tgz",
+      "integrity": "sha512-NzBdIvEJmx6fjeremiGp3t/okrLPYT0d9orIc7AFun8oZcRk58aejkqhv6spnz4MLAevrKNPMQYXEWMg4s+sKA==",
+      "license": "MIT",
+      "dependencies": {
+        "@codemirror/language": "^6.0.0",
+        "@codemirror/state": "^6.0.0",
+        "@codemirror/view": "^6.0.0",
+        "@lezer/highlight": "^1.0.0"
+      }
+    },
     "node_modules/@codemirror/view": {
-      "version": "6.43.10",
-      "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.10.tgz",
-      "integrity": "sha512-vVWLvd4fKWYN/pMcwUrg6dWeublxmSz+V+52ZjW3h64IVN9cRUYLk5Km4JDT9vifxAFfDtNOIFxKYENthcolJQ==",
+      "version": "6.43.15",
+      "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.43.15.tgz",
+      "integrity": "sha512-HHsfpqFeHyXLs983pSRe38Xajs0vFWZQ2BuX0m7Ki8w3jZ5iD8cuR3lBz2/5/X53Dhf32SBHKh6rtSTB6tKeGw==",
       "license": "MIT",
       "dependencies": {
         "@codemirror/state": "^6.7.0",
         "node": ">=14.17.0"
       }
     },
-    "node_modules/@eslint-community/eslint-utils": {
-      "version": "4.10.1",
-      "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz",
-      "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==",
-      "dev": true,
+    "node_modules/@emotion/babel-plugin": {
+      "version": "11.13.5",
+      "resolved": "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.13.5.tgz",
+      "integrity": "sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==",
       "license": "MIT",
       "dependencies": {
-        "eslint-visitor-keys": "^3.4.3"
+        "@babel/helper-module-imports": "^7.16.7",
+        "@babel/runtime": "^7.18.3",
+        "@emotion/hash": "^0.9.2",
+        "@emotion/memoize": "^0.9.0",
+        "@emotion/serialize": "^1.3.3",
+        "babel-plugin-macros": "^3.1.0",
+        "convert-source-map": "^1.5.0",
+        "escape-string-regexp": "^4.0.0",
+        "find-root": "^1.1.0",
+        "source-map": "^0.5.7",
+        "stylis": "4.2.0"
+      }
+    },
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/code-frame": {
+      "version": "7.29.7",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
+      "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-validator-identifier": "^7.29.7",
+        "js-tokens": "^4.0.0",
+        "picocolors": "^1.1.1"
       },
       "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
-      },
-      "funding": {
-        "url": "https://opencollective.com/eslint"
-      },
-      "peerDependencies": {
-        "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
-      "version": "3.4.3",
-      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
-      "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
-      "dev": true,
-      "license": "Apache-2.0",
-      "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/generator": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.14.tgz",
+      "integrity": "sha512-qSY56jgW5JnSXzuekLVil6zaOQxOCtOHidr65KkaMBw772IuAY28Qx4ZykAcDn8+FRF15qk80XzKwgSc/RYW6g==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/parser": "^7.29.14",
+        "@babel/types": "^7.29.14",
+        "@jridgewell/gen-mapping": "^0.3.12",
+        "@jridgewell/trace-mapping": "^0.3.28",
+        "jsesc": "^3.0.2"
       },
-      "funding": {
-        "url": "https://opencollective.com/eslint"
+      "engines": {
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@eslint-community/regexpp": {
-      "version": "4.12.2",
-      "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz",
-      "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==",
-      "dev": true,
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/helper-globals": {
+      "version": "7.29.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz",
+      "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==",
       "license": "MIT",
       "engines": {
-        "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@eslint/compat": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-2.1.0.tgz",
-      "integrity": "sha512-LgaSCymEpw7tF53xvDw9SNsraPb1IBHxpdABIOM0hW8UAlP8znrjYtuxfR58FSJ3L9BhwD+FaPRFQpZq84Nh6g==",
-      "dev": true,
-      "license": "Apache-2.0",
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/helper-module-imports": {
+      "version": "7.29.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz",
+      "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==",
+      "license": "MIT",
       "dependencies": {
-        "@eslint/core": "^1.2.1"
+        "@babel/traverse": "^7.29.7",
+        "@babel/types": "^7.29.7"
       },
       "engines": {
-        "node": "^20.19.0 || ^22.13.0 || >=24"
-      },
-      "peerDependencies": {
-        "eslint": "^8.40 || 9 || 10"
-      },
-      "peerDependenciesMeta": {
-        "eslint": {
-          "optional": true
-        }
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@eslint/config-array": {
-      "version": "0.23.5",
-      "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz",
-      "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==",
-      "dev": true,
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@eslint/object-schema": "^3.0.5",
-        "debug": "^4.3.1",
-        "minimatch": "^10.2.4"
-      },
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/helper-string-parser": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.14.tgz",
+      "integrity": "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==",
+      "license": "MIT",
       "engines": {
-        "node": "^20.19.0 || ^22.13.0 || >=24"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@eslint/config-helpers": {
-      "version": "0.7.0",
-      "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz",
-      "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==",
-      "dev": true,
-      "license": "Apache-2.0",
-      "dependencies": {
-        "@eslint/core": "^1.2.1"
-      },
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/helper-validator-identifier": {
+      "version": "7.29.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
+      "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
+      "license": "MIT",
       "engines": {
-        "node": "^20.19.0 || ^22.13.0 || >=24"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@eslint/core": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz",
-      "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==",
-      "dev": true,
-      "license": "Apache-2.0",
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/parser": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.14.tgz",
+      "integrity": "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==",
+      "license": "MIT",
       "dependencies": {
-        "@types/json-schema": "^7.0.15"
+        "@babel/types": "^7.29.14"
+      },
+      "bin": {
+        "parser": "bin/babel-parser.js"
       },
       "engines": {
-        "node": "^20.19.0 || ^22.13.0 || >=24"
+        "node": ">=6.0.0"
       }
     },
-    "node_modules/@eslint/object-schema": {
-      "version": "3.0.5",
-      "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz",
-      "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==",
-      "dev": true,
-      "license": "Apache-2.0",
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/runtime": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.14.tgz",
+      "integrity": "sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw==",
+      "license": "MIT",
       "engines": {
-        "node": "^20.19.0 || ^22.13.0 || >=24"
+        "node": ">=6.9.0"
       }
     },
-    "node_modules/@eslint/plugin-kit": {
-      "version": "0.7.2",
-      "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz",
-      "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==",
-      "dev": true,
-      "license": "Apache-2.0",
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/template": {
+      "version": "7.29.7",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz",
+      "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==",
+      "license": "MIT",
       "dependencies": {
-        "@eslint/core": "^1.2.1",
-        "levn": "^0.4.1"
+        "@babel/code-frame": "^7.29.7",
+        "@babel/parser": "^7.29.7",
+        "@babel/types": "^7.29.7"
       },
       "engines": {
-        "node": "^20.19.0 || ^22.13.0 || >=24"
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/traverse": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.14.tgz",
+      "integrity": "sha512-RAdQJrBgmIH1FWvN0X+1hoDxzMzlP4cv/1Zi4dn4tG1H0cTb+rw7CzUxQJhp1f4ANd8j5vH3fy8BAWFGkBDEsA==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/code-frame": "^7.29.7",
+        "@babel/generator": "^7.29.14",
+        "@babel/helper-globals": "^7.29.7",
+        "@babel/parser": "^7.29.14",
+        "@babel/template": "^7.29.7",
+        "@babel/types": "^7.29.14",
+        "debug": "^4.3.1"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@emotion/babel-plugin/node_modules/@babel/types": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.14.tgz",
+      "integrity": "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-string-parser": "^7.29.14",
+        "@babel/helper-validator-identifier": "^7.29.7"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@emotion/babel-plugin/node_modules/@jridgewell/gen-mapping": {
+      "version": "0.3.13",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+      "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+      "license": "MIT",
+      "dependencies": {
+        "@jridgewell/sourcemap-codec": "^1.5.0",
+        "@jridgewell/trace-mapping": "^0.3.24"
+      }
+    },
+    "node_modules/@emotion/babel-plugin/node_modules/convert-source-map": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz",
+      "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==",
+      "license": "MIT"
+    },
+    "node_modules/@emotion/babel-plugin/node_modules/js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+      "license": "MIT"
+    },
+    "node_modules/@emotion/cache": {
+      "version": "11.14.0",
+      "resolved": "https://registry.npmjs.org/@emotion/cache/-/cache-11.14.0.tgz",
+      "integrity": "sha512-L/B1lc/TViYk4DcpGxtAVbx0ZyiKM5ktoIyafGkH6zg/tj+mA+NE//aPYKG0k8kCHSHVJrpLpcAlOBEXQ3SavA==",
+      "license": "MIT",
+      "dependencies": {
+        "@emotion/memoize": "^0.9.0",
+        "@emotion/sheet": "^1.4.0",
+        "@emotion/utils": "^1.4.2",
+        "@emotion/weak-memoize": "^0.4.0",
+        "stylis": "4.2.0"
+      }
+    },
+    "node_modules/@emotion/hash": {
+      "version": "0.9.2",
+      "resolved": "https://registry.npmjs.org/@emotion/hash/-/hash-0.9.2.tgz",
+      "integrity": "sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==",
+      "license": "MIT"
+    },
+    "node_modules/@emotion/is-prop-valid": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-1.4.0.tgz",
+      "integrity": "sha512-QgD4fyscGcbbKwJmqNvUMSE02OsHUa+lAWKdEUIJKgqe5IwRSKd7+KhibEWdaKwgjLj0DRSHA9biAIqGBk05lw==",
+      "license": "MIT",
+      "dependencies": {
+        "@emotion/memoize": "^0.9.0"
+      }
+    },
+    "node_modules/@emotion/memoize": {
+      "version": "0.9.0",
+      "resolved": "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.9.0.tgz",
+      "integrity": "sha512-30FAj7/EoJ5mwVPOWhAyCX+FPfMDrVecJAM+Iw9NRoSl4BBAQeqj4cApHHUXOVvIPgLVDsCFoz/hGD+5QQD1GQ==",
+      "license": "MIT"
+    },
+    "node_modules/@emotion/react": {
+      "version": "11.14.0",
+      "resolved": "https://registry.npmjs.org/@emotion/react/-/react-11.14.0.tgz",
+      "integrity": "sha512-O000MLDBDdk/EohJPFUqvnp4qnHeYkVP5B0xEG0D/L7cOKP9kefu2DXn8dj74cQfsEzUqh+sr1RzFqiL1o+PpA==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.18.3",
+        "@emotion/babel-plugin": "^11.13.5",
+        "@emotion/cache": "^11.14.0",
+        "@emotion/serialize": "^1.3.3",
+        "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0",
+        "@emotion/utils": "^1.4.2",
+        "@emotion/weak-memoize": "^0.4.0",
+        "hoist-non-react-statics": "^3.3.1"
+      },
+      "peerDependencies": {
+        "react": ">=16.8.0"
+      },
+      "peerDependenciesMeta": {
+        "@types/react": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@emotion/react/node_modules/@babel/runtime": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.14.tgz",
+      "integrity": "sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@emotion/serialize": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.3.3.tgz",
+      "integrity": "sha512-EISGqt7sSNWHGI76hC7x1CksiXPahbxEOrC5RjmFRJTqLyEK9/9hZvBbiYn70dw4wuwMKiEMCUlR6ZXTSWQqxA==",
+      "license": "MIT",
+      "dependencies": {
+        "@emotion/hash": "^0.9.2",
+        "@emotion/memoize": "^0.9.0",
+        "@emotion/unitless": "^0.10.0",
+        "@emotion/utils": "^1.4.2",
+        "csstype": "^3.0.2"
+      }
+    },
+    "node_modules/@emotion/sheet": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/@emotion/sheet/-/sheet-1.4.0.tgz",
+      "integrity": "sha512-fTBW9/8r2w3dXWYM4HCB1Rdp8NLibOw2+XELH5m5+AkWiL/KqYX6dc0kKYlaYyKjrQ6ds33MCdMPEwgs2z1rqg==",
+      "license": "MIT"
+    },
+    "node_modules/@emotion/styled": {
+      "version": "11.14.1",
+      "resolved": "https://registry.npmjs.org/@emotion/styled/-/styled-11.14.1.tgz",
+      "integrity": "sha512-qEEJt42DuToa3gurlH4Qqc1kVpNq8wO8cJtDzU46TjlzWjDlsVyevtYCRijVq3SrHsROS+gVQ8Fnea108GnKzw==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.18.3",
+        "@emotion/babel-plugin": "^11.13.5",
+        "@emotion/is-prop-valid": "^1.3.0",
+        "@emotion/serialize": "^1.3.3",
+        "@emotion/use-insertion-effect-with-fallbacks": "^1.2.0",
+        "@emotion/utils": "^1.4.2"
+      },
+      "peerDependencies": {
+        "@emotion/react": "^11.0.0-rc.0",
+        "react": ">=16.8.0"
+      },
+      "peerDependenciesMeta": {
+        "@types/react": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@emotion/styled/node_modules/@babel/runtime": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.14.tgz",
+      "integrity": "sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@emotion/unitless": {
+      "version": "0.10.0",
+      "resolved": "https://registry.npmjs.org/@emotion/unitless/-/unitless-0.10.0.tgz",
+      "integrity": "sha512-dFoMUuQA20zvtVTuxZww6OHoJYgrzfKM1t52mVySDJnMSEa08ruEvdYQbhvyu6soU+NeLVd3yKfTfT0NeV6qGg==",
+      "license": "MIT"
+    },
+    "node_modules/@emotion/use-insertion-effect-with-fallbacks": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.2.0.tgz",
+      "integrity": "sha512-yJMtVdH59sxi/aVJBpk9FQq+OR8ll5GT8oWd57UpeaKEVGab41JWaCFA7FRLoMLloOZF/c/wsPoe+bfGmRKgDg==",
+      "license": "MIT",
+      "peerDependencies": {
+        "react": ">=16.8.0"
+      }
+    },
+    "node_modules/@emotion/utils": {
+      "version": "1.4.2",
+      "resolved": "https://registry.npmjs.org/@emotion/utils/-/utils-1.4.2.tgz",
+      "integrity": "sha512-3vLclRofFziIa3J2wDh9jjbkUz9qk5Vi3IZ/FSTKViB0k+ef0fPV7dYrUIugbgupYDx7v9ud/SjrtEP8Y4xLoA==",
+      "license": "MIT"
+    },
+    "node_modules/@emotion/weak-memoize": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/@emotion/weak-memoize/-/weak-memoize-0.4.0.tgz",
+      "integrity": "sha512-snKqtPW01tN0ui7yu9rGv69aJXr/a/Ywvl11sUjNtEcRc+ng/mQriFL0wLXMef74iHa/EkftbDzU9F8iFbH+zg==",
+      "license": "MIT"
+    },
+    "node_modules/@eslint-community/eslint-utils": {
+      "version": "4.10.1",
+      "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz",
+      "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "eslint-visitor-keys": "^3.4.3"
+      },
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint"
+      },
+      "peerDependencies": {
+        "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+      }
+    },
+    "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
+      "version": "3.4.3",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+      "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+      },
+      "funding": {
+        "url": "https://opencollective.com/eslint"
+      }
+    },
+    "node_modules/@eslint-community/regexpp": {
+      "version": "4.12.3",
+      "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.3.tgz",
+      "integrity": "sha512-R76UKbvsqI68DJJVTVyqFKqU98CN4+B+acxNfEA2IFarSzP0SjtKf/3+fFiXzTyv5Fj3PxLkGHe2wnVWWMxobQ==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+      }
+    },
+    "node_modules/@eslint/compat": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/@eslint/compat/-/compat-2.1.1.tgz",
+      "integrity": "sha512-rMcy8GSrwNzcISX/BlTDY/GLB4eCopEuy9woIls3To+15OLxykZrxxq+WUcylCPCQ6F4MujjBM1DX5V1aqI3Vw==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@eslint/core": "^1.2.1"
+      },
+      "engines": {
+        "node": "^20.19.0 || ^22.13.0 || >=24"
+      },
+      "peerDependencies": {
+        "eslint": "^8.40 || 9 || 10"
+      },
+      "peerDependenciesMeta": {
+        "eslint": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/@eslint/config-array": {
+      "version": "0.23.6",
+      "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.6.tgz",
+      "integrity": "sha512-WrTH7nioI9QPY4NZGnsywmecswJdgeq4BCM76qok9VgjTO29ZgUzUvcuJLVPYVQM4uDbaPBU0M33R9DIxI8X3w==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@eslint/object-schema": "^3.0.5",
+        "debug": "^4.3.1",
+        "minimatch": "^11.0.5"
+      },
+      "engines": {
+        "node": "^20.19.0 || ^22.13.0 || >=24"
+      }
+    },
+    "node_modules/@eslint/config-helpers": {
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz",
+      "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@eslint/core": "^1.2.1"
+      },
+      "engines": {
+        "node": "^20.19.0 || ^22.13.0 || >=24"
+      }
+    },
+    "node_modules/@eslint/core": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz",
+      "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@types/json-schema": "^7.0.15"
+      },
+      "engines": {
+        "node": "^20.19.0 || ^22.13.0 || >=24"
+      }
+    },
+    "node_modules/@eslint/object-schema": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz",
+      "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "engines": {
+        "node": "^20.19.0 || ^22.13.0 || >=24"
+      }
+    },
+    "node_modules/@eslint/plugin-kit": {
+      "version": "0.7.3",
+      "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz",
+      "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==",
+      "dev": true,
+      "license": "Apache-2.0",
+      "dependencies": {
+        "@eslint/core": "^1.2.1",
+        "levn": "^0.4.1"
+      },
+      "engines": {
+        "node": "^20.19.0 || ^22.13.0 || >=24"
       }
     },
     "node_modules/@floating-ui/core": {
         "url": "https://github.com/sponsors/nzakas"
       }
     },
+    "node_modules/@isaacs/nonrecursive-glob-match": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz",
+      "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==",
+      "dev": true,
+      "license": "BlueOak-1.0.0"
+    },
     "node_modules/@jridgewell/gen-mapping": {
-      "version": "0.3.13",
-      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
-      "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+      "version": "0.4.0-beta.0",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.4.0-beta.0.tgz",
+      "integrity": "sha512-JdGNkbE4GlNPYQhM0L95fBQr7ctLZJ276QXQLTad4t1oSdnnCI3fDq9DW3BqYAWv8Wc3+HS+4Gsii1oPMCfz1w==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@jridgewell/sourcemap-codec": "^1.5.0",
+        "@jridgewell/sourcemap-codec": "^1.6.0-beta.0",
         "@jridgewell/trace-mapping": "^0.3.24"
       }
     },
         "@jridgewell/trace-mapping": "^0.3.24"
       }
     },
-    "node_modules/@jridgewell/resolve-uri": {
-      "version": "3.1.2",
-      "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",
-      "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",
+    "node_modules/@jridgewell/remapping/node_modules/@jridgewell/gen-mapping": {
+      "version": "0.3.13",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+      "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
       "dev": true,
       "license": "MIT",
+      "dependencies": {
+        "@jridgewell/sourcemap-codec": "^1.5.0",
+        "@jridgewell/trace-mapping": "^0.3.24"
+      }
+    },
+    "node_modules/@jridgewell/resolve-uri": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz",
+      "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==",
+      "license": "MIT",
       "engines": {
         "node": ">=6.0.0"
       }
         "@jridgewell/trace-mapping": "^0.3.25"
       }
     },
+    "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": {
+      "version": "0.3.13",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+      "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@jridgewell/sourcemap-codec": "^1.5.0",
+        "@jridgewell/trace-mapping": "^0.3.24"
+      }
+    },
     "node_modules/@jridgewell/sourcemap-codec": {
       "version": "1.6.0",
       "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz",
       "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==",
-      "dev": true,
       "license": "MIT"
     },
     "node_modules/@jridgewell/trace-mapping": {
       "version": "0.3.31",
       "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",
       "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",
-      "dev": true,
       "license": "MIT",
       "dependencies": {
         "@jridgewell/resolve-uri": "^3.1.0",
         "@jridgewell/sourcemap-codec": "^1.4.14"
       }
     },
-    "node_modules/@lezer/common": {
-      "version": "1.5.2",
-      "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.2.tgz",
-      "integrity": "sha512-sxQE460fPZyU3sdc8lafxiPwJHBzZRy/udNFynGQky1SePYBdhkBl1kOagA9uT3pxR8K09bOrmTUqA9wb/PjSQ==",
-      "license": "MIT"
-    },
-    "node_modules/@lezer/css": {
-      "version": "1.3.6",
-      "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.6.tgz",
-      "integrity": "sha512-YJE78Wcg+zX8f10hiHWQ4Az48Qr/c13eId0VtRQYLBpxHDmDeSrXIlkbl+fJGW42rWC/uoUco9mhBZeVWP/A1g==",
+    "node_modules/@keyv/bigmap": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz",
+      "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@lezer/common": "^1.2.0",
+        "hashery": "^1.4.0",
+        "hookified": "^1.15.0"
+      },
+      "engines": {
+        "node": ">= 18"
+      },
+      "peerDependencies": {
+        "keyv": "^5.6.0"
+      }
+    },
+    "node_modules/@keyv/serialize": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz",
+      "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/@lezer/common": {
+      "version": "1.5.5",
+      "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.5.tgz",
+      "integrity": "sha512-Pw7PVCndruF1pb3ebCxpSVpkMHSDjwRCLcTRw+RizUKco5QbWylwq2g4lnG/RYN7yTTQDXE9F77MwtkAyphrjg==",
+      "license": "MIT"
+    },
+    "node_modules/@lezer/css": {
+      "version": "1.3.9",
+      "resolved": "https://registry.npmjs.org/@lezer/css/-/css-1.3.9.tgz",
+      "integrity": "sha512-ZmzgvTOBdJWGIsY/ItAfN7UW8DV802oZG+jeG6E508SwEzz5YhuAajptpWPICvIyqYAD2+VjMdOS40GgGkyEOQ==",
+      "license": "MIT",
+      "dependencies": {
+        "@lezer/common": "^1.2.0",
         "@lezer/highlight": "^1.0.0",
         "@lezer/lr": "^1.3.0"
       }
     },
     "node_modules/@lezer/generator": {
-      "version": "1.8.0",
-      "resolved": "https://registry.npmjs.org/@lezer/generator/-/generator-1.8.0.tgz",
-      "integrity": "sha512-/SF4EDWowPqV1jOgoGSGTIFsE7Ezdr7ZYxyihl5eMKVO5tlnpIhFcDavgm1hHY5GEonoOAEnJ0CU0x+tvuAuUg==",
+      "version": "1.8.1",
+      "resolved": "https://registry.npmjs.org/@lezer/generator/-/generator-1.8.1.tgz",
+      "integrity": "sha512-7q7szXqT7EPTs6SODBl58Qoz/4OrhNvm5pW4lbu1ZDnG5e0nn7drLzeN9Nxkm8j/1iMs5QZ9j3i4SV+W4Z6SQA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/@lezer/highlight": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.3.tgz",
-      "integrity": "sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==",
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.2.5.tgz",
+      "integrity": "sha512-O1GMVKgtf5YspFaRzpmqkVgMtIk2HG9uMAbH6wdAIdNh3TVzCsch/+cRi+6l2//UGDKe6NB9BW3cvuR5ezMQ0w==",
       "license": "MIT",
       "dependencies": {
         "@lezer/common": "^1.3.0"
       }
     },
     "node_modules/@lezer/javascript": {
-      "version": "1.5.4",
-      "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.4.tgz",
-      "integrity": "sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==",
+      "version": "1.5.6",
+      "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.5.6.tgz",
+      "integrity": "sha512-sEvOqpl4vJQca0NugSQK02vQPbc5KrvoojnYGoqqFgFO0MtcYhwGiHKVEB+LuXYJnfyXo4QPA8ztbrEa4Fw5NA==",
       "license": "MIT",
       "dependencies": {
         "@lezer/common": "^1.2.0",
       }
     },
     "node_modules/@lezer/lr": {
-      "version": "1.4.10",
-      "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.10.tgz",
-      "integrity": "sha512-rnCpTIBafOx4mRp43xOxDJbFipJm/c0cia/V5TiGlhmMa+wsSdoGmUN3w5Bqrks/09Q/D4tNAmWaT8p6NRi77A==",
+      "version": "1.4.12",
+      "resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.4.12.tgz",
+      "integrity": "sha512-On9HU4oMMiHPMkQDgoTnGahjgG5n/MkN38CgG77sMraKLL+3JBbeQNi1FcCXV9QRqwF9/BUXP3caHyJC1fBOTQ==",
       "license": "MIT",
       "dependencies": {
         "@lezer/common": "^1.0.0"
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/@marijn/find-cluster-break/-/find-cluster-break-1.0.4.tgz",
       "integrity": "sha512-Wy0V7+SGUjnF9/TkiM1hKVDPj7jKXduPNboMVtHTA8dySMURWqfg/JZ9E2Sq8JgSJmkl7k7Qe9FLeMSrSraWmQ==",
-      "license": "MIT"
-    },
-    "node_modules/@mathjax/mathjax-newcm-font": {
-      "version": "4.1.3",
-      "resolved": "https://registry.npmjs.org/@mathjax/mathjax-newcm-font/-/mathjax-newcm-font-4.1.3.tgz",
-      "integrity": "sha512-gzAB3dFHilHX1l5x2xUqRL+1jDQt3Fyza1DkEMVXWC4E8SvsGdlgEza47HYi2WhVcgfkvf4zgUGzuhbq3Pjlew==",
-      "license": "Apache-2.0"
-    },
-    "node_modules/@mathjax/mathjax-stix2-font": {
-      "version": "4.1.3",
-      "resolved": "https://registry.npmjs.org/@mathjax/mathjax-stix2-font/-/mathjax-stix2-font-4.1.3.tgz",
-      "integrity": "sha512-DjJh93JuKodoYmvWawiqa22y/dwP+hn6/DN/DepFRFaRbdndNcSD3iBsBunSrLPFIJBS83mn4iR015YRPWZWhg==",
-      "license": "Apache-2.0"
-    },
-    "node_modules/@parcel/watcher": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.6.0.tgz",
-      "integrity": "sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==",
-      "dev": true,
-      "hasInstallScript": true,
-      "license": "MIT",
-      "optional": true,
-      "dependencies": {
-        "detect-libc": "^2.0.3",
-        "is-glob": "^4.0.3",
-        "node-addon-api": "^7.0.0",
-        "picomatch": "^4.0.4"
-      },
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      },
-      "optionalDependencies": {
-        "@parcel/watcher-android-arm64": "2.6.0",
-        "@parcel/watcher-darwin-arm64": "2.6.0",
-        "@parcel/watcher-darwin-x64": "2.6.0",
-        "@parcel/watcher-freebsd-x64": "2.6.0",
-        "@parcel/watcher-linux-arm-glibc": "2.6.0",
-        "@parcel/watcher-linux-arm-musl": "2.6.0",
-        "@parcel/watcher-linux-arm64-glibc": "2.6.0",
-        "@parcel/watcher-linux-arm64-musl": "2.6.0",
-        "@parcel/watcher-linux-x64-glibc": "2.6.0",
-        "@parcel/watcher-linux-x64-musl": "2.6.0",
-        "@parcel/watcher-win32-arm64": "2.6.0",
-        "@parcel/watcher-win32-x64": "2.6.0"
-      }
-    },
-    "node_modules/@parcel/watcher-android-arm64": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.6.0.tgz",
-      "integrity": "sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==",
-      "cpu": [
-        "arm64"
-      ],
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "android"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-darwin-arm64": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.6.0.tgz",
-      "integrity": "sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==",
-      "cpu": [
-        "arm64"
-      ],
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "darwin"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-darwin-x64": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.6.0.tgz",
-      "integrity": "sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==",
-      "cpu": [
-        "x64"
-      ],
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "darwin"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-freebsd-x64": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.6.0.tgz",
-      "integrity": "sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==",
-      "cpu": [
-        "x64"
-      ],
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "freebsd"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-linux-arm-glibc": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.6.0.tgz",
-      "integrity": "sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==",
-      "cpu": [
-        "arm"
-      ],
-      "dev": true,
-      "libc": [
-        "glibc"
-      ],
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "linux"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-linux-arm-musl": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.6.0.tgz",
-      "integrity": "sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==",
-      "cpu": [
-        "arm"
-      ],
-      "dev": true,
-      "libc": [
-        "musl"
-      ],
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "linux"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-linux-arm64-glibc": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.6.0.tgz",
-      "integrity": "sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==",
-      "cpu": [
-        "arm64"
-      ],
-      "dev": true,
-      "libc": [
-        "glibc"
-      ],
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "linux"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-linux-arm64-musl": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.6.0.tgz",
-      "integrity": "sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==",
-      "cpu": [
-        "arm64"
-      ],
-      "dev": true,
-      "libc": [
-        "musl"
-      ],
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "linux"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-linux-x64-glibc": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.6.0.tgz",
-      "integrity": "sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==",
-      "cpu": [
-        "x64"
-      ],
-      "dev": true,
-      "libc": [
-        "glibc"
-      ],
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "linux"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-linux-x64-musl": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.6.0.tgz",
-      "integrity": "sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==",
-      "cpu": [
-        "x64"
-      ],
-      "dev": true,
-      "libc": [
-        "musl"
-      ],
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "linux"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-win32-arm64": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.6.0.tgz",
-      "integrity": "sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==",
-      "cpu": [
-        "arm64"
-      ],
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "win32"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher-win32-x64": {
-      "version": "2.6.0",
-      "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.6.0.tgz",
-      "integrity": "sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==",
-      "cpu": [
-        "x64"
-      ],
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "os": [
-        "win32"
-      ],
-      "engines": {
-        "node": ">= 10.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/parcel"
-      }
-    },
-    "node_modules/@parcel/watcher/node_modules/picomatch": {
-      "version": "4.0.7",
-      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
-      "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
-      "dev": true,
-      "license": "MIT",
-      "optional": true,
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/jonschlinkert"
-      }
-    },
-    "node_modules/@radix-ui/colors": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/@radix-ui/colors/-/colors-3.0.0.tgz",
-      "integrity": "sha512-FUOsGBkHrYJwCSEtWRCIfQbZG7q1e6DgxCIOe1SUQzDe/7rXXeA47s8yCn6fuTNQAj1Zq4oTFi9Yjp3wzElcxg==",
-      "license": "MIT"
-    },
-    "node_modules/@radix-ui/primitive": {
-      "version": "1.1.7",
-      "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.7.tgz",
-      "integrity": "sha512-rqWnm76nYT8HoNNqEjpgJ7Pw/DrBj5iBTrmEPo6HTX5+VJyBNOqTdv4g89G63HuR5g0AaENoAcH7Is5fF2kZ8Q==",
-      "license": "MIT"
-    },
-    "node_modules/@radix-ui/react-arrow": {
-      "version": "1.1.15",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.15.tgz",
-      "integrity": "sha512-v4zggRcjadnI+ClKDuijlQEW4tw3NoaeHc/PwpKnLoLLKNUG4InLegkstooLcRIUWCs+8L22dGURCVuFfOKfnA==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/react-primitive": "2.1.10"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-collection": {
-      "version": "1.1.15",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.15.tgz",
-      "integrity": "sha512-9W+B9NPF0NaaPh/1NJd3+KqsnlLqU9H7T2rvww+fp+T/evVXdNAyYcnfRQZFOjkR1ajQp3yORlqnI8soawLvNA==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/react-compose-refs": "1.1.5",
-        "@radix-ui/react-context": "1.2.2",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-slot": "1.3.3"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-compose-refs": {
-      "version": "1.1.5",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.5.tgz",
-      "integrity": "sha512-+48PbAAbq3didjJxa+OaWY2ZwgAKsNiRGyeHKszblZMQ+kcpd9pAaT11cMkGEie0vsOi3QdeTE6d5Fe3Gn61kA==",
-      "license": "MIT",
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-context": {
-      "version": "1.2.2",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-context/-/react-context-1.2.2.tgz",
-      "integrity": "sha512-RHCUGwKHDr0hDGg4X7ma4JG4/+12qxw8rkh5QKdDldlCvtja6nUx1Ef/8HVrJze81lEsgLQlqjzjGNHantgnQA==",
-      "license": "MIT",
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-dialog": {
-      "version": "1.1.23",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.23.tgz",
-      "integrity": "sha512-Ksw4WeROkO4rC9k/onilX/Ao2Cr1ku1unMNH+XSCcP4jSXYu7HDsg9n4ojMjVb22XpYjAQ9qfrFlVbru1vXDUA==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-compose-refs": "1.1.5",
-        "@radix-ui/react-context": "1.2.2",
-        "@radix-ui/react-dismissable-layer": "1.1.19",
-        "@radix-ui/react-focus-guards": "1.1.6",
-        "@radix-ui/react-focus-scope": "1.1.16",
-        "@radix-ui/react-id": "1.1.4",
-        "@radix-ui/react-portal": "1.1.17",
-        "@radix-ui/react-presence": "1.1.10",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-slot": "1.3.3",
-        "@radix-ui/react-use-controllable-state": "1.2.6",
-        "@radix-ui/react-use-layout-effect": "1.1.4",
-        "aria-hidden": "^1.2.4",
-        "react-remove-scroll": "^2.7.2"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-direction": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.4.tgz",
-      "integrity": "sha512-5pzg4FGQNpExhnhT2zlrP1wZFaYCd1K0nYWoFAdcYoYK868IEigqMX3B3f8yIoRlAhAeDWciLI6ZdCKHF9P4Vg==",
-      "license": "MIT",
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-dismissable-layer": {
-      "version": "1.1.19",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.19.tgz",
-      "integrity": "sha512-8g4pfOL9HoKKLWGiypT+dphVqjFfmcXO5GBnhsG6zI+lxAx/8feQpr+1LSN8Re3hiZ+XkLNS4O9ztK11/LzQ6w==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-compose-refs": "1.1.5",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-use-callback-ref": "1.1.4",
-        "@radix-ui/react-use-effect-event": "0.0.5"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-focus-guards": {
-      "version": "1.1.6",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-guards/-/react-focus-guards-1.1.6.tgz",
-      "integrity": "sha512-RNOJjfZMTyBM6xYmV3IVGXkPjIhcBAuv48POevAXwrGJhkWZ9p1rFoIS1JFooPuT193AZmRsCPhpoVJxx6OPoQ==",
-      "license": "MIT",
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-focus-scope": {
-      "version": "1.1.16",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.16.tgz",
-      "integrity": "sha512-wmRZ2WWLvmt6KHy2rNPOdPUjwq5xOHY02+m+udwJTn0aNIox/rkskAvJTyTLGhPK6KgrUjlJUJpgmx/+wFiFIQ==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/react-compose-refs": "1.1.5",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-use-callback-ref": "1.1.4"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
+      "license": "MIT"
+    },
+    "node_modules/@mathjax/mathjax-newcm-font": {
+      "version": "4.1.3",
+      "resolved": "https://registry.npmjs.org/@mathjax/mathjax-newcm-font/-/mathjax-newcm-font-4.1.3.tgz",
+      "integrity": "sha512-gzAB3dFHilHX1l5x2xUqRL+1jDQt3Fyza1DkEMVXWC4E8SvsGdlgEza47HYi2WhVcgfkvf4zgUGzuhbq3Pjlew==",
+      "license": "Apache-2.0"
+    },
+    "node_modules/@mathjax/mathjax-stix2-font": {
+      "version": "4.1.3",
+      "resolved": "https://registry.npmjs.org/@mathjax/mathjax-stix2-font/-/mathjax-stix2-font-4.1.3.tgz",
+      "integrity": "sha512-DjJh93JuKodoYmvWawiqa22y/dwP+hn6/DN/DepFRFaRbdndNcSD3iBsBunSrLPFIJBS83mn4iR015YRPWZWhg==",
+      "license": "Apache-2.0"
     },
-    "node_modules/@radix-ui/react-icons": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-icons/-/react-icons-1.3.2.tgz",
-      "integrity": "sha512-fyQIhGDhzfc9pK2kH6Pl9c4BDJGfMkPqkyIgYDthyNYoNg3wVhoJMMh19WS4Up/1KMPFVpNsT2q3WmXn2N1m6g==",
+    "node_modules/@mui/core-downloads-tracker": {
+      "version": "9.5.0",
+      "resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-9.5.0.tgz",
+      "integrity": "sha512-PErEpl3Lp+1ZqWYKI7GQU8XSiciAFmLbUAZ7IoaUL598HLy1UAFuEUMEJu8yAS1v8vkXYzWprMVZzky4UwXoOA==",
       "license": "MIT",
-      "peerDependencies": {
-        "react": "^16.x || ^17.x || ^18.x || ^19.0.0 || ^19.0.0-rc"
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/mui-org"
       }
     },
-    "node_modules/@radix-ui/react-id": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.4.tgz",
-      "integrity": "sha512-TMQp2llA+RYn7JcjnrMnz7wN4pcVttPZnRZo52PLQsoLVKzNlVwUeHmfePgTgRluXFvlD3GD5g5MOVVTJCO0qA==",
+    "node_modules/@mui/icons-material": {
+      "version": "9.5.0",
+      "resolved": "https://registry.npmjs.org/@mui/icons-material/-/icons-material-9.5.0.tgz",
+      "integrity": "sha512-dahtVaqnRUIBgaZ4WC9EdP+LgJ5d2rslASYIX+nDFG6+ssUiM11jQ+Gd1wH8vhUGoNA9ES40MYics5BI8zJFXQ==",
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/react-use-layout-effect": "1.1.4"
+        "@babel/runtime": "^7.29.7 || ^8.0.5"
       },
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": ">=14.0.0"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-menu": {
-      "version": "2.1.24",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-menu/-/react-menu-2.1.24.tgz",
-      "integrity": "sha512-uW7RVuU6Lp/ZtfeY4b3kL32zccgEWvPv1+cf17ubYzHa9cL8AHokmk36cG/XEiH/smbQvumnieXX9j/e9RqJWA==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-collection": "1.1.15",
-        "@radix-ui/react-compose-refs": "1.1.5",
-        "@radix-ui/react-context": "1.2.2",
-        "@radix-ui/react-direction": "1.1.4",
-        "@radix-ui/react-dismissable-layer": "1.1.19",
-        "@radix-ui/react-focus-guards": "1.1.6",
-        "@radix-ui/react-focus-scope": "1.1.16",
-        "@radix-ui/react-id": "1.1.4",
-        "@radix-ui/react-popper": "1.3.7",
-        "@radix-ui/react-portal": "1.1.17",
-        "@radix-ui/react-presence": "1.1.10",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-roving-focus": "1.1.19",
-        "@radix-ui/react-slot": "1.3.3",
-        "@radix-ui/react-use-callback-ref": "1.1.4",
-        "aria-hidden": "^1.2.4",
-        "react-remove-scroll": "^2.7.2"
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/mui-org"
       },
       "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+        "@mui/material": "^9.5.0",
+        "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
+        "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
       },
       "peerDependenciesMeta": {
         "@types/react": {
           "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
         }
       }
     },
-    "node_modules/@radix-ui/react-menubar": {
-      "version": "1.1.24",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-menubar/-/react-menubar-1.1.24.tgz",
-      "integrity": "sha512-eeVs0vf7cuqXaM0qLQCPcufImiJNVBXdJDLu7ZGYl2732UH23Qat/foNGrr6vYV3/DdTsBqASoggUFgH14OcZA==",
+    "node_modules/@mui/material": {
+      "version": "9.5.0",
+      "resolved": "https://registry.npmjs.org/@mui/material/-/material-9.5.0.tgz",
+      "integrity": "sha512-QgqvdVjZoKxP8E8SBxYY6LrdV+kw00moXweZQWBbMMdifPKZAGfUaaXhGKIca6fjKnCL6HJIe/AWWCpqNvyHVw==",
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-collection": "1.1.15",
-        "@radix-ui/react-compose-refs": "1.1.5",
-        "@radix-ui/react-context": "1.2.2",
-        "@radix-ui/react-direction": "1.1.4",
-        "@radix-ui/react-id": "1.1.4",
-        "@radix-ui/react-menu": "2.1.24",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-roving-focus": "1.1.19",
-        "@radix-ui/react-use-controllable-state": "1.2.6"
+        "@babel/runtime": "^7.29.7 || ^8.0.5",
+        "@mui/core-downloads-tracker": "^9.5.0",
+        "@mui/system": "^9.5.0",
+        "@mui/types": "^9.5.0",
+        "@mui/utils": "^9.5.0",
+        "@popperjs/core": "^2.11.8",
+        "@types/react-transition-group": "^4.4.12",
+        "clsx": "^2.1.1",
+        "csstype": "^3.2.3",
+        "prop-types": "^15.8.1",
+        "react-is": "^19.3.0",
+        "react-transition-group": "^4.4.5"
       },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": ">=14.0.0"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-popper": {
-      "version": "1.3.7",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.3.7.tgz",
-      "integrity": "sha512-UsJrrd7w4wuKKTdvd/DNERVlwSlUcyXzjhyDwBk+3aPOsCjOY6ZSbxuw8E6lZTjjfP8Cpd0J8VVkrYUWyGYXyg==",
-      "license": "MIT",
-      "dependencies": {
-        "@floating-ui/react-dom": "^2.0.0",
-        "@radix-ui/react-arrow": "1.1.15",
-        "@radix-ui/react-compose-refs": "1.1.5",
-        "@radix-ui/react-context": "1.2.2",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-use-callback-ref": "1.1.4",
-        "@radix-ui/react-use-layout-effect": "1.1.4",
-        "@radix-ui/react-use-rect": "1.1.4",
-        "@radix-ui/react-use-size": "1.1.4",
-        "@radix-ui/rect": "1.1.3"
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/mui-org"
       },
       "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+        "@emotion/react": "^11.5.0",
+        "@emotion/styled": "^11.3.0",
+        "@mui/material-pigment-css": "^9.5.0",
+        "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
+        "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
+        "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
       },
       "peerDependenciesMeta": {
-        "@types/react": {
+        "@emotion/react": {
           "optional": true
         },
-        "@types/react-dom": {
+        "@emotion/styled": {
           "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-portal": {
-      "version": "1.1.17",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.17.tgz",
-      "integrity": "sha512-vKQLcWypUnwZVvfV7UkGahH2g6ySe8M8R+zYBwPrv5byZ9QAW6cQVvNKo7GgmD+p8aYb6D9JBuvy8/WhOno2wQ==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-use-layout-effect": "1.1.4"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
+        },
+        "@mui/material-pigment-css": {
           "optional": true
         },
-        "@types/react-dom": {
+        "@types/react": {
           "optional": true
         }
       }
     },
-    "node_modules/@radix-ui/react-presence": {
-      "version": "1.1.10",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.10.tgz",
-      "integrity": "sha512-3wyzCQ6+ubRA+D4uv9m95JYLXxmOHp05qjrkjeA7uKHHtjpPggQzc6DAb0URl7j67oR0K2foO4ip27TiX037Bw==",
+    "node_modules/@mui/private-theming": {
+      "version": "9.5.0",
+      "resolved": "https://registry.npmjs.org/@mui/private-theming/-/private-theming-9.5.0.tgz",
+      "integrity": "sha512-UHZKySlr4ZJeA5HEhe/Tq1fhsR5573ViKYn7JV80dCVJtgqRQIplRSer1DHPg2Yi22llX7QRhgM0Vtrx4kZHSA==",
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/react-use-layout-effect": "1.1.4"
+        "@babel/runtime": "^7.29.7 || ^8.0.5",
+        "@mui/utils": "^9.5.0",
+        "prop-types": "^15.8.1"
       },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": ">=14.0.0"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-primitive": {
-      "version": "2.1.10",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.10.tgz",
-      "integrity": "sha512-MucOnzh6hR5mid6VpkbglRAMYMjKLqRnGBbjXkzjK52fuQDd1qbkx78a5P40mkcnVXJdEVxm26E9OPAiUq7nBg==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/react-slot": "1.3.3"
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/mui-org"
       },
       "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+        "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
+        "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
       },
       "peerDependenciesMeta": {
         "@types/react": {
           "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
         }
       }
     },
-    "node_modules/@radix-ui/react-roving-focus": {
-      "version": "1.1.19",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-roving-focus/-/react-roving-focus-1.1.19.tgz",
-      "integrity": "sha512-V9jI6hDjT7l3jsCQD9bLNvDLM3tH/gdbOTp7Tefp3hbbgCGQoK7tUvrWiRlcoBHIZ809ElXwNQwVo0B98LuTXQ==",
+    "node_modules/@mui/styled-engine": {
+      "version": "9.5.0",
+      "resolved": "https://registry.npmjs.org/@mui/styled-engine/-/styled-engine-9.5.0.tgz",
+      "integrity": "sha512-IX1ceHnZ0bJgzJRWO/Ayl4ME1rNmpWVYwV28yb089UAMR17rJkV1qfr7ApsWQXXPi1oi+2JapJrWQAiAnTlJHQ==",
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-collection": "1.1.15",
-        "@radix-ui/react-compose-refs": "1.1.5",
-        "@radix-ui/react-context": "1.2.2",
-        "@radix-ui/react-direction": "1.1.4",
-        "@radix-ui/react-id": "1.1.4",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-use-callback-ref": "1.1.4",
-        "@radix-ui/react-use-controllable-state": "1.2.6",
-        "@radix-ui/react-use-is-hydrated": "0.1.3",
-        "@radix-ui/react-use-layout-effect": "1.1.4"
+        "@babel/runtime": "^7.29.7 || ^8.0.5",
+        "@emotion/cache": "^11.14.0",
+        "@emotion/serialize": "^1.3.3",
+        "@emotion/sheet": "^1.4.0",
+        "csstype": "^3.2.3",
+        "prop-types": "^15.8.1"
       },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": ">=14.0.0"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-separator": {
-      "version": "1.1.15",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-separator/-/react-separator-1.1.15.tgz",
-      "integrity": "sha512-jOLO4lssEzWpoDu7G+Ze4VjwMRUBt291pnZD0gmalREZipnTX3wadQo7Fy48GCTfe14/YRN6rw/rOJqrE85Wxw==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/react-primitive": "2.1.10"
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/mui-org"
       },
       "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+        "@emotion/react": "^11.4.1",
+        "@emotion/styled": "^11.3.0",
+        "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
       },
       "peerDependenciesMeta": {
-        "@types/react": {
+        "@emotion/react": {
           "optional": true
         },
-        "@types/react-dom": {
+        "@emotion/styled": {
           "optional": true
         }
       }
     },
-    "node_modules/@radix-ui/react-slot": {
-      "version": "1.3.3",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.3.3.tgz",
-      "integrity": "sha512-qx7oqnYbxnK9kYI9m317qmFmEgo6ywqWvbTogdj7cL9p3/yx4M48p7Rnw5z3H890cL/ow/EeWJsuTykeZVXP5Q==",
+    "node_modules/@mui/system": {
+      "version": "9.5.0",
+      "resolved": "https://registry.npmjs.org/@mui/system/-/system-9.5.0.tgz",
+      "integrity": "sha512-OZuAwvoiaaHpvn0a540VH1DUwwmojJubGfNmO2g+nb2ybNDP4/gF7t7aA6AMduELSuJ5yxwlzyFvUO3CfLv1Yg==",
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/react-compose-refs": "1.1.5"
+        "@babel/runtime": "^7.29.7 || ^8.0.5",
+        "@mui/private-theming": "^9.5.0",
+        "@mui/styled-engine": "^9.5.0",
+        "@mui/types": "^9.5.0",
+        "@mui/utils": "^9.5.0",
+        "clsx": "^2.1.1",
+        "csstype": "^3.2.3",
+        "prop-types": "^15.8.1"
       },
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": ">=14.0.0"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-toggle": {
-      "version": "1.1.18",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle/-/react-toggle-1.1.18.tgz",
-      "integrity": "sha512-7lonPlKfSacd20GlOBx2ltuVKz9oqWYZz+oMQyOltw6t1y2nyftj2ZmwwUHYn49kqfDWcp8dNZm5NgV+5Z+mug==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-use-controllable-state": "1.2.6"
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/mui-org"
       },
       "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+        "@emotion/react": "^11.5.0",
+        "@emotion/styled": "^11.3.0",
+        "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
+        "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
       },
       "peerDependenciesMeta": {
-        "@types/react": {
+        "@emotion/react": {
           "optional": true
         },
-        "@types/react-dom": {
+        "@emotion/styled": {
+          "optional": true
+        },
+        "@types/react": {
           "optional": true
         }
       }
     },
-    "node_modules/@radix-ui/react-toggle-group": {
-      "version": "1.1.19",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-toggle-group/-/react-toggle-group-1.1.19.tgz",
-      "integrity": "sha512-OtnwuSVjd1Ofi+AdnvhsjQdyuhCDwYs1w9RyB5BN/OavXOVQo42SYqQjwUnbPnaiPFBpQ9aX70dWeee+v2oBLA==",
+    "node_modules/@mui/types": {
+      "version": "9.5.0",
+      "resolved": "https://registry.npmjs.org/@mui/types/-/types-9.5.0.tgz",
+      "integrity": "sha512-O0S6xS80qEQqW2CYNrd4GlBEQ1xpMOHZ5b4zO/DaLu6NZmtthM6smEg0Gz/u9gX5vL+8NB3EiBIxmxSCcG590Q==",
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-context": "1.2.2",
-        "@radix-ui/react-direction": "1.1.4",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-roving-focus": "1.1.19",
-        "@radix-ui/react-toggle": "1.1.18",
-        "@radix-ui/react-use-controllable-state": "1.2.6"
+        "@babel/runtime": "^7.29.7 || ^8.0.5"
       },
       "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+        "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0"
       },
       "peerDependenciesMeta": {
         "@types/react": {
           "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
         }
       }
     },
-    "node_modules/@radix-ui/react-toolbar": {
-      "version": "1.1.19",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-toolbar/-/react-toolbar-1.1.19.tgz",
-      "integrity": "sha512-Ph0IvtYw4VB12ZnZg+YtrGs8yJQsnizwo/zu0R4Y/nWugtJzA7Pg1eWeuDR9+LSqn+xjamss+UOSOJJJ4gx8jw==",
+    "node_modules/@mui/utils": {
+      "version": "9.5.0",
+      "resolved": "https://registry.npmjs.org/@mui/utils/-/utils-9.5.0.tgz",
+      "integrity": "sha512-8m0LfSgE2pj58znY3kZ+anwRKbnBkcu/7AJPA8L/77wEjN0QnpX4/zRAccyplp1VEUnMsUBADeTRin5Mkf7epA==",
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-context": "1.2.2",
-        "@radix-ui/react-direction": "1.1.4",
-        "@radix-ui/react-primitive": "2.1.10",
-        "@radix-ui/react-roving-focus": "1.1.19",
-        "@radix-ui/react-separator": "1.1.15",
-        "@radix-ui/react-toggle-group": "1.1.19"
+        "@babel/runtime": "^7.29.7 || ^8.0.5",
+        "@mui/types": "^9.5.0",
+        "@types/prop-types": "^15.7.15",
+        "clsx": "^2.1.1",
+        "prop-types": "^15.8.1",
+        "react-is": "^19.3.0"
       },
-      "peerDependencies": {
-        "@types/react": "*",
-        "@types/react-dom": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc",
-        "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": ">=14.0.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/mui-org"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        },
-        "@types/react-dom": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-use-callback-ref": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.4.tgz",
-      "integrity": "sha512-R6OUY2e2fA6Yn6s+VSx5KBV6Nx8LQEhu+cz7LCej18rQ1HLyg9PSC9jP/ZNx0o6FAIK9c0F1kHylzSxKsdlkrQ==",
-      "license": "MIT",
       "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+        "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
+        "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
       },
       "peerDependenciesMeta": {
         "@types/react": {
         }
       }
     },
-    "node_modules/@radix-ui/react-use-controllable-state": {
-      "version": "1.2.6",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-use-controllable-state/-/react-use-controllable-state-1.2.6.tgz",
-      "integrity": "sha512-uEQJGT97ZA/TgP/Hydw47lHu+/vQj6z/0jA+WeTbK1o9Rx45GImjpD0tc3W5ad3D6XTSR6e1yEO0FvGq6WQfVQ==",
+    "node_modules/@popperjs/core": {
+      "version": "2.11.8",
+      "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
+      "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
       "license": "MIT",
-      "dependencies": {
-        "@radix-ui/primitive": "1.1.7",
-        "@radix-ui/react-use-effect-event": "0.0.5",
-        "@radix-ui/react-use-layout-effect": "1.1.4"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/popperjs"
       }
     },
-    "node_modules/@radix-ui/react-use-effect-event": {
-      "version": "0.0.5",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-use-effect-event/-/react-use-effect-event-0.0.5.tgz",
-      "integrity": "sha512-7cshFL8HGS/7HEiHH+9kL9HBwp2sa9yX18Knwek6KYWmXwM7pegMgta2AXMQKI+rq3JnfSj9x8wYqFMTdG1Jgg==",
+    "node_modules/@stylistic/eslint-plugin": {
+      "version": "6.0.1",
+      "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-6.0.1.tgz",
+      "integrity": "sha512-7nyi2RmGIuzBYGq5C8cFaoQsh+COfo6oHMWCygzg2iaqJJ4RDThaKCMYRkkOUAQWv80R7sbBbpuKZfulH7bFcw==",
+      "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/react-use-layout-effect": "1.1.4"
+        "@eslint-community/eslint-utils": "^4.10.1",
+        "@typescript-eslint/types": "^8.72.2",
+        "@typescript-eslint/visitor-keys": "^8.72.2",
+        "espree": "^11.2.0",
+        "picomatch": "^4.0.7"
       },
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": "^20.19.0 || ^22.13.0 || >=24"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-use-is-hydrated": {
-      "version": "0.1.3",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-use-is-hydrated/-/react-use-is-hydrated-0.1.3.tgz",
-      "integrity": "sha512-umO/aJ+82CpOnhDZUTbILCQf7kU/g0iv+oGs/Q8jw7IkhWBzaEP4sA268PhFAJTFetbwp3ICc6ktpI4TqtxcIw==",
-      "license": "MIT",
       "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+        "eslint": "^9.0.0 || ^10.0.0",
+        "oxlint": "^1.55.0"
       },
       "peerDependenciesMeta": {
-        "@types/react": {
+        "eslint": {
+          "optional": true
+        },
+        "oxlint": {
           "optional": true
         }
       }
     },
-    "node_modules/@radix-ui/react-use-layout-effect": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-use-layout-effect/-/react-use-layout-effect-1.1.4.tgz",
-      "integrity": "sha512-K20DkRkUwDnxEYMBPcg3Y6voLkEy5p5QQmszZgLngKKiC7dzBR/aEuK3w1qlx2JWDUNH6FluahYdgR3BP+QbYw==",
+    "node_modules/@tanstack/hotkeys": {
+      "version": "0.32.0",
+      "resolved": "https://registry.npmjs.org/@tanstack/hotkeys/-/hotkeys-0.32.0.tgz",
+      "integrity": "sha512-RofohKwXpAtnySoa/sXCWjkA3fyWn8AKcxXO6/Uc/r+ufNiMAyYSmwpVmT7L9hzRNta9ai10Y2soKKfmK5tL8Q==",
       "license": "MIT",
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": ">=20"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/tannerlinsley"
       }
     },
-    "node_modules/@radix-ui/react-use-rect": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-use-rect/-/react-use-rect-1.1.4.tgz",
-      "integrity": "sha512-cSOCh6JlkmfjLyNcLiu2nB4v+nm+dkZ+Q5KHWk/soo4U7ZLiEQFKHK9/YmtBHjfCEaU43IBKQOc4/uJmCaiCTQ==",
+    "node_modules/@tanstack/react-hotkeys": {
+      "version": "0.27.0",
+      "resolved": "https://registry.npmjs.org/@tanstack/react-hotkeys/-/react-hotkeys-0.27.0.tgz",
+      "integrity": "sha512-R+XKpXHWIXiQbP4gCogDdqc2uEiHQtZ63rqILZySI595rEHGtFqEkyqrtTkENtu7J8QGan/13xCx18XVdOQuRA==",
       "license": "MIT",
       "dependencies": {
-        "@radix-ui/rect": "1.1.3"
+        "@tanstack/hotkeys": "0.32.0"
       },
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
+      "engines": {
+        "node": ">=20"
       },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@radix-ui/react-use-size": {
-      "version": "1.1.4",
-      "resolved": "https://registry.npmjs.org/@radix-ui/react-use-size/-/react-use-size-1.1.4.tgz",
-      "integrity": "sha512-D3anSY15EJoxrihpsXI6SMrmmonnQtR2ni7arO+Lfdg3O95b9hNXxONk8jA5C8ANdF/h5HMAxejgs8PWJ6rlhw==",
-      "license": "MIT",
-      "dependencies": {
-        "@radix-ui/react-use-layout-effect": "1.1.4"
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/tannerlinsley"
       },
       "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
+        "react": ">=18.0.0",
+        "react-dom": ">=18.0.0"
       }
     },
-    "node_modules/@radix-ui/rect": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.3.tgz",
-      "integrity": "sha512-JtyZR+mqgBibTo8xea3B6ZRmzZiM/YeVBtUkas6zMuXjAlfIFIW2FgqeM9eLyvEaYX66vr6DJMK+4U6LV0KhNw==",
-      "license": "MIT"
-    },
     "node_modules/@types/eslint": {
       "version": "9.6.1",
       "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz",
       "license": "MIT"
     },
     "node_modules/@types/estree": {
-      "version": "1.0.9",
-      "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",
-      "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",
+      "version": "1.0.10",
+      "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz",
+      "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==",
       "dev": true,
       "license": "MIT"
     },
       "license": "MIT"
     },
     "node_modules/@types/node": {
-      "version": "26.4.1",
-      "resolved": "https://registry.npmjs.org/@types/node/-/node-26.4.1.tgz",
-      "integrity": "sha512-k97ENvZWtvA6yqz5/FS6a7duDgOPEeOQOc2iKS/nY6mX6qJUKtLnWzQS+Xj6tXweyj6ZcTAK2Qecetnvi9nCLA==",
+      "version": "26.6.6",
+      "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz",
+      "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "undici-types": "~8.9.0"
+      }
+    },
+    "node_modules/@types/parse-json": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz",
+      "integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==",
+      "license": "MIT"
+    },
+    "node_modules/@types/prop-types": {
+      "version": "15.7.15",
+      "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.15.tgz",
+      "integrity": "sha512-F6bEyamV9jKGAFBEmlQnesRPGOQqS2+Uwi0Em15xenOxHaf2hv6L8YCVn3rPdPJOiJfPiCnLIRyvwVaqMY3MIw==",
+      "license": "MIT"
+    },
+    "node_modules/@types/react": {
+      "version": "19.3.0",
+      "resolved": "https://registry.npmjs.org/@types/react/-/react-19.3.0.tgz",
+      "integrity": "sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==",
+      "license": "MIT",
+      "peer": true,
+      "dependencies": {
+        "csstype": "^3.2.2"
+      }
+    },
+    "node_modules/@types/react-transition-group": {
+      "version": "4.4.12",
+      "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz",
+      "integrity": "sha512-8TV6R3h2j7a91c+1DXdJi3Syo69zzIZbz7Lg5tORM5LEJG7X/E6a1V3drRyBRZq7/utz7A+c4OgYLiLcYGHG6w==",
+      "license": "MIT",
+      "peerDependencies": {
+        "@types/react": "*"
+      }
+    },
+    "node_modules/@typescript-eslint/types": {
+      "version": "8.72.2",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.72.2.tgz",
+      "integrity": "sha512-Xfn37OLZx03+PCU7qWx9DTv2FCRh1E6fk2+wONeNY15HXIwtcwuveaSwVpGAUptkNmPQegRxW5JyRel9T7wrog==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
+      }
+    },
+    "node_modules/@typescript-eslint/visitor-keys": {
+      "version": "8.72.2",
+      "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.72.2.tgz",
+      "integrity": "sha512-NAGrjn0Pitjqzq/GkgMC4kBYm233PQ8GffyQ9+kTA3AlNQYEzOf25EIM02BAHZv5FRJSpHpJk+OGUxVkOB93GQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "undici-types": "~8.3.0"
+        "@typescript-eslint/types": "8.72.2",
+        "eslint-visitor-keys": "^5.0.0"
+      },
+      "engines": {
+        "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/typescript-eslint"
       }
     },
     "node_modules/@webassemblyjs/ast": {
       }
     },
     "node_modules/acorn": {
-      "version": "8.18.0",
-      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz",
-      "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==",
+      "version": "8.19.0",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz",
+      "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==",
       "dev": true,
       "license": "MIT",
       "bin": {
       }
     },
     "node_modules/adm-zip": {
-      "version": "0.6.0",
-      "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.6.0.tgz",
-      "integrity": "sha512-XleryMhbuksdKtofnWZ9Sk+4CUTbms4Mb/EU32SZwToAyZ5RgVos/ki8n+yr0LWHOGKuakbXTuuYNHLQjhddgg==",
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/adm-zip/-/adm-zip-0.6.1.tgz",
+      "integrity": "sha512-Xwrja8nx9e5o2N1my4DsKCeKpdrnACyr1wtbPxBDgGzKzKyE9kRtBFA8mWldI+RVlD7CBZNWY/wQ2+ydwOR6kQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
       }
     },
     "node_modules/ajv-formats": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz",
-      "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==",
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",
+      "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "node": ">=4"
       }
     },
-    "node_modules/aria-hidden": {
-      "version": "1.2.6",
-      "resolved": "https://registry.npmjs.org/aria-hidden/-/aria-hidden-1.2.6.tgz",
-      "integrity": "sha512-ik3ZgC9dY/lYVVM++OISsaYDeg1tb0VtP5uL3ouh1koGOaUMDPpbFIei4JkFimWUFPn90sbMNMXQAIVOlnYKJA==",
-      "license": "MIT",
-      "dependencies": {
-        "tslib": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      }
-    },
     "node_modules/array-find-index": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
         }
       }
     },
+    "node_modules/babel-plugin-macros": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz",
+      "integrity": "sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.12.5",
+        "cosmiconfig": "^7.0.0",
+        "resolve": "^1.19.0"
+      },
+      "engines": {
+        "node": ">=10",
+        "npm": ">=6"
+      }
+    },
+    "node_modules/babel-plugin-macros/node_modules/@babel/runtime": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.14.tgz",
+      "integrity": "sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
     "node_modules/babel-plugin-polyfill-corejs3": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-1.0.0.tgz",
       }
     },
     "node_modules/baseline-browser-mapping": {
-      "version": "2.11.20",
-      "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.20.tgz",
-      "integrity": "sha512-H0ulySigv6icDJ1F7SjtdCD6PrhTpdYCmP0CactWy1+ekh0AFd0o1Wn5T8b+hnTmdBx19u9yhL6wvCylXMY7zw==",
+      "version": "2.11.37",
+      "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.37.tgz",
+      "integrity": "sha512-QYph+vfurmaxhNwi9FprfmtkT5cx2Keg8FzZ0vnjO8ukscIybVyZGMFwdllKGlTI6qyU8ck43OM9UXh+IFJihQ==",
       "dev": true,
       "license": "Apache-2.0",
       "bin": {
       },
       "engines": {
         "node": ">=6.0.0"
-      }
-    },
-    "node_modules/body-parser": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",
-      "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",
-      "license": "MIT",
-      "dependencies": {
-        "bytes": "^3.1.2",
-        "content-type": "^2.0.0",
-        "debug": "^4.4.3",
-        "http-errors": "^2.0.1",
-        "iconv-lite": "^0.7.2",
-        "on-finished": "^2.4.1",
-        "qs": "^6.15.2",
-        "raw-body": "^3.0.2",
-        "type-is": "^2.1.0"
-      },
-      "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/express"
-      }
-    },
-    "node_modules/body-parser/node_modules/content-type": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
-      "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
+      }
+    },
+    "node_modules/body-parser": {
+      "version": "2.4.0",
+      "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.4.0.tgz",
+      "integrity": "sha512-Ifk1KcLrxaGt1occQagQNFNNOqRt1LFuehEnHHzB8Z6cRgIxRU1TBaiIsUiCdA+gy5PL7Y1IX31DNKkRmxtXjQ==",
       "license": "MIT",
+      "dependencies": {
+        "bytes": "^3.1.2",
+        "content-type": "^2.1.0",
+        "debug": "^4.4.3",
+        "http-errors": "^2.0.1",
+        "iconv-lite": "^0.7.3",
+        "on-finished": "^2.4.1",
+        "qs": "^6.16.1",
+        "raw-body": "^3.0.2",
+        "type-is": "^2.1.0"
+      },
       "engines": {
         "node": ">=18"
       },
       "license": "ISC"
     },
     "node_modules/brace-expansion": {
-      "version": "5.0.9",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz",
-      "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==",
+      "version": "5.0.13",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.13.tgz",
+      "integrity": "sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/browserslist": {
-      "version": "4.28.8",
-      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.8.tgz",
-      "integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==",
+      "version": "4.29.5",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.5.tgz",
+      "integrity": "sha512-khTmKu5NGYTotqcYo8Bew2k4RAE9PuXRSFRXG2lQBrCEQHyeQ/vX6gKMxfokwywBsLiXZMnHsmWMG1pnO8J7uQ==",
       "dev": true,
       "funding": [
         {
       ],
       "license": "MIT",
       "dependencies": {
-        "baseline-browser-mapping": "^2.11.12",
-        "caniuse-lite": "^1.0.30001809",
-        "electron-to-chromium": "^1.5.402",
-        "node-releases": "^2.0.53",
-        "update-browserslist-db": "^1.3.0"
+        "baseline-browser-mapping": "^2.11.33",
+        "caniuse-lite": "^1.0.30001819",
+        "electron-to-chromium": "^1.5.464",
+        "node-releases": "^2.0.60",
+        "update-browserslist-db": "^1.3.4"
       },
       "bin": {
         "browserslist": "cli.js"
         "node": ">= 0.8"
       }
     },
+    "node_modules/cacheable": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz",
+      "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@cacheable/memory": "^2.2.0",
+        "@cacheable/utils": "^2.5.0",
+        "hookified": "^1.15.0",
+        "keyv": "^5.6.0",
+        "qified": "^0.10.1"
+      }
+    },
     "node_modules/call-bind-apply-helpers": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/callsites": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+      "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6"
+      }
+    },
     "node_modules/camel-case": {
       "version": "4.1.2",
       "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
       }
     },
     "node_modules/caniuse-lite": {
-      "version": "1.0.30001810",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",
-      "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",
+      "version": "1.0.30001826",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001826.tgz",
+      "integrity": "sha512-wTB+9tIbLro/BCXwLuNV1meHE4L9dS6dArMDwgYfNBPMYScqClHyGunhkCSDtHhe/69Xl0sHlKgBVZ+fNsYtWA==",
       "dev": true,
       "funding": [
         {
         "node": ">= 10.0"
       }
     },
+    "node_modules/clean-css/node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "dev": true,
+      "license": "BSD-3-Clause",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/clone-deep": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz",
         "node": ">=6"
       }
     },
+    "node_modules/clsx": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
+      "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6"
+      }
+    },
     "node_modules/codemirror": {
       "version": "6.0.2",
       "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz",
       "license": "MIT"
     },
     "node_modules/content-disposition": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
-      "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-2.0.1.tgz",
+      "integrity": "sha512-e+H0ZXHSWYrENhQzw1LPuP4oF5MzVKmDU6d3hxlvaPEYLLg62MxtQNPRx4SYSuYJSBUgnQIG4HIN2tEtNv7Dog==",
       "license": "MIT",
       "engines": {
         "node": ">=18"
       }
     },
     "node_modules/content-type": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
-      "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
+      "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
       "license": "MIT",
       "engines": {
-        "node": ">= 0.6"
+        "node": ">=18"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
       }
     },
     "node_modules/convert-source-map": {
       }
     },
     "node_modules/core-js-compat": {
-      "version": "3.50.0",
-      "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.50.0.tgz",
-      "integrity": "sha512-XGpFGbMLHwSt74YLTKho7Ib242qi6O8MSX+sRokV4oz7iKXvQWGYZthjIhjRGMxjzVkAubBO512dKGYcefmX3Q==",
+      "version": "3.51.0",
+      "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.51.0.tgz",
+      "integrity": "sha512-52r6fkXgxv4GLMjmFcMWRx7X9bw071xTTdrDcdyPGRqU2oE+9pCG0bAOMifSBdLw0JRBZKEF0q3B55qPlLuE8g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "browserslist": "^4.28.7"
+        "browserslist": "^4.29.3"
       },
       "engines": {
         "node": ">=6.4.0"
       "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
       "license": "MIT"
     },
+    "node_modules/cosmiconfig": {
+      "version": "7.1.0",
+      "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz",
+      "integrity": "sha512-AdmX6xUzdNASswsFtmwSt7Vj8po9IuqXm0UXz7QKPuEUmPB4XyjGfaAr2PSuELMwkRMVH1EpIkX5bTZGRB3eCA==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/parse-json": "^4.0.0",
+        "import-fresh": "^3.2.1",
+        "parse-json": "^5.0.0",
+        "path-type": "^4.0.0",
+        "yaml": "^1.10.0"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
     "node_modules/crelt": {
       "version": "1.0.7",
       "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.7.tgz",
         "node": ">= 8"
       }
     },
-    "node_modules/css-loader": {
-      "version": "7.1.5",
-      "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.5.tgz",
-      "integrity": "sha512-Q7iAfQkU2twNBryKX/vGAlE+GAmkF7quhSzAGNK8fBimxk3+tqg245rH52UPb9dioBolBc8rP0ihmHBaDTJQBA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "icss-utils": "^5.1.0",
-        "postcss": "^8.4.40",
-        "postcss-modules-extract-imports": "^3.1.0",
-        "postcss-modules-local-by-default": "^4.0.5",
-        "postcss-modules-scope": "^3.2.0",
-        "postcss-modules-values": "^4.0.0",
-        "postcss-value-parser": "^4.2.0",
-        "semver": "^7.6.3"
-      },
-      "engines": {
-        "node": ">= 18.12.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/webpack"
-      },
-      "peerDependencies": {
-        "@rspack/core": "0.x || ^1.0.0 || ^2.0.0-0",
-        "webpack": "^5.27.0"
-      },
-      "peerDependenciesMeta": {
-        "@rspack/core": {
-          "optional": true
-        },
-        "webpack": {
-          "optional": true
-        }
-      }
-    },
     "node_modules/css-select": {
       "version": "4.3.0",
       "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz",
         "url": "https://github.com/sponsors/fb55"
       }
     },
-    "node_modules/cssesc": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
-      "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
-      "dev": true,
-      "license": "MIT",
-      "bin": {
-        "cssesc": "bin/cssesc"
-      },
-      "engines": {
-        "node": ">=4"
-      }
+    "node_modules/csstype": {
+      "version": "3.2.3",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",
+      "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",
+      "license": "MIT"
     },
     "node_modules/debug": {
       "version": "4.4.3",
       ],
       "license": "MIT"
     },
-    "node_modules/detect-libc": {
-      "version": "2.1.2",
-      "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
-      "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
-      "dev": true,
-      "license": "Apache-2.0",
-      "optional": true,
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/detect-node-es": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/detect-node-es/-/detect-node-es-1.1.0.tgz",
-      "integrity": "sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==",
-      "license": "MIT"
-    },
     "node_modules/dezalgo": {
       "version": "1.0.4",
       "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz",
         "utila": "~0.4"
       }
     },
+    "node_modules/dom-helpers": {
+      "version": "5.2.1",
+      "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz",
+      "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/runtime": "^7.8.7",
+        "csstype": "^3.0.2"
+      }
+    },
+    "node_modules/dom-helpers/node_modules/@babel/runtime": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.14.tgz",
+      "integrity": "sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
     "node_modules/dom-serializer": {
       "version": "1.4.1",
       "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz",
       }
     },
     "node_modules/dotenv": {
-      "version": "17.4.2",
-      "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz",
-      "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==",
+      "version": "18.0.10",
+      "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-18.0.10.tgz",
+      "integrity": "sha512-89FAA1xchzK2mxVWdr5F/0rldwiueXs6zJM86rO66EzekR1iBdiXRthyG+m5GvkJaFH3C2LESzamTkgndmLT2A==",
       "license": "BSD-2-Clause",
+      "bin": {
+        "dotenv": "dist/cli.cjs"
+      },
       "engines": {
         "node": ">=12"
       },
       "license": "MIT"
     },
     "node_modules/electron-to-chromium": {
-      "version": "1.5.420",
-      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.420.tgz",
-      "integrity": "sha512-2yD6XreGusOfNV+dUcvipJEXc3n/n7fgr7996aszTG+YY5E4mqM4tOq/3uhP129cazL9YHbVWSpc79ePotWtPA==",
+      "version": "1.5.486",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.486.tgz",
+      "integrity": "sha512-rpybw4Ac4ak/An6G1Me2+61xzwobowDGyuJe71QHHOVpkZv4fPVobsLl7WH6zHSKusAMpaHxGKTpOvpy7+r3dQ==",
       "dev": true,
       "license": "ISC"
     },
     "node_modules/empathic": {
-      "version": "2.0.1",
-      "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.0.1.tgz",
-      "integrity": "sha512-YGRs8knHhKHVShLkFET/rWAU8kmHbOV5LwN938RHI0pljAJ1Gf6SzXsSmRaEzcXTtOOmVqJ5+WtQPL5uigY50Q==",
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/empathic/-/empathic-2.1.0.tgz",
+      "integrity": "sha512-AnfC1ATldl49/cvZdLPDjBfrRNwbDO05aibiOtzQu3qtlbJtomNLhF30HEtn/7iBz50dlMECqATo3fG0LrdEgw==",
       "dev": true,
       "license": "MIT",
       "engines": {
       }
     },
     "node_modules/encodeurl": {
-      "version": "2.0.0",
-      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
-      "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.3.tgz",
+      "integrity": "sha512-mIteYONiEfc4xWf2F1WXovh1c8npzS00vNeiUPdwFF+QlVJni+gNvpQltLMQhob8rew/bWWc/bGTuUr0EUGt0w==",
       "license": "MIT",
       "engines": {
         "node": ">= 0.8"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
       }
     },
     "node_modules/enhanced-resolve": {
-      "version": "5.24.5",
-      "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.5.tgz",
-      "integrity": "sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==",
+      "version": "5.27.0",
+      "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.27.0.tgz",
+      "integrity": "sha512-Do6BB2xzlcc/odFg+XEYyneAx4T/WfywO71yw9ePS2tVfRsf7JVR4mUeELadIeHzixkzbG5DpluiEFPi2WGfYQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "node": ">=4"
       }
     },
+    "node_modules/error-ex": {
+      "version": "1.3.4",
+      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz",
+      "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==",
+      "license": "MIT",
+      "dependencies": {
+        "is-arrayish": "^0.2.1"
+      }
+    },
     "node_modules/es-define-property": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
       "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
-      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">=10"
       }
     },
     "node_modules/eslint": {
-      "version": "10.9.1",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz",
-      "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==",
+      "version": "10.15.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.15.0.tgz",
+      "integrity": "sha512-+5Wg4p+ze3sG1WErYgUO/3H1IQIfFBymVUA0Fo/XTeBOLS6UQIUekpSJ8sdRkn7O7wjh84b55w/roqavH2aScg==",
       "dev": true,
       "license": "MIT",
       "workspaces": [
       "dependencies": {
         "@eslint-community/eslint-utils": "^4.8.0",
         "@eslint-community/regexpp": "^4.12.2",
-        "@eslint/config-array": "^0.23.5",
+        "@eslint/config-array": "^0.23.6",
         "@eslint/config-helpers": "^0.7.0",
         "@eslint/core": "^1.2.1",
-        "@eslint/plugin-kit": "^0.7.2",
-        "@humanfs/node": "^0.16.6",
+        "@eslint/plugin-kit": "^0.7.3",
+        "@humanfs/node": "^0.16.8",
         "@humanwhocodes/module-importer": "^1.0.1",
         "@humanwhocodes/retry": "^0.4.2",
         "@types/estree": "^1.0.6",
         "esquery": "^1.7.0",
         "esutils": "^2.0.2",
         "fast-deep-equal": "^3.1.3",
-        "file-entry-cache": "^8.0.0",
+        "file-entry-cache": "11.1.5 || >11.1.6 <12",
         "find-up": "^5.0.0",
         "glob-parent": "^6.0.2",
         "ignore": "^5.2.0",
         "imurmurhash": "^0.1.4",
         "is-glob": "^4.0.0",
         "json-stable-stringify-without-jsonify": "^1.0.1",
-        "minimatch": "^10.2.5",
+        "minimatch": "^11.0.5",
         "natural-compare": "^1.4.0",
         "optionator": "^0.9.3"
       },
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/core": {
-      "version": "7.29.7",
-      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz",
-      "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",
+      "version": "7.29.13",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.13.tgz",
+      "integrity": "sha512-j1nvOQCZYSgp7HLmisnCXFTpVvFODiijQ9QHkORfGKWH6YDtskTEeCJS7eV545GZ9UBzrq0e2xsOd5QQ5PjIqw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/code-frame": "^7.29.7",
-        "@babel/generator": "^7.29.7",
-        "@babel/helper-compilation-targets": "^7.29.7",
-        "@babel/helper-module-transforms": "^7.29.7",
-        "@babel/helpers": "^7.29.7",
-        "@babel/parser": "^7.29.7",
+        "@babel/generator": "^7.29.13",
+        "@babel/helper-compilation-targets": "^7.29.13",
+        "@babel/helper-module-transforms": "^7.29.13",
+        "@babel/helpers": "^7.29.13",
+        "@babel/parser": "^7.29.13",
         "@babel/template": "^7.29.7",
-        "@babel/traverse": "^7.29.7",
-        "@babel/types": "^7.29.7",
+        "@babel/traverse": "^7.29.13",
+        "@babel/types": "^7.29.11",
         "@jridgewell/remapping": "^2.3.5",
         "convert-source-map": "^2.0.0",
         "debug": "^4.1.0",
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/generator": {
-      "version": "7.29.8",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz",
-      "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==",
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.14.tgz",
+      "integrity": "sha512-qSY56jgW5JnSXzuekLVil6zaOQxOCtOHidr65KkaMBw772IuAY28Qx4ZykAcDn8+FRF15qk80XzKwgSc/RYW6g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/parser": "^7.29.8",
-        "@babel/types": "^7.29.8",
+        "@babel/parser": "^7.29.14",
+        "@babel/types": "^7.29.14",
         "@jridgewell/gen-mapping": "^0.3.12",
         "@jridgewell/trace-mapping": "^0.3.28",
         "jsesc": "^3.0.2"
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/helper-compilation-targets": {
-      "version": "7.29.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz",
-      "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==",
+      "version": "7.29.13",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.13.tgz",
+      "integrity": "sha512-8WxJ4/Vmes3ghacj8VOJy3NW8eyHiFY/4thU/LSBuBE470+igjR/j1ZTNn8fV5VdNrLx6iXUwig526UdOvfP0w==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/helper-module-transforms": {
-      "version": "7.29.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz",
-      "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==",
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.14.tgz",
+      "integrity": "sha512-2XDvQVd9JESaOgGc4jT2/jquTAO7ppA5noTZQqH+MmZ89yjCzScLwtCPbWtkPZylL+TLWR49IwWmk+QkRR4GsA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/helper-module-imports": "^7.29.7",
         "@babel/helper-validator-identifier": "^7.29.7",
-        "@babel/traverse": "^7.29.7"
+        "@babel/traverse": "^7.29.14"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/helper-string-parser": {
-      "version": "7.29.7",
-      "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",
-      "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==",
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.14.tgz",
+      "integrity": "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==",
       "dev": true,
       "license": "MIT",
       "engines": {
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/helpers": {
-      "version": "7.29.7",
-      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz",
-      "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==",
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.14.tgz",
+      "integrity": "sha512-6E3Mi1r0B0umq6vmZa4/78q+64fqO2YY0THUdjDPKUCKhNb0yQy5NQIaPHCSD3ryTgiTss//P4JsWS80AsZ6LQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/template": "^7.29.7",
-        "@babel/types": "^7.29.7"
+        "@babel/types": "^7.29.14"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/parser": {
-      "version": "7.29.8",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz",
-      "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==",
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.14.tgz",
+      "integrity": "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/types": "^7.29.8"
+        "@babel/types": "^7.29.14"
       },
       "bin": {
         "parser": "bin/babel-parser.js"
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/traverse": {
-      "version": "7.29.8",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz",
-      "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==",
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.14.tgz",
+      "integrity": "sha512-RAdQJrBgmIH1FWvN0X+1hoDxzMzlP4cv/1Zi4dn4tG1H0cTb+rw7CzUxQJhp1f4ANd8j5vH3fy8BAWFGkBDEsA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@babel/code-frame": "^7.29.7",
-        "@babel/generator": "^7.29.8",
+        "@babel/generator": "^7.29.14",
         "@babel/helper-globals": "^7.29.7",
-        "@babel/parser": "^7.29.8",
+        "@babel/parser": "^7.29.14",
         "@babel/template": "^7.29.7",
-        "@babel/types": "^7.29.8",
+        "@babel/types": "^7.29.14",
         "debug": "^4.3.1"
       },
       "engines": {
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/@babel/types": {
-      "version": "7.29.8",
-      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz",
-      "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==",
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.14.tgz",
+      "integrity": "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@babel/helper-string-parser": "^7.29.7",
+        "@babel/helper-string-parser": "^7.29.14",
         "@babel/helper-validator-identifier": "^7.29.7"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
+    "node_modules/eslint-plugin-react-hooks/node_modules/@jridgewell/gen-mapping": {
+      "version": "0.3.13",
+      "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",
+      "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "@jridgewell/sourcemap-codec": "^1.5.0",
+        "@jridgewell/trace-mapping": "^0.3.24"
+      }
+    },
     "node_modules/eslint-plugin-react-hooks/node_modules/js-tokens": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
       }
     },
     "node_modules/eslint-plugin-react-hooks/node_modules/semver": {
-      "version": "6.3.1",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
-      "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+      "version": "6.3.2",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz",
+      "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==",
       "dev": true,
       "license": "ISC",
       "bin": {
       }
     },
     "node_modules/express": {
-      "version": "5.2.1",
-      "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
-      "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/express/-/express-5.3.0.tgz",
+      "integrity": "sha512-qCqy1xSoaugxOD4IVHb1ZWdkvCF2W3aE2okKouWj8VwJ+ztskSiXoBnCSJqfKT+cVPJhuJqe9YLbY425+Zh00g==",
       "license": "MIT",
       "dependencies": {
         "accepts": "^2.0.0",
-        "body-parser": "^2.2.1",
-        "content-disposition": "^1.0.0",
-        "content-type": "^1.0.5",
+        "body-parser": "^2.3.0",
+        "content-disposition": "^2.0.1",
+        "content-type": "^2.0.0",
         "cookie": "^0.7.1",
         "cookie-signature": "^1.2.1",
         "debug": "^4.4.0",
         "on-finished": "^2.4.1",
         "once": "^1.4.0",
         "parseurl": "^1.3.3",
-        "proxy-addr": "^2.0.7",
-        "qs": "^6.14.0",
+        "proxy-addr": "^2.0.8",
+        "qs": "^6.16.0",
         "range-parser": "^1.2.1",
         "router": "^2.2.0",
         "send": "^1.1.0",
         "serve-static": "^2.2.0",
         "statuses": "^2.0.1",
-        "type-is": "^2.0.1",
+        "type-is": "^2.1.0",
         "vary": "^1.1.2"
       },
       "engines": {
       "license": "MIT"
     },
     "node_modules/fast-uri": {
-      "version": "3.1.7",
-      "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.7.tgz",
-      "integrity": "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg==",
+      "version": "3.1.9",
+      "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz",
+      "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==",
       "dev": true,
       "funding": [
         {
       ],
       "license": "BSD-3-Clause"
     },
+    "node_modules/fdir": {
+      "version": "6.5.0",
+      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
+      "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=12.0.0"
+      },
+      "peerDependencies": {
+        "picomatch": "^3 || ^4"
+      },
+      "peerDependenciesMeta": {
+        "picomatch": {
+          "optional": true
+        }
+      }
+    },
     "node_modules/file-entry-cache": {
-      "version": "8.0.0",
-      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz",
-      "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==",
+      "version": "11.1.5",
+      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz",
+      "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "flat-cache": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=16.0.0"
+        "flat-cache": "^6.1.23"
       }
     },
     "node_modules/fill-range": {
         "url": "https://opencollective.com/express"
       }
     },
+    "node_modules/find-root": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz",
+      "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==",
+      "license": "MIT"
+    },
     "node_modules/find-up": {
       "version": "5.0.0",
       "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
       }
     },
     "node_modules/flat-cache": {
-      "version": "4.0.1",
-      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz",
-      "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==",
+      "version": "6.1.23",
+      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz",
+      "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "flatted": "^3.2.9",
-        "keyv": "^4.5.4"
-      },
-      "engines": {
-        "node": ">=16"
+        "cacheable": "^2.5.0",
+        "flatted": "^3.4.2",
+        "hookified": "^1.15.0"
       }
     },
     "node_modules/flatted": {
       "dev": true,
       "license": "ISC"
     },
+    "node_modules/flru": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/flru/-/flru-1.0.2.tgz",
+      "integrity": "sha512-kWyh8ADvHBFz6ua5xYOPnUroZTT/bwWfrCeL0Wj1dzG4/YOmOcfJ99W8dOVyyynJN35rZ9aCOtHChqQovV7yog==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=6"
+      }
+    },
     "node_modules/forwarded": {
       "version": "0.2.0",
       "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/get-nonce": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/get-nonce/-/get-nonce-1.0.1.tgz",
-      "integrity": "sha512-FJhYRoDaiatfEkUK8HKlicmu/3SGFD51q3itKDGoSTysQJBnfOcxU5GxnhE1E6soB76MbT0MBtnKJuXyAx+96Q==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=6"
-      }
-    },
     "node_modules/get-proto": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
       }
     },
     "node_modules/glob": {
-      "version": "13.0.6",
-      "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.6.tgz",
-      "integrity": "sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==",
+      "version": "14.0.6",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-14.0.6.tgz",
+      "integrity": "sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "minimatch": "^10.2.2",
+        "minimatch": "^11.0.5",
         "minipass": "^7.1.3",
-        "path-scurry": "^2.0.2"
+        "path-scurry": "^3.0.0"
       },
       "engines": {
         "node": "18 || 20 || >=22"
       }
     },
     "node_modules/graceful-fs": {
-      "version": "4.2.11",
-      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
-      "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+      "version": "4.2.12",
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz",
+      "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==",
       "dev": true,
-      "license": "ISC"
+      "license": "BlueOak-1.0.0"
     },
     "node_modules/has-flag": {
       "version": "3.0.0",
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/hashery": {
+      "version": "1.5.1",
+      "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz",
+      "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "hookified": "^1.15.0"
+      },
+      "engines": {
+        "node": ">=20"
+      }
+    },
     "node_modules/hasown": {
       "version": "2.0.4",
       "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz",
         "hermes-estree": "0.25.1"
       }
     },
+    "node_modules/hoist-non-react-statics": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz",
+      "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==",
+      "license": "BSD-3-Clause",
+      "dependencies": {
+        "react-is": "^16.7.0"
+      }
+    },
+    "node_modules/hoist-non-react-statics/node_modules/react-is": {
+      "version": "16.13.1",
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+      "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+      "license": "MIT"
+    },
+    "node_modules/hookified": {
+      "version": "1.15.1",
+      "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz",
+      "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/hosted-git-info": {
       "version": "2.8.9",
       "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
         "url": "https://opencollective.com/express"
       }
     },
-    "node_modules/icss-utils": {
-      "version": "5.1.0",
-      "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
-      "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": "^10 || ^12 || >= 14"
-      },
-      "peerDependencies": {
-        "postcss": "^8.1.0"
-      }
-    },
     "node_modules/ignore": {
       "version": "5.3.2",
       "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
       "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==",
       "license": "MIT"
     },
-    "node_modules/immutable": {
-      "version": "5.1.9",
-      "resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.9.tgz",
-      "integrity": "sha512-m8nVez3rwrgmWxtLMt1ZYXB2Lv7OKYn/disyxAlSDYAlKSlFoPPfIAmAM/M5xqL4m4C/wAPw7S2/CNaUii1Hxg==",
-      "dev": true,
-      "license": "MIT"
-    },
-    "node_modules/import-local": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz",
-      "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==",
-      "dev": true,
+    "node_modules/import-fresh": {
+      "version": "3.3.1",
+      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
+      "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==",
       "license": "MIT",
       "dependencies": {
-        "pkg-dir": "^4.2.0",
-        "resolve-cwd": "^3.0.0"
-      },
-      "bin": {
-        "import-local-fixture": "fixtures/cli.js"
+        "parent-module": "^1.0.0",
+        "resolve-from": "^4.0.0"
       },
       "engines": {
-        "node": ">=8"
+        "node": ">=6"
       },
       "funding": {
         "url": "https://github.com/sponsors/sindresorhus"
         "node": ">= 0.10"
       }
     },
+    "node_modules/is-arrayish": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+      "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+      "license": "MIT"
+    },
     "node_modules/is-core-module": {
-      "version": "2.16.2",
-      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.2.tgz",
-      "integrity": "sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==",
-      "dev": true,
+      "version": "2.18.0",
+      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.18.0.tgz",
+      "integrity": "sha512-qyax9fgaKOEC4qK8WZn7Q4IcoZC9RC1O1fFxRcRTq/oMMkWT/uXpqpXa12kzWR409zAt1drYN9N9BO26UmBCmw==",
       "license": "MIT",
       "dependencies": {
-        "hasown": "^2.0.3"
+        "hasown": "^2.0.4"
       },
       "engines": {
         "node": ">= 0.4"
       "version": "3.1.0",
       "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",
       "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",
-      "dev": true,
       "license": "MIT",
       "bin": {
         "jsesc": "bin/jsesc"
         "node": ">=6"
       }
     },
-    "node_modules/json-buffer": {
-      "version": "3.0.1",
-      "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
-      "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/json-parse-even-better-errors": {
       "version": "2.3.1",
       "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz",
       "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==",
-      "dev": true,
       "license": "MIT"
     },
     "node_modules/json-schema-traverse": {
       }
     },
     "node_modules/jszip": {
-      "version": "3.10.1",
-      "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.1.tgz",
-      "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==",
+      "version": "3.10.2",
+      "resolved": "https://registry.npmjs.org/jszip/-/jszip-3.10.2.tgz",
+      "integrity": "sha512-3l+rb15IOWtUhU0H5MFqES/T6Kh7abYwjosBey/vD6hDt8zoEffkSC5Ws5SGtgVw3gBx2NEbhTeSW1+kWkpyTQ==",
       "license": "(MIT OR GPL-3.0-or-later)",
       "dependencies": {
         "lie": "~3.3.0",
       }
     },
     "node_modules/keyv": {
-      "version": "4.5.4",
-      "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
-      "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
+      "version": "5.6.0",
+      "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz",
+      "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "json-buffer": "3.0.1"
+        "@keyv/serialize": "^1.1.1"
       }
     },
     "node_modules/kind-of": {
         "ms": "^2.1.1"
       }
     },
-    "node_modules/license-checker/node_modules/semver": {
-      "version": "5.7.2",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
-      "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
-      "dev": true,
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver"
-      }
-    },
     "node_modules/lie": {
       "version": "3.3.0",
       "resolved": "https://registry.npmjs.org/lie/-/lie-3.3.0.tgz",
         "immediate": "~3.0.5"
       }
     },
+    "node_modules/lines-and-columns": {
+      "version": "1.2.4",
+      "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
+      "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==",
+      "license": "MIT"
+    },
     "node_modules/locate-path": {
       "version": "6.0.0",
       "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/loose-envify": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+      "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+      "license": "MIT",
+      "dependencies": {
+        "js-tokens": "^3.0.0 || ^4.0.0"
+      },
+      "bin": {
+        "loose-envify": "cli.js"
+      }
+    },
+    "node_modules/loose-envify/node_modules/js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+      "license": "MIT"
+    },
     "node_modules/lower-case": {
       "version": "2.0.2",
       "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
       }
     },
     "node_modules/lru-cache": {
-      "version": "11.5.2",
-      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.2.tgz",
-      "integrity": "sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==",
+      "version": "11.5.3",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz",
+      "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "engines": {
         "node": ">=8.6"
       }
     },
+    "node_modules/micromatch/node_modules/picomatch": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
+      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=8.6"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/jonschlinkert"
+      }
+    },
     "node_modules/mime-db": {
       "version": "1.54.0",
       "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz",
       }
     },
     "node_modules/minimatch": {
-      "version": "10.2.6",
-      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz",
-      "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==",
+      "version": "11.0.8",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.8.tgz",
+      "integrity": "sha512-nFQuYSTVrGvysVBps5Ih+0BdnYFN/Cj3C816r6+p7yK+FHrVLGE4O4N9AFwykrlNlvM2HYt+Rad1Uiro6h88Ig==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
-        "brace-expansion": "^5.0.8"
+        "@isaacs/nonrecursive-glob-match": "^1.1.0",
+        "brace-expansion": "^5.0.12"
       },
       "engines": {
-        "node": "18 || 20 || >=22"
+        "node": "20 || >=22"
       },
       "funding": {
         "url": "https://github.com/sponsors/isaacs"
       }
     },
     "node_modules/minimizer-webpack-plugin": {
-      "version": "5.8.0",
-      "resolved": "https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.8.0.tgz",
-      "integrity": "sha512-2cT9+goJfBhtMz+gJqejSf09ClgmYhPhccRb/fb0ztVbixt0BkO8mRuI26FoPPuUNkRk6iEDryWAIouc5W8eJA==",
+      "version": "5.14.0",
+      "resolved": "https://registry.npmjs.org/minimizer-webpack-plugin/-/minimizer-webpack-plugin-5.14.0.tgz",
+      "integrity": "sha512-PnvQXCJxhgH2ZVVO7Lj0sM6q8L1XGxnUvd8wVQIRwi8khMCLq5wg0Ngxe44bcuZL2FSN81RdVE7YHEVzTKsQDQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "@jridgewell/trace-mapping": "^0.3.31",
         "jest-worker": "^27.4.5",
-        "schema-utils": "^4.3.3",
+        "schema-utils": "^4.6.0",
         "terser": "^5.51.0"
       },
       "engines": {
         "@minify-html/node": {
           "optional": true
         },
+        "@napi-rs/image": {
+          "optional": true
+        },
         "@swc/core": {
           "optional": true
         },
         "html-minifier-terser": {
           "optional": true
         },
+        "imagemin": {
+          "optional": true
+        },
         "lightningcss": {
           "optional": true
         },
         "postcss": {
           "optional": true
         },
+        "sharp": {
+          "optional": true
+        },
+        "svgo": {
+          "optional": true
+        },
         "uglify-js": {
           "optional": true
         }
       "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
       "license": "MIT"
     },
-    "node_modules/nanoid": {
-      "version": "3.3.18",
-      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
-      "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "bin": {
-        "nanoid": "bin/nanoid.cjs"
-      },
-      "engines": {
-        "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
-      }
-    },
     "node_modules/natural-compare": {
       "version": "1.4.0",
       "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
         "url": "https://opencollective.com/express"
       }
     },
-    "node_modules/negotiator/node_modules/content-type": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
-      "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/express"
-      }
-    },
-    "node_modules/neo-async": {
-      "version": "2.6.2",
-      "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
-      "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/no-case": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
         "tslib": "^2.0.3"
       }
     },
-    "node_modules/node-addon-api": {
-      "version": "7.1.1",
-      "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz",
-      "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",
-      "dev": true,
-      "license": "MIT",
-      "optional": true
-    },
     "node_modules/node-releases": {
-      "version": "2.0.54",
-      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.54.tgz",
-      "integrity": "sha512-YHs7BmmcsdAI5Ozuf8JZo6PT0mv2GIWC9vMfvUC3dp65M8hn7Ux8CPL+2oBI7juNuj9d0ndhTcznq2ODBps9cQ==",
+      "version": "2.0.64",
+      "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.64.tgz",
+      "integrity": "sha512-zAPCKqMcnqs2nGy6nlkm7JduFseiBJy3EXHGLh+8pFR+TxGCBxxiEN21+UROU5CKwX/f4TlUcYjiM+vs/tsyxw==",
       "dev": true,
       "license": "MIT",
       "engines": {
         "validate-npm-package-license": "^3.0.1"
       }
     },
-    "node_modules/normalize-package-data/node_modules/semver": {
-      "version": "5.7.2",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
-      "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
-      "dev": true,
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver"
-      }
-    },
     "node_modules/normalize-path": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
       }
     },
     "node_modules/npm-check-updates": {
-      "version": "23.1.0",
-      "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-23.1.0.tgz",
-      "integrity": "sha512-u6Odx/JDpDXNqXp5pPsVN0RhuWkNrBe4Sz26J7yWJcEadopKhQgcB+bFq2PK35iJY6vc6h1PbnXmnwfiOFQl/w==",
+      "version": "23.1.1",
+      "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-23.1.1.tgz",
+      "integrity": "sha512-UzYDvvsQRkmXR59g9SqsQxygYp7AhFpfEcOOGOJaB/P7pF/XlaqIYLK3UjUGfMHH1+aS2nZvJRaIsk2nk0z5ag==",
       "dev": true,
       "license": "Apache-2.0",
       "bin": {
         "url": "https://github.com/fb55/nth-check?sponsor=1"
       }
     },
+    "node_modules/object-assign": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+      "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/object-inspect": {
       "version": "1.13.4",
       "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
       }
     },
     "node_modules/obug": {
-      "version": "2.1.4",
-      "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.4.tgz",
-      "integrity": "sha512-4a+OsYv9UktOJKE+l1A4OufDgdRF9PifWj+tJnHURo/P+WOxpG4GzUFL9qCalmWauao6ogiG+QvnCovwPoyAWA==",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz",
+      "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==",
       "dev": true,
       "funding": [
         "https://github.com/sponsors/sxzz",
       }
     },
     "node_modules/on-finished": {
-      "version": "2.4.1",
-      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
-      "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.2.tgz",
+      "integrity": "sha512-ATWUv387i+nLD49EiDoOft5scf32Vsdz3ktrQJG9bi7jRFmaXTssvyvj1EmeKVVgvesbqUtvQQvaS2TpTukAZQ==",
       "license": "MIT",
       "dependencies": {
         "ee-first": "1.1.1"
       },
       "engines": {
         "node": ">= 0.8"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
       }
     },
     "node_modules/once": {
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/p-try": {
-      "version": "2.2.0",
-      "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
-      "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=6"
-      }
-    },
     "node_modules/pako": {
       "version": "1.0.11",
       "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
         "tslib": "^2.0.3"
       }
     },
+    "node_modules/parent-module": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+      "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+      "license": "MIT",
+      "dependencies": {
+        "callsites": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/parse-json": {
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
+      "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/code-frame": "^7.0.0",
+        "error-ex": "^1.3.1",
+        "json-parse-even-better-errors": "^2.3.0",
+        "lines-and-columns": "^1.1.6"
+      },
+      "engines": {
+        "node": ">=8"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sindresorhus"
+      }
+    },
+    "node_modules/parse-json/node_modules/@babel/code-frame": {
+      "version": "7.29.7",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",
+      "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/helper-validator-identifier": "^7.29.7",
+        "js-tokens": "^4.0.0",
+        "picocolors": "^1.1.1"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/parse-json/node_modules/@babel/helper-validator-identifier": {
+      "version": "7.29.7",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",
+      "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/parse-json/node_modules/js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+      "license": "MIT"
+    },
     "node_modules/parseurl": {
       "version": "1.3.3",
       "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
       "version": "1.0.7",
       "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
       "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
-      "dev": true,
       "license": "MIT"
     },
     "node_modules/path-scurry": {
-      "version": "2.0.2",
-      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz",
-      "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==",
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.0.tgz",
+      "integrity": "sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==",
       "dev": true,
       "license": "BlueOak-1.0.0",
       "dependencies": {
         "url": "https://opencollective.com/express"
       }
     },
+    "node_modules/path-type": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz",
+      "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=8"
+      }
+    },
     "node_modules/picocolors": {
       "version": "1.1.1",
       "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
       "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
-      "dev": true,
       "license": "ISC"
     },
     "node_modules/picomatch": {
-      "version": "2.3.2",
-      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
-      "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
+      "version": "4.0.7",
+      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
+      "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
       "dev": true,
       "license": "MIT",
       "engines": {
-        "node": ">=8.6"
+        "node": ">=12"
       },
       "funding": {
         "url": "https://github.com/sponsors/jonschlinkert"
       }
     },
-    "node_modules/pkg-dir": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
-      "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "find-up": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/pkg-dir/node_modules/find-up": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
-      "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "locate-path": "^5.0.0",
-        "path-exists": "^4.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/pkg-dir/node_modules/locate-path": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
-      "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "p-locate": "^4.1.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/pkg-dir/node_modules/p-limit": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
-      "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "p-try": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/sindresorhus"
-      }
-    },
-    "node_modules/pkg-dir/node_modules/p-locate": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
-      "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "p-limit": "^2.2.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
-    "node_modules/postcss": {
-      "version": "8.5.26",
-      "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
-      "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",
-      "dev": true,
-      "funding": [
-        {
-          "type": "opencollective",
-          "url": "https://opencollective.com/postcss/"
-        },
-        {
-          "type": "tidelift",
-          "url": "https://tidelift.com/funding/github/npm/postcss"
-        },
-        {
-          "type": "github",
-          "url": "https://github.com/sponsors/ai"
-        }
-      ],
-      "license": "MIT",
-      "dependencies": {
-        "nanoid": "^3.3.17",
-        "picocolors": "^1.1.1",
-        "source-map-js": "^1.2.1"
-      },
-      "engines": {
-        "node": "^10 || ^12 || >=14"
-      }
-    },
-    "node_modules/postcss-modules-extract-imports": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz",
-      "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==",
-      "dev": true,
-      "license": "ISC",
-      "engines": {
-        "node": "^10 || ^12 || >= 14"
-      },
-      "peerDependencies": {
-        "postcss": "^8.1.0"
-      }
-    },
-    "node_modules/postcss-modules-local-by-default": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.2.0.tgz",
-      "integrity": "sha512-5kcJm/zk+GJDSfw+V/42fJ5fhjL5YbFDl8nVdXkJPLLW+Vf9mTD5Xe0wqIaDnLuL2U6cDNpTr+UQ+v2HWIBhzw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "icss-utils": "^5.0.0",
-        "postcss-selector-parser": "^7.0.0",
-        "postcss-value-parser": "^4.1.0"
-      },
-      "engines": {
-        "node": "^10 || ^12 || >= 14"
-      },
-      "peerDependencies": {
-        "postcss": "^8.1.0"
-      }
-    },
-    "node_modules/postcss-modules-scope": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz",
-      "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "postcss-selector-parser": "^7.0.0"
-      },
-      "engines": {
-        "node": "^10 || ^12 || >= 14"
-      },
-      "peerDependencies": {
-        "postcss": "^8.1.0"
-      }
-    },
-    "node_modules/postcss-modules-values": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz",
-      "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==",
-      "dev": true,
-      "license": "ISC",
-      "dependencies": {
-        "icss-utils": "^5.0.0"
-      },
-      "engines": {
-        "node": "^10 || ^12 || >= 14"
-      },
-      "peerDependencies": {
-        "postcss": "^8.1.0"
-      }
-    },
-    "node_modules/postcss-selector-parser": {
-      "version": "7.1.5",
-      "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.5.tgz",
-      "integrity": "sha512-KvvtD7SrlBP7dlgkBghEE3r84CABm5SmV2aNcG4oCA+qDnJ/tvKonFVvwWAyyWUEwxuNawdfEAZKP9zM3oZ2Uw==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "cssesc": "^3.0.0",
-        "util-deprecate": "^1.0.2"
-      },
-      "engines": {
-        "node": ">=4"
-      }
-    },
-    "node_modules/postcss-value-parser": {
-      "version": "4.2.0",
-      "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz",
-      "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==",
-      "dev": true,
-      "license": "MIT"
-    },
     "node_modules/prelude-ls": {
       "version": "1.2.1",
       "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
       "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
       "license": "MIT"
     },
+    "node_modules/prop-types": {
+      "version": "15.8.1",
+      "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz",
+      "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==",
+      "license": "MIT",
+      "dependencies": {
+        "loose-envify": "^1.4.0",
+        "object-assign": "^4.1.1",
+        "react-is": "^16.13.1"
+      }
+    },
+    "node_modules/prop-types/node_modules/react-is": {
+      "version": "16.13.1",
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+      "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+      "license": "MIT"
+    },
     "node_modules/proxy-addr": {
-      "version": "2.0.7",
-      "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
-      "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+      "version": "2.0.8",
+      "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.8.tgz",
+      "integrity": "sha512-5nnx0yGyVUcY6t9RnWcARWtwT9F1D8O9rt08htPvnd49W1IgZtmLkhu9WfMzQj1cFxjHIO6connUNVW5k7AVyQ==",
       "license": "MIT",
       "dependencies": {
         "forwarded": "0.2.0",
       },
       "engines": {
         "node": ">= 0.10"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
       }
     },
     "node_modules/punycode": {
         "node": ">=6"
       }
     },
+    "node_modules/qified": {
+      "version": "0.10.1",
+      "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz",
+      "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "hookified": "^2.1.1"
+      },
+      "engines": {
+        "node": ">=20"
+      }
+    },
+    "node_modules/qified/node_modules/hookified": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz",
+      "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/qs": {
-      "version": "6.16.0",
-      "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.0.tgz",
-      "integrity": "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==",
+      "version": "6.17.1",
+      "resolved": "https://registry.npmjs.org/qs/-/qs-6.17.1.tgz",
+      "integrity": "sha512-jd3COkaKVgGUW+ZHyEHCG9bH7RoaaiWuMgzsIBjUMVjLAaWGWpoUAVwljVvBHxRu/2qEHnadLGZrkutYUBPQJA==",
       "license": "BSD-3-Clause",
       "dependencies": {
         "es-define-property": "^1.0.1",
       }
     },
     "node_modules/react": {
-      "version": "19.2.8",
-      "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz",
-      "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==",
+      "version": "19.3.1",
+      "resolved": "https://registry.npmjs.org/react/-/react-19.3.1.tgz",
+      "integrity": "sha512-QNhWdt7nrgVWWQG58QuGsAR3jv3Hbe4mb4vz7w2csnHavciZJgda1CPNaldF6eVxv90ud3jUXpKlHL69gO38yw==",
       "license": "MIT",
       "engines": {
         "node": ">=0.10.0"
       }
     },
     "node_modules/react-dom": {
-      "version": "19.2.8",
-      "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz",
-      "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==",
+      "version": "19.3.1",
+      "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.3.1.tgz",
+      "integrity": "sha512-Y0bARz53lhEC1NMCASs0/j+faB/zqt3R8hpvg1e8+61ZVJ4UL0UdC4cBbXfZMcIuhrfgeILTLe+ZeBCavQPtKQ==",
       "license": "MIT",
       "dependencies": {
-        "scheduler": "^0.27.0"
+        "scheduler": "^0.28.0"
       },
       "peerDependencies": {
-        "react": "^19.2.8"
+        "react": "^19.3.1"
       }
     },
-    "node_modules/react-remove-scroll": {
-      "version": "2.7.2",
-      "resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz",
-      "integrity": "sha512-Iqb9NjCCTt6Hf+vOdNIZGdTiH1QSqr27H/Ek9sv/a97gfueI/5h1s3yRi1nngzMUaOOToin5dI1dXKdXiF+u0Q==",
-      "license": "MIT",
-      "dependencies": {
-        "react-remove-scroll-bar": "^2.3.7",
-        "react-style-singleton": "^2.2.3",
-        "tslib": "^2.1.0",
-        "use-callback-ref": "^1.3.3",
-        "use-sidecar": "^1.1.3"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
+    "node_modules/react-is": {
+      "version": "19.3.1",
+      "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.1.tgz",
+      "integrity": "sha512-RRieF6IyxQBkcK6pP8xOHprLTPW6QjRkbGdImtqNme+/hYVwCZkLQLdlZGOhUqXwkS9IEynaGvPJtv6XB/cz0Q==",
+      "license": "MIT"
     },
-    "node_modules/react-remove-scroll-bar": {
-      "version": "2.3.8",
-      "resolved": "https://registry.npmjs.org/react-remove-scroll-bar/-/react-remove-scroll-bar-2.3.8.tgz",
-      "integrity": "sha512-9r+yi9+mgU33AKcj6IbT9oRCO78WriSj6t/cF8DWBZJ9aOGPOTEDvdUDz1FwKim7QXWwmHqtdHnRJfhAxEG46Q==",
-      "license": "MIT",
+    "node_modules/react-transition-group": {
+      "version": "4.4.5",
+      "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz",
+      "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==",
+      "license": "BSD-3-Clause",
       "dependencies": {
-        "react-style-singleton": "^2.2.2",
-        "tslib": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=10"
+        "@babel/runtime": "^7.5.5",
+        "dom-helpers": "^5.0.1",
+        "loose-envify": "^1.4.0",
+        "prop-types": "^15.6.2"
       },
       "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
+        "react": ">=16.6.0",
+        "react-dom": ">=16.6.0"
       }
     },
-    "node_modules/react-style-singleton": {
-      "version": "2.2.3",
-      "resolved": "https://registry.npmjs.org/react-style-singleton/-/react-style-singleton-2.2.3.tgz",
-      "integrity": "sha512-b6jSvxvVnyptAiLjbkWLE/lOnR4lfTtDAl+eUC7RZy+QQWc6wRzIV2CE6xBuMmDxc2qIihtDCZD5NPOFl7fRBQ==",
+    "node_modules/react-transition-group/node_modules/@babel/runtime": {
+      "version": "7.29.14",
+      "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.14.tgz",
+      "integrity": "sha512-Y5tqevQaUAZhhj82BpYMNC1ssvLQTVAfwKdm8iy8qwmhvC2/CpcAu8OC+QEtjM7pMk7knx83u1Qj8gzkicyelw==",
       "license": "MIT",
-      "dependencies": {
-        "get-nonce": "^1.0.0",
-        "tslib": "^2.0.0"
-      },
       "engines": {
-        "node": ">=10"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
+        "node": ">=6.9.0"
       }
     },
     "node_modules/read-installed": {
         "graceful-fs": "^4.1.2"
       }
     },
-    "node_modules/read-installed/node_modules/semver": {
-      "version": "5.7.2",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
-      "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
-      "dev": true,
-      "license": "ISC",
-      "bin": {
-        "semver": "bin/semver"
-      }
-    },
     "node_modules/read-package-json": {
       "version": "2.1.2",
       "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz",
       "license": "MIT"
     },
     "node_modules/read-package-json/node_modules/brace-expansion": {
-      "version": "1.1.18",
-      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.18.tgz",
-      "integrity": "sha512-Edep/X9fGqVNmzKBVsDYIOtD+z1tuezV70LBjdCst9Tqu76lsnvRiZ6oTic1n+/BIwX6QDGAO94PN4N2SADvtw==",
+      "version": "1.1.22",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.22.tgz",
+      "integrity": "sha512-CKLDTuSsN0+r1ThM0WkzzBI7dnPI6xEGfa/JnVYIK9JNBA1N1NyPwXVHor//NKD/y3sDxp764sZdLhFK7pH8XQ==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/rechoir": {
-      "version": "0.8.0",
-      "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz",
-      "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==",
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-1.0.0.tgz",
+      "integrity": "sha512-vyBa7bWz11iJRwzJR0nGLt6r45bymWfYXAgd1FmP08BNP/DHAVabgpGPyEXQmBtKvhgxi17SQz2szhvkberQsg==",
       "dev": true,
       "license": "MIT",
-      "dependencies": {
-        "resolve": "^1.20.0"
-      },
       "engines": {
-        "node": ">= 10.13.0"
+        "node": ">= 22.15.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/gulpjs"
       }
     },
     "node_modules/regenerate": {
-      "version": "1.4.2",
-      "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
-      "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==",
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.5.0.tgz",
+      "integrity": "sha512-1s+CxXjJ71i7LNVy8nYwg47XV4y6lAnOEhsMtSKq3WpmPfhl9LuKlTqKIn/3yUpE8lBz+W+TT88Bxyhnr0U4yw==",
       "dev": true,
       "license": "MIT"
     },
     "node_modules/regenerate-unicode-properties": {
-      "version": "10.2.2",
-      "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.2.tgz",
-      "integrity": "sha512-m03P+zhBeQd1RGnYxrGyDAPpWX/epKirLrp8e3qevZdVkKtnCrjjWczIbYc8+xd6vcTStVlqfycTx1KR4LOr0g==",
+      "version": "10.3.0",
+      "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.3.0.tgz",
+      "integrity": "sha512-9ns8odR8e9q3otKeHj3DE80jZYKg6zVeZKE+zQmRKXFoVUcuiTGeO6iusDhPRoIQQPVPRvH+SfBhrTud4eczuw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/regexpu-core": {
-      "version": "6.4.0",
-      "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.4.0.tgz",
-      "integrity": "sha512-0ghuzq67LI9bLXpOX/ISfve/Mq33a4aFRzoQYhnnok1JOFpmE/A2TBGkNVenOGEeSBCjIiWcc6MVOG5HEQv0sA==",
+      "version": "6.5.4",
+      "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.5.4.tgz",
+      "integrity": "sha512-VpdamrZ9bw4YmvMZfTA3Yg8IHU9Guvg21bonvgjC4l3KfBkOqCPJesHakz7cQeE4Vh4zz4r4Gy6igAcnJxZv9g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "regenerate": "^1.4.2",
-        "regenerate-unicode-properties": "^10.2.2",
+        "regenerate": "^1.5.0",
+        "regenerate-unicode-properties": "^10.3.0",
         "regjsgen": "^0.8.0",
-        "regjsparser": "^0.13.0",
+        "regjsparser": "^0.14.0",
         "unicode-match-property-ecmascript": "^2.0.0",
         "unicode-match-property-value-ecmascript": "^2.2.1"
       },
       "license": "MIT"
     },
     "node_modules/regjsparser": {
-      "version": "0.13.2",
-      "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.13.2.tgz",
-      "integrity": "sha512-NgRBy2Nx/bE+9F27nVHnqcN5HjyLmecqsqx2PJHu3/IEtADD4WuxuXIVExD5PoSDFVrl78dOonfcOe5O+5nbzQ==",
+      "version": "0.14.1",
+      "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.14.1.tgz",
+      "integrity": "sha512-IeYboCLG1KBNRksrZQIZ1SV5KVWZiR0ikFokOcA0n63vLvlaFvCsfxN+fd4aXwL0KW3YD+ByRzIgo9ZAHdbldw==",
       "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
         "node": ">=0.10.0"
       }
     },
+    "node_modules/reselect": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.3.0.tgz",
+      "integrity": "sha512-XGoLeRAVzUTcJ1qkxPQhDJyIZ5d6zzZD9nT7AEZOaaU9UbWclhycElmhO+VD5bFeLuzhPBaOV2oXC8uG35ZSpg==",
+      "license": "MIT"
+    },
     "node_modules/resolve": {
-      "version": "1.22.12",
-      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.12.tgz",
-      "integrity": "sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==",
-      "dev": true,
+      "version": "1.22.14",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.14.tgz",
+      "integrity": "sha512-1ZjYvR9sbkiwC5+9QHetqW5HmA2pHRMaoupD01t2HlYnV/vydC2zPwLixhsMieSWVZt0JJRg5LVIk0Ow1D/TrA==",
       "license": "MIT",
       "dependencies": {
         "es-errors": "^1.3.0",
-        "is-core-module": "^2.16.1",
+        "is-core-module": "^2.18.0",
         "path-parse": "^1.0.7",
         "supports-preserve-symlinks-flag": "^1.0.0"
       },
         "url": "https://github.com/sponsors/ljharb"
       }
     },
-    "node_modules/resolve-cwd": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz",
-      "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "resolve-from": "^5.0.0"
-      },
-      "engines": {
-        "node": ">=8"
-      }
-    },
     "node_modules/resolve-from": {
-      "version": "5.0.0",
-      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
-      "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
-      "dev": true,
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+      "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
       "license": "MIT",
       "engines": {
-        "node": ">=8"
+        "node": ">=4"
       }
     },
     "node_modules/router": {
       "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
       "license": "MIT"
     },
-    "node_modules/sass": {
-      "version": "1.103.1",
-      "resolved": "https://registry.npmjs.org/sass/-/sass-1.103.1.tgz",
-      "integrity": "sha512-9icZURbP51S6S0QGoyaeqk9uB06GNWxsFYWfH5RgpFgqK5FA8tJcM3AdVxrZEVJ7dz+L87nG95gBKf4VuaMHGw==",
+    "node_modules/scheduler": {
+      "version": "0.28.0",
+      "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.28.0.tgz",
+      "integrity": "sha512-juorfCmIkIw8tT+p5BXSm6PJjQF/ycEYmKyzURCIt/RaZIhL+PulbQ9Yu2z1HdOJDdqDTlxA1+xKBmHXJsczAw==",
+      "license": "MIT"
+    },
+    "node_modules/schema-utils": {
+      "version": "4.8.3",
+      "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.8.3.tgz",
+      "integrity": "sha512-qIfo3f+lRNqnMPgpXSKvUhsT3pY5U+ppmgGr4j8LanFP3W/Ze+xj8DY/dPb5qVu3m6qFIMyMWKVRLNKxrNhxWg==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
-        "chokidar": "^5.0.0",
-        "immutable": "^5.1.5",
-        "source-map-js": ">=0.6.2 <2.0.0"
+        "@types/json-schema": "^7.0.15",
+        "ajv": "^8.20.0",
+        "ajv-formats": "^3.0.1",
+        "ajv-keywords": "^5.1.0"
       },
       "bin": {
-        "sass": "sass.js"
+        "schema-utils": "bin/schema-utils.js"
       },
       "engines": {
-        "node": ">=20.19.0"
-      },
-      "optionalDependencies": {
-        "@parcel/watcher": "^2.4.1"
-      }
-    },
-    "node_modules/sass-loader": {
-      "version": "17.0.1",
-      "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-17.0.1.tgz",
-      "integrity": "sha512-pgJMwCuLjVTSIWsv/2luVRXKlCeaViUGcgSe8dx95zMG4hUwqIMFmjbhq29ypFLflJU0GyiJZeLM9iI1n3KYAA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 22.11.0"
+        "node": ">= 10.13.0"
       },
       "funding": {
         "type": "opencollective",
         "url": "https://opencollective.com/webpack"
       },
       "peerDependencies": {
-        "@rspack/core": "0.x || ^1.0.0 || ^2.0.0-0",
-        "sass": "^1.3.0",
-        "sass-embedded": "*",
         "webpack": "^5.0.0"
       },
       "peerDependenciesMeta": {
-        "@rspack/core": {
-          "optional": true
-        },
-        "sass": {
-          "optional": true
-        },
-        "sass-embedded": {
-          "optional": true
-        },
         "webpack": {
           "optional": true
         }
       }
     },
-    "node_modules/scheduler": {
-      "version": "0.27.0",
-      "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",
-      "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",
-      "license": "MIT"
-    },
-    "node_modules/schema-utils": {
-      "version": "4.3.3",
-      "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.3.3.tgz",
-      "integrity": "sha512-eflK8wEtyOE6+hsaRVPxvUKYCpRgzLqDTb8krvAsRIwOGlHoSgYLgBXoubGgLd2fT41/OUYdb48v4k4WWHQurA==",
-      "dev": true,
-      "license": "MIT",
-      "dependencies": {
-        "@types/json-schema": "^7.0.9",
-        "ajv": "^8.9.0",
-        "ajv-formats": "^2.1.1",
-        "ajv-keywords": "^5.1.0"
-      },
-      "engines": {
-        "node": ">= 10.13.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/webpack"
-      }
-    },
     "node_modules/schema-utils/node_modules/ajv": {
       "version": "8.20.0",
       "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
       "license": "MIT"
     },
     "node_modules/semver": {
-      "version": "7.8.5",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
-      "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==",
+      "version": "5.7.3",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.3.tgz",
+      "integrity": "sha512-kM18BPOqTi0+TB68703/GJRpAML5Me+IDQsR1J26YB3EFKKNEyHIVZuWDX7+WKQB3tHwDwgk24BfhdpWUbytvQ==",
       "dev": true,
       "license": "ISC",
       "bin": {
-        "semver": "bin/semver.js"
-      },
-      "engines": {
-        "node": ">=10"
+        "semver": "bin/semver"
       }
     },
     "node_modules/send": {
       }
     },
     "node_modules/serialize-javascript": {
-      "version": "7.1.1",
-      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.1.tgz",
-      "integrity": "sha512-k3CMsaIvvdSwm8oLB4MXSl0wH2/cwlH7xGcnRd2DaeRmBkbzYmyT8j0tsX60DwD1eRwHTpNpH8ljKu9oUT1MeQ==",
+      "version": "7.1.4",
+      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-7.1.4.tgz",
+      "integrity": "sha512-FqlEuoTq/zRmA4Lg6aOqyH3lCHbUtCB0bmHCeFniX2GBdDqMJM3FwdvEhlE5Pim1dlt2FfBdVPmUNNiGhhKqpw==",
       "dev": true,
       "license": "BSD-3-Clause",
       "engines": {
       }
     },
     "node_modules/source-map": {
-      "version": "0.6.1",
-      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-      "dev": true,
-      "license": "BSD-3-Clause",
-      "engines": {
-        "node": ">=0.10.0"
-      }
-    },
-    "node_modules/source-map-js": {
-      "version": "1.2.1",
-      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
-      "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
-      "dev": true,
+      "version": "0.5.7",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+      "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==",
       "license": "BSD-3-Clause",
       "engines": {
         "node": ">=0.10.0"
         "source-map": "^0.6.0"
       }
     },
+    "node_modules/source-map-support/node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "dev": true,
+      "license": "BSD-3-Clause",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/spdx-compare": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz",
       }
     },
     "node_modules/spdx-license-ids": {
-      "version": "3.0.23",
-      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz",
-      "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==",
+      "version": "3.0.24",
+      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.24.tgz",
+      "integrity": "sha512-cLS9TtWkIQFyLkJ3/5aFQAOHOSKTlOs/7WDut/XPSdjom1fJhUdkepeJAKXa9Y05+FabHd0sti+Et559vDtkpQ==",
       "dev": true,
       "license": "CC0-1.0"
     },
         "node": ">=8"
       }
     },
-    "node_modules/style-loader": {
-      "version": "4.0.0",
-      "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz",
-      "integrity": "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">= 18.12.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/webpack"
-      },
-      "peerDependencies": {
-        "webpack": "^5.27.0"
-      }
-    },
     "node_modules/style-mod": {
-      "version": "4.1.3",
-      "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz",
-      "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==",
+      "version": "4.1.4",
+      "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.4.tgz",
+      "integrity": "sha512-XXWIQt633/EpAFx8aZDOTjBzrCaGmhvEQlQo6MVPfa2OzO2cWo+4hV9h+6UkHYlXGfy+ODXKUdP7Pthmcu5ATw==",
+      "license": "MIT"
+    },
+    "node_modules/stylis": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.2.0.tgz",
+      "integrity": "sha512-Orov6g6BB1sDfYgzWfTHDOxamtX1bE/zo104Dh9e6fqJ3PooipYyfJ0pUmrZO2wAvO8YbEyeFrkV91XTsGMSrw==",
       "license": "MIT"
     },
     "node_modules/supports-color": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
       "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
-      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.4"
       }
     },
     "node_modules/tapable": {
-      "version": "2.3.3",
-      "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz",
-      "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==",
+      "version": "2.3.4",
+      "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.4.tgz",
+      "integrity": "sha512-NHFiWnAbMJxNNpBwiO7jJVGDuqMxT9/oV8v57RR+fgBQShkJil5inGD8/xWy0hjLyHQyX1tu27QANhlz3KBqCg==",
       "dev": true,
       "license": "MIT",
       "engines": {
         "url": "https://github.com/sponsors/SuperchupuDev"
       }
     },
-    "node_modules/tinyglobby/node_modules/fdir": {
-      "version": "6.5.0",
-      "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
-      "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=12.0.0"
-      },
-      "peerDependencies": {
-        "picomatch": "^3 || ^4"
-      },
-      "peerDependenciesMeta": {
-        "picomatch": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/tinyglobby/node_modules/picomatch": {
-      "version": "4.0.7",
-      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",
-      "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",
-      "dev": true,
-      "license": "MIT",
-      "engines": {
-        "node": ">=12"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/jonschlinkert"
-      }
-    },
     "node_modules/to-regex-range": {
       "version": "5.0.1",
       "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
       }
     },
     "node_modules/tslib": {
-      "version": "2.8.1",
-      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
-      "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
+      "version": "2.9.1",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz",
+      "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==",
+      "dev": true,
       "license": "0BSD"
     },
     "node_modules/type-check": {
         "url": "https://opencollective.com/express"
       }
     },
-    "node_modules/type-is/node_modules/content-type": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
-      "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=18"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/express"
-      }
-    },
     "node_modules/ua-is-frozen": {
       "version": "0.1.2",
       "resolved": "https://registry.npmjs.org/ua-is-frozen/-/ua-is-frozen-0.1.2.tgz",
       }
     },
     "node_modules/undici-types": {
-      "version": "8.3.0",
-      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz",
-      "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==",
+      "version": "8.9.0",
+      "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz",
+      "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==",
       "dev": true,
       "license": "MIT"
     },
       }
     },
     "node_modules/update-browserslist-db": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.2.tgz",
-      "integrity": "sha512-UQ+MSxlhRm1bzjhU+DcuXfjFO1FzNtqhK5+9Yvlp90ItDLk5vT932A0rFu619nf7RVS+Y/VeaUW1jaRDqZ8VJw==",
+      "version": "1.3.4",
+      "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.4.tgz",
+      "integrity": "sha512-t8wonIOdQyOjtPd2VktlBu6QjTVTks6v8bSi7kd0r2Vll8TK1JYDZtRRdbmCHOAMphkZgrzK+L+vXK4pyZ8t4A==",
       "dev": true,
       "funding": [
         {
         "punycode": "^2.1.0"
       }
     },
-    "node_modules/use-callback-ref": {
-      "version": "1.3.3",
-      "resolved": "https://registry.npmjs.org/use-callback-ref/-/use-callback-ref-1.3.3.tgz",
-      "integrity": "sha512-jQL3lRnocaFtu3V00JToYz/4QkNWswxijDaCVNZRiRTO3HQDLsdu1ZtmIUvV4yPp+rvWm5j0y0TG/S61cuijTg==",
-      "license": "MIT",
-      "dependencies": {
-        "tslib": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
-      "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/use-sidecar": {
-      "version": "1.1.3",
-      "resolved": "https://registry.npmjs.org/use-sidecar/-/use-sidecar-1.1.3.tgz",
-      "integrity": "sha512-Fedw0aZvkhynoPYlA5WXrMCAMm+nSWdZt6lzJQ7Ok8S6Q+VsHmHpRWndVRJ8Be0ZbkfPc5LRYH+5XrzXcEeLRQ==",
+    "node_modules/use-sync-external-store": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.7.0.tgz",
+      "integrity": "sha512-6L+EeigHMQhdaIPNIFUKwfWJSwWFQ8gJbJ2DLOs5sDIegTwR9fRxvnM3uciHKjIZhFz+KAv2emhWMRvDmMcY8A==",
       "license": "MIT",
-      "dependencies": {
-        "detect-node-es": "^1.1.0",
-        "tslib": "^2.0.0"
-      },
-      "engines": {
-        "node": ">=10"
-      },
       "peerDependencies": {
-        "@types/react": "*",
-        "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
-      },
-      "peerDependenciesMeta": {
-        "@types/react": {
-          "optional": true
-        }
+        "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
       }
     },
     "node_modules/util-deprecate": {
         "node": ">= 0.8"
       }
     },
+    "node_modules/verkit": {
+      "version": "0.5.0",
+      "resolved": "https://registry.npmjs.org/verkit/-/verkit-0.5.0.tgz",
+      "integrity": "sha512-u4J1hr6Y+C/hit34GwL3eIcUf3wngT8TlYUjK7tk0jxydKLAq3sYvifjdTDA6U3KCKRcQCQDGf/srjxfZF3l7g==",
+      "dev": true,
+      "license": "MIT",
+      "engines": {
+        "node": ">=18.12.0"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/sxzz"
+      }
+    },
     "node_modules/w3c-keyname": {
       "version": "2.2.8",
       "resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.8.tgz",
       "license": "MIT"
     },
     "node_modules/watchpack": {
-      "version": "2.5.2",
-      "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.5.2.tgz",
-      "integrity": "sha512-6i/00NBjP4yGPs+caKSyRfpTF/8Torsu0MOW3mMzIbhgISFder8i7xbqgHlLMwJrdiN8ndBV3UA1/AfzPSr+jg==",
+      "version": "2.6.4",
+      "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.6.4.tgz",
+      "integrity": "sha512-5H3Tce2GfzWbcr9VnSqyak2whFaONw4BdmI5BDnMXold4qSlCFd64XaMQESRh2vkDKmdUkv6rUo17UvZ9f9nXw==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
       }
     },
     "node_modules/webpack": {
-      "version": "5.110.3",
-      "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.110.3.tgz",
-      "integrity": "sha512-GuizBzRvo9YPpyoNMf3ag7AzxbaW85qrRSqTha345KyJbAFPt3/cMzBM0h+RWg7SK/7DdzRLINP3LvQ0hvr4hg==",
+      "version": "5.112.2",
+      "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.112.2.tgz",
+      "integrity": "sha512-B2tp1LI9D8GVpPDqprdt12ukTkXXahj9MzqSWJq4faSPgOUM7CdZaGAB6HrL/8E6UwbBpdj4vzWDbKoFnVoU6g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@webassemblyjs/ast": "^1.14.1",
         "@webassemblyjs/wasm-edit": "^1.14.1",
         "@webassemblyjs/wasm-parser": "^1.14.1",
-        "acorn": "^8.16.0",
         "browserslist": "^4.28.1",
         "chrome-trace-event": "^1.0.2",
-        "enhanced-resolve": "^5.24.4",
+        "enhanced-resolve": "^5.26.0",
         "es-module-lexer": "^2.1.0",
         "events": "^3.2.0",
         "graceful-fs": "^4.2.11",
         "mime-db": "^1.54.0",
-        "minimizer-webpack-plugin": "^5.7.0",
-        "neo-async": "^2.6.2",
-        "schema-utils": "^4.3.3",
+        "minimizer-webpack-plugin": "^5.13.0",
+        "schema-utils": "^4.8.1",
         "tapable": "^2.3.0",
-        "watchpack": "^2.5.2",
-        "webpack-sources": "^3.5.1"
+        "watchpack": "^2.6.3",
+        "webpack-sources": "^3.6.0"
       },
       "bin": {
         "webpack": "bin/webpack.js"
       }
     },
     "node_modules/webpack-cli": {
-      "version": "7.2.3",
-      "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-7.2.3.tgz",
-      "integrity": "sha512-vDFU7jrfCctnN7jJQWPl+V26B51GLp11prVZXg50oeonsgeBzSTJEWmXkjHsOjTgMjlPOQM8GWLh33X9RN/0ow==",
+      "version": "7.3.1",
+      "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-7.3.1.tgz",
+      "integrity": "sha512-enXzN0/2fWHX3tP2gpTV6U8/zz5RSbfWjSAc0VXOi0+hOY4ePdHanA+2kxrAC/SX0LHO4fOX5c9G1TdwpvUj/g==",
       "dev": true,
       "license": "MIT",
       "dependencies": {
         "@discoveryjs/json-ext": "^1.1.0",
         "commander": "^14.0.3",
-        "cross-spawn": "^7.0.6",
         "envinfo": "^7.21.0",
-        "import-local": "^3.2.0",
         "interpret": "^3.1.1",
-        "rechoir": "^0.8.0",
+        "rechoir": "^1.0.0",
         "webpack-merge": "^6.0.1"
       },
       "bin": {
         "url": "https://opencollective.com/webpack"
       },
       "peerDependencies": {
+        "@bomb.sh/tab": "^0.0.22",
         "js-yaml": "^4.0.0 || ^5.0.0",
         "json5": "^2.2.3",
         "toml": "^3.0.0 || ^4.0.0 || ^5.0.0",
         "webpack-dev-server": "^5.0.0 || ^6.0.0"
       },
       "peerDependenciesMeta": {
+        "@bomb.sh/tab": {
+          "optional": true
+        },
         "js-yaml": {
           "optional": true
         },
       }
     },
     "node_modules/webpack-sources": {
-      "version": "3.5.1",
-      "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.5.1.tgz",
-      "integrity": "sha512-jyuiGJdtvY434z5bUZrjz67v76/ePNvFZTp9Mdz29IlH4+GPsgyGjiv0fKI+M7BdkU6ADjulUcKAd3tUK3WlEw==",
+      "version": "3.7.0",
+      "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.7.0.tgz",
+      "integrity": "sha512-PdUhbCycwEgiS1hB/FBDksWKg/ashAIuJKqwdbPn8/dFVgU5LxQiBvG0js6VRRIzPujMrStYCczywp82P0KWng==",
       "dev": true,
       "license": "MIT",
       "engines": {
       "dev": true,
       "license": "ISC"
     },
+    "node_modules/yaml": {
+      "version": "1.10.3",
+      "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz",
+      "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==",
+      "license": "ISC",
+      "engines": {
+        "node": ">= 6"
+      }
+    },
     "node_modules/yocto-queue": {
       "version": "0.1.0",
       "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
       }
     },
     "node_modules/zod": {
-      "version": "4.5.4",
-      "resolved": "https://registry.npmjs.org/zod/-/zod-4.5.4.tgz",
-      "integrity": "sha512-sC95tT5iHHH9gtpj6A81kh+NEaRAUFN+qlUPDUbRfOMvNf5QCBqsb3WgvnpVtK5Y+4UfA6KqufotuTvMGiTlsA==",
+      "version": "4.6.7",
+      "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz",
+      "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==",
       "dev": true,
       "license": "MIT",
       "funding": {
index 6256030bf846d84e4ca382bb755b3f69f647ad9d..8c63eb9e1b82aca6f6bd06587b30bbdadcc46546 100644 (file)
@@ -5,52 +5,52 @@
   "private": true,
   "type": "module",
   "scripts": {
-    "build": "lezer-generator src/lezer/evlambda.grammar -o src/lezer/evlambda.js && webpack",
+    "build": "lezer-generator src/lezer/evlambda.grammar -o src/lezer/evlambda.js && lezer-generator src/lezer/evlistener.grammar -o src/lezer/evlistener.js && webpack",
     "check-licenses": "license-checker --exclude MIT,ISC,BSD-2-Clause,BSD-3-Clause,Apache-2.0"
   },
   "dependencies": {
+    "@base-ui/react": "^1.9.0",
     "@codemirror/lang-css": "^6.3.1",
     "@codemirror/lang-html": "^6.4.12",
     "@codemirror/lang-javascript": "^6.2.5",
     "@codemirror/lang-xml": "^6.1.0",
+    "@codemirror/theme-one-dark": "^6.1.3",
+    "@emotion/react": "^11.14.0",
+    "@emotion/styled": "^11.14.1",
     "@mathjax/mathjax-stix2-font": "^4.1.3",
-    "@radix-ui/colors": "^3.0.0",
-    "@radix-ui/react-dialog": "^1.1.23",
-    "@radix-ui/react-icons": "^1.3.2",
-    "@radix-ui/react-menubar": "^1.1.24",
-    "@radix-ui/react-toolbar": "^1.1.19",
+    "@mui/icons-material": "^9.5.0",
+    "@mui/material": "^9.5.0",
+    "@mui/system": "^9.5.0",
+    "@tanstack/react-hotkeys": "^0.27.0",
     "codemirror": "^6.0.2",
-    "dotenv": "^17.4.2",
-    "express": "^5.2.1",
-    "jszip": "^3.10.1",
+    "dotenv": "^18.0.10",
+    "express": "^5.3.0",
+    "jszip": "^3.10.2",
     "mathjax": "^4.1.3",
-    "react": "^19.2.8",
-    "react-dom": "^19.2.8",
+    "react": "^19.3.1",
+    "react-dom": "^19.3.1",
     "ua-parser-js": "^2.0.10"
   },
   "devDependencies": {
-    "@babel/cli": "^8.0.4",
-    "@babel/core": "^8.0.1",
-    "@babel/eslint-parser": "^8.0.1",
-    "@babel/eslint-plugin": "^8.0.1",
-    "@babel/preset-env": "^8.0.2",
+    "@babel/cli": "^8.1.0",
+    "@babel/core": "^8.1.2",
+    "@babel/eslint-parser": "^8.1.2",
+    "@babel/eslint-plugin": "^8.1.0",
+    "@babel/preset-env": "^8.0.7",
     "@babel/preset-react": "^8.0.1",
-    "@eslint/compat": "^2.1.0",
-    "@lezer/generator": "^1.8.0",
-    "adm-zip": "^0.6.0",
+    "@eslint/compat": "^2.1.1",
+    "@lezer/generator": "^1.8.1",
+    "@stylistic/eslint-plugin": "^6.0.1",
+    "adm-zip": "^0.6.1",
     "babel-loader": "^10.1.1",
     "copy-webpack-plugin": "^14.0.0",
-    "css-loader": "^7.1.5",
-    "eslint": "^10.9.1",
+    "eslint": "^10.15.0",
     "eslint-plugin-react-hooks": "^7.1.1",
     "eslint-webpack-plugin": "^6.0.0",
     "html-webpack-plugin": "^5.6.8",
     "license-checker": "^25.0.1",
-    "npm-check-updates": "^23.1.0",
-    "sass": "^1.103.1",
-    "sass-loader": "^17.0.1",
-    "style-loader": "^4.0.0",
-    "webpack": "^5.110.3",
-    "webpack-cli": "^7.2.3"
+    "npm-check-updates": "^23.1.1",
+    "webpack": "^5.112.2",
+    "webpack-cli": "^7.3.1"
   }
 }
index efce07db3a4c13d5a2dae728cb03ae59482e953e..692d44661c2dc30a7241d67fe77743359e0590b0 100644 (file)
@@ -1,19 +1,19 @@
 // SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck
 // SPDX-License-Identifier: BSD-3-Clause
 
-import React from 'react';
-
 import {
-  useRef,
-  useEffect
+  useEffect,
+  useLayoutEffect,
+  useRef
 } from 'react';
 
 import {
   EditorState,
+  Compartment,
   StateField,
   StateEffect,
-  Annotation,
-  Transaction
+  Transaction,
+  Annotation
 } from '@codemirror/state';
 
 import {
@@ -25,7 +25,6 @@ import {
 import {
   history,
   defaultKeymap,
-  historyKeymap,
   undo,
   redo,
   indentSelection
@@ -42,97 +41,169 @@ import {
 } from '@codemirror/language';
 
 import {
-  FileBuffer,
-  ListenerBuffer
-} from './ide.jsx';
+  oneDarkTheme,
+  oneDarkHighlightStyle
+} from '@codemirror/theme-one-dark';
 
 import {
-  evaluateFirstForm,
-  formatForListener,
+  evaluateFirstForm
 } from './evaluator.js';
 
 import {
-  copyInstance,
-  copyMap
+  copyInstance
 } from './utilities.js';
 
-/*********************/
-/* Clearable History */
-/*********************/
+/**********/
+/* Themes */
+/**********/
 
-const clearHistory = StateEffect.define();
+const lightTheme = [EditorView.theme({}), syntaxHighlighting(defaultHighlightStyle)];
+const darkTheme = [oneDarkTheme, syntaxHighlighting(oneDarkHighlightStyle)];
 
-function clearableHistory() {
-  const historyExtension = history();
-  const createF = historyExtension[0].createF;
-  const updateF = historyExtension[0].updateF;
-  historyExtension[0] = copyInstance(historyExtension[0], {
-    updateF: (value, transaction) => {
-      for (const effect of transaction.effects) {
-        if (effect.is(clearHistory) && effect.value) {
-          return createF(); // empty history
-        }
-      }
-      return updateF(value, transaction);
-    }
-  });
-  return historyExtension;
+function useColorScheme(editorViewRef, themeCompartmentRef, state) {
+  const colorScheme = state.colorScheme;
+  useEffect(() => {
+    editorViewRef.current.dispatch({
+      effects: themeCompartmentRef.current.reconfigure(colorScheme === 'light' ? lightTheme : darkTheme)
+    });
+  }, [editorViewRef, themeCompartmentRef, colorScheme]);
 }
 
-/*************/
-/* Undo/Redo */
-/*************/
+/***********************/
+/* Buffer Transactions */
+/***********************/
 
-function undoIfNotReadOnlyAll(arg) {
-  if (!arg.state.field(stateReadOnlyAll)) {
-    undo(arg);
+export function createBufferTransactions(contents, readOnlyAll, readOnlyEnd) {
+  const extensions = [
+    clearableHistory(),
+    editorStateVersion.init(() => 0),
+    editorStateReadOnlyAll.init(() => readOnlyAll),
+    editorStateReadOnlyEnd.init(() => readOnlyEnd),
+    editorStateFormHistory.init(() => ({forms: [], index: undefined})),
+    EditorState.transactionExtender.of(transaction => ({annotations: originatingWindowId.of(originatingWindowIdVar)}))
+  ];
+  const editorState = EditorState.create({extensions: extensions, doc: ''});
+  const changes = {from: 0, insert: contents};
+  const annotations = [
+    Transaction.addToHistory.of(false)
+  ];
+  const transactionSpec = {changes, annotations};
+  return [editorState.update(transactionSpec)];
+}
+
+export function updateBufferTransactions(transactions, transaction) {
+  const nextTransactions = transactions.slice();
+  const editorState = transactions.at(-1).state;
+  if (editorState.field(editorStateVersion) === transaction.startState.field(editorStateVersion)) {
+    // rebase transaction to buffer editor state
+    const changes = transaction.changes;
+    const effects = transaction.effects.filter(effect => effect.is(setEditorStateReadOnlyAll) || effect.is(setEditorStateReadOnlyEnd));
+    const transactionSpec = {changes, effects};
+    nextTransactions.push(editorState.update(transactionSpec));
+  } else {
+    //console.log('Cannot update buffer transactions.');
   }
+  return nextTransactions;
 }
 
-function redoIfNotReadOnlyAll(arg) {
-  if (!arg.state.field(stateReadOnlyAll)) {
-    redo(arg);
+export function trimBufferTransactions(transactions) {
+  transactions.splice(0, transactions.length - 1); // destructive
+}
+
+export function dumpBufferTransactions(transactions) {
+  return transactions.map(transaction => `(${transaction.startState.field(editorStateVersion)},${transaction.state.field(editorStateVersion)})`);
+}
+
+export function applyBufferCommand(transactions, originatingWindowId, command) {
+  const nextTransactions = transactions.slice();
+  const editorState = transactions.at(-1).state;
+  originatingWindowIdVar = originatingWindowId;
+  command({
+    state: editorState,
+    dispatch: transaction => nextTransactions.push(transaction)
+  });
+  originatingWindowIdVar = undefined;
+  return nextTransactions;
+}
+
+export function revertBuffer(transactions, contents) {
+  const nextTransactions = transactions.slice();
+  const editorState = transactions.at(-1).state;
+  const changes = {from: 0, to: editorState.doc.length, insert: contents};
+  const transactionSpec = {changes};
+  nextTransactions.push(editorState.update(transactionSpec));
+  return nextTransactions;
+}
+
+const listenerStartCode = '\u{E0001}\u{E0065}\u{E0076}\u{E006C}'; // f3a08081 f3a081a5 f3a081b6 f3a081ac
+const listenerEndCode = '\u{E0001}\u{E007F}'; // f3a08081 f3a081bf
+
+export function clearListener(transactions) {
+  const nextTransactions = transactions.slice();
+  const editorState = transactions.at(-1).state;
+  const readOnlyEnd = editorState.field(editorStateReadOnlyEnd);
+  const changes = {from: 0, to: readOnlyEnd, insert: '> ' + listenerStartCode};
+  const effects = [
+    clearHistory.of(true),
+    clearFormHistory.of(true),
+    setEditorStateReadOnlyEnd.of(2 + listenerStartCode.length)
+  ];
+  const userEvent = 'clearListener';
+  const transactionSpec = {changes, effects, userEvent};
+  nextTransactions.push(editorState.update(transactionSpec));
+  return nextTransactions;
+}
+
+export function appendToListener(transactions, originatingWindowId, formStart, formEnd, text) {
+  const nextTransactions = transactions.slice();
+  const editorState = transactions.at(-1).state;
+  const docLength = editorState.doc.length;
+  const transactionSpec = {};
+  if (text !== null) {
+    transactionSpec.changes = {from: docLength, insert: listenerEndCode + '\n' + text + '\n> ' + listenerStartCode};
+    transactionSpec.effects = [
+      clearHistory.of(true),
+      appendToFormHistory.of({start: formStart, end: formEnd}),
+      setEditorStateReadOnlyAll.of(false),
+      setEditorStateReadOnlyEnd.of(docLength + listenerEndCode.length + 1 + text.length + 3 + listenerStartCode.length)
+    ];
+    transactionSpec.userEvent = 'appendToListener';
+  } else { // FOUND_NO_FORM
+    transactionSpec.changes = {from: docLength, insert: '\n'};
+    transactionSpec.effects = [
+      setEditorStateReadOnlyAll.of(false)
+    ];
+    transactionSpec.userEvent = 'foundNoForm';
   }
+  originatingWindowIdVar = originatingWindowId;
+  nextTransactions.push(editorState.update(transactionSpec));
+  originatingWindowIdVar = undefined;
+  return nextTransactions;
 }
 
 /**************/
-/* CodeMirror */
+/* Extensions */
 /**************/
 
-// Change intiated in one of the views
-//
-//         /----------------\          /------------------\          /----------------\
-//         | view state n   |          | buffer state n   |          | view state n   |
-//         \----------------/          \------------------/          \----------------/
-//
-//    /------------------------\
-//    |    /----------------\  |       /------------------\          /----------------\
-// ---*--->| view state n+1 |  \--R--->| buffer state n+1 |          | view state n   |  updateViewAndBuffer
-//         \----------------/          \------------------/          \----------------/
-//
-//         /----------------\          /------------------\          /----------------\
-//   NOOP  | view state n+1 |<----R----| buffer state n+1 |----R---->| view state n+1 |  React re-render
-//         \----------------/          \------------------/          \----------------/
-
-// Change initiated in the buffer
-//
-//         /----------------\          /------------------\          /----------------\
-//         | view state n   |          | buffer state n   |          | view state n   |
-//         \----------------/          \------------------/          \----------------/
-//
-//         /----------------\          /------------------\          /----------------\  bufferCommand (undo, redo, ...)
-//         | view state n   |      --->| buffer state n+1 |          | view state n   |  addToListener, clearListener
-//         \----------------/          \------------------/          \----------------/  onRevertBufferSuccess
-//
-//         /----------------\          /------------------\          /----------------\
-//         | view state n+1 |<----R----| buffer state n+1 |----R---->| view state n+1 |  React re-render
-//         \----------------/          \------------------/          \----------------/
+const editorStateWindowId = StateField.define({
+  create: () => null,
+  update: (value, transaction) => value
+});
 
-// R: rebaseTransaction
+const editorStateBufferType = StateField.define({
+  create: () => null,
+  update: (value, transaction) => value
+});
 
-const stateVersion = StateField.define({
+const setEditorStateVersion = StateEffect.define();
+const editorStateVersion = StateField.define({
   create: () => null,
   update: (value, transaction) => {
+    for (const effect of transaction.effects) {
+      if (effect.is(setEditorStateVersion)) {
+        return effect.value;
+      }
+    }
     return versionChanged(transaction) ? value + 1 : value;
   }
 });
@@ -141,29 +212,31 @@ function versionChanged(transaction) {
   if (transaction.docChanged) {
     return true;
   }
+  const startState = transaction.startState;
   for (const effect of transaction.effects) {
-    if (effect.is(setStateReadOnlyAll) || effect.is(setStateReadOnlyEnd)) {
+    if (effect.is(setEditorStateReadOnlyAll) && startState.field(editorStateReadOnlyAll) !== effect.value) {
+      return true;
+    }
+    if (effect.is(setEditorStateReadOnlyEnd) && startState.field(editorStateReadOnlyEnd) !== effect.value) {
       return true;
     }
   }
   return false;
 }
 
-const setStateReadOnlyAll = StateEffect.define();
-const stateReadOnlyAll = StateField.define({
+const setEditorStateReadOnlyAll = StateEffect.define();
+const editorStateReadOnlyAll = StateField.define({
   create: () => null,
   update: (value, transaction) => {
-    const setReadOnlyAll = getEffectValue(transaction, setStateReadOnlyAll); // undefined or new value
-    return setReadOnlyAll !== undefined ? setReadOnlyAll : value;
+    return getEffectValue(transaction, setEditorStateReadOnlyAll) ?? value;
   }
 });
 
-const setStateReadOnlyEnd = StateEffect.define();
-const stateReadOnlyEnd = StateField.define({
+const setEditorStateReadOnlyEnd = StateEffect.define();
+const editorStateReadOnlyEnd = StateField.define({
   create: () => null,
   update: (value, transaction) => {
-    const setReadOnlyEnd = getEffectValue(transaction, setStateReadOnlyEnd); // undefined or new value
-    return setReadOnlyEnd !== undefined ? setReadOnlyEnd : value;
+    return getEffectValue(transaction, setEditorStateReadOnlyEnd) ?? value;
   }
 });
 
@@ -176,166 +249,276 @@ function getEffectValue(transaction, stateEffectType) {
   return undefined;
 }
 
-const stateWindowId = StateField.define({
+const originatingWindowId = Annotation.define();
+let originatingWindowIdVar;
+
+/****************/
+/* Form History */
+/****************/
+
+const clearFormHistory = StateEffect.define();
+const appendToFormHistory = StateEffect.define();
+const setFormHistoryIndex = StateEffect.define();
+const editorStateFormHistory = StateField.define({
   create: () => null,
   update: (value, transaction) => {
+    for (const effect of transaction.effects) {
+      if (effect.is(clearFormHistory) && effect.value) {
+        return {forms: [], index: undefined};
+      }
+      if (effect.is(appendToFormHistory)) {
+        return {forms: [...value.forms, effect.value], index: undefined};
+      }
+      if (effect.is(setFormHistoryIndex)) {
+        return {forms: value.forms, index: effect.value};
+      }
+    }
     return value;
   }
 });
 
-const originatingWindowId = Annotation.define();
-let originatingWindowIdVar = undefined;
+function previousFormHistoryForm({state, dispatch}) {
+  cycleFormHistoryForm(state, dispatch, (index, nforms) => {
+    if (index === undefined || index === 0) {
+      return nforms - 1;
+    } else {
+      return index - 1;
+    }
+  });
+}
 
-function stateDebugInfo(state) {
-  const length = state.doc.length;
-  const selectionFrom = state.selection.main.from;
-  const selectionTo = state.selection.main.to;
-  const version = state.field(stateVersion);
-  const all = state.field(stateReadOnlyAll);
-  const end = state.field(stateReadOnlyEnd);
-  return `length=${length} from=${selectionFrom} to=${selectionTo} version=${version} all=${all} end=${end}`;
+function nextFormHistoryForm({state, dispatch}) {
+  cycleFormHistoryForm(state, dispatch, (index, nforms) => {
+    if (index === undefined || index === nforms - 1) {
+      return 0;
+    } else {
+      return index + 1;
+    }
+  });
 }
 
-export function transactionDebugInfo(transaction) {
-  const startState = transaction.startState;
-  const state = transaction.state;
-  const length = state.doc.length;
-  const selectionFrom = state.selection.main.from;
-  const selectionTo = state.selection.main.to;
-  const startStateVersion = startState.field(stateVersion);
-  const version = state.field(stateVersion);
-  const all = state.field(stateReadOnlyAll);
-  const end = state.field(stateReadOnlyEnd);
-  return `length=${length} from=${selectionFrom} to=${selectionTo} versions=${startStateVersion}:${version} all=${all} end=${end}`;
+function cycleFormHistoryForm(editorState, dispatch, newIndexFn) {
+  const {forms, index} = editorState.field(editorStateFormHistory);
+  const nforms = forms.length;
+  if (nforms === 0) {
+    return;
+  }
+  const newIndex = newIndexFn(index, nforms);
+  const newFormStart = forms[newIndex].start;
+  const newFormEnd = forms[newIndex].end;
+  const readOnlyEnd = editorState.field(editorStateReadOnlyEnd);
+  const docLength = editorState.doc.length;
+  const changes = {from: readOnlyEnd, to: docLength, insert: editorState.doc.slice(newFormStart, newFormEnd)};
+  const effects = [
+    setFormHistoryIndex.of(newIndex)
+  ];
+  const userEvent = 'cycleFormHistoryForm';
+  const transactionSpec = {changes, effects, userEvent};
+  dispatch(editorState.update(transactionSpec));
 }
 
+/*********************/
+/* Clearable History */
+/*********************/
+
+const clearHistory = StateEffect.define();
+
+// https://code.haverbeke.berlin/codemirror/commands/src/branch/main/src/history.ts
+function clearableHistory() {
+  const historyExtension = history();
+  const createF = historyExtension[0].createF;
+  const updateF = historyExtension[0].updateF;
+  historyExtension[0] = copyInstance(historyExtension[0], {
+    updateF: (value, transaction) => {
+      for (const effect of transaction.effects) {
+        if (effect.is(clearHistory) && effect.value) {
+          return createF(); // empty history
+        }
+      }
+      return updateF(value, transaction);
+    }
+  });
+  return historyExtension;
+}
+
+/*************/
+/* Undo/Redo */
+/*************/
+
+function undoIfNotReadOnlyAll(arg) {
+  if (!arg.state.field(editorStateReadOnlyAll)) {
+    undo(arg);
+  }
+}
+
+function redoIfNotReadOnlyAll(arg) {
+  if (!arg.state.field(editorStateReadOnlyAll)) {
+    redo(arg);
+  }
+}
+
+/***************/
+/* Debug Panel */
+/***************/
+
 function debugPanel () {
-  return showPanel.of(view => {
+  return showPanel.of(editorView => {
     const dom = document.createElement('div');
-    dom.textContent = stateDebugInfo(view.state);
+    dom.style.backgroundColor = 'orange';
+    dom.style.color = 'black';
+    dom.textContent = debugInfo(editorView.state);
     return {
       dom: dom,
-      update: viewUpdate => dom.textContent = stateDebugInfo(viewUpdate.state)
+      update: viewUpdate => dom.textContent = debugInfo(viewUpdate.state)
     };
-  })
+  });
+}
+
+function debugInfo(editorState) {
+  const version = editorState.field(editorStateVersion);
+  const all = editorState.field(editorStateReadOnlyAll);
+  const end = editorState.field(editorStateReadOnlyEnd);
+  const length = editorState.doc.length;
+  const selectionFrom = editorState.selection.main.from;
+  const selectionTo = editorState.selection.main.to;
+  return `version=${version} all=${all} end=${end} length=${length} from=${selectionFrom} to=${selectionTo}`;
+}
+
+/***********************/
+/* Window-Buffer Store */
+/***********************/
+
+const windowBufferStore = new Map();
+
+function setWindowBufferParameters(windowId, bufferId, parameters) {
+  let windowParameters = windowBufferStore.get(windowId);
+  if (!windowParameters) {
+    windowBufferStore.set(windowId, windowParameters = new Map());
+  }
+  let windowBufferParameters = windowParameters.get(bufferId);
+  if (!windowBufferParameters) {
+    windowParameters.set(bufferId, windowBufferParameters = {});
+  }
+  Object.assign(windowBufferParameters, parameters);
+}
+
+export function getWindowBufferParameters(windowId, bufferId) {
+  let windowParameters = windowBufferStore.get(windowId);
+  if (!windowParameters) {
+    return {};
+  }
+  let windowBufferParameters = windowParameters.get(bufferId);
+  if (!windowBufferParameters) {
+    return {};
+  }
+  return windowBufferParameters;
 }
 
-export function CodeMirror({id, ide, window, buffer}) {
+/**************/
+/* TextEditor */
+/**************/
+
+// Change initiated in one of the views
+//
+//          /----------------\         /------------------\         /----------------\
+//          | view state n   |         | buffer state n   |         | view state n   |
+//          \----------------/         \------------------/         \----------------/
+//
+//     /--------------------------\
+//     |    /----------------\    |    /------------------\         /----------------\
+// ----*--->| view state n+1 |    \--->| buffer state n+1 |         | view state n   |  updateEditorViewAndBufferTransactions
+//          \----------------/         \------------------/         \----------------/
+//
+//          /----------------\         /------------------\         /----------------\
+//          | view state n+1 |<--------| buffer state n+1 |-------->| view state n+1 |  useBufferTransactions
+//          \----------------/         \------------------/         \----------------/
+
+// Change initiated in the buffer
+//
+//          /----------------\         /------------------\         /----------------\
+//          | view state n   |         | buffer state n   |         | view state n   |
+//          \----------------/         \------------------/         \----------------/
+//
+//          /----------------\         /------------------\         /----------------\  revert buffer
+//          | view state n   |     --->| buffer state n+1 |         | view state n   |  buffer command (undo, redo)
+//          \----------------/         \------------------/         \----------------/  clear listener, append to listener
+//
+//          /----------------\         /------------------\         /----------------\
+//          | view state n+1 |<--------| buffer state n+1 |-------->| view state n+1 |  useBufferTransactions
+//          \----------------/         \------------------/         \----------------/
+
+
+export function TextEditor({state, dispatch, window}) {
   const parentRef = useRef();
-  const viewRef = useRef();
-  useEffect(() => {
-    //console.log('CREATE CodeMirror');
-    viewRef.current = new EditorView({
-      parent: parentRef.current,
-      state: createViewState(id, ide, window, buffer),
-      dispatch: (transaction, view) => updateViewAndBuffer(ide, buffer, transaction, view)
-    });
-    viewRef.current.dispatch({scrollIntoView: true});
-    updateWindowView(ide, window, viewRef.current);
-    return () => {
-      //console.log('DESTROY CodeMirror');
-      updateWindowAnchors(ide, window, buffer, viewRef.current);
-      viewRef.current.destroy();
-    };
-  }, []); // eslint-disable-line react-hooks/exhaustive-deps
-  useEffect(() => {
-    const view = viewRef.current;
-    const state = view.state;
-    const transaction = buffer.transaction; // version n to version n+1
-    if (state.field(stateVersion) === transaction.startState.field(stateVersion)) {
-      // update the view state from version n to version n+1
-      //console.log('view.state = buffer.tr.startState');
-      view.update([rebaseTransaction(transaction, state)]);
-    } else if (state.field(stateVersion) === transaction.state.field(stateVersion)) {
-      // the view state is already up to date
-      //console.log('view.state = buffer.tr.state');
-    } else {
-      // should not happen
-      console.log('CodeMirror version mismatch 1: '
-                + 'view.state = ' + state.field(stateVersion) + ' '
-                + 'buffer.tr.startState = ' + transaction.startState.field(stateVersion) + ' '
-                + 'buffer.tr.state = ' + transaction.state.field(stateVersion));
-      view.setState(createViewState(id, ide, window, buffer));
-    }
-  }, [buffer]); // eslint-disable-line react-hooks/exhaustive-deps
+  const editorViewRef = useRef();
+  const themeCompartmentRef = useRef();
+  useTextEditor(parentRef, editorViewRef, themeCompartmentRef, state, dispatch, window);
+  useBufferTransactions(editorViewRef, state, window);
+  useColorScheme(editorViewRef, themeCompartmentRef, state);
   return (
-    <div className="cm-outer-container">
-      <div className="cm-inner-container" ref={parentRef}></div>
+    // https://discuss.codemirror.net/t/size-inside-flexbox/1359
+    <div style={{width: '100%', height: '100%', position: 'relative'}}>
+      <div style={{position: 'absolute', inset: '0'}} ref={parentRef}></div>
     </div>
   );
 }
 
-function updateWindowView(staleIde, staleWindow, view) {
-  staleIde.setWindows(windows => {
-    const window = windows.get(staleWindow.id);
-    const newWindows = new Map(windows);
-    newWindows.set(window.id, copyInstance(window, {
-      view: view
-    }));
-    return newWindows;
-  });
-}
-
-function updateWindowAnchors(staleIde, staleWindow, staleBuffer, view) {
-  staleIde.setWindows(windows => {
-    const window = windows.get(staleWindow.id);
-    const newWindows = new Map(windows);
-    newWindows.set(window.id, copyInstance(window, {
-      anchors: copyMap(window.anchors, staleBuffer.id, view.state.selection.main.anchor)
-    }));
-    return newWindows;
-  });
+function useTextEditor(parentRef, editorViewRef, themeCompartmentRef, state, dispatch, window) {
+  // the key of an IDEWindow is window.id + '.' + window.bufferId
+  const windowId = window.id; // will never change for this component
+  const bufferId = window.bufferId; // will never change for this component
+  const buffer = state.buffers.get(bufferId);
+  const bufferType = buffer.type();
+  const bufferLanguage = buffer.language();
+  useLayoutEffect(() => {
+    const editorView = new EditorView({
+      parent: parentRef.current,
+      state: createTextEditorEditorState(themeCompartmentRef, dispatch, windowId, bufferId, bufferType, bufferLanguage),
+      dispatch: (transaction, editorView) => updateEditorViewAndBufferTransactions(transaction, editorView, dispatch, bufferId)
+    });
+    editorViewRef.current = editorView;
+    return () => {
+      setWindowBufferParameters(windowId, bufferId, {
+        anchor: editorView.state.selection.main.anchor,
+        scrollSnapshot: editorView.scrollSnapshot()
+      });
+      editorView.destroy();
+    };
+  }, [parentRef, editorViewRef, themeCompartmentRef, dispatch, windowId, bufferId, bufferType, bufferLanguage]);
 }
 
-export function createBufferTransaction(contents, readOnlyAll = false, readOnlyEnd = 0) {
-  const extensions = [
-    clearableHistory(),
-    stateVersion,
-    stateVersion.init(() => 0),
-    stateReadOnlyAll,
-    stateReadOnlyAll.init(() => readOnlyAll),
-    stateReadOnlyEnd,
-    stateReadOnlyEnd.init(() => readOnlyEnd),
-    EditorState.transactionExtender.of(transaction => ({annotations: originatingWindowId.of(originatingWindowIdVar)}))
-  ];
-  const changes = {from: 0, insert: contents};
-  const annotations = [Transaction.addToHistory.of(false)];
-  return EditorState.create({doc: '', extensions: extensions}).update({changes: changes, annotations: annotations});
+function testMultiStepUpdate(editorView) {
+  editorView.dispatch(editorView.state.update({changes: {from: 0, insert: 'x'}}));
+  editorView.dispatch(editorView.state.update({changes: {from: 0, insert: 'x'}}));
+  editorView.dispatch(editorView.state.update({changes: {from: 0, insert: 'x'}}));
+  return true;
 }
 
-function createViewState(id, ide, window, buffer) {
-  const bufferState = buffer.transaction.state;
+function createTextEditorEditorState(themeCompartmentRef, dispatch, windowId, bufferId, bufferType, bufferLanguage) {
+  themeCompartmentRef.current = new Compartment();
   const extensions = [
-    EditorView.contentAttributes.of({
-      id: id
-    }),
-    EditorView.theme({
-      '&': {
-        width: '100%',
-        height: '100%',
-        fontSize: '14pt'
-      }
-    }),
-    EditorView.lineWrapping,
+    //debugPanel(),
+    themeCompartmentRef.current.of(lightTheme),
     keymap.of([
+      //{key: 'x', run: testMultiStepUpdate},
       ...defaultKeymap,
       {
         linux: 'Ctrl-z',
         win: 'Ctrl-z',
         mac: 'Cmd-z',
-        run: () => bufferCommand(ide, window, buffer, undoIfNotReadOnlyAll),
+        run: () => bufferCommand(dispatch, windowId, bufferId, undoIfNotReadOnlyAll),
         preventDefault: true
       },
       {
         linux: 'Ctrl-y',
         win: 'Ctrl-y',
         mac: 'Cmd-Shift-z',
-        run: () => bufferCommand(ide, window, buffer, redoIfNotReadOnlyAll),
+        run: () => bufferCommand(dispatch, windowId, bufferId, redoIfNotReadOnlyAll),
         preventDefault: true
       },
       {
         linux: 'Ctrl-Shift-z',
-        run: () => bufferCommand(ide, window, buffer, redoIfNotReadOnlyAll),
+        run: () => bufferCommand(dispatch, windowId, bufferId, redoIfNotReadOnlyAll),
         preventDefault: true
       },
       {
@@ -344,68 +527,154 @@ function createViewState(id, ide, window, buffer) {
       },
       ...searchKeymap
     ]),
-    buffer.language(),
-    syntaxHighlighting(defaultHighlightStyle, {fallback: true}),
+    EditorView.lineWrapping,
+    bufferLanguage,
     bracketMatching(),
-    stateVersion,
-    stateVersion.init(() => bufferState.field(stateVersion)),
-    stateReadOnlyAll,
-    stateReadOnlyAll.init(() => bufferState.field(stateReadOnlyAll)),
-    stateReadOnlyEnd,
-    stateReadOnlyEnd.init(() => bufferState.field(stateReadOnlyEnd)),
-    stateWindowId,
-    stateWindowId.init(() => window.id),
-    //debugPanel()
+    EditorView.contentAttributes.of({id: 'window' + windowId}),
+    editorStateWindowId.init(() => windowId),
+    editorStateBufferType.init(() => bufferType),
+    editorStateVersion.init(() => -1),
+    editorStateReadOnlyAll.init(() => false),
+    editorStateReadOnlyEnd.init(() => 0)
   ];
-  if (buffer instanceof FileBuffer) {
-    const anchor = Math.min(window.anchors.get(buffer.id) || 0, bufferState.doc.length);
-    return EditorState.create({doc: bufferState.doc, selection: {anchor: anchor}, extensions: extensions});
-  } else if (buffer instanceof ListenerBuffer) {
+  if (bufferType === 'ListenerBuffer') {
     extensions.unshift(keymap.of([
-      {key: 'Enter', run: view => listenerEnter(ide, window, buffer, view)}
+      {
+        key: 'Enter',
+        run: editorView => listenerEnter(dispatch, windowId, bufferId, editorView)
+      },
+      {
+        linux: 'Ctrl-Alt-ArrowUp',
+        win: 'Ctrl-Alt-ArrowUp',
+        mac: 'Ctrl-Meta-ArrowUp',
+        run: () => bufferCommand(dispatch, windowId, bufferId, previousFormHistoryForm),
+        preventDefault: true
+      },
+      {
+        linux: 'Ctrl-Alt-ArrowDown',
+        win: 'Ctrl-Alt-ArrowDown',
+        mac: 'Ctrl-Meta-ArrowDown',
+        run: () => bufferCommand(dispatch, windowId, bufferId, nextFormHistoryForm),
+        preventDefault: true
+      }
     ]));
-    const anchor = Math.min(window.anchors.get(buffer.id) || bufferState.doc.length, bufferState.doc.length);
-    return EditorState.create({doc: bufferState.doc, selection: {anchor: anchor}, extensions: extensions});
+    extensions.push(EditorView.clipboardInputFilter.of(text => {
+      return text.replaceAll(/[\u{E0000}-\u{E007F}]/gu, '');
+    }));
+    extensions.push(EditorView.clipboardOutputFilter.of(text => {
+      return text.replaceAll(/[\u{E0000}-\u{E007F}]/gu, '');
+    }));
+  }
+  return EditorState.create({extensions: extensions, doc: ''});
+}
+
+function bufferCommand(dispatch, windowId, bufferId, command) {
+  dispatch({type: 'applyBufferCommand', bufferId: bufferId, originatingWindowId: windowId, command: command});
+  return true;
+}
+
+function listenerEnter(dispatch, windowId, bufferId, editorView) {
+  const editorState = editorView.state;
+  const docLength = editorState.doc.length;
+  const mainSelection = editorState.selection.main;
+  const readOnlyAll = editorState.field(editorStateReadOnlyAll);
+  const readOnlyEnd = editorState.field(editorStateReadOnlyEnd);
+  if (!readOnlyAll && mainSelection.from === docLength && mainSelection.to === docLength) {
+    const text = editorState.sliceDoc(readOnlyEnd);
+    evaluateFirstForm(text).then(response => {
+      dispatch({type: 'appendToListener', bufferId: bufferId, originatingWindowId: windowId, formStart: readOnlyEnd, formEnd: docLength, response: response});
+    });
+    const effects = [
+      setEditorStateReadOnlyAll.of(true)
+    ];
+    const transactionSpec = {effects};
+    editorView.dispatch(transactionSpec);
+    return true;
+  } else {
+    return false;
   }
 }
 
-function updateViewAndBuffer(staleIde, staleBuffer, transaction, view) {
-  const state = view.state;
-  const readOnlyAll = state.field(stateReadOnlyAll);
-  const readOnlyEnd = state.field(stateReadOnlyEnd);
+function updateEditorViewAndBufferTransactions(transaction, editorView, dispatch, bufferId) {
+  const editorState = editorView.state;
+  const readOnlyAll = editorState.field(editorStateReadOnlyAll);
+  const readOnlyEnd = editorState.field(editorStateReadOnlyEnd);
   let discardTransaction = readOnlyAll;
   transaction.changes.iterChangedRanges((from, to) => discardTransaction = discardTransaction || from < readOnlyEnd);
   if (!discardTransaction) {
-    view.update([transaction]);
+    editorView.update([transaction]);
     if (versionChanged(transaction)) {
-      staleIde.setBuffers(buffers => {
-        const buffer = buffers.get(staleBuffer.id);
-        if (buffer.transaction.state.field(stateVersion) === transaction.startState.field(stateVersion)) {
-          const newBuffers = new Map(buffers);
-          const rebasedTransaction = rebaseTransaction(transaction, buffer.transaction.state);
-          newBuffers.set(buffer.id, copyInstance(buffer, {
-            transaction: rebasedTransaction,
-            modified: !rebasedTransaction.state.doc.eq(buffer.lastSavedContents)
-          }));
-          return newBuffers;
-        } else {
-          // should not happen
-          console.log('CodeMirror version mismatch 2: '
-                    + 'buffer.tr.state = ' + buffer.transaction.state.field(stateVersion) + ' '
-                    + 'tr.startState = ' + transaction.startState.field(stateVersion));
-          return buffers;
-        }
-      });
+      dispatch({type: 'updateBufferTransactions', bufferId: bufferId, transaction: transaction});
     }
   }
 }
 
-function rebaseTransaction(transaction, state) {
-  const rebasingToOriginatingWindow = transaction.annotation(originatingWindowId) === state.field(stateWindowId, false);
+function useBufferTransactions(editorViewRef, state, window) {
+  // the key of an IDEWindow is window.id + '.' + window.bufferId
+  const windowId = window.id; // will never change for this component
+  const bufferId = window.bufferId; // will never change for this component
+  const buffer = state.buffers.get(bufferId);
+  const bufferTransactions = buffer.transactions;
+  useEffect(() => {
+    const editorView = editorViewRef.current;
+    const editorState = editorView.state;
+    const version = editorState.field(editorStateVersion);
+    if (version === -1) {
+      const windowBufferParameters = getWindowBufferParameters(windowId, bufferId);
+      setTextEditorEditorState(editorView, bufferTransactions, windowBufferParameters);
+    } else if (version === bufferTransactions.at(-1).state.field(editorStateVersion)) {
+      // up to date
+    } else {
+      const transactions = bufferTransactions.filter(t => t.startState.field(editorStateVersion) !== t.state.field(editorStateVersion));
+      const index = transactions.findIndex(t => version === t.startState.field(editorStateVersion));
+      if (index === -1) {
+        //console.log('Cannot update editor state.');
+        const windowBufferParameters = getWindowBufferParameters(windowId, bufferId);
+        setTextEditorEditorState(editorView, bufferTransactions, windowBufferParameters);
+      } else {
+        const nSteps = transactions.length - index;
+        if (nSteps !== 1) {
+          //console.log(`nSteps = ${nSteps}`);
+        }
+        for (let i = index; i < transactions.length; i++) {
+          rebaseTransactionToTextEditorEditorState(editorView, transactions[i]);
+        }
+      }
+    }
+  }, [editorViewRef, windowId, bufferId, bufferTransactions]);
+}
+
+function setTextEditorEditorState(editorView, bufferTransactions, windowBufferParameters) {
+  const editorState = editorView.state;
+  const bufferEditorState = bufferTransactions.at(-1).state;
+  const changes = {from: 0, to: editorState.doc.length, insert: bufferEditorState.doc};
+  const effects = [
+    setEditorStateVersion.of(bufferEditorState.field(editorStateVersion)),
+    setEditorStateReadOnlyAll.of(bufferEditorState.field(editorStateReadOnlyAll)),
+    setEditorStateReadOnlyEnd.of(bufferEditorState.field(editorStateReadOnlyEnd))
+  ];
+  const transactionSpec = {changes, effects};
+  editorView.update([editorState.update(transactionSpec)]);
+  const editorState2 = editorView.state;
+  const savedAnchor = windowBufferParameters.anchor;
+  const savedScrollSnaphot = windowBufferParameters.scrollSnapshot;
+  const defaultAnchor = editorState2.field(editorStateBufferType) === 'ListenerBuffer' ? editorState2.doc.length : 0;
+  const anchor = (savedAnchor !== undefined && savedAnchor <= editorState2.doc.length) ? savedAnchor : defaultAnchor;
+  editorView.update([editorState2.update({
+    selection: {anchor: anchor},
+    effects: savedScrollSnaphot || EditorView.scrollIntoView(anchor, {y: 'center'})
+  })]);
+}
+
+function rebaseTransactionToTextEditorEditorState(editorView, transaction) {
+  const editorState = editorView.state;
   const changes = transaction.changes;
-  const effects = transaction.effects.filter(effect => effect.is(setStateReadOnlyAll) || effect.is(setStateReadOnlyEnd));
-  let selection = undefined;
-  let scrollIntoView = false;
+  const effects = transaction.effects.filter(effect => effect.is(setEditorStateReadOnlyAll) || effect.is(setEditorStateReadOnlyEnd));
+  const transactionSpec = {changes, effects};
+  editorView.update([editorState.update(transactionSpec)]);
+  const editorState2 = editorView.state;
+  const rebasingToOriginatingWindow = transaction.annotation(originatingWindowId) === editorState2.field(editorStateWindowId);
+  let selection;
   switch (transaction.annotation(Transaction.userEvent)) {
     case 'undo':
     case 'redo':
@@ -415,150 +684,87 @@ function rebaseTransaction(transaction, state) {
         transaction.changes.iterChangedRanges((fromA, toA, fromB, toB) => {changeFrom = fromB; changeTo = toB;});
         if (changeFrom !== null && changeTo !== null) {
           selection = {anchor: changeFrom, head: changeTo};
-          scrollIntoView = true;
         }
       }
       break;
     case 'foundNoForm':
       if (rebasingToOriginatingWindow) {
-        selection = {anchor: transaction.state.doc.length};
-        scrollIntoView = true;
+        selection = {anchor: editorState2.doc.length};
       }
       break;
-    case 'addToListener':
     case 'clearListener':
-      selection = {anchor: transaction.state.doc.length};
-      scrollIntoView = true;
+    case 'appendToListener':
+      selection = {anchor: editorState2.doc.length};
+      break;
+    case 'cycleFormHistoryForm':
+      if (rebasingToOriginatingWindow) {
+        selection = {anchor: editorState2.doc.length};
+      }
       break;
     default:
       break;
   }
-  return state.update({changes: changes, effects: effects, selection: selection, scrollIntoView: scrollIntoView});
-}
-
-function bufferCommand(staleIde, staleWindow, staleBuffer, fn) {
-  staleIde.setBuffers(buffers => {
-    const buffer = buffers.get(staleBuffer.id);
-    const newBuffers = new Map(buffers);
-    const dispatch = transaction =>
-      newBuffers.set(buffer.id, copyInstance(buffer, {
-        transaction: transaction,
-        modified: !transaction.state.doc.eq(buffer.lastSavedContents)
-      }));
-    originatingWindowIdVar = staleWindow.id;
-    fn({state: buffer.transaction.state, dispatch: dispatch});
-    originatingWindowIdVar = undefined;
-    return newBuffers;
-  });
-  return true;
-}
-
-function listenerEnter(staleIde, staleWindow, staleBuffer, view) {
-  const state = view.state;
-  const docLength = state.doc.length;
-  if (!state.field(stateReadOnlyAll) && state.selection.main.from === docLength && state.selection.main.to === docLength) {
-    const text = state.sliceDoc(state.field(stateReadOnlyEnd));
-    evaluateFirstForm(text, response => addToListener(staleIde, staleWindow, staleBuffer, formatForListener(response)));
-    view.dispatch({effects: [setStateReadOnlyAll.of(true)]});
-    return true;
-  } else {
-    return false;
+  if (selection) {
+    editorView.update([editorState2.update({
+      selection: selection,
+      effects: EditorView.scrollIntoView(selection.anchor, {y: 'center'})
+    })]);
   }
 }
 
-function addToListener(staleIde, staleWindow, staleBuffer, text) {
-  staleIde.setBuffers(buffers => {
-    const buffer = buffers.get(staleBuffer.id);
-    const newBuffers = new Map(buffers);
-    const state = buffer.transaction.state;
-    const docLength = state.doc.length;
-    const transactionSpec = {};
-    if (text === null) { // FOUND_NO_FORM
-      transactionSpec.changes = {from: docLength, insert: '\n'};
-      transactionSpec.effects = [
-        setStateReadOnlyAll.of(false)
-      ];
-      transactionSpec.userEvent = 'foundNoForm';
-    } else {
-      transactionSpec.changes = {from: docLength, insert: '\n' + text + '\n> '};
-      transactionSpec.effects = [
-        setStateReadOnlyAll.of(false),
-        setStateReadOnlyEnd.of(docLength + text.length + 4),
-        clearHistory.of(true)
-      ];
-      transactionSpec.userEvent = 'addToListener';
-    }
-    originatingWindowIdVar = staleWindow.id;
-    const transaction = state.update(transactionSpec);
-    originatingWindowIdVar = undefined;
-    newBuffers.set(buffer.id, copyInstance(buffer, {
-      transaction: transaction,
-      modified: !transaction.state.doc.eq(buffer.lastSavedContents)
-    }));
-    return newBuffers;
-  });
-}
-
-export function clearListener(staleIde, staleBuffer) {
-  staleIde.setBuffers(buffers => {
-    const buffer = buffers.get(staleBuffer.id);
-    const newBuffers = new Map(buffers);
-    const state = buffer.transaction.state;
-    const readOnlyEnd = state.field(stateReadOnlyEnd);
-    const transactionSpec = {};
-    transactionSpec.changes = {from: 0, to: readOnlyEnd, insert: '> '};
-    transactionSpec.effects = [
-      setStateReadOnlyEnd.of(2),
-      clearHistory.of(true)
-    ];
-    transactionSpec.userEvent = 'clearListener';
-    const transaction = state.update(transactionSpec);
-    newBuffers.set(buffer.id, copyInstance(buffer, {
-      transaction: transaction,
-      modified: !transaction.state.doc.eq(buffer.lastSavedContents)
-    }));
-    return newBuffers;
-  });
-}
-
 /**************/
 /* Minibuffer */
 /**************/
 
-const minibufferExtensions = [
-  EditorView.theme({
-    '&': {
-      fontSize: '12pt'
-    },
-    '.cm-scroller': {
-      overflow: 'hidden'
-    }
-  }),
-  history(),
-  keymap.of([
-    ...defaultKeymap,
-    ...historyKeymap
-  ]),
-  EditorState.transactionFilter.of(transaction => transaction.state.doc.lines > 1 ? [] : [transaction]),
-  EditorView.editable.of(false)
-];
-
-export function Minibuffer({message}) {
+export function Minibuffer({state}) {
   const parentRef = useRef();
-  const viewRef = useRef();
-  useEffect(() => {
-    viewRef.current = new EditorView({
+  const editorViewRef = useRef();
+  const themeCompartmentRef = useRef();
+  useMinibuffer(parentRef, editorViewRef, themeCompartmentRef);
+  useMessage(editorViewRef, state);
+  useColorScheme(editorViewRef, themeCompartmentRef, state);
+  return (
+    <div id="minibuffer" ref={parentRef}></div>
+  );
+}
+
+function useMinibuffer(parentRef, editorViewRef, themeCompartmentRef) {
+  useLayoutEffect(() => {
+    const editorView = new EditorView({
       parent: parentRef.current,
-      state: EditorState.create({doc: '', extensions: minibufferExtensions})
+      state: createMinibufferEditorState(themeCompartmentRef)
     });
+    editorViewRef.current = editorView;
     return () => {
-      viewRef.current.destroy();
+      editorView.destroy();
     };
-  }, []);
+  }, [parentRef, editorViewRef, themeCompartmentRef]);
+}
+
+function createMinibufferEditorState(themeCompartmentRef) {
+  themeCompartmentRef.current = new Compartment();
+  const extensions = [
+    themeCompartmentRef.current.of(lightTheme),
+    EditorView.editable.of(false)
+  ];
+  return EditorState.create({extensions: extensions, doc: ''});
+}
+
+function useMessage(editorViewRef, state) {
+  const message = state.message;
   useEffect(() => {
-    viewRef.current.setState(EditorState.create({doc: message, extensions: minibufferExtensions}));
-  }, [message]);
-  return (
-    <div ref={parentRef}></div>
-  );
+    const editorView = editorViewRef.current;
+    setMinibufferEditorState(editorView, message[0]);
+    const id = setTimeout(() => {
+      setMinibufferEditorState(editorView, '');
+    }, 5000);
+    return () => clearTimeout(id);
+  }, [editorViewRef, message]);
+}
+
+function setMinibufferEditorState(editorView, message) {
+  const editorState = editorView.state;
+  const changes = {from: 0, to: editorState.doc.length, insert: message};
+  const transactionSpec = {changes};
+  editorView.update([editorState.update(transactionSpec)]);
 }
index d55cc7dbc37ae2e776620c834683d58f1f6d1981..a9daadbda78f92e5da7d1a9d904c7889e07fcdf6 100644 (file)
@@ -1,41 +1,64 @@
 // SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck
 // SPDX-License-Identifier: BSD-3-Clause
 
-import React from 'react';
+import {
+  useEffect,
+  useEffectEvent,
+  useRef
+} from 'react';
 
-import * as Menubar from '@radix-ui/react-menubar';
-import * as Toolbar from '@radix-ui/react-toolbar';
-import * as Dialog from '@radix-ui/react-dialog';
+import {
+  formatForDisplay
+} from '@tanstack/react-hotkeys';
 
 import {
-  DotFilledIcon
-} from '@radix-ui/react-icons';
+  styled
+} from '@mui/system';
 
-import './styles.scss';
+import {
+  default as Box
+} from '@mui/system/Box';
 
-/**************/
-/* TextButton */
-/**************/
+import {
+  Check as CheckIcon
+} from '@mui/icons-material';
 
-export function TextButton({onClick, children}) {
-  return (
-    <button className="textButton"
-            onClick={onClick}>
-      {children}
-    </button>
-  );
-}
+import {
+  Button as BUIButton
+} from '@base-ui/react/button';
 
-/****************/
-/* FilledButton */
-/****************/
+import {
+  Menubar as BUIMenubar
+} from '@base-ui/react/menubar';
 
-export function FilledButton({onClick, children}) {
+import {
+  Menu as BUIMenu
+} from '@base-ui/react/menu';
+
+import {
+  Dialog as BUIDialog
+} from '@base-ui/react/dialog';
+
+import {
+  actions
+} from './state.js';
+
+/**********/
+/* Button */
+/**********/
+
+const StyledBUIButton = styled(BUIButton)(({theme, type}) => ({
+  border: `1px solid ${theme.palette.border}`,
+  padding: '3px 5px',
+  backgroundColor: type === 'submit' ? theme.palette.highEmphasis : theme.palette.lowEmphasis,
+  color: type === 'submit' ? theme.palette.onHighEmphasis : theme.palette.onLowEmphasis
+}));
+
+export function Button({children, ...otherProps}) {
   return (
-    <button className="filledButton"
-            onClick={onClick}>
+    <StyledBUIButton {...otherProps}>
       {children}
-    </button>
+    </StyledBUIButton>
   );
 }
 
@@ -43,238 +66,302 @@ export function FilledButton({onClick, children}) {
 /* Menubar */
 /***********/
 
-export function MenubarRoot({value, onValueChange, children}) {
-  return (
-    <Menubar.Root className="menubarRoot"
-                  value={value}
-                  onValueChange={onValueChange}>
-      {children}
-    </Menubar.Root>
-  );
-}
-
-export function MenubarMenu({trigger, hidden = false, children}) {
-  return (
-    <Menubar.Menu>
-      <Menubar.Trigger className="menubarTrigger">
-        {trigger}
-      </Menubar.Trigger>
-      <Menubar.Portal>
-        <Menubar.Content className="menubarContent"
-                         hidden={hidden}
-                         onCloseAutoFocus={event => event.preventDefault()}>
-          {children}
-        </Menubar.Content>
-      </Menubar.Portal>
-    </Menubar.Menu>
-  );
-}
+const StyledBUIMenubar = styled(BUIMenubar)(({theme}) => ({
+  padding: '3px',
+  backgroundColor: theme.palette.barBackground,
+  display: 'flex',
+  flexDirection: 'row',
+  gap: '10px'
+}));
 
-export function MenubarItem({inset = false, disabled = false, onSelect, children}) {
+export function Menubar({children}) {
   return (
-    <Menubar.Item className={inset ? 'menubarItem inset' : 'menubarItem'}
-                  disabled={disabled}
-                  onSelect={onSelect}>
+    <StyledBUIMenubar>
       {children}
-    </Menubar.Item>
+    </StyledBUIMenubar>
   );
 }
 
-export function MenubarDialog({open, onOpenChange, inset = false, disabled = false, onClose, title, children}) {
-  const focusDialogDefaultButton = event => {
-    event.currentTarget.querySelector('button.dialogButton.default').focus();
-    event.preventDefault();
-  };
+const StyledBUIMenuTrigger = styled(BUIMenu.Trigger)(({theme}) => ({
+  flex: '0 0 auto',
+  outline: 'none',
+  padding: '0 5px',
+  backgroundColor: theme.palette.barBackground,
+  color: theme.palette.onBarBackground,
+  '&:hover': {
+    backgroundColor: theme.palette.highEmphasis,
+    color: theme.palette.onHighEmphasis
+  }
+}));
+
+const StyledBUIMenuPopup = styled(BUIMenu.Popup)(({theme}) => ({
+  outline: 'none',
+  boxShadow: `0 0 0 1px ${theme.palette.border}`,
+  padding: '3px',
+  backgroundColor: theme.palette.background
+}));
+
+export function Menu({state, trigger, children}) {
+  function onOpenChange(open, eventDetails) {
+    //console.log(`${Date.now()} ${open} ${eventDetails.reason}`);
+    if (!open && !['list-navigation', 'sibling-open'].includes(eventDetails.reason)) {
+      // give the focus back to the selected window
+      const element = document.getElementById('window' + state.selectedWindowId);
+      if (element) {
+        element.focus();
+      }
+    }
+  }
   return (
-    <Dialog.Root open={open}
-                 onOpenChange={x => onOpenChange(x && !disabled)}>
-      <Dialog.Trigger asChild>
-        <Menubar.Item className={inset ? 'menubarItem inset' : 'menubarItem'}
-                      disabled={disabled}
-                      onSelect={event => event.preventDefault()}>
-          {title}
-        </Menubar.Item>
-      </Dialog.Trigger>
-      <Dialog.Portal>
-        <Dialog.Overlay className="dialogOverlay"/>
-        <Dialog.Content className="dialogContent"
-                        onOpenAutoFocus={focusDialogDefaultButton}
-                        onEscapeKeyDown={onClose}
-                        onInteractOutside={onClose}>
-          <Dialog.Title className="dialogTitle">
-            {title}
-          </Dialog.Title>
-          {children}
-        </Dialog.Content>
-      </Dialog.Portal>
-    </Dialog.Root>
+    <BUIMenu.Root onOpenChange={onOpenChange}>
+      <StyledBUIMenuTrigger>
+        {trigger}
+      </StyledBUIMenuTrigger>
+      <BUIMenu.Portal>
+        <BUIMenu.Positioner>
+          <StyledBUIMenuPopup>
+            {children}
+          </StyledBUIMenuPopup>
+        </BUIMenu.Positioner>
+      </BUIMenu.Portal>
+    </BUIMenu.Root>
   );
 }
 
-export function MenubarRadioGroup({value, children}) {
+const StyledBUIMenuItem = styled(BUIMenu.Item)(({theme}) => ({
+  outline: 'none',
+  padding: '3px 5px',
+  backgroundColor: theme.palette.background,
+  color: theme.palette.onBackground,
+  '&[data-highlighted]': {
+    backgroundColor: theme.palette.highEmphasis,
+    color: theme.palette.onHighEmphasis
+  },
+  '&[data-disabled]': {
+    backgroundColor: theme.palette.background,
+    color: theme.palette.disabled
+  },
+  display: 'flex',
+  flexDirection: 'row'
+}));
+
+export function MenuItem({disabled, hint, onClick, children}) {
   return (
-    <Menubar.RadioGroup value={value}>
-      {children}
-    </Menubar.RadioGroup>
+    <StyledBUIMenuItem disabled={disabled} onClick={onClick} closeOnClick={true}>
+      <Box>
+        {children}
+      </Box>
+      {hint &&
+       <Box
+         sx={{
+           marginLeft: 'auto',
+           paddingLeft: '20px'
+         }}
+       >
+         {hint}
+       </Box>
+      }
+    </StyledBUIMenuItem>
   );
 }
 
-export function MenubarRadioItem({value, disabled = false, onSelect, children}) {
+export function MenuActionItem({state, dispatch, actionType, actionRef, onClick, children}) {
+  const {init, exec, shortcut} = actions[actionType];
+  const action = init(state);
+  if (actionRef) {
+    actionRef.current = action;
+  }
+  const disabled = action === null;
+  const hint = shortcut && formatForDisplay(shortcut);
+  const onClick2 = onClick || (() => exec(dispatch, action));
   return (
-    <Menubar.RadioItem className="menubarItem inset"
-                       value={value}
-                       disabled={disabled}
-                       onSelect={onSelect}>
-      <Menubar.ItemIndicator className="menubarItemIndicator">
-        <DotFilledIcon/>
-      </Menubar.ItemIndicator>
+    <MenuItem disabled={disabled} hint={hint} onClick={onClick2}>
       {children}
-    </Menubar.RadioItem>
+    </MenuItem>
   );
 }
 
-export function MenubarRightSlot({children}) {
+export function MenuRadioGroup({value, onValueChange, children}) {
   return (
-    <div className="menubarRightSlot">
+    <BUIMenu.RadioGroup value={value} onValueChange={onValueChange}>
       {children}
-    </div>
+    </BUIMenu.RadioGroup>
   );
 }
 
-export function MenubarSeparator() {
+const StyledBUIMenuRadioItem = styled(BUIMenu.RadioItem)(({theme}) => ({
+  outline: 'none',
+  padding: '3px 5px',
+  backgroundColor: theme.palette.background,
+  color: theme.palette.onBackground,
+  '&[data-highlighted]': {
+    backgroundColor: theme.palette.highEmphasis,
+    color: theme.palette.onHighEmphasis
+  },
+  '&[data-disabled]': {
+    backgroundColor: theme.palette.background,
+    color: theme.palette.disabled
+  },
+  display: 'grid',
+  gridTemplateColumns: '16px 1fr',
+  gap: '5px'
+}));
+
+export function MenuRadioItem({disabled, value, children}) {
   return (
-    <Menubar.Separator className="menubarSeparator"/>
+    <StyledBUIMenuRadioItem disabled={disabled} value={value} closeOnClick={true}>
+      <BUIMenu.RadioItemIndicator sx={{gridColumnStart: 1}}>
+        <CheckIcon sx={{fontSize: '16px'}}/>
+      </BUIMenu.RadioItemIndicator>
+      <Box sx={{gridColumnStart: 2}}>
+        {children}
+      </Box>
+    </StyledBUIMenuRadioItem>
   );
 }
 
-/***********/
-/* Infobar */
-/***********/
-
-export function InfobarRoot({children}) {
+const StyledBUIMenuLinkItem = styled(BUIMenu.LinkItem)(({theme}) => ({
+  display: 'block',
+  outline: 'none',
+  padding: '3px 5px',
+  backgroundColor: theme.palette.background,
+  color: theme.palette.onBackground,
+  '&[data-highlighted]': {
+    backgroundColor: theme.palette.highEmphasis,
+    color: theme.palette.onHighEmphasis
+  },
+  textDecoration: 'none'
+}));
+
+export function MenuLinkItem({href, children}) {
   return (
-    <div className="infobarRoot">
+    <StyledBUIMenuLinkItem href={href} target="_blank" closeOnClick={true}>
       {children}
-    </div>
+    </StyledBUIMenuLinkItem>
   );
 }
 
-export function InfobarItem({children}) {
+const StyledBUIMenuSeparator = styled(BUIMenu.Separator)(({theme}) => ({
+  margin: '4px 0',
+  height: '1px',
+  backgroundColor: theme.palette.divider
+}));
+
+export function MenuSeparator() {
   return (
-    <div className="infobarItem">
-      {children}
-    </div>
+    <StyledBUIMenuSeparator/>
   );
 }
 
 /**********/
-/* Window */
+/* Dialog */
 /**********/
 
-export function TilingWindow({onFocus, sectionRectangle, position, children}) {
-  if (sectionRectangle === null) {
-    return null;
-  }
-  const style = position === null ? {display: 'none'} : windowRectangle(sectionRectangle, position);
+const StyledBUIDialogBackdrop = styled(BUIDialog.Backdrop)(({theme}) => ({
+  position: 'fixed',
+  inset: 0,
+  backgroundColor: theme.palette.scrim
+}));
+
+const StyledBUIDialogPopup = styled(BUIDialog.Popup)(({theme}) => ({
+  position: 'fixed',
+  top: '50%',
+  left: '50%',
+  transform: 'translate(-50%,-50%)',
+  padding: '1em',
+  backgroundColor: theme.palette.background,
+  color: theme.palette.onBackground
+}));
+
+export function Dialog({open, onOpenChange, initialFocus, children}) {
   return (
-    <div className="tilingWindow"
-         onFocus={onFocus}
-         style={style}>
-      {children}
-    </div>
+    <BUIDialog.Root open={open} onOpenChange={onOpenChange}>
+      <BUIDialog.Portal>
+        <StyledBUIDialogBackdrop/>
+        <StyledBUIDialogPopup initialFocus={initialFocus}>
+          {children}
+        </StyledBUIDialogPopup>
+      </BUIDialog.Portal>
+    </BUIDialog.Root>
   );
 }
 
-function windowRectangle(sectionRectangle, position) {
-  let top = 1; // top 1px border
-  let left = 0;
-  let width = sectionRectangle.width;
-  let height = sectionRectangle.height - 2; // top and bottom 1px border
-  for (const char of position) {
-    switch (char) {
-      case 'T':
-        height = (height - 1) / 2;
-        break;
-      case 'B':
-        top = top + (height - 1) / 2 + 1;
-        height = (height - 1) / 2;
-        break;
-      case 'L':
-        width = (width - 1) / 2;
-        break;
-      case 'R':
-        left = left + (width - 1) / 2 + 1;
-        width = (width - 1) / 2;
-        break;
-    }
-  }
-  return {top: top, left: left, width: width, height: height};
-}
-
-export function FillingWindow({onFocus, children}) {
+export function DialogTitle({children}) {
   return (
-    <div className="fillingWindow"
-         onFocus={onFocus}>
+    <BUIDialog.Title>
       {children}
-    </div>
+    </BUIDialog.Title>
   );
 }
 
-export function WindowToolbar({children}) {
+export function DialogDescription({children}) {
   return (
-    <div className="windowToolbar">
+    <BUIDialog.Description>
       {children}
-    </div>
+    </BUIDialog.Description>
   );
 }
 
-export function WindowContentsArea({children}) {
+export function DialogButtons({children}) {
   return (
-    <div className="windowContentsArea">
+    <Box
+      sx={{
+        display: 'flex',
+        flexDirection: 'row',
+        justifyContent: 'end',
+        gap: '10px'
+      }}
+    >
       {children}
-    </div>
+    </Box>
   );
 }
 
-export function WindowStatusbar({children}) {
+export function DialogButton({children, ...otherProps}) {
   return (
-    <div className="windowStatusbar">
+    <Button
+      {...otherProps}
+      sx={{
+        flex: '0 0 auto'
+      }}
+    >
       {children}
-    </div>
+    </Button>
   );
 }
 
 /***********/
-/* Toolbar */
+/* Infobar */
 /***********/
 
-export function ToolbarRoot({dataSelected, children}) {
-  return (
-    <Toolbar.Root className="toolbarRoot"
-                  data-selected={dataSelected}>
-      {children}
-    </Toolbar.Root>
-  );
-}
+const StyledInfobarRoot = styled('div')(({theme}) => ({
+  padding: '3px',
+  backgroundColor: theme.palette.barBackground,
+  display: 'flex',
+  flexDirection: 'row',
+  gap: '10px'
+}));
 
-export function ToolbarButton({onClick, children}) {
+export function Infobar({children}) {
   return (
-    <Toolbar.Button className="toolbarButton"
-                    onClick={onClick}>
+    <StyledInfobarRoot>
       {children}
-    </Toolbar.Button>
+    </StyledInfobarRoot>
   );
 }
 
-/****************/
-/* ContentsArea */
-/****************/
+const StyledInfobarItem = styled('div')(({theme}) => ({
+  flex: '0 0 auto',
+  padding: '0 5px',
+  backgroundColor: theme.palette.highEmphasis,
+  color: theme.palette.onHighEmphasis
+}));
 
-export function ContentsAreaRoot({children}) {
+export function InfobarItem({children}) {
   return (
-    <div className="contentsAreaRoot">
+    <StyledInfobarItem>
       {children}
-    </div>
+    </StyledInfobarItem>
   );
 }
 
@@ -282,76 +369,71 @@ export function ContentsAreaRoot({children}) {
 /* Statusbar */
 /*************/
 
-export function StatusbarRoot({dataSelected, children}) {
-  return (
-    <div className="statusbarRoot"
-         data-selected={dataSelected}>
-      {children}
-    </div>
-  );
-}
-
-/**********/
-/* Dialog */
-/**********/
+const StyledStatusbarRoot = styled('div')(({theme, selected}) => ({
+  padding: '3px 5px',
+  backgroundColor: selected ? theme.palette.highEmphasis : theme.palette.lowEmphasis,
+  color: selected ? theme.palette.onHighEmphasis : theme.palette.onLowEmphasis
+}));
 
-export function DialogButtons({children}) {
+export function Statusbar({selected, children}) {
   return (
-    <div className="dialogButtons">
+    <StyledStatusbarRoot selected={selected}>
       {children}
-    </div>
-  );
-}
-
-export function DialogButton({onClick, children}) {
-  return (
-    <Dialog.Close asChild>
-      <button className="dialogButton"
-              onClick={onClick}>
-        {children}
-      </button>
-    </Dialog.Close>
+    </StyledStatusbarRoot>
   );
 }
 
-export function DialogDefaultButton({onClick, children}) {
-  return (
-    <Dialog.Close asChild>
-      <button className="dialogButton default"
-              onClick={onClick}>
-        {children}
-      </button>
-    </Dialog.Close>
-  );
-}
-
-/*********/
-/* Blank */
-/*********/
-
-export function Blank({id}) {
-  return (
-    <div className="cm-outer-container">
-      <div className="cm-inner-container">
-        <div id={id}>
-        </div>
-      </div>
-    </div>
-  );
-}
-
-/**********/
-/* IFrame */
-/**********/
+/**************/
+/* HTMLViewer */
+/**************/
 
-export function IFrame({id, src}) {
+export function HTMLViewer({state, window}) {
+  const currentState = useEffectEvent(() => state);
+  const currentWindow = useEffectEvent(() => window);
+  useEffect(() => {
+    let ignore = false;
+    let urls = [];
+    function loadIframe() {
+      const state = currentState();
+      const window = currentWindow();
+      const buffer = state.buffers.get(window.bufferId);
+      buffer
+        .htmlContents(state, window.id)
+        .then(urls => {
+          if (!ignore) {
+            iframeRef.current.src = urls[0] + '#scrollintoview';
+          } else {
+            urls.map(URL.revokeObjectURL);
+          }
+        });
+    }
+    loadIframe();
+    return () => {
+      ignore = true;
+      urls.map(URL.revokeObjectURL);
+    };
+  }, []);
+  const colorScheme = state.colorScheme;
+  useEffect(() => {
+    const html = iframeRef.current.contentDocument.getElementsByTagName('html')[0];
+    html.className = colorScheme;
+  }, [colorScheme]);
+  const fontSize = state.fontSize;
+  useEffect(() => {
+    const html = iframeRef.current.contentDocument.getElementsByTagName('html')[0];
+    html.style.fontSize = fontSize;
+  }, [fontSize]);
+  const iframeRef = useRef();
   return (
-    <div className="cm-outer-container">
-      <div className="cm-inner-container">
-        <iframe id={id}
-                src={src}>
-        </iframe>
-      </div>
-    </div>
+    <Box
+      ref={iframeRef}
+      component="iframe"
+      id={'window' + window.id}
+      sx={{
+        border: 'none',
+        width: '100%',
+        height: '100%'
+      }}
+    />
   );
 }
index 5c1e01a74d70e986db3193f4f0144789a43bc5c2..39a3954abeadbd9c95a90e9549dc09f69b59d551 100644 (file)
@@ -2,7 +2,8 @@
 // SPDX-License-Identifier: BSD-3-Clause
 
 import {
-  htmlEscape
+  htmlEscape,
+  mapHTMLTags
 } from './utilities.js';
 
 const FOUND_NO_FORM = 0;
@@ -16,7 +17,7 @@ const EVALUATE_FIRST_FORM = 1;
 const EVALUATE_ALL_FORMS = 2;
 const CONVERT_EVL_TO_XML = 3;
 
-export const evaluatorNames = new Map([
+export const evaluators = new Map([
   ['directstyle', 'Direct Style'],
   ['cps', 'Continuation Passing Style'],
   ['oocps', 'Object-Oriented CPS'],
@@ -25,7 +26,7 @@ export const evaluatorNames = new Map([
   ['trampolinepp', 'Trampoline++']
 ]);
 
-let evaluator = null;
+let evaluator;
 let jobId = 0;
 const jobs = new Map();
 const abortSignalBuffer = new SharedArrayBuffer(1);
@@ -36,95 +37,107 @@ abortSignalArray[0] = 0;
 // => {id, action, input}
 // <= {id, status, output}
 
-function sendRequest(action, input, callback = null) {
-  const id = jobId++;
-  evaluator.postMessage({id: id, action: action, input: input});
-  if (callback !== null) {
-    jobs.set(id, callback);
-  }
+function sendRequest(action, input) {
+  return new Promise((resolve, rejected) => {
+    const id = jobId++;
+    jobs.set(id, resolve);
+    evaluator.postMessage({id: id, action: action, input: input});
+  });
 }
 
-export function createEvaluator(jsFile, selectedEvaluator, evlFiles, callback) {
-  if (evaluator !== null) {
+export function createEvaluator(coreFile, evlFiles, selectedEvaluator) {
+  if (evaluator) {
     evaluator.terminate();
   }
-  for (const [id, callback] of jobs) {
-    callback({id: id, status: TERMINATED});
+  for (const [id, resolve] of jobs) {
+    resolve({id: id, status: TERMINATED});
   }
   jobs.clear();
-  const blob = new Blob([jsFile], {type: 'text/javascript'});
+  const blob = new Blob([coreFile], {type: 'text/javascript'});
   const url = URL.createObjectURL(blob);
   evaluator = new Worker(url);
   URL.revokeObjectURL(url);
-  evaluator.onerror = (event) => {
-    console.log('ERROR CREATING EVALUATOR ' + event.lineno + ' ' + event.colno + ' ' + event.message);
-  }
-  evaluator.onmessage = (event) => {
-    const callback = jobs.get(event.data.id);
-    if (callback !== undefined) {
+  evaluator.onerror = event => {
+    //console.log(`ERROR CREATING EVALUATOR ${event.lineno} ${event.colno} ${event.message}`);
+  };
+  evaluator.onmessage = event => {
+    const resolve = jobs.get(event.data.id);
+    if (resolve) {
       jobs.delete(event.data.id);
-      callback(event.data);
+      resolve(event.data);
     }
-  }
-  sendRequest(INITIALIZE, {abortSignalBuffer, selectedEvaluator, evlFiles}, callback);
+  };
+  return sendRequest(INITIALIZE, {abortSignalBuffer, selectedEvaluator, evlFiles});
 }
 
-export function evaluateFirstForm(text, callback) {
-  sendRequest(EVALUATE_FIRST_FORM, text , callback);
+export function evaluateFirstForm(text) {
+  return sendRequest(EVALUATE_FIRST_FORM, text);
 }
 
-export function evaluateAllForms(text, callback) {
-  sendRequest(EVALUATE_ALL_FORMS, text, callback);
+export function evaluateAllForms(text) {
+  return sendRequest(EVALUATE_ALL_FORMS, text);
 }
 
-export function convertEVLToHTML(text, xsltString, cssURL, jsURL, windowId, callback) {
-  sendRequest(CONVERT_EVL_TO_XML, text, response => {
-    let result = null;
-    try {
-      switch (response.status) {
-        case SUCCESS:
-          const parser = new DOMParser();
-          const processor = new XSLTProcessor();
-          const serializer = new XMLSerializer();
-          const xsltDocument = parser.parseFromString(xsltString, 'application/xml');
-          processor.importStylesheet(xsltDocument);
-          processor.setParameter(null, 'cssURL', cssURL);
-          processor.setParameter(null, 'jsURL', jsURL);
-          processor.setParameter(null, 'windowId', windowId);
-          const xmlString = response.output;
-          const xmlDocument = parser.parseFromString(xmlString, 'application/xml');
-          const htmlDocument = processor.transformToDocument(xmlDocument);
-          const htmlString = serializer.serializeToString(htmlDocument);
-          //console.log(xmlString);
-          //console.log(htmlString);
-          result = htmlString;
-          break;
-        case ERROR:
-          result = errorPage(response.output, cssURL, jsURL, windowId);
-          break;
-        case ABORTED:
-          result = errorPage('ABORTED', cssURL, jsURL, windowId);
-          break;
-        case TERMINATED:
-          result = errorPage('TERMINATED', cssURL, jsURL, windowId);
-          break;
+export function convertEVLToHTML(text, savedAnchor, xslt, colorScheme, fontSize, cssURL, jsURL) {
+  return sendRequest(CONVERT_EVL_TO_XML, {text: text, anchor: savedAnchor})
+    .then(response => {
+      let result;
+      try {
+        switch (response.status) {
+          case SUCCESS:
+            const parser = new DOMParser();
+            const processor = new XSLTProcessor();
+            const serializer = new XMLSerializer();
+            processor.importStylesheet(parser.parseFromString(xslt, 'application/xml'));
+            processor.setParameter(null, 'colorScheme', colorScheme);
+            processor.setParameter(null, 'fontSize', fontSize);
+            processor.setParameter(null, 'cssURL', cssURL);
+            processor.setParameter(null, 'jsURL', jsURL);
+            let xmlContents = response.output.xmlContents;
+            if (savedAnchor !== undefined) {
+              const adjustedSavedAnchor = response.output.anchor;
+              let anchor;
+              mapHTMLTags(xmlContents, (stack, isStartTag, isEndTag, isEmptyElementTag, elementName, index) => {
+                if (stack.length !== 0 && ['chapter', 'section'].includes(stack[stack.length - 1]) && isStartTag && elementName !== 'title' && index <= adjustedSavedAnchor) {
+                  anchor = index;
+                }
+              });
+              if (anchor !== undefined) {
+                xmlContents = xmlContents.substring(0, anchor) + '<a id="scrollintoview"></a>' + xmlContents.substring(anchor);
+              }
+            }
+            const xmlDocument = parser.parseFromString(xmlContents, 'application/xml');
+            const htmlDocument = processor.transformToDocument(xmlDocument);
+            const htmlContents = serializer.serializeToString(htmlDocument);
+            //console.log(xmlContents);
+            //console.log(htmlContents);
+            result = htmlContents;
+            break;
+          case ERROR:
+            result = errorPage(response.output, colorScheme, fontSize, cssURL, jsURL);
+            break;
+          case ABORTED:
+            result = errorPage('ABORTED', colorScheme, fontSize, cssURL, jsURL);
+            break;
+          case TERMINATED:
+            result = errorPage('TERMINATED', colorScheme, fontSize, cssURL, jsURL);
+            break;
+        }
+      } catch(error) {
+        result = errorPage(error.message, colorScheme, fontSize, cssURL, jsURL);
       }
-    } catch(exception) {
-      result = errorPage(exception.message, cssURL, jsURL, windowId);
-    }
-    callback(result);
-  });
+      return result;
+    });
 }
 
-function errorPage(message, cssURL, jsURL, windowId) {
-  let html = ''
+function errorPage(message, colorScheme, fontSize, cssURL, jsURL) {
+  let html = '';
   html += '<!doctype html>';
-  html += '<html>';
+  html += `<html class="${colorScheme}" style="font-size: ${fontSize};">`;
   html += '<head>';
   html += '<meta charset="utf-8">';
   html += `<link rel="stylesheet" href="${cssURL}"/>`;
   html += `<script src="${jsURL}"></script>`;
-  html += `<script>const windowId = ${windowId};</script>`;
   html += '</head>';
   html += '<body>';
   html += `<p>${htmlEscape(message)}</p>`;
@@ -165,7 +178,7 @@ export function formatForMinibuffer(response) {
         } else {
           text = text + ', ';
         }
-        text = text + value.replaceAll('\n', '\u2424'); // SYMBOL FOR NEWLINE
+        text = text + value.replaceAll('\n', '\u2424'); // symbol for newline
       }
       return text;
     case ERROR:
index 4cc8214f63b65c2007b1650ec7b95f08a70da491..6c08fc5cdd904e766d6a3e3092176cbb040a2908 100644 (file)
@@ -6,6 +6,7 @@
     <meta charset="utf-8">
     <title>E/V Lambda</title>
     <meta name="author" content="Raphaël Van Dyck">
+    <meta name="viewport" content="width=device-width, initial-scale=1">
     <link rel="icon" type="image/png" href="/images/favicon.png">
   </head>
   <body>
index e168515e74d9fb045cc4fd16ae9968d8da52baf7..518fe0b9dc7f9f9352e40b9561b8382066c00481 100644 (file)
@@ -1,13 +1,12 @@
 // SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck
 // SPDX-License-Identifier: BSD-3-Clause
 
-import React from 'react';
-
 import {
-  useState,
-  useRef,
   useEffect,
-  useLayoutEffect
+  useMemo,
+  useReducer,
+  useRef,
+  useState
 } from 'react';
 
 import {
@@ -15,931 +14,748 @@ import {
 } from 'react-dom/client';
 
 import {
-  UAParser
-} from 'ua-parser-js';
-
-import JSZip from 'jszip';
-
-import {
-  TextButton,
-  FilledButton,
-  MenubarRoot,
-  MenubarMenu,
-  MenubarItem,
-  MenubarDialog,
-  MenubarRadioGroup,
-  MenubarRadioItem,
-  MenubarRightSlot,
-  MenubarSeparator,
-  InfobarRoot,
-  InfobarItem,
-  TilingWindow,
-  FillingWindow,
-  WindowToolbar,
-  WindowContentsArea,
-  WindowStatusbar,
-  ToolbarRoot,
-  ToolbarButton,
-  ContentsAreaRoot,
-  StatusbarRoot,
-  DialogButtons,
-  DialogButton,
-  DialogDefaultButton,
-  Blank,
-  IFrame
-} from './components.jsx';
-
-import {
-  CodeMirror,
-  Minibuffer,
-  createBufferTransaction,
-  transactionDebugInfo,
-  clearListener
-} from './codemirror.jsx';
+  useHotkeys,
+  getHotkeyManager,
+  areHotkeysEqual
+} from '@tanstack/react-hotkeys';
 
 import {
-  css
-} from '@codemirror/lang-css';
+  createTheme,
+  ThemeProvider,
+  GlobalStyles,
+  getContrastRatio
+} from '@mui/system';
 
 import {
-  evlambda,
-  findForm
-} from './lang-evlambda.js';
+  color as oneDarkColors
+} from '@codemirror/theme-one-dark';
 
 import {
-  html
-} from '@codemirror/lang-html';
+  default as Box
+} from '@mui/system/Box';
 
 import {
-  javascript
-} from '@codemirror/lang-javascript';
+  Menubar,
+  Menu,
+  MenuItem,
+  MenuActionItem,
+  MenuRadioGroup,
+  MenuRadioItem,
+  MenuLinkItem,
+  MenuSeparator,
+  Dialog,
+  DialogTitle,
+  DialogDescription,
+  DialogButtons,
+  DialogButton,
+  Infobar,
+  InfobarItem,
+  Statusbar,
+  HTMLViewer
+} from './components.jsx';
 
 import {
-  xml
-} from '@codemirror/lang-xml';
+  TextEditor,
+  Minibuffer
+} from './codemirror.jsx';
 
 import {
-  unifiedPathnamePathname,
-  getFileSystemCapabilities,
-  getFileContents,
-  putFileContents
-} from './ufs.js';
+  createInitialState,
+  actions,
+  reducer
+} from './state.js';
 
 import {
-  evaluatorNames,
-  createEvaluator,
-  evaluateFirstForm,
-  evaluateAllForms,
-  convertEVLToHTML,
-  formatForMinibuffer,
-  abortEvaluation
+  evaluators
 } from './evaluator.js';
 
 import {
-  copyInstance
+  copyInstance,
+  htmlEscape,
+  getLocalStorage
 } from './utilities.js';
 
-/*********************/
-/* Browser Detection */
-/*********************/
-
-const {os} = UAParser();
-
-/**********/
-/* Buffer */
-/**********/
-
-class Buffer {
-  static #id = 0;
-  constructor(contents, readOnlyAll, readOnlyEnd) {
-    this.id = Buffer.#id++;
-    this.transaction = createBufferTransaction(contents, readOnlyAll, readOnlyEnd);
-    this.lastSavedContents = this.transaction.state.doc;
-    this.modified = false;
-  }
-  contentsArea(ide, window) {
-    const id = contentsAreaId(window.id);
-    switch (window.displayMode) {
-      case DISPLAY_RAW:
-        return <CodeMirror id={id}
-                           ide={ide}
-                           window={window}
-                           buffer={this}/>;
-      case DISPLAY_PENDING:
-        return <Blank id={id}/>;
-      case DISPLAY_HTML:
-        return <IFrame id={id}
-                       src={window.htmlURL}/>;
-    }
-  }
-}
-
-function contentsAreaId(windowId) {
-  return 'contents_area_' + windowId;
-}
-
-export class FileBuffer extends Buffer {
-  constructor(unifiedPathname, contents) {
-    super(contents, undefined, undefined);
-    this.unifiedPathname = unifiedPathname;
-  }
-  static create(buffers, unifiedPathname, contents) {
-    let buffer = null;
-    if (/\/[A-Z-]+$/.test(unifiedPathname)) {
-      buffer = new AllCapsBuffer(unifiedPathname, contents);
-    } else {
-      const index = unifiedPathname.lastIndexOf('.');
-      if (index !== -1) {
-        const extension  = unifiedPathname.substring(index + 1);
-        switch (extension) {
-          case 'css':
-            buffer = new CSSBuffer(unifiedPathname, contents);
-            break;
-          case 'evl':
-            buffer = new EVLBuffer(unifiedPathname, contents);
-            break;
-          case 'js':
-            buffer = new JSBuffer(unifiedPathname, contents);
-            break;
-          case 'xslt':
-            buffer = new XSLTBuffer(unifiedPathname, contents);
-            break;
-        }
-      }
-    }
-    if (buffer === null) {
-      throw new Error('Unknown file type.');
-    }
-    buffers.set(buffer.id, buffer);
-    return buffer;
-  }
-  toolbar(ide, window) {
-    //return <FakeWindowToolbar ide={ide} window={window}/>;
-    return null;
-  }
-  bufferMenuEntry() {
-    return this.unifiedPathname + (this.modified ? '*' : '');
-  }
-  statusMessage() {
-    //return `${this.unifiedPathname + (this.modified ? '*' : '')} [${transactionDebugInfo(this.transaction)}]`;
-    return `${this.unifiedPathname + (this.modified ? '*' : '')}`;
-  }
-}
-
-class AllCapsBuffer extends FileBuffer {
-  language() {
-    return html();
-  }
-  toggleOnHTMLMode(ide, window) {
-    const css = findFileBuffer(ide.buffers, '/system/common.css').transaction.state.sliceDoc();
-    const cssBlob = new Blob([css], {type: 'text/css'});
-    const cssURL = URL.createObjectURL(cssBlob);
-    const js = findFileBuffer(ide.buffers, '/system/common.js').transaction.state.sliceDoc();
-    const jsBlob = new Blob([js], {type: 'text/javascript'});
-    const jsURL = URL.createObjectURL(jsBlob);
-    const state = this.transaction.state;
-    const text = state.sliceDoc();
-    let html = text;
-    html = html.replaceAll('___cssURL___', cssURL);
-    html = html.replaceAll('___jsURL___', jsURL);
-    html = html.replaceAll('___windowId___', window.id);
-    setTimeout(() => toggleHTMLModeCommand2(ide, window, html, cssURL, jsURL));
-  }
-}
-
-class CSSBuffer extends FileBuffer {
-  language() {
-    return css();
-  }
-}
-
-class EVLBuffer extends FileBuffer {
-  language() {
-    return evlambda();
-  }
-  toggleOnHTMLMode(ide, window) {
-    const xslt = findFileBuffer(ide.buffers, '/system/evl2html.xslt').transaction.state.sliceDoc();
-    const css = findFileBuffer(ide.buffers, '/system/common.css').transaction.state.sliceDoc();
-    const cssBlob = new Blob([css], {type: 'text/css'});
-    const cssURL = URL.createObjectURL(cssBlob);
-    const js = findFileBuffer(ide.buffers, '/system/common.js').transaction.state.sliceDoc();
-    const jsBlob = new Blob([js], {type: 'text/javascript'});
-    const jsURL = URL.createObjectURL(jsBlob);
-    const state = this.transaction.state;
-    const text = state.sliceDoc();
-    convertEVLToHTML(text, xslt, cssURL, jsURL, window.id, html  => toggleHTMLModeCommand2(ide, window, html, cssURL, jsURL));
-  }
-}
+/************/
+/* Palettes */
+/************/
 
-class JSBuffer extends FileBuffer {
-  language() {
-    return javascript();
-  }
-}
+const lightPalette = {
+  background: 'hsl(0, 0%, 100%)',
+  onBackground: 'hsl(0, 0%, 0%)',
+  barBackground: 'hsl(0, 0%, 95%)',
+  onBarBackground: 'hsl(0, 0%, 0%)',
+  lowEmphasis: 'hsl(0, 0%, 90%)',
+  onLowEmphasis: 'hsl(0, 0%, 0%)',
+  mediumEmphasis: 'hsl(0, 0%, 85%)',
+  onMediumEmphasis: 'hsl(0, 0%, 0%)',
+  highEmphasis: 'hsl(0, 0%, 80%)',
+  onHighEmphasis: 'hsl(0, 0%, 0%)',
+  disabled: 'rgba(0, 0, 0, 0.38)',
+  border: 'hsl(0, 0%, 0%)',
+  divider:  'hsl(0, 0%, 0%)',
+  scrim: 'rgba(0, 0, 0, 0.2)',
+  focus: 'blue'
+};
+
+// https://github.com/codemirror/theme-one-dark/blob/main/src/one-dark.ts
+const darkPalette = {
+  background: 'hsl(220, 13%, 18%)', // oneDarkColors.background = #282C34 = hsl(220, 13%, 18%)
+  onBackground: 'hsl(219, 14%, 71%)', // oneDarkColors.ivory = #ABB2BF = hsl(219, 14%, 71%)
+  barBackground: 'hsl(220, 13%, 25%)',
+  onBarBackground: 'hsl(219, 14%, 67%)',
+  lowEmphasis: 'hsl(220, 13%, 30%)',
+  onLowEmphasis: 'hsl(219, 14%, 73%)',
+  mediumEmphasis: 'hsl(220, 13%, 35%)',
+  onMediumEmphasis: 'hsl(219, 14%, 80%)',
+  highEmphasis: 'hsl(220, 13%, 40%)',
+  onHighEmphasis: 'hsl(219, 14%, 88%)',
+  disabled: 'rgba(255, 255, 255, 0.38)',
+  border: 'hsl(219, 14%, 71%)',
+  divider: 'hsl(219, 14%, 71%)',
+  scrim: 'rgba(255, 255, 255, 0.2)',
+  focus: oneDarkColors.cursor
+};
 
-class XSLTBuffer extends FileBuffer {
-  language() {
-    return xml();
-  }
-}
+/******************/
+/* ActiveElements */
+/******************/
 
-function findFileBuffer(buffers, unifiedPathname) {
-  for (const buffer of buffers.values()) {
-    if (buffer instanceof FileBuffer && buffer.unifiedPathname === unifiedPathname) {
-      return buffer;
-    }
+function activeElements() {
+  const activeElements = {
+    main: document.activeElement
+  };
+  const frames = window.frames;
+  for (let i = 0; i < frames.length; i++) {
+    const frame = frames[i];
+    activeElements[frame.frameElement.id] = frame.document.activeElement;
   }
-  return null;
-}
-
-function isFileBuffer(buffer) {
-  return buffer instanceof FileBuffer;
+  return activeElements;
 }
 
-function isAllCapsBuffer(buffer) {
-  return buffer instanceof AllCapsBuffer;
-}
-
-function isCSSBuffer(buffer) {
-  return buffer instanceof CSSBuffer;
-}
-
-function isEVLBuffer(buffer) {
-  return buffer instanceof EVLBuffer;
-}
+//document.activeElements = activeElements;
 
-function isJSBuffer(buffer) {
-  return buffer instanceof JSBuffer;
-}
-
-function isXSLTBuffer(buffer) {
-  return buffer instanceof XSLTBuffer;
-}
+/*******/
+/* IDE */
+/*******/
 
-export class ListenerBuffer extends Buffer {
-  constructor(name) {
-    let text = '';
-    text += '"Welcome aboard EVLambda."\n';
-    text += '"EVLambda is provided \'as is\' and without any warranties."\n';
-    text += '"See LICENSE and Terms of Service for details."\n';
-    text += '\n';
-    text += '> ';
-    super(text, undefined, text.length);
-    this.name = name;
-  }
-  static create(buffers, name) {
-    const buffer = new ListenerBuffer(name);
-    buffers.set(buffer.id, buffer);
-    return buffer;
-  }
-  toolbar(ide, window) {
-    //return <FakeWindowToolbar ide={ide} window={window}/>;
-    return null;
-  }
-  bufferMenuEntry() {
-    return this.name;
-  }
-  statusMessage() {
-    //return `${this.name} [${transactionDebugInfo(this.transaction)}]`;
-    return `${this.name}`;
-  }
-  language() {
-    return evlambda();
-  }
+const lineHeight = 1.4;
+const minibufferMaxLines = 3;
+
+function IDE({initialLightPalette, initialDarkPalette, initialState}) {
+  //console.log(`${Date.now()} IDE`);
+  const [lightPalette, setLightPalette] = useState(initialLightPalette);
+  const lightTheme = useMemo(() => createTheme({palette: lightPalette}), [lightPalette]);
+  const [darkPalette, setDarkPalette] = useState(initialDarkPalette);
+  const darkTheme = useMemo(() => createTheme({palette: darkPalette}), [darkPalette]);
+  const [state, dispatch] = useReducer(reducer, initialState);
+  useShortcuts(state, dispatch);
+  useIframeKeydown();
+  useSelectWindow(dispatch);
+  useBeforeUnload();
+  useFocusedWindowId(state);
+  useNeedTrimming(state, dispatch);
+  useSettings(state);
+  return (
+    <ThemeProvider theme={state.colorScheme === 'light' ? lightTheme : darkTheme}>
+      <GlobalStyles
+        styles={theme => ({
+          body: {
+            scrollbarColor: `${theme.palette.highEmphasis} ${theme.palette.barBackground}`,
+            fontFamily: 'Arial, sans-serif',
+            fontSize: `${state.fontSize}`,
+            lineHeight: lineHeight,
+            margin: 0,
+            padding: 0
+          },
+          '*': {
+            userSelect: 'none'
+          },
+          button: {
+            all: 'unset'
+          },
+          ':focus': {
+            outline: `2px solid ${theme.palette.focus}`
+          },
+          '.cm-scroller:focus': {
+            outline: 'none'
+          },
+          '.cm-editor.cm-focused': {
+            outline: `1px dotted ${theme.palette.onBackground}`
+          },
+          '.cm-editor': {
+            height: '100%'
+          },
+          '#minibuffer .cm-editor': {
+            maxHeight: `${minibufferMaxLines * Math.ceil(parseInt(state.fontSize) * lineHeight) + 2 * 4}px`
+          },
+          '.cm-panels': {
+            zIndex: '0 !important'
+          }
+        })}
+      />
+      <Box
+        sx={{
+          width: '100vw',
+          height: '100vh',
+          display: 'flex',
+          flexDirection: 'row'
+        }}
+      >
+        <Box
+          sx={{
+            flex: '1 0 auto',
+            display: 'flex',
+            flexDirection: 'column'
+          }}
+        >
+          <TopArea state={state} dispatch={dispatch}/>
+          <MainArea state={state} dispatch={dispatch}/>
+          <BottomArea state={state}/>
+        </Box>
+        <PaletteBuilder lightPalette={lightPalette} setLightPalette={setLightPalette} darkPalette={darkPalette} setDarkPalette={setDarkPalette} colorScheme={state.colorScheme}/>
+      </Box>
+    </ThemeProvider>
+  );
 }
 
-function findListenerBuffer(buffers, name) {
-  for (const buffer of buffers.values()) {
-    if (buffer instanceof ListenerBuffer && buffer.name === name) {
-      return buffer;
+function useShortcuts(state, dispatch) {
+  const hotkeys = [];
+  for (const {init, exec, shortcut} of Object.values(actions)) {
+    if (shortcut) {
+      const action = init(state);
+      hotkeys.push({
+        hotkey: shortcut,
+        callback: () => exec(dispatch, action),
+        options: {enabled: action !== null, preventDefault: 'always'}
+      });
     }
   }
-  return null;
-}
-
-function isListenerBuffer(buffer) {
-  return buffer instanceof ListenerBuffer;
-}
-
-/**********/
-/* Window */
-/**********/
-
-const DISPLAY_RAW = 0;
-const DISPLAY_PENDING = 1;
-const DISPLAY_HTML = 2;
-
-function defaultDisplayMode(buffer) {
-  if (isAllCapsBuffer(buffer) || isEVLBuffer(buffer)) {
-    return DISPLAY_PENDING;
-  } else {
-    return DISPLAY_RAW;
-  }
-}
-
-class Window {
-  static #id = 0;
-  constructor(position) {
-    this.id = Window.#id++;
-    this.position = position;
-    this.anchors = new Map();
-  }
-  static create(windows, position, buffer) {
-    const window = new Window(position);
-    window.bufferId = buffer.id;
-    window.displayMode = defaultDisplayMode(buffer);
-    window.htmlURL = null;
-    window.cssURL = null;
-    window.jsURL = null;
-    windows.set(window.id, window);
-    return window;
-  }
-}
-
-function setWindowBuffer(ide, window, buffer) {
-  if (window.displayMode === DISPLAY_HTML) {
-    URL.revokeObjectURL(window.htmlURL);
-    URL.revokeObjectURL(window.cssURL);
-    URL.revokeObjectURL(window.jsURL);
-  }
-  const displayMode = defaultDisplayMode(buffer);
-  const newWindows = new Map(ide.windows);
-  newWindows.set(window.id, copyInstance(window, {
-    bufferId: buffer.id,
-    displayMode: displayMode,
-    htmlURL: null,
-    cssURL: null,
-    jsURL: null
-  }));
-  ide.setWindows(newWindows);
-  if (displayMode === DISPLAY_PENDING) {
-    buffer.toggleOnHTMLMode(ide, window);
-  }
+  useHotkeys(hotkeys);
 }
 
-/*******/
-/* IDE */
-/*******/
-
-function IDE({initialBuffers, initialWindows}) {
-  const [windowSize, setWindowSize] = useState(0);
-  const [keymap, setKeymap] = useState(rootKeymap);
-  const [buffers, setBuffers] = useState(initialBuffers);
-  const [windows, setWindows] = useState(initialWindows);
-  const [menubarOpenMenu, setMenubarOpenMenu] = useState(null);
-  const [selectedWindowId, setSelectedWindowId] = useState(0);
-  const [maximizedWindowId, setMaximizedWindowId] = useState(null);
-  const [selectedEvaluator, setSelectedEvaluator] = useState('trampolinepp');
-  const [minibufferMessage, setMinibufferMessage] = useState('');
-  const ide = {
-    windowSize, setWindowSize,
-    keymap, setKeymap,
-    buffers, setBuffers,
-    windows, setWindows,
-    menubarOpenMenu, setMenubarOpenMenu,
-    selectedWindowId, setSelectedWindowId,
-    maximizedWindowId, setMaximizedWindowId,
-    selectedEvaluator, setSelectedEvaluator,
-    minibufferMessage, setMinibufferMessage
-  };
+function useIframeKeydown() {
   useEffect(() => {
-    startEvaluator(ide, selectedEvaluator);
-    Array.from(ide.windows.values()).map(window => {
-      if (window.displayMode === DISPLAY_PENDING) {
-        const buffer = ide.buffers.get(window.bufferId);
-        buffer.toggleOnHTMLMode(ide, window);
+    function handleIframeKeydown(event) {
+      const iframeEvent = event.detail;
+      const key = iframeEvent.key;
+      const ctrl = iframeEvent.ctrlKey;
+      const shift = iframeEvent.shiftKey;
+      const alt = iframeEvent.altKey;
+      const meta = iframeEvent.metaKey;
+      const hotkey = {key, ctrl, shift, alt, meta};
+      const hotkeyManager = getHotkeyManager();
+      for (const [id, registration] of hotkeyManager.registrations.state) {
+        if (areHotkeysEqual(registration.hotkey, hotkey)) {
+          if (registration.options.enabled) {
+            registration.callback();
+          }
+          break;
+        }
       }
-    });
-    focusSelectedWindow(ide, true);
-  }, []); // eslint-disable-line react-hooks/exhaustive-deps
-  useEffect(() => {
-    const handler = event => handleResize(ide, event);
-    window.addEventListener('resize', handler);
-    return () => window.removeEventListener('resize', handler);
-  });
-  useEffect(() => {
-    const handler = event => handleKeyDown(ide, event);
-    window.addEventListener('keydown', handler, {capture: true});
-    return () => window.removeEventListener('keydown', handler, {capture: true});
-  });
-  useEffect(() => {
-    const handler = event => handleIframeFocus(ide, event);
-    window.addEventListener('iframeFocus', handler);
-    return () => window.removeEventListener('iframeFocus', handler);
-  });
-  useEffect(() => {
-    const handler = event => handleIframeKeyDown(ide, event);
-    window.addEventListener('iframeKeyDown', handler);
-    return () => window.removeEventListener('iframeKeyDown', handler);
-  });
-  return (
-    <div id="wrapper">
-      <header>
-        <Menubar ide={ide}/>
-        <Infobar ide={ide}/>
-      </header>
-      <Section ide={ide}/>
-      <footer>
-        <MinibufferWindow ide={ide}/>
-      </footer>
-    </div>
-  );
+    }
+    window.addEventListener('iframeKeydown', handleIframeKeydown);
+    return () => window.removeEventListener('iframeKeydown', handleIframeKeydown);
+  }, []);
 }
 
-function selectedWindowAndBuffer(ide) {
-  const selectedWindow = ide.windows.get(ide.selectedWindowId);
-  const selectedBuffer = ide.buffers.get(selectedWindow.bufferId);
-  return {
-    selectedWindow: selectedWindow,
-    selectedBuffer: selectedBuffer,
-    isFileBuffer: isFileBuffer(selectedBuffer),
-    isAllCapsBuffer: isAllCapsBuffer(selectedBuffer),
-    isCSSBuffer: isCSSBuffer(selectedBuffer),
-    isEVLBuffer: isEVLBuffer(selectedBuffer),
-    isJSBuffer: isJSBuffer(selectedBuffer),
-    isXSLTBuffer: isXSLTBuffer(selectedBuffer),
-    isListenerBuffer: isListenerBuffer(selectedBuffer)
-  };
+function useSelectWindow(dispatch) {
+  useEffect(() => {
+    function handleSelectWindow(event) {
+      dispatch({type: 'selectWindow', windowId: event.detail.windowId, focus: event.detail.focus});
+    }
+    window.addEventListener('selectWindow', handleSelectWindow);
+    return () => window.removeEventListener('selectWindow', handleSelectWindow);
+  }, [dispatch]);
 }
 
-function closeMenubar (ide) {
-  ide.setMenubarOpenMenu(null);
+function useBeforeUnload() {
+  useEffect(() => {
+    function handleBeforeUnload(event) {
+      event.preventDefault();
+      event.returnValue = true;
+    }
+    window.addEventListener('beforeunload', handleBeforeUnload);
+    return () => window.removeEventListener('beforeunload', handleBeforeUnload);
+  }, []);
 }
 
-function focusSelectedWindow(ide, delayed = false) {
-  function focusElement() {
-    const element = document.getElementById(contentsAreaId(ide.selectedWindowId));
-    if (element !== null) {
+function useFocusedWindowId(state) {
+  const focusedWindowId = state.focusedWindowId;
+  useEffect(() => {
+    const element = document.getElementById('window' + focusedWindowId[0]);
+    if (element) {
       element.focus();
     }
-  };
-  if (delayed) {
-    setTimeout(() => focusElement(), 50);
-  } else {
-    focusElement();
-  }
+  }, [focusedWindowId]);
 }
 
-/*******************/
-/* Events Handlers */
-/*******************/
-
-function handleBeforeUnload(event) {
-  event.preventDefault();
-  return (event.returnValue = '');
-}
-
-window.addEventListener('beforeunload', handleBeforeUnload);
-
-function handleResize(ide, event) {
-  ide.setWindowSize(n => n + 1);
+function useNeedTrimming(state, dispatch) {
+  const needTrimming = state.needTrimming;
+  useEffect(() => {
+    dispatch({type: 'trimBufferTransactions'});
+  }, [dispatch, needTrimming]);
 }
 
-const rootKeymap = new Map();
-
-function bindKeySeq(keySeq, command) {
-  const keySeqArray = keySeq.split(' ');
-  const keySeqLength = keySeqArray.length;
-  let keymap = rootKeymap;
-  for (let i = 0; i < keySeqLength; i++) {
-    let keyEventString = keySeqArray[i];
-    let keyEvent = 0;
-    while (true) {
-      if (keyEventString.startsWith('Alt-')) {
-        keyEventString = keyEventString.substring(4);
-        keyEvent = keyEvent + 1;
-      } else if (keyEventString.startsWith('Ctrl-')) {
-        keyEventString = keyEventString.substring(5);
-        keyEvent = keyEvent + 2;
-      } else if (keyEventString.startsWith('Meta-')) {
-        keyEventString = keyEventString.substring(5);
-        keyEvent = keyEvent + 4;
-      } else if (keyEventString.startsWith('Shift-')) {
-        keyEventString = keyEventString.substring(6);
-        keyEvent = keyEvent + 8;
-      } else {
-        keyEvent = keyEvent + keyEventString.charCodeAt(0) * 16;
-        break;
-      }
-    }
-    if (i === keySeqLength - 1) {
-      keymap.set(keyEvent, command);
-    } else {
-      if (keymap.has(keyEvent)) {
-        const prefixKeymap = keymap.get(keyEvent);
-        keymap = prefixKeymap;
-      } else {
-        const prefixKeymap = new Map();
-        keymap.set(keyEvent, prefixKeymap);
-        keymap = prefixKeymap;
+function useSettings(state) {
+  const colorScheme = state.colorScheme;
+  const fontSize = state.fontSize;
+  useEffect(() => {
+    const storage = getLocalStorage();
+    if (storage) {
+      const settings = {colorScheme, fontSize};
+      try {
+        storage.setItem('org.evlambda.ide.settings', JSON.stringify(settings));
+      } catch(error) {
+        // QuotaExceededError
       }
     }
-  }
+  }, [colorScheme, fontSize]);
 }
 
-const saveBufferKeySeq = os.name === 'Mac OS' ? 'Meta-s' : 'Ctrl-s';
-bindKeySeq(saveBufferKeySeq, ide => {
-  const {selectedBuffer, isFileBuffer} = selectedWindowAndBuffer(ide);
-  if (fileSystemIsWritable && isFileBuffer) {
-    saveBufferCommand(ide, selectedBuffer);
-  }
-});
-
-const toggleHTMLModeKeySeq = os.name === 'Mac OS' ? 'Ctrl-Meta-h' : 'Ctrl-Alt-h';
-bindKeySeq(toggleHTMLModeKeySeq, ide => {
-  const {selectedWindow, selectedBuffer, isAllCapsBuffer, isEVLBuffer} = selectedWindowAndBuffer(ide);
-  if (isAllCapsBuffer || isEVLBuffer) {
-    toggleHTMLModeCommand(ide, selectedWindow, selectedBuffer)
-  }
-});
-
-const evaluateFormKeySeq = os.name === 'Mac OS' ? 'Ctrl-Meta-e' : 'Ctrl-Alt-e';
-bindKeySeq(evaluateFormKeySeq, ide => {
-  const {selectedWindow, isEVLBuffer} = selectedWindowAndBuffer(ide);
-  if (isEVLBuffer) {
-    evaluateFormCommand(ide, selectedWindow);
-  }
-});
+/******************/
+/* PaletteBuilder */
+/******************/
 
-const loadBufferKeySeq = os.name === 'Mac OS' ? 'Ctrl-Meta-l' : 'Ctrl-Alt-l';
-bindKeySeq(loadBufferKeySeq, ide => {
-  const {selectedBuffer, isEVLBuffer} = selectedWindowAndBuffer(ide);
-  if (isEVLBuffer) {
-    loadBufferCommand(ide, selectedBuffer);
-  }
-});
+function PaletteBuilder({lightPalette, setLightPalette, darkPalette, setDarkPalette, colorScheme}) {
+  return null;
+  const palette = colorScheme === 'light' ? lightPalette : darkPalette;
+  const setPalette = colorScheme === 'light' ? setLightPalette : setDarkPalette;
+  return (
+    <Box
+      sx={{
+        flex: '0 0 auto',
+        backgroundColor: palette.lowEmphasis,
+        color: palette.onLowEmphasis
+      }}
+    >
+      <Box sx={{
+        padding: '5px',
+        display: 'grid',
+        gridTemplateColumns: 'auto auto auto auto',
+        alignItems: 'baseline'
+      }}
+      >
+        <ColorLightness color="background" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="onBackground" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="barBackground" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="onBarBackground" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="lowEmphasis" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="onLowEmphasis" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="mediumEmphasis" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="onMediumEmphasis" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="highEmphasis" palette={palette} setPalette={setPalette}/>
+        <ColorLightness color="onHighEmphasis" palette={palette} setPalette={setPalette}/>
+      </Box>
+      <Swatch color={palette.background} onColor={palette.onBackground}/>
+      <Swatch color={palette.barBackground} onColor={palette.onBarBackground}/>
+      <Swatch color={palette.lowEmphasis} onColor={palette.onLowEmphasis}/>
+      <Swatch color={palette.mediumEmphasis} onColor={palette.onMediumEmphasis}/>
+      <Swatch color={palette.highEmphasis} onColor={palette.onHighEmphasis}/>
+    </Box>
+  );
+}
 
-const selectOtherWindowKeySeq = os.name === 'Mac OS' ? 'Ctrl-Meta-o' : 'Ctrl-Alt-o';
-bindKeySeq(selectOtherWindowKeySeq, ide => {
-  const selectedWindow = ide.windows.get(ide.selectedWindowId);
-  if (ide.maximizedWindowId === null) {
-    selectOtherWindowCommand(ide, selectedWindow);
-  }
-});
-
-const toggleMaximizedStateKeySeq = os.name === 'Mac OS' ? 'Ctrl-Meta-m' : 'Ctrl-Alt-m';
-bindKeySeq(toggleMaximizedStateKeySeq, ide => {
-  const selectedWindow = ide.windows.get(ide.selectedWindowId);
-  toggleMaximizedStateCommand(ide, selectedWindow);
-});
-
-function handleKeyDown(ide, event) {
-  if (sharedHandleKeyDown(ide, event.key, event.altKey, event.ctrlKey, event.metaKey, event.shiftKey)) {
-    event.stopPropagation();
-    event.preventDefault();
-  }
+function parseHSL(hsl) {
+  const result = hsl.match(/^hsl\((\d+), (\d+)%, (\d+)%\)$/);
+  return {h: result[1], s: result[2], l: result[3]};
 }
 
-function sharedHandleKeyDown(ide, key, altKey, ctrlKey, metaKey, shiftKey) {
-  const keymap = ide.keymap;
-  let keyEvent = null;
-  if (key.length === 1) {
-    keyEvent = 0;
-    if (altKey) {
-      keyEvent = keyEvent + 1;
-    }
-    if (ctrlKey) {
-      keyEvent = keyEvent + 2;
-    }
-    if (metaKey) {
-      keyEvent = keyEvent + 4;
-    }
-    if (shiftKey) {
-      keyEvent = keyEvent + 8;
-    }
-    keyEvent = keyEvent + key.charCodeAt(0) * 16;
-  }
-  if (keyEvent !== null) {
-    const prefixKeymapOrCommand = keymap.get(keyEvent);
-    if (prefixKeymapOrCommand instanceof Map) {
-      ide.setKeymap(prefixKeymapOrCommand);
-      return true;
-    } else if (prefixKeymapOrCommand instanceof Function) {
-      ide.setKeymap(rootKeymap);
-      prefixKeymapOrCommand(ide);
-      return true;
-    } else if (keymap !== rootKeymap) {
-      ide.setKeymap(rootKeymap);
-      return true;
-    } else {
-      return false;
-    }
-  } else {
-    return false;
-  }
+function formatHSL(h, s, l) {
+  return `hsl(${h}, ${s}%, ${l}%)`;
 }
 
-function handleIframeFocus(ide, event) {
-  const windowId = event.detail;
-  if (ide.windows.has(windowId)) {
-    ide.setSelectedWindowId(windowId);
+function ColorLightness({color, palette, setPalette}) {
+  const hsl = parseHSL(palette[color]);
+  function onChange(event) {
+    setPalette(copyInstance(palette, {
+      [color]: formatHSL(hsl.h, hsl.s, event.target.value)
+    }));
   }
+  return (
+    <>
+      <label htmlFor={color + '.l'}>{color}:&nbsp;</label>
+      <Box component="input" type="number" id={color + '.h'} min="0" max="100" value={hsl.h} disabled={true} sx={{width: '50px'}}/>
+      <Box component="input" type="number" id={color + '.s'} min="0" max="100" value={hsl.s} disabled={true} sx={{width: '50px'}}/>
+      <Box component="input" type="number" id={color + '.l'} min="0" max="100" value={hsl.l} onChange={onChange} sx={{width: '50px'}}/>
+    </>
+  );
 }
 
-function handleIframeKeyDown(ide, event) {
-  const iframeEvent = event.detail;
-  sharedHandleKeyDown(ide, iframeEvent.key, iframeEvent.altKey, iframeEvent.ctrlKey, iframeEvent.metaKey, iframeEvent.shiftKey);
+function Swatch({color, onColor}) {
+  return (
+    <Box sx={{padding: '5px', height: '50px', backgroundColor: color, color: onColor}}>
+      asdf asdf asdf {getContrastRatio(color, onColor)}
+    </Box>
+  );
 }
 
 /***********/
-/* Menubar */
+/* TopArea */
 /***********/
 
-function Menubar({ide}) {
+function TopArea({state, dispatch}) {
   return (
-    <MenubarRoot value={ide.menubarOpenMenu}
-                 onValueChange={ide.setMenubarOpenMenu}>
-      <FileMenu ide={ide}/>
-      <EditMenu ide={ide}/>
-      <EvalMenu ide={ide}/>
-      <ViewMenu ide={ide}/>
-      <BufferMenu ide={ide}/>
-      <HelpMenu ide={ide}/>
-    </MenubarRoot>
+    <Box
+      sx={{
+        flex: '0 0 auto',
+        backgroundColor: 'barBackground',
+        display: 'flex',
+        flexDirection: 'row',
+        justifyContent: 'space-between'
+      }}
+    >
+      <IDEMenubar state={state} dispatch={dispatch}/>
+      <IDEInfobar state={state}/>
+    </Box>
   );
 }
 
-/************/
-/* FileMenu */
-/************/
+/**************/
+/* IDEMenubar */
+/**************/
 
-function FileMenu({ide}) {
-  const [revertBufferMenubarDialogOpen, setRevertBufferMenubarDialogOpen] = useState(false);
-  const {selectedBuffer, isFileBuffer} = selectedWindowAndBuffer(ide);
+function IDEMenubar({state, dispatch}) {
   return (
-    <MenubarMenu trigger="File"
-                 hidden={revertBufferMenubarDialogOpen}>
-      <MenubarItem disabled={!fileSystemIsWritable || !isFileBuffer}
-                   onSelect={() => saveBufferCommand(ide, selectedBuffer)}>
-        Save Buffer
-        <MenubarRightSlot>{saveBufferKeySeq}</MenubarRightSlot>
-      </MenubarItem>
-      <MenubarDialog open={revertBufferMenubarDialogOpen}
-                     onOpenChange={setRevertBufferMenubarDialogOpen}
-                     disabled={!isFileBuffer}
-                     onClose={() => {closeMenubar(ide); focusSelectedWindow(ide);}}
-                     title="Revert Buffer...">
-        <p>
-          Revert '{selectedBuffer.unifiedPathname}'?
-        </p>
-        <DialogButtons>
-          <DialogDefaultButton onClick={() => {closeMenubar(ide); focusSelectedWindow(ide);}}>
-            Cancel
-          </DialogDefaultButton>
-          <DialogButton onClick={() => revertBufferCommand(ide, selectedBuffer)}>
-            Revert
-          </DialogButton>
-        </DialogButtons>
-      </MenubarDialog>
-    </MenubarMenu>
+    <Box
+      sx={{
+        flex: '0 0 auto'
+      }}
+    >
+      <Menubar>
+        <FileMenu state={state} dispatch={dispatch}/>
+        <EditMenu state={state} dispatch={dispatch}/>
+        <EvalMenu state={state} dispatch={dispatch}/>
+        <ViewMenu state={state} dispatch={dispatch}/>
+        <BufferMenu state={state} dispatch={dispatch}/>
+        <HelpMenu state={state}/>
+      </Menubar>
+    </Box>
   );
 }
 
-function saveBufferCommand(ide, buffer) {
-  const unifiedPathname = buffer.unifiedPathname;
-  const contents = buffer.transaction.state.doc;
-  putFileContents(unifiedPathname,
-                  contents.toString(),
-                  () => onSaveBufferSuccess(ide, buffer, contents),
-                  errorMessage => onSaveBufferFailure(ide, errorMessage));
-  focusSelectedWindow(ide);
+function RadioGroup({name, values, valueToLabel, selectedValue, setSelectedValue}) {
+  return (
+    <Box
+      component="ul"
+      sx={{
+        listStyleType: 'none',
+        margin: '1em 0',
+        padding: 0
+      }}
+    >
+      {values.map(value =>
+        <li key={value}>
+          <label>
+            <Box
+              component="input"
+              type="radio"
+              name={name}
+              value={value}
+              checked={value === selectedValue}
+              onChange={() => setSelectedValue(value)}
+              sx={{
+                marginRight: '10px'
+              }}
+            />
+            {valueToLabel(value)}
+          </label>
+        </li>
+      )}
+    </Box>
+  );
 }
 
-function onSaveBufferSuccess(staleIde, staleBuffer, contents) {
-  staleIde.setBuffers(buffers => {
-    const buffer = buffers.get(staleBuffer.id);
-    const newBuffers = new Map(buffers);
-    newBuffers.set(buffer.id, copyInstance(buffer, {
-      lastSavedContents: contents,
-      modified: !buffer.transaction.state.doc.eq(contents)
-    }));
-    return newBuffers;
-  });
-  staleIde.setMinibufferMessage(`Saved '${staleBuffer.unifiedPathname}'.`);
-}
+/************/
+/* FileMenu */
+/************/
 
-function onSaveBufferFailure(staleIde, errorMessage) {
-  staleIde.setMinibufferMessage(errorMessage);
+function FileMenu({state, dispatch}) {
+  const revertBufferActionRef = useRef();
+  const [revertBufferDialogOpen, setRevertBufferDialogOpen] = useState(false);
+  return (
+    <>
+      <Menu state={state} trigger="File">
+        <MenuActionItem state={state}
+                        dispatch={dispatch}
+                        actionType={'saveBuffer'}>
+          Save Buffer
+        </MenuActionItem>
+        <MenuActionItem state={state}
+                        actionType={'revertBuffer'}
+                        actionRef={revertBufferActionRef}
+                        onClick={() => setRevertBufferDialogOpen(true)}>
+          Revert Buffer&hellip;
+        </MenuActionItem>
+      </Menu>
+      <RevertBufferDialog dispatch={dispatch}
+                          actionRef={revertBufferActionRef}
+                          dialogOpen={revertBufferDialogOpen}
+                          setDialogOpen={setRevertBufferDialogOpen}/>
+    </>
+  );
 }
 
-function revertBufferCommand(ide, buffer) {
-  const unifiedPathname = buffer.unifiedPathname;
-  if (fileSystemIsWritable) {
-    getFileContents(unifiedPathname,
-                    contents => onRevertBufferSuccess(ide, buffer, contents),
-                    errorMessage => onRevertBufferFailure(ide, errorMessage));
-  } else {
-    zippedSystemFiles
-      .file(unifiedPathnamePathname(unifiedPathname).substring(1))
-      .async('string')
-      .then(contents => onRevertBufferSuccess(ide, buffer, contents))
-      .catch(error => onRevertBufferFailure(ide, error.message));
-  }
-  closeMenubar(ide);
-  focusSelectedWindow(ide);
+function RevertBufferDialog({dispatch, actionRef, dialogOpen, setDialogOpen}) {
+  const initialFocusRef = useRef();
+  return (
+    <Dialog open={dialogOpen}
+            onOpenChange={setDialogOpen}
+            initialFocus={initialFocusRef}>
+      <DialogTitle>
+        Revert Buffer
+      </DialogTitle>
+      <DialogDescription>
+        Revert buffer?
+      </DialogDescription>
+      <DialogButtons>
+        <DialogButton
+          onClick={() => {
+            setDialogOpen(false);
+          }}
+        >
+          Cancel
+        </DialogButton>
+        <DialogButton
+          ref={initialFocusRef}
+          onClick={() => {
+            const action = actionRef.current;
+            actions.revertBuffer.exec(dispatch, action);
+            setDialogOpen(false);
+          }}
+        >
+          Revert
+        </DialogButton>
+      </DialogButtons>
+    </Dialog>
+  );
 }
 
-function onRevertBufferSuccess(staleIde, staleBuffer, contents) {
-  staleIde.setBuffers(buffers => {
-    const buffer = buffers.get(staleBuffer.id);
-    const newBuffers = new Map(buffers);
-    const changes = {from: 0, to: buffer.transaction.state.doc.length, insert: contents};
-    const transaction = buffer.transaction.state.update({changes: changes});
-    newBuffers.set(buffer.id, copyInstance(buffer, {
-      transaction: transaction,
-      lastSavedContents: transaction.state.doc,
-      modified: false
-    }));
-    return newBuffers;
-  });
-  staleIde.setMinibufferMessage(`Reverted '${staleBuffer.unifiedPathname}'.`);
+/************/
+/* EditMenu */
+/************/
+
+function EditMenu({state, dispatch}) {
+  const clearListenerActionRef = useRef();
+  const [clearListenerDialogOpen, setClearListenerDialogOpen] = useState(false);
+  const changeSettingsActionRef = useRef();
+  const [changeSettingsDialogOpen, setChangeSettingsDialogOpen] = useState(false);
+  return (
+    <>
+      <Menu state={state} trigger="Edit">
+        <MenuActionItem state={state}
+                        dispatch={dispatch}
+                        actionType={'toggleHTMLMode'}>
+          Toggle HTML Mode
+        </MenuActionItem>
+        <MenuActionItem state={state}
+                        actionType={'clearListener'}
+                        actionRef={clearListenerActionRef}
+                        onClick={() => setClearListenerDialogOpen(true)}>
+          Clear Listener&hellip;
+        </MenuActionItem>
+        <MenuSeparator/>
+        <MenuActionItem state={state}
+                        actionType={'changeSettings'}
+                        actionRef={changeSettingsActionRef}
+                        onClick={() => setChangeSettingsDialogOpen(true)}>
+          Settings&hellip;
+        </MenuActionItem>
+      </Menu>
+      <ClearListenerDialog dispatch={dispatch}
+                           actionRef={clearListenerActionRef}
+                           dialogOpen={clearListenerDialogOpen}
+                           setDialogOpen={setClearListenerDialogOpen}/>
+      <ChangeSettingsDialog state={state}
+                            dispatch={dispatch}
+                            actionRef={changeSettingsActionRef}
+                            dialogOpen={changeSettingsDialogOpen}
+                            setDialogOpen={setChangeSettingsDialogOpen}/>
+    </>
+  );
 }
 
-function onRevertBufferFailure(staleIde, errorMessage) {
-  staleIde.setMinibufferMessage(errorMessage);
+function ClearListenerDialog({dispatch, actionRef, dialogOpen, setDialogOpen}) {
+  const initialFocusRef = useRef();
+  return (
+    <Dialog open={dialogOpen}
+            onOpenChange={setDialogOpen}
+            initialFocus={initialFocusRef}>
+      <DialogTitle>
+        Clear Listener
+      </DialogTitle>
+      <DialogDescription>
+        Clear listener?
+      </DialogDescription>
+      <DialogButtons>
+        <DialogButton
+          onClick={() => {
+            setDialogOpen(false);
+          }}
+        >
+          Cancel
+        </DialogButton>
+        <DialogButton
+          ref={initialFocusRef}
+          onClick={() => {
+            const action = actionRef.current;
+            actions.clearListener.exec(dispatch, action);
+            setDialogOpen(false);
+          }}
+        >
+          Clear
+        </DialogButton>
+      </DialogButtons>
+    </Dialog>
+  );
 }
 
-/************/
-/* EditMenu */
-/************/
+const fontSizes = Array.from({length: 23}, (element, index) => (index + 10) + 'px');
 
-function EditMenu({ide}) {
-  const [clearListenerMenubarDialogOpen, setClearListenerMenubarDialogOpen] = useState(false);
-  const {selectedWindow, selectedBuffer, isAllCapsBuffer, isEVLBuffer, isListenerBuffer} = selectedWindowAndBuffer(ide);
+function ChangeSettingsDialog({state, dispatch, actionRef, dialogOpen, setDialogOpen}) {
+  const [selectedColorScheme, setSelectedColorScheme] = useState(state.colorScheme);
+  const [selectedFontSize, setSelectedFontSize] = useState(state.fontSize);
   return (
-    <MenubarMenu trigger="Edit"
-                 hidden={clearListenerMenubarDialogOpen}>
-      <MenubarItem disabled={!isAllCapsBuffer && !isEVLBuffer}
-                   onSelect={() => toggleHTMLModeCommand(ide, selectedWindow, selectedBuffer)}>
-        Toggle HTML Mode
-        <MenubarRightSlot>{toggleHTMLModeKeySeq}</MenubarRightSlot>
-      </MenubarItem>
-      <MenubarDialog open={clearListenerMenubarDialogOpen}
-                     onOpenChange={setClearListenerMenubarDialogOpen}
-                     disabled={!isListenerBuffer}
-                     onClose={() => {closeMenubar(ide); focusSelectedWindow(ide);}}
-                     title="Clear Listener...">
+    <Dialog open={dialogOpen}
+            onOpenChange={setDialogOpen}>
+      <DialogTitle>
+        Settings
+      </DialogTitle>
+      <form>
+        <p>Color Scheme:</p>
+        <RadioGroup name="colorScheme"
+                    values={['light', 'dark']}
+                    valueToLabel={value => value === 'light' ? 'Light Mode' : 'Dark Mode'}
+                    selectedValue={selectedColorScheme}
+                    setSelectedValue={setSelectedColorScheme}/>
+        <hr/>
         <p>
-          Clear '{selectedBuffer.name}'?
+          <label htmlFor="fontSize">Font Size: </label>
+          <select id="fontSize"
+                  name="fontSize"
+                  value={selectedFontSize}
+                  onChange={event => setSelectedFontSize(event.target.value)}>
+            {fontSizes.map(fontSize =>
+              <option key={fontSize} value={fontSize}>
+                {fontSize}
+              </option>
+            )}
+          </select>
         </p>
         <DialogButtons>
-          <DialogDefaultButton onClick={() => {closeMenubar(ide); focusSelectedWindow(ide);}}>
+          <DialogButton
+            onClick={() => {
+              setSelectedColorScheme(state.colorScheme);
+              setSelectedFontSize(state.fontSize);
+              setDialogOpen(false);
+            }}
+          >
             Cancel
-          </DialogDefaultButton>
-          <DialogButton onClick={() => clearListenerCommand(ide, selectedBuffer)}>
-            Clear
+          </DialogButton>
+          <DialogButton
+            type="submit"
+            onClick={event => {
+              event.preventDefault();
+              const action = copyInstance(actionRef.current, {
+                colorScheme: selectedColorScheme,
+                fontSize: selectedFontSize
+              });
+              actions.changeSettings.exec(dispatch, action);
+              setDialogOpen(false);
+            }}
+          >
+            Apply
           </DialogButton>
         </DialogButtons>
-      </MenubarDialog>
-    </MenubarMenu>
+      </form>
+    </Dialog>
   );
 }
 
-function toggleHTMLModeCommand(ide, window, buffer) {
-  switch (window.displayMode) {
-    case DISPLAY_RAW: {
-      const newWindows = new Map(ide.windows);
-      newWindows.set(window.id, copyInstance(window, {
-        displayMode: DISPLAY_PENDING
-      }));
-      ide.setWindows(newWindows);
-      buffer.toggleOnHTMLMode(ide, window);
-      break;
-    }
-    case DISPLAY_HTML: {
-      URL.revokeObjectURL(window.htmlURL);
-      URL.revokeObjectURL(window.cssURL);
-      URL.revokeObjectURL(window.jsURL);
-      const newWindows = new Map(ide.windows);
-      newWindows.set(window.id, copyInstance(window, {
-        displayMode: DISPLAY_RAW,
-        htmlURL: null,
-        cssURL: null,
-        jsURL: null
-      }));
-      ide.setWindows(newWindows);
-      break;
-    }
-  }
-  focusSelectedWindow(ide, true);
-}
-
-function toggleHTMLModeCommand2(staleIde, staleWindow, html, cssURL, jsURL) {
-  staleIde.setWindows(windows => {
-    const window = windows.get(staleWindow.id);
-    const newWindows = new Map(windows);
-    const htmlBlob = new Blob([html], {type: 'text/html'});
-    const htmlURL = URL.createObjectURL(htmlBlob);
-    newWindows.set(window.id, copyInstance(window, {
-      displayMode: DISPLAY_HTML,
-      htmlURL: htmlURL,
-      cssURL: cssURL,
-      jsURL: jsURL
-    }));
-    return newWindows;
-  });
-  focusSelectedWindow(staleIde, true);
-}
-
-function clearListenerCommand(ide, buffer) {
-  clearListener(ide, buffer);
-  closeMenubar(ide);
-  focusSelectedWindow(ide);
-}
-
 /************/
 /* EvalMenu */
 /************/
 
-function EvalMenu({ide}) {
-  const [restartEvaluatorMenubarDialogOpen, setRestartEvaluatorMenubarDialogOpen] = useState(false);
-  const [selectedEvaluator, setSelectedEvaluator] = useState(ide.selectedEvaluator);
-  const {selectedWindow, selectedBuffer, isEVLBuffer} = selectedWindowAndBuffer(ide);
+function EvalMenu({state, dispatch}) {
+  const restartEvaluatorActionRef = useRef();
+  const [restartEvaluatorDialogOpen, setRestartEvaluatorDialogOpen] = useState(false);
+  return (
+    <>
+      <Menu state={state} trigger="Eval">
+        <MenuActionItem state={state}
+                        dispatch={dispatch}
+                        actionType={'evaluateForm'}>
+          Evaluate Form
+        </MenuActionItem>
+        <MenuActionItem state={state}
+                        dispatch={dispatch}
+                        actionType={'loadBuffer'}>
+          Load Buffer
+        </MenuActionItem>
+        <MenuSeparator/>
+        <MenuActionItem state={state}
+                        dispatch={dispatch}
+                        actionType={'abortEvaluation'}>
+          Abort Evaluation
+        </MenuActionItem>
+        <MenuActionItem state={state}
+                        actionType={'restartEvaluator'}
+                        actionRef={restartEvaluatorActionRef}
+                        onClick={() => setRestartEvaluatorDialogOpen(true)}>
+          Restart Evaluator&hellip;
+        </MenuActionItem>
+      </Menu>
+      <RestartEvaluatorDialog state={state}
+                              dispatch={dispatch}
+                              actionRef={restartEvaluatorActionRef}
+                              dialogOpen={restartEvaluatorDialogOpen}
+                              setDialogOpen={setRestartEvaluatorDialogOpen}/>
+    </>
+  );
+}
+
+function RestartEvaluatorDialog({state, dispatch, actionRef, dialogOpen, setDialogOpen}) {
+  const initialFocusRef = useRef();
+  const [selectedEvaluator, setSelectedEvaluator] = useState(state.selectedEvaluator);
   return (
-    <MenubarMenu trigger="Eval"
-                 hidden={restartEvaluatorMenubarDialogOpen}>
-      <MenubarItem disabled={!isEVLBuffer}
-                   onSelect={() => evaluateFormCommand(ide, selectedWindow)}>
-        Evaluate Form
-        <MenubarRightSlot>{evaluateFormKeySeq}</MenubarRightSlot>
-      </MenubarItem>
-      <MenubarItem disabled={!isEVLBuffer}
-                   onSelect={() => loadBufferCommand(ide, selectedBuffer)}>
-        Load Buffer
-        <MenubarRightSlot>{loadBufferKeySeq}</MenubarRightSlot>
-      </MenubarItem>
-      <MenubarSeparator/>
-      <MenubarItem onSelect={() => abortEvaluationCommand(ide)}>
-        Abort Evaluation
-      </MenubarItem>
-      <MenubarDialog open={restartEvaluatorMenubarDialogOpen}
-                     onOpenChange={setRestartEvaluatorMenubarDialogOpen}
-                     onClose={() => {closeMenubar(ide); focusSelectedWindow(ide);}}
-                     title="Restart Evaluator...">
-        <ul className="radio">
-          {Array.from(evaluatorNames.entries()).map(([evaluatorName, evaluatorDisplayName]) =>
-            <li key={evaluatorName}
-                className="radio">
-              <input id={evaluatorName}
-                     type="radio"
-                     name="evaluatorName"
-                     value={evaluatorName}
-                     checked={evaluatorName === selectedEvaluator}
-                     onChange={() => setSelectedEvaluator(evaluatorName)}/>
-              <label htmlFor={evaluatorName}>
-                {evaluatorDisplayName}
-              </label>
-            </li>
-          )}
-        </ul>
+    <Dialog open={dialogOpen}
+            onOpenChange={setDialogOpen}
+            initialFocus={initialFocusRef}>
+      <DialogTitle>
+        Restart Evaluator
+      </DialogTitle>
+      <form>
+        <p>Evaluator:</p>
+        <RadioGroup name="evaluator"
+                    values={Array.from(evaluators.keys())}
+                    valueToLabel={value => evaluators.get(value)}
+                    selectedValue={selectedEvaluator}
+                    setSelectedValue={setSelectedEvaluator}/>
         <DialogButtons>
-          <DialogDefaultButton onClick={() => {closeMenubar(ide); focusSelectedWindow(ide);}}>
+          <DialogButton
+            onClick={() => {
+              setSelectedEvaluator(state.selectedEvaluator);
+              setDialogOpen(false);
+            }}
+          >
             Cancel
-          </DialogDefaultButton>
-          <DialogButton onClick={() => restartEvaluatorCommand(ide, selectedEvaluator)}>
+          </DialogButton>
+          <DialogButton
+            ref={initialFocusRef}
+            type="submit"
+            onClick={event => {
+              event.preventDefault();
+              const action = copyInstance(actionRef.current, {
+                selectedEvaluator: selectedEvaluator
+              });
+              actions.restartEvaluator.exec(dispatch, action);
+              setDialogOpen(false);
+            }}
+          >
             Restart
           </DialogButton>
         </DialogButtons>
-      </MenubarDialog>
-    </MenubarMenu>
-  );
-}
-
-function evaluateFormCommand(ide, window) {
-  const state = window.view.state;
-  const form = findForm(state, state.selection.main.anchor);
-  if (form !== null) {
-    const text = state.sliceDoc(form.from, form.to);
-    evaluateFirstForm(text, response => ide.setMinibufferMessage(formatForMinibuffer(response)));
-  }
-  focusSelectedWindow(ide);
-}
-
-function loadBufferCommand(ide, buffer) {
-  const state = buffer.transaction.state;
-  const text = state.sliceDoc();
-  evaluateAllForms(text, response  => ide.setMinibufferMessage(formatForMinibuffer(response)));
-  focusSelectedWindow(ide);
-}
-
-function abortEvaluationCommand(ide) {
-  abortEvaluation();
-  focusSelectedWindow(ide);
-}
-
-function restartEvaluatorCommand(ide, selectedEvaluator) {
-  ide.setSelectedEvaluator(selectedEvaluator);
-  startEvaluator(ide, selectedEvaluator);
-  closeMenubar(ide);
-  focusSelectedWindow(ide);
-}
-
-function startEvaluator(ide, selectedEvaluator) {
-  createEvaluator(
-    findFileBuffer(ide.buffers, '/system/core.js').transaction.state.sliceDoc(),
-    selectedEvaluator,
-    Array.from(ide.buffers.values()).filter(isEVLBuffer).map(buffer => buffer.transaction.state.sliceDoc()),
-    response => ide.setMinibufferMessage(formatForMinibuffer(response))
+      </form>
+    </Dialog>
   );
 }
 
@@ -947,213 +763,326 @@ function startEvaluator(ide, selectedEvaluator) {
 /* ViewMenu */
 /************/
 
-function ViewMenu({ide}) {
-  const selectedWindow = ide.windows.get(ide.selectedWindowId);
+function ViewMenu({state, dispatch}) {
   return (
-    <MenubarMenu trigger="View">
-      <MenubarItem disabled={ide.maximizedWindowId !== null}
-                   onSelect={() => selectOtherWindowCommand(ide, selectedWindow)}>
-        Select Other Window
-        <MenubarRightSlot>{selectOtherWindowKeySeq}</MenubarRightSlot>
-      </MenubarItem>
-      <MenubarItem onSelect={() => toggleMaximizedStateCommand(ide, selectedWindow)}>
+    <Menu state={state} trigger="View">
+      <MenuActionItem state={state}
+                      dispatch={dispatch}
+                      actionType={'selectPreviousWindow'}>
+        Select Previous Window
+      </MenuActionItem>
+      <MenuActionItem state={state}
+                      dispatch={dispatch}
+                      actionType={'selectNextWindow'}>
+        Select Next Window
+      </MenuActionItem>
+      <MenuActionItem state={state}
+                      dispatch={dispatch}
+                      actionType={'toggleMaximizedState'}>
         Toggle Maximized State
-        <MenubarRightSlot>{toggleMaximizedStateKeySeq}</MenubarRightSlot>
-      </MenubarItem>
-    </MenubarMenu>
+      </MenuActionItem>
+      <MenuSeparator/>
+      <MenuActionItem state={state}
+                      dispatch={dispatch}
+                      actionType={'deleteThisWindow'}>
+        Delete This Window
+      </MenuActionItem>
+      <MenuActionItem state={state}
+                      dispatch={dispatch}
+                      actionType={'deleteOtherWindows'}>
+        Delete Other Windows
+      </MenuActionItem>
+      <MenuActionItem state={state}
+                      dispatch={dispatch}
+                      actionType={'splitWindowVertically'}>
+        Split Window Vertically
+      </MenuActionItem>
+      <MenuActionItem state={state}
+                      dispatch={dispatch}
+                      actionType={'splitWindowHorizontally'}>
+        Split Window Horizontally
+      </MenuActionItem>
+    </Menu>
   );
 }
 
-function selectOtherWindowCommand(ide, window) {
-  const windowIds = Array.from(ide.windows.keys());
-  let otherWindowId = windowIds[0];
-  for (const windowId of windowIds) {
-    if (windowId > window.id) {
-      otherWindowId = windowId;
-      break;
-    }
-  }
-  document.getElementById(contentsAreaId(otherWindowId)).focus();
-}
-
-function toggleMaximizedStateCommand (ide, window) {
-  if (ide.maximizedWindowId === null) {
-    ide.setMaximizedWindowId(window.id);
-  } else {
-    ide.setMaximizedWindowId(null);
-  }
-  focusSelectedWindow(ide);
-}
-
 /**************/
 /* BufferMenu */
 /**************/
 
-function BufferMenu({ide}) {
-  const selectedWindow = ide.windows.get(ide.selectedWindowId);
+function BufferMenu({state, dispatch}) {
   return (
-    <MenubarMenu trigger="Buffers">
-      <MenubarRadioGroup value={selectedWindow.bufferId}>
-        {Array.from(ide.buffers.values()).map(buffer =>
-          <MenubarRadioItem key={buffer.id}
-                            value={buffer.id}
-                            onSelect={() => selectBufferCommand(ide, selectedWindow, buffer)}>
+    <Menu state={state} trigger="Buffers">
+      <MenuRadioGroup value={state.windows.get(state.selectedWindowId).bufferId}
+                      onValueChange={value => dispatch({type: 'switchBuffer', windowId: state.selectedWindowId, bufferId: value})}>
+        {Array.from(state.buffers.values()).map(buffer =>
+          <MenuRadioItem key={buffer.id} value={buffer.id}>
             {buffer.bufferMenuEntry()}
-          </MenubarRadioItem>
+          </MenuRadioItem>
         )}
-      </MenubarRadioGroup>
-    </MenubarMenu>
+      </MenuRadioGroup>
+    </Menu>
   );
 }
 
-function selectBufferCommand(ide, window, buffer) {
-  setWindowBuffer(ide, window, buffer);
-  focusSelectedWindow(ide, true);
-}
-
 /************/
 /* HelpMenu */
 /************/
 
-function HelpMenu({ide}) {
+function HelpMenu({state}) {
   return (
-    <MenubarMenu trigger="Help">
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org')}>
+    <Menu state={state} trigger="Help">
+      <MenuLinkItem href="https://evlambda.org">
         Home
-      </MenubarItem>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org/changelog.php')}>
+      </MenuLinkItem>
+      <MenuLinkItem href="https://evlambda.org/ide/contents/toc.php">
+        Contents
+      </MenuLinkItem>
+      <MenuLinkItem href="https://evlambda.org/changelog.php">
         Changelog
-      </MenubarItem>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org/contact.php')}>
+      </MenuLinkItem>
+      <MenuLinkItem href="https://evlambda.org/contact.php">
         Contact
-      </MenubarItem>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org/my-account/login.php')}>
+      </MenuLinkItem>
+      <MenuLinkItem href="https://evlambda.org/my-account/login.php">
         My Account
-      </MenubarItem>
-      <MenubarSeparator/>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org/gitweb/gitweb.cgi?p=evlambda.git')}>
+      </MenuLinkItem>
+      <MenuSeparator/>
+      <MenuLinkItem href="https://evlambda.org/gitweb/gitweb.cgi?p=evlambda.git">
         Git Repository
-      </MenubarItem>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://discourse.evlambda.org')}>
+      </MenuLinkItem>
+      <MenuLinkItem href="https://discourse.evlambda.org">
         Discussions
-      </MenubarItem>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://discourse.evlambda.org/issues')}>
+      </MenuLinkItem>
+      <MenuLinkItem href="https://discourse.evlambda.org/issues">
         Issues
-      </MenubarItem>
-      <MenubarSeparator/>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org/cookie-policy.php')}>
+      </MenuLinkItem>
+      <MenuSeparator/>
+      <MenuLinkItem href="https://evlambda.org/cookie-policy.php">
         Cookie Policy
-      </MenubarItem>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org/privacy-policy.php')}>
+      </MenuLinkItem>
+      <MenuLinkItem href="https://evlambda.org/privacy-policy.php">
         Privacy Policy
-      </MenubarItem>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org/terms-of-service.php')}>
+      </MenuLinkItem>
+      <MenuLinkItem href="https://evlambda.org/terms-of-service.php">
         Terms of Service
-      </MenubarItem>
-      <MenubarItem onSelect={() => openLinkCommand(ide, 'https://evlambda.org/credits.php')}>
+      </MenuLinkItem>
+      <MenuLinkItem href="https://evlambda.org/credits.php">
         Credits
-      </MenubarItem>
-      <MenubarSeparator/>
-      <MenubarItem onSelect={() => openLinkCommand(ide, '/ide/bom.html')}>
+      </MenuLinkItem>
+      <MenuSeparator/>
+      <MenuLinkItem href="/ide/bom.html">
         Bill of Materials
-      </MenubarItem>
-    </MenubarMenu>
+      </MenuLinkItem>
+    </Menu>
   );
 }
 
-function openLinkCommand(ide, link) {
-  open(link, '_blank');
-  focusSelectedWindow(ide);
+/**************/
+/* IDEInfobar */
+/**************/
+
+function IDEInfobar({state}) {
+  return (
+    <Box
+      sx={{
+        flex: '0 0 auto'
+      }}
+    >
+      <Infobar>
+        <InfobarItem>
+          {state.selectedEvaluator}
+        </InfobarItem>
+      </Infobar>
+    </Box>
+  );
 }
 
-/***********/
-/* Infobar */
-/***********/
+/************/
+/* MainArea */
+/************/
 
-function Infobar({ide}) {
+function MainArea({state, dispatch}) {
+  const windows = Array.from(state.windows.values());
+  const nGridColumns = state.maximizedState ? 1 : nGridDivisions(windows, nHorizontalSplits);
+  const nGridRows = state.maximizedState ? 1 : nGridDivisions(windows, nVerticalSplits);
+  const gridTemplateColumns = Array(nGridColumns).fill('1fr').join(' ');
+  const gridTemplateRows = Array(nGridRows).fill('1fr').join(' ');
   return (
-    <InfobarRoot>
-      <InfobarItem>
-        {evaluatorNames.get(ide.selectedEvaluator)}
-      </InfobarItem>
-    </InfobarRoot>
+    <Box
+      sx={{
+        flex: '1 0 auto',
+        display: 'grid',
+        gridTemplateColumns: gridTemplateColumns,
+        gridTemplateRows: gridTemplateRows,
+        // create a one pixel border above, below, and between windows
+        backgroundColor: 'border',
+        padding: '1px 0',
+        gap: '1px'
+      }}
+    >
+      {windows.map(window =>
+        <IDEWindow key={window.id + '.' + window.bufferId} state={state} dispatch={dispatch} window={window} nGridColumns={nGridColumns} nGridRows={nGridRows}/>
+      )}
+    </Box>
   );
 }
 
-/***********/
-/* Section */
-/***********/
+function nHorizontalSplits(string) {
+  let n = 0;
+  for (const char of string) if (char === 'L' || char === 'R') n++;
+  return n;
+}
 
-function Section({ide}) {
-  const sectionRef = useRef(null);
-  const [sectionRectangle, setSectionRectangle] = useState(null);
-  useLayoutEffect(() => {
-    setTimeout(() => {
-      setSectionRectangle(sectionRef.current.getBoundingClientRect());
-    }, 0);
-  }, [ide.windowSize]);
+function nVerticalSplits(string) {
+  let n = 0;
+  for (const char of string) if (char === 'T' || char === 'B') n++;
+  return n;
+}
+
+function nGridDivisions(windows, nSplits) {
+  return Math.pow(2, windows.map(window => window.position).map(nSplits).reduce((x, y) => Math.max(x, y), 0));
+}
+
+/*************/
+/* IDEWindow */
+/*************/
+
+function IDEWindow({state, dispatch, window, nGridColumns, nGridRows}) {
+  let sx;
+  if (state.maximizedState) {
+    if (window.id === state.selectedWindowId) {
+      sx = {
+        gridColumn: '1 / 2',
+        gridRow: '1 / 2',
+        display: 'flex',
+        flexDirection: 'column'
+      };
+    } else {
+      sx = {
+        gridColumn: '1 / 2',
+        gridRow: '1 / 2',
+        display: 'none'
+      };
+    }
+  } else {
+    sx = {
+      ...gridArea(window.position, nGridColumns, nGridRows),
+      display: 'flex',
+      flexDirection: 'column'
+    };
+  }
   return (
-    <section ref={sectionRef}>
-      {Array.from(ide.windows.values()).map(window => {
-        const buffer = ide.buffers.get(window.bufferId);
-        return (
-          <TilingWindow key={window.id + '.' + buffer.id + '.' + window.displayMode}
-                        onFocus={() => ide.setSelectedWindowId(window.id)}
-                        sectionRectangle={sectionRectangle}
-                        position={ide.maximizedWindowId === null ? window.position : (ide.maximizedWindowId === window.id ? '' : null)}>
-            {buffer.toolbar(ide, window)}
-            <WindowContentsArea>
-              <ContentsAreaRoot>
-                {buffer.contentsArea(ide, window)}
-              </ContentsAreaRoot>
-            </WindowContentsArea>
-            <WindowStatusbar>
-              <StatusbarRoot dataSelected={window.id === ide.selectedWindowId ? '' : null}>
-                {buffer.statusMessage()}
-              </StatusbarRoot>
-            </WindowStatusbar>
-          </TilingWindow>
-        );
-      })}
-    </section>
+    <Box sx={sx}>
+      <IDEBufferView state={state} dispatch={dispatch} window={window}/>
+      <IDEStatusbar state={state} window={window}/>
+    </Box>
   );
 }
 
-/*********************/
-/* FakeWindowToolbar */
-/*********************/
+function gridArea(position, nGridColumns, nGridRows) {
+  // top-left corner = (x0, y0)
+  // bottom-right corner = (x1, y1)
+  let x0 = 0;
+  let y0 = 0;
+  let x1 = nGridColumns;
+  let y1 = nGridRows;
+  for (const char of position) {
+    switch (char) {
+      case 'T':
+        y1 = y0 + (y1 - y0) / 2;
+        break;
+      case 'B':
+        y0 = y0 + (y1 - y0) / 2;
+        break;
+      case 'L':
+        x1 = x0 + (x1 - x0) / 2;
+        break;
+      case 'R':
+        x0 = x0 + (x1 - x0) / 2;
+        break;
+    }
+  }
+  return {
+    gridColumnStart: x0 + 1,
+    gridColumnEnd: x1 + 1,
+    gridRowStart: y0 + 1,
+    gridRowEnd: y1 + 1
+  };
+}
+
+/*****************/
+/* IDEBufferView */
+/*****************/
+
+function IDEBufferView({state, dispatch, window}) {
+  function onFocus() {
+    document.defaultView.dispatchEvent(new CustomEvent('selectWindow', {detail: {windowId: window.id, focus: false}}));
+  }
+  if (window.htmlMode) {
+    return (
+      <Box
+        onFocus={onFocus}
+        sx={{
+          flex: '1 0 auto',
+          backgroundColor: 'background'
+        }}
+      >
+        <HTMLViewer state={state} window={window}/>
+      </Box>
+    );
+  } else {
+    return (
+      <Box
+        onFocus={onFocus}
+        sx={{
+          flex: '1 0 auto',
+          backgroundColor: 'background',
+          // keep CodeMirror focus outline inside buffer view
+          padding: '1px'
+        }}
+      >
+        <TextEditor state={state} dispatch={dispatch} window={window}/>
+      </Box>
+    );
+  }
+}
 
-function FakeWindowToolbar ({ide, window}) {
+/****************/
+/* IDEStatusbar */
+/****************/
+
+function IDEStatusbar({state, window}) {
   return (
-    <WindowToolbar>
-      <ToolbarRoot dataSelected={window.id === ide.selectedWindowId ? '' : null}>
-        <ToolbarButton onClick={() => ide.setMinibufferMessage('XXX')}>
-          XXX
-        </ToolbarButton>
-        <ToolbarButton onClick={() => ide.setMinibufferMessage('YYY')}>
-          YYY
-        </ToolbarButton>
-        <ToolbarButton onClick={() => ide.setMinibufferMessage('ZZZ')}>
-          ZZZ
-        </ToolbarButton>
-      </ToolbarRoot>
-    </WindowToolbar>
+    <Box
+      onClick={() => document.defaultView.dispatchEvent(new CustomEvent('selectWindow', {detail: {windowId: window.id, focus: true}}))}
+      sx={{
+        flex: '0 0 auto'
+      }}
+    >
+      <Statusbar selected={window.id === state.selectedWindowId}>
+        {state.buffers.get(window.bufferId).statusbarMessage()}
+      </Statusbar>
+    </Box>
   );
 }
 
-/********************/
-/* MinibufferWindow */
-/********************/
+/**************/
+/* BottomArea */
+/**************/
 
-function MinibufferWindow({ide}) {
+function BottomArea({state}) {
   return (
-    <FillingWindow>
-      <WindowContentsArea>
-        <ContentsAreaRoot>
-          <Minibuffer message={ide.minibufferMessage}/>
-        </ContentsAreaRoot>
-      </WindowContentsArea>
-    </FillingWindow>
+    <Box
+      sx={{
+        flex: '0 0 auto',
+        backgroundColor: 'background',
+        // keep CodeMirror focus outline inside bottom area
+        padding: '1px'
+      }}
+    >
+      <Minibuffer state={state}/>
+    </Box>
   );
 }
 
@@ -1161,82 +1090,12 @@ function MinibufferWindow({ide}) {
 /* Initialization */
 /******************/
 
-let fileSystemIsWritable = null;
-let zippedSystemFiles = null;
-
-function init(systemFiles) {
-  const buffers = new Map();
-  const url = new URL('/fs/system/get-capabilities', window.location.href);
-  fetch(url)
-    .then(response => {
-      if (response.ok) {
-        return response.json();
-      } else {
-        throw new Error('/fs/system/get-capabilities');
-      }
-    })
-    .then(json => {
-      fileSystemIsWritable = json.writable;
-      if (fileSystemIsWritable) {
-        return Promise.all(systemFiles.map(systemFile => {
-          const url = new URL('/fs/system/get-file-contents', window.location.href);
-          url.searchParams.set('pathname', '/' + systemFile);
-          return fetch(url)
-            .then(response => {
-              if (response.ok) {
-                return response.text();
-              } else {
-                throw new Error('/fs/system/get-file-contents');
-              }
-            })
-            .then(text => {
-              return text;
-            });
-        }));
-      } else {
-        const url = new URL('/ide/system-files.zip', window.location.href);
-        return fetch(url)
-          .then(response => {
-            if (response.ok) {
-              return response.arrayBuffer();
-            } else {
-              throw new Error('/ide/system-files.zip');
-            }
-          })
-          .then(arrayBuffer => {
-            return JSZip.loadAsync(arrayBuffer);
-          })
-          .then(zip => {
-            zippedSystemFiles = zip;
-            return Promise.all(systemFiles.map(systemFile => zip.file(systemFile).async('string')));
-          });
-      }
-    })
-    .then(systemFilesContents => {
-      for (let i = 0; i < systemFiles.length; i++) {
-        FileBuffer.create(buffers, '/system/' + systemFiles[i], systemFilesContents[i]);
-      }
-      ListenerBuffer.create(buffers, 'Listener 1');
-      const windows = new Map();
-      Window.create(windows, 'L', findFileBuffer(buffers, '/system/USER-MANUAL'));
-      Window.create(windows, 'R', findListenerBuffer(buffers, 'Listener 1'));
-      createRoot(document.querySelector('#root')).render(<IDE initialBuffers={buffers} initialWindows={windows}/>);
-    })
-    .catch(error => {
-      document.body.innerHTML = '<p class="error">The application failed to initialize.</p>';
-    });
-}
+const rootElement = document.getElementById('root');
 
-init([
-  'USER-MANUAL',
-  'TUTORIAL',
-  'REFERENCE-MANUAL',
-  'IMPLEMENTATION-NOTES',
-  'BIBLIOGRAPHY',
-  'LICENSE',
-  'core.js',
-  'mantle.evl',
-  'evl2html.xslt',
-  'common.css',
-  'common.js'
-]);
+createInitialState()
+  .then(state => {
+    createRoot(rootElement).render(<IDE initialLightPalette={lightPalette} initialDarkPalette={darkPalette} initialState={state}/>);
+  })
+  .catch(error => {
+    rootElement.innerHTML = `<p>The application failed to initialize: ${htmlEscape(error.message)}</p>`;
+  });
index 6f2018a401d4ffd8bf22c5ec2fa35c51e493bba5..58031d9ab865851360581c695e9708253df3bdaa 100644 (file)
@@ -17,7 +17,7 @@ import {
   syntaxTree
 } from '@codemirror/language';
 
-const parserWithMetadata = parser.configure({
+export const parserWithMetadata = parser.configure({
   props: [
     styleTags({
       Void: tags.null,
@@ -25,7 +25,7 @@ const parserWithMetadata = parser.configure({
       Number: tags.number,
       Character: tags.character,
       String: tags.string,
-      Symbol: tags.name,
+      //Symbol: tags.name,
       LanguageKeyword: tags.keyword,
       'Quote Quasiquote Unquote UnquoteSplicing HashPlus HashMinus': tags.punctuation,
       'OpeningParenthesis ClosingParenthesis HashOpeningParenthesis': tags.paren,
@@ -144,24 +144,25 @@ function isLocalFunctionDefinition(context) {
 //   )
 
 function indentList(context) {
-  const defaultIndentation = context.column(context.node.from) + 1;
+  const offset = context.lineAt(context.node.from).text.startsWith('> \u{E0001}\u{E0065}\u{E0076}\u{E006C}') ? 4 : 0;
+  const defaultIndentation = context.column(context.node.from) + 1 - offset;
   let child = context.node.firstChild;
   let n = 0;
-  let operatorTo = null;
-  let firstOperandFrom = null;
-  let specialIndentation = undefined;
+  let operatorTo;
+  let firstOperandFrom;
+  let specialIndentation;
   if (isLocalFunctionDefinition(context)) {
     specialIndentation = [1, 4, 2];
   }
-  while (child !== null) {
+  while (child) {
     switch (n) {
       case 0: // opening parenthesis
         break;
       case 1: // operator
         operatorTo = child.to;
-        if (specialIndentation === undefined && child.name === 'EVLObject') {
+        if (!specialIndentation && child.name === 'EVLObject') {
           const node = child.firstChild;
-          if (node !== null && (node.name === 'Symbol' || node.name === 'LanguageKeyword')) {
+          if (node && (node.name === 'Symbol' || node.name === 'LanguageKeyword')) {
             specialIndentation = specialIndentations.get(context.state.sliceDoc(node.from, node.to));
           }
         }
@@ -173,7 +174,7 @@ function indentList(context) {
         break;
     }
     if (child.from >= context.pos) { // first child after pos
-      if (specialIndentation !== undefined) {
+      if (specialIndentation) {
         const [nspecials, special, ordinary] = specialIndentation;
         switch (n) {
           case 0: // opening parenthesis
@@ -181,7 +182,7 @@ function indentList(context) {
           case 1: // operator
             return defaultIndentation;
           default:
-            return context.column(context.node.from) + (n - 1 <= nspecials ? special : ordinary);
+            return context.column(context.node.from) + (n - 1 <= nspecials ? special : ordinary) - offset;
         }
       } else {
         switch (n) {
@@ -195,7 +196,7 @@ function indentList(context) {
             if (context.state.sliceDoc(operatorTo, firstOperandFrom).includes('\n')) {
               return defaultIndentation;
             } else {
-              return context.column(context.node.from) + firstOperandFrom - context.node.from;
+              return context.column(context.node.from) + firstOperandFrom - context.node.from - offset;
             }
         }
       }
@@ -219,7 +220,7 @@ export function evlambda() {
 function findTopEVLObject(tree, position, side) {
   let node = tree.resolve(position, side);
   let topEVLObject = null;
-  while (node !== null) {
+  while (node) {
     if (node.name === 'EVLObject') {
       topEVLObject = node;
     }
@@ -228,21 +229,21 @@ function findTopEVLObject(tree, position, side) {
   return topEVLObject;
 }
 
-export function findForm(state, position) {
-  const tree = syntaxTree(state);
+export function findForm(editorState, position) {
+  const tree = syntaxTree(editorState);
   const formCoveringPosition = findTopEVLObject(tree, position, 0);
-  if (formCoveringPosition !== null) {
+  if (formCoveringPosition) {
     return formCoveringPosition;
   }
   const formDirectlyAfterPosition = findTopEVLObject(tree, position, 1);
-  if (formDirectlyAfterPosition !== null) {
+  if (formDirectlyAfterPosition) {
     return formDirectlyAfterPosition;
   }
-  while (position > 0 && ' \n'.includes(state.sliceDoc(position - 1, position))) {
+  while (position > 0 && ' \n'.includes(editorState.sliceDoc(position - 1, position))) {
     position--;
   }
   const formBeforePosition = findTopEVLObject(tree, position, -1);
-  if (formBeforePosition !== null) {
+  if (formBeforePosition) {
     return formBeforePosition;
   }
   return null;
diff --git a/src/lang-evlistener.js b/src/lang-evlistener.js
new file mode 100644 (file)
index 0000000..437dc9f
--- /dev/null
@@ -0,0 +1,43 @@
+// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck
+// SPDX-License-Identifier: BSD-3-Clause
+
+import {
+  parser
+} from './lezer/evlistener.js';
+
+import {
+  parserWithMetadata as evlambdaParser
+} from './lang-evlambda.js';
+
+import {
+  styleTags,
+  tags
+} from '@lezer/highlight';
+
+import {
+  parseMixed
+} from '@lezer/common';
+
+import {
+  LRLanguage,
+  LanguageSupport
+} from '@codemirror/language';
+
+const parserWithMetadata = parser.configure({
+  props: [
+    styleTags({
+      Banner: tags.string
+    })
+  ],
+  wrap: parseMixed(node => {
+    return node.name === 'Code' ? {parser: evlambdaParser} : null;
+  })
+});
+
+const evlistenerLanguage = LRLanguage.define({
+  parser: parserWithMetadata
+});
+
+export function evlistener() {
+  return new LanguageSupport(evlistenerLanguage);
+}
index dd4b9d4da1fd8e6c082e282896ca6e634754f137..af122e53fe213c2369c9a2da3e71e76eb3cfe210 100644 (file)
@@ -66,4 +66,4 @@ XMLPureElement {
   XMLCharacterData { ![<]+ }
 }
 
-@external specialize { Symbol } specializeSymbol from "./tokens.js" { LanguageKeyword }
+@external specialize { Symbol } specializeSymbol from './tokens.js' { LanguageKeyword }
diff --git a/src/lezer/evlistener.grammar b/src/lezer/evlistener.grammar
new file mode 100644 (file)
index 0000000..f67d5cc
--- /dev/null
@@ -0,0 +1,16 @@
+// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck
+// SPDX-License-Identifier: BSD-3-Clause
+
+@top TopLevel {
+  Banner Prompt startCode (Code endCode Data Prompt startCode)* Code
+}
+
+@tokens {
+  Prompt { '> ' }
+  startCode { '\u{E0001}\u{E0065}\u{E0076}\u{E006C}' }
+  endCode { '\u{E0001}\u{E007F}' }
+}
+
+@external tokens listenerBannerOrData from './tokens.js' { Banner }
+@external tokens listenerCode from './tokens.js' { Code }
+@external tokens listenerBannerOrData from './tokens.js' { Data }
index 384efcbf4039f2c28ad6cf2f0904eb1a287b1848..2e362e78a1ae3a43dc43b187f496bca29033b699 100644 (file)
@@ -1,10 +1,20 @@
 // SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck
 // SPDX-License-Identifier: BSD-3-Clause
 
+import {
+  ExternalTokenizer
+} from '@lezer/lr';
+
 import {
   LanguageKeyword
 } from './evlambda.terms.js';
 
+import {
+  Banner,
+  Code,
+  Data
+} from './evlistener.terms.js';
+
 const specialOperators = [
   'quote',
   'progn',
@@ -69,3 +79,25 @@ for (const macro of macros) {
 export function specializeSymbol(symbol) {
   return languageKeywords.has(symbol) ? LanguageKeyword : -1;
 }
+
+const greaterThanSign = 62;
+const space = 32;
+const languageTag = 0xDB40; // '\u{E0001}' = '\uDB40\uDC01'
+
+export const listenerBannerOrData = new ExternalTokenizer((input, stack) => {
+  const token = input.pos === 0 ? Banner : Data;
+  while (input.next !== -1) {
+    if (input.peek(0) === greaterThanSign && input.peek(1) === space && input.peek(2) === languageTag) {
+      break;
+    }
+    input.advance();
+  }
+  input.acceptToken(token);
+}, {});
+
+export const listenerCode = new ExternalTokenizer((input, stack) => {
+  while (input.next !== -1 && input.next !== 0xDB40) {
+    input.advance();
+  }
+  input.acceptToken(Code);
+}, {});
diff --git a/src/state.js b/src/state.js
new file mode 100644 (file)
index 0000000..cf42328
--- /dev/null
@@ -0,0 +1,1215 @@
+// SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck
+// SPDX-License-Identifier: BSD-3-Clause
+
+import {
+  UAParser
+} from 'ua-parser-js';
+
+import {
+  default as JSZip
+} from 'jszip';
+
+import {
+  unifiedPathnamePathname,
+  getFileSystemCapabilities,
+  getFileContents,
+  putFileContents
+} from './ufs.js';
+
+import {
+  createBufferTransactions,
+  updateBufferTransactions,
+  trimBufferTransactions,
+  dumpBufferTransactions,
+  applyBufferCommand,
+  revertBuffer,
+  clearListener,
+  appendToListener,
+  getWindowBufferParameters
+} from './codemirror.jsx';
+
+import {
+  EditorView
+} from '@codemirror/view';
+
+import {
+  xml
+} from '@codemirror/lang-xml';
+
+import {
+  html
+} from '@codemirror/lang-html';
+
+import {
+  css
+} from '@codemirror/lang-css';
+
+import {
+  javascript
+} from '@codemirror/lang-javascript';
+
+import {
+  evlambda,
+  findForm
+} from './lang-evlambda.js';
+
+import {
+  evlistener
+} from './lang-evlistener.js';
+
+import {
+  createEvaluator,
+  evaluateFirstForm,
+  evaluateAllForms,
+  convertEVLToHTML,
+  formatForListener,
+  formatForMinibuffer,
+  abortEvaluation
+} from './evaluator.js';
+
+import {
+  copyInstance,
+  copyMap,
+  mapHTMLTags,
+  getLocalStorage
+} from './utilities.js';
+
+/*********************/
+/* Browser Detection */
+/*********************/
+
+const {os, device} = UAParser();
+
+// device.type: 'console', 'embedded', 'mobile', 'smarttv', 'tablet', 'wearable', 'xr'
+
+/**********/
+/* Buffer */
+/**********/
+
+const xmlLanguage = xml();
+const htmlLanguage = html();
+const cssLanguage = css();
+const javascriptLanguage = javascript();
+const evlambdaLanguage = evlambda();
+const evlistenerLanguage = evlistener();
+
+class Buffer {
+  static #id = 0;
+  constructor(contents, readOnlyAll = false, readOnlyEnd = 0) {
+    this.id = Buffer.#id++;
+    this.transactions = createBufferTransactions(contents, readOnlyAll, readOnlyEnd);
+    this.cleanDoc = this.transactions.at(-1).state.doc;
+    this.clean = true;
+  }
+  editorState() {
+    return this.transactions.at(-1).state;
+  }
+  defaultHTMLMode() {
+    return false;
+  }
+}
+
+class FileBuffer extends Buffer {
+  constructor(unifiedPathname, contents) {
+    super(contents);
+    this.unifiedPathname = unifiedPathname;
+  }
+  bufferMenuEntry() {
+    return this.unifiedPathname + (this.clean ? '' : '*');
+  }
+  statusbarMessage() {
+    //return this.unifiedPathname + (this.clean ? '' : '*') + ' ' + dumpBufferTransactions(this.transactions);
+    return this.unifiedPathname + (this.clean ? '' : '*');
+  }
+}
+
+function isFileBuffer(buffer) {
+  return buffer instanceof FileBuffer;
+}
+
+class AllCapsBuffer extends FileBuffer {
+  defaultHTMLMode() {
+    return true;
+  }
+  htmlContents(state, windowId) {
+    return new Promise((resolve, reject) => {
+      const cssURL = createFileBufferURL(state, '/system/common.css', 'text/css');
+      const jsURL = createFileBufferURL(state, '/system/common.js', 'text/javascript');
+      let htmlContents = this.editorState().sliceDoc();
+      const savedAnchor = getWindowBufferParameters(windowId, this.id).anchor;
+      if (savedAnchor !== undefined) {
+        let anchor;
+        mapHTMLTags(htmlContents, (stack, isStartTag, isEndTag, isEmptyElementTag, elementName, index) => {
+          if (stack.length !== 0 && stack[stack.length - 1] === 'body' && isStartTag && index <= savedAnchor) {
+            anchor = index;
+          }
+        });
+        if (anchor !== undefined) {
+          htmlContents = htmlContents.substring(0, anchor) + '<a id="scrollintoview"></a>' + htmlContents.substring(anchor);
+        }
+      }
+      htmlContents = htmlContents.replace(/<html>|___cssURL___|___jsURL___/g, string => {
+        switch (string) {
+          case '<html>':
+            return `<html class="${state.colorScheme}" style="font-size: ${state.fontSize};">`;
+          case '___cssURL___':
+            return cssURL;
+          case  '___jsURL___':
+            return jsURL;
+        }
+      });
+      const htmlBlob = new Blob([htmlContents], {type: 'text/html'});
+      const htmlURL = URL.createObjectURL(htmlBlob);
+      resolve([htmlURL, cssURL, jsURL]);
+    });
+  }
+  type() {
+    return 'AllCapsBuffer';
+  }
+  language() {
+    return htmlLanguage;
+  }
+}
+
+function isAllCapsBuffer(buffer) {
+  return buffer instanceof AllCapsBuffer;
+}
+
+class EVLBuffer extends FileBuffer {
+  defaultHTMLMode() {
+    return true;
+  }
+  htmlContents(state, windowId) {
+    return new Promise((resolve, reject) => {
+      const xslt = findFileBuffer(state, '/system/evl2html.xslt').editorState().sliceDoc();
+      const cssURL = createFileBufferURL(state, '/system/common.css', 'text/css');
+      const jsURL = createFileBufferURL(state, '/system/common.js', 'text/javascript');
+      const text = this.editorState().sliceDoc();
+      const savedAnchor = getWindowBufferParameters(windowId, this.id).anchor;
+      convertEVLToHTML(text, savedAnchor, xslt, state.colorScheme, state.fontSize, cssURL, jsURL)
+        .then(htmlContents => {
+          const htmlBlob = new Blob([htmlContents], {type: 'text/html'});
+          const htmlURL = URL.createObjectURL(htmlBlob);
+          resolve([htmlURL, cssURL, jsURL]);
+        });
+    });
+  }
+  type() {
+    return 'EVLBuffer';
+  }
+  language() {
+    return evlambdaLanguage;
+  }
+}
+
+function isEVLBuffer(buffer) {
+  return buffer instanceof EVLBuffer;
+}
+
+class XSLTBuffer extends FileBuffer {
+  type() {
+    return 'XSLTBuffer';
+  }
+  language() {
+    return xmlLanguage;
+  }
+}
+
+function isXSLTBuffer(buffer) {
+  return buffer instanceof XSLTBuffer;
+}
+
+class CSSBuffer extends FileBuffer {
+  type() {
+    return 'CSSBuffer';
+  }
+  language() {
+    return cssLanguage;
+  }
+}
+
+function isCSSBuffer(buffer) {
+  return buffer instanceof CSSBuffer;
+}
+
+class JSBuffer extends FileBuffer {
+  type() {
+    return 'JSBuffer';
+  }
+  language() {
+    return javascriptLanguage;
+  }
+}
+
+function isJSBuffer(buffer) {
+  return buffer instanceof JSBuffer;
+}
+
+function createFileBuffer(unifiedPathname, contents) {
+  if (/\/[A-Z-]+$/.test(unifiedPathname)) {
+    return new AllCapsBuffer(unifiedPathname, contents);
+  }
+  const index = unifiedPathname.lastIndexOf('.');
+  if (index == -1) {
+    throw new Error('Unknown file type.');
+  }
+  const fileType  = unifiedPathname.substring(index + 1);
+  switch (fileType) {
+    case 'evl':
+      return new EVLBuffer(unifiedPathname, contents);
+    case 'xslt':
+      return new XSLTBuffer(unifiedPathname, contents);
+    case 'css':
+      return new CSSBuffer(unifiedPathname, contents);
+    case 'js':
+      return new JSBuffer(unifiedPathname, contents);
+    default:
+      throw new Error('Unknown file type.');
+  }
+}
+
+function findFileBuffer(state, unifiedPathname) {
+  for (const buffer of state.buffers.values()) {
+    if (buffer instanceof FileBuffer && buffer.unifiedPathname === unifiedPathname) {
+      return buffer;
+    }
+  }
+  return null;
+}
+
+function createFileBufferURL(state, unifiedPathname, type) {
+  const buffer = findFileBuffer(state, unifiedPathname);
+  const doc = buffer.editorState().doc;
+  const blob = new Blob(doc, {type: type});
+  return URL.createObjectURL(blob);
+}
+
+class ListenerBuffer extends Buffer {
+  constructor(name) {
+    let contents = '';
+    contents += 'Welcome aboard EVLambda.\n';
+    contents += 'EVLambda is provided \'as is\' and without any warranties.\n';
+    contents += 'See LICENSE and Terms of Service for details.\n';
+    contents += '\n';
+    contents += '> \u{E0001}\u{E0065}\u{E0076}\u{E006C}';
+    super(contents, false, contents.length);
+    this.name = name;
+  }
+  bufferMenuEntry() {
+    return this.name;
+  }
+  statusbarMessage() {
+    //return this.name + ' ' + dumpBufferTransactions(this.transactions);
+    return this.name;
+  }
+  type() {
+    return 'ListenerBuffer';
+  }
+  language() {
+    return evlistenerLanguage;
+  }
+}
+
+function isListenerBuffer(buffer) {
+  return buffer instanceof ListenerBuffer;
+}
+
+function createListenerBuffer(name) {
+  return new ListenerBuffer(name);
+}
+
+function findListenerBuffer(state, name) {
+  for (const buffer of state.buffers.values()) {
+    if (buffer instanceof ListenerBuffer && buffer.name === name) {
+      return buffer;
+    }
+  }
+  return null;
+}
+
+/**********/
+/* Window */
+/**********/
+
+class Window {
+  static #id = 0;
+  constructor(position, bufferId, htmlMode) {
+    this.id = Window.#id++;
+    this.position = position;
+    this.bufferId = bufferId;
+    this.htmlMode = htmlMode;
+  }
+}
+
+function createWindow(position, buffer) {
+  return new Window(position, buffer.id, buffer.defaultHTMLMode());
+}
+
+function comparePositions(x, y) {
+  // order is left to right, top to bottom
+  for (let i = 0; i < Math.min(x.length, y.length); i++) {
+    const xi = x.at(i);
+    const yi = y.at(i);
+    if (xi === yi) {
+      continue;
+    } else if (xi === 'L' || xi === 'T') {
+      return -1;
+    } else {
+      return 1;
+    }
+  }
+  return 0;
+}
+
+function getSortedWindowPositions(state) {
+  const positions = Array.from(state.windows.values()).map(window => window.position);
+  positions.sort(comparePositions);
+  return positions;
+}
+
+function getPreviousWindowId(state, windowId) {
+  const window = state.windows.get(windowId);
+  const position = window.position;
+  const positions = getSortedWindowPositions(state);
+  const index = positions.indexOf(position);
+  const previousPosition = positions[index > 0 ? index - 1 : positions.length - 1];
+  for (const window of state.windows.values()) {
+    if (window.position === previousPosition) {
+      return window.id;
+    }
+  }
+}
+
+function getNextWindowId(state, windowId) {
+  const window = state.windows.get(windowId);
+  const position = window.position;
+  const positions = getSortedWindowPositions(state);
+  const index = positions.indexOf(position);
+  const nextPosition = positions[index < positions.length - 1 ? index + 1 : 0];
+  for (const window of state.windows.values()) {
+    if (window.position === nextPosition) {
+      return window.id;
+    }
+  }
+}
+
+/*****************/
+/* Initial State */
+/*****************/
+
+const systemFiles = [
+  'USER-MANUAL',
+  'TUTORIAL',
+  'REFERENCE-MANUAL',
+  'IMPLEMENTATION-NOTES',
+  'BIBLIOGRAPHY',
+  'LICENSE',
+  'core.js',
+  'mantle.evl',
+  //'docgen-sample.evl',
+  'evl2html.xslt',
+  'common.css',
+  'common.js'
+];
+
+let fileSystemIsWritable;
+let zippedSystemFiles;
+
+export function createInitialState() {
+  const state = {
+    selectedEvaluator: 'trampolinepp',
+    selectedWindowId: 1,
+    focusedWindowId: [1],
+    maximizedState: false,
+    needTrimming: 0
+  };
+  loadSettings(state);
+  const url = new URL('/fs/system/get-capabilities', window.location.href);
+  return fetch(url)
+    .then(response => {
+      if (response.ok) {
+        return response.json();
+      } else {
+        throw new Error('/fs/system/get-capabilities');
+      }
+    })
+    .then(json => {
+      fileSystemIsWritable = json.writable;
+      if (fileSystemIsWritable) {
+        return Promise.all(systemFiles.map(systemFile => {
+          const url = new URL('/fs/system/get-file-contents', window.location.href);
+          url.searchParams.set('pathname', '/' + systemFile);
+          return fetch(url)
+            .then(response => {
+              if (response.ok) {
+                return response.text();
+              } else {
+                throw new Error('/fs/system/get-file-contents');
+              }
+            })
+            .then(text => {
+              return text;
+            });
+        }));
+      } else {
+        const url = new URL('/ide/system-files.zip', window.location.href);
+        return fetch(url)
+          .then(response => {
+            if (response.ok) {
+              return response.arrayBuffer();
+            } else {
+              throw new Error('/ide/system-files.zip');
+            }
+          })
+          .then(arrayBuffer => {
+            return JSZip.loadAsync(arrayBuffer);
+          })
+          .then(zip => {
+            zippedSystemFiles = zip;
+            return Promise.all(systemFiles.map(systemFile =>
+              zippedSystemFiles.file(systemFile).async('string')
+            ));
+          });
+      }
+    })
+    .then(systemFilesContents => {
+      state.buffers = new Map();
+      for (let i = 0; i < systemFiles.length; i++) {
+        const buffer = createFileBuffer('/system/' + systemFiles[i], systemFilesContents[i]);
+        state.buffers.set(buffer.id, buffer);
+      }
+      for (const name of ['Listener 1']) {
+        const buffer = createListenerBuffer(name);
+        state.buffers.set(buffer.id, buffer);
+      }
+      state.windows = new Map();
+      for (const [position, buffer] of [
+        ['L', findFileBuffer(state, '/system/USER-MANUAL')],
+        ['R', findListenerBuffer(state, 'Listener 1')]
+      ]) {
+        const window = createWindow(position, buffer);
+        state.windows.set(window.id, window);
+      }
+      return createEvaluator(coreFile(state), evlFiles(state), state.selectedEvaluator);
+    })
+    .then(response => {
+      state.message = [formatForMinibuffer(response)];
+      return state;
+    });
+}
+
+function loadSettings(state) {
+  let settings = {};
+  const storage = getLocalStorage();
+  if (storage) {
+    const json = storage.getItem('org.evlambda.ide.settings');
+    if (json) {
+      try {
+        settings = JSON.parse(json);
+      } catch(error) {
+        // SyntaxError
+      }
+    }
+  }
+  state.colorScheme = settings.colorScheme ?? 'light';
+  state.fontSize = settings.fontSize ?? '16px';
+}
+
+function coreFile(state) {
+  return findFileBuffer(state, '/system/core.js').editorState().sliceDoc();
+}
+
+function evlFiles(state) {
+  return Array.from(state.buffers.values()).filter(isEVLBuffer).map(buffer => buffer.editorState().sliceDoc());
+}
+
+/***********/
+/* Reducer */
+/***********/
+
+export const actions = {};
+
+export function reducer(state, action) {
+  return actions[action.type].next(state, action);
+}
+
+// IDEBufferView.onFocus
+// IDEStatusbar.onClick
+// iframe.onFocus
+actions.selectWindow = {
+  next: (state, action) => {
+    const {windowId, focus} = action;
+    if (state.windows.has(windowId)) {
+      if (focus) {
+        return copyInstance(state, {
+          selectedWindowId: windowId,
+          focusedWindowId: [windowId]
+        });
+      } else {
+        return copyInstance(state, {
+          selectedWindowId: windowId
+        });
+      }
+    } else {
+      return state;
+    }
+  }
+};
+
+actions.saveBuffer = {
+  init: state => {
+    const window = state.windows.get(state.selectedWindowId);
+    const buffer = state.buffers.get(window.bufferId);
+    if (isFileBuffer(buffer) && fileSystemIsWritable && !window.htmlMode) {
+      return {
+        type: 'saveBuffer',
+        bufferId: buffer.id,
+        unifiedPathname: buffer.unifiedPathname,
+        doc: buffer.editorState().doc
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    const {unifiedPathname, doc} = action;
+    putFileContents(unifiedPathname, doc.toString())
+      .then(() => {
+        dispatch(action);
+      })
+      .catch(error => {
+        dispatch(copyInstance(action, {
+          error: error
+        }));
+      });
+  },
+  next: (state, action) => {
+    const {bufferId, unifiedPathname, doc, error} = action;
+    if (state.buffers.has(bufferId)) {
+      if (!error) {
+        const buffer = state.buffers.get(bufferId);
+        return copyInstance(state, {
+          buffers: copyMap(state.buffers, bufferId, copyInstance(buffer, {
+            cleanDoc: doc,
+            clean: buffer.editorState().doc.eq(doc)
+          })),
+          message: [`Saved '${unifiedPathname}'.`]
+        });
+      } else {
+        return copyInstance(state, {
+          message: [error.message]
+        });
+      }
+    } else {
+      return state;
+    }
+  },
+  shortcut: os.name === 'Mac OS' ? 'Meta+s' : 'Ctrl+s'
+};
+
+actions.revertBuffer = {
+  init: state => {
+    const window = state.windows.get(state.selectedWindowId);
+    const buffer = state.buffers.get(window.bufferId);
+    if (isFileBuffer(buffer) && !window.htmlMode) {
+      return {
+        type: 'revertBuffer',
+        bufferId: buffer.id,
+        unifiedPathname: buffer.unifiedPathname
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    const {unifiedPathname} = action;
+    if (fileSystemIsWritable) {
+      getFileContents(unifiedPathname)
+        .then(contents => {
+          dispatch(copyInstance(action, {
+            contents: contents
+          }));
+        })
+        .catch(error => {
+          dispatch(copyInstance(action, {
+            error: error
+          }));
+        });
+    } else {
+      zippedSystemFiles
+        .file(unifiedPathnamePathname(unifiedPathname).substring(1))
+        .async('string')
+        .then(contents => {
+          dispatch(copyInstance(action, {
+            contents: contents
+          }));
+        })
+        .catch(error => {
+          dispatch(copyInstance(action, {
+            error: error
+          }));
+        });
+    }
+  },
+  next: (state, action) => {
+    const {bufferId, unifiedPathname, contents, error} = action;
+    if (state.buffers.has(bufferId)) {
+      if (!error) {
+        const buffer = state.buffers.get(bufferId);
+        const nextTransactions = revertBuffer(buffer.transactions, contents);
+        return copyInstance(state, {
+          buffers: copyMap(state.buffers, bufferId, copyInstance(buffer, {
+            transactions: nextTransactions,
+            cleanDoc: nextTransactions.at(-1).state.doc,
+            clean: true
+          })),
+          needTrimming: state.needTrimming + 1,
+          message: [`Reverted '${unifiedPathname}'.`]
+        });
+      } else {
+        return copyInstance(state, {
+          message: [error.message]
+        });
+      }
+    } else {
+      return state;
+    }
+  }
+};
+
+actions.toggleHTMLMode = {
+  init: state => {
+    const window = state.windows.get(state.selectedWindowId);
+    const buffer = state.buffers.get(window.bufferId);
+    if (isAllCapsBuffer(buffer) || isEVLBuffer(buffer)) {
+      return {
+        type: 'toggleHTMLMode',
+        windowId: window.id,
+        bufferId: buffer.id,
+        htmlMode: !window.htmlMode
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {windowId, bufferId, htmlMode} = action;
+    if (state.windows.has(windowId)) {
+      const window = state.windows.get(windowId);
+      if (window.bufferId === bufferId) {
+        return copyInstance(state, {
+          windows: copyMap(state.windows, windowId, copyInstance(window, {
+            htmlMode: htmlMode
+          })),
+          focusedWindowId: [windowId]
+        });
+      } else {
+        return state;
+      }
+    } else {
+      return state;
+    }
+  },
+  shortcut: os.name === 'Mac OS' ? 'Ctrl+Meta+h' : 'Ctrl+Alt+h'
+};
+
+actions.clearListener = {
+  init: state => {
+    const window = state.windows.get(state.selectedWindowId);
+    const buffer = state.buffers.get(window.bufferId);
+    if (isListenerBuffer(buffer)) {
+      return {
+        type: 'clearListener',
+        bufferId: buffer.id
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {bufferId} = action;
+    if (state.buffers.has(bufferId)) {
+      const buffer = state.buffers.get(bufferId);
+      const nextTransactions = clearListener(buffer.transactions);
+      return copyInstance(state, {
+        buffers: copyMap(state.buffers, bufferId, copyInstance(buffer, {
+          transactions: nextTransactions,
+          clean: nextTransactions.at(-1).state.doc.eq(buffer.cleanDoc)
+        })),
+        needTrimming: state.needTrimming + 1
+      });
+    } else {
+      return state;
+    }
+  }
+};
+
+actions.changeSettings = {
+  init: state => {
+    return {
+      type: 'changeSettings'
+    };
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {colorScheme, fontSize} = action;
+    return copyInstance(state, {
+      colorScheme: colorScheme,
+      fontSize: fontSize
+    });
+  }
+};
+
+actions.evaluateForm = {
+  init: state => {
+    const window = state.windows.get(state.selectedWindowId);
+    const buffer = state.buffers.get(window.bufferId);
+    if (isEVLBuffer(buffer) && !window.htmlMode) {
+      return {
+        type: 'evaluateForm',
+        windowId: window.id
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    const {windowId} = action;
+    const element = document.getElementById('window' + windowId);
+    if (element) {
+      const editorView = EditorView.findFromDOM(element);
+      if (editorView) {
+        const editorState = editorView.state;
+        const form = findForm(editorState, editorState.selection.main.anchor);
+        if (form) {
+          const text = editorState.sliceDoc(form.from, form.to);
+          evaluateFirstForm(text)
+            .then(response => {
+              dispatch(copyInstance(action, {
+                response: response
+              }));
+            });
+        }
+      }
+    }
+  },
+  next: (state, action) => {
+    const {response} = action;
+    return copyInstance(state, {
+      message: [formatForMinibuffer(response)]
+    });
+  },
+  shortcut: os.name === 'Mac OS' ? 'Ctrl+Meta+e' : 'Ctrl+Alt+e'
+};
+
+actions.loadBuffer = {
+  init: state => {
+    const window = state.windows.get(state.selectedWindowId);
+    const buffer = state.buffers.get(window.bufferId);
+    if (isEVLBuffer(buffer) && !window.htmlMode) {
+      return {
+        type: 'loadBuffer',
+        text: buffer.editorState().sliceDoc()
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    const {text} = action;
+    evaluateAllForms(text)
+      .then(response => {
+        dispatch(copyInstance(action, {
+          response: response
+        }));
+      });
+  },
+  next: (state, action) => {
+    const {response} = action;
+    return copyInstance(state, {
+      message: [formatForMinibuffer(response)]
+    });
+  },
+  shortcut: os.name === 'Mac OS' ? 'Ctrl+Meta+l' : 'Ctrl+Alt+l'
+};
+
+actions.abortEvaluation = {
+  init: state => {
+    return {
+      type: 'abortEvaluation'
+    };
+  },
+  exec: (dispatch, action) => {
+    abortEvaluation();
+  }
+};
+
+actions.restartEvaluator = {
+  init: state => {
+    return {
+      type: 'restartEvaluator',
+      coreFile: coreFile(state),
+      evlFiles: evlFiles(state)
+    };
+  },
+  exec: (dispatch, action) => {
+    const {coreFile, evlFiles, selectedEvaluator} = action;
+    createEvaluator(coreFile, evlFiles, selectedEvaluator)
+      .then(response => {
+        dispatch(copyInstance(action, {
+          response: response
+        }));
+      });
+  },
+  next: (state, action) => {
+    const {selectedEvaluator, response} = action;
+    return copyInstance(state, {
+      selectedEvaluator: selectedEvaluator,
+      message: [formatForMinibuffer(response)]
+    });
+  }
+};
+
+actions.selectPreviousWindow = {
+  init: state => {
+    if (!state.maximizedState && state.windows.size > 1) {
+      return {
+        type: 'selectPreviousWindow',
+        windowId: state.selectedWindowId
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {windowId} = action;
+    if (state.windows.has(windowId) && !state.maximizedState && state.windows.size > 1) {
+      const previousWindowId = getPreviousWindowId(state, windowId);
+      return copyInstance(state, {
+        selectedWindowId: previousWindowId,
+        focusedWindowId: [previousWindowId]
+      });
+    } else {
+      return state;
+    }
+  },
+  shortcut: os.name === 'Mac OS' ? 'Ctrl+Meta+ArrowLeft' : 'Ctrl+Alt+ArrowLeft'
+};
+
+actions.selectNextWindow = {
+  init: state => {
+    if (!state.maximizedState && state.windows.size > 1) {
+      return {
+        type: 'selectNextWindow',
+        windowId: state.selectedWindowId
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {windowId} = action;
+    if (state.windows.has(windowId) && !state.maximizedState && state.windows.size > 1) {
+      const nextWindowId = getNextWindowId(state, windowId);
+      return copyInstance(state, {
+        selectedWindowId: nextWindowId,
+        focusedWindowId: [nextWindowId]
+      });
+    } else {
+      return state;
+    }
+  },
+  shortcut: os.name === 'Mac OS' ? 'Ctrl+Meta+ArrowRight' : 'Ctrl+Alt+ArrowRight'
+};
+
+actions.toggleMaximizedState = {
+  init: state => {
+    if (state.windows.size > 1) {
+      return {
+        type: 'toggleMaximizedState',
+        maximizedState: !state.maximizedState
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {maximizedState} = action;
+    if (state.windows.size > 1) {
+      return copyInstance(state, {
+        maximizedState: maximizedState
+      });
+    } else {
+      return state;
+    }
+  },
+  shortcut: os.name === 'Mac OS' ? 'Ctrl+Meta+m' : 'Ctrl+Alt+m'
+};
+
+actions.deleteThisWindow = {
+  init: state => {
+    if (!state.maximizedState && state.windows.size > 1) {
+      return {
+        type: 'deleteThisWindow',
+        windowId: state.selectedWindowId
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {windowId} = action;
+    if (state.windows.has(windowId) && !state.maximizedState && state.windows.size > 1) {
+      const window = state.windows.get(windowId);
+      const position = window.position;
+      const positionLength = position.length;
+      const positionPrefix = position.substring(0, positionLength - 1);
+      let selectedWindowId;
+      switch (position.at(-1)) {
+        case 'L':
+        case 'T':
+          selectedWindowId = getNextWindowId(state, windowId);
+          break;
+        case 'R':
+        case 'B':
+          selectedWindowId = getPreviousWindowId(state, windowId);
+          break;
+      }
+      const nextState = copyInstance(state, {
+        windows: new Map()
+      });
+      for (const window of state.windows.values()) {
+        if (window.id === windowId) {
+          // delete window
+        } else if (window.position.startsWith(positionPrefix)) {
+          nextState.windows.set(window.id, copyInstance(window, {
+            position: positionPrefix + window.position.substring(positionLength)
+          }));
+        } else {
+          nextState.windows.set(window.id, window);
+        }
+      }
+      nextState.selectedWindowId = selectedWindowId;
+      nextState.focusedWindowId = [selectedWindowId];
+      return nextState;
+    } else {
+      return state;
+    }
+  }
+  //shortcut: [os.name === 'Mac OS' ? 'Ctrl+Meta+x' : 'Ctrl+Alt+x', '0']
+};
+
+actions.deleteOtherWindows = {
+  init: state => {
+    if (!state.maximizedState && state.windows.size > 1) {
+      return {
+        type: 'deleteOtherWindows',
+        windowId: state.selectedWindowId
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {windowId} = action;
+    if (state.windows.has(windowId) && !state.maximizedState && state.windows.size > 1) {
+      const nextState = copyInstance(state, {
+        windows: new Map()
+      });
+      for (const window of state.windows.values()) {
+        if (window.id === windowId) {
+          nextState.windows.set(window.id, copyInstance(window, {
+            position: ''
+          }));
+        } else {
+          // delete window
+        }
+      }
+      return nextState;
+    } else {
+      return state;
+    }
+  }
+  //shortcut: [os.name === 'Mac OS' ? 'Ctrl+Meta+x' : 'Ctrl+Alt+x', '1']
+};
+
+actions.splitWindowVertically = {
+  init: state => {
+    if (!state.maximizedState) {
+      return {
+        type: 'splitWindowVertically',
+        windowId: state.selectedWindowId
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {windowId} = action;
+    if (state.windows.has(windowId) && !state.maximizedState) {
+      const window = state.windows.get(windowId);
+      const buffer = state.buffers.get(window.bufferId);
+      const position = window.position;
+      const windows = Array.from(state.windows.values());
+      const index = windows.findIndex(window => window.id === windowId);
+      windows[index] = copyInstance(windows[index], {
+        position: position + 'T'
+      });
+      windows.splice(index + 1, 0, createWindow(position + 'B', buffer));
+      return copyInstance(state, {
+        windows: new Map(windows.map(window => [window.id, window]))
+      });
+    } else {
+      return state;
+    }
+  }
+  //shortcut: [os.name === 'Mac OS' ? 'Ctrl+Meta+x' : 'Ctrl+Alt+x', '2']
+};
+
+actions.splitWindowHorizontally = {
+  init: state => {
+    if (!state.maximizedState) {
+      return {
+        type: 'splitWindowHorizontally',
+        windowId: state.selectedWindowId
+      };
+    } else {
+      return null;
+    }
+  },
+  exec: (dispatch, action) => {
+    dispatch(action);
+  },
+  next: (state, action) => {
+    const {windowId} = action;
+    if (state.windows.has(windowId) && !state.maximizedState) {
+      const window = state.windows.get(windowId);
+      const buffer = state.buffers.get(window.bufferId);
+      const position = window.position;
+      const windows = Array.from(state.windows.values());
+      const index = windows.findIndex(window => window.id === windowId);
+      windows[index] = copyInstance(windows[index], {
+        position: position + 'L'
+      });
+      windows.splice(index + 1, 0, createWindow(position + 'R', buffer));
+      return copyInstance(state, {
+        windows: new Map(windows.map(window => [window.id, window]))
+      });
+    } else {
+      return state;
+    }
+  }
+  //shortcut: [os.name === 'Mac OS' ? 'Ctrl+Meta+x' : 'Ctrl+Alt+x', '3']
+};
+
+actions.switchBuffer = {
+  next: (state, action) => {
+    const {windowId, bufferId} = action;
+    if (state.windows.has(windowId) && state.buffers.has(bufferId)) {
+      const window = state.windows.get(windowId);
+      const buffer = state.buffers.get(bufferId);
+      return copyInstance(state, {
+        windows: copyMap(state.windows, windowId, copyInstance(window, {
+          bufferId: bufferId,
+          htmlMode: buffer.defaultHTMLMode()
+        })),
+        focusedWindowId: [windowId]
+      });
+    } else {
+      return state;
+    }
+  }
+};
+
+actions.updateBufferTransactions = {
+  next: (state, action) => {
+    const {bufferId, transaction} = action;
+    if (state.buffers.has(bufferId)) {
+      const buffer = state.buffers.get(bufferId);
+      const nextTransactions = updateBufferTransactions(buffer.transactions, transaction);
+      return copyInstance(state, {
+        buffers: copyMap(state.buffers, bufferId, copyInstance(buffer, {
+          transactions: nextTransactions,
+          clean: nextTransactions.at(-1).state.doc.eq(buffer.cleanDoc)
+        })),
+        needTrimming: state.needTrimming + 1
+      });
+    } else {
+      return state;
+    }
+  }
+};
+
+actions.trimBufferTransactions = {
+  next: (state, action) => {
+    // buffer transactions are trimmed in place
+    for (const buffer of state.buffers.values()) {
+      trimBufferTransactions(buffer.transactions);
+    }
+    return state;
+  }
+};
+
+actions.applyBufferCommand = {
+  next: (state, action) => {
+    const {bufferId, originatingWindowId, command} = action;
+    if (state.buffers.has(bufferId)) {
+      const buffer = state.buffers.get(bufferId);
+      const nextTransactions = applyBufferCommand(buffer.transactions, originatingWindowId, command);
+      return copyInstance(state, {
+        buffers: copyMap(state.buffers, bufferId, copyInstance(buffer, {
+          transactions: nextTransactions,
+          clean: nextTransactions.at(-1).state.doc.eq(buffer.cleanDoc)
+        })),
+        needTrimming: state.needTrimming + 1
+      });
+    } else {
+      return state;
+    }
+  }
+};
+
+actions.appendToListener = {
+  next: (state, action) => {
+    const {bufferId, originatingWindowId, formStart, formEnd, response} = action;
+    if (state.buffers.has(bufferId)) {
+      const buffer = state.buffers.get(bufferId);
+      const nextTransactions = appendToListener(buffer.transactions, originatingWindowId, formStart, formEnd, formatForListener(response));
+      return copyInstance(state, {
+        buffers: copyMap(state.buffers, bufferId, copyInstance(buffer, {
+          transactions: nextTransactions,
+          clean: nextTransactions.at(-1).state.doc.eq(buffer.cleanDoc)
+        })),
+        needTrimming: state.needTrimming + 1
+      });
+    } else {
+      return state;
+    }
+  }
+};
diff --git a/src/styles.scss b/src/styles.scss
deleted file mode 100644 (file)
index a102c52..0000000
+++ /dev/null
@@ -1,510 +0,0 @@
-/* SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck */
-/* SPDX-License-Identifier: BSD-3-Clause */
-
-/*********/
-/* Reset */
-/*********/
-
-button {
-  all: unset;
-}
-
-* {
-  outline: none;
-  user-select: none;
-}
-
-.contentsAreaRoot * {
-  user-select: initial;
-}
-
-/**********/
-/* Colors */
-/**********/
-
-@import '@radix-ui/colors/gray.css';
-@import '@radix-ui/colors/gray-alpha.css';
-@import '@radix-ui/colors/indigo.css';
-
-$gray1: var(--gray-1);
-$gray2: var(--gray-2);
-$gray3: var(--gray-3);
-$gray4: var(--gray-4);
-$gray5: var(--gray-5);
-$gray6: var(--gray-6);
-$gray7: var(--gray-7);
-$gray8: var(--gray-8);
-$gray9: var(--gray-9);
-$gray10: var(--gray-10);
-$gray11: var(--gray-11);
-$gray12: var(--gray-12);
-
-$grayA1: var(--gray-a1);
-$grayA2: var(--gray-a2);
-$grayA3: var(--gray-a3);
-$grayA4: var(--gray-a4);
-$grayA5: var(--gray-a5);
-$grayA6: var(--gray-a6);
-$grayA7: var(--gray-a7);
-$grayA8: var(--gray-a8);
-$grayA9: var(--gray-a9);
-$grayA10: var(--gray-a10);
-$grayA11: var(--gray-a11);
-$grayA12: var(--gray-a12);
-
-$primary1: var(--indigo-1);
-$primary2: var(--indigo-2);
-$primary3: var(--indigo-3);
-$primary4: var(--indigo-4);
-$primary5: var(--indigo-5);
-$primary6: var(--indigo-6);
-$primary7: var(--indigo-7);
-$primary8: var(--indigo-8);
-$primary9: var(--indigo-9);
-$primary10: var(--indigo-10);
-$primary11: var(--indigo-11);
-$primary12: var(--indigo-12);
-
-$appBgColor: $gray2;
-$appFgColor: black;
-
-$textButtonBgColor: transparent;
-$textButtonFgColor: currentcolor;
-$textButtonBgColorHover: $primary7;
-$textButtonFgColorHover: currentcolor;
-$textButtonBgColorActive: $primary8;
-$textButtonFgColorActive: currentcolor;
-
-$filledButtonBgColor: $primary6;
-$filledButtonFgColor: currentcolor;
-$filledButtonBgColorHover: $primary7;
-$filledButtonFgColorHover: currentcolor;
-$filledButtonBgColorActive: $primary8;
-$filledButtonFgColorActive: currentcolor;
-
-$menubarRootBgColor: $gray2;
-$menubarRootFgColor: black;
-
-$menubarTriggerBgColor: transparent;
-$menubarTriggerFgColor: currentcolor;
-$menubarTriggerBgColorHighlighted: $primary7;
-$menubarTriggerFgColorHighlighted: currentcolor;
-$menubarTriggerBgColorOpen: $primary8;
-$menubarTriggerFgColorOpen: currentcolor;
-
-$menubarContentBgColor: white;
-$menubarContentFgColor: black;
-$menubarContentBorderColor: black;
-
-$menubarItemBgColor: transparent;
-$menubarItemFgColor: currentcolor;
-$menubarItemBgColorHighlighted: $primary8;
-$menubarItemFgColorHighlighted: currentcolor;
-$menubarItemBgColorDisabled: transparent;
-$menubarItemFgColorDisabled: $gray6;
-
-$menubarSeparatorColor: $gray6;
-
-$infobarRootBgColor: $gray2;
-$infobarRootFgColor: black;
-
-$infobarItemBgColor: $gray6;
-$infobarItemFgColor: currentcolor;
-
-$windowDividerColor: black;
-
-$toolbarRootBgColor: $gray2;
-$toolbarRootFgColor: black;
-$toolbarRootBgColorSelected: $gray4;
-$toolbarRootFgColorSelected: black;
-
-$contentsAreaRootBgColor: white;
-$contentsAreaRootFgColor: black;
-
-$statusbarRootBgColor: $gray2;
-$statusbarRootFgColor: black;
-$statusbarRootBgColorSelected: $gray4;
-$statusbarRootFgColorSelected: black;
-
-$dialogOverlay: $grayA9;
-
-$dialogContentBgColor: white;
-$dialogContentFgColor: black;
-
-$dialogButtonBgColor: transparent;
-$dialogButtonFgColor: currentcolor;
-$dialogButtonBorderColor: black;
-$dialogButtonBgColorHover: $gray7;
-$dialogButtonFgColorHover: currentcolor;
-$dialogButtonBgColorActive: $gray8;
-$dialogButtonFgColorActive: currentcolor;
-
-$outlineColor: black;
-
-/***************/
-/* Page Layout */
-/***************/
-
-body {
-  font-family: Arial, sans-serif;
-  line-height: 1.4;
-  margin: 0;
-  padding: 0;
-}
-
-#wrapper {
-  width: 100vw;
-  height: 100vh;
-  display: flex;
-  flex-direction: column;
-  background-color: $appBgColor;
-  color: $appFgColor;
-}
-
-header {
-  flex: 0 0 auto;
-  display: flex;
-  flex-direction: row;
-  justify-content: space-between;
-}
-
-section {
-  flex: 1 0 auto;
-  position: relative;
-  background-color: $windowDividerColor;
-}
-
-footer {
-  flex: 0 0 auto;
-}
-
-/**************/
-/* TextButton */
-/**************/
-
-.textButton {
-  padding: 0 5px;
-  background-color: $textButtonBgColor;
-  color: $textButtonFgColor;
-}
-
-.textButton:hover, .textButton:focus {
-  background-color: $textButtonBgColorHover;
-  color: $textButtonFgColorHover;
-}
-
-.textButton:active {
-  background-color: $textButtonBgColorActive;
-  color: $textButtonFgColorActive;
-}
-
-/****************/
-/* FilledButton */
-/****************/
-
-.filledButton {
-  padding: 0 5px;
-  background-color: $filledButtonBgColor;
-  color: $filledButtonFgColor;
-}
-
-.filledButton:hover, .filledButton:focus {
-  background-color: $filledButtonBgColorHover;
-  color: $filledButtonFgColorHover;
-}
-
-.filledButton:active {
-  background-color: $filledButtonBgColorActive;
-  color: $filledButtonFgColorActive;
-}
-
-/***********/
-/* Menubar */
-/***********/
-
-.menubarRoot {
-  padding: 2px 4px;
-  display: flex;
-  flex-direction: row;
-  gap: 10px;
-  background-color: $menubarRootBgColor;
-  color: $menubarRootFgColor;
-}
-
-.menubarTrigger {
-  padding: 0 5px;
-  background-color: $menubarTriggerBgColor;
-  color: $menubarTriggerFgColor;
-}
-
-.menubarTrigger[data-highlighted] {
-  background-color: $menubarTriggerBgColorHighlighted;
-  color: $menubarTriggerFgColorHighlighted;
-}
-
-.menubarTrigger[data-state='open'] {
-  background-color: $menubarTriggerBgColorOpen;
-  color: $menubarTriggerFgColorOpen;
-}
-
-.menubarContent {
-  box-shadow: 0 0 0 1px $menubarContentBorderColor;
-  padding: 5px;
-  background-color: $menubarContentBgColor;
-  color: $menubarContentFgColor;
-}
-
-.menubarItem {
-  padding: 3px 5px;
-  position: relative;
-  display: flex;
-  flex-direction: row;
-  background-color: $menubarItemBgColor;
-  color: $menubarItemFgColor;
-}
-
-.menubarItem[data-highlighted] {
-  background-color: $menubarItemBgColorHighlighted;
-  color: $menubarItemFgColorHighlighted;
-}
-
-.menubarItem[data-disabled] {
-  background-color: $menubarItemBgColorDisabled;
-  color: $menubarItemFgColorDisabled;
-}
-
-.menubarItem.inset {
-  padding-left: 20px;
-}
-
-.menubarItemIndicator {
-  position: absolute;
-  left: 0;
-  top: 50%;
-  transform: translateY(-50%);
-  width: 20px;
-  display: inline-flex;
-  justify-content: center;
-  align-items: center;
-
-}
-
-.menubarRightSlot {
-  margin-left: auto;
-  padding-left: 20px
-}
-
-.menubarSeparator {
-  margin: 3px 0;
-  height: 1px;
-  background-color: $menubarSeparatorColor;
-}
-
-/***********/
-/* Infobar */
-/***********/
-
-.infobarRoot {
-  padding: 2px 4px;
-  display: flex;
-  flex-direction: row;
-  gap: 10px;
-  background-color: $infobarRootBgColor;
-  color: $infobarRootFgColor;
-}
-
-.infobarItem {
-  padding: 0 5px;
-  background-color: $infobarItemBgColor;
-  color: $infobarItemFgColor;
-}
-
-/**********/
-/* Window */
-/**********/
-
-.tilingWindow {
-  position: absolute;
-  display: flex;
-  flex-direction: column;
-}
-
-.fillingWindow {
-  width: 100%;
-  height: 100%;
-  display: flex;
-  flex-direction: column;
-}
-
-.windowToolbar {
-  flex: 0 0 auto;
-}
-
-.windowContentsArea {
-  flex: 1 0 auto;
-}
-
-.windowStatusbar {
-  flex: 0 0 auto;
-}
-
-/***********/
-/* Toolbar */
-/***********/
-
-.toolbarRoot {
-  padding: 2px 4px;
-  display: flex;
-  flex-direction: row;
-  gap: 10px;
-  background-color: $toolbarRootBgColor;
-  color: $toolbarRootFgColor;
-}
-
-.toolbarRoot[data-selected] {
-  background-color: $toolbarRootBgColorSelected;
-  color: $toolbarRootFgColorSelected;
-}
-
-.toolbarButton {
-  padding: 0 5px;
-  background-color: $textButtonBgColor;
-  color: $textButtonFgColor;
-}
-
-.toolbarButton:hover, .toolbarButton:focus {
-  background-color: $textButtonBgColorHover;
-  color: $textButtonFgColorHover;
-}
-
-.toolbarButton:active {
-  background-color: $textButtonBgColorActive;
-  color: $textButtonFgColorActive;
-}
-
-/****************/
-/* ContentsArea */
-/****************/
-
-.contentsAreaRoot {
-  width: 100%;
-  height: 100%;
-  box-sizing: border-box;
-  padding: 1px;
-  background-color: $contentsAreaRootBgColor;
-  color: $contentsAreaRootFgColor;
-}
-
-/*************/
-/* Statusbar */
-/*************/
-
-.statusbarRoot {
-  padding: 2px 4px;
-  background-color: $statusbarRootBgColor;
-  color: $statusbarRootFgColor;
-  white-space: nowrap;
-}
-
-.statusbarRoot[data-selected] {
-  background-color: $statusbarRootBgColorSelected;
-  color: $statusbarRootFgColorSelected;
-}
-
-/**********/
-/* Dialog */
-/**********/
-
-.dialogOverlay {
-  position: fixed;
-  inset: 0;
-  background-color: $dialogOverlay;
-}
-
-.dialogContent {
-  position: fixed;
-  top: 50%;
-  left: 50%;
-  transform: translate(-50%, -50%);
-  min-width: 200px;
-  padding: 10px;
-  background-color: $dialogContentBgColor;
-  color: $dialogContentFgColor;
-}
-
-.dialogTitle {
-  font-size: larger;
-  font-weight: bolder;
-}
-
-.dialogButtons {
-  display: flex;
-  flex-direction: row;
-  justify-content: flex-end;
-  gap: 10px;
-}
-
-.dialogButton {
-  border: 1px solid $dialogButtonBorderColor;
-  padding: 0 5px;
-  background-color: $dialogButtonBgColor;
-  color: $dialogButtonFgColor;
-}
-
-.dialogButton:hover, .dialogButton:focus {
-  background-color: $dialogButtonBgColorHover;
-  color: $dialogButtonFgColorHover;
-}
-
-.dialogButton:active {
-  background-color: $dialogButtonBgColorActive;
-  color: $dialogButtonFgColorActive;
-}
-
-/**************/
-/* CodeMirror */
-/**************/
-
-/* https://discuss.codemirror.net/t/size-inside-flexbox/1359 */
-.cm-outer-container {
-  width: 100%;
-  height: 100%;
-  position: relative;
-}
-
-.cm-inner-container {
-  position: absolute;
-  inset: 0;
-}
-
-/**********/
-/* IFrame */
-/**********/
-
-iframe {
-  width: 100%;
-  height: 100%;
-  border: none;
-}
-
-/*****************/
-/* Miscellaneous */
-/*****************/
-
-ul.radio {
-  list-style-type: none;
-  margin: 0;
-  padding: 0;
-}
-
-li.radio {
-  padding: 2px;
-}
-
-li.radio:focus-within {
-  outline: 1px dotted $outlineColor;
-}
-
-.error {
-  margin: 1em;
-}
index d52c1b404af0830c8d5986a3b71d9130b4a51ca5..fd243aef249aecb731b324c2b1f76afd20041bab 100644 (file)
@@ -23,7 +23,6 @@ function isClientError (response) {
 const NULL_RESPONSE = 0;
 const TEXT_RESPONSE = 1;
 const JSON_RESPONSE = 2;
-const BLOB_RESPONSE = 3;
 
 function handleUFSResponse(response, kind) {
   switch (response.status) {
@@ -35,33 +34,31 @@ function handleUFSResponse(response, kind) {
           return response.text();
         case JSON_RESPONSE:
           return response.json();
-        case BLOB_RESPONSE:
-          return response.blob();
         default:
           throw new Error();
       }
     case 400:
-      return response.text(); // the body contains a plain text error message suitable to show to the user
+      return response.text();
     default:
       throw new Error(response.statusText);
   }
 }
 
-function handleUFSError(error, onError) {
+function handleUFSError(error) {
   if (error instanceof NetworkError) {
-    onError('The server is unreachable.');
+    throw new Error('The server is unreachable.');
   } else if (error instanceof ClientError) {
-    onError(error.message);
+    throw new Error(error.message);
   } else {
-    onError('Internal server error.');
+    throw new Error('Internal server error.');
   }
 }
 
-export function getFileSystemCapabilities(unifiedPathname, onSuccess, onFailure) {
+export function getFileSystemCapabilities(unifiedPathname) {
   let clientError = false;
   const fileSystemName = unifiedPathnameFileSystemName(unifiedPathname);
   const url = new URL('/fs/' + fileSystemName + '/get-capabilities', window.location.href);
-  fetch(url, {
+  return fetch(url, {
     method: 'GET'
   }).catch(() => {
     throw new NetworkError();
@@ -73,19 +70,19 @@ export function getFileSystemCapabilities(unifiedPathname, onSuccess, onFailure)
       throw new ClientError(data);
     } else {
       // data = {writable: <boolean>}
-      onSuccess(data);
+      return data;
     }
   }).catch(error => {
-    handleUFSError(error, onFailure);
+    handleUFSError(error);
   });
 }
 
-export function getFileContents(unifiedPathname, onSuccess, onFailure) {
+export function getFileContents(unifiedPathname) {
   let clientError = false;
   const fileSystemName = unifiedPathnameFileSystemName(unifiedPathname);
   const url = new URL('/fs/' + fileSystemName + '/get-file-contents', window.location.href);
   url.searchParams.set('pathname', unifiedPathnamePathname(unifiedPathname));
-  fetch(url, {
+  return fetch(url, {
     method: 'GET'
   }).catch(() => {
     throw new NetworkError();
@@ -97,19 +94,19 @@ export function getFileContents(unifiedPathname, onSuccess, onFailure) {
       throw new ClientError(data);
     } else {
       // data = <string>
-      onSuccess(data);
+      return data;
     }
   }).catch(error => {
-    handleUFSError(error, onFailure);
+    handleUFSError(error);
   });
 }
 
-export function putFileContents(unifiedPathname, contents, onSuccess, onFailure) {
+export function putFileContents(unifiedPathname, contents) {
   let clientError = false;
   const fileSystemName = unifiedPathnameFileSystemName(unifiedPathname);
   const url = new URL('/fs/' + fileSystemName + '/put-file-contents', window.location.href);
   url.searchParams.set('pathname', unifiedPathnamePathname(unifiedPathname));
-  fetch(url, {
+  return fetch(url, {
     method: 'PUT',
     headers: {'Content-Type': 'application/octet-stream'},
     body: contents
@@ -123,9 +120,9 @@ export function putFileContents(unifiedPathname, contents, onSuccess, onFailure)
       throw new ClientError(data);
     } else {
       // data = <null>
-      onSuccess();
+      return data;
     }
   }).catch(error => {
-    handleUFSError(error, onFailure);
+    handleUFSError(error);
   });
 }
index a9060bed0c7735b8cdea52e806c4be13736d6bf4..fea7658f6040483d0829733930699427641008b0 100644 (file)
@@ -1,6 +1,10 @@
 // SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck
 // SPDX-License-Identifier: BSD-3-Clause
 
+/************************/
+/* Immutability Helpers */
+/************************/
+
 export function copyInstance(instance, properties = {}) {
   return Object.assign(Object.create(Object.getPrototypeOf(instance)), instance, properties);
 }
@@ -11,8 +15,12 @@ export function copyMap(map, key, value) {
   return newMap;
 }
 
+/********/
+/* HTML */
+/********/
+
 export function htmlEscape(string) {
-  return string.replace(/[<>&'"]/g, (char) => {
+  return string.replace(/[<>&'"]/g, char => {
     switch (char) {
       case '<':
         return '&lt;';
@@ -27,3 +35,51 @@ export function htmlEscape(string) {
     }
   });
 }
+
+// https://html.spec.whatwg.org/multipage/syntax.html#void-elements
+const voidElements = [
+  'area',
+  'base',
+  'br',
+  'col',
+  'embed',
+  'hr',
+  'img',
+  'input',
+  'link',
+  'meta',
+  'source',
+  'track',
+  'wbr'
+];
+
+export function mapHTMLTags(contents, fn) {
+  const stack = [];
+  for (const match of contents.matchAll(/<(\/?)(\w+)(?:\s+\w+\s*=\s*'[^']*'|\s+\w+\s*=\s*"[^"]*")*\s*(\/?)>/g)) {
+    const elementName = match[2];
+    const isVoidElement = voidElements.includes(elementName);
+    const isStartTag = !isVoidElement && (match[1] === '' && match[3] === '');
+    const isEndTag = !isVoidElement && (match[1] === '/' && match[3] === '');
+    const isEmptyElementTag = isVoidElement || (match[1] === '' && match[3] === '/');
+    const index = match.index;
+    fn(stack, isStartTag, isEndTag, isEmptyElementTag, elementName, index);
+    if (isStartTag) {
+      stack.push(elementName);
+    }
+    if (isEndTag) {
+      stack.pop();
+    }
+  }
+}
+
+/*****************/
+/* Local Storage */
+/*****************/
+
+export function getLocalStorage() {
+  try {
+    return window.localStorage;
+  } catch(error) {
+    return undefined;
+  }
+}
index 5938c6061a71d6e41465b3bedcf16fa2f6eb725f..f8d94d6d1cccc712b7c2fdee5be636bda4eb7ab8 100644 (file)
@@ -6,7 +6,6 @@
     <meta charset="utf-8">
     <title>Bibliography</title>
     <link rel="stylesheet" href="___cssURL___"/>
-    <script>const windowId = ___windowId___;</script>
     <script src="___jsURL___"></script>
   </head>
   <body>
index 71dec285e92cdfa11a9a3da8927c2b4ed8ff252c..ba66c34d61933f2c4b202a0bc321aa5754f8c010 100644 (file)
@@ -6,7 +6,6 @@
     <meta charset="utf-8">
     <title>Implementation Notes</title>
     <link rel="stylesheet" href="___cssURL___"/>
-    <script>const windowId = ___windowId___;</script>
     <script src="___jsURL___"></script>
   </head>
   <body>
index ee80fe9d85c1b6afce4dd8311b5f65ac7b4665af..595ede1b1877a3371b3ecbc1acc35eadd0d32538 100644 (file)
@@ -6,7 +6,6 @@
     <meta charset="utf-8">
     <title>License</title>
     <link rel="stylesheet" href="___cssURL___"/>
-    <script>const windowId = ___windowId___;</script>
     <script src="___jsURL___"></script>
   </head>
   <body>
index aa84dd506e165852446acefea34eec28db76b9e8..f7d9e32e5fb1fca0b2859268845446cf5168524f 100644 (file)
@@ -6,7 +6,6 @@
     <meta charset="utf-8">
     <title>Reference Manual</title>
     <link rel="stylesheet" href="___cssURL___"/>
-    <script>const windowId = ___windowId___;</script>
     <script src="___jsURL___"></script>
   </head>
   <body>
@@ -48,7 +47,7 @@
     <h3>Introduction</h3>
     <h4>Listener Buffers</h4>
     <p>Let us examine what happens when the form <code>(+ 123 456)</code> is evaluated in a listener buffer:</p>
-    <pre class="repl">&gt; (+ 123 456)<br>579</pre>
+    <pre class="repl"><span class="form">&gt; (+ 123 456)</span><br>579</pre>
     <p>The process can be broken down into the following five steps:</p>
     <p><b>Step 1</b> The sequence of characters <span class="charseq"><span class="char">(</span><span class="char">+</span><span class="char">&nbsp;</span><span class="char">1</span><span class="char">2</span><span class="char">3</span><span class="char">&nbsp;</span><span class="char">4</span><span class="char">5</span><span class="char">6</span><span class="char">)</span></span> is read from the listener buffer.</p>
     <p><b>Step 2</b> The reader converts the sequence of characters <span class="charseq"><span class="char">(</span><span class="char">+</span><span class="char">&nbsp;</span><span class="char">1</span><span class="char">2</span><span class="char">3</span><span class="char">&nbsp;</span><span class="char">4</span><span class="char">5</span><span class="char">6</span><span class="char">)</span></span> into the list <code>(+ 123 456)</code>. (The sequence of characters is a readable representation of the list.) This step can be broken down into the following two substeps:</p>
     <h4>Ninjas</h4>
     <p>This section illustrates the use of the hash-string construct.</p>
     <p>The Unicode character &ldquo;NINJA&rdquo; ($\unicode{1F977}$, high-surrogate $\unicode{D83E}$, low-surrogate $\unicode{DD77}$) represents a ninja with a nonrealistic skin tone:</p>
-    <pre class="repl">&gt; '(#"&#x1F977;")<br>(#"\U{D83E}" #"\U{DD77}")<br><br>&gt; #0"&#x1F977;"<br>#"\U{D83E}"<br><br>&gt; #1"&#x1F977;"<br>#"\U{DD77}"</pre>
+    <pre class="repl"><span class="form">&gt; '(#"&#x1F977;")</span><br>(#"\U{D83E}" #"\U{DD77}")<br><br><span class="form">&gt; #0"&#x1F977;"</span><br>#"\U{D83E}"<br><br><span class="form">&gt; #1"&#x1F977;"</span><br>#"\U{DD77}"</pre>
     <p>It is possible to obtain a ninja with a realistic skin tone by combining the Unicode character "NINJA" with one of the following skin-tone modifiers:</p>
     <table class="plain">
       <tr><th>Name</th><th>Code Point</th><th>High-Surrogate</th><th>Low-Surrogate</th><th>Sample</th></tr>
       <tr><td>EMOJI MODIFIER FITZPATRICK TYPE-6</td><td>$\unicode{1F3FF}$</td><td>$\unicode{D83C}$</td><td>$\unicode{DFFF}$</td><td>&#x1F3FF;</td></tr>
     </table>
     <p>Here is the result of combining the Unicode character &ldquo;NINJA&rdquo; with the different skin-tone modifiers:</p>
-    <pre class="repl">&gt; '(#"&#x1F977;&#x1F3FB;")<br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFB}")<br><br>&gt; '(#"&#x1F977;&#x1F3FC;")<br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFC}")<br><br>&gt; '(#"&#x1F977;&#x1F3FD;")<br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFD}")<br><br>&gt; '(#"&#x1F977;&#x1F3FE;")<br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFE}")<br><br>&gt; '(#"&#x1F977;&#x1F3FF;")<br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFF}")<br><br></pre>
+    <pre class="repl"><span class="form">&gt; '(#"&#x1F977;&#x1F3FB;")</span><br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFB}")<br><br><span class="form">&gt; '(#"&#x1F977;&#x1F3FC;")</span><br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFC}")<br><br><span class="form">&gt; '(#"&#x1F977;&#x1F3FD;")</span><br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFD}")<br><br><span class="form">&gt; '(#"&#x1F977;&#x1F3FE;")</span><br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFE}")<br><br><span class="form">&gt; '(#"&#x1F977;&#x1F3FF;")</span><br>(#"\U{D83E}" #"\U{DD77}" #"\U{D83C}" #"\U{DFFF}")<br><br></pre>
     <h3>Parser</h3>
     <p>The parser uses a context-free grammar to convert the sequence of tokens produced by the tokenizer into a sequence of objects. The conversion is conceptually a two-step process. During the first step, the parser converts the sequence of tokens into a derivation tree. During the second step, the parser assigns a meaning to the derivation tree.</p>
     <p>The construction of the derivation tree is directed by the context-free grammar. Because the parser ignores the tokens' values and only takes into account the tokens' categories when constructing the derivation tree, the terminal symbols of the context-free grammar are the names of the token categories.</p>
       <tr><td><code>(a b c d . e)</code></td><td>$[\code{1},\code{2},\code{3}]$</td><td>N/A (error: too few arguments)</td></tr>
     </table>
     <p>Here is one way to reproduce the preceding examples using plain function calls and <code>_vlambda</code> forms:</p>
-    <pre class="repl">&gt; ((_vlambda (a b) (list a b)) 1 2 3)<br>EvaluatorError: too-many-arguments: Too many arguments.<br><br>&gt; ((_vlambda (a b c) (list a b c)) 1 2 3)<br>(1 2 3)<br><br>&gt; ((_vlambda (a b c d) (list a b c d)) 1 2 3)<br>EvaluatorError: too-few-arguments: Too few arguments.<br><br>&gt; ((_vlambda a (list a)) 1 2 3)<br>((1 2 3))<br><br>&gt; ((_vlambda (a . b) (list a b)) 1 2 3)<br>(1 (2 3))<br><br>&gt; ((_vlambda (a b . c) (list a b c)) 1 2 3)<br>(1 2 (3))<br><br>&gt; ((_vlambda (a b c . d) (list a b c d)) 1 2 3)<br>(1 2 3 ())<br><br>&gt; ((_vlambda (a b c d . e) (list a b c d e)) 1 2 3)<br>EvaluatorError: too-few-arguments: Too few arguments.</pre>
+    <pre class="repl"><span class="form">&gt; ((_vlambda (a b) (list a b)) 1 2 3)</span><br>EvaluatorError: too-many-arguments: Too many arguments.<br><br><span class="form">&gt; ((_vlambda (a b c) (list a b c)) 1 2 3)</span><br>(1 2 3)<br><br><span class="form">&gt; ((_vlambda (a b c d) (list a b c d)) 1 2 3)</span><br>EvaluatorError: too-few-arguments: Too few arguments.<br><br><span class="form">&gt; ((_vlambda a (list a)) 1 2 3)</span><br>((1 2 3))<br><br><span class="form">&gt; ((_vlambda (a . b) (list a b)) 1 2 3)</span><br>(1 (2 3))<br><br><span class="form">&gt; ((_vlambda (a b . c) (list a b c)) 1 2 3)</span><br>(1 2 (3))<br><br><span class="form">&gt; ((_vlambda (a b c . d) (list a b c d)) 1 2 3)</span><br>(1 2 3 ())<br><br><span class="form">&gt; ((_vlambda (a b c d . e) (list a b c d e)) 1 2 3)</span><br>EvaluatorError: too-few-arguments: Too few arguments.</pre>
     <h3>Evaluation Rules in Continuation-Passing Style</h3>
     <p>Elementary continuations:</p>
     <ul>
index 84e4608cc4098fb8402a7eb0ec7044161051e558..4ba421a6adfb0f8ff82491bec97d1faebaeced89 100644 (file)
@@ -6,7 +6,6 @@
     <meta charset="utf-8">
     <title>Tutorial</title>
     <link rel="stylesheet" href="___cssURL___"/>
-    <script>const windowId = ___windowId___;</script>
     <script src="___jsURL___"></script>
   </head>
   <body>
       <dt><code>(not $\boolean$)</code> &DoubleRightArrow; $\boolean$</dt>
       <dd>The function returns <code>#t</code> if $\boolean$ is <code>#f</code> and <code>#f</code> if $\boolean$ is <code>#t</code>.</dd>
     </dl>
-    <pre class="repl">&gt; (not #t)<br>#f<br><br>&gt; (not #f)<br>#t</pre>
+    <pre class="repl"><span class="form">&gt; (not #t)</span><br>#f<br><br><span class="form">&gt; (not #f)</span><br>#t</pre>
     <p>In the following two template macro calls, $\metavar{test-forms}$ matches any sequence of zero or more objects.</p>
     <dl>
       <dt><code>(and $\metavar{test-forms}$)</code></dt>
       <dd>The macro returns <code>#t</code> if all its arguments are <code>#t</code> and <code>#f</code> otherwise. The exact behavior of the macro is as follows: The test forms are evaluated in sequence from left to right. If a test form evaluates to an object that is not a boolean, then the following test forms are not evaluated and the evaluation of the macro call completes abruptly for a reason of type <code>error</code>. If a test form evaluates to <code>#f</code>, then the following test forms are not evaluated and the macro call evaluates to <code>#f</code>. If all test forms evaluate to <code>#t</code>, then the macro call evaluates to <code>#t</code>. Note that the previous condition is automatically satisfied if there are no test forms.</dd>
     </dl>
-    <pre class="repl">&gt; (and)<br>#t<br><br>&gt; (and #t)<br>#t<br><br>&gt; (and #f)<br>#f<br><br>&gt; (and #t #t)<br>#t<br><br>&gt; (and #t #f)<br>#f<br><br>&gt; (and #f #t)<br>#f<br><br>&gt; (and #f #f)<br>#f</pre>
+    <pre class="repl"><span class="form">&gt; (and)</span><br>#t<br><br><span class="form">&gt; (and #t)</span><br>#t<br><br><span class="form">&gt; (and #f)</span><br>#f<br><br><span class="form">&gt; (and #t #t)</span><br>#t<br><br><span class="form">&gt; (and #t #f)</span><br>#f<br><br><span class="form">&gt; (and #f #t)</span><br>#f<br><br><span class="form">&gt; (and #f #f)</span><br>#f</pre>
     <dl>
       <dt><code>(or $\metavar{test-forms}$)</code></dt>
       <dd>The macro returns <code>#f</code> if all its arguments are <code>#f</code> and <code>#t</code> otherwise. The exact behavior of the macro is as follows: The test forms are evaluated in sequence from left to right. If a test form evaluates to an object that is not a boolean, then the following test forms are not evaluated and the evaluation of the macro call completes abruptly for a reason of type <code>error</code>. If a test form evaluates to <code>#t</code>, then the following test forms are not evaluated and the macro call evaluates to <code>#t</code>. If all test forms evaluate to <code>#f</code>, then the macro call evaluates to <code>#f</code>. Note that the previous condition is automatically satisfied if there are no test forms.</dd>
     </dl>
-    <pre class="repl">&gt; (or)<br>#f<br><br>&gt; (or #t)<br>#t<br><br>&gt; (or #f)<br>#f<br><br>&gt; (or #t #t)<br>#t<br><br>&gt; (or #t #f)<br>#t<br><br>&gt; (or #f #t)<br>#t<br><br>&gt; (or #f #f)<br>#f</pre>
+    <pre class="repl"><span class="form">&gt; (or)</span><br>#f<br><br><span class="form">&gt; (or #t)</span><br>#t<br><br><span class="form">&gt; (or #f)</span><br>#f<br><br><span class="form">&gt; (or #t #t)</span><br>#t<br><br><span class="form">&gt; (or #t #f)</span><br>#t<br><br><span class="form">&gt; (or #f #t)</span><br>#t<br><br><span class="form">&gt; (or #f #f)</span><br>#f</pre>
     <p>The macros <code>and</code> and <code>or</code> stop evaluating the test forms as soon as they can determine that the result of the macro call is definitively true or definitively false. This short-circuiting behavior is possible only because <code>and</code> and <code>or</code> are macros. When a function call is evaluated, all the operand forms are always evaluated (unless the evaluation of the operator form completes abruptly or does not complete, the primary value of the operator form is not a function, or the evaluation of one of the operand forms other than the last one completes abruptly or does not complete).</p>
     <p>Here are two expansions illustrating the implementations of the macros <code>and</code> and <code>or</code>:</p>
     <ul>
       <dt><code>(+ $\number_1\ldots\number_n$)</code> &DoubleRightArrow; $\number$</dt>
       <dd>If the function is invoked on zero numbers, then the number <code>0</code> is returned. If the function is invoked on one number, then that number is returned. If the function is invoked on more than one number, then the result of adding those numbers from left to right is returned: the second number is added to the first number, then the third number is added to the partial result just computed, &hellip; The function <code>+</code> is a nonprimitive function built on top of the primitive function <code>_+</code>, which must be invoked on exactly two numbers.</dd>
     </dl>
-    <pre class="repl">&gt; (+)<br>0<br><br>&gt; (+ 1)<br>1<br><br>&gt; (+ 1 2)<br>3<br><br>&gt; (+ 1 2 3)<br>6</pre>
+    <pre class="repl"><span class="form">&gt; (+)</span><br>0<br><br><span class="form">&gt; (+ 1)</span><br>1<br><br><span class="form">&gt; (+ 1 2)</span><br>3<br><br><span class="form">&gt; (+ 1 2 3)</span><br>6</pre>
     <dl>
       <dt><code>(- $\number_1\ldots\number_n$)</code> &DoubleRightArrow; $\number$</dt>
       <dd>If the function is invoked on zero numbers, then the invocation completes abruptly for a reason of type <code>error</code>. If the function is invoked on one number, then the opposite of that number is returned. If the function is invoked on more than one number, then the result of subtracting those numbers from left to right is returned: the second number is subtracted from the first number, then the third number is subtracted from the partial result just computed, &hellip; The function <code>-</code> is a nonprimitive function built on top of the primitive function <code>_-</code>, which must be invoked on exactly two numbers.</dd>
     </dl>
-    <pre class="repl">&gt; (-)<br>EvaluatorError: program-error: Expecting at least one number.<br><br>&gt; (- 1)<br>-1<br><br>&gt; (- 0 1)<br>-1<br><br>&gt; (- 0 1 2)<br>-3<br><br>&gt; (- 0 1 2 3)<br>-6</pre>
+    <pre class="repl"><span class="form">&gt; (-)</span><br>EvaluatorError: program-error: Expecting at least one number.<br><br><span class="form">&gt; (- 1)</span><br>-1<br><br><span class="form">&gt; (- 0 1)</span><br>-1<br><br><span class="form">&gt; (- 0 1 2)</span><br>-3<br><br><span class="form">&gt; (- 0 1 2 3)</span><br>-6</pre>
     <dl>
       <dt><code>(* $\number_1\ldots\number_n$)</code> &DoubleRightArrow; $\number$</dt>
       <dd>If the function is invoked on zero numbers, then the number <code>1</code> is returned. If the function is invoked on one number, then that number is returned. If the function is invoked on more than one number, then the result of multiplying those numbers from left to right is returned: the first number is multiplied by the second number, then the partial result just computed is multiplied by the third number, &hellip; The function <code>*</code> is a nonprimitive function built on top of the primitive function <code>_*</code>, which must be invoked on exactly two numbers.</dd>
     </dl>
-    <pre class="repl">&gt; (*)<br>1<br><br>&gt; (* 2)<br>2<br><br>&gt; (* 2 4)<br>8<br><br>&gt; (* 2 4 8)<br>64</pre>
+    <pre class="repl"><span class="form">&gt; (*)</span><br>1<br><br><span class="form">&gt; (* 2)</span><br>2<br><br><span class="form">&gt; (* 2 4)</span><br>8<br><br><span class="form">&gt; (* 2 4 8)</span><br>64</pre>
     <dl>
       <dt><code>(/ $\number_1\ldots\number_n$)</code> &DoubleRightArrow; $\number$</dt>
       <dd>If the function is invoked on zero numbers, then the invocation completes abruptly for a reason of type <code>error</code>. If the function is invoked on one number, then the inverse of that number is returned. If the function is invoked on more than one number, then the result of dividing those numbers from left to right is returned: the first number is divided by the second number, then the partial result just computed is divided by the third number, &hellip; The function <code>/</code> is a nonprimitive function built on top of the primitive function <code>_/</code>, which must be invoked on exactly two numbers.</dd>
     </dl>
-    <pre class="repl">&gt; (/)<br>EvaluatorError: program-error: Expecting at least one number.<br><br>&gt; (/ 2)<br>0.5<br><br>&gt; (/ 1 2)<br>0.5<br><br>&gt; (/ 1 2 4)<br>0.125<br><br>&gt; (/ 1 2 4 8)<br>0.015625</pre>
+    <pre class="repl"><span class="form">&gt; (/)</span><br>EvaluatorError: program-error: Expecting at least one number.<br><br><span class="form">&gt; (/ 2)</span><br>0.5<br><br><span class="form">&gt; (/ 1 2)</span><br>0.5<br><br><span class="form">&gt; (/ 1 2 4)</span><br>0.125<br><br><span class="form">&gt; (/ 1 2 4 8)</span><br>0.015625</pre>
     <h4>Comparison Operators</h4>
     <dl>
       <dt><code>(= $\number_1$ $\number_2$)</code> &DoubleRightArrow; $\boolean$</dt>
       <dt><code>(&gt;= $\number_1$ $\number_2$)</code> &DoubleRightArrow; $\boolean$</dt>
       <dd>The function returns <code>#t</code> if $\number_1$ is numerically greater than or equal to $\number_2$ and <code>#f</code> otherwise.</dd>
     </dl>
-    <pre class="repl">&gt; (list (= -1 0) (= 0 0) (= 1 0))<br>(#f #t #f)<br><br>&gt; (list (/= -1 0) (/= 0 0) (/= 1 0))<br>(#t #f #t)<br><br>&gt; (list (&lt; -1 0) (&lt; 0 0) (&lt; 1 0))<br>(#t #f #f)<br><br>&gt; (list (&lt;= -1 0) (&lt;= 0 0) (&lt;= 1 0))<br>(#t #t #f)<br><br>&gt; (list (&gt; -1 0) (&gt; 0 0) (&gt; 1 0))<br>(#f #f #t)<br><br>&gt; (list (&gt;= -1 0) (&gt;= 0 0) (&gt;= 1 0))<br>(#f #t #t)</pre>
+    <pre class="repl"><span class="form">&gt; (list (= -1 0) (= 0 0) (= 1 0))</span><br>(#f #t #f)<br><br><span class="form">&gt; (list (/= -1 0) (/= 0 0) (/= 1 0))</span><br>(#t #f #t)<br><br><span class="form">&gt; (list (&lt; -1 0) (&lt; 0 0) (&lt; 1 0))</span><br>(#t #f #f)<br><br><span class="form">&gt; (list (&lt;= -1 0) (&lt;= 0 0) (&lt;= 1 0))</span><br>(#t #t #f)<br><br><span class="form">&gt; (list (&gt; -1 0) (&gt; 0 0) (&gt; 1 0))</span><br>(#f #f #t)<br><br><span class="form">&gt; (list (&gt;= -1 0) (&gt;= 0 0) (&gt;= 1 0))</span><br>(#f #t #t)</pre>
     <p>The names of the comparison operators do not end with a question mark because they traditionally do not (in mathematics and other programming languages).</p>
     <h3>Data Type <code>list</code></h3>
     <dl>
       <dt><code>(list? $\object$)</code> &DoubleRightArrow; $\boolean$</dt>
       <dd>The function returns <code>#t</code> if $\object$ is of type <code>list</code> and <code>#f</code> otherwise.</dd>
     </dl>
-    <pre class="repl">&gt; (list? '())<br>#t<br><br>&gt; (list? '(1 2 3))<br>#t</pre>
+    <pre class="repl"><span class="form">&gt; (list? '())</span><br>#t<br><br><span class="form">&gt; (list? '(1 2 3))</span><br>#t</pre>
     <dl>
       <dt><code>(list $\object_1\ldots\object_n$)</code> &DoubleRightArrow; $\list$</dt>
       <dd>The function collects its arguments into a list: when invoked on the arguments $\object_1,\ldots,\object_n$, the function returns a list whose elements are $\object_1,\ldots,\object_n$.</dd>
     </dl>
-    <pre class="repl">&gt; (list)<br>()<br><br>&gt; (list 1 2 3)<br>(1 2 3)</pre>
+    <pre class="repl"><span class="form">&gt; (list)</span><br>()<br><br><span class="form">&gt; (list 1 2 3)</span><br>(1 2 3)</pre>
     <h3>Data Type <code>empty-list</code></h3>
     <dl>
       <dt><code>(empty-list? $\object$)</code> &DoubleRightArrow; $\boolean$</dt>
       <dd>The function returns <code>#t</code> if $\object$ is of type <code>empty-list</code> and <code>#f</code> otherwise.</dd>
     </dl>
-    <pre class="repl">&gt; (empty-list? '())<br>#t<br><br>&gt; (empty-list? '(1 2 3))<br>#f</pre>
+    <pre class="repl"><span class="form">&gt; (empty-list? '())</span><br>#t<br><br><span class="form">&gt; (empty-list? '(1 2 3))</span><br>#f</pre>
     <h3>Data Type <code>cons</code></h3>
     <dl>
       <dt><code>(cons? $\object$)</code> &DoubleRightArrow; $\boolean$</dt>
       <dd>The function returns <code>#t</code> if $\object$ is of type <code>cons</code> and <code>#f</code> otherwise.</dd>
     </dl>
-    <pre class="repl">&gt; (cons? '())<br>#f<br><br>&gt; (cons? '(1 2 3))<br>#t</pre>
+    <pre class="repl"><span class="form">&gt; (cons? '())</span><br>#f<br><br><span class="form">&gt; (cons? '(1 2 3))</span><br>#t</pre>
     <dl>
       <dt><code>(cons $\object_1$ $\object_2$)</code> &DoubleRightArrow; $\cons$</dt>
       <dd>The function returns a new cons whose first element is $\object_1$ and whose second element is $\object_2$.</dd>
     </dl>
-    <pre class="repl">&gt; (cons 3 '())<br>(3)<br><br>&gt; (cons 2 (cons 3 '()))<br>(2 3)<br><br>&gt; (cons 1 (cons 2 (cons 3 '())))<br>(1 2 3)</pre>
+    <pre class="repl"><span class="form">&gt; (cons 3 '())</span><br>(3)<br><br><span class="form">&gt; (cons 2 (cons 3 '()))</span><br>(2 3)<br><br><span class="form">&gt; (cons 1 (cons 2 (cons 3 '())))</span><br>(1 2 3)</pre>
     <dl>
       <dt><code>(car $\cons$)</code> &DoubleRightArrow; $\object$</dt>
       <dd>The function returns the first element of $\cons$.</dd>
       <dt><code>(cdr $\cons$)</code> &DoubleRightArrow; $\object$</dt>
       <dd>The function returns the second element of $\cons$.</dd>
     </dl>
-    <pre class="repl">&gt; (car '(1 2 3))<br>1<br><br>&gt; (cdr '(1 2 3))<br>(2 3)<br><br>&gt; (car (cdr '(1 2 3)))<br>2<br><br>&gt; (cdr (cdr '(1 2 3)))<br>(3)<br><br>&gt; (car (cdr (cdr '(1 2 3))))<br>3<br><br>&gt; (cdr (cdr (cdr '(1 2 3))))<br>()</pre>
+    <pre class="repl"><span class="form">&gt; (car '(1 2 3))</span><br>1<br><br><span class="form">&gt; (cdr '(1 2 3))</span><br>(2 3)<br><br><span class="form">&gt; (car (cdr '(1 2 3)))</span><br>2<br><br><span class="form">&gt; (cdr (cdr '(1 2 3)))</span><br>(3)<br><br><span class="form">&gt; (car (cdr (cdr '(1 2 3))))</span><br>3<br><br><span class="form">&gt; (cdr (cdr (cdr '(1 2 3))))</span><br>()</pre>
     <h3>Equality Predicates</h3>
     <p>The purpose of an equality predicate is to test the sameness of two objects. An equality predicate returns <code>#t</code> if the two objects are the same and <code>#f</code> otherwise. Because there are multiple notions of sameness, there are multiple equality predicates. The three main equality predicates are <code>eq?</code>, <code>eql?</code>, and <code>equal?</code>.</p>
     <dl>
       </ul>
     </div>
     <p>Let us consider the following global macro, whose purpose is to evaluate the form with respect to the lexical environment extending the current lexical environment to bind, in the value namespace, the variable to the primary value of the value form:</p>
-    <pre class="repl">&gt; (mdef simple-vlet (variable value-form form)<br>    (list (list '_vlambda (list variable) form) value-form))<br>simple-vlet<br><br>&gt; (simple-vlet x 1 (+ x 2))<br>3<br><br>&gt; (simple-vlet x 1 (simple-vlet y 2 (+ x y)))<br>3</pre>
+    <pre class="repl"><span class="form">&gt; (mdef simple-vlet (variable value-form form)<br>    (list (list '_vlambda (list variable) form) value-form))</span><br>simple-vlet<br><br><span class="form">&gt; (simple-vlet x 1 (+ x 2))</span><br>3<br><br><span class="form">&gt; (simple-vlet x 1 (simple-vlet y 2 (+ x y)))</span><br>3</pre>
     <p>Here is an evaluation trace of the evaluation of the top-level form <code>(simple-vlet x 1 (+ x 2))</code>:</p>
     <div class="trace">
       <ul>
       </ul>
     </div>
     <p>When debugging a macro, it is often useful to examine some expansions generated by the macro. The expansion of the macro call <code>($\metavar{macro-operator}$ $\metavar{macro-operand}_1\ldots\metavar{macro-operand}_n$)</code> can easily be obtained by evaluating the plain function call <code>((fref $\metavar{macro-operator}$) $\code{'}\metavar{macro-operand}_1\ldots\code{'}\metavar{macro-operand}_n$)</code>:</p>
-    <pre class="repl">&gt; ((fref simple-vlet) 'x '1 '(+ x 2))<br>((_vlambda (x) (+ x 2)) 1)<br><br>&gt; ((fref simple-vlet) 'x '1 '(simple-vlet y 2 (+ x y)))<br>((_vlambda (x) (simple-vlet y 2 (+ x y))) 1)<br><br>&gt; ((fref simple-vlet) 'y '2 '(+ x y))<br>((_vlambda (y) (+ x y)) 2)<br><br>&gt; ((fref simple-vlet) 'x '1 ((fref simple-vlet) 'y '2 '(+ x y)))<br>((_vlambda (x) ((_vlambda (y) (+ x y)) 2)) 1)</pre>
+    <pre class="repl"><span class="form">&gt; ((fref simple-vlet) 'x '1 '(+ x 2))</span><br>((_vlambda (x) (+ x 2)) 1)<br><br><span class="form">&gt; ((fref simple-vlet) 'x '1 '(simple-vlet y 2 (+ x y)))</span><br>((_vlambda (x) (simple-vlet y 2 (+ x y))) 1)<br><br><span class="form">&gt; ((fref simple-vlet) 'y '2 '(+ x y))</span><br>((_vlambda (y) (+ x y)) 2)<br><br><span class="form">&gt; ((fref simple-vlet) 'x '1 ((fref simple-vlet) 'y '2 '(+ x y)))</span><br>((_vlambda (x) ((_vlambda (y) (+ x y)) 2)) 1)</pre>
     <p>Let us consider the following global function, which returns the absolute value of its argument:</p>
-    <pre class="repl">&gt; (fdef abs (x)<br>    (if (&gt;= x 0) x (- x)))<br>abs<br><br>&gt; (abs 1)<br>1<br><br>&gt; (abs -1)<br>1</pre>
+    <pre class="repl"><span class="form">&gt; (fdef abs (x)<br>    (if (&gt;= x 0) x (- x)))</span><br>abs<br><br><span class="form">&gt; (abs 1)</span><br>1<br><br><span class="form">&gt; (abs -1)</span><br>1</pre>
     <p>Here is an evaluation trace of the evaluation of the top-level form <code>(abs 1)</code>:</p>
     <div class="trace">
       <ul>
       </ul>
     </div>
     <p>Let us consider the following global functions:</p>
-    <pre class="repl">&gt; (fdef sum-of-squares (x y)<br>    (+ (square x) (square y)))<br>sum-of-squares<br><br>&gt; (fdef square (x)<br>    (* x x))<br>square<br><br>&gt; (sum-of-squares 3 4)<br>25</pre>
+    <pre class="repl"><span class="form">&gt; (fdef sum-of-squares (x y)<br>    (+ (square x) (square y)))</span><br>sum-of-squares<br><br><span class="form">&gt; (fdef square (x)<br>    (* x x))</span><br>square<br><br><span class="form">&gt; (sum-of-squares 3 4)</span><br>25</pre>
     <p>Here is an invocation trace of the evaluation of the form <code>(sum-of-squares 3 4)</code>:</p>
     <div class="trace">
       <ul>
       <tr><td>$1$</td><td>$1$</td><td>$2$</td><td>$6$</td><td>$24$</td><td>$120$</td><td>$720$</td><td>$5040$</td><td>$40320$</td><td>$362880$</td><td>$3628800$</td></tr>
     </table>
     <p>The values of the factorial function can be computed by the global function <code>fact</code>, which is a direct translation of the recurrence relation:</p>
-    <pre class="repl">&gt; (fdef fact (n)<br>    (if (= n 0) 1 (* n (fact (- n 1)))))<br>fact<br><br>&gt; (fact 10)<br>3628800</pre>
+    <pre class="repl"><span class="form">&gt; (fdef fact (n)<br>    (if (= n 0) 1 (* n (fact (- n 1)))))</span><br>fact<br><br><span class="form">&gt; (fact 10)</span><br>3628800</pre>
     <p>The global function <code>fact</code> contains one recursive function call, which is not in tail position.</p>
     <p>Here is an invocation trace of the evaluation of the form <code>(fact 6)</code>:</p>
     <div class="trace">
     </ol>
     <p>The factorial is computed during the contraction phase by adding factors to a running product. The running product is initialized to the number <code>1</code> by the innermost invocation and the whole product is equal to $6\times(5\times(4\times(3\times(2\times(1\times1)))))$.</p>
     <p>The values of the factorial function can also be computed by the global function <code>fact-iter</code>:</p>
-    <pre class="repl">&gt; (fdef fact-iter (n)<br>    (fact-iter/internal n 1))<br>fact-iter<br><br>&gt; (fdef fact-iter/internal (n acc)<br>    (if (= n 0) acc (fact-iter/internal (- n 1) (* n acc))))<br>fact-iter/internal<br><br>&gt; (fact-iter 10)<br>3628800</pre>
+    <pre class="repl"><span class="form">&gt; (fdef fact-iter (n)<br>    (fact-iter/internal n 1))</span><br>fact-iter<br><br><span class="form">&gt; (fdef fact-iter/internal (n acc)<br>    (if (= n 0) acc (fact-iter/internal (- n 1) (* n acc))))</span><br>fact-iter/internal<br><br><span class="form">&gt; (fact-iter 10)</span><br>3628800</pre>
     <p>The bulk of the work is done by the auxiliary global function <code>fact-iter/internal</code>, which contains one recursive function call. The call to <code>fact-iter/internal</code> in <code>fact-iter</code> and the recursive function call in <code>fact-iter/internal</code> are both in tail position.</p>
     <p>Here is an invocation trace of the evaluation of the form <code>(fact-iter 6)</code>:</p>
     <div class="trace">
     </ul>
     <p>Here are the values of the Fibonacci sequence for $n$ varying from $0$ to $10$:</p>
     <table class="plain">
-      <tr><td>$F_0$<td>$F_1$<td>$F_2$<td>$F_3$<td>$F_4$<td>$F_5$<td>$F_6$<td>$F_7$<td>$F_8$<td>$F_9$<td>$F_{10}$</td></tr>
+      <tr><td>$F_0$</td><td>$F_1$</td><td>$F_2$</td><td>$F_3$</td><td>$F_4$</td><td>$F_5$</td><td>$F_6$</td><td>$F_7$</td><td>$F_8$</td><td>$F_9$</td><td>$F_{10}$</td></tr>
       <tr><td>$0$</td><td>$1$</td><td>$1$</td><td>$2$</td><td>$3$</td><td>$5$</td><td>$8$</td><td>$13$</td><td>$21$</td><td>$34$</td><td>$55$</td></tr>
     </table>
     <p>The values of the Fibonacci sequence can be computed by the global function <code>fib</code>, which is a direct translation of the recurrence relation:</p>
-    <pre class="repl">&gt; (fdef fib (n)<br>    (if (= n 0)<br>        0<br>      (if (= n 1)<br>          1<br>        (+ (fib (- n 1)) (fib (- n 2))))))<br>fib<br><br>&gt; (fib 10)<br>55</pre>
+    <pre class="repl"><span class="form">&gt; (fdef fib (n)<br>    (if (= n 0)<br>        0<br>      (if (= n 1)<br>          1<br>        (+ (fib (- n 1)) (fib (- n 2))))))</span><br>fib<br><br><span class="form">&gt; (fib 10)</span><br>55</pre>
     <p>The global function <code>fib</code> contains two recursive function calls, which are not in tail position.</p>
     <p>Here is an invocation trace of the evaluation of the form <code>(fib 6)</code>:</p>
     <div class="trace">
       <li>One invocation evaluating the body of <code>fib</code> with respect to a lexical environment binding, in the value namespace, the variable <code>n</code> to the number <code>0</code>. That invocation directly returns the number <code>0</code> as its value without any further recursive invocation of <code>fib</code>.</li>
     </ol>
     <p>The values of the Fibonacci sequence can also be computed by the global function <code>fib-iter</code>:</p>
-    <pre class="repl">&gt; (fdef fib-iter (n)<br>    (fib-iter/internal n 0 1))<br>fib-iter<br><br>&gt; (fdef fib-iter/internal (n a b)<br>    (if (= n 0)<br>        a<br>      (if (= n 1)<br>          b<br>        (fib-iter/internal (- n 1) b (+ a b)))))<br>fib-iter/internal<br><br>&gt; (fib-iter 10)<br>55</pre>
+    <pre class="repl"><span class="form">&gt; (fdef fib-iter (n)<br>    (fib-iter/internal n 0 1))</span><br>fib-iter<br><br><span class="form">&gt; (fdef fib-iter/internal (n a b)<br>    (if (= n 0)<br>        a<br>      (if (= n 1)<br>          b<br>        (fib-iter/internal (- n 1) b (+ a b)))))</span><br>fib-iter/internal<br><br><span class="form">&gt; (fib-iter 10)</span><br>55</pre>
     <p>The bulk of the work is done by the auxiliary global function <code>fib-iter/internal</code>, which contains one recursive function call. The call to <code>fib-iter/internal</code> in <code>fib-iter</code> and the recursive function call in <code>fib-iter/internal</code> are both in tail position.</p>
     <p>Whereas the global function <code>fib</code> computes the Fibonacci sequence top-down in a branching process that repeats the computation of some Fibonacci numbers, the global function <code>fib-iter</code> computes the Fibonacci sequence bottom-up in a linear process that does not repeat the computation of any Fibonacci numbers:</p>
     <ul>
index 40456fc3327bdb2caf89a16586ce0a48a17ad67a..7ebb88e485eb67e014d7e97f7d700426582ab755 100644 (file)
@@ -6,7 +6,6 @@
     <meta charset="utf-8">
     <title>User Manual</title>
     <link rel="stylesheet" href="___cssURL___"/>
-    <script>const windowId = ___windowId___;</script>
     <script src="___jsURL___"></script>
   </head>
   <body>
     </dl>
     <p>For any object $\object$, <code>'$\object$</code> is an abbreviation for <code>(quote $\object$)</code>.</p>
     <p>Here is the commented transcript, where each gray box contains a form and its values. The character &#x23CE; marks the places where the Return or Enter key should be pressed.</p>
-    <pre class="repl">&gt; (+ 1 2)&#x23CE;<br>3</pre>
+    <pre class="repl"><span class="form">&gt; (+ 1 2)&#x23CE;</span><br>3</pre>
     <p>The evaluation produces a result consisting of the sum of the two numbers <code>1</code> and <code>2</code>. Because numbers are self-evaluating, quoting the numbers is not necessary.</p>
-    <pre class="repl">&gt; (+ '1 '2)&#x23CE;<br>3</pre>
+    <pre class="repl"><span class="form">&gt; (+ '1 '2)&#x23CE;</span><br>3</pre>
     <p>The evaluation produces the same result if the numbers are quoted. Quoting self-evaluating objects is unidiomatic, though.</p>
-    <pre class="repl">&gt; (car '(1 2 3))&#x23CE;<br>1</pre>
+    <pre class="repl"><span class="form">&gt; (car '(1 2 3))&#x23CE;</span><br>1</pre>
     <p>The evaluation produces a result consisting of the first element of the list <code>(1 2 3)</code>. Because lists are not self-evaluating, quoting the list is necessary.</p>
-    <pre class="repl">&gt; (car (1 2 3))&#x23CE;<br>EvaluatorError: form-type-error:<br>The operator form does not evaluate to a function.</pre>
+    <pre class="repl"><span class="form">&gt; (car (1 2 3))&#x23CE;</span><br>EvaluatorError: form-type-error:<br>The operator form does not evaluate to a function.</pre>
     <p>The evaluation completes abruptly for a reason of type <code>error</code> if the list is not quoted. The explanation for this behavior is as follows: The evaluator treats the list <code>(1 2 3)</code> as a plain function call and the operator form, the number <code>1</code>, does not evaluate to a function.</p>
-    <pre class="repl">&gt; (cdr '(1 2 3))&#x23CE;<br>(2 3)</pre>
+    <pre class="repl"><span class="form">&gt; (cdr '(1 2 3))&#x23CE;</span><br>(2 3)</pre>
     <p>The evaluation produces a result consisting of the sublist of the list <code>(1 2 3)</code> obtained by omitting its first element.</p>
-    <pre class="repl">&gt; (car (cdr '(1 2 3)))&#x23CE;<br>2</pre>
+    <pre class="repl"><span class="form">&gt; (car (cdr '(1 2 3)))&#x23CE;</span><br>2</pre>
     <p>The evaluation produces a result consisting of the second element of the list <code>(1 2 3)</code>.</p>
-    <pre class="repl">&gt; (cdr (cdr '(1 2 3)))&#x23CE;<br>(3)</pre>
+    <pre class="repl"><span class="form">&gt; (cdr (cdr '(1 2 3)))&#x23CE;</span><br>(3)</pre>
     <p>The evaluation produces a result consisting of the sublist of the list <code>(1 2 3)</code> obtained by omitting its first two elements.</p>
-    <pre class="repl">&gt; (car (cdr (cdr '(1 2 3))))&#x23CE;<br>3</pre>
+    <pre class="repl"><span class="form">&gt; (car (cdr (cdr '(1 2 3))))&#x23CE;</span><br>3</pre>
     <p>The evaluation produces a result consisting of the third element of the list <code>(1 2 3)</code>.</p>
-    <pre class="repl">&gt; (cdr (cdr (cdr '(1 2 3))))&#x23CE;<br>()</pre>
+    <pre class="repl"><span class="form">&gt; (cdr (cdr (cdr '(1 2 3))))&#x23CE;</span><br>()</pre>
     <p>The evaluation produces a result consisting of the sublist of the list <code>(1 2 3)</code> obtained by omitting its first three elements.</p>
-    <pre class="repl">&gt; (car (cdr (cdr (cdr '(1 2 3)))))&#x23CE;<br>EvaluatorError: argument-type-error:<br>The 1st argument is not of type EVLCons.</pre>
+    <pre class="repl"><span class="form">&gt; (car (cdr (cdr (cdr '(1 2 3)))))&#x23CE;</span><br>EvaluatorError: argument-type-error:<br>The 1st argument is not of type EVLCons.</pre>
     <p>The evaluation completes abruptly for a reason of type <code>error</code> because the empty list is not a cons.</p>
-    <pre class="repl">&gt; (disk-area 2)&#x23CE;<br>EvaluatorError: unbound-variable:<br>The variable 'disk-area' is unbound in the function namespace.</pre>
+    <pre class="repl"><span class="form">&gt; (disk-area 2)&#x23CE;</span><br>EvaluatorError: unbound-variable:<br>The variable 'disk-area' is unbound in the function namespace.</pre>
     <p>The evaluation completes abruptly for a reason of type <code>error</code> because the global function <code>disk-area</code> is undefined.</p>
-    <pre class="repl">&gt; (fdef disk-area (r) (* 3.14 r r))&#x23CE;<br>disk-area</pre>
+    <pre class="repl"><span class="form">&gt; (fdef disk-area (r) (* 3.14 r r))&#x23CE;</span><br>disk-area</pre>
     <p>The evaluation produces a result consisting of the variable <code>disk-area</code>. More importantly, the evaluation has the side effect of defining the global function <code>disk-area</code>. In its intended usage, the function accepts the radius of a disk and returns the area of the disk computed using <code>3.14</code> as the value of pi. When the function is invoked, its body is evaluated with respect to a lexical environment binding, in the value namespace, the variable <code>r</code> to the argument of the invocation (that is, the radius of the disk).</p>
-    <pre class="repl">&gt; (disk-area 2)&#x23CE;<br>12.56</pre>
+    <pre class="repl"><span class="form">&gt; (disk-area 2)&#x23CE;</span><br>12.56</pre>
     <p>The evaluation produces the expected result.</p>
-    <pre class="repl">&gt; (fdef disk-area (r) (* 3.1416 r r))&#x23CE;<br>disk-area</pre>
+    <pre class="repl"><span class="form">&gt; (fdef disk-area (r) (* 3.1416 r r))&#x23CE;</span><br>disk-area</pre>
     <p>The evaluation has the side effect of redefining the global function <code>disk-area</code> to compute the area of the disk using <code>3.1416</code> as the value of pi.</p>
-    <pre class="repl">&gt; (disk-area 2)&#x23CE;<br>12.5664</pre>
+    <pre class="repl"><span class="form">&gt; (disk-area 2)&#x23CE;</span><br>12.5664</pre>
     <p>The evaluation produces the expected result.</p>
-    <pre class="repl">&gt; (fdef disk-area (r) (* *pi* r r))&#x23CE;<br>disk-area</pre>
+    <pre class="repl"><span class="form">&gt; (fdef disk-area (r) (* *pi* r r))&#x23CE;</span><br>disk-area</pre>
     <p>The evaluation has the side effect of redefining the global function <code>disk-area</code> to compute the area of the disk using the value of the global variable <code>*pi*</code> as the value of pi. It is customary for a global or dynamic variable to have a name starting and ending with an asterisk.</p>
-    <pre class="repl">&gt; (disk-area 2)&#x23CE;<br>EvaluatorError: unbound-variable:<br>The variable '*pi*' is unbound in the value namespace.</pre>
+    <pre class="repl"><span class="form">&gt; (disk-area 2)&#x23CE;</span><br>EvaluatorError: unbound-variable:<br>The variable '*pi*' is unbound in the value namespace.</pre>
     <p>The evaluation completes abruptly for a reason of type <code>error</code> because the global variable <code>*pi*</code> is undefined.</p>
-    <pre class="repl">&gt; (vdef *pi* 3.141593)&#x23CE;<br>*pi*</pre>
+    <pre class="repl"><span class="form">&gt; (vdef *pi* 3.141593)&#x23CE;</span><br>*pi*</pre>
     <p>The evaluation produces a result consisting of the variable <code>*pi*</code>. More importantly, the evaluation has the side effect of defining the global variable <code>*pi*</code>.</p>
-    <pre class="repl">&gt; *pi*&#x23CE;<br>3.141593</pre>
+    <pre class="repl"><span class="form">&gt; *pi*&#x23CE;</span><br>3.141593</pre>
     <p>The global variable <code>*pi*</code> has the value <code>3.141593</code>.</p>
-    <pre class="repl">&gt; (disk-area 2)&#x23CE;<br>12.566372</pre>
+    <pre class="repl"><span class="form">&gt; (disk-area 2)&#x23CE;</span><br>12.566372</pre>
     <p>The evaluation produces the expected result.</p>
-    <pre class="repl">&gt; (vdef *pi* 3.14159265)&#x23CE;<br>*pi*</pre>
+    <pre class="repl"><span class="form">&gt; (vdef *pi* 3.14159265)&#x23CE;</span><br>*pi*</pre>
     <p>The evaluation has the side effect of redefining the global variable <code>*pi*</code>.</p>
-    <pre class="repl">&gt; *pi*&#x23CE;<br>3.14159265</pre>
+    <pre class="repl"><span class="form">&gt; *pi*&#x23CE;</span><br>3.14159265</pre>
     <p>The global variable <code>*pi*</code> has the value <code>3.14159265</code>.</p>
-    <pre class="repl">&gt; (disk-area 2)&#x23CE;<br>12.5663706</pre>
+    <pre class="repl"><span class="form">&gt; (disk-area 2)&#x23CE;</span><br>12.5663706</pre>
     <p>The evaluation produces the expected result.</p>
-    <pre class="repl">&gt; (values)&#x23CE;</pre>
+    <pre class="repl"><span class="form">&gt; (values)&#x23CE;</span></pre>
     <p>The evaluation produces a result consisting of zero values.</p>
-    <pre class="repl">&gt; (values 1)&#x23CE;<br>1</pre>
+    <pre class="repl"><span class="form">&gt; (values 1)&#x23CE;</span><br>1</pre>
     <p>The evaluation produces a result consisting of one value: <code>1</code>.</p>
-    <pre class="repl">&gt; 1&#x23CE;<br>1</pre>
+    <pre class="repl"><span class="form">&gt; 1&#x23CE;</span><br>1</pre>
     <p>Producing a result consisting of one value is the default behavior so using <code>values</code> in this case is unnecessary and unidiomatic.</p>
-    <pre class="repl">&gt; (values 1 2)&#x23CE;<br>1<br>2</pre>
+    <pre class="repl"><span class="form">&gt; (values 1 2)&#x23CE;</span><br>1<br>2</pre>
     <p>The evaluation produces a result consisting of two values: <code>1</code> and <code>2</code>.</p>
-    <pre class="repl">&gt; (list (values) (values 1) 1 (values 1 2))&#x23CE;<br>(#v 1 1 1)</pre>
+    <pre class="repl"><span class="form">&gt; (list (values) (values 1) 1 (values 1 2))&#x23CE;</span><br>(#v 1 1 1)</pre>
     <p>The primary values of the forms <code>(values)</code>, <code>(values 1)</code>, <code>1</code>, and <code>(values 1 2)</code> are <code>#v</code>, <code>1</code>, <code>1</code>, and <code>1</code>, respectively.</p>
-    <pre class="repl">&gt; (loop)&#x23CE;<br>ABORTED</pre>
+    <pre class="repl"><span class="form">&gt; (loop)&#x23CE;</span><br>ABORTED</pre>
     <p>The evaluation is caught in an infinite loop. The Abort Evaluation command from the Eval menu is one way to stop the evaluation and get a new prompt.</p>
-    <pre class="repl">&gt; (disk-area 2)&#x23CE;<br>12.5663706</pre>
+    <pre class="repl"><span class="form">&gt; (disk-area 2)&#x23CE;</span><br>12.5663706</pre>
     <p>Aborting an evaluation has no effect on the global definitions.</p>
-    <pre class="repl">&gt; (loop)&#x23CE;<br>TERMINATED</pre>
+    <pre class="repl"><span class="form">&gt; (loop)&#x23CE;</span><br>TERMINATED</pre>
     <p>The evaluation is caught in an infinite loop. The Restart Evaluator&hellip; command from the Eval menu is another way to stop the evaluation and get a new prompt.</p>
-    <pre class="repl">&gt; (disk-area 2)&#x23CE;<br>EvaluatorError: unbound-variable:<br>The variable 'disk-area' is unbound in the function namespace.</pre>
+    <pre class="repl"><span class="form">&gt; (disk-area 2)&#x23CE;</span><br>EvaluatorError: unbound-variable:<br>The variable 'disk-area' is unbound in the function namespace.</pre>
     <p>Restarting the evaluator erases all global definitions.</p>
     <h2>Menu Bar</h2>
     <h3>File Menu</h3>
index 2ff66d84b314962fda0b0b5307ee0c06e8d91551..be3f0921d52d2e4fd11fd4c488a72e63c2bf34a9 100644 (file)
@@ -1,9 +1,124 @@
 /* SPDX-FileCopyrightText: Copyright (c) 2024-2026 Raphaël Van Dyck */
 /* SPDX-License-Identifier: BSD-3-Clause */
 
+/* https://github.com/codemirror/theme-one-dark/blob/main/src/one-dark.ts */
+:root {
+  --one-dark-chalky: #E5C07B;
+  --one-dark-coral: #E06C75;
+  --one-dark-cyan: #56B6C2;
+  --one-dark-invalid: #FFFFFF;
+  --one-dark-ivory: #ABB2BF;
+  --one-dark-stone: #7D8799;
+  --one-dark-malibu: #61AFEF;
+  --one-dark-sage: #98C379;
+  --one-dark-whiskey: #D19A66;
+  --one-dark-violet: #C678DD;
+  --one-dark-dark-background: #21252B;
+  --one-dark-highlight-background: #2C313A;
+  --one-dark-background: #282C34;
+  --one-dark-tooltip-background: #353A42;
+  --one-dark-selection: #3E4451;
+  --one-dark-cursor: #528BFF;
+}
+
+:root {
+  --light-mode-background: hsl(0, 0%, 100%);
+  --light-mode-on-background: hsl(0, 0%, 0%);
+  --light-mode-bar-background: hsl(0, 0%, 95%);
+  --light-mode-on-bar-background: hsl(0, 0%, 0%);
+  --light-mode-low-emphasis: hsl(0, 0%, 90%);
+  --light-mode-on-low-emphasis: hsl(0, 0%, 0%);
+  --light-mode-medium-emphasis: hsl(0, 0%, 85%);
+  --light-mode-on-medium-emphasis: hsl(0, 0%, 0%);
+  --light-mode-high-emphasis: hsl(0, 0%, 80%);
+  --light-mode-on-high-emphasis: hsl(0, 0%, 0%);
+}
+
+:root {
+  --dark-mode-background: hsl(220, 13%, 18%);
+  --dark-mode-on-background: hsl(219, 14%, 71%);
+  --dark-mode-bar-background: hsl(220, 13%, 25%);
+  --dark-mode-on-bar-background: hsl(219, 14%, 67%);
+  --dark-mode-low-emphasis: hsl(220, 13%, 30%);
+  --dark-mode-on-low-emphasis: hsl(219, 14%, 73%);
+  --dark-mode-medium-emphasis: hsl(220, 13%, 35%);
+  --dark-mode-on-medium-emphasis: hsl(219, 14%, 80%);
+  --dark-mode-high-emphasis: hsl(220, 13%, 40%);
+  --dark-mode-on-high-emphasis: hsl(219, 14%, 88%);
+}
+
+/**************/
+/* LIGHT MODE */
+/**************/
+
+html.light {
+  background-color: var(--light-mode-background);
+  color: var(--light-mode-on-background);
+  scrollbar-color: var(--light-mode-high-emphasis) var(--light-mode-bar-background);
+}
+
+html.light .bg {
+  background-color: var(--light-mode-medium-emphasis);
+  color: var(--light-mode-on-medium-emphasis);
+}
+
+html.light pre.repl {
+  background-color: var(--light-mode-medium-emphasis);
+  color: var(--light-mode-on-medium-emphasis);
+}
+
+html.light a:link {
+  color: LinkText;
+}
+
+html.light a:visited {
+  color: VisitedText;
+}
+
+html.light ::selection, html.light span.form.selected {
+  background-color: Highlight;
+  color: HighlightText;
+}
+
+/*************/
+/* DARK MODE */
+/*************/
+
+html.dark {
+  background-color: var(--dark-mode-background);
+  color: var(--dark-mode-on-background);
+  scrollbar-color: var(--dark-mode-high-emphasis) var(--dark-mode-bar-background);
+}
+
+html.dark .bg {
+  background-color: var(--dark-mode-medium-emphasis);
+  color: var(--dark-mode-on-medium-emphasis);
+}
+
+html.dark pre.repl {
+  background-color: var(--dark-mode-medium-emphasis);
+  color: var(--dark-mode-on-medium-emphasis);
+}
+
+html.dark a:link {
+  color: var(--one-dark-cursor);
+}
+
+html.dark a:visited {
+  color: var(--one-dark-violet);
+}
+
+html.dark ::selection, html.dark span.form.selected {
+  background-color: var(--one-dark-selection);
+  color: var(--one-dark-ivory);
+}
+
+/********/
+/* MAIN */
+/********/
+
 html {
   font-family: Arial, sans-serif;
-  font-size: 14pt;
   line-height: 1.4;
 }
 
@@ -65,10 +180,6 @@ h6:before {
   content: counter(h2counter) "." counter(h3counter) "." counter(h4counter) "." counter(h5counter) "." counter(h6counter) ". ";
 }
 
-.bg {
-  background-color: lightgray;
-}
-
 .strike {
   text-decoration: line-through;
 }
@@ -78,7 +189,10 @@ pre.repl {
   border-radius: 10px;
   padding: 10px;
   width: 800px;
-  background-color: lightgray;
+}
+
+span.form {
+  display: inline-block;
 }
 
 div.trace ul {
index 804de9c01ae88d03e2ca4fbc1f39f49bfe9373bf..f3d0a1699ec57395b50245f15b2288696073ab86 100644 (file)
@@ -5,17 +5,55 @@
 /* Event Handlers */
 /******************/
 
-if (windowId !== -1) {
-  window.addEventListener('focus', event => {
-    window.parent.dispatchEvent(new CustomEvent('iframeFocus', {detail: windowId}));
-  });
-  window.addEventListener('keydown', event => {
-    if (event.ctrlKey && (event.altKey || event.metaKey)) {
-      window.parent.dispatchEvent(new CustomEvent('iframeKeyDown', {detail: event}));
+window.addEventListener('load', () => {
+  const formElements = document.getElementsByClassName('form');
+  for (const formElement of formElements) {
+    if (formElement.nodeName === 'SPAN') {
+      formElement.addEventListener('mouseenter', (event) => {
+        event.target.classList.add('selected');
+      });
+      formElement.addEventListener('mouseleave', (event) => {
+        event.target.classList.remove('selected');
+      });
+      formElement.addEventListener('click', (event) => {
+        let form = event.target.innerText;
+        if (form.startsWith('> ')) {
+          form = form.substring(2);
+        }
+        if (form.endsWith('\u23CE')) {
+          form = form.substring(0, form.length - 1);
+        }
+        navigator.clipboard.writeText(form);
+      });
+    }
+  }
+});
+
+window.addEventListener('focus', () => {
+  window.parent.dispatchEvent(new CustomEvent('selectWindow', {detail: {windowId: parseInt(window.frameElement.id.substring(6)), focus: false}}));
+});
+
+const mac = navigator.platform.startsWith("Mac");
+
+const hotkeys = [
+  {ctrl: !mac, shift: false, alt: false, meta: mac, key: 's'},
+  {ctrl: true, shift: false, alt: !mac, meta: mac, key: 'h'},
+  {ctrl: true, shift: false, alt: !mac, meta: mac, key: 'e'},
+  {ctrl: true, shift: false, alt: !mac, meta: mac, key: 'l'},
+  {ctrl: true, shift: false, alt: !mac, meta: mac, key: 'ArrowLeft'},
+  {ctrl: true, shift: false, alt: !mac, meta: mac, key: 'ArrowRight'},
+  {ctrl: true, shift: false, alt: !mac, meta: mac, key: 'm'}
+];
+
+window.addEventListener('keydown', event => {
+  for (const {key, ctrl, shift, alt, meta} of hotkeys) {
+    if (event.key === key && event.ctrlKey === ctrl && event.shiftKey === shift && event.altKey === alt && event.metaKey === meta) {
+      window.parent.dispatchEvent(new CustomEvent('iframeKeydown', {detail: event}));
       event.preventDefault();
+      break;
     }
-  });
-}
+  }
+});
 
 /***********/
 /* MathJax */
index 6c0e0462cb973576bc0c91a03f390c78573c55a7..0de566c02c46cc317a02d63319f44447d915064f 100644 (file)
@@ -156,15 +156,14 @@ function evaluateAllForms(text) {
   return success(output);
 }
 
-function convertEVLToXML(text) {
+function convertEVLToXML({text, anchor}) {
   const tokenizer = new Tokenizer(text, true);
-  let xml = null;
+  tokenizer.anchor = anchor === undefined ? 0 : anchor;
   try {
-    xml = doConvertEVLToXML(tokenizer);
+    return success(doConvertEVLToXML(tokenizer));
   } catch(exception) {
     return abortedOrError(exception);
   }
-  return success(xml);
 }
 
 /**********/
@@ -1227,6 +1226,7 @@ const XML_CONTEXT = 0;
 const EVL_CONTEXT = 1;
 
 function doConvertEVLToXML(tokenizer) {
+  tokenizer.drift = 0;
   let xml = '';
   const contextStack = [];
   let previousToken = BOI;
@@ -1234,14 +1234,14 @@ function doConvertEVLToXML(tokenizer) {
   let token = null;
   while ((token = sketchyRead(tokenizer, contextStack)) !== EOI) {
     if (context === XML_CONTEXT) {
-      xml += convertXMLWhitespace(previousToken, tokenizer.whitespace, token);
+      xml += convertXMLWhitespace(tokenizer, previousToken, token);
     } else if (context = EVL_CONTEXT) {
-      xml += convertEVLWhitespace(previousToken, tokenizer.whitespace, token);
+      xml += convertEVLWhitespace(tokenizer, previousToken, token);
     } else { // top-level context
       xml += tokenizer.whitespace;
     }
     if (token === EVL_TOKEN) {
-      xml += xmlEscape(tokenizer.lexeme);
+      xml += xmlEscapeEVLToken(tokenizer);
     } else { // XML_TOKEN or EOL_COMMENT
       xml += tokenizer.lexeme;
     }
@@ -1249,20 +1249,35 @@ function doConvertEVLToXML(tokenizer) {
     context = contextStack[contextStack.length - 1];
   }
   xml += tokenizer.whitespace;
-  return xml;
+  return {xmlContents: xml, anchor: tokenizer.anchor + tokenizer.drift};
 }
 
-function xmlEscape(string) {
-  return string.replace(/[<>&]/g, function (char) {
+function xmlEscapeEVLToken(tokenizer) {
+  const lexeme = tokenizer.lexeme;
+  const anchor = tokenizer.anchor;
+  let xml = '';
+  let position = tokenizer.position - lexeme.length;
+  for (const char of lexeme) {
     switch (char) {
       case '<':
-        return '&lt;';
+        xml += '&lt;';
+        if (anchor > position) tokenizer.drift += 3;
+        break;
       case '>':
-        return '&gt;';
+        xml += '&gt;';
+        if (anchor > position) tokenizer.drift += 3;
+        break;
       case '&':
-        return '&amp;';
+        xml += '&amp;';
+        if (anchor > position) tokenizer.drift += 4;
+        break;
+      default:
+        xml += char;
+        break;
     }
-  });
+    position++;
+  }
+  return xml;
 }
 
 function sketchyRead(tokenizer, contextStack) {
@@ -1364,22 +1379,31 @@ function isEVLToken(token) {
   return token === EVL_TOKEN || token === EOL_COMMENT;
 }
 
-function convertXMLWhitespace(previousToken, whitespace, token) {
+function convertXMLWhitespace(tokenizer, previousToken, token) {
+  const whitespace = tokenizer.whitespace;
+  const lexeme = tokenizer.lexeme;
+  const anchor = tokenizer.anchor;
   let xml = '';
+  const start = tokenizer.position - lexeme.length - whitespace.length;
+  const end = tokenizer.position - lexeme.length;
   if (isXMLToken(previousToken) && isEVLToken(token)) {
-    xml += whitespace;
-    xml += '<toplevelcode><blockcode>';
+    const suffix = '<toplevelcode><blockcode>';
+    xml += whitespace + suffix;
+    if (anchor >= end) tokenizer.drift += suffix.length;
   } else if (isEVLToken(previousToken) && isEVLToken(token)) {
     if (countNewlines(whitespace) >= 2) {
-      xml += '</blockcode></toplevelcode>';
-      xml += whitespace;
-      xml += '<toplevelcode><blockcode>';
+      const prefix = '</blockcode></toplevelcode>';
+      const suffix = '<toplevelcode><blockcode>';
+      xml += prefix + whitespace + suffix;
+      if (anchor > start) tokenizer.drift += prefix.length;
+      if (anchor >= end) tokenizer.drift += suffix.length;
     } else {
       xml += whitespace;
     }
   } else if (isEVLToken(previousToken) && isXMLToken(token)) {
-    xml += '</blockcode></toplevelcode>';
-    xml += whitespace;
+    const prefix = '</blockcode></toplevelcode>';
+    xml += prefix + whitespace;
+    if (anchor > start) tokenizer.drift += prefix.length;
   } else {
     xml += whitespace;
   }
@@ -1396,16 +1420,20 @@ function countNewlines(string) {
   return count;
 }
 
-function convertEVLWhitespace(previousToken, whitespace, token) {
+function convertEVLWhitespace(tokenizer, previousToken, token) {
+  const whitespace = tokenizer.whitespace;
+  const lexeme = tokenizer.lexeme;
+  const anchor = tokenizer.anchor;
   let xml = '';
+  const start = tokenizer.position - lexeme.length - whitespace.length;
   if (isEVLToken(previousToken) && isXMLToken(token)) {
-    xml += '</blockcode><indentation style="margin-left: ';
-    xml += countSpacesAfterFirstNewline(whitespace);
-    xml += 'ch;"><blockcomment>';
-    xml += whitespace;
+    const prefix = `</blockcode><indentation style="margin-left: ${countSpacesAfterFirstNewline(whitespace)}ch;"><blockcomment>`;
+    xml += prefix + whitespace;
+    if (anchor > start) tokenizer.drift += prefix.length;
   } else if (isXMLToken(previousToken) && isEVLToken(token)) {
-    xml += '</blockcomment></indentation><blockcode>';
-    xml += whitespace;
+    const prefix = '</blockcomment></indentation><blockcode>';
+    xml += prefix + whitespace;
+    if (anchor > start) tokenizer.drift += prefix.length;
   } else {
     xml += whitespace;
   }
index dabe2f83f5099c6e44033bd7819cbc52e24ddee2..3c907e9ddb2db464b2fcb1a588dd60c343638d39 100644 (file)
@@ -1,14 +1,14 @@
 <chapter>
 <title>Recursive Functions</title>
-<para>...para...</para>
-<para>...para...</para>
+<p>...para...</p>
+<p>...para...</p>
 <section>
 <title>Factorial Function</title>
-<para>...para...</para>
-<para>...para...</para>
+<p>...para...</p>
+<p>...para...</p>
 (fdef fact (n)
-  <para>...block...</para>
-  <para>...block...</para>
+  <p>...block...</p>
+  <p>...block...</p>
   (if (= n 0)
       1 <comment>...eol...</comment>
     (* n (fact (- n 1))))) <comment>...eoll...</comment>
 </section>
 <section>
 <title>Fibonacci Sequence</title>
-<para>...para...</para>
-<para>...para...</para>
+<p>...para...</p>
+<p>...para...</p>
 (fdef fib (n)
-  <para>...block...</para>
-  <para>...block...</para>
+  <p>...block...</p>
+  <p>...block...</p>
   (if (= n 0)
       0 <comment>...eol...</comment>
     (if (= n 1)
index 5e9f216b4ccaa6fb04c6507d0cc52218cd575466..cf8a559b558480489e59521a2b7111d247959bef 100644 (file)
@@ -3,20 +3,20 @@
 <!-- SPDX-License-Identifier: BSD-3-Clause -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="html" doctype-system="about:legacy-compat" encoding="utf-8"/>
+  <xsl:param name="colorScheme"/>
+  <xsl:param name="fontSize"/>
   <xsl:param name="cssURL"/>
   <xsl:param name="jsURL"/>
-  <xsl:param name="windowId"/>
   <xsl:template match="node()|@*">
     <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
     </xsl:copy>
   </xsl:template>
   <xsl:template match="/chapter">
-    <html>
+    <html class="{$colorScheme}" style="font-size: {$fontSize};">
       <head>
         <meta charset="utf-8"/>
         <link rel="stylesheet" href="{$cssURL}"/>
-        <script>const windowId = <xsl:value-of select="$windowId"/>;</script>
         <script src="{$jsURL}"></script>
       </head>
       <body>
index dd459a3a67114f7e3e94c3721b7fd75c89923507..a5e6aefcd31939b6e3eb06598820d40d7767d057 100644 (file)
@@ -17,7 +17,7 @@ class ArchiveSystemFilesWebpackPlugin {
   apply(compiler) {
     compiler.hooks.done.tap(
       'Archive System Files Webpack Plugin',
-      (stats) => {
+      stats => {
         if (['production'].includes(stats.compilation.options.mode)) {
           const zip = new AdmZip();
           for (const file of fs.readdirSync(path.join(__dirname, 'system-files'))) {
@@ -34,7 +34,7 @@ class PublishSystemFilesWebpackPlugin {
   apply(compiler) {
     compiler.hooks.done.tap(
       'Publish System Files Webpack Plugin',
-      (stats) => {
+      stats => {
         if (['production'].includes(stats.compilation.options.mode)) {
           writeTOC();
         }
@@ -94,11 +94,20 @@ function writeTOC() {
 }
 
 function addTOCEntry(tocStream, filename) {
-  let contents = fs.readFileSync(path.join(__dirname, 'system-files', filename), {encoding: 'utf8'});
-  contents = contents.replaceAll('___cssURL___', 'common.css');
-  contents = contents.replaceAll('___jsURL___', 'common.js');
-  contents = contents.replaceAll('___windowId___', -1);
-  fs.writeFileSync(path.join(__dirname, 'ide', 'contents', filename + '.html'), contents);
+  let htmlContents = fs.readFileSync(path.join(__dirname, 'system-files', filename), {encoding: 'utf8'});
+  htmlContents = htmlContents.replace(/<html>|<head>|___cssURL___|___jsURL___/g, string => {
+    switch (string) {
+      case '<html>':
+        return `<html class="light">`;
+      case '<head>':
+        return `<head><link rel="canonical" href="https://evlambda.org/ide/contents/${filename + '.php'}"/>`;
+      case '___cssURL___':
+        return 'common.css';
+      case  '___jsURL___':
+        return 'common.js';
+    }
+  });
+  fs.writeFileSync(path.join(__dirname, 'ide', 'contents', filename + '.html'), htmlContents);
   const stream = fs.createWriteStream(path.join(__dirname, 'ide', 'contents', filename + '.php'));
   writePreamble(stream, true);
   stream.write(`<iframe src="${filename + '.html'}"></iframe>`);
@@ -111,7 +120,7 @@ class GenerateBOMWebpackPlugin {
   apply(compiler) {
     compiler.hooks.done.tap(
       'Generate BOM Webpack Plugin',
-      (stats) => {
+      stats => {
         if (['production'].includes(stats.compilation.options.mode)) {
           LicenseChecker.init(
             {start: '.'},
@@ -132,12 +141,12 @@ class GenerateBOMWebpackPlugin {
                 for (const [pathname, module] of stats.compilation._modules.entries()) {
                   const match = pathname.match(/\/node_modules\/([^@][^\/]*)\//);
                   // .../node_modules/xxx/... => xxx
-                  if (match !== null) {
+                  if (match) {
                     modules.add(match[1]);
                   } else {
                     const match = pathname.match(/\/node_modules\/(@[^\/]+\/[^\/]+)\//);
                     // .../node_modules/@xxx/yyy/... => @xxx/yyy
-                    if (match !== null) {
+                    if (match) {
                       modules.add(match[1]);
                     }
                   }
@@ -181,7 +190,7 @@ class GenerateBOMWebpackPlugin {
 
 function writePackageProperty(stream, pkg, propertyName) {
   const propertyValue = pkg[propertyName];
-  if (propertyValue !== undefined) {
+  if (propertyValue) {
     const escapedPropertyValue = htmlEscape(propertyValue);
     if (/^https?:\/\//.test(propertyValue)) {
       stream.write(`<p class="property">${propertyName}: <a href="${escapedPropertyValue}">${escapedPropertyValue}</a></p>`);
@@ -193,7 +202,7 @@ function writePackageProperty(stream, pkg, propertyName) {
 
 function writeLicenseFile(stream, pkg) {
   const licenseFile = pkg.licenseFile;
-  if (licenseFile !== undefined) {
+  if (licenseFile) {
     const basename = path.basename(licenseFile, path.extname(licenseFile)).toUpperCase();
     if (basename !== 'README' && fs.existsSync(licenseFile)) {
       stream.write('<pre>');
@@ -204,7 +213,7 @@ function writeLicenseFile(stream, pkg) {
 }
 
 function htmlEscape(string) {
-  return string.replace(/[<>&'"]/g, (char) => {
+  return string.replace(/[<>&'"]/g, char => {
     switch (char) {
       case '<':
         return '&lt;';
@@ -220,54 +229,60 @@ function htmlEscape(string) {
   });
 }
 
-export default {
-  entry: './src/ide.jsx',
-  output: {
-    path: path.join(__dirname, 'ide'),
-    filename: 'ide.js',
-    clean: true
-  },
-  module: {
-    rules: [
-      {
-        test: /\.(js|jsx)$/,
-        exclude: /node_modules/,
-        use: ['babel-loader']
-      },
-      {
-        test: /\.scss$/,
-        exclude: /node_modules/,
-        use: ['style-loader', 'css-loader', 'sass-loader']
-      }
-    ]
-  },
-  plugins: [
-    new HTMLWebpackPlugin({
-      template: './src/ide.html',
-      filename: 'ide.html'
-    }),
-    new ESLintWebpackPlugin({
-      extensions: ['js', 'jsx']
-    }),
-    new CopyWebpackPlugin({
-      patterns: [
-        {
-          from: path.join(__dirname, 'node_modules', 'mathjax'),
-          to: path.join(__dirname, 'ide', 'mathjax')
-        },
-        {
-          from: path.join(__dirname, 'node_modules', '@mathjax', 'mathjax-newcm-font'),
-          to: path.join(__dirname, 'ide', 'mathjax-newcm-font')
-        },
+export default env => {
+  const mode = env.production ? 'production' : 'development';
+  console.log(`mode = ${mode}`);
+  return {
+    entry: './src/ide.jsx',
+    output: {
+      path: path.join(__dirname, 'ide'),
+      filename: 'ide.js',
+      clean: true
+    },
+    module: {
+      rules: [
         {
-          from: path.join(__dirname, 'node_modules', '@mathjax', 'mathjax-stix2-font'),
-          to: path.join(__dirname, 'ide', 'mathjax-stix2-font')
+          test: /\.(js|jsx)$/,
+          exclude: /node_modules/,
+          use: [
+            {
+              loader: 'babel-loader',
+              options: {
+                envName: mode
+              }
+            }
+          ]
         }
       ]
-    }),
-    new ArchiveSystemFilesWebpackPlugin(),
-    new PublishSystemFilesWebpackPlugin(),
-    new GenerateBOMWebpackPlugin()
-  ],
-  mode: 'development'
-};
+    },
+    plugins: [
+      new HTMLWebpackPlugin({
+        template: './src/ide.html',
+        filename: 'ide.html'
+      }),
+      new ESLintWebpackPlugin({
+        extensions: ['js', 'jsx']
+      }),
+      new CopyWebpackPlugin({
+        patterns: [
+          {
+            from: path.join(__dirname, 'node_modules', 'mathjax'),
+            to: path.join(__dirname, 'ide', 'mathjax')
+          },
+          {
+            from: path.join(__dirname, 'node_modules', '@mathjax', 'mathjax-newcm-font'),
+            to: path.join(__dirname, 'ide', 'mathjax-newcm-font')
+          },
+          {
+            from: path.join(__dirname, 'node_modules', '@mathjax', 'mathjax-stix2-font'),
+            to: path.join(__dirname, 'ide', 'mathjax-stix2-font')
+          }
+        ]
+      }),
+      new ArchiveSystemFilesWebpackPlugin(),
+      new PublishSystemFilesWebpackPlugin(),
+      new GenerateBOMWebpackPlugin()
+    ],
+    mode: mode
+  };
+}