From 0e9e7c343e94b9c798d9d487972a93302a2f93b4 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 00:35:08 +0000 Subject: [PATCH 1/2] feat: render Mermaid diagrams in docs pages Exclude mermaid fences from Shiki and draw them in the browser with mermaid, loaded only on pages that have a diagram. Colours come from the semantic tokens in global.css. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claude --- astro.config.ts | 3 + package-lock.json | 1424 ++++++++++++++++++++++++++----- package.json | 3 +- src/layouts/DocsLayout.astro | 4 + src/scripts/mermaid-diagrams.ts | 68 ++ src/styles/global.css | 29 + 6 files changed, 1310 insertions(+), 221 deletions(-) create mode 100644 src/scripts/mermaid-diagrams.ts diff --git a/astro.config.ts b/astro.config.ts index 9dbba51..20f9790 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -15,6 +15,9 @@ export default defineConfig({ plugins: [tailwindcss()], }, markdown: { + // Mermaid fences are left as plain
 blocks
+    // and drawn in the browser by src/scripts/mermaid-diagrams.ts.
+    syntaxHighlight: { type: "shiki", excludeLangs: ["mermaid"] },
     shikiConfig: {
       // Dark theme with warm orange accents, close to the site's palette;
       // the block background is overridden to --terminal in global.css.
diff --git a/package-lock.json b/package-lock.json
index 8a934b9..62cd242 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,7 +13,8 @@
         "@astrojs/sitemap": "^3.7.3",
         "@fontsource-variable/geist": "^5.2.9",
         "@fontsource-variable/jetbrains-mono": "^5.2.8",
-        "astro": "^7.0.5"
+        "astro": "^7.0.5",
+        "mermaid": "11.17.2"
       },
       "devDependencies": {
         "@astrojs/check": "^0.9.9",
@@ -29,6 +30,19 @@
         "node": ">=22.12.0"
       }
     },
+    "node_modules/@antfu/install-pkg": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-2.1.0.tgz",
+      "integrity": "sha512-sdg9NxU3zR4Mnawfbc/x6GB5Wf17WYud5qOuEuxXjaKpYpMkISSJEjItGebXJ2bQ4DIcly4NYH23mtkGJjvKUw==",
+      "license": "MIT",
+      "dependencies": {
+        "package-manager-detector": "^1.8.0",
+        "tinyexec": "^1.3.1"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/antfu"
+      }
+    },
     "node_modules/@astrojs/check": {
       "version": "0.9.9",
       "resolved": "https://registry.npmjs.org/@astrojs/check/-/check-0.9.9.tgz",
@@ -114,9 +128,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -133,9 +144,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -152,9 +160,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -171,9 +176,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -467,6 +469,12 @@
         "node": ">=6.9.0"
       }
     },
+    "node_modules/@braintree/sanitize-url": {
+      "version": "7.1.2",
+      "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.2.tgz",
+      "integrity": "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==",
+      "license": "MIT"
+    },
     "node_modules/@bruits/satteri-darwin-arm64": {
       "version": "0.9.4",
       "resolved": "https://registry.npmjs.org/@bruits/satteri-darwin-arm64/-/satteri-darwin-arm64-0.9.4.tgz",
@@ -498,9 +506,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "optional": true,
       "os": [
         "linux"
@@ -513,9 +518,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "musl"
-      ],
       "optional": true,
       "os": [
         "linux"
@@ -528,9 +530,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "optional": true,
       "os": [
         "linux"
@@ -543,9 +542,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "musl"
-      ],
       "optional": true,
       "os": [
         "linux"
@@ -604,6 +600,12 @@
         "node": ">=18"
       }
     },
+    "node_modules/@chevrotain/types": {
+      "version": "11.1.2",
+      "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.1.2.tgz",
+      "integrity": "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==",
+      "license": "Apache-2.0"
+    },
     "node_modules/@clack/core": {
       "version": "1.4.2",
       "resolved": "https://registry.npmjs.org/@clack/core/-/core-1.4.2.tgz",
@@ -1369,6 +1371,23 @@
         "url": "https://github.com/sponsors/nzakas"
       }
     },
+    "node_modules/@iconify/types": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",
+      "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",
+      "license": "MIT"
+    },
+    "node_modules/@iconify/utils": {
+      "version": "3.1.7",
+      "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.7.tgz",
+      "integrity": "sha512-JZHlwdID+dy+lTgbYC8NEC4zeugqeYsc6jewvzb4c58kHauJn+X7rNwQjxz5p2qSjqaEeQoLkCIQ9v/H4PK0/w==",
+      "license": "MIT",
+      "dependencies": {
+        "@antfu/install-pkg": "^2.0.1",
+        "@iconify/types": "^2.0.0",
+        "import-meta-resolve": "^4.2.0"
+      }
+    },
     "node_modules/@img/colour": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz",
@@ -1481,9 +1500,6 @@
       "cpu": [
         "arm"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "LGPL-3.0-or-later",
       "optional": true,
       "os": [
@@ -1500,9 +1516,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "LGPL-3.0-or-later",
       "optional": true,
       "os": [
@@ -1519,9 +1532,6 @@
       "cpu": [
         "ppc64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "LGPL-3.0-or-later",
       "optional": true,
       "os": [
@@ -1538,9 +1548,6 @@
       "cpu": [
         "riscv64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "LGPL-3.0-or-later",
       "optional": true,
       "os": [
@@ -1557,9 +1564,6 @@
       "cpu": [
         "s390x"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "LGPL-3.0-or-later",
       "optional": true,
       "os": [
@@ -1576,9 +1580,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "LGPL-3.0-or-later",
       "optional": true,
       "os": [
@@ -1595,9 +1596,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "LGPL-3.0-or-later",
       "optional": true,
       "os": [
@@ -1614,9 +1612,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "LGPL-3.0-or-later",
       "optional": true,
       "os": [
@@ -1633,9 +1628,6 @@
       "cpu": [
         "arm"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "Apache-2.0",
       "optional": true,
       "os": [
@@ -1658,9 +1650,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "Apache-2.0",
       "optional": true,
       "os": [
@@ -1683,9 +1672,6 @@
       "cpu": [
         "ppc64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "Apache-2.0",
       "optional": true,
       "os": [
@@ -1708,9 +1694,6 @@
       "cpu": [
         "riscv64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "Apache-2.0",
       "optional": true,
       "os": [
@@ -1733,9 +1716,6 @@
       "cpu": [
         "s390x"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "Apache-2.0",
       "optional": true,
       "os": [
@@ -1758,9 +1738,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "Apache-2.0",
       "optional": true,
       "os": [
@@ -1783,9 +1760,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "Apache-2.0",
       "optional": true,
       "os": [
@@ -1808,9 +1782,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "Apache-2.0",
       "optional": true,
       "os": [
@@ -2013,6 +1984,15 @@
         "@types/estree": "^1.0.0"
       }
     },
+    "node_modules/@mermaid-js/parser": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.2.1.tgz",
+      "integrity": "sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw==",
+      "license": "MIT",
+      "dependencies": {
+        "@chevrotain/types": "~11.1.2"
+      }
+    },
     "node_modules/@napi-rs/wasm-runtime": {
       "version": "1.1.6",
       "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz",
@@ -2184,9 +2164,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2203,9 +2180,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2222,9 +2196,6 @@
       "cpu": [
         "ppc64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2241,9 +2212,6 @@
       "cpu": [
         "s390x"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2260,9 +2228,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2279,9 +2244,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2618,9 +2580,6 @@
         "arm64"
       ],
       "dev": true,
-      "libc": [
-        "glibc"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2638,9 +2597,6 @@
         "arm64"
       ],
       "dev": true,
-      "libc": [
-        "musl"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2658,9 +2614,6 @@
         "x64"
       ],
       "dev": true,
-      "libc": [
-        "glibc"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2678,9 +2631,6 @@
         "x64"
       ],
       "dev": true,
-      "libc": [
-        "musl"
-      ],
       "license": "MIT",
       "optional": true,
       "os": [
@@ -2779,6 +2729,259 @@
         "tslib": "^2.4.0"
       }
     },
+    "node_modules/@types/d3": {
+      "version": "7.4.3",
+      "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz",
+      "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-array": "*",
+        "@types/d3-axis": "*",
+        "@types/d3-brush": "*",
+        "@types/d3-chord": "*",
+        "@types/d3-color": "*",
+        "@types/d3-contour": "*",
+        "@types/d3-delaunay": "*",
+        "@types/d3-dispatch": "*",
+        "@types/d3-drag": "*",
+        "@types/d3-dsv": "*",
+        "@types/d3-ease": "*",
+        "@types/d3-fetch": "*",
+        "@types/d3-force": "*",
+        "@types/d3-format": "*",
+        "@types/d3-geo": "*",
+        "@types/d3-hierarchy": "*",
+        "@types/d3-interpolate": "*",
+        "@types/d3-path": "*",
+        "@types/d3-polygon": "*",
+        "@types/d3-quadtree": "*",
+        "@types/d3-random": "*",
+        "@types/d3-scale": "*",
+        "@types/d3-scale-chromatic": "*",
+        "@types/d3-selection": "*",
+        "@types/d3-shape": "*",
+        "@types/d3-time": "*",
+        "@types/d3-time-format": "*",
+        "@types/d3-timer": "*",
+        "@types/d3-transition": "*",
+        "@types/d3-zoom": "*"
+      }
+    },
+    "node_modules/@types/d3-array": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz",
+      "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-axis": {
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz",
+      "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-selection": "*"
+      }
+    },
+    "node_modules/@types/d3-brush": {
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz",
+      "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-selection": "*"
+      }
+    },
+    "node_modules/@types/d3-chord": {
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz",
+      "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-color": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",
+      "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-contour": {
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz",
+      "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-array": "*",
+        "@types/geojson": "*"
+      }
+    },
+    "node_modules/@types/d3-delaunay": {
+      "version": "6.0.4",
+      "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz",
+      "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-dispatch": {
+      "version": "3.0.7",
+      "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz",
+      "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-drag": {
+      "version": "3.0.7",
+      "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz",
+      "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-selection": "*"
+      }
+    },
+    "node_modules/@types/d3-dsv": {
+      "version": "3.0.7",
+      "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz",
+      "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-ease": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz",
+      "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-fetch": {
+      "version": "3.0.7",
+      "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz",
+      "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-dsv": "*"
+      }
+    },
+    "node_modules/@types/d3-force": {
+      "version": "3.0.10",
+      "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz",
+      "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-format": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz",
+      "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-geo": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.1.tgz",
+      "integrity": "sha512-65Emv9fQiQQqphLlRkuQ5ypPsOmWPhtBGCMv61JDPEPMvsx+gzhGf74yw1a78xFKPj6zw4AgQICJoQv0vK9M2w==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/geojson": "*"
+      }
+    },
+    "node_modules/@types/d3-hierarchy": {
+      "version": "3.1.7",
+      "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz",
+      "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-interpolate": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",
+      "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-color": "*"
+      }
+    },
+    "node_modules/@types/d3-path": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz",
+      "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-polygon": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz",
+      "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-quadtree": {
+      "version": "3.0.6",
+      "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz",
+      "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-random": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.4.tgz",
+      "integrity": "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-scale": {
+      "version": "4.0.9",
+      "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz",
+      "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-time": "*"
+      }
+    },
+    "node_modules/@types/d3-scale-chromatic": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",
+      "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-selection": {
+      "version": "3.0.12",
+      "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.12.tgz",
+      "integrity": "sha512-Qe/KWYhEiIIxGs7HrAAjMfShxKldx19SJtr5zu53f3afPsdZNz7HHtdTLXo/kqeiWNXVycI24kSnfzBYkTzpgw==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-shape": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.2.0.tgz",
+      "integrity": "sha512-kVd74ta9eof3eJOvbNd1vGKS/XERRyQbT26Og63hIsvDO84cjD5gEOhsXf26w3FSoNlPVz84DOFcKv/oou+fMw==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-path": "*"
+      }
+    },
+    "node_modules/@types/d3-time": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz",
+      "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-time-format": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz",
+      "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-timer": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz",
+      "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==",
+      "license": "MIT"
+    },
+    "node_modules/@types/d3-transition": {
+      "version": "3.0.9",
+      "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz",
+      "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-selection": "*"
+      }
+    },
+    "node_modules/@types/d3-zoom": {
+      "version": "3.0.9",
+      "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.9.tgz",
+      "integrity": "sha512-0sE1406XBYJGiqD3AusTl9ZqC//2mIXix51tbom25gDCA8ri4xnSZg28CaSE8Srl6FClqABUKfsn0qghgdepMA==",
+      "license": "MIT",
+      "dependencies": {
+        "@types/d3-interpolate": "*",
+        "@types/d3-selection": "*"
+      }
+    },
     "node_modules/@types/debug": {
       "version": "4.1.13",
       "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.13.tgz",
@@ -2803,6 +3006,12 @@
         "@types/estree": "*"
       }
     },
+    "node_modules/@types/geojson": {
+      "version": "7946.0.16",
+      "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",
+      "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",
+      "license": "MIT"
+    },
     "node_modules/@types/hast": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.4.tgz",
@@ -2867,6 +3076,13 @@
         "@types/node": "*"
       }
     },
+    "node_modules/@types/trusted-types": {
+      "version": "2.0.7",
+      "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",
+      "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",
+      "license": "MIT",
+      "optional": true
+    },
     "node_modules/@types/unist": {
       "version": "3.0.3",
       "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
@@ -3161,6 +3377,16 @@
       "integrity": "sha512-5jsZFwgR5rTdKwidH9Qmat75RKwqfpKlWWB1frDkljN127mwqBu8K0PYo7/hFpF03IEJpfVPpCQDY/eDx3iHvA==",
       "license": "ISC"
     },
+    "node_modules/@upsetjs/venn.js": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz",
+      "integrity": "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==",
+      "license": "MIT",
+      "optionalDependencies": {
+        "d3-selection": "^3.0.0",
+        "d3-transition": "^3.0.1"
+      }
+    },
     "node_modules/@volar/kit": {
       "version": "2.4.28",
       "resolved": "https://registry.npmjs.org/@volar/kit/-/kit-2.4.28.tgz",
@@ -3783,142 +4009,666 @@
         "node": ">= 18"
       }
     },
-    "node_modules/concat-map": {
-      "version": "0.0.1",
-      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
-      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
-      "dev": true,
-      "license": "MIT"
+    "node_modules/concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+      "dev": true,
+      "license": "MIT"
+    },
+    "node_modules/cookie": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
+      "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=18"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/express"
+      }
+    },
+    "node_modules/cookie-es": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.3.tgz",
+      "integrity": "sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw==",
+      "license": "MIT"
+    },
+    "node_modules/cose-base": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz",
+      "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==",
+      "license": "MIT",
+      "dependencies": {
+        "layout-base": "^1.0.0"
+      }
+    },
+    "node_modules/cross-spawn": {
+      "version": "7.0.6",
+      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+      "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+      "dev": true,
+      "license": "MIT",
+      "dependencies": {
+        "path-key": "^3.1.0",
+        "shebang-command": "^2.0.0",
+        "which": "^2.0.1"
+      },
+      "engines": {
+        "node": ">= 8"
+      }
+    },
+    "node_modules/crossws": {
+      "version": "0.3.5",
+      "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.5.tgz",
+      "integrity": "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==",
+      "license": "MIT",
+      "dependencies": {
+        "uncrypto": "^0.1.3"
+      }
+    },
+    "node_modules/css-select": {
+      "version": "5.2.2",
+      "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz",
+      "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==",
+      "license": "BSD-2-Clause",
+      "dependencies": {
+        "boolbase": "^1.0.0",
+        "css-what": "^6.1.0",
+        "domhandler": "^5.0.2",
+        "domutils": "^3.0.1",
+        "nth-check": "^2.0.1"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/fb55"
+      }
+    },
+    "node_modules/css-tree": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz",
+      "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==",
+      "license": "MIT",
+      "dependencies": {
+        "mdn-data": "2.27.1",
+        "source-map-js": "^1.2.1"
+      },
+      "engines": {
+        "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
+      }
+    },
+    "node_modules/css-what": {
+      "version": "6.2.2",
+      "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz",
+      "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==",
+      "license": "BSD-2-Clause",
+      "engines": {
+        "node": ">= 6"
+      },
+      "funding": {
+        "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/csso": {
+      "version": "5.0.5",
+      "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz",
+      "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==",
+      "license": "MIT",
+      "dependencies": {
+        "css-tree": "~2.2.0"
+      },
+      "engines": {
+        "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/csso/node_modules/css-tree": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz",
+      "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==",
+      "license": "MIT",
+      "dependencies": {
+        "mdn-data": "2.0.28",
+        "source-map-js": "^1.0.1"
+      },
+      "engines": {
+        "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0",
+        "npm": ">=7.0.0"
+      }
+    },
+    "node_modules/csso/node_modules/mdn-data": {
+      "version": "2.0.28",
+      "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz",
+      "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==",
+      "license": "CC0-1.0"
+    },
+    "node_modules/cytoscape": {
+      "version": "3.35.0",
+      "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.35.0.tgz",
+      "integrity": "sha512-sMvBIXiGMnhkCaWz2R06FwF/27MNlS+Tqvi17foO9UhnUg3XGZccKjxsvEqQFAQYMSSZmN5SxYzUYlQ0DOJJ3g==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.10"
+      }
+    },
+    "node_modules/cytoscape-cose-bilkent": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz",
+      "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==",
+      "license": "MIT",
+      "dependencies": {
+        "cose-base": "^1.0.0"
+      },
+      "peerDependencies": {
+        "cytoscape": "^3.2.0"
+      }
+    },
+    "node_modules/cytoscape-fcose": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz",
+      "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==",
+      "license": "MIT",
+      "dependencies": {
+        "cose-base": "^2.2.0"
+      },
+      "peerDependencies": {
+        "cytoscape": "^3.2.0"
+      }
+    },
+    "node_modules/cytoscape-fcose/node_modules/cose-base": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz",
+      "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==",
+      "license": "MIT",
+      "dependencies": {
+        "layout-base": "^2.0.0"
+      }
+    },
+    "node_modules/cytoscape-fcose/node_modules/layout-base": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz",
+      "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==",
+      "license": "MIT"
+    },
+    "node_modules/d3": {
+      "version": "7.9.2",
+      "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.2.tgz",
+      "integrity": "sha512-ZKb/mONPVKzaO5UlcWcwN8bS4ezvQaYu+bsou+XgNABdGC800kwH651ADTbbTxMPHW13UlvbQafdmJQDk1w7Mg==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-array": "^3.2.5",
+        "d3-axis": "^3.0.1",
+        "d3-brush": "^3.0.1",
+        "d3-chord": "^3.0.2",
+        "d3-color": "^3.1.1",
+        "d3-contour": "^4.0.3",
+        "d3-delaunay": "^6.0.6",
+        "d3-dispatch": "^3.0.2",
+        "d3-drag": "^3.0.1",
+        "d3-dsv": "^3.0.2",
+        "d3-ease": "^3.0.2",
+        "d3-fetch": "^3.0.2",
+        "d3-force": "^3.0.1",
+        "d3-format": "^3.1.3",
+        "d3-geo": "^3.1.2",
+        "d3-hierarchy": "^3.1.3",
+        "d3-interpolate": "^3.0.2",
+        "d3-path": "^3.1.1",
+        "d3-polygon": "^3.0.2",
+        "d3-quadtree": "^3.0.2",
+        "d3-random": "^3.0.2",
+        "d3-scale": "^4.0.3",
+        "d3-scale-chromatic": "^3.1.1",
+        "d3-selection": "^3.0.1",
+        "d3-shape": "^3.2.1",
+        "d3-time": "^3.1.1",
+        "d3-time-format": "^4.1.1",
+        "d3-timer": "^3.0.2",
+        "d3-transition": "^3.0.2",
+        "d3-zoom": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-array": {
+      "version": "3.2.5",
+      "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.5.tgz",
+      "integrity": "sha512-Th8qGXoBalmWsstpkuhmBuTsBQIFqYOJtjlBvNVvBfJ8E3uYusBUwUR8HU20U0qKKQkgCvKyR1YjiozWadk5QA==",
+      "license": "ISC",
+      "dependencies": {
+        "internmap": "1 - 2"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-axis": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.1.tgz",
+      "integrity": "sha512-E5QCXfaf/uJZEHHiqoWRq+bQEm2PzoVFv2rDC7CZ3wwI0MjfMW3w83J3ubobG4IJj3lShAI5eiPJhOu/8wHofA==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-brush": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.1.tgz",
+      "integrity": "sha512-L5Glqa/Gb7LU3ndIOMtA5mDzlJ0aXKp5ELP2X09ctWF23jO7+faIUVDbmaIi+D6k3EemXFWn1F3lkfguExoVhA==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-dispatch": "1 - 3",
+        "d3-drag": "2 - 3",
+        "d3-interpolate": "1 - 3",
+        "d3-selection": "3",
+        "d3-transition": "3"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-chord": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.2.tgz",
+      "integrity": "sha512-cGmADo5M2PTi3ewJZ2lcE32eURd4JmHtQ5JwRIUcas5L1SXqufG9yPyjWp8fW0gRi7aZi9bgbZPFZO1eyZ+1CQ==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-path": "1 - 3"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-color": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.1.tgz",
+      "integrity": "sha512-lfab8x0Bj0UO7SNsY8dZSbNIA6ipbkE3X0NG9nqjCu6CfCHZseuDnOSJY7hidKrjpP++i1M2qT+FlAdPKYRilA==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-contour": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.3.tgz",
+      "integrity": "sha512-5DYURc8KwXPOhSUBblU0P9rVcArsSPxPOxsfO0Eud0s28oU0sB2e80aRHRL9AZW3usT8ikFKyIHpHHLNWLdRVA==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-array": "^3.2.4"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-delaunay": {
+      "version": "6.0.6",
+      "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.6.tgz",
+      "integrity": "sha512-DMQIEvSJhZCB6pwedcXaAlQ+MeKU5LlM2XakKtc73b/VM+RBiI1SRXycOEOKg2jsKj4zZ9F0KGYG6nCGwwWu/g==",
+      "license": "ISC",
+      "dependencies": {
+        "delaunator": "5"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-dispatch": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.2.tgz",
+      "integrity": "sha512-sAzH4Y4nsLo8eSqw5jKiZt+LU2wZmL/qS+OkxQGjhwazB/D7TY34R/QK1eshfGr7cZEKymKZ/Haem7m+lu98Sg==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-drag": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.1.tgz",
+      "integrity": "sha512-OWeoayCq8J69hUIjvL+Mb6Q6Oaj/fyHV5XaXByEUAG+JUjIfTGDnk3qGpcXrD3VmQ3BSV96fcbM6fqq7C0tbPA==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-dispatch": "1 - 3",
+        "d3-selection": "3"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-dsv": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.2.tgz",
+      "integrity": "sha512-FUnXhX7I4/AXyRCZzwfZTDGSq8PGZ4oR0tiCBqNGOZMsDrQ+6sIWNQnBzcCGhzJKZ6uCvCezTwflUqI209RRiQ==",
+      "license": "ISC",
+      "dependencies": {
+        "commander": "7",
+        "iconv-lite": "0.6",
+        "rw": "1"
+      },
+      "bin": {
+        "csv2json": "bin/dsv2json.js",
+        "csv2tsv": "bin/dsv2dsv.js",
+        "dsv2dsv": "bin/dsv2dsv.js",
+        "dsv2json": "bin/dsv2json.js",
+        "json2csv": "bin/json2dsv.js",
+        "json2dsv": "bin/json2dsv.js",
+        "json2tsv": "bin/json2dsv.js",
+        "tsv2csv": "bin/dsv2dsv.js",
+        "tsv2json": "bin/dsv2json.js"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-dsv/node_modules/commander": {
+      "version": "7.2.0",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",
+      "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 10"
+      }
+    },
+    "node_modules/d3-ease": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.2.tgz",
+      "integrity": "sha512-B5znKqRmKROAN4oHWQ50W/qisVjA9GXh2WMsVKdFVp4DxWmcrOsweqgUOUVsv5th96kwaZlokU6SlV4J3gak1w==",
+      "license": "BSD-3-Clause",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-fetch": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.2.tgz",
+      "integrity": "sha512-1wGF62bgjMRbF6mqbD+6rRWBL2hwWVYQjFO2UP3Wm1nIAvJZKaQxXM5caVY7athoCa8wIq9lCf7g44lPWFk50g==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-dsv": "1 - 3"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-force": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.1.tgz",
+      "integrity": "sha512-kAaaHLFebBYwgi5cYBXAI8vKrQFMCD2MEswj2QuPKKbdU1wYLc8WXtS7O8F/b6POCIe3gJjY6hkDstHi1yMETQ==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-dispatch": "1 - 3",
+        "d3-quadtree": "1 - 3",
+        "d3-timer": "1 - 3"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-format": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.3.tgz",
+      "integrity": "sha512-+F+/49swqmGuQJmSKnVMIDH/QkEFV5li9QRj0xm/KhyAUBv099O5PrvpQFxBp24PYph17Mnvt9mjKQV0ii0nMA==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-geo": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.2.tgz",
+      "integrity": "sha512-5R8ZgDQorIxmauv7R6gpE/ndz+Z0qAZssigq0aXFdvPHdY41RqtW02jrRUQAL724NdPABYXo1+gQEGBBr7uKNg==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-array": "2.5.0 - 3"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-hierarchy": {
+      "version": "3.1.3",
+      "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.3.tgz",
+      "integrity": "sha512-GRajN5ZcnEwYFWqqdzhG1qJ3+fDg6WWzk47TJg7ePY7yvYAgRfD2r1mUx+wviBOWuCwamCUzjwMSdato43jbGA==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-interpolate": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.2.tgz",
+      "integrity": "sha512-IRzGU62DtxhvsnSTWMQIdnoZ6gA+BCWwBon1EJI6SjoN595799b6z/QRBzXfFhE8iupUPp3042yBNo0STPqnzQ==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-color": "1 - 3"
+      },
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-path": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.1.tgz",
+      "integrity": "sha512-jsbgV8zIT38ReB9O7X7gcLndTQRONSqNNd+oGIaTBdUug4r5jFmp0N6RY9R5GWbdUDucn0qoTGyfjapT4tDhcg==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-polygon": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.2.tgz",
+      "integrity": "sha512-WAUvPudGU1Dn4mDPfb6+JnnbeVEV53hG/BoT+bxts6AkZsOpTEiV1jHYX+2vtwCICNFG9Wxv8QS+eW1zE/Dwfg==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-quadtree": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.2.tgz",
+      "integrity": "sha512-9Lu9mqJKRbIk0d6mKDjpvPURaPdwHVK5CYbcdd0/4vBgz4ldz/7TIOse3kNERsByGNfld58KEco507AztJWyTQ==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-random": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.2.tgz",
+      "integrity": "sha512-PxJi9LNV+7mulaYO77nd+oGurXGL1fhedXjHnB3pWLUcqDnQtF4VASoqnQGHgoXLByVdv5QJ/2kfwkGn5HTS8g==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-sankey": {
+      "version": "0.12.3",
+      "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz",
+      "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==",
+      "license": "BSD-3-Clause",
+      "dependencies": {
+        "d3-array": "1 - 2",
+        "d3-shape": "^1.2.0"
+      }
+    },
+    "node_modules/d3-sankey/node_modules/d3-array": {
+      "version": "2.12.1",
+      "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz",
+      "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==",
+      "license": "BSD-3-Clause",
+      "dependencies": {
+        "internmap": "^1.0.0"
+      }
+    },
+    "node_modules/d3-sankey/node_modules/d3-path": {
+      "version": "1.0.9",
+      "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",
+      "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==",
+      "license": "BSD-3-Clause"
+    },
+    "node_modules/d3-sankey/node_modules/d3-shape": {
+      "version": "1.3.7",
+      "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",
+      "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",
+      "license": "BSD-3-Clause",
+      "dependencies": {
+        "d3-path": "1"
+      }
+    },
+    "node_modules/d3-sankey/node_modules/internmap": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",
+      "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==",
+      "license": "ISC"
     },
-    "node_modules/cookie": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz",
-      "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==",
-      "license": "MIT",
-      "engines": {
-        "node": ">=18"
+    "node_modules/d3-scale": {
+      "version": "4.0.3",
+      "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.3.tgz",
+      "integrity": "sha512-66cWobCNzcMvlfoaDHCxuIv9TBUWG1BLOWdv9kHHFuCr1JdqAWPvTmsaEYDD5NRMyWZ5+7u0GqiCDfMXMqh3hg==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-array": "2.10.0 - 3",
+        "d3-format": "1 - 3",
+        "d3-interpolate": "1.2.0 - 3",
+        "d3-time": "2.1.1 - 3",
+        "d3-time-format": "2 - 4"
       },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/express"
+      "engines": {
+        "node": ">=12"
       }
     },
-    "node_modules/cookie-es": {
-      "version": "1.2.3",
-      "resolved": "https://registry.npmjs.org/cookie-es/-/cookie-es-1.2.3.tgz",
-      "integrity": "sha512-lXVyvUvrNXblMqzIRrxHb57UUVmqsSWlxqt3XIjCkUP0wDAf6uicO6KMbEgYrMNtEvWgWHwe42CKxPu9MYAnWw==",
-      "license": "MIT"
-    },
-    "node_modules/cross-spawn": {
-      "version": "7.0.6",
-      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
-      "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
-      "dev": true,
-      "license": "MIT",
+    "node_modules/d3-scale-chromatic": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.1.tgz",
+      "integrity": "sha512-lA5gfN2yMvmChubmptnDiBfeGpHD7Yb1EbvCz0TZE0WHXhyR6W2allPuhKtzV5ILQRqeOdefF0qYtERReLUBDg==",
+      "license": "ISC",
       "dependencies": {
-        "path-key": "^3.1.0",
-        "shebang-command": "^2.0.0",
-        "which": "^2.0.1"
+        "d3-color": "1 - 3",
+        "d3-interpolate": "1 - 3",
+        "d3-scale": "1 - 4"
       },
       "engines": {
-        "node": ">= 8"
+        "node": ">=12"
       }
     },
-    "node_modules/crossws": {
-      "version": "0.3.5",
-      "resolved": "https://registry.npmjs.org/crossws/-/crossws-0.3.5.tgz",
-      "integrity": "sha512-ojKiDvcmByhwa8YYqbQI/hg7MEU0NC03+pSdEq4ZUnZR9xXpwk7E43SMNGkn+JxJGPFtNvQ48+vV2p+P1ml5PA==",
-      "license": "MIT",
+    "node_modules/d3-selection": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.1.tgz",
+      "integrity": "sha512-ODSf35vqCrlCfp7hrm0eZjvOosSXSYLjqvIlhMBV9q9VOx7EBJG6pc+uXBswEZNJgCGJ+qnKYcWutbZDIxe/Xg==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
+    "node_modules/d3-shape": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.1.tgz",
+      "integrity": "sha512-dm2o+lbKdzg9tY7GEag/dB9hcbodLfwkE/DkvqbELJXaMz0yKzWWhZqhbI7CKubukA7HnRyz0avdtvi7EPxPvw==",
+      "license": "ISC",
       "dependencies": {
-        "uncrypto": "^0.1.3"
+        "d3-path": "^3.1.1"
+      },
+      "engines": {
+        "node": ">=12"
       }
     },
-    "node_modules/css-select": {
-      "version": "5.2.2",
-      "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz",
-      "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==",
-      "license": "BSD-2-Clause",
+    "node_modules/d3-time": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.1.tgz",
+      "integrity": "sha512-Ze7rjrhMzdeulh0/hjcfFj7XLAHOfowtEMfsoG6DU866HPynQNW7Wfen6hzXcqKTv8XzxvF6Hzr5XD6bMHr2ug==",
+      "license": "ISC",
       "dependencies": {
-        "boolbase": "^1.0.0",
-        "css-what": "^6.1.0",
-        "domhandler": "^5.0.2",
-        "domutils": "^3.0.1",
-        "nth-check": "^2.0.1"
+        "d3-array": "2 - 3"
       },
-      "funding": {
-        "url": "https://github.com/sponsors/fb55"
+      "engines": {
+        "node": ">=12"
       }
     },
-    "node_modules/css-tree": {
-      "version": "3.2.1",
-      "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-3.2.1.tgz",
-      "integrity": "sha512-X7sjQzceUhu1u7Y/ylrRZFU2FS6LRiFVp6rKLPg23y3x3c3DOKAwuXGDp+PAGjh6CSnCjYeAul8pcT8bAl+lSA==",
-      "license": "MIT",
+    "node_modules/d3-time-format": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.1.tgz",
+      "integrity": "sha512-22XaqjyCjpqgda20erhsOjGmC3vvYwTNYniKAd45W5UWLDF43moeOuV9qYpRqobIlsnK0UhnKZjUUJm3VgORUA==",
+      "license": "ISC",
       "dependencies": {
-        "mdn-data": "2.27.1",
-        "source-map-js": "^1.2.1"
+        "d3-time": "1 - 3"
       },
       "engines": {
-        "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0"
+        "node": ">=12"
       }
     },
-    "node_modules/css-what": {
-      "version": "6.2.2",
-      "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz",
-      "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==",
-      "license": "BSD-2-Clause",
+    "node_modules/d3-timer": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.2.tgz",
+      "integrity": "sha512-1Il1aliroVSErrv5aulRBxAY+7+DnaoLIWGd1C6SsBTWDeobWiP/V69vwb8vT6abR1kKwaNe1196pmaQ1fK90A==",
+      "license": "ISC",
       "engines": {
-        "node": ">= 6"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/fb55"
+        "node": ">=12"
       }
     },
-    "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"
+    "node_modules/d3-transition": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.2.tgz",
+      "integrity": "sha512-RcjCsdFgyFoDB+QXLC5m60ZkTN0k9zH+ovoLlTdJnDS1AbfbcuowiM4pCKSTOclNibS4f4J4cbv2m7O7y8NTOQ==",
+      "license": "ISC",
+      "dependencies": {
+        "d3-color": "1 - 3",
+        "d3-dispatch": "1 - 3",
+        "d3-ease": "1 - 3",
+        "d3-interpolate": "1 - 3",
+        "d3-timer": "1 - 3"
       },
       "engines": {
-        "node": ">=4"
+        "node": ">=12"
+      },
+      "peerDependencies": {
+        "d3-selection": "2 - 3"
       }
     },
-    "node_modules/csso": {
-      "version": "5.0.5",
-      "resolved": "https://registry.npmjs.org/csso/-/csso-5.0.5.tgz",
-      "integrity": "sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ==",
-      "license": "MIT",
+    "node_modules/d3-zoom": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.1.tgz",
+      "integrity": "sha512-kfjD3BDQu/FOatpZ6JdMSyIoDwTxIpI29ySTI2J5ZlDaH1WbuJGQJ2Q9oJkWTEZEW98j6idezoomSD3Cn2zwiw==",
+      "license": "ISC",
       "dependencies": {
-        "css-tree": "~2.2.0"
+        "d3-dispatch": "1 - 3",
+        "d3-drag": "2 - 3",
+        "d3-interpolate": "1 - 3",
+        "d3-selection": "2 - 3",
+        "d3-transition": "2 - 3"
       },
       "engines": {
-        "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0",
-        "npm": ">=7.0.0"
+        "node": ">=12"
       }
     },
-    "node_modules/csso/node_modules/css-tree": {
-      "version": "2.2.1",
-      "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.2.1.tgz",
-      "integrity": "sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA==",
+    "node_modules/dagre-d3-es": {
+      "version": "7.0.14",
+      "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.14.tgz",
+      "integrity": "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==",
       "license": "MIT",
       "dependencies": {
-        "mdn-data": "2.0.28",
-        "source-map-js": "^1.0.1"
-      },
-      "engines": {
-        "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0",
-        "npm": ">=7.0.0"
+        "d3": "^7.9.0",
+        "lodash-es": "^4.17.21"
       }
     },
-    "node_modules/csso/node_modules/mdn-data": {
-      "version": "2.0.28",
-      "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.28.tgz",
-      "integrity": "sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g==",
-      "license": "CC0-1.0"
+    "node_modules/dayjs": {
+      "version": "1.11.23",
+      "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz",
+      "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==",
+      "license": "MIT"
     },
     "node_modules/debug": {
       "version": "4.4.3",
@@ -3963,6 +4713,15 @@
       "integrity": "sha512-7z22QmUWiQ/2d0KkdYmANbRUVABpZ9SNYyH5vx6PZ+nE5bcC0l7uFvEfHlyld/HcGBFTL536ClDt3DEcSlEJAQ==",
       "license": "MIT"
     },
+    "node_modules/delaunator": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz",
+      "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==",
+      "license": "ISC",
+      "dependencies": {
+        "robust-predicates": "^3.0.2"
+      }
+    },
     "node_modules/dequal": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
@@ -4068,6 +4827,15 @@
         "url": "https://github.com/fb55/domhandler?sponsor=1"
       }
     },
+    "node_modules/dompurify": {
+      "version": "3.4.18",
+      "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.18.tgz",
+      "integrity": "sha512-ofe3wI/uNm68HInABYFJYqQxRw1EaKAjNdrFVKqjUY+UZurvNd2L/HuQe097s/4RivWiZyP6tT7aoT8atjfhwg==",
+      "license": "(MPL-2.0 OR Apache-2.0)",
+      "optionalDependencies": {
+        "@types/trusted-types": "^2.0.7"
+      }
+    },
     "node_modules/domutils": {
       "version": "3.2.2",
       "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz",
@@ -4148,6 +4916,18 @@
       "integrity": "sha512-KLdwQm2NvGLDkQDCGvmiQrhkd0JbMzXthwQAUgWjQuQdBLFa3eiBP5arXZyA+f8x+x7OXgud6bq2rxjGtHV2tw==",
       "license": "MIT"
     },
+    "node_modules/es-toolkit": {
+      "version": "1.53.2",
+      "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.53.2.tgz",
+      "integrity": "sha512-iUqZ+NlwH4jUgRmXZUxFBsV/9762TQEa1O4IXLFBmDEjVHScBytKuseX23I0+v9ShZ5MYxEx6WKNzm6IPnex8g==",
+      "license": "MIT",
+      "workspaces": [
+        "docs",
+        "benchmarks",
+        "tests/types",
+        "tests/browser-compat"
+      ]
+    },
     "node_modules/esast-util-from-estree": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/esast-util-from-estree/-/esast-util-from-estree-2.0.0.tgz",
@@ -4654,6 +5434,15 @@
         "fast-string-width": "^3.0.2"
       }
     },
+    "node_modules/fastdom": {
+      "version": "1.0.12",
+      "resolved": "https://registry.npmjs.org/fastdom/-/fastdom-1.0.12.tgz",
+      "integrity": "sha512-LB+xjSTEbjHE1cWsxu+tN2Xqr1kpi+V9aADI7sVM5ZMaXyYGPHULQMzpJMYqOTULK/73pUkWVzzObFRBkPr+hg==",
+      "license": "MIT",
+      "dependencies": {
+        "strictdom": "^1.0.1"
+      }
+    },
     "node_modules/fastq": {
       "version": "1.20.1",
       "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz",
@@ -4870,6 +5659,12 @@
         "uncrypto": "^0.1.3"
       }
     },
+    "node_modules/hachure-fill": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz",
+      "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==",
+      "license": "MIT"
+    },
     "node_modules/has-flag": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -5134,6 +5929,18 @@
       "integrity": "sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==",
       "license": "BSD-2-Clause"
     },
+    "node_modules/iconv-lite": {
+      "version": "0.6.3",
+      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",
+      "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+      "license": "MIT",
+      "dependencies": {
+        "safer-buffer": ">= 2.1.2 < 3.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/ignore": {
       "version": "5.3.2",
       "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz",
@@ -5161,6 +5968,16 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/import-meta-resolve": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz",
+      "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==",
+      "license": "MIT",
+      "funding": {
+        "type": "github",
+        "url": "https://github.com/sponsors/wooorm"
+      }
+    },
     "node_modules/imurmurhash": {
       "version": "0.1.4",
       "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
@@ -5177,6 +5994,15 @@
       "integrity": "sha512-Nb2ctOyNR8DqQoR0OwRG95uNWIC0C1lCgf5Naz5H6Ji72KZ8OcFZLz2P5sNgwlyoJ8Yif11oMuYs5pBQa86csA==",
       "license": "MIT"
     },
+    "node_modules/internmap": {
+      "version": "2.0.3",
+      "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz",
+      "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",
+      "license": "ISC",
+      "engines": {
+        "node": ">=12"
+      }
+    },
     "node_modules/iron-webcrypto": {
       "version": "1.2.1",
       "resolved": "https://registry.npmjs.org/iron-webcrypto/-/iron-webcrypto-1.2.1.tgz",
@@ -5414,6 +6240,31 @@
       "integrity": "sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ==",
       "license": "MIT"
     },
+    "node_modules/katex": {
+      "version": "0.16.47",
+      "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.47.tgz",
+      "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==",
+      "funding": [
+        "https://opencollective.com/katex",
+        "https://github.com/sponsors/katex"
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "commander": "^8.3.0"
+      },
+      "bin": {
+        "katex": "cli.js"
+      }
+    },
+    "node_modules/katex/node_modules/commander": {
+      "version": "8.3.0",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",
+      "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 12"
+      }
+    },
     "node_modules/keyv": {
       "version": "4.5.4",
       "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
@@ -5424,6 +6275,11 @@
         "json-buffer": "3.0.1"
       }
     },
+    "node_modules/khroma": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz",
+      "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="
+    },
     "node_modules/kleur": {
       "version": "4.1.5",
       "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz",
@@ -5434,6 +6290,12 @@
         "node": ">=6"
       }
     },
+    "node_modules/layout-base": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz",
+      "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==",
+      "license": "MIT"
+    },
     "node_modules/levn": {
       "version": "0.4.1",
       "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
@@ -5584,9 +6446,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "MPL-2.0",
       "optional": true,
       "os": [
@@ -5607,9 +6466,6 @@
       "cpu": [
         "arm64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "MPL-2.0",
       "optional": true,
       "os": [
@@ -5630,9 +6486,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "glibc"
-      ],
       "license": "MPL-2.0",
       "optional": true,
       "os": [
@@ -5653,9 +6506,6 @@
       "cpu": [
         "x64"
       ],
-      "libc": [
-        "musl"
-      ],
       "license": "MPL-2.0",
       "optional": true,
       "os": [
@@ -5725,6 +6575,12 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
+    "node_modules/lodash-es": {
+      "version": "4.18.1",
+      "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",
+      "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",
+      "license": "MIT"
+    },
     "node_modules/lodash.merge": {
       "version": "4.6.2",
       "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
@@ -5793,6 +6649,18 @@
         "url": "https://github.com/sponsors/wooorm"
       }
     },
+    "node_modules/marked": {
+      "version": "16.4.2",
+      "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz",
+      "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==",
+      "license": "MIT",
+      "bin": {
+        "marked": "bin/marked.js"
+      },
+      "engines": {
+        "node": ">= 20"
+      }
+    },
     "node_modules/mdast-util-definitions": {
       "version": "6.0.0",
       "resolved": "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-6.0.0.tgz",
@@ -6123,6 +6991,36 @@
         "node": ">= 8"
       }
     },
+    "node_modules/mermaid": {
+      "version": "11.17.2",
+      "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.17.2.tgz",
+      "integrity": "sha512-V6K3C8EBdEsPFZXSKMJe6ppQOENxuHARr9GvHX4hh47lAbhMRD9qf4oEK7LoaRQxULMa80/qt5gHO73aCleBBg==",
+      "license": "MIT",
+      "dependencies": {
+        "@braintree/sanitize-url": "^7.1.2",
+        "@iconify/utils": "^3.0.2",
+        "@mermaid-js/parser": "^1.2.1",
+        "@types/d3": "^7.4.3",
+        "@upsetjs/venn.js": "^2.0.0",
+        "cytoscape": "^3.34.0",
+        "cytoscape-cose-bilkent": "^4.1.0",
+        "cytoscape-fcose": "^2.2.0",
+        "d3": "^7.9.0",
+        "d3-sankey": "^0.12.3",
+        "dagre-d3-es": "7.0.14",
+        "dayjs": "^1.11.21",
+        "dompurify": "^3.3.3",
+        "es-toolkit": "^1.45.1",
+        "fastdom": "1.0.12",
+        "katex": "^0.16.47",
+        "khroma": "^2.1.0",
+        "marked": "^16.3.0",
+        "roughjs": "^4.6.6",
+        "stylis": "^4.3.6",
+        "ts-dedent": "^2.2.0",
+        "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0"
+      }
+    },
     "node_modules/micromark": {
       "version": "4.0.2",
       "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz",
@@ -7136,9 +8034,9 @@
       }
     },
     "node_modules/package-manager-detector": {
-      "version": "1.7.0",
-      "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.7.0.tgz",
-      "integrity": "sha512-xg1eHpwYL/D/HEdWw2goFZP6vV0FH7W+PZ5rFkGjdIDLtxq7EkzBUeT3m+lndYCt8wKbmofUu1MUdMCXkCk9ZQ==",
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.9.0.tgz",
+      "integrity": "sha512-zAMfbta9nPA8AKkA4WdmNAT8R8s6Dk0/xwPsqNnRidMFcLo1YkLuPDTgs2f64XdzS8vbLNnoJ+uUIkgbz7oRHA==",
       "license": "MIT"
     },
     "node_modules/parent-module": {
@@ -7228,6 +8126,12 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/path-data-parser": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz",
+      "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==",
+      "license": "MIT"
+    },
     "node_modules/path-exists": {
       "version": "4.0.0",
       "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@@ -7272,6 +8176,22 @@
         "url": "https://github.com/sponsors/jonschlinkert"
       }
     },
+    "node_modules/points-on-curve": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz",
+      "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==",
+      "license": "MIT"
+    },
+    "node_modules/points-on-path": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz",
+      "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==",
+      "license": "MIT",
+      "dependencies": {
+        "path-data-parser": "0.1.0",
+        "points-on-curve": "0.2.0"
+      }
+    },
     "node_modules/postcss": {
       "version": "8.5.16",
       "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.16.tgz",
@@ -7768,6 +8688,12 @@
         "node": ">=0.10.0"
       }
     },
+    "node_modules/robust-predicates": {
+      "version": "3.0.3",
+      "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz",
+      "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==",
+      "license": "Unlicense"
+    },
     "node_modules/rolldown": {
       "version": "1.1.4",
       "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.4.tgz",
@@ -7801,6 +8727,18 @@
         "@rolldown/binding-win32-x64-msvc": "1.1.4"
       }
     },
+    "node_modules/roughjs": {
+      "version": "4.6.6",
+      "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz",
+      "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==",
+      "license": "MIT",
+      "dependencies": {
+        "hachure-fill": "^0.5.2",
+        "path-data-parser": "^0.1.0",
+        "points-on-curve": "^0.2.0",
+        "points-on-path": "^0.2.1"
+      }
+    },
     "node_modules/run-parallel": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -7825,6 +8763,18 @@
         "queue-microtask": "^1.2.2"
       }
     },
+    "node_modules/rw": {
+      "version": "1.3.3",
+      "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",
+      "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",
+      "license": "BSD-3-Clause"
+    },
+    "node_modules/safer-buffer": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+      "license": "MIT"
+    },
     "node_modules/satteri": {
       "version": "0.9.4",
       "resolved": "https://registry.npmjs.org/satteri/-/satteri-0.9.4.tgz",
@@ -8031,6 +8981,12 @@
       "integrity": "sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==",
       "license": "MIT"
     },
+    "node_modules/strictdom": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/strictdom/-/strictdom-1.0.1.tgz",
+      "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==",
+      "license": "MIT"
+    },
     "node_modules/string-width": {
       "version": "4.2.3",
       "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
@@ -8104,6 +9060,12 @@
         "inline-style-parser": "0.2.7"
       }
     },
+    "node_modules/stylis": {
+      "version": "4.4.0",
+      "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.4.0.tgz",
+      "integrity": "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==",
+      "license": "MIT"
+    },
     "node_modules/supports-color": {
       "version": "7.2.0",
       "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
@@ -8195,9 +9157,9 @@
       }
     },
     "node_modules/tinyexec": {
-      "version": "1.2.4",
-      "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz",
-      "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==",
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.1.tgz",
+      "integrity": "sha512-GCvB3aoys96IuDFBMcTB46JOR6mdMtAToqwiW8JlWhsoh1mhHi/xn9ss/Dg7N555GiJyEt2qzoG/NHCwM6h1EA==",
       "license": "MIT",
       "engines": {
         "node": ">=18"
@@ -8265,6 +9227,15 @@
         "typescript": ">=4.8.4"
       }
     },
+    "node_modules/ts-dedent": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.3.0.tgz",
+      "integrity": "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=6.10"
+      }
+    },
     "node_modules/tslib": {
       "version": "2.8.1",
       "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz",
@@ -8671,6 +9642,19 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/uuid": {
+      "version": "14.0.3",
+      "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz",
+      "integrity": "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==",
+      "funding": [
+        "https://github.com/sponsors/broofa",
+        "https://github.com/sponsors/ctavan"
+      ],
+      "license": "MIT",
+      "bin": {
+        "uuid": "dist-node/bin/uuid"
+      }
+    },
     "node_modules/vfile": {
       "version": "6.0.3",
       "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz",
diff --git a/package.json b/package.json
index dce69a7..7d86ad8 100644
--- a/package.json
+++ b/package.json
@@ -20,7 +20,8 @@
     "@astrojs/sitemap": "^3.7.3",
     "@fontsource-variable/geist": "^5.2.9",
     "@fontsource-variable/jetbrains-mono": "^5.2.8",
-    "astro": "^7.0.5"
+    "astro": "^7.0.5",
+    "mermaid": "11.17.2"
   },
   "devDependencies": {
     "@astrojs/check": "^0.9.9",
diff --git a/src/layouts/DocsLayout.astro b/src/layouts/DocsLayout.astro
index 84ff725..6c1f797 100644
--- a/src/layouts/DocsLayout.astro
+++ b/src/layouts/DocsLayout.astro
@@ -133,3 +133,7 @@ const breadcrumbs = [
     
   
 
+
+
diff --git a/src/scripts/mermaid-diagrams.ts b/src/scripts/mermaid-diagrams.ts
new file mode 100644
index 0000000..baf0d2a
--- /dev/null
+++ b/src/scripts/mermaid-diagrams.ts
@@ -0,0 +1,68 @@
+// Renders ```mermaid fences in docs pages as diagrams.
+//
+// astro.config excludes "mermaid" from Shiki, so each fence arrives as
+// 
…
. Mermaid is loaded only on +// pages that have one, and its colors come from the semantic tokens in +// global.css (never raw hex), so a diagram follows the scope it sits in. + +const SELECTOR = "pre > code.language-mermaid"; + +function token(el: Element, name: string): string { + return getComputedStyle(el).getPropertyValue(name).trim(); +} + +async function renderDiagrams(): Promise { + const blocks = Array.from(document.querySelectorAll(SELECTOR)); + if (blocks.length === 0) return; + + const { default: mermaid } = await import("mermaid"); + const scope = blocks[0]; + mermaid.initialize({ + startOnLoad: false, + securityLevel: "strict", + theme: "base", + fontFamily: token(scope, "--font-primary") || "inherit", + themeVariables: { + darkMode: token(scope, "color-scheme") !== "light", + background: token(scope, "--terminal"), + primaryColor: token(scope, "--card"), + primaryTextColor: token(scope, "--foreground"), + primaryBorderColor: token(scope, "--primary"), + secondaryColor: token(scope, "--secondary"), + tertiaryColor: token(scope, "--surface-secondary"), + lineColor: token(scope, "--muted-foreground"), + textColor: token(scope, "--foreground"), + clusterBkg: token(scope, "--surface-secondary"), + clusterBorder: token(scope, "--border"), + edgeLabelBackground: token(scope, "--terminal"), + noteBkgColor: token(scope, "--accent-soft"), + noteTextColor: token(scope, "--accent-soft-foreground"), + noteBorderColor: token(scope, "--primary"), + actorBkg: token(scope, "--card"), + actorBorder: token(scope, "--primary"), + actorTextColor: token(scope, "--foreground"), + signalColor: token(scope, "--muted-foreground"), + signalTextColor: token(scope, "--foreground"), + labelBoxBkgColor: token(scope, "--card"), + labelTextColor: token(scope, "--foreground"), + }, + }); + + for (const [index, code] of blocks.entries()) { + const pre = code.parentElement; + if (pre === null) continue; + const source = code.textContent ?? ""; + try { + const { svg } = await mermaid.render(`mermaid-diagram-${index}`, source); + const figure = document.createElement("figure"); + figure.className = "mermaid-diagram"; + figure.innerHTML = svg; + pre.replaceWith(figure); + } catch (error) { + // Leave the source visible; a broken diagram must not hide the docs. + console.error("mermaid render failed", error); + } + } +} + +void renderDiagrams(); diff --git a/src/styles/global.css b/src/styles/global.css index 18f36ac..288cec7 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -274,3 +274,32 @@ line-height: 1.6; overflow-x: auto; } + +/* Mermaid diagrams (src/scripts/mermaid-diagrams.ts). The fence stays a + terminal-styled code block until the script swaps in the SVG. */ +.docs-prose pre:has(> code.language-mermaid), +.mermaid-diagram { + background-color: var(--terminal); + border: 1px solid var(--border); + border-radius: var(--radius-m); + padding: 16px; + overflow-x: auto; +} + +.docs-prose pre:has(> code.language-mermaid) { + font-family: var(--font-primary); + font-size: 13px; + line-height: 1.6; + color: var(--muted-foreground); +} + +.mermaid-diagram { + margin: 0; + display: flex; + justify-content: center; +} + +.mermaid-diagram svg { + max-width: 100%; + height: auto; +} From 3af3312c16067886dc88df4dd9b6d16da289e75a Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 00:35:08 +0000 Subject: [PATCH 2/2] docs: add architecture and flow diagrams, fix stale facts Add 25 diagrams from the main repo docs (component map, GameServer phases, backup, restore and snapshot forget, idle sleep, multi-cluster, gateway, OIDC, tunnels, modules, standalone, CI and release, telemetry, security, install, notifications, monitoring). Fix stale facts: GameServer phases (no Stopped phase, Failed is not terminal), deleting a Backup now forgets its restic snapshot, and the OIDC first-login role with role mappings. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claude --- src/content/docs/architecture.mdx | 57 +++++++++++++++++++ .../docs/backup-repository-operations.mdx | 22 ++++++- src/content/docs/backups-recovery.mdx | 48 +++++++++++++++- src/content/docs/ci-releases-signing.mdx | 42 ++++++++++++++ src/content/docs/installation.mdx | 19 +++++++ src/content/docs/lifecycle-probes.mdx | 19 +++++++ .../docs/metrics-alerts-dashboards.mdx | 17 ++++++ src/content/docs/modules-sources.mdx | 37 ++++++++++++ src/content/docs/multi-cluster.mdx | 27 +++++++++ .../docs/notification-events-payloads.mdx | 19 +++++++ src/content/docs/remote-agent-gateway.mdx | 40 +++++++++++++ src/content/docs/security.mdx | 18 ++++++ .../docs/server-networking-tunnels.mdx | 37 ++++++++++++ src/content/docs/standalone-panel.mdx | 12 ++++ src/content/docs/status-phases-conditions.mdx | 25 ++++++-- .../docs/telemetry-provider-kubernetes.mdx | 28 +++++++++ src/content/docs/users-auth-rbac.mdx | 42 +++++++++++++- 17 files changed, 500 insertions(+), 9 deletions(-) diff --git a/src/content/docs/architecture.mdx b/src/content/docs/architecture.mdx index 43a6edb..a7e5282 100644 --- a/src/content/docs/architecture.mdx +++ b/src/content/docs/architecture.mdx @@ -28,6 +28,63 @@ The Operator reconciles CRDs declaratively; the API layer handles sessions, RBAC A dashboard action cascades: API → Operator → StatefulSet → Agent → heartbeat → status → browser refresh. +The component map below shows which services run in the panel namespace and the games namespace, and how they talk to each other. + +```mermaid +flowchart TB + browser["Browser
web/ (React, TanStack Router/Query,
xterm.js, Monaco, Tailwind)"] + subgraph panel["gameplane namespace"] + web["gameplane-web
nginx: SPA + reverse proxy"] + api["API (api/)
REST + WebSocket + SSE gateway
local + OIDC auth, RBAC, audit log
SQLite or PostgreSQL [experimental]"] + operator["Operator (operator/)
controller-runtime reconcilers"] + sats["audit-syslog-bridge,
telemetry-receiver [optional]"] + mcp["mcp-server [optional]
read-only, stdio via kubectl exec"] + end + kube[("Kubernetes API
Gameplane CRDs")] + subgraph games["gameplane-games namespace"] + sts["StatefulSet + Service + PVC"] + pod["Game pod
game container + agent sidecar
(RCON, files, logs, console, heartbeat)"] + extras["Per-server extras [optional]
sentinel Deployment, tunnel Deployment,
capture-sidecar ephemeral container"] + jobs["restic Jobs
backup, restore, forget"] + end + browser -- "HTTPS / WSS (same origin)" --> web + web -- "proxied API, WS, SSE" --> api + api -- "CRD reads and writes" --> kube + api -- "mTLS :8090" --> pod + operator -- "watch and reconcile" --> kube + operator --> sts + operator --> extras + operator --> jobs + sts --> pod + pod -- "status.agent heartbeat" --> kube + api -. "audit webhook, daily report" .-> sats + mcp -. "get / list / watch" .-> kube +``` + +The sequence below traces a Start action from the dashboard to a Running status. + +```mermaid +sequenceDiagram + autonumber + actor U as User + participant D as Dashboard + participant A as API + participant K as Kubernetes API + participant O as Operator + participant P as Game pod (game + agent) + U->>D: Start + D->>A: POST /servers/foo:start + A->>K: patch GameServer spec.suspend=false + K-->>O: GameServer changed + O->>K: scale StatefulSet to 1 + K->>P: schedule pod + P->>K: agent patches status.agent.lastHeartbeat + K-->>O: GameServer status changed + O->>K: status.phase=Running (pod Ready, heartbeat fresh) + K-->>A: watch event + A-->>D: SSE event or poll result +``` + ## Module system ModuleSource CRs declare where templates come from — OCI registry, git, HTTP, local, or dashboard upload. Combined panels manage the local module catalog; standalone panels require an explicit registered cluster for module and source operations. diff --git a/src/content/docs/backup-repository-operations.mdx b/src/content/docs/backup-repository-operations.mdx index ad7e2f2..08a7847 100644 --- a/src/content/docs/backup-repository-operations.mdx +++ b/src/content/docs/backup-repository-operations.mdx @@ -130,7 +130,27 @@ Restic's retention policies are defined in `BackupSchedule.spec.retention`. Game - `keepMonthly: 12` — keep the latest snapshot from each month (12 monthly snapshots) - `keepYearly: 3` — keep the latest snapshot from each year (3 yearly snapshots) -The operator trims retention by deleting old `Backup` custom resources once they fall outside every configured `keep-*` bucket (surfaced via the `RetentionTrimmed` condition on the `BackupSchedule`). It does not run `restic forget`/`prune` against the repository itself, so repository storage is not automatically reclaimed. If you need to reclaim space, run `restic forget --prune` yourself on a schedule that matches your retention policy, and monitor that job's own logs for bytes freed and errors. +The operator trims retention by deleting old `Backup` custom resources once they fall outside every configured `keep-*` bucket (surfaced via the `RetentionTrimmed` condition on the `BackupSchedule`). Deleting a restic `Backup`, whether by retention, the dashboard or `kubectl delete`, runs a one-shot `-forget` Job that executes `restic forget --prune`, so retention reclaims repository space. A repository the Secret's credentials cannot prune (for example an append-only rest-server) ends every delete in a `SnapshotForgetAbandoned` warning; prune it externally and monitor that job's logs for bytes freed and errors. + +A deleted Backup goes through these steps before its finalizer is released: + +```mermaid +flowchart TD + del["Backup deleted"] --> uq{"Quiesced and not
yet released?"} + uq -- yes --> unq["Send unquiesce first"] --> vs + uq -- no --> vs{"volume-snapshot Backup
or no repoRef?"} + vs -- yes --> gc["No finalizer: VolumeSnapshot is
garbage-collected by owner ref"] + vs -- no --> idq{"Failed, or no
status.snapshotID?"} + idq -- yes --> rel["Release finalizer at once"] + idq -- no --> run{"Own backup Job
still running?"} + run -- yes --> kill["Delete Job, await pods"] --> idq + run -- no --> rs{"Non-terminal Restore
uses this Backup?"} + rs -- yes --> waitr["Wait"] --> rs + rs -- no --> forget["Job <backup>-forget:
restic forget id --prune"] + forget --> ok{"Succeeded within
45 minute cap?"} + ok -- yes --> done["SnapshotForgotten=True,
release finalizer"] + ok -- "no, or Secret or
namespace gone" --> ab["SnapshotForgetAbandoned warning,
release finalizer"] +``` ### Credentials and certificate rotation diff --git a/src/content/docs/backups-recovery.mdx b/src/content/docs/backups-recovery.mdx index 17d5c6a..7e8a120 100644 --- a/src/content/docs/backups-recovery.mdx +++ b/src/content/docs/backups-recovery.mdx @@ -48,6 +48,31 @@ Use per-server or global views to start snapshots, filter phases, and inspect de - **Succeeded** — snapshot completed and verified - **Failed** — snapshot did not complete; check logs for errors +The sequence below shows how a backup request moves from the dashboard to a Succeeded phase. + +```mermaid +sequenceDiagram + participant D as Dashboard + participant A as API + participant O as Operator + participant G as Agent + participant J as restic Job + participant R as restic repository + D->>A: POST /backups (inline spec) + A->>O: create Backup CR + opt spec.quiesce + O->>G: quiesce (save, auto-save off) + end + O->>J: create Job, mount PVC + J->>R: restic backup /data + J-->>O: Job complete + O->>O: read snapshot id from Job pod logs + O->>O: Backup.status.snapshotID, phase Succeeded + opt quiesced + O->>G: unquiesce (retried until it lands) + end +``` + ## Schedules, destinations, and retention Backups combine a cron schedule with a restic repository, credentials, and explicit retention policy. @@ -102,7 +127,7 @@ Retention rules apply after the backup completes. Restic supports overlapping po - **keep-monthly N** — keep N monthly backups (1st day) - **keep-yearly N** — keep N yearly backups (1st day) -Leave all empty to keep everything (not recommended in production). A schedule with no retention policy trims nothing, so backups with retention disabled are kept. When a policy is set, the operator deletes `Backup` resources that fall outside every bucket. It does not run `restic forget` or `prune` against the repository, so repository storage is not reclaimed automatically; see [Backup Repository Operations](../backup-repository-operations/). (v0.4.0) +Leave all empty to keep everything (not recommended in production). A schedule with no retention policy trims nothing, so backups with retention disabled are kept. When a policy is set, the operator deletes `Backup` resources that fall outside every bucket. Deleting a restic `Backup` also runs `restic forget --prune` for its snapshot, so repository storage is reclaimed; see [Backup Repository Operations](../backup-repository-operations/). (v0.4.0) ## Restore safely @@ -134,6 +159,27 @@ Restore into a new server for verification, or overwrite only after stopping wri - **Failed** — check events and logs for errors 5. **Verify the restored data** by starting the server, checking player data, and testing critical gameplay features. +The flowchart below shows how the operator handles a restore request for each backup strategy. + +```mermaid +flowchart TD + req["POST /restores"] --> cr["Restore CR"] + cr --> src{"Source Backup present
and not Failed?"} + src -- no --> fail["Restore Failed"] + src -- "yes, no snapshotID yet" --> pend["Pending, requeue 15s"] --> src + src -- "yes, snapshotID set" --> pin["Pin snapshotID into Restore.status"] + pin --> strat{"Backup strategy"} + strat -- "restic snapshot" --> susp["Suspend target GameServer"] + susp --> job["restic restore --target / --delete Job"] + job --> resume["Resume GameServer"] + strat -- "volume snapshot" --> own{"Original server owns every
referenced Secret and ConfigMap?"} + own -- no --> fail + own -- yes --> newgs["Create new GameServer from CSI snapshot,
copy owned Secrets and ConfigMaps"] + newgs --> ready{"Running within
10 minutes?"} + ready -- yes --> ok["Restore Succeeded"] + ready -- no --> fail +``` + ### Best practices - **Always test on a new server first.** Create a temporary server and restore the backup there before overwriting a production server. diff --git a/src/content/docs/ci-releases-signing.mdx b/src/content/docs/ci-releases-signing.mdx index 1d3a261..54a4f96 100644 --- a/src/content/docs/ci-releases-signing.mdx +++ b/src/content/docs/ci-releases-signing.mdx @@ -22,6 +22,22 @@ import DocsQuickReference from "../../components/docs/DocsQuickReference.astro"; CI covers Go modules, envtest, web build/coverage, browser tests, Helm rendering, and disjoint Kind E2E buckets. +The flowchart below shows how a pull request moves from its push to merge, and which CI jobs run. + +```mermaid +flowchart TD + A["Push branch and open PR"] --> B["auto-label: adds missing type: and area: labels (every 15 min)"] + A --> C["ci workflow: detect changes job (hack/ci_scope.py)"] + C --> D{"Selection error, unmapped path or ci: full-run label?"} + D -- yes --> E["Every CI job runs"] + D -- no --> F["Only the jobs the change affects run"] + E --> G["ci report job (needs the CI jobs)"] + F --> G + G --> H["CodeRabbit advisory review"] + H --> I["Human approval (master ruleset)"] + I --> J["Merge; a push to master runs the full suite"] +``` + ` tag A `v` tag builds and signs images, packages the OCI chart, creates release notes, and publishes official modules. +The flowchart below shows the jobs that a release tag starts and the order of the image and chart steps. + +```mermaid +flowchart TD + T["Tag v* pushed"] --> IM["images: one leg per component (12)"] + T --> MO["modules: push and sign official bundles"] + IM --> P["Push image by digest"] + P --> S["Trivy scan, then cosign sign (keyed)"] + S --> V["Verify signature; check signing/cosign.pub matches the key"] + V --> TG["oras tag: attach release tags"] + TG --> CH["chart: helm push, cosign sign, verify"] + CH --> Q["consumer: qualify-release.yaml as anonymous pull"] + Q --> GR["github-release: CHANGELOG section as notes"] +``` + signing/2026-07-24-cosign-legacy.pub"] + Current["Current ECDSA P-256 key
signing/cosign.pub"] + Legacy -->|"cross-signature over cosign.pub
cosign.pub.legacy-sig"| Current + Legacy -->|"verifies releases before rotation"| Old["Pre-rotation artifacts (keyed, unlogged)"] + Current -->|"verifies releases from rotation onward"| New["Post-rotation artifacts (recorded in Rekor)"] +``` + Signing is mandatory and fail-closed: without `COSIGN_PRIVATE_KEY` the release job fails before anything is pushed. Every signing job (`release.yaml`, `publish-edge.yaml`, `images.yaml` and `republish-modules.yaml`) runs in the `release-signing` environment, whose deployment policy admits only `master` and `v*` tags, so a run on any other ref never receives the key. Images are pushed by digest, signed and verified, and only then tagged, so a published tag always names a signed image. --- diff --git a/src/content/docs/installation.mdx b/src/content/docs/installation.mdx index e64a837..b68102a 100644 --- a/src/content/docs/installation.mdx +++ b/src/content/docs/installation.mdx @@ -197,6 +197,25 @@ helm upgrade --install gameplane oci://ghcr.io/gameplanepanel/charts/gameplane \ The chart is OCI-packaged — no `helm repo add` is needed. The `appVersion` field pins matching component images, so no image overrides are required for a released version. +The flowchart below shows which resources a default chart install renders, and which ones are opt-in. + +```mermaid +flowchart TD + release["helm install or upgrade gameplane"] --> opq{"operator.enabled"} + release --> apiq{"api.enabled"} + release --> monq{"serviceMonitors, prometheusRules or grafanaDashboards"} + opq -- "true (default)" --> crds["gameplane-crds subchart (Helm crds/ phase)"] + opq -- "true (default)" --> op["Operator Deployment, RBAC and NetworkPolicies"] + opq -- "true (default)" --> vap["Admission policies and default ModuleSource"] + apiq -- "true (default)" --> api["API Deployment, Service and data PVC"] + apiq -- "web.enabled (default)" --> web["Web dashboard"] + apiq -- "ingress.enabled" --> ing["Ingress"] + release -- "not api.standalone and crds.autoApply.enabled" --> hook["CRD apply hook Job"] + apiq -- "api.telemetry.receiver.enabled and empty endpoint" --> tr["Telemetry receiver"] + apiq -- "syslogBridge.enabled and empty webhook URL" --> asb["Audit syslog bridge"] + monq -- "opt-in" --> mon["ServiceMonitor, PodMonitor, PrometheusRule and dashboard ConfigMap"] +``` + **Edge channel (latest development):** To track rolling `:edge` images from the `main` branch instead of a released version: ```bash diff --git a/src/content/docs/lifecycle-probes.mdx b/src/content/docs/lifecycle-probes.mdx index 6c13269..0c54360 100644 --- a/src/content/docs/lifecycle-probes.mdx +++ b/src/content/docs/lifecycle-probes.mdx @@ -146,6 +146,25 @@ spec: If you enable idle auto-sleep (`spec.idle.enabled: true`), the operator scales the server down automatically after it reports zero players for the configured idle period. The graceful termination sequence still runs — the template's stop sequence executes with the same grace period, and data is preserved. +The flowchart below shows how the operator decides that an idle server should sleep, and what wakes it. + +```mermaid +flowchart TD + hb["Agent heartbeat"] --> fresh{"Heartbeat fresh and
phase Running?"} + fresh -- no --> freeze["Idle clock frozen
(reason on status.idle)"] + fresh -- yes --> zero{"playersOnline == 0?"} + zero -- "unknown" --> freeze + zero -- "more than 0" --> reset["Clear status.idle.emptySince"] + zero -- "exactly 0" --> stamp["Stamp status.idle.emptySince"] + stamp --> long{"Older than
spec.idle.afterMinutes?"} + long -- no --> wait["Keep waiting"] + long -- yes --> mark["Write idle-asleep-since annotation"] + mark --> soft["softStop: module stop sequence,
wait for not-ready, scale to 0"] + soft --> asleep["Phase Suspended,
reason IdleAsleep, PVC kept"] + asleep --> wake{"wakeWindows tick,
POST :wake, or sentinel
connection?"} + wake -- yes --> clear["Clear marker, pod returns"] +``` + To wake a sleeping server when a player connects, turn on **Wake on connect** in the server's Lifecycle settings (v0.4.0). It is off by default (`spec.idle.wakeOnConnect`, default `false`). While the server sleeps, a small pod holds its ports, which costs one extra pod per sleeping server. For UDP-only games the first join attempt only wakes the server, so the player joins on retry. For more details, see the [`spec.idle` configuration in the architecture docs](../architecture/). diff --git a/src/content/docs/metrics-alerts-dashboards.mdx b/src/content/docs/metrics-alerts-dashboards.mdx index df4c35f..6946bf6 100644 --- a/src/content/docs/metrics-alerts-dashboards.mdx +++ b/src/content/docs/metrics-alerts-dashboards.mdx @@ -26,6 +26,23 @@ serviceMonitors: This creates ServiceMonitors for the operator and API, plus PodMonitors for agent sidecars and relay tunnel pods. Agent metrics are plain HTTP on port `9090`; tunnel metrics share the health listener on `8091`. Neither uses the mTLS control port `8090`. The telemetry receiver gets a ServiceMonitor only when its dashboard token is configured. Its `/metrics` moved to the dashboard port `8081` in v0.4.0 and requires `Authorization: Bearer` with the dashboard token. +The diagram below shows how each metrics endpoint reaches Prometheus, the alert rules, and the Grafana dashboards. + +```mermaid +flowchart LR + agent["Agent sidecar :9090 metrics"] --> pma["PodMonitor gameplane-agent"] + tunnel["Tunnel relay :8091 health and metrics"] --> pmt["PodMonitor gameplane-tunnel"] + op["Operator :8080 metrics"] --> smo["ServiceMonitor gameplane-operator"] + api["API metrics listener"] --> sma["ServiceMonitor gameplane-api"] + pma --> prom["Prometheus"] + pmt --> prom + smo --> prom + sma --> prom + prom --> rules["PrometheusRule alerts (operator, scrape, relay, workload)"] + cm["Dashboard ConfigMap (label grafana_dashboard=1)"] --> graf["Grafana sidecar"] + graf -- "queries" --> prom +``` + ## Operator metrics The operator exports **controller-runtime** standard metrics plus fleet gauges. Aggregate fleet metrics with `max by (phase) (...)` when you have 2+ operator replicas — each replica reports the same cache-derived counts. diff --git a/src/content/docs/modules-sources.mdx b/src/content/docs/modules-sources.mdx index 721f020..a207347 100644 --- a/src/content/docs/modules-sources.mdx +++ b/src/content/docs/modules-sources.mdx @@ -52,6 +52,20 @@ The dashboard's **Modules** page displays the merged catalog across all configur - **Failed** — install or signature verification failed (shown as a generic failed status; check the source's verification policy and the Module's error reason). - **Update** — the pinned version is unavailable but a newer one exists; upgrade is offered. +The state diagram below shows the phases of a Module resource while the operator pulls and applies a version. + +```mermaid +stateDiagram-v2 + [*] --> Pending: WaitingForCatalog or NoVersionAvailable + Pending --> Pulling: catalog entry and version found + Pulling --> Ready: bundle verified and GameTemplate applied + Pending --> Failed: SourceNotFound, SourceConfig, VerifyConfig, VersionUnavailable + Ready --> Failed: SourceNotFound, SourceConfig, VerifyConfig, VersionUnavailable + Pulling --> Failed: PullFailed, SignatureInvalid, DigestMismatch, IncompatibleOperator, ApplyTemplate + Failed --> Pulling: spec change (retries at the same generation stay Failed) + Ready --> Pulling: spec.version or spec.digest changed +``` + ## Configure module sources Sources can represent OCI, Git, archive, upload, or registry-backed discovery with sync status and credentials. @@ -82,6 +96,29 @@ The chart's `defaultModuleSource` picks one of two backends via `type`: OCI regi Disable the default if you manage ModuleSource resources via GitOps, or create additional sources to index private registries or custom catalogs. The ModuleSource CRD also supports HTTP (tar.gz/zip archives) and local directory backends for specialized use cases. +The flowchart below shows how a module moves from its store, through the catalog, into a GameTemplate and a GameServer. + +```mermaid +flowchart LR + author["Module author
gp-module init / validate / package"] --> store + subgraph store["Module stores"] + oci["OCI registry"] + git["git repository"] + http["HTTP archive"] + local["local directory"] + upload["upload ConfigMaps"] + end + store --> ms["ModuleSource controller
modsrc.Fetcher indexes,
status.modules + digests"] + ms --> catalog["Dashboard catalog
(API /modules)"] + catalog -- install --> mod["Module CR"] + mod --> mc["Module controller
pulls bundle"] + mc --> gt["GameTemplate
(managed-by=Module)"] + mc --> loc["<template>-locales ConfigMap"] + kubectl["kubectl apply"] --> gt + gt --> gs["GameServer"] + gs --> agent["Agent sidecar
GAMEPLANE_CAPABILITIES"] +``` + ## Author and publish modules diff --git a/src/content/docs/multi-cluster.mdx b/src/content/docs/multi-cluster.mdx index c6f3d2d..b8266ef 100644 --- a/src/content/docs/multi-cluster.mdx +++ b/src/content/docs/multi-cluster.mdx @@ -78,6 +78,33 @@ Kubernetes credentials and dashboard grants are separate. The registered kubecon Document the supported relationship between control plane, database, namespace scope, target cluster, and audit history. +The topology below shows the central control plane, the registry, and the target clusters this boundary covers. + +```mermaid +flowchart LR + browser["Browser"] --> api + subgraph central["Central panel (combined or standalone)"] + api["API
client pool keyed by cluster,
?cluster= selector, /fleet/* fan-out"] + reg[("Registry
Cluster CRs + kubeconfig Secrets,
or SQL in standalone")] + api --- reg + end + subgraph local["local cluster (combined mode only)"] + lop["Operator"] + lagent["Agents"] + end + subgraph remote["Registered remote cluster"] + rkube["Kubernetes API"] + rop["Operator"] + gw["Gateway [optional]"] + ragent["Agents"] + rop --> rkube + gw -- "agent mTLS,
UID-bound routes" --> ragent + end + api -- "direct mTLS" --> lagent + api -- "kubeconfig: CRDs, pod logs, attach" --> rkube + api -- "central mTLS peer:
RCON, files, logs, players" --> gw +``` + B{"Transition maps to an event type?"} + B -->|No| Z["Ignored"] + B -->|Yes| C["Enqueue without blocking (queue of 256)"] + C -->|Queue full| D["Dropped, counted in metrics"] + C --> E["Worker matches each sink's event filter"] + E --> F{"Sink has a configRef?"} + F -->|No| G["Counted as skipped_no_secret"] + F -->|Yes| H["Read the sink Secret"] + H --> I{"PostgreSQL: dispatch claim won?"} + I -->|No| Z2["Skipped, another replica owns it"] + I -->|Yes| J["Deliver with retries at 0, 2 s and 8 s"] + J --> K["sent"] + J --> L["failed, 4xx responses not retried"] +``` + ## Test sends Test a sink without waiting for a real event: diff --git a/src/content/docs/remote-agent-gateway.mdx b/src/content/docs/remote-agent-gateway.mdx index 886282d..0499df9 100644 --- a/src/content/docs/remote-agent-gateway.mdx +++ b/src/content/docs/remote-agent-gateway.mdx @@ -29,6 +29,23 @@ Run one central Gameplane API and dashboard, plus an operator and an optional ga The gateway extends registered clusters with the RCON console, game log files, file management, player operations, live status, agent-based mods and capture files. Registry browsing, modpacks and ID-list mods use the selected cluster's Kubernetes client and game template, and provider credentials stay in the central installation. See [Multi-cluster topology](../multi-cluster/) for the full list of what works and what does not across clusters. +The topology below shows the central API, the gateway, and the agent in a registered cluster. + +```mermaid +flowchart LR + subgraph central["Central panel (combined or standalone)"] + api["Central API
user authorization"] + end + subgraph remote["Registered game cluster"] + k8s["Kubernetes API"] + gw["Gateway
gateway subcommand, TCP 8443"] + agent["Agent Service
TCP 8090 agent, TCP 9091 capture"] + end + api -- "Kubernetes API: resources, logs, PTY, stdin" --> k8s + api -- "mTLS: agent operations and capture files" --> gw + gw -- "mTLS, /v1/targets/{uid}" --> agent +``` + ## Prepare the remote cluster Use matching API, operator and agent versions in the remote cluster. The gateway runs the API image's `gateway` subcommand under a dedicated ServiceAccount with read-only `get` access to GameServers, NetworkCaptures and Services in its configured namespaces. It has no database and no user login. @@ -234,6 +251,29 @@ The registration name must match the gateway's `clusterID`. The URL is an HTTPS The central API authorizes the user, reads the cluster's GameServer UID, and sends an allowlisted operation to the gateway at `/v1/clusters/{cluster}/namespaces/{namespace}/servers/{name}/uids/{uid}/{operation}`. The gateway authenticates the central API, verifies its own cluster ID and the live GameServer and agent Service ownership, and connects to the local agent's UID route, which rejects a different UID. User cookies, bearer tokens and CSRF headers are never forwarded. +The sequence below shows one request from the central API through the gateway to the agent in a game pod. + +```mermaid +sequenceDiagram + participant B as Browser + participant A as Central API + participant K as Remote Kubernetes API + participant G as Gateway + participant P as Agent in game pod + B->>A: Operation with session cookie and CSRF header + A->>A: Authorize user for cluster, namespace and server + A->>K: Read GameServer and its UID + A->>G: mTLS request to /v1/clusters/.../uids/UID/operation + G->>G: Check central client URI SAN, cluster ID, namespace allowlist + G->>K: Confirm live UID and agent Service owner + G->>P: HTTPS /v1/targets/UID/operation + P->>P: Return 404 if UID differs + P-->>G: Response or stream + G-->>A: Response, with redirects refused and cookies removed + Note over G,P: Transport failure returns 502, and the write outcome may be unknown + A-->>B: Response +``` + A trusted gateway client certificate grants delegated access to the allowlisted agent operations; it is not a user credential, and the gateway does not reconstruct central role bindings. Keep that private key restricted to the central API workload. Internal mod-update reads use the same selected cluster for agent data and template lookup. RCON module actions use the gateway. Stdin module actions use the selected Kubernetes client and verify workload ownership before attach; Kubernetes attach has no atomic UID precondition, so this is a preflight check. diff --git a/src/content/docs/security.mdx b/src/content/docs/security.mdx index fa95b21..622ef93 100644 --- a/src/content/docs/security.mdx +++ b/src/content/docs/security.mdx @@ -13,6 +13,24 @@ import DocsCallout from "../../components/docs/DocsCallout.astro"; The dashboard is deliberately internet-exposed — treat login as enumerable and game images as low-trust. +The diagram below shows the trust boundaries between the browser, the API, the agents, the gateway, and the operator. + +```mermaid +flowchart LR + B["Browser"] -- "HTTPS, session cookie + CSRF,
local or OIDC login" --> API + API -- "mTLS, operator-managed CA" --> AG["Local agent"] + API -- "dedicated mTLS, enrolled URI SAN" --> GW["Remote gateway"] + GW -- "agent mTLS, UID-bound routes" --> RAG["Remote agent"] + AG -- "ServiceAccount: own GameServer status" --> K["Kubernetes API"] + OP["Operator"] -- "ClusterRole reads,
namespaced Role writes" --> K + OP -- "netguard IsAllowed" --> SRC["Module sources"] + AG -- "netguard IsPublic" --> DL["Mod downloads"] + AG -- "gameaction checks" --> GAME["Game console (RCON)"] + API -- "gameaction checks, pod attach" --> GAME + API -- "HTTP JSON webhook" --> SB["audit-syslog-bridge"] --> SYS["Syslog collector"] + API -- "daily report" --> TR["telemetry-receiver"] +``` + ## Authentication Local accounts with argon2id hashing, or OIDC (Keycloak, Google, GitHub) with JWT validation. diff --git a/src/content/docs/server-networking-tunnels.mdx b/src/content/docs/server-networking-tunnels.mdx index 1b2e671..198d509 100644 --- a/src/content/docs/server-networking-tunnels.mdx +++ b/src/content/docs/server-networking-tunnels.mdx @@ -45,6 +45,18 @@ Do **not** use a tunnel if: Three relay providers are supported, each with different trade-offs: +The topology below shows how players reach a tunnel-enabled server through each relay type. + +```mermaid +flowchart LR + P["Players"] -->|"public address or tailnet name"| R["Relay: frps, Tailscale tailnet or playit.gg"] + T["Tunnel pod: gameplane-tunnel"] -->|"outbound session"| R + T -->|"dials server.namespace.svc"| S["Backing Service"] + S -->|"running"| G["Game pod"] + S -->|"asleep: routed to sentinel"| W["Wake sentinel"] + W -->|"wakes, then dials game-direct Service"| G +``` + | Feature | frp | Tailscale | playit.gg | |---|---|---|---| | **Exposure** | Public internet | Private (tailnet only) | Public internet | @@ -283,6 +295,31 @@ When a server enters idle sleep: - **Game pod sleeps** — the game container is scaled down. - **Wake-on-connect works** — if a player connects to the public address while asleep, the relay wakes the game pod (if `spec.idle.wakeOnConnect` is enabled). Depending on the relay provider, the player may need to reconnect once after the game wakes. +The sequence below shows how a connection to a sleeping server wakes the game pod through the sentinel. + +```mermaid +sequenceDiagram + participant Player + participant Relay + participant Tunnel as Tunnel pod + participant GS as Backing Service + participant Sentinel as Wake sentinel + participant API as Kubernetes API + participant Op as Operator + participant Game as Game pod + + Player->>Relay: connect to public address + Relay->>Tunnel: forward over outbound session + Tunnel->>GS: dial backing Service + GS->>Sentinel: route (server asleep) + Sentinel->>API: patch wake-requested token + API->>Op: GameServer change + Op->>API: clear sleep marker, ack token + Op->>Game: scale game StatefulSet up + Sentinel->>Game: poll game-direct Service until it accepts + Sentinel-->>Player: hold connection, then proxy after handoff +``` + To avoid reconnects on wake: - Use Tailscale (better connection state handling). diff --git a/src/content/docs/standalone-panel.mdx b/src/content/docs/standalone-panel.mdx index c0c6e25..6be765f 100644 --- a/src/content/docs/standalone-panel.mdx +++ b/src/content/docs/standalone-panel.mdx @@ -53,6 +53,18 @@ unset PANEL_PASSWORD Use a password of at least 12 characters, then sign in to the dashboard. A new panel has no clusters. Sign-in, users, roles, settings and registration all work before any remote cluster exists, but game operations need a registered remote cluster. +The topology below shows how the dashboard, the standalone API, and the registered clusters connect. + +```mermaid +flowchart LR + browser["Browser over HTTPS reverse proxy"] --> web["web (nginx, 127.0.0.1:8080)"] + web -- "API_UPSTREAM :8000" --> api["gameplane-api (one replica)"] + api --> db[("panel-data: /data/gameplane.db")] + api --> key[("panel-keys: /keys/panel.key")] + api -- "Direct Kubernetes API" --> k8s["Registered cluster Kubernetes API"] + api -- "mTLS gateway" --> gw["Registered cluster gateway"] +``` + ## Keep the database and key apart The Compose volume `panel-data` holds `/data/gameplane.db`, and a separate `panel-keys` volume holds `/keys/panel.key`. With the supplied Compose project name, Docker names them `gameplane-panel_panel-data` and `gameplane-panel_panel-keys`. Inspect both before backing them up, especially if you changed the project name. diff --git a/src/content/docs/status-phases-conditions.mdx b/src/content/docs/status-phases-conditions.mdx index e21e25b..fd8a41d 100644 --- a/src/content/docs/status-phases-conditions.mdx +++ b/src/content/docs/status-phases-conditions.mdx @@ -23,12 +23,25 @@ A GameServer's phase reflects its readiness for players and the operator's curre | **Pending** | Awaiting cluster capacity | → Starting | Schedules the underlying StatefulSet pod | | **Starting** | Pod is coming up | → Running | Waits for readiness probe + agent heartbeat | | **Running** | Ready for players | → Stopping | Maintains pod health and heartbeat monitoring | -| **Stopping** | Graceful shutdown in progress | → Stopped | Runs template's stop sequence, waits for exit | -| **Stopped** | Pod is terminated, data preserved | → Starting | (awaiting explicit resume) | -| **Suspended** | Intentionally paused | → Starting | Preserves both pod and intent (vs. Stopped) | -| **Failed** | Terminal error (no retry scheduled) | — | Surfaces detailed reason in conditions | - -Transitions are driven by reconciliation logic. A manual retry or wakeup (via dashboard or API) re-triggers the → Starting transition. +| **Stopping** | Stop or idle sleep requested, pod still ready | → Suspended | Runs template's stop sequence, scales to zero | +| **Suspended** | Stopped by the user or asleep; data preserved | → Starting | Awaits start or wake (an idle sleep shows reason `IdleAsleep`) | +| **Failed** | Invalid spec, policy rejection or terminal startup failure | → Running | Surfaces detailed reason in conditions; re-evaluated on every reconcile | + +The operator derives the phase again on every reconcile, so a phase is a reading, not a stored state: a server whose startup failure clears returns to `Running` without intervention. The API type also lists `Stopped`, but the current operator never sets it; a stopped server reads `Suspended`. A start or wake (via dashboard or API) re-triggers the → Starting transition. + +```mermaid +stateDiagram-v2 + [*] --> Pending: GameServer created + Pending --> Starting: StatefulSet exists + Starting --> Running: pod Ready and heartbeat fresh + Running --> Starting: pod not Ready or heartbeat stale + Starting --> Failed: terminal startup failure + Failed --> Running: recovers + Running --> Stopping: spec.suspend or idle sleep, pod still Ready + Stopping --> Suspended: no ready replica left + Suspended --> Starting: resumed or woken + Pending --> Failed: invalid spec or workload policy rejection +``` ### Standard Conditions diff --git a/src/content/docs/telemetry-provider-kubernetes.mdx b/src/content/docs/telemetry-provider-kubernetes.mdx index e12aceb..26171a8 100644 --- a/src/content/docs/telemetry-provider-kubernetes.mdx +++ b/src/content/docs/telemetry-provider-kubernetes.mdx @@ -280,6 +280,34 @@ When the peer is inside `TRUSTED_PROXY_CIDRS`, the receiver takes the right-most A client outside Cloudflare's ranges cannot choose its source address. Anything it puts in `X-Forwarded-For` stays to the left of the real entry and is ignored, and proof-of-work still applies to every request. A request that bypasses Cloudflare reaches Traefik from an untrusted address, so Traefik drops its `X-Forwarded-For`. An unparsable header falls back to the peer address. The address is used only in memory for rate limiting and is never stored; see [Source addresses and `TRUSTED_PROXY_CIDRS`](https://github.com/GameplanePanel/Gameplane/blob/master/docs/telemetry-provider.md#source-addresses-and-trusted_proxy_cidrs). +The flowchart below shows how the receiver handles each report or challenge request after it reaches the ingest listener. + +```mermaid +flowchart TD + subgraph Install["Install (API telemetry reporter)"] + TK["Tick: basic consent on and send slot due"] --> BD["Build report: basic, plus extended when enabled"] + BD --> SG["Extended report: sign body"] + SG --> PW["Solve proof-of-work when the endpoint asks"] + end + PW --> IN["POST /ingest on public listener"] + IN --> AU{"AUTH_TOKEN set and matched?"} + AU -- no --> E1["401"] + AU -- yes --> POW{"INGEST_POW off, or challenge solved?"} + POW -- no --> E2["428"] + POW -- busy --> E2b["503, Retry-After 60"] + POW -- yes --> DC["Decode and validate report"] + DC --> EX{"Extended part?"} + EX -- yes --> VS["Verify signature and install ID claim"] + EX -- no --> RL + VS -- refused --> E4["403 replay, 409 install ID claimed"] + VS -- ok --> RL{"Within INGEST_SOURCE_DAILY_LIMIT?"} + RL -- no --> E3["429"] + RL -- yes --> AG["Daily aggregates in SQLite"] + AG --> DB["Dashboard listener: /api/v1/views, /metrics"] + AG --> SM["GET /v1/summary: snapshot, refreshed at most every 5 min"] + LC["Hourly lifecycle sweep"] --> AG +``` + For a provider without a CDN, trust only the ingress controller's pod CIDR. ## 6. Verify diff --git a/src/content/docs/users-auth-rbac.mdx b/src/content/docs/users-auth-rbac.mdx index 9788a4d..aff6411 100644 --- a/src/content/docs/users-auth-rbac.mdx +++ b/src/content/docs/users-auth-rbac.mdx @@ -112,7 +112,29 @@ Add OIDC providers under **Admin Settings → Authentication → Add provider**. Supported providers include Keycloak, Authentik, Google, GitHub, and any RFC-7519 compliant OpenID Connect provider. Detailed setup guides for Keycloak, Authentik, Google, and GitHub follow the same issuer/client ID/secret pattern. -When a user logs in via OIDC for the first time, Gameplane creates a user row with the `viewer` role. Admins must promote new OIDC users manually via the dashboard or custom role bindings. +When a user logs in via OIDC for the first time, Gameplane creates a user row. Without role mappings the role is `viewer` and admins must promote new OIDC users manually via the dashboard or custom role bindings; with role mappings the role comes from the user's IdP groups (see Install-time role mappings below). + +The sequence below shows the OIDC sign-in round trip between the browser, the API, and the identity provider. + +```mermaid +sequenceDiagram + autonumber + participant B as Browser + participant A as API (/auth/oidc/NAME) + participant I as Identity provider + B->>A: GET /start + A-->>B: 302 to IdP, sets state and nonce cookies (HttpOnly, Secure) + B->>I: Authorize with state and nonce + I-->>B: 302 to /callback with code and state + B->>A: GET /callback, with state and nonce cookies + A->>A: Compare state with state cookie, 400 on mismatch + A->>I: Exchange code for tokens + I-->>A: id_token + A->>A: Verify id_token signature, check nonce cookie + A->>A: Read groups claim and compute role + A->>A: Create or update user by issuer and subject, audit role + A-->>B: Set session and CSRF cookies, 302 to / +``` ### Install-time role mappings @@ -124,6 +146,24 @@ Helm role mappings eliminate the need for a `bootstrap-admin` account in OIDC-on When deploying with Helm, set `api.oidc.enabled=true`, `api.oidc.groupsClaim` to the name of your IdP's groups claim (e.g., `"groups"`), and configure `api.oidc.roleMappings.{admin,operator,viewer}` with a list of group names for each role. On first login, Gameplane matches the user's group membership against the mappings and assigns the highest-privilege matching role. +The flowchart below shows how the API picks a role from the user's groups, including the case where no mapping matches. + +```mermaid +flowchart TD + A["Groups from groupsClaim"] --> B{"Role mappings configured?"} + B -- no --> V["viewer"] + B -- yes --> C{"A group in the admin list?"} + C -- yes --> AD["admin"] + C -- no --> D{"A group in the operator list?"} + D -- yes --> OP["operator"] + D -- no --> E{"A group in the viewer list?"} + E -- yes --> VW["viewer"] + E -- no --> F{"defaultRole"} + F -- "deny" --> R["Login refused"] + F -- "viewer or empty" --> V2["viewer"] + F -- "admin or operator" --> G["defaultRole value"] +``` + After deployment, admins can override role mappings through the dashboard without restarting the API. Helm upgrades preserve dashboard customizations — they do not overwrite group mappings that have already been edited in the UI. For detailed Helm value examples and troubleshooting, see the [OIDC provider setup documentation](https://github.com/GameplanePanel/Gameplane/blob/master/docs/oidc.md#role-mapping-at-install-time-no-bootstrap-admin-required) on GitHub.